gtk.Table.Table Class Reference

Inheritance diagram for gtk.Table.Table:

gtk.Container.Container gtk.Widget.Widget gtk.ObjectGtk.ObjectGtk gobject.ObjectG.ObjectG List of all members.

Public Member Functions

GtkTablegetTableStruct ()
 this (GtkTable *gtkTable)
 Sets our main struct and passes it to the parent class.
void removeAll ()
 Removes all children and resizes the table to 1,1.
 this (uint rows, uint columns, int homogeneous)
 Used to create a new table widget.
void attach (Widget child)
 Attach a new widget creating a new row if necessary.
void resize (uint rows, uint columns)
 If you need to change a table's size after it has been created, this function allows you to do so.
void attach (Widget child, uint leftAttach, uint rightAttach, uint topAttach, uint bottomAttach, GtkAttachOptions xoptions, GtkAttachOptions yoptions, uint xpadding, uint ypadding)
 Adds a widget to a table.
void attachDefaults (Widget widget, uint leftAttach, uint rightAttach, uint topAttach, uint bottomAttach)
 As there are many options associated with gtk_table_attach(), this convenience function provides the programmer with a means to add children to a table with identical padding and expansion options.
void setRowSpacing (uint row, uint spacing)
 Changes the space between a given table row and the subsequent row.
void setColSpacing (uint column, uint spacing)
 Alters the amount of space between a given table column and the following column.
void setRowSpacings (uint spacing)
 Sets the space between every row in table equal to spacing.
void setColSpacings (uint spacing)
 Sets the space between every column in table equal to spacing.
void setHomogeneous (int homogeneous)
 Changes the homogenous property of table cells, ie.
uint getDefaultRowSpacing ()
 Gets the default row spacing for the table.
int getHomogeneous ()
 Returns whether the table cells are all constrained to the same width and height.
uint getRowSpacing (uint row)
 Gets the amount of space between row row, and row row + 1.
uint getColSpacing (uint column)
 Gets the amount of space between column col, and column col + 1.
uint getDefaultColSpacing ()
 Gets the default column spacing for the table.

Public Attributes

int row
int col
int maxRows
int maxCols
AttachOptions defaultXOption = AttachOptions.SHRINK
AttachOptions defaultYOption = AttachOptions.SHRINK

Protected Member Functions

void * getStruct ()
 the main Gtk struct as a void*

Protected Attributes

GtkTablegtkTable
 the main Gtk struct

Constructor & Destructor Documentation

gtk.Table.Table.this ( GtkTable gtkTable  ) 

Sets our main struct and passes it to the parent class.

gtk.Table.Table.this ( uint  rows,
uint  columns,
int  homogeneous 
)

Used to create a new table widget.

An initial size must be given by specifying how many rows and columns the table should have, although this can be changed later with gtk_table_resize(). rows and columns must both be in the range 0 .. 65535. rows: The number of rows the new table should have. columns: The number of columns the new table should have. homogeneous: If set to TRUE, all table cells are resized to the size of the cell containing the largest widget. Returns: A pointer to the the newly created table widget.


Member Function Documentation

void gtk.Table.Table.attach ( Widget  child,
uint  leftAttach,
uint  rightAttach,
uint  topAttach,
uint  bottomAttach,
GtkAttachOptions  xoptions,
GtkAttachOptions  yoptions,
uint  xpadding,
uint  ypadding 
)

Adds a widget to a table.

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). table: The GtkTable to add a new widget to. 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 row 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 value specifying the padding on the left and right of the widget being added to the table. ypadding: The amount of padding above and below the child widget.

void gtk.Table.Table.attach ( Widget  child  ) 

Attach a new widget creating a new row if necessary.

void gtk.Table.Table.attachDefaults ( Widget  widget,
uint  leftAttach,
uint  rightAttach,
uint  topAttach,
uint  bottomAttach 
)

