W Wrapl, The Programming Language

Libraries:Gtk:Gtk:Layout

Types

T

Inherits from:

T is similar to Gtk.Gtk.DrawingArea.T 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 Gtk.Gtk.ScrolledWindow.T), and it can contain child widgets, since it's a Gtk.Gtk.Container.T. However if you're just going to draw, a Gtk.Gtk.DrawingArea.T is a better choice since it has lower overhead.

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



Constants

Nil : T

Functions

GetType() : Gtk.GObject.Type.T



New(hadjustment @ Gtk.Gtk.Adjustment.T, vadjustment @ Gtk.Gtk.Adjustment.T) : Gtk.Gtk.Layout.T

Creates a new T. Unless you have a specific adjustment you'd like the layout to use for scrolling, pass NULL for hadjustment and vadjustment.

hadjustment horizontal scroll adjustment, or NULL. [allow-none]
vadjustment vertical scroll adjustment, or NULL. [allow-none]
Returns a new T


Methods

:Freeze(self @ T) : Std.Object.T

Warning

Freeze is deprecated and should not be used in newly-written code.



:GetBinWindow(self @ T) : Gtk.Gdk.Window.T

Retrieve the bin window of the layout used for drawing operations.

layout a T
Returns a Gtk.Gdk.Window.T. [transfer none]


:GetHadjustment(self @ T) : Gtk.Gtk.Adjustment.T

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

See Gtk.Gtk.ScrolledWindow.T, Gtk.Gtk.Scrollbar.T, Gtk.Gtk.Adjustment.T for details.

layout a T
Returns horizontal scroll adjustment. [transfer none]


:GetSize(self @ T, width @ Std.Object.T, height @ Std.Object.T) : Std.Object.T

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

layout a T
width location to store the width set on layout, or NULL. [out][allow-none]
height location to store the height set on layout, or NULL. [out][allow-none]


:GetVadjustment(self @ T) : Gtk.Gtk.Adjustment.T

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

See Gtk.Gtk.ScrolledWindow.T, Gtk.Gtk.Scrollbar.T, Gtk.Gtk.Adjustment.T for details.

layout a T
Returns vertical scroll adjustment. [transfer none]


:Move(self @ T, child_widget @ Gtk.Gtk.Widget.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT) : Std.Object.T

Moves a current child of layout to a new position.

layout a T
child_widget a current child of layout
x X position to move to
y Y position to move to


:Put(self @ T, child_widget @ Gtk.Gtk.Widget.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT) : Std.Object.T

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

layout a T
child_widget child widget
x X position of child widget
y Y position of child widget


:SetHadjustment(self @ T, adjustment @ Gtk.Gtk.Adjustment.T) : Std.Object.T

Sets the horizontal scroll adjustment for the layout.

See Gtk.Gtk.ScrolledWindow.T, Gtk.Gtk.Scrollbar.T, Gtk.Gtk.Adjustment.T for details.

layout a T
adjustment new scroll adjustment. [allow-none]


:SetSize(self @ T, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Std.Object.T

Sets the size of the scrollable area of the layout.

layout a T
width width of entire scrollable area
height height of entire scrollable area


:SetVadjustment(self @ T, adjustment @ Gtk.Gtk.Adjustment.T) : Std.Object.T

Sets the vertical scroll adjustment for the layout.

See Gtk.Gtk.ScrolledWindow.T, Gtk.Gtk.Scrollbar.T, Gtk.Gtk.Adjustment.T for details.

layout a T
adjustment new scroll adjustment. [allow-none]


:Thaw(self @ T) : Std.Object.T

Warning

Thaw is deprecated and should not be used in newly-written code.