Gtk.Handle_Box

Entities

Tagged Types

Access Types

Constants

Subprograms

Generic Instantiations

Description

The Gtk.Handle_Box.Gtk_Handle_Box 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 explicitly, 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.Enums.Pos_Bottom.

> Gtk.Handle_Box.Gtk_Handle_Box has been deprecated. It is very specialized, lacks features > to make it useful and most importantly does not fit well into modern > application design. Do not use it. There is no replacement.

"+"

function "+"
  (Widget : access Gtk_Handle_Box_Record'Class)
return Gtk.Buildable.Gtk_Buildable
Parameters
Widget
Return Value

"-"

function "-"
  (Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Handle_Box
Parameters
Interf
Return Value

Cb_GObject_Gtk_Widget_Void

type Cb_GObject_Gtk_Widget_Void is not null access procedure
  (Self   : access Glib.Object.GObject_Record'Class;
   Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class);
Parameters
Self
Widget

Cb_Gtk_Handle_Box_Gtk_Widget_Void

type Cb_Gtk_Handle_Box_Gtk_Widget_Void is not null access procedure
  (Self   : access Gtk_Handle_Box_Record'Class;
   Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class);
Parameters
Self
Widget

Child_Detached_Property

Child_Detached_Property : constant Glib.Properties.Property_Boolean;

Get_Child_Detached

function Get_Child_Detached
   (Handle_Box : not null access Gtk_Handle_Box_Record) return Boolean

Whether the handlebox's child is currently detached. Since: gtk+ 2.14 Deprecated since 3.4, 1

Parameters
Handle_Box
Return Value

True if the child is currently detached, otherwise False

Get_Handle_Position

function Get_Handle_Position
   (Handle_Box : not null access Gtk_Handle_Box_Record)
    return Gtk.Enums.Gtk_Position_Type

Gets the handle position of the handle box. See Gtk.Handle_Box.Set_Handle_Position. Deprecated since 3.4, 1

Parameters
Handle_Box
Return Value

the current handle position.

Get_Shadow_Type

function Get_Shadow_Type
   (Handle_Box : not null access Gtk_Handle_Box_Record)
    return Gtk.Enums.Gtk_Shadow_Type

Gets the type of shadow drawn around the handle box. See Gtk.Handle_Box.Set_Shadow_Type. Deprecated since 3.4, 1

Parameters
Handle_Box
Return Value

the type of shadow currently drawn around the handle box.

Get_Snap_Edge

function Get_Snap_Edge
   (Handle_Box : not null access Gtk_Handle_Box_Record)
    return Gtk.Enums.Gtk_Position_Type

Gets the edge used for determining reattachment of the handle box. See Gtk.Handle_Box.Set_Snap_Edge. Deprecated since 3.4, 1

Parameters
Handle_Box
Return Value

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

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_Handle_Box

type Gtk_Handle_Box is access all Gtk_Handle_Box_Record'Class;

Gtk_Handle_Box_New

function Gtk_Handle_Box_New return Gtk_Handle_Box

Create a new handle box.

Return Value

Gtk_Handle_Box_Record

type Gtk_Handle_Box_Record is new Gtk_Bin_Record with null record;

Gtk_New

procedure Gtk_New (Handle_Box : out Gtk_Handle_Box)

Create a new handle box. Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Handle_Box

Handle_Position_Property

Handle_Position_Property : constant Gtk.Enums.Property_Gtk_Position_Type;

Implements_Gtk_Buildable

package Implements_Gtk_Buildable is new Glib.Types.Implements
  (Gtk.Buildable.Gtk_Buildable, Gtk_Handle_Box_Record, Gtk_Handle_Box);

Initialize

procedure Initialize
   (Handle_Box : not null access Gtk_Handle_Box_Record'Class)

Create a new handle box. Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Handle_Box

On_Child_Attached

procedure On_Child_Attached
   (Self  : not null access Gtk_Handle_Box_Record;
    Call  : Cb_GObject_Gtk_Widget_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

This signal is emitted when the contents of the handlebox are reattached to the main window.

Parameters
Self
Call
Slot
After

On_Child_Attached

procedure On_Child_Attached
   (Self  : not null access Gtk_Handle_Box_Record;
    Call  : Cb_Gtk_Handle_Box_Gtk_Widget_Void;
    After : Boolean := False)

This signal is emitted when the contents of the handlebox are reattached to the main window.

Parameters
Self
Call
After

On_Child_Detached

procedure On_Child_Detached
   (Self  : not null access Gtk_Handle_Box_Record;
    Call  : Cb_GObject_Gtk_Widget_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

This signal is emitted when the contents of the handlebox are detached from the main window.

Parameters
Self
Call
Slot
After

On_Child_Detached

procedure On_Child_Detached
   (Self  : not null access Gtk_Handle_Box_Record;
    Call  : Cb_Gtk_Handle_Box_Gtk_Widget_Void;
    After : Boolean := False)

This signal is emitted when the contents of the handlebox are detached from the main window.

Parameters
Self
Call
After

Set_Handle_Position

procedure Set_Handle_Position
   (Handle_Box : not null access Gtk_Handle_Box_Record;
    Position   : Gtk.Enums.Gtk_Position_Type)

Sets the side of the handlebox where the handle is drawn. Deprecated since 3.4, 1

Parameters
Handle_Box
Position

the side of the handlebox where the handle should be drawn.

Set_Shadow_Type

procedure Set_Shadow_Type
   (Handle_Box : not null access Gtk_Handle_Box_Record;
    The_Type   : Gtk.Enums.Gtk_Shadow_Type)

Sets the type of shadow to be drawn around the border of the handle box. Deprecated since 3.4, 1

Parameters
Handle_Box
The_Type

the shadow type.

Set_Snap_Edge

procedure Set_Snap_Edge
   (Handle_Box : not null access Gtk_Handle_Box_Record;
    Edge       : Gtk.Enums.Gtk_Position_Type)

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.Enums.Pos_Right or Gtk.Enums.Pos_Left, then the snap edge will be Gtk.Enums.Pos_Top, otherwise it will be Gtk.Enums.Pos_Left. Deprecated since 3.4, 1

Parameters
Handle_Box
Edge

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

Shadow_Type_Property

Shadow_Type_Property : constant Gtk.Enums.Property_Gtk_Shadow_Type;

Signal_Child_Attached

Signal_Child_Attached : constant Glib.Signal_Name := "child-attached";

This signal is emitted when the contents of the handlebox are reattached to the main window.

Signal_Child_Detached

Signal_Child_Detached : constant Glib.Signal_Name := "child-detached";

This signal is emitted when the contents of the handlebox are detached from the main window.

Snap_Edge_Property

Snap_Edge_Property : constant Gtk.Enums.Property_Gtk_Position_Type;

Snap_Edge_Set_Property

Snap_Edge_Set_Property : constant Glib.Properties.Property_Boolean;