logo top
Main Page   Widgets   Namespaces   Book  

Gtk::Table Class Reference
[WidgetsContainer Widgets]

Pack widgets in regular patterns. More...

Inheritance diagram for Gtk::Table:

Inheritance graph
[legend]
List of all members.

Public Types

typedef Table_Helpers::TableList TableList

Public Member Functions

virtual ~Table ()
GtkTable* gobj ()
 Provides access to the underlying C GtkObject.

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

 Table (guint n_rows=1, guint n_columns=1, bool homogeneous=false)
void attach (Widget& child, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach, AttachOptions xoptions=FILL|EXPAND, AttachOptions yoptions=FILL|EXPAND, guint xpadding=0, guint ypadding=0)
void resize (guint rows, guint columns)
void set_row_spacing (guint row, guint spacing)
guint get_row_spacing (guint row) const
void set_col_spacing (guint column, guint spacing)
guint get_col_spacing (guint column) const
void set_row_spacings (guint spacing)
void set_col_spacings (guint spacing)
void set_spacings (guint spacing)
guint get_default_row_spacing ()
guint get_default_col_spacing ()
void set_homogeneous (bool homogeneous=true)
bool get_homogeneous () const
TableListchildren ()
const TableListchildren () const
Glib::PropertyProxy<guint> property_n_rows ()
Glib::PropertyProxy<guint> property_n_columns ()
Glib::PropertyProxy<guint> property_column_spacing ()
Glib::PropertyProxy<guint> property_row_spacing ()

Related Functions

(Note that these are not member functions.)

Gtk::Tablewrap (GtkTable* object, bool take_copy=false)

Detailed Description

Pack widgets in regular patterns.

Gtk::Table is one of the primary ways of grouping widgets together. It consists of a set of lattice points to to which widgets can be attached. There are rows + 1 lattice points vertically and columns + 1 lattice points horizontally. Lattice points start counting from 0. Lattice points can either be specified to be homogeneous, meaning equally spaced, or not homogeneous, meaning each cell should be calculated based on the widgets contained in the row and column. The homogeneous property defaults to false.

Widgets can be attached to the table by specifying the top, bottom, left and right points corresponding to upper, lefthand lattice point and the lower, righthand lattice point which the widget should span. Widgets can either be contained in a cell or may span cells. A number of options control the resizing behavior of widgets contained in the table.

Packing options:
There are a number of packing options that can be specified when adding a widget. With Gtk::EXPAND, the lattice is allowed to grow to fill space. With Gtk::SHRINK, the lattice is allowed to shrink when resized. It is also possible to specify the behaviour of the widgets allocation within the table. The flag Gtk::FILL declares the widget should grow to fill lattice. If this is not set any extra space is used as padding. The default is (Gtk::FILL | Gtk::EXPAND).
Table sizing:
The table size is calculated based on the size of the widgets contained within and the restrictions imposed by specified options. Padding and spacing can be used in the table. Padding is added on either side of a widget, while spacing is placed between widgets.
See also:
Gtk::HBox, Gtk::VBox


Member Typedef Documentation

typedef Table_Helpers::TableList Gtk::Table::TableList
 


Constructor & Destructor Documentation

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

Gtk::Table::Table ( guint  n_rows = 1,
guint  n_columns = 1,
bool  homogeneous = false
[explicit]
 


Member Function Documentation

void Gtk::Table::attach ( Widget child,
guint  left_attach,
guint  right_attach,
guint  top_attach,
guint  bottom_attach,
AttachOptions  xoptions = FILL|EXPAND,
AttachOptions  yoptions = FILL|EXPAND,
guint  xpadding = 0,
guint  ypadding = 0
 

const TableList& Gtk::Table::children (  )  const
 

TableList& Gtk::Table::children (  ) 
 

guint Gtk::Table::get_col_spacing ( guint  column  )  const
 

guint Gtk::Table::get_default_col_spacing (  ) 
 

guint Gtk::Table::get_default_row_spacing (  ) 
 

bool Gtk::Table::get_homogeneous (  )  const
 

guint Gtk::Table::get_row_spacing ( guint  row  )  const
 

const GtkTable* Gtk::Table::gobj (  )  const [inline]
 

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Container.

GtkTable* Gtk::Table::gobj (  )  [inline]
 

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Container.

Glib::PropertyProxy<guint> Gtk::Table::property_column_spacing (  ) 
 

Glib::PropertyProxy<guint> Gtk::Table::property_n_columns (  ) 
 

Glib::PropertyProxy<guint> Gtk::Table::property_n_rows (  ) 
 

Glib::PropertyProxy<guint> Gtk::Table::property_row_spacing (  ) 
 

void Gtk::Table::resize ( guint  rows,
guint  columns
 

void Gtk::Table::set_col_spacing ( guint  column,
guint  spacing
 

void Gtk::Table::set_col_spacings ( guint  spacing  ) 
 

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

void Gtk::Table::set_row_spacing ( guint  row,
guint  spacing
 

void Gtk::Table::set_row_spacings ( guint  spacing  ) 
 

void Gtk::Table::set_spacings ( guint  spacing  ) 
 


Friends And Related Function Documentation

Gtk::Table* wrap ( GtkTable*  object,
bool  take_copy = false
[related]
 


The documentation for this class was generated from the following file:
Generated for gtkmm2.2 by Doxygen 1.3.3 © 1997-2001