|
libui-ng
A portable GUI library for C
|
Container to store values used in container related methods. More...
#include <ui.h>
Public Member Functions | |
| void | uiFreeTableValue (uiTableValue *v) |
| Frees the uiTableValue. More... | |
| uiTableValueType | uiTableValueGetType (const uiTableValue *v) |
| Gets the uiTableValue type. More... | |
| uiTableValue * | uiNewTableValueString (const char *str) |
| Creates a new table value to store a text string. More... | |
| const char * | uiTableValueString (const uiTableValue *v) |
| Returns the string value held internally. More... | |
| uiTableValue * | uiNewTableValueImage (uiImage *img) |
| Creates a new table value to store an image. More... | |
| uiImage * | uiTableValueImage (const uiTableValue *v) |
| Returns a reference to the image contained. More... | |
| uiTableValue * | uiNewTableValueInt (int i) |
| Creates a new table value to store an integer. More... | |
| int | uiTableValueInt (const uiTableValue *v) |
| Returns the integer value held internally. More... | |
| uiTableValue * | uiNewTableValueColor (double r, double g, double b, double a) |
| Creates a new table value to store a color in. More... | |
| void | uiTableValueColor (const uiTableValue *v, double *r, double *g, double *b, double *a) |
| Returns the color value held internally. More... | |
Container to store values used in container related methods.
uiTableValue objects are immutable.
uiTable and uiTableModel methods take ownership of the uiTableValue objects when passed as parameter. Exception: uiNewTableValueImage().
uiTable and uiTableModel methods retain ownership when returning uiTableValue objects. Exception: uiTableValueImage().
| void uiFreeTableValue | ( | uiTableValue * | v | ) |
Frees the uiTableValue.
| v | Table value to free. |
| uiTableValue * uiNewTableValueColor | ( | double | r, |
| double | g, | ||
| double | b, | ||
| double | a | ||
| ) |
Creates a new table value to store a color in.
| r | Red. Double in range of [0, 1.0]. |
| g | Green. Double in range of [0, 1.0]. |
| b | Blue. Double in range of [0, 1.0]. |
| a | Alpha. Double in range of [0, 1.0]. |
| uiTableValue * uiNewTableValueImage | ( | uiImage * | img | ) |
Creates a new table value to store an image.
| img | Image. Data is NOT copied and needs to kept alive. |
| uiTableValue * uiNewTableValueInt | ( | int | i | ) |
Creates a new table value to store an integer.
This value type can be used in conjunction with properties like column editable [TRUE, FALSE] or controls like progress bars and checkboxes. For these, consult uiProgressBar and uiCheckbox for the allowed integer ranges.
| i | Integer value. |
| uiTableValue * uiNewTableValueString | ( | const char * | str | ) |
Creates a new table value to store a text string.
| str | String value. A valid, NUL terminated UTF-8 string.Data is copied internally. Ownership is not transferred. |
| void uiTableValueColor | ( | const uiTableValue * | v, |
| double * | r, | ||
| double * | g, | ||
| double * | b, | ||
| double * | a | ||
| ) |
Returns the color value held internally.
To be used only on uiTableValue objects of type uiTableValueTypeColor.
| v | Table value. | |
| [out] | r | Red. Double in range of [0, 1.0]. |
| [out] | g | Green. Double in range of [0, 1.0]. |
| [out] | b | Blue. Double in range of [0, 1.0]. |
| [out] | a | Alpha. Double in range of [0, 1.0]. |
| uiTableValueType uiTableValueGetType | ( | const uiTableValue * | v | ) |
| uiImage * uiTableValueImage | ( | const uiTableValue * | v | ) |
Returns a reference to the image contained.
To be used only on uiTableValue objects of type uiTableValueTypeImage.
| v | Table value. |
v, hence no lifetime guarantees can be made. | int uiTableValueInt | ( | const uiTableValue * | v | ) |
Returns the integer value held internally.
To be used only on uiTableValue objects of type uiTableValueTypeInt.
| v | Table value. |
| const char * uiTableValueString | ( | const uiTableValue * | v | ) |
Returns the string value held internally.
To be used only on uiTableValue objects of type uiTableValueTypeString.
| v | Table value. |
NUL terminated UTF-8 string.v, do NOT call uiFreeText().