11.79Class GtkLayout

Infinite scrollable area containing child widgets and/or custom drawing

Class GtkLayout( [hadjustment],[vadjustment] )
hadjustment (GtkAdjustment) horizontal scroll adjustment
vadjustment (GtkAdjustment) vertical scroll adjustment

GtkLayout is similar to GtkDrawingArea in that it's a "blank slate" and doesn't do anything but paint a blank background by default. It's different in that it supports scrolling natively (you can add it to a GtkScrolledWindow), and it can contain child widgets, since it's a GtkContainer. However if you're just going to draw, a GtkDrawingArea is a better choice since it has lower overhead.

When handling expose events on a GtkLayout, you must draw to GTK_LAYOUT (layout)->bin_window, rather than to GTK_WIDGET (layout)->window, as you would for a drawing area.

Methods
get_hadjustmentReturns the GtkAdjustment used for communication between the horizontal scrollbar and layout.
get_sizeGets the size that has been set on the layout, and that determines the total extents of the layout's scrollbar area.
get_vadjustmentReturns the GtkAdjustment used for communication between the vertical scrollbar and layout.
moveMoves a current child of layout to a new position.
putAdds child_widget to layout, at position (x,y). layout becomes the new parent container of child_widget.
set_hadjustmentSets the horizontal scroll adjustment for the layout.
set_sizeSets the size of the scrollable area of the layout.
set_vadjustmentSets the vertical scroll adjustment for the layout.

Methods

get_hadjustment

Returns the GtkAdjustment used for communication between the horizontal scrollbar and layout.

GtkLayout.get_hadjustment()
Returnhorizontal scroll adjustment

This function should only be called after the layout has been placed in a GtkScrolledWindow or otherwise configured for scrolling. It returns the GtkAdjustment used for communication between the horizontal scrollbar and layout.

See GtkScrolledWindow, GtkScrollbar, GtkAdjustment for details.

get_size

Gets the size that has been set on the layout, and that determines the total extents of the layout's scrollbar area.

GtkLayout.get_size()
Return[ width, height ]

get_vadjustment

Returns the GtkAdjustment used for communication between the vertical scrollbar and layout.

GtkLayout.get_vadjustment()
Returnvertical scroll adjustment

This function should only be called after the layout has been placed in a GtkScrolledWindow or otherwise configured for scrolling. It returns the GtkAdjustment used for communication between the vertical scrollbar and layout.

See GtkScrolledWindow, GtkScrollbar, GtkAdjustment for details.

move

Moves a current child of layout to a new position.

GtkLayout.move( child_widget, x, y )
child_widget a current child of layout
x X position to move to
y Y position to move to

put

Adds child_widget to layout, at position (x,y). layout becomes the new parent container of child_widget.

GtkLayout.put( child, x, y )
child (GtkWidget)
x X position of child widget
y Y position of child widget

set_hadjustment

Sets the horizontal scroll adjustment for the layout.

GtkLayout.set_hadjustment( adjustment )
adjustment new scroll adjustment (or nil)

See GtkScrolledWindow, GtkScrollbar, GtkAdjustment for details.

set_size

Sets the size of the scrollable area of the layout.

GtkLayout.set_size( width, height )
width width of entire scrollable area
height height of entire scrollable area

set_vadjustment

Sets the vertical scroll adjustment for the layout.

GtkLayout.set_vadjustment( adjustment )
adjustment new scroll adjustment (or nil) See GtkScrolledWindow, GtkScrollbar, GtkAdjustment for details.
Made with http://www.falconpl.org