gtk
Signals
"size-allocate" gtk.Widget Signal The "size-allocate" signal is emitted when widget is given a new space allocation.
"size-request" gtk.Widget Signal The "size-request" signal is emitted when a new size is requested for widget using the set_size_request() method.
Methods
gtk.Widget.set_size_request The set_size_request() method sets the minimum size of a widget to the values specified by width and height. You can use this method to force a widget to be either larger or smaller than it normally would be. In most cases, the gtk.Window.set_default_size() is a better choice for toplevel windows than this method. Setting the default size will still allow users to shrink the window but setting the size request will force them to leave the window at least as large as the size request. When dealing with window sizes, the gtk.Window.set_geometry_hints() can be a useful method as well.
gtk.Widget.get_size_request The get_size_request() method returns a 2-tuple containing the width and height of the widget that was explicitly set for the widget using the set_size_request(). A value of -1 for the width or height indicates that that dimension has not been set explicitly and the natural requisition of the widget will be used instead. See the set_size_request() method for more information. To get the size a widget will actually use, call the size_request() instead of this method.
gtk.Widget.size_request The size_request() method returns the preferred size of a widget as a tuple containing its required width and height. This method is typically used when implementing a gtk.Container subclass to arrange the container's child widgets and decide what size allocations to give them with the size_allocate() method.
gtk.Widget.size_allocate The size_allocate() method sets a size allocation for the widget using the gtk.gdk.Rectangle specified by allocation. This method is only used by gtk.Container subclasses, to assign a size and position to their child widgets.
gtk.Widget.get_child_requisition The get_child_requisition() method returns a tuple containing the widget requisition width and height. This method is only for use in widget container implementations since it obtains the widget requisition directly. By comparison the size_request() method actually computes the size request and fills in the widget requisition before returning. Because this method does not recalculate the size request, it can only be used when you know that the widget requisition is up-to-date, i.e. the size_request() method has been called since the last time a resize was queued. In general, only container implementations have this information; applications should use the size_request() method instead.