Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Inti::Gtk::Table Class Reference

A GtkTable C++ wrapper class. More...

#include <inti/gtk/table.h>

Inheritance diagram for Inti::Gtk::Table:

Inti::Gtk::Container Inti::Gtk::Widget Inti::Gtk::Object Inti::Atk::Implementor Inti::G::Object Inti::G::TypeInterface Inti::G::TypeInstance Inti::MemoryHandler Inti::G::TypeInstance Inti::ReferencedBase Inti::ReferencedBase List of all members.

Public Member Functions

Constructors
Accessors
Methods
Property Proxies
Child Property Proxies

Protected Member Functions

Constructors

Detailed Description

A GtkTable C++ wrapper class.

The Table widget allows the programmer to arrange widgets in rows and columns, making it easy to align many widgets next to each other, horizontally and vertically.

The size of a table can be changed with resize(). Widgets can be added to a table using attach(). To alter the space next to a specific row, use set_row_spacing(), and for a column, set_col_spacing(). The gaps between all rows or columns can be changed by calling set_row_spacings() or set_col_spacings() respectively. set_homogeneous() can be used to set whether all cells in the table will resize themselves to the size of the largest widget in the table.


Constructor & Destructor Documentation

Inti::Gtk::Table::Table GtkTable *  table,
bool  reference = false
[explicit, protected]
 

Construct a new Table from an existing GtkTable.

Parameters:
table A pointer to a GtkTable.
reference Set false if the initial reference count is floating, set true if it's not.

The table can be a newly created GtkTable or an existing GtkTable (see G::Object::Object).

Inti::Gtk::Table::Table unsigned int  rows,
unsigned int  columns,
bool  homogeneous = false
 

Construct new table widget.

Parameters:
rows The number of rows the new table should have.
columns The number of columns the new table should have.
homogeneous true if all cells should be resized to the size of the largest cell.

An initial size must be given by specifying how many rows and columns the table should have, although this can be changed later with resize(). The rows and columns must both be in the range 0 .. 65535.


Member Function Documentation

void Inti::Gtk::Table::attach Widget child,
unsigned int  left_attach,
unsigned int  right_attach,
unsigned int  top_attach,
unsigned int  bottom_attach,
AttachOptionsField  xoptions = EXPAND|FILL,
AttachOptionsField  yoptions = EXPAND|FILL,
unsigned int  xpadding = 0,
unsigned int  ypadding = 0
 

Adds a widget to a table.

Parameters:
child The widget to add.
left_attach The column number to attach the left side of a child widget to.
right_attach The column number to attach the right side of a child widget to.
top_attach The row number to attach the top of a child widget to.
bottom_attach The column number to attach the bottom of a child widget to.
xoptions Used to specify the properties of the child widget when the table is resized.
yoptions The same as xoptions, except this field determines behaviour of vertical resizing.
xpadding An integer specifying the padding on the left and right of the widget being added.
ypadding The amount of padding above and below the child widget.

The number of 'cells' that a widget will occupy is specified by left_attach, right_attach, top_attach and bottom_attach. These each represent the leftmost, rightmost, uppermost and lowest column and row numbers of the table. (Columns and rows are indexed from zero).

unsigned int Inti::Gtk::Table::get_column_spacing unsigned int  column  )  const
 

Gets the amount of space between column column, and column column + 1 (see set_col_spacing()).

Parameters:
column A column in the table, 0 indicates the first column.
Returns:
The column spacing.

unsigned int Inti::Gtk::Table::get_default_col_spacing  )  const
 

Gets the default column spacing for the table.

Returns:
The default column spacing.

This is the spacing that will be used for newly added columns (see set_col_spacings()).

unsigned int Inti::Gtk::Table::get_default_row_spacing  )  const
 

Gets the default row spacing for the table.

Returns:
The default row spacing.

This is the spacing that will be used for newly added rows (see set_row_spacings()).

bool Inti::Gtk::Table::get_homogeneous  )  const
 

Returns whether the table cells are all constrained to the same width and height (see set_homogeneous()).

Returns:
true if the cells are all constrained to the same size.

unsigned int Inti::Gtk::Table::get_row_spacing unsigned int  row  )  const
 

Gets the amount of space between row row, and row row + 1 (see set_row_spacing()).

Parameters:
row A row in the table, 0 indicates the first row.
Returns:
The row spacing.

void Inti::Gtk::Table::resize unsigned int  rows,
unsigned int  columns
 

If you need to change the table's size after it has been created, this method allows you to do so.

Parameters:
rows The new number of rows.
columns The new number of columns.

void Inti::Gtk::Table::set_col_spacing unsigned int  column,
unsigned int  spacing
 

Alters the amount of space between a given table column and the adjacent columns.

Parameters:
column The column whose spacing should be changed.
spacing The number of pixels that the spacing should take up.

void Inti::Gtk::Table::set_col_spacings unsigned int  spacing  ) 
 

Sets the space between every column in the table equal to spacing.

Parameters:
spacing The number of pixels of space to place between every column in the table.

void Inti::Gtk::Table::set_homogeneous bool  homogeneous  ) 
 

Sets whether all cells in the table are of equal size or not.

Parameters:
homogeneous Set true to ensure all table cells are the same size.

void Inti::Gtk::Table::set_row_spacing unsigned int  row,
unsigned int  spacing
 

Changes the space between a given table row and its surrounding rows.

Parameters:
row The row number whose spacing will be changed.
spacing The number of pixels that the spacing should take up.

void Inti::Gtk::Table::set_row_spacings unsigned int  spacing  ) 
 

Sets the space between every row in the table equal to spacing.

Parameters:
spacing The number of pixels of space to place between every row in the table.

void Inti::Gtk::Table::set_spacings unsigned int  row_spacing,
unsigned int  col_spacing
 

Sets the space between every row in the table equal to row_spacing and every column in the table equal to col_spacing.

Parameters:
row_spacing The number of pixels of space to place between every row in the table.
col_spacing The number of pixels of space to place between every column in the table.


The documentation for this class was generated from the following file: Main Page - Footer


Generated on Sun Sep 14 20:08:19 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002