开发者

What does GTK_WINDOW(window)->allow_shrink = TRUE mean in c?

I'm just getting started with gtk,anyone knows what this means?

GTK_WINDOW(window)->allow_shrink = TRUE;
开发者_StackOverflow


It means the user can resize the window to smaller dimensions than were specified on creation of the window. GTK+ has an excellent reference, a quick search is all you need.


According to the GTK docs, something you shouldn't do:

If allow_shrink is TRUE, the user can shrink the window so that its children do not receive their full size request; this is basically a bad thing, because most widgets will look wrong if this happens. Furthermore GTK+ has a tendency to re-expand the window if size is recalculated for any reason. The upshot is that allow_shrink should always be set to FALSE.

See this page for more info.


If TRUE, the window has no mimimum size. Setting this to TRUE is 99% of the time a bad idea.

Default value: FALSE

If allow_shrink is TRUE, the user can shrink the window so that its children do not receive their full size request; this is basically a bad thing, because most widgets will look wrong if this happens. Furthermore GTK+ has a tendency to re-expand the window if size is recalculated for any reason. The upshot is that allow_shrink should always be set to FALSE.


If you are referring to the GTK_WINDOW(window) part, then I imagine it is casting/adjusting the pointer to obtain a pointer to a struct type for a window object that contains a variable called allow_shrink.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