gtk.Layout infinite scrollable area containing child widgets and custom drawing Synopsis gtk.Layout gtk.Container gtk.Layout hadjustmentNone vadjustmentNone put child_widget x y move child_widget x y set_size width height get_size get_hadjustment get_vadjustment set_hadjustment adjustment set_vadjustment adjustment Ancestry +-- gobject.GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Container +-- gtk.Layout Properties
"hadjustment" Read-Write The gtk.Adjustment for the horizontal position. "vadjustment" Read-Write The gtk.Adjustment for the vertical position. "width" Read-Write the layout width "height" Read-Write the layout height
Child Properties
"x" Read-Write the X position of the child "y" Read-Write the Y position of the child
Attributes
"bin_window" Read the window of a layout to draw into
Signal Prototypes "set-scroll-adjustments" callback layout hadjustment vadjustment user_param1 ... Description The gtk.Layout is a simple container widget similar to the gtk.Fixed container widget. Like the gtk.Fixed the gtk.Layout places a child widget at a specific position within the container. The gtk.Layout offers two features beyond the gtk.Fixed widget: a very large width and height for the container - limited by the size of an unsigned integer. horizontal and vertical adjustments can be specified for use with scrollbars, etc. The gtk.Layout can also be drawn on similar to drawing on a gtk.DrawingArea. When handling expose events on a gtk.Layout, you must draw to the window specified by the bin_window attribute rather than the widget window attribute. Constructor gtk.Layout hadjustmentNone vadjustmentNone hadjustment : horizontal adjustment, or None vadjustment : vertical adjustment, or None Returns : a new gtk.Layout Creates a new gtk.Layout. Usually the hadjustment and vadjustment arguments are not specified or are specified as None, so that new adjustments are created. Methods gtk.Layout.put put child_widget x y child_widget : the child widget x : the X position of child widget y : the Y position of child widget The put() method adds child_widget to the layout and places its upper, left corner at the position specified by x and y. gtk.Layout.move move child_widget x y child_widget : a current child of the layout x : the X position to move child_widget to y : the Y position to move child_widget to The move() method moves a current child of the layout (specified by child_widget) to the new position specified by x and y. The upper, left corner of child_widget will be placed at (x, y). gtk.Layout.set_size set_size width height width : width of the layout area height : height of the layout area The set_size() method sets the size of the virtual area of the layout to the values specified by width and height. The "width" and "height" properties are also set by this method. gtk.Layout.get_size get_size Returns : a tuple containing the width and height set on layout The get_size() method returns a tuple that contains the width and height of the virtual size that has been set on the layout. See set_size(). gtk.Layout.get_hadjustment get_hadjustment Returns : a horizontal adjustment The get_hadjustment() method returns the value of the "hadjustment" property that contains the horizontal adjustment object associated with the layout. This function should only be called after the layout has been placed in a gtk.ScrolledWindow or has otherwise been configured for scrolling. See gtk.ScrolledWindow, gtk.Scrollbar, gtk.Adjustment for details. gtk.Layout.get_vadjustment get_vadjustment Returns : a vertical adjustment The get_vadjustment() method returns the "vadjustment" property that contains the vertical adjustment object associated with the layout. This function should only be called after the layout has been placed in a gtk.ScrolledWindow or has otherwise been configured for scrolling. See gtk.ScrolledWindow, gtk.Scrollbar, gtk.Adjustment for details. gtk.Layout.set_hadjustment set_hadjustment adjustment adjustment : a horizontal adjustment The set_hadjustment() method sets the horizontal adjustment for the layout (and the "hadjustment" property) to the value of adjustment. See gtk.ScrolledWindow, gtk.Scrollbar, gtk.Adjustment for details. gtk.Layout.set_vadjustment set_vadjustment adjustment adjustment : a vertical adjustment The set_vadjustment() method sets the vertical adjustment for the layout (and the "vadjustment" property) to the value of adjustment. See gtk.ScrolledWindow, gtk.Scrollbar, gtk.Adjustment for details. Signals The "set-scroll-adjustments" gtk.Layout Signal callback layout hadjustment vadjustment user_param1 ... layout : the layout that received the signal hadjustment : the horizontal adjustment associated with the layout. vadjustment : the horizontal adjustment associated with the layout. user_param1 : the first user parameter (if any) specified with the connect() method ... : additional user parameters (if any) The "set-scroll-adjustments" signal is emitted when one of the adjustments associated with a layout is changed.