Main Page Widgets Namespaces Book

# Gtk::HandleBox Class Reference
[Widgets, Container Widgets]

Inheritance diagram for Gtk::HandleBox:

[legend]
List of all members.

## Detailed Description

A widget for detachable window portions.

The Gtk::HandleBox widget allows a portion of a window to be "torn off". It 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 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_POS_BOTTOM.

## Public Member Functions

virtual | ~HandleBox ()
GtkHandleBox* | gobj ()
| Provides access to the underlying C GtkObject.
const GtkHandleBox* | gobj () const
| Provides access to the underlying C GtkObject.
| HandleBox ()
void | set_shadow_type (ShadowType type)
ShadowType | get_shadow_type () const
| Gets the type of shadow drawn around the handle box.
void | set_handle_position (PositionType position)
PositionType | get_handle_position () const
| Gets the handle position of the handle box.
void | set_snap_edge (PositionType edge)
PositionType | get_snap_edge () const
| Gets the edge used for determining reattachment of the handle box.
Glib::SignalProxy1< void, Widget* > | signal_child_attached ()
Glib::SignalProxy1< void, Widget* > | signal_child_detached ()
Glib::RefPtr<Gdk::Window> | get_bin_window ()
Glib::RefPtr<const Gdk::Window> | get_bin_window () const
Glib::RefPtr<Gdk::Window> | get_float_window ()
Glib::RefPtr<const Gdk::Window> | get_float_window () const
bool | is_child_detached () const
bool | is_float_window_mapped () const
bool | is_in_drag () const
bool | shrinks_on_detach () const
Glib::PropertyProxy<ShadowType> | property_shadow_type ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<PositionType> | property_handle_position ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<PositionType> | property_snap_edge ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.

## Protected Member Functions

virtual void | on_child_attached (Widget* child)
virtual void | on_child_detached (Widget* child)

## Related Functions

(Note that these are not member functions.)
Gtk::HandleBox* | wrap (GtkHandleBox* object, bool take_copy=false)

## Constructor & Destructor Documentation

virtual Gtk::HandleBox::~HandleBox | ( |  | ) | `[virtual]`

Gtk::HandleBox::HandleBox | ( |  | ) |

## Member Function Documentation

Glib::RefPtr<const Gdk::Window> Gtk::HandleBox::get_bin_window | ( |  | ) | const

Glib::RefPtr<Gdk::Window> Gtk::HandleBox::get_bin_window | ( |  | ) |

Glib::RefPtr<const Gdk::Window> Gtk::HandleBox::get_float_window | ( |  | ) | const

Glib::RefPtr<Gdk::Window> Gtk::HandleBox::get_float_window | ( |  | ) |

PositionType Gtk::HandleBox::get_handle_position | ( |  | ) | const

Gets the handle position of the handle box.

See set_handle_position().

Returns:
  The current handle position.

ShadowType Gtk::HandleBox::get_shadow_type | ( |  | ) | const

Gets the type of shadow drawn around the handle box.

See set_shadow_type().

Returns:
  The type of shadow currently drawn around the handle box.

PositionType Gtk::HandleBox::get_snap_edge | ( |  | ) | const

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

See set_snap_edge().

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

const GtkHandleBox* Gtk::HandleBox::gobj | ( |  | ) | const`[inline]`

| Provides access to the underlying C GtkObject. Reimplemented from Gtk::Bin.

GtkHandleBox* Gtk::HandleBox::gobj | ( |  | ) | `[inline]`

| Provides access to the underlying C GtkObject. Reimplemented from Gtk::Bin.

bool Gtk::HandleBox::is_child_detached | ( |  | ) | const

bool Gtk::HandleBox::is_float_window_mapped | ( |  | ) | const

bool Gtk::HandleBox::is_in_drag | ( |  | ) | const

virtual void Gtk::HandleBox::on_child_attached | ( | Widget* | child | ) | `[protected, virtual]`

virtual void Gtk::HandleBox::on_child_detached | ( | Widget* | child | ) | `[protected, virtual]`

Glib::PropertyProxy<PositionType> Gtk::HandleBox::property_handle_position | ( |  | ) |

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<ShadowType> Gtk::HandleBox::property_shadow_type | ( |  | ) |

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<PositionType> Gtk::HandleBox::property_snap_edge | ( |  | ) |

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

void Gtk::HandleBox::set_handle_position | ( | PositionType | position | ) |

void Gtk::HandleBox::set_shadow_type | ( | ShadowType | type | ) |

void Gtk::HandleBox::set_snap_edge | ( | PositionType | edge | ) |

bool Gtk::HandleBox::shrinks_on_detach | ( |  | ) | const

Glib::SignalProxy1<void,Widget*> Gtk::HandleBox::signal_child_attached | ( |  | ) |

Prototype:
  `void child_attached(Widget* child)`

Glib::SignalProxy1<void,Widget*> Gtk::HandleBox::signal_child_detached | ( |  | ) |

Prototype:
  `void child_detached(Widget* child)`

## Friends And Related Function Documentation

Gtk::HandleBox* wrap | ( | GtkHandleBox* | object,
|  | bool | take_copy = false
| ) | `[related]`

The documentation for this class was generated from the following file:

- handlebox.h