As there are many options associated with gtk_table_attach(), this convenience function provides the programmer with a means to add children to a table with identical padding and expansion options.

The values used for the GtkAttachOptions are GTK_EXPAND | GTK_FILL, and the padding is set to 0. table: The table to add a new child widget to. widget: The child widget to add. left_attach: The column number to attach the left side of the child widget to. right_attach: The column number to attach the right side of the child widget to. top_attach: The row number to attach the top of the child widget to. bottom_attach: The row number to attach the bottom of the child widget to.

uint gtk.Table.Table.getColSpacing ( uint  column  ) 

Gets the amount of space between column col, and column col + 1.

See gtk_table_set_col_spacing(). table: a GtkTable column: a column in the table, 0 indicates the first column Returns: the column spacing

uint gtk.Table.Table.getDefaultColSpacing (  ) 

Gets the default column spacing for the table.

This is the spacing that will be used for newly added columns. (See gtk_table_set_col_spacings()) table: a GtkTable Returns: value: the default column spacing Property Details The "column-spacing" property "column-spacing" guint : Read / Write The amount of space between two consecutive columns. Default value: 0

uint gtk.Table.Table.getDefaultRowSpacing (  ) 

Gets the default row spacing for the table.

This is the spacing that will be used for newly added rows. (See gtk_table_set_row_spacings()) table: a GtkTable Returns: value: the default row spacing

int gtk.Table.Table.getHomogeneous (  ) 

Returns whether the table cells are all constrained to the same width and height.

(See gtk_table_set_homogenous()) table: a GtkTable Returns: TRUE if the cells are all constrained to the same size

uint gtk.Table.Table.getRowSpacing ( uint  row  ) 

Gets the amount of space between row row, and row row + 1.

See gtk_table_set_row_spacing(). table: a GtkTable row: a row in the table, 0 indicates the first row Returns: the row spacing

void* gtk.Table.Table.getStruct (  )  [protected]

the main Gtk struct as a void*

Reimplemented from gtk.Container.Container.

GtkTable* gtk.Table.Table.getTableStruct (  ) 

void gtk.Table.Table.removeAll (  ) 

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

Reimplemented from gtk.Container.Container.

void gtk.Table.Table.resize ( uint  rows,
uint  columns 
)

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

table: The GtkTable you wish to change the size of. rows: The new number of rows. columns: The new number of columns.

void gtk.Table.Table.setColSpacing ( uint  column,
uint  spacing 
)

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

table: a GtkTable. column: the column whose spacing should be changed. spacing: number of pixels that the spacing should take up.

void gtk.Table.Table.setColSpacings ( uint  spacing  ) 

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

table: a GtkTable. spacing: the number of pixels of space to place between every column in the table.

void gtk.Table.Table.setHomogeneous ( int  homogeneous  ) 

Changes the homogenous property of table cells, ie.

whether all cells are an equal size or not. table: The GtkTable you wish to set the homogeneous properties of. homogeneous: Set to TRUE to ensure all table cells are the same size. Set to FALSE if this is not your desired behaviour.

void gtk.Table.Table.setRowSpacing ( uint  row,
uint  spacing 
)

Changes the space between a given table row and the subsequent row.

table: a GtkTable containing the row whose properties you wish to change. row: row number whose spacing will be changed. spacing: number of pixels that the spacing should take up.

void gtk.Table.Table.setRowSpacings ( uint  spacing  ) 

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

table: a GtkTable. spacing: the number of pixels of space to place between every row in the table.


Member Data Documentation

int gtk.Table.Table.col

AttachOptions gtk.Table.Table.defaultXOption = AttachOptions.SHRINK

AttachOptions gtk.Table.Table.defaultYOption = AttachOptions.SHRINK

GtkTable* gtk.Table.Table.gtkTable [protected]

the main Gtk struct

int gtk.Table.Table.maxCols

int gtk.Table.Table.maxRows

int gtk.Table.Table.row


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