|
class gtk.Layout(gtk.Container): |
|
|
gtk.Container Signal Prototypes
def callback( |
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:
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.
gtk.Layout(hadjustment
=None, vadjustment
=None)
| horizontal adjustment, or
None |
| 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.
def put(child_widget
, x
, y
)
| the child widget |
| the X position of child widget |
| 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
.
def move(child_widget
, x
, y
)
| a current child of the layout |
| the X position to move
child_widget to |
| 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
).
def set_size(width
, height
)
| width of the layout area |
| 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.
def 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
().
def 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.
def 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.
def set_hadjustment(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.
def set_vadjustment(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.
def get_bin_window()
Returns : | a
gtk.gdk.Window .
|
This method is available in PyGTK 2.14 and above.
The get_bin_window
() method retrieve the bin window
of the layout used for drawing operations.
def callback(layout
, hadjustment
, vadjustment
, user_param1
, ...
)
| the layout that received the signal |
| the horizontal adjustment associated with the layout. |
| the horizontal adjustment associated with the layout. |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
The "set-scroll-adjustments" signal is emitted when one of the adjustments associated with a layout is changed.
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.