logo top
Main Page   Widgets   Namespaces   Book  

Gtk::Box Class Reference

A base class for box containers. More...

Inheritance diagram for Gtk::Box:

Inheritance graph
[legend]
List of all members.

Public Types

typedef Box_Helpers::BoxList BoxList

Public Member Functions

virtual ~Box ()
GtkBox* gobj ()
 Provides access to the underlying C GtkObject.

const GtkBox* gobj () const
 Provides access to the underlying C GtkObject.

void pack_start (Widget& child, bool expand, bool fill, guint padding=0)
void pack_start (Widget& child, PackOptions options=PACK_EXPAND_WIDGET, guint padding=0)
void pack_end (Widget& child, bool expand, bool fill, guint padding=0)
void pack_end (Widget& child, PackOptions options=PACK_EXPAND_WIDGET, guint padding=0)
void set_homogeneous (bool homogeneous=true)
bool get_homogeneous () const
void set_spacing (int spacing)
int get_spacing () const
void reorder_child (Widget& child, int pos)
BoxListchildren ()
const BoxListchildren () const
Glib::PropertyProxy<int> property_spacing ()
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy<bool> property_homogeneous ()
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.


Protected Member Functions

 Box ()

Related Functions

(Note that these are not member functions.)

Gtk::Boxwrap (GtkBox* object, bool take_copy=false)

Detailed Description

A base class for box containers.

Abstract base class for horizontal and vertical boxes, which organize a variable number of widgets into a rectangular area. This is an abstract class and it defers choice of which way the widgets are packed to the screen to the derived classes. It provides a common interface for inserting widgets to a box indepenently of how it is shown in the screen.

Gtk::Box uses a notion of packing. Packing refers to adding widgets with reference to a particular position in a Gtk::Container. There are two reference positions: the start and the end of the box. For a VBox, the start is defined as the top of the box and the end is defined as the bottom. For a HBox the start is defined as the left side and the end is defined as the right side. Use repeated calls to pack_start() to pack widgets into a Gtk::Box from start to end. Use pack_end() to add widgets from end to start. You may intersperse these calls and add widgets from both ends of the same Gtk::Box.

Because Gtk::Box is a Gtk::Container, you may also use Gtk::Container::add() to insert widgets, and they will be packed as if with pack_start(). Use Gtk::Container::remove() to remove widgets.

Use set_homogeneous() to specify whether or not all children of the Gtk::Box occupy the same amount of space. Use set_spacing() to determine the minimum space placed between all children in the Gtk::Box. Use reorder_child() to move a child widget to a different place in the box. Use set_child_packing() to reset the pack options and padding attributes of any Gtk::Box child. Use query_child_packing() to query these fields.


Member Typedef Documentation

typedef Box_Helpers::BoxList Gtk::Box::BoxList
 


Constructor & Destructor Documentation

virtual Gtk::Box::~Box (  )  [virtual]
 

Gtk::Box::Box (  )  [protected]
 


Member Function Documentation

const BoxList& Gtk::Box::children (  )  const
 

BoxList& Gtk::Box::children (  ) 
 

bool Gtk::Box::get_homogeneous (  )  const
 

int Gtk::Box::get_spacing (  )  const
 

const GtkBox* Gtk::Box::gobj (  )  const [inline]
 

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Container.

Reimplemented in Gtk::VBox, Gtk::HBox, Gtk::ButtonBox, Gtk::VButtonBox, Gtk::HButtonBox, Gtk::ColorSelection, Gtk::Combo, Gtk::GammaCurve, Gtk::FileChooserWidget, Gtk::FontSelection, and Gtk::Statusbar.

GtkBox* Gtk::Box::gobj (  )  [inline]
 

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Container.

Reimplemented in Gtk::VBox, Gtk::HBox, Gtk::ButtonBox, Gtk::VButtonBox, Gtk::HButtonBox, Gtk::ColorSelection, Gtk::Combo, Gtk::GammaCurve, Gtk::FileChooserWidget, Gtk::FontSelection, and Gtk::Statusbar.

void Gtk::Box::pack_end ( Widget child,
PackOptions  options = PACK_EXPAND_WIDGET,
guint  padding = 0
 

void Gtk::Box::pack_end ( Widget child,
bool  expand,
bool  fill,
guint  padding = 0
 

void Gtk::Box::pack_start ( Widget child,
PackOptions  options = PACK_EXPAND_WIDGET,
guint  padding = 0
 

void Gtk::Box::pack_start ( Widget child,
bool  expand,
bool  fill,
guint  padding = 0
 

Glib::PropertyProxy<bool> Gtk::Box::property_homogeneous (  ) 
 

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<int> Gtk::Box::property_spacing (  ) 
 

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::Box::reorder_child ( Widget child,
int  pos
 

void Gtk::Box::set_homogeneous ( bool  homogeneous = true  ) 
 

void Gtk::Box::set_spacing ( int  spacing  ) 
 


Friends And Related Function Documentation

Gtk::Box* wrap ( GtkBox*  object,
bool  take_copy = false
[related]
 


The documentation for this class was generated from the following file:
Generated for gtkmm 2.2 by Doxygen 1.3.4 © 1997-2001