Table Class Reference

Inheritance diagram for Table:

Container List of all members.

Detailed Description

A container that will arrange it's children in a rectangular grid.


Public Member Functions

 this (int rows, int cols, bit homogeneous)
 Creates a table with a defined number of rows and columns and defines it all the cells will be of the same size.
void resize (int rows, int columns)
 Change the size of the table's grid.
void removeAll ()
 Removes all children and resizes the table to 1,1.
void attach (Widget child, int left, int right, int top, int bottom, AttachOptions xoptions, AttachOptions yoptions, int xpadding, int ypadding)
 Adds a widget to the table.
void attach (Widget child, int left, int right, int top, int bottom)
 Adds a widget to the table.
void setRowSpacing (int row, int spacing)
 Sets the number of pixels between each widget on a spefic row of the table.
int getRowSpacing (int row)
 Gets the spacing for a row.
void setColSpacing (int column, int spacing)
 Sets the number of pixels between each widget on a spefic column of the table.
int getColSpacing (int column)
 Gets the spacing for a column.
void setRowSpacings (int spacing)
 Sets the default row spacing.
int getDefaultRowSpacing ()
 Gets the default row spacing.
void setColSpacings (int spacing)
 Sets the default column spacing.
int getDefaultColSpacing ()
 Gets the default column spacing.
void setHomogeneous (int homogeneous)
 Sets if the table cells are homogeneous in size.
bit getHomogeneous ()
 Checks if the table cells are homogeneous in size.
void attach (Widget child)
 Attach a new widget creating a new row if necessary.

Static Public Member Functions

GType getType ()
 Gets this class type.


Member Function Documentation

void Table.attach Widget  child  ) 
 

Attach a new widget creating a new row if necessary.

void Table.attach Widget  child,
int  left,
int  right,
int  top,
int  bottom
 

Adds a widget to the table.

Parameters:
child the widget to be added
left the table col where the widget's left edge will be placed
right the table col where the widget's right edgt will be placed
top the row where the widget's top edge will be palced
bottom the row where the widget's bottom edge will be placed

void Table.attach Widget  child,
int  left,
int  right,
int  top,
int  bottom,
AttachOptions  xoptions,
AttachOptions  yoptions,
int  xpadding,
int  ypadding
 

Adds a widget to the table.

Parameters:
child the widget to be added
left the table col where the widget's left edge will be placed
right the table col where the widget's right edgt will be placed
top the row where the widget's top edge will be palced
bottom the row where the widget's bottom edge will be placed
xoptions how the widget size affects and is affected by the grid size FILL, SHRINK or EXPAND
yoptions how the widget size affects and is affected by the grid size FILL, SHRINK or EXPAND
xpadding the number of pixels around the widget
ypadding the number of pixels around the widget

int Table.getColSpacing int  column  ) 
 

Gets the spacing for a column.

Parameters:
column the column to inquire
Returns:
the number of pixels of spacing

int Table.getDefaultColSpacing  ) 
 

Gets the default column spacing.

Returns:
the default column spacing

int Table.getDefaultRowSpacing  ) 
 

Gets the default row spacing.

Returns:
the default row spacing

bit Table.getHomogeneous  ) 
 

Checks if the table cells are homogeneous in size.

Returns:
true if table cells are homogeneous in size

int Table.getRowSpacing int  row  ) 
 

Gets the spacing for a row.

Parameters:
row the row to inquire
Returns:
the number of pixels of spacing

GType Table.getType  )  [static]
 

Gets this class type.

Returns:
this class type

Reimplemented from Widget.

void Table.removeAll  ) 
 

Removes all children and resizes the table to 1,1.

Reimplemented from Container.

void Table.resize int  rows,
int  columns
 

Change the size of the table's grid.

Parameters:
rows the new number of rows
columns the new number of cols

void Table.setColSpacing int  column,
int  spacing
 

Sets the number of pixels between each widget on a spefic column of the table.

Parameters:
column the column to be affected
spacing the number of pixels

void Table.setColSpacings int  spacing  ) 
 

Sets the default column spacing.

Parameters:
spacing the new default column spacing

void Table.setHomogeneous int  homogeneous  ) 
 

Sets if the table cells are homogeneous in size.

Parameters:
homogeneous true if table cells are homogeneous in size

void Table.setRowSpacing int  row,
int  spacing
 

Sets the number of pixels between each widget on a spefic row of the table.

Parameters:
row the row to be affected
spacing the number of pixels

void Table.setRowSpacings int  spacing  ) 
 

Sets the default row spacing.

Parameters:
spacing the new default row spacing

Table.this int  rows,
int  cols,
bit  homogeneous
 

Creates a table with a defined number of rows and columns and defines it all the cells will be of the same size.

NOTE: seams that cells can be added beyond the initial size without the need to resize

See also:
resize(int,int)
Parameters:
rows the number of rows
cols the number of cols
homogeneous if true all the cells will have the same size


SourceForge.net Logo DSource.org Logo digitalmars.com Logo