GtkWindow
Toplevel which can contain other widgets
@type:
@Returns:
@window:
@title:
@window:
@wmclass_name:
@wmclass_class:
Changes how a toplevel window deals with its size request and user resize
attempts. There are really only two reasonable ways to call this function:
gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, FALSE)
means that the window is user-resizable.
gtk_window_set_policy (GTK_WINDOW (window), FALSE, FALSE, TRUE)
means that the window's size is program-controlled, and should simply match
the current size request of the window's children.
The first policy is the default, that is, by default windows are designed to
be resized by users.
The basic ugly truth of this function is that it should be simply:
void gtk_window_set_resizable (GtkWindow* window, gboolean setting);
...which is why GTK+ 2.0 introduces gtk_window_set_resizable(), which you
should use instead of gtk_window_set_policy().
If set to %TRUE, the @allow_grow parameter allows the user to expand the window
beyond the size request of its child widgets. If @allow_grow is %TRUE, be sure to
check that your child widgets work properly as the window is resized.
A toplevel window will always change size to ensure its child widgets receive
their requested size. This means that if you add child widgets, the toplevel
window will expand to contain them. However, normally the toplevel will not
shrink to fit the size request of its children if it's too large; the
@auto_shrink parameter causes the window to shrink when child widgets have too
much space. @auto_shrink is normally used with the second of the two window
policies mentioned above. That is, set @auto_shrink to %TRUE if you want the
window to have a fixed, always-optimal size determined by your program.
Note that @auto_shrink doesn't do anything if @allow_shrink and @allow_grow are
both set to %FALSE.
Neither of the two suggested window policies set the @allow_shrink parameter to
%TRUE. 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.
Sometimes when you think you want to use @allow_shrink, the real problem is that
some specific child widget is requesting too much space, so the user can't
shrink the window sufficiently. Perhaps you are calling gtk_widget_set_size_request()
on a child widget, and forcing its size request to be too large. Instead of
setting the child's usize, consider using gtk_window_set_default_size() so that
the child gets a larger allocation than it requests.
@window: the window
@allow_shrink: whether the user can shrink the window below its size request
@allow_grow: whether the user can grow the window larger than its size request
@auto_shrink: whether the window automatically snaps back to its size request
if it's larger
@Deprecated: Use gtk_window_set_resizable() instead.
@window:
@resizable:
@window:
@Returns:
@window:
@accel_group:
@window:
@accel_group:
Deprecated alias for gtk_window_set_position().
@window:
@Returns:
@window:
@Returns:
@window:
@modal:
@window:
@width:
@height:
@window:
@geometry_widget:
@geometry:
@geom_mask:
@window:
@gravity:
@window:
@Returns:
@window:
@position:
@window:
@parent:
@window:
@setting:
@window:
@screen:
@window:
@Returns:
@Returns:
@window:
@keyval:
@target:
@window:
@keyval:
@target:
@window:
@keyval:
@modifier:
@Returns:
@window:
@Returns:
@window:
@focus:
@window:
@default_widget:
@window:
@window:
@window:
@window:
@window:
@window:
@window:
@window:
@window:
@window:
@setting:
@window:
@setting:
@window:
@edge:
@button:
@root_x:
@root_y:
@timestamp:
@window:
@button:
@root_x:
@root_y:
@timestamp:
@window:
@setting:
@window:
@left:
@top:
@right:
@bottom:
@window:
@setting:
@window:
@modifier:
@window:
@role:
@window:
@hint:
@window:
@setting:
@window:
@setting:
@window:
@Returns:
@Returns:
@window:
@width:
@height:
@window:
@Returns:
@window:
@left:
@top:
@right:
@bottom:
@window:
@Returns:
@window:
@Returns:
@window:
@Returns:
@window:
@Returns:
@window:
@Returns:
@window:
@root_x:
@root_y:
@x:
@y:
@window:
@Returns:
@window:
@width:
@height:
@window:
@Returns:
@window:
@Returns:
@window:
@Returns:
@window:
@Returns:
@window:
@Returns:
@window:
@x:
@y:
@window:
@geometry:
@Returns:
@window:
@window:
@width:
@height:
@list:
@icon:
@pixbuf:
@filename:
@err:
@Returns:
@window:
@icon:
@window:
@list:
@window:
@filename:
@err:
@Returns:
@setting:
@window:
@window:
@window:
@title:
@window:
@x:
@y:
@width:
@height:
@window: the object which received the signal.
@window: the object which received the signal.
@window: the object which received the signal.
@event:
@Returns:
@window: the object which received the signal.
@window: the object which received the signal.
@arg1:
@window: the object which received the signal.
@widget: