GTK+ IOStream
Beta
<< GTK+ >> add C++ IOStream operators to GTK+. Now with extra abilities ... like network serialisation
|
#include <Table.H>
Public Member Functions | |
Table (void) | |
Table (short int rows, short int cols, bool homogeneous=true, GtkAttachOptions xOpt=GTK_EXPAND, GtkAttachOptions yOpt=GTK_EXPAND, uint xPad=0, uint yPad=0) | |
void | initialise (short int rows=2, short int cols=2, bool homogeneous=true, GtkAttachOptions xOpt=GTK_FILL, GtkAttachOptions yOpt=GTK_FILL, uint xPad=0, uint yPad=0) |
void | setHomogeneous (bool homogeneous) |
void | setOptions (GtkAttachOptions xOpt, GtkAttachOptions yOpt) |
void | setRegion (short int x_s, short int x_e, short int y_s, short int y_e) |
void | placeWidget (GtkWidget *obj, GtkAttachOptions xOpt, GtkAttachOptions yOpt) |
void | placeWidget (GtkWidget *obj) |
void | getSize (uint *rows, uint *cols) |
void | setPadding (uint xPad, uint yPad) |
void | resize (uint rows, uint cols) |
Table & | operator<< (int *region) |
Table & | operator<< (GtkWidget *obj) |
Table & | operator<< (LinkList< GtkWidget * > &ll) |
Table & | operator>> (GtkWidget *obj) |
![]() | |
GtkWidget * | getWidget (void) |
GtkWidget * | show (void) |
GtkWidget * | hide (void) |
void | setBorder (unsigned int size) |
unsigned int | getBorder (void) |
Container & | operator<< (Container &b) |
Container & | operator<< (Container *b) |
Container & | operator<< (LinkList< GtkWidget * > &ll) |
Container & | operator>> (GtkWidget *b) |
Container & | operator>> (Container *b) |
Container & | operator>> (Container &b) |
![]() | |
virtual | ~Widget () |
Destructor. More... | |
GtkWidget * | ref (void) |
void | unref (void) |
Private Attributes | |
short int | xStart |
The table column location to start attachment from. More... | |
short int | xEnd |
The table column location to end attachment. More... | |
short int | yStart |
The table row location to start attachment from. More... | |
short int | yEnd |
The table row location to end attachment. More... | |
guint | xPadding |
The horizontal padding between widgets. More... | |
guint | yPadding |
The vertical padding between widgets. More... | |
GtkAttachOptions | xOptions |
The horizontal fill options, one of : GTK_EXPAND, GTK_SHRINK, GTK_FILL. More... | |
GtkAttachOptions | yOptions |
The vertical fill options, one of : GTK_EXPAND, GTK_SHRINK, GTK_FILL. More... | |
Additional Inherited Members | |
![]() | |
virtual void | pack (GtkWidget *obj) |
![]() | |
GtkWidget * | widget |
The container based widget. More... | |
Table
This class allows both auto and manual widget placement into a table.
Allows you to set-up a table like so :
a 2x2 table Table table(2, 2); table.show();
auto-place 4 buttons into the table table<<buttons.grab(1)<<buttons.grab(2)<<buttons.grab(3)<<buttons.grab(4);
manually place 4 buttons into the table : table<<(int[4]){0, 1, 0, 1}<<buttons.grab(1); // top left table<<(int[4]){1, 2, 0, 1}<<buttons.grab(2); // top right table<<(int[4]){0, 1, 1, 2}<<buttons.grab(3); // bottom left table<<(int[4]){1, 2, 1, 2}<<buttons.grab(4); // bottom right
|
inline |
|
inline |
Constructor
rows | the number of rows in the table |
cols | the number of columns in the table |
homogeneous | (optional) If true, resizes the table cells to the largest widget. Defaults to true. |
xOpt | (optional) the default GtkAttachOptions for the horizontal fill type. Defaults to GTK_EXPAND. |
yOpt | (optional) the default GtkAttachOptions for the horizontal fill type. Defaults to GTK_EXPAND. |
xPad | (optional) the default horizontal padding. Defaults to 0. |
yPad | (optional) the default vertical padding. Defaults to 0. |
Definition at line 68 of file Table.H.
|
inline |
|
inline |
Initialiser
The actual table setup method.
rows | the number of rows in the table |
cols | the number of columns in the table |
homogeneous | (optional) If true, resizes the table cells to the largest widget. Defaults to true. |
xOpt | (optional) the default GtkAttachOptions for the horizontal fill type. Defaults to GTK_FILL. |
yOpt | (optional) the default GtkAttachOptions for the horizontal fill type. Defaults to GTK_FILL. |
xPad | (optional) the default horizontal padding. Defaults to 0. |
yPad | (optional) the default vertical padding. Defaults to 0. |
Definition at line 82 of file Table.H.
|
inlinevirtual |
Operator to load a widget into the table.
This call should be preceeded with either operator<<(short int *region) i.e. << {1,2,1,2} or setRegion. This preceeding call with setup where to load the widget into the table.
widget | The widget to load in the table. |
Reimplemented from Container.
Definition at line 192 of file Table.H.
|
inline |
|
inline |
Places a widget into the table.
The options, start, end, padding parameters have previously been set, see setRegion, setPadding and placeWidget Upon placement, it steps to the next column (right) to auto update the xStart, xEnd, yStart and yEnd variables. If the end of the row has been reached, the next row column 1 is set (down one row, left side). If you placeWidget to the last cell (bottom right) it will auto-wrap to the top left. This allows you to load in many widgets one after another and auto-shifts to the next ` cell.
widget | the widget to palce. |
Definition at line 134 of file Table.H.
|
inline |
|
inline |
|
inline |
|
inline |
Selects the region of the table to load the widget into.
x_s | the starting column to place the widget in. |
x_e | the end column to place the widget in. |
y_s | the starting row to place the widget in. |
y_e | the end row to place the widget in. |
Definition at line 111 of file Table.H.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |