|
Nuklear
This is a minimal-state, immediate-mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed as a simple embeddable user interface for application and does not have any dependencies, a default render backend or OS window/input handling but instead provides a highly modular, library-based approach, with simple input state for input and draw commands describing primitive shapes as output. So instead of providing a layered library that tries to abstract over a number of platform and render backends, it focuses only on the actual UI.
|
Properties are the main value modification widgets in Nuklear.
Changing a value can be achieved by dragging, adding/removing incremental steps on button click or by directly typing a number.
Each property requires a unique name for identification that is also used for displaying a label. If you want to use the same name multiple times make sure add a '#' before your name. The '#' will not be shown but will generate a unique ID. Each property also takes in a minimum and maximum value. If you want to make use of the complete number range of a type just use the provided type limits from limits.h. For example INT_MIN and INT_MAX for nk_property_int and nk_propertyi. In additional each property takes in a increment value that will be added or subtracted if either the increment decrement button is clicked. Finally there is a value for increment per pixel dragged that is added or subtracted from the value.
| Function | Description |
|---|---|
| nk_property_int | Integer property directly modifying a passed in value |
| nk_property_float | Float property directly modifying a passed in value |
| nk_property_double | Double property directly modifying a passed in value |
| nk_propertyi | Integer property returning the modified int value |
| nk_propertyf | Float property returning the modified float value |
| nk_propertyd | Double property returning the modified double value |
Integer property directly modifying a passed in value !!!
# at the beginning. It will not be shown but guarantees correct behavior.| Parameter | Description | |||
|---|---|---|---|---|
| Must point to an previously initialized nk_context struct after calling a layouting function | |||
| String used both as a label as well as a unique identifier | |||
| Minimum value not allowed to be underflown | |||
| Integer pointer to be modified | |||
| Maximum value not allowed to be overflown | |||
| Increment added and subtracted on increment and decrement button | |||
| Value per pixel added or subtracted on dragging |