W Wrapl, The Programming Language




Inherits from:

The T widget allows a portion of a window to be "torn off". It is a bin widget which displays its child and a handle that the user can drag to tear off a separate window (the float window) containing the child widget. A thin ghost is drawn in the original location of the handlebox. By dragging the separate window back to its original location, it can be reattached.

When reattaching, the ghost and float window, must be aligned along one of the edges, the snap edge. This either can be specified by the application programmer explicitely, or GTK+ will pick a reasonable default based on the handle position.

To make detaching and reattaching the handlebox as minimally confusing as possible to the user, it is important to set the snap edge so that the snap edge does not move when the handlebox is deattached. For instance, if the handlebox is packed at the bottom of a VBox, then when the handlebox is detached, the bottom edge of the handlebox's allocation will remain fixed as the height of the handlebox shrinks, so the snap edge should be set to Gtk.Gtk.PositionType.Bottom.


Nil : T


GetType() : Gtk.GObject.Type.T

New() : Gtk.Gtk.HandleBox.T

Create a new handle box.

Returns a new T.


:GetChildDetached(self @ T) : Std.Symbol.T

Whether the handlebox's child is currently detached.

handle_box a T
Returns TRUE if the child is currently detached, otherwise FALSE

:GetHandlePosition(self @ T) : Gtk.Gtk.PositionType.T

Gets the handle position of the handle box. See SetHandlePosition.

handle_box a T
Returns the current handle position.

:GetShadowType(self @ T) : Gtk.Gtk.ShadowType.T

Gets the type of shadow drawn around the handle box. See SetShadowType.

handle_box a T
Returns the type of shadow currently drawn around the handle box.

:GetSnapEdge(self @ T) : Gtk.Gtk.PositionType.T

Gets the edge used for determining reattachment of the handle box. See SetSnapEdge.

handle_box a T
Returns the edge used for determining reattachment, or (GtkPositionType)-1 if this is determined (as per default) from the handle position.

:SetHandlePosition(self @ T, position @ Gtk.Gtk.PositionType.T) : Std.Object.T

Sets the side of the handlebox where the handle is drawn.

handle_box a T
position the side of the handlebox where the handle should be drawn.

:SetShadowType(self @ T, type @ Gtk.Gtk.ShadowType.T) : Std.Object.T

Sets the type of shadow to be drawn around the border of the handle box.

handle_box a T
type the shadow type.

:SetSnapEdge(self @ T, edge @ Gtk.Gtk.PositionType.T) : Std.Object.T

Sets the snap edge of a handlebox. The snap edge is the edge of the detached child that must be aligned with the corresponding edge of the "ghost" left behind when the child was detached to reattach the torn-off window. Usually, the snap edge should be chosen so that it stays in the same place on the screen when the handlebox is torn off.

If the snap edge is not set, then an appropriate value will be guessed from the handle position. If the handle position is Gtk.Gtk.PositionType.Right or Gtk.Gtk.PositionType.Left, then the snap edge will be Gtk.Gtk.PositionType.Top, otherwise it will be Gtk.Gtk.PositionType.Left.

handle_box a T
edge the snap edge, or -1 to unset the value; in which case GTK+ will try to guess an appropriate value in the future.

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

:setSnapEdge(self @ T, value @ Std.Object.T) : Std.Object.T