libui-ng
A portable GUI library for C
|
A control container to arrange containing controls in a grid. More...
#include <ui.h>
Public Member Functions | |
void | uiGridAppend (uiGrid *g, uiControl *c, int left, int top, int xspan, int yspan, int hexpand, uiAlign halign, int vexpand, uiAlign valign) |
Appends a control to the grid. More... | |
void | uiGridInsertAt (uiGrid *g, uiControl *c, uiControl *existing, uiAt at, int xspan, int yspan, int hexpand, uiAlign halign, int vexpand, uiAlign valign) |
Inserts a control positioned in relation to another control within the grid. More... | |
int | uiGridPadded (uiGrid *g) |
Returns whether or not controls within the grid are padded. More... | |
void | uiGridSetPadded (uiGrid *g, int padded) |
Sets whether or not controls within the grid are padded. More... | |
uiGrid * | uiNewGrid (void) |
Creates a new grid. More... | |
Public Member Functions inherited from uiControl | |
void | uiControlDestroy (uiControl *c) |
Dispose and free all allocated resources. More... | |
uintptr_t | uiControlHandle (uiControl *c) |
Returns the control's OS-level handle. More... | |
uiControl * | uiControlParent (uiControl *c) |
Returns the parent control. More... | |
void | uiControlSetParent (uiControl *c, uiControl *parent) |
Sets the control's parent. More... | |
int | uiControlToplevel (uiControl *c) |
Returns whether or not the control is a top level control. More... | |
int | uiControlVisible (uiControl *c) |
Returns whether or not the control is visible. More... | |
void | uiControlShow (uiControl *c) |
Shows the control. More... | |
void | uiControlHide (uiControl *c) |
Hides the control. More... | |
int | uiControlEnabled (uiControl *c) |
Returns whether or not the control is enabled. More... | |
void | uiControlEnable (uiControl *c) |
Enables the control. More... | |
void | uiControlDisable (uiControl *c) |
Disables the control. More... | |
uiControl * | uiAllocControl (size_t n, uint32_t OSsig, uint32_t typesig, const char *typenamestr) |
Allocates a uiControl. More... | |
void | uiFreeControl (uiControl *c) |
Frees the memory associated with the control reference. More... | |
void | uiControlVerifySetParent (uiControl *c, uiControl *parent) |
Makes sure the control's parent can be set to parent . More... | |
int | uiControlEnabledToUser (uiControl *c) |
Returns whether or not the control can be interacted with by the user. More... | |
Additional Inherited Members | |
Public Attributes inherited from uiControl | |
uint32_t | Signature |
uint32_t | OSSignature |
uint32_t | TypeSignature |
void(* | Destroy )(uiControl *) |
uintptr_t(* | Handle )(uiControl *) |
uiControl *(* | Parent )(uiControl *) |
void(* | SetParent )(uiControl *, uiControl *) |
int(* | Toplevel )(uiControl *) |
int(* | Visible )(uiControl *) |
void(* | Show )(uiControl *) |
void(* | Hide )(uiControl *) |
int(* | Enabled )(uiControl *) |
void(* | Enable )(uiControl *) |
void(* | Disable )(uiControl *) |
A control container to arrange containing controls in a grid.
Contained controls are arranged on an imaginary grid of rows and columns. Controls can be placed anywhere on this grid, spanning multiple rows and/or columns.
Additionally placed controls can be programmed to expand horizontally and/or vertically, sharing the remaining space among other expanded controls.
Alignment options are available via uiAlign attributes to determine the controls placement within the reserved area, should the area be bigger than the control itself.
Controls can also be placed in relation to other controls using uiAt attributes.
void uiGridAppend | ( | uiGrid * | g, |
uiControl * | c, | ||
int | left, | ||
int | top, | ||
int | xspan, | ||
int | yspan, | ||
int | hexpand, | ||
uiAlign | halign, | ||
int | vexpand, | ||
uiAlign | valign | ||
) |
Appends a control to the grid.
g | uiGrid instance. |
c | The control to insert. |
left | Placement as number of columns from the left. Integer in range of [INT_MIN, INT_MAX] . |
top | Placement as number of rows from the top. Integer in range of [INT_MIN, INT_MAX] . |
xspan | Number of columns to span. Integer in range of [0, INT_MAX] . |
yspan | Number of rows to span. Integer in range of [0, INT_MAX] . |
hexpand | TRUE to expand reserved area horizontally, FALSE otherwise. |
halign | Horizontal alignment of the control within the reserved space. |
vexpand | TRUE to expand reserved area vertically, FALSE otherwise. |
valign | Vertical alignment of the control within the reserved space. |
void uiGridInsertAt | ( | uiGrid * | g, |
uiControl * | c, | ||
uiControl * | existing, | ||
uiAt | at, | ||
int | xspan, | ||
int | yspan, | ||
int | hexpand, | ||
uiAlign | halign, | ||
int | vexpand, | ||
uiAlign | valign | ||
) |
Inserts a control positioned in relation to another control within the grid.
g | uiGrid instance. |
c | The control to insert. |
existing | The existing control to position relatively to. |
at | Placement specifier in relation to existing control. |
xspan | Number of columns to span. Integer in range of [0, INT_MAX] . |
yspan | Number of rows to span. Integer in range of [0, INT_MAX] . |
hexpand | TRUE to expand reserved area horizontally, FALSE otherwise. |
halign | Horizontal alignment of the control within the reserved space. |
vexpand | TRUE to expand reserved area vertically, FALSE otherwise. |
valign | Vertical alignment of the control within the reserved space. |
int uiGridPadded | ( | uiGrid * | g | ) |
Returns whether or not controls within the grid are padded.
Padding is defined as space between individual controls.
g | uiGrid instance. |
TRUE
if controls are padded, FALSE
otherwise. [Default: TODO
] void uiGridSetPadded | ( | uiGrid * | g, |
int | padded | ||
) |
Sets whether or not controls within the grid are padded.
Padding is defined as space between individual controls. The padding size is determined by the OS defaults.
g | uiGrid instance. |
padded | TRUE to make controls padded, FALSE otherwise. |