gtk.table

Module for [Table] class

Types 3

The #GtkTable functions allow the programmer to arrange widgets in rows and columns, making it easy to align many widgets next to each other, horizontally and vertically.

Tables are created with a call to gtk.table.Table.new_, the size of which can later be changed with gtk.table.Table.resize.

Widgets can be added to a table using gtk.table.Table.attach or the more convenient (but slightly less flexible) gtk.table.Table.attachDefaults.

To alter the space next to a specific row, use gtk.table.Table.setRowSpacing, and for a column, gtk.table.Table.setColSpacing. The gaps between all rows or columns can be changed by calling gtk.table.Table.setRowSpacings or gtk.table.Table.setColSpacings respectively. Note that spacing is added between the children, while padding added by gtk.table.Table.attach is added on either side of the widget it belongs to.

gtk.table.Table.setHomogeneous, can be used to set whether all cells in the table will resize themselves to the size of the largest widget in the table.

#GtkTable has been deprecated. Use #GtkGrid instead. It provides the same

capabilities as GtkTable for arranging widgets in a rectangular grid, but does support height-for-width geometry management.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
Table self() nothrowReturns `this`, for use in `with` statements.
TableGidBuilder builder() static nothrowGet builder for [gtk.table.Table] Returns: New builder object
uint columnSpacing() @property nothrow
void columnSpacing(uint propval) @property nothrow
bool homogeneous() @property nothrow
void homogeneous(bool propval) @property nothrow
uint nColumns() @property nothrow
void nColumns(uint propval) @property nothrow
uint nRows() @property nothrow
void nRows(uint propval) @property nothrow
uint rowSpacing() @property nothrow
void rowSpacing(uint propval) @property nothrow
void attach(gtk.widget.Widget child, uint leftAttach, uint rightAttach, uint topAttach, uint bottomAttach, gtk.types.AttachOptions xoptions, gtk.types.AttachOptions yoptions, uint xpadding, uint ypadding) nothrowAdds 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, ...
void attachDefaults(gtk.widget.Widget widget, uint leftAttach, uint rightAttach, uint topAttach, uint bottomAttach) nothrowAs there are many options associated with [gtk.table.Table.attach], this convenience function provides the programmer with a means to add children to a table with identical padding and expansion op...
uint getColSpacing(uint column) nothrowGets the amount of space between column col, and column col + 1. See [gtk.table.Table.setColSpacing].
uint getDefaultColSpacing() nothrowGets the default column spacing for the table. This is the spacing that will be used for newly added columns. (See [gtk.table.Table.setColSpacings]) Returns: the default column spacing
uint getDefaultRowSpacing() nothrowGets the default row spacing for the table. This is the spacing that will be used for newly added rows. (See [gtk.table.Table.setRowSpacings]) Returns: the default row spacing
bool getHomogeneous() nothrowReturns whether the table cells are all constrained to the same width and height. (See gtk_table_set_homogeneous ()) Returns: true if the cells are all constrained to the same size
uint getRowSpacing(uint row) nothrowGets the amount of space between row row, and row row + 1. See [gtk.table.Table.setRowSpacing].
void getSize(out uint rows, out uint columns) nothrowGets the number of rows and columns in the table.
void resize(uint rows, uint columns) nothrowIf you need to change a table’s size after it has been created, this function allows you to do so.
void setColSpacing(uint column, uint spacing) nothrowAlters the amount of space between a given table column and the following column.
void setColSpacings(uint spacing) nothrowSets the space between every column in table equal to spacing.
void setHomogeneous(bool homogeneous) nothrowChanges the homogenous property of table cells, ie. whether all cells are an equal size or not.
void setRowSpacing(uint row, uint spacing) nothrowChanges the space between a given table row and the subsequent row.
void setRowSpacings(uint spacing) nothrowSets the space between every row in table equal to spacing.
Constructors
this(void * ptr, Flag!"Take" take)
this(uint rows, uint columns, bool 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.Table.resize]. ro...

Fluent builder implementation template for gtk.table.Table

Methods
T columnSpacing(uint propval) nothrow
T homogeneous(bool propval) nothrow
T nColumns(uint propval) nothrow
T nRows(uint propval) nothrow
T rowSpacing(uint propval) nothrow

Fluent builder for gtk.table.Table

Methods
Table build() nothrowCreate object from builder. Returns: New object