Project:DUI

Class List Class Hierarchy
Summary: Ctors Methods Mixins

Module dui.Table

Class Table

dui.ObjectG.ObjectG
        dui.DUIObject.DUIObject
                dui.Widget.Widget
                        dui.Container.Container
                                dui.Table.Table

Implemented interfaces:


public class

Table



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

Constructor Summary
(GtkWidget* gtkWidget)
          
public (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.

Methods Summary
static GType getType()
          Gets this class type
public 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
public 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
public void attach(Widget child, int left, int right, int top, int bottom)
          Adds a widget to the table
public void setRowSpacing(int row, int spacing)
          Sets the number of pixels between each widget on a spefic row of the table
public int getRowSpacing(int row)
          Gets the spacing for a row.
public void setColSpacing(int column, int spacing)
          Sets the number of pixels between each widget on a spefic column of the table
public int getColSpacing(int column)
          Gets the spacing for a column.
public 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


getType

static GType getType()
Gets this class type

Returns:
this class type



ctor(Table)(GtkWidget* gtkWidget)



public ctor(Table)(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 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

resize

public void 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

removeAll

void removeAll()
Removes all children and resizes the table to 1,1

attach

public 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

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

attach

public void 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

setRowSpacing

public void 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

getRowSpacing

public int getRowSpacing(int row)
Gets the spacing for a row.

Parameters:
row - the row to inquire

Returns:
the number of pixels of spacing

setColSpacing

public void 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

getColSpacing

public int getColSpacing(int column)
Gets the spacing for a column.

Parameters:
column - the column to inquire

Returns:
the number of pixels of spacing

setRowSpacings

public void setRowSpacings(int spacing)
Sets the default row spacing

Parameters:
spacing - the new default row spacing

getDefaultRowSpacing

int getDefaultRowSpacing()
Gets the default row spacing

Returns:
the default row spacing

setColSpacings

void setColSpacings(int spacing)
Sets the default column spacing

Parameters:
spacing - the new default column spacing

getDefaultColSpacing

int getDefaultColSpacing()
Gets the default column spacing

Returns:
the default column spacing

setHomogeneous

void setHomogeneous(int homogeneous)
Sets if the table cells are homogeneous in size

Parameters:
homogeneous - true if table cells are homogeneous in size

getHomogeneous

bit getHomogeneous()
Checks if the table cells are homogeneous in size

Returns:
true if table cells are homogeneous in size

attach

void attach(Widget child)
Attach a new widget creating a new row if necessary