Gtk.HandleBox¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
|
|
|
|
|
Virtual Methods¶
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
A boolean value indicating whether the handlebox’s child is attached or detached. |
||
r/w |
Position of the handle relative to the child widget |
||
r/w |
Appearance of the shadow that surrounds the container |
||
r/w |
Side of the handlebox that’s lined up with the docking point to dock the handlebox |
||
r/w |
Whether to use the value from the snap_edge property or a value derived from handle_position |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Name |
Short Description |
---|---|
This signal is emitted when the contents of the handlebox are reattached to the main window. |
|
This signal is emitted when the contents of the handlebox are detached from the main window. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
bin |
r |
Class Details¶
- class Gtk.HandleBox(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Gtk.HandleBox
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.PositionType.BOTTOM
.Gtk.HandleBox
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.- classmethod new()[source]¶
- Returns:
a new
Gtk.HandleBox
.- Return type:
Create a new handle box.
Deprecated since version 3.4:
Gtk.HandleBox
has been deprecated.
- get_child_detached()[source]¶
-
Whether the handlebox’s child is currently detached.
New in version 2.14.
Deprecated since version 3.4:
Gtk.HandleBox
has been deprecated.
- get_handle_position()[source]¶
- Returns:
the current handle position.
- Return type:
Gets the handle position of the handle box. See
Gtk.HandleBox.set_handle_position
().Deprecated since version 3.4:
Gtk.HandleBox
has been deprecated.
- get_shadow_type()[source]¶
- Returns:
the type of shadow currently drawn around the handle box.
- Return type:
Gets the type of shadow drawn around the handle box. See
Gtk.HandleBox.set_shadow_type
().Deprecated since version 3.4:
Gtk.HandleBox
has been deprecated.
- get_snap_edge()[source]¶
- Returns:
the edge used for determining reattachment, or (
Gtk.PositionType
)-1 if this is determined (as per default) from the handle position.- Return type:
Gets the edge used for determining reattachment of the handle box. See
Gtk.HandleBox.set_snap_edge
().Deprecated since version 3.4:
Gtk.HandleBox
has been deprecated.
- set_handle_position(position)[source]¶
- Parameters:
position (
Gtk.PositionType
) – the side of the handlebox where the handle should be drawn.
Sets the side of the handlebox where the handle is drawn.
Deprecated since version 3.4:
Gtk.HandleBox
has been deprecated.
- set_shadow_type(type)[source]¶
- Parameters:
type (
Gtk.ShadowType
) – the shadow type.
Sets the type of shadow to be drawn around the border of the handle box.
Deprecated since version 3.4:
Gtk.HandleBox
has been deprecated.
- set_snap_edge(edge)[source]¶
- Parameters:
edge (
Gtk.PositionType
) – the snap edge, or -1 to unset the value; in which case GTK+ will try to guess an appropriate value in the future.
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.PositionType.RIGHT
orGtk.PositionType.LEFT
, then the snap edge will beGtk.PositionType.TOP
, otherwise it will beGtk.PositionType.LEFT
.Deprecated since version 3.4:
Gtk.HandleBox
has been deprecated.
- do_child_attached(child) virtual¶
- Parameters:
child (
Gtk.Widget
) –
Signal emitted when the contents of the handlebox are reattached to the main window. Deprecated: 3.4.
- do_child_detached(child) virtual¶
- Parameters:
child (
Gtk.Widget
) –
Signal emitted when the contents of the handlebox are detached from the main window. Deprecated: 3.4.
Signal Details¶
- Gtk.HandleBox.signals.child_attached(handle_box, widget)¶
- Signal Name:
child-attached
- Flags:
- Parameters:
handle_box (
Gtk.HandleBox
) – The object which received the signalwidget (
Gtk.Widget
) – the child widget of the handlebox. (this argument provides no extra information and is here only for backwards-compatibility)
This signal is emitted when the contents of the handlebox are reattached to the main window.
Deprecated since version 3.4:
Gtk.HandleBox
has been deprecated.
- Gtk.HandleBox.signals.child_detached(handle_box, widget)¶
- Signal Name:
child-detached
- Flags:
- Parameters:
handle_box (
Gtk.HandleBox
) – The object which received the signalwidget (
Gtk.Widget
) – the child widget of the handlebox. (this argument provides no extra information and is here only for backwards-compatibility)
This signal is emitted when the contents of the handlebox are detached from the main window.
Deprecated since version 3.4:
Gtk.HandleBox
has been deprecated.
Property Details¶
- Gtk.HandleBox.props.child_detached¶
-
A boolean value indicating whether the handlebox’s child is attached or detached.
- Gtk.HandleBox.props.handle_position¶
- Name:
handle-position
- Type:
- Default Value:
- Flags:
Position of the handle relative to the child widget
- Gtk.HandleBox.props.shadow_type¶
- Name:
shadow-type
- Type:
- Default Value:
- Flags:
Appearance of the shadow that surrounds the container
- Gtk.HandleBox.props.snap_edge¶
- Name:
snap-edge
- Type:
- Default Value:
- Flags:
Side of the handlebox that’s lined up with the docking point to dock the handlebox