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.
|
main API and documentation file More...
Go to the source code of this file.
Macros | |
#define | NK_UNDEFINED (-1.0f) |
#define | NK_UTF_INVALID 0xFFFD |
internal invalid utf8 rune | |
#define | NK_UTF_SIZE 4 |
describes the number of bytes a glyph consists of | |
#define | NK_INPUT_MAX 16 |
#define | NK_MAX_NUMBER_BUFFER 64 |
#define | NK_SCROLLBAR_HIDING_TIMEOUT 4.0f |
#define | NK_API extern |
#define | NK_LIB extern |
#define | NK_INTERN static |
#define | NK_STORAGE static |
#define | NK_GLOBAL static |
#define | NK_FLAG(x) (1 << (x)) |
#define | NK_STRINGIFY(x) #x |
#define | NK_MACRO_STRINGIFY(x) NK_STRINGIFY(x) |
#define | NK_STRING_JOIN_IMMEDIATE(arg1, arg2) arg1 ## arg2 |
#define | NK_STRING_JOIN_DELAY(arg1, arg2) NK_STRING_JOIN_IMMEDIATE(arg1, arg2) |
#define | NK_STRING_JOIN(arg1, arg2) NK_STRING_JOIN_DELAY(arg1, arg2) |
#define | NK_UNIQUE_NAME(name) NK_STRING_JOIN(name,__LINE__) |
#define | NK_STATIC_ASSERT(exp) typedef char NK_UNIQUE_NAME(_dummy_array)[(exp)?1:-1] |
#define | NK_FILE_LINE __FILE__ ":" NK_MACRO_STRINGIFY(__LINE__) |
#define | NK_MIN(a, b) ((a) < (b) ? (a) : (b)) |
#define | NK_MAX(a, b) ((a) < (b) ? (b) : (a)) |
#define | NK_CLAMP(i, v, x) (NK_MAX(NK_MIN(v,x), i)) |
#define | NK_INT8 signed char |
#define | NK_UINT8 unsigned char |
#define | NK_INT16 signed short |
#define | NK_UINT16 unsigned short |
#define | NK_INT32 signed int |
#define | NK_UINT32 unsigned int |
#define | NK_SIZE_TYPE unsigned long |
#define | NK_POINTER_TYPE unsigned long |
#define | NK_BOOL int |
could be char, use int for drop-in replacement backwards compatibility | |
#define | nk_foreach(c, ctx) for((c) = nk__begin(ctx); (c) != 0; (c) = nk__next(ctx,c)) |
Iterates over each draw command inside the context draw command list. More... | |
#define | nk_tree_push(ctx, type, title, state) nk_tree_push_hashed(ctx, type, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),__LINE__) |
#define | nk_tree_push_id(ctx, type, title, state, id) nk_tree_push_hashed(ctx, type, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),id) |
#define | nk_tree_image_push(ctx, type, img, title, state) nk_tree_image_push_hashed(ctx, type, img, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),__LINE__) |
#define | nk_tree_image_push_id(ctx, type, img, title, state, id) nk_tree_image_push_hashed(ctx, type, img, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),id) |
#define | nk_tree_element_push(ctx, type, title, state, sel) nk_tree_element_push_hashed(ctx, type, title, state, sel, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),__LINE__) |
#define | nk_tree_element_push_id(ctx, type, title, state, sel, id) nk_tree_element_push_hashed(ctx, type, title, state, sel, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),id) |
#define | NK_WIDGET_DISABLED_FACTOR 0.5f |
#define | NK_STRTOD nk_strtod |
#define | NK_TEXTEDIT_UNDOSTATECOUNT 99 |
#define | NK_TEXTEDIT_UNDOCHARCOUNT 999 |
#define | NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS 16 |
#define | NK_CHART_MAX_SLOT 4 |
#define | NK_WINDOW_MAX_NAME 64 |
#define | NK_BUTTON_BEHAVIOR_STACK_SIZE 8 |
#define | NK_FONT_STACK_SIZE 8 |
#define | NK_STYLE_ITEM_STACK_SIZE 16 |
#define | NK_FLOAT_STACK_SIZE 32 |
#define | NK_VECTOR_STACK_SIZE 16 |
#define | NK_FLAGS_STACK_SIZE 32 |
#define | NK_COLOR_STACK_SIZE 32 |
#define | NK_CONFIGURATION_STACK_TYPE(prefix, name, type) |
#define | NK_CONFIG_STACK(type, size) |
#define | nk_float float |
#define | NK_VALUE_PAGE_CAPACITY (((NK_MAX(sizeof(struct nk_window),sizeof(struct nk_panel)) / sizeof(nk_uint))) / 2) |
#define | NK_PI 3.141592654f |
#define | NK_PI_HALF 1.570796326f |
#define | NK_UTF_INVALID 0xFFFD |
internal invalid utf8 rune | |
#define | NK_MAX_FLOAT_PRECISION 2 |
#define | NK_UNUSED(x) ((void)(x)) |
#define | NK_SATURATE(x) (NK_MAX(0, NK_MIN(1.0f, x))) |
#define | NK_LEN(a) (sizeof(a)/sizeof(a)[0]) |
#define | NK_ABS(a) (((a) < 0) ? -(a) : (a)) |
#define | NK_BETWEEN(x, a, b) ((a) <= (x) && (x) < (b)) |
#define | NK_INBOX(px, py, x, y, w, h) (NK_BETWEEN(px,x,x+w) && NK_BETWEEN(py,y,y+h)) |
#define | NK_INTERSECT(x0, y0, w0, h0, x1, y1, w1, h1) |
#define | NK_CONTAINS(x, y, w, h, bx, by, bw, bh) (NK_INBOX(x,y, bx, by, bw, bh) && NK_INBOX(x+w,y+h, bx, by, bw, bh)) |
#define | nk_vec2_sub(a, b) nk_vec2((a).x - (b).x, (a).y - (b).y) |
#define | nk_vec2_add(a, b) nk_vec2((a).x + (b).x, (a).y + (b).y) |
#define | nk_vec2_len_sqr(a) ((a).x*(a).x+(a).y*(a).y) |
#define | nk_vec2_muls(a, t) nk_vec2((a).x * (t), (a).y * (t)) |
#define | nk_ptr_add(t, p, i) ((t*)((void*)((nk_byte*)(p) + (i)))) |
#define | nk_ptr_add_const(t, p, i) ((const t*)((const void*)((const nk_byte*)(p) + (i)))) |
#define | nk_zero_struct(s) nk_zero(&s, sizeof(s)) |
#define | NK_UINT_TO_PTR(x) ((void*)&((char*)0)[x]) |
#define | NK_PTR_TO_UINT(x) ((nk_size)(((char*)x)-(char*)0)) |
#define | NK_ALIGN_PTR(x, mask) (NK_UINT_TO_PTR((NK_PTR_TO_UINT((nk_byte*)(x) + (mask-1)) & ~(mask-1)))) |
#define | NK_ALIGN_PTR_BACK(x, mask) (NK_UINT_TO_PTR((NK_PTR_TO_UINT((nk_byte*)(x)) & ~(mask-1)))) |
#define | NK_OFFSETOF(st, m) ((nk_ptr)&(((st*)0)->m)) |
#define | NK_ALIGNOF(t) NK_OFFSETOF(struct {char c; t _h;}, _h) |
#define | NK_CONTAINER_OF(ptr, type, member) (type*)((void*)((char*)(1 ? (ptr): &((type*)0)->member) - NK_OFFSETOF(type, member))) |
Typedefs | |
typedef NK_INT8 | nk_char |
typedef NK_UINT8 | nk_uchar |
typedef NK_UINT8 | nk_byte |
typedef NK_INT16 | nk_short |
typedef NK_UINT16 | nk_ushort |
typedef NK_INT32 | nk_int |
typedef NK_UINT32 | nk_uint |
typedef NK_SIZE_TYPE | nk_size |
typedef NK_POINTER_TYPE | nk_ptr |
typedef NK_BOOL | nk_bool |
typedef nk_uint | nk_hash |
typedef nk_uint | nk_flags |
typedef nk_uint | nk_rune |
typedef char | nk_glyph[NK_UTF_SIZE] |
typedef void *(* | nk_plugin_alloc) (nk_handle, void *old, nk_size) |
typedef void(* | nk_plugin_free) (nk_handle, void *old) |
typedef nk_bool(* | nk_plugin_filter) (const struct nk_text_edit *, nk_rune unicode) |
typedef void(* | nk_plugin_paste) (nk_handle, struct nk_text_edit *) |
typedef void(* | nk_plugin_copy) (nk_handle, const char *, int len) |
typedef float(* | nk_text_width_f) (nk_handle, float h, const char *, int len) |
typedef void(* | nk_query_font_glyph_f) (nk_handle handle, float font_height, struct nk_user_font_glyph *glyph, nk_rune codepoint, nk_rune next_codepoint) |
typedef void(* | nk_command_custom_callback) (void *canvas, short x, short y, unsigned short w, unsigned short h, nk_handle callback_data) |
Enumerations | |
enum | { nk_false , nk_true } |
enum | nk_heading { NK_UP , NK_RIGHT , NK_DOWN , NK_LEFT } |
enum | nk_button_behavior { NK_BUTTON_DEFAULT , NK_BUTTON_REPEATER } |
enum | nk_modify { NK_FIXED = nk_false , NK_MODIFIABLE = nk_true } |
enum | nk_orientation { NK_VERTICAL , NK_HORIZONTAL } |
enum | nk_collapse_states { NK_MINIMIZED = nk_false , NK_MAXIMIZED = nk_true } |
enum | nk_show_states { NK_HIDDEN = nk_false , NK_SHOWN = nk_true } |
enum | nk_chart_type { NK_CHART_LINES , NK_CHART_COLUMN , NK_CHART_MAX } |
enum | nk_chart_event { NK_CHART_HOVERING = 0x01 , NK_CHART_CLICKED = 0x02 } |
enum | nk_color_format { NK_RGB , NK_RGBA } |
enum | nk_popup_type { NK_POPUP_STATIC , NK_POPUP_DYNAMIC } |
enum | nk_layout_format { NK_DYNAMIC , NK_STATIC } |
enum | nk_tree_type { NK_TREE_NODE , NK_TREE_TAB } |
enum | nk_symbol_type { NK_SYMBOL_NONE , NK_SYMBOL_X , NK_SYMBOL_UNDERSCORE , NK_SYMBOL_CIRCLE_SOLID , NK_SYMBOL_CIRCLE_OUTLINE , NK_SYMBOL_RECT_SOLID , NK_SYMBOL_RECT_OUTLINE , NK_SYMBOL_TRIANGLE_UP , NK_SYMBOL_TRIANGLE_DOWN , NK_SYMBOL_TRIANGLE_LEFT , NK_SYMBOL_TRIANGLE_RIGHT , NK_SYMBOL_PLUS , NK_SYMBOL_MINUS , NK_SYMBOL_TRIANGLE_UP_OUTLINE , NK_SYMBOL_TRIANGLE_DOWN_OUTLINE , NK_SYMBOL_TRIANGLE_LEFT_OUTLINE , NK_SYMBOL_TRIANGLE_RIGHT_OUTLINE , NK_SYMBOL_MAX } |
enum | nk_keys { NK_KEY_NONE , NK_KEY_SHIFT , NK_KEY_CTRL , NK_KEY_DEL , NK_KEY_ENTER , NK_KEY_TAB , NK_KEY_BACKSPACE , NK_KEY_COPY , NK_KEY_CUT , NK_KEY_PASTE , NK_KEY_UP , NK_KEY_DOWN , NK_KEY_LEFT , NK_KEY_RIGHT , NK_KEY_TEXT_INSERT_MODE , NK_KEY_TEXT_REPLACE_MODE , NK_KEY_TEXT_RESET_MODE , NK_KEY_TEXT_LINE_START , NK_KEY_TEXT_LINE_END , NK_KEY_TEXT_START , NK_KEY_TEXT_END , NK_KEY_TEXT_UNDO , NK_KEY_TEXT_REDO , NK_KEY_TEXT_SELECT_ALL , NK_KEY_TEXT_WORD_LEFT , NK_KEY_TEXT_WORD_RIGHT , NK_KEY_SCROLL_START , NK_KEY_SCROLL_END , NK_KEY_SCROLL_DOWN , NK_KEY_SCROLL_UP , NK_KEY_MAX } |
enum | nk_buttons { NK_BUTTON_LEFT , NK_BUTTON_MIDDLE , NK_BUTTON_RIGHT , NK_BUTTON_DOUBLE , NK_BUTTON_MAX } |
enum | nk_anti_aliasing { NK_ANTI_ALIASING_OFF , NK_ANTI_ALIASING_ON } |
enum | nk_convert_result { NK_CONVERT_SUCCESS = 0 , NK_CONVERT_INVALID_PARAM = 1 , NK_CONVERT_COMMAND_BUFFER_FULL = NK_FLAG(1) , NK_CONVERT_VERTEX_BUFFER_FULL = NK_FLAG(2) , NK_CONVERT_ELEMENT_BUFFER_FULL = NK_FLAG(3) } |
enum | nk_panel_flags { NK_WINDOW_BORDER = NK_FLAG(0) , NK_WINDOW_MOVABLE = NK_FLAG(1) , NK_WINDOW_SCALABLE = NK_FLAG(2) , NK_WINDOW_CLOSABLE = NK_FLAG(3) , NK_WINDOW_MINIMIZABLE = NK_FLAG(4) , NK_WINDOW_NO_SCROLLBAR = NK_FLAG(5) , NK_WINDOW_TITLE = NK_FLAG(6) , NK_WINDOW_SCROLL_AUTO_HIDE = NK_FLAG(7) , NK_WINDOW_BACKGROUND = NK_FLAG(8) , NK_WINDOW_SCALE_LEFT = NK_FLAG(9) , NK_WINDOW_NO_INPUT = NK_FLAG(10) } |
enum | nk_widget_align { NK_WIDGET_ALIGN_LEFT = 0x01 , NK_WIDGET_ALIGN_CENTERED = 0x02 , NK_WIDGET_ALIGN_RIGHT = 0x04 , NK_WIDGET_ALIGN_TOP = 0x08 , NK_WIDGET_ALIGN_MIDDLE = 0x10 , NK_WIDGET_ALIGN_BOTTOM = 0x20 } |
enum | nk_widget_alignment { NK_WIDGET_LEFT = NK_WIDGET_ALIGN_MIDDLE|NK_WIDGET_ALIGN_LEFT , NK_WIDGET_CENTERED = NK_WIDGET_ALIGN_MIDDLE|NK_WIDGET_ALIGN_CENTERED , NK_WIDGET_RIGHT = NK_WIDGET_ALIGN_MIDDLE|NK_WIDGET_ALIGN_RIGHT } |
enum | nk_widget_layout_states { NK_WIDGET_INVALID , NK_WIDGET_VALID , NK_WIDGET_ROM , NK_WIDGET_DISABLED } |
enum | nk_widget_states { NK_WIDGET_STATE_MODIFIED = NK_FLAG(1) , NK_WIDGET_STATE_INACTIVE = NK_FLAG(2) , NK_WIDGET_STATE_ENTERED = NK_FLAG(3) , NK_WIDGET_STATE_HOVER = NK_FLAG(4) , NK_WIDGET_STATE_ACTIVED = NK_FLAG(5) , NK_WIDGET_STATE_LEFT = NK_FLAG(6) , NK_WIDGET_STATE_HOVERED = NK_WIDGET_STATE_HOVER|NK_WIDGET_STATE_MODIFIED , NK_WIDGET_STATE_ACTIVE = NK_WIDGET_STATE_ACTIVED|NK_WIDGET_STATE_MODIFIED } |
enum | nk_text_align { NK_TEXT_ALIGN_LEFT = 0x01 , NK_TEXT_ALIGN_CENTERED = 0x02 , NK_TEXT_ALIGN_RIGHT = 0x04 , NK_TEXT_ALIGN_TOP = 0x08 , NK_TEXT_ALIGN_MIDDLE = 0x10 , NK_TEXT_ALIGN_BOTTOM = 0x20 } |
enum | nk_text_alignment { NK_TEXT_LEFT = NK_TEXT_ALIGN_MIDDLE|NK_TEXT_ALIGN_LEFT , NK_TEXT_CENTERED = NK_TEXT_ALIGN_MIDDLE|NK_TEXT_ALIGN_CENTERED , NK_TEXT_RIGHT = NK_TEXT_ALIGN_MIDDLE|NK_TEXT_ALIGN_RIGHT } |
enum | nk_edit_flags { NK_EDIT_DEFAULT = 0 , NK_EDIT_READ_ONLY = NK_FLAG(0) , NK_EDIT_AUTO_SELECT = NK_FLAG(1) , NK_EDIT_SIG_ENTER = NK_FLAG(2) , NK_EDIT_ALLOW_TAB = NK_FLAG(3) , NK_EDIT_NO_CURSOR = NK_FLAG(4) , NK_EDIT_SELECTABLE = NK_FLAG(5) , NK_EDIT_CLIPBOARD = NK_FLAG(6) , NK_EDIT_CTRL_ENTER_NEWLINE = NK_FLAG(7) , NK_EDIT_NO_HORIZONTAL_SCROLL = NK_FLAG(8) , NK_EDIT_ALWAYS_INSERT_MODE = NK_FLAG(9) , NK_EDIT_MULTILINE = NK_FLAG(10) , NK_EDIT_GOTO_END_ON_ACTIVATE = NK_FLAG(11) } |
enum | nk_edit_types { NK_EDIT_SIMPLE = NK_EDIT_ALWAYS_INSERT_MODE , NK_EDIT_FIELD = NK_EDIT_SIMPLE|NK_EDIT_SELECTABLE|NK_EDIT_CLIPBOARD , NK_EDIT_BOX = NK_EDIT_ALWAYS_INSERT_MODE| NK_EDIT_SELECTABLE| NK_EDIT_MULTILINE|NK_EDIT_ALLOW_TAB|NK_EDIT_CLIPBOARD , NK_EDIT_EDITOR = NK_EDIT_SELECTABLE|NK_EDIT_MULTILINE|NK_EDIT_ALLOW_TAB| NK_EDIT_CLIPBOARD } |
enum | nk_edit_events { NK_EDIT_ACTIVE = NK_FLAG(0) , NK_EDIT_INACTIVE = NK_FLAG(1) , NK_EDIT_ACTIVATED = NK_FLAG(2) , NK_EDIT_DEACTIVATED = NK_FLAG(3) , NK_EDIT_COMMITED = NK_FLAG(4) } |
enum | nk_style_colors { NK_COLOR_TEXT , NK_COLOR_WINDOW , NK_COLOR_HEADER , NK_COLOR_BORDER , NK_COLOR_BUTTON , NK_COLOR_BUTTON_HOVER , NK_COLOR_BUTTON_ACTIVE , NK_COLOR_TOGGLE , NK_COLOR_TOGGLE_HOVER , NK_COLOR_TOGGLE_CURSOR , NK_COLOR_SELECT , NK_COLOR_SELECT_ACTIVE , NK_COLOR_SLIDER , NK_COLOR_SLIDER_CURSOR , NK_COLOR_SLIDER_CURSOR_HOVER , NK_COLOR_SLIDER_CURSOR_ACTIVE , NK_COLOR_PROPERTY , NK_COLOR_EDIT , NK_COLOR_EDIT_CURSOR , NK_COLOR_COMBO , NK_COLOR_CHART , NK_COLOR_CHART_COLOR , NK_COLOR_CHART_COLOR_HIGHLIGHT , NK_COLOR_SCROLLBAR , NK_COLOR_SCROLLBAR_CURSOR , NK_COLOR_SCROLLBAR_CURSOR_HOVER , NK_COLOR_SCROLLBAR_CURSOR_ACTIVE , NK_COLOR_TAB_HEADER , NK_COLOR_KNOB , NK_COLOR_KNOB_CURSOR , NK_COLOR_KNOB_CURSOR_HOVER , NK_COLOR_KNOB_CURSOR_ACTIVE , NK_COLOR_COUNT } |
enum | nk_style_cursor { NK_CURSOR_ARROW , NK_CURSOR_TEXT , NK_CURSOR_MOVE , NK_CURSOR_RESIZE_VERTICAL , NK_CURSOR_RESIZE_HORIZONTAL , NK_CURSOR_RESIZE_TOP_LEFT_DOWN_RIGHT , NK_CURSOR_RESIZE_TOP_RIGHT_DOWN_LEFT , NK_CURSOR_COUNT } |
enum | nk_allocation_type { NK_BUFFER_FIXED , NK_BUFFER_DYNAMIC } |
enum | nk_buffer_allocation_type { NK_BUFFER_FRONT , NK_BUFFER_BACK , NK_BUFFER_MAX } |
enum | nk_text_edit_type { NK_TEXT_EDIT_SINGLE_LINE , NK_TEXT_EDIT_MULTI_LINE } |
enum | nk_text_edit_mode { NK_TEXT_EDIT_MODE_VIEW , NK_TEXT_EDIT_MODE_INSERT , NK_TEXT_EDIT_MODE_REPLACE } |
enum | nk_command_type { NK_COMMAND_NOP , NK_COMMAND_SCISSOR , NK_COMMAND_LINE , NK_COMMAND_CURVE , NK_COMMAND_RECT , NK_COMMAND_RECT_FILLED , NK_COMMAND_RECT_MULTI_COLOR , NK_COMMAND_CIRCLE , NK_COMMAND_CIRCLE_FILLED , NK_COMMAND_ARC , NK_COMMAND_ARC_FILLED , NK_COMMAND_TRIANGLE , NK_COMMAND_TRIANGLE_FILLED , NK_COMMAND_POLYGON , NK_COMMAND_POLYGON_FILLED , NK_COMMAND_POLYLINE , NK_COMMAND_TEXT , NK_COMMAND_IMAGE , NK_COMMAND_CUSTOM } |
enum | nk_command_clipping { NK_CLIPPING_OFF = nk_false , NK_CLIPPING_ON = nk_true } |
enum | nk_style_item_type { NK_STYLE_ITEM_COLOR , NK_STYLE_ITEM_IMAGE , NK_STYLE_ITEM_NINE_SLICE } |
enum | nk_style_header_align { NK_HEADER_LEFT , NK_HEADER_RIGHT } |
enum | nk_panel_type { NK_PANEL_NONE = 0 , NK_PANEL_WINDOW = NK_FLAG(0) , NK_PANEL_GROUP = NK_FLAG(1) , NK_PANEL_POPUP = NK_FLAG(2) , NK_PANEL_CONTEXTUAL = NK_FLAG(4) , NK_PANEL_COMBO = NK_FLAG(5) , NK_PANEL_MENU = NK_FLAG(6) , NK_PANEL_TOOLTIP = NK_FLAG(7) } |
enum | nk_panel_set { NK_PANEL_SET_NONBLOCK = NK_PANEL_CONTEXTUAL|NK_PANEL_COMBO|NK_PANEL_MENU|NK_PANEL_TOOLTIP , NK_PANEL_SET_POPUP = NK_PANEL_SET_NONBLOCK|NK_PANEL_POPUP , NK_PANEL_SET_SUB = NK_PANEL_SET_POPUP|NK_PANEL_GROUP } |
enum | nk_panel_row_layout_type { NK_LAYOUT_DYNAMIC_FIXED = 0 , NK_LAYOUT_DYNAMIC_ROW , NK_LAYOUT_DYNAMIC_FREE , NK_LAYOUT_DYNAMIC , NK_LAYOUT_STATIC_FIXED , NK_LAYOUT_STATIC_ROW , NK_LAYOUT_STATIC_FREE , NK_LAYOUT_STATIC , NK_LAYOUT_TEMPLATE , NK_LAYOUT_COUNT } |
enum | nk_window_flags { NK_WINDOW_PRIVATE = NK_FLAG(11) , NK_WINDOW_DYNAMIC = NK_WINDOW_PRIVATE , NK_WINDOW_ROM = NK_FLAG(12) , NK_WINDOW_NOT_INTERACTIVE = NK_WINDOW_ROM|NK_WINDOW_NO_INPUT , NK_WINDOW_HIDDEN = NK_FLAG(13) , NK_WINDOW_CLOSED = NK_FLAG(14) , NK_WINDOW_MINIMIZED = NK_FLAG(15) , NK_WINDOW_REMOVE_ROM = NK_FLAG(16) } |
Functions | |
NK_STATIC_ASSERT (sizeof(nk_short)==2) | |
NK_STATIC_ASSERT (sizeof(nk_ushort)==2) | |
NK_STATIC_ASSERT (sizeof(nk_uint)==4) | |
NK_STATIC_ASSERT (sizeof(nk_int)==4) | |
NK_STATIC_ASSERT (sizeof(nk_byte)==1) | |
NK_STATIC_ASSERT (sizeof(nk_flags) >=4) | |
NK_STATIC_ASSERT (sizeof(nk_size) >=sizeof(void *)) | |
NK_STATIC_ASSERT (sizeof(nk_ptr) >=sizeof(void *)) | |
NK_STATIC_ASSERT (sizeof(nk_bool) >=2) | |
NK_API nk_bool | nk_init_fixed (struct nk_context *, void *memory, nk_size size, const struct nk_user_font *) |
NK_API nk_bool | nk_init (struct nk_context *, const struct nk_allocator *, const struct nk_user_font *) |
NK_API nk_bool | nk_init_custom (struct nk_context *, struct nk_buffer *cmds, struct nk_buffer *pool, const struct nk_user_font *) |
Initializes a nk_context struct from two different either fixed or growing buffers. More... | |
NK_API void | nk_clear (struct nk_context *) |
Resets the context state at the end of the frame. More... | |
NK_API void | nk_free (struct nk_context *) |
Frees all memory allocated by nuklear; Not needed if context was initialized with nk_init_fixed . More... | |
NK_API void | nk_input_begin (struct nk_context *) |
Begins the input mirroring process by resetting text, scroll mouse, previous mouse position and movement as well as key state transitions. More... | |
NK_API void | nk_input_motion (struct nk_context *, int x, int y) |
Mirrors current mouse position to nuklear. More... | |
NK_API void | nk_input_key (struct nk_context *, enum nk_keys, nk_bool down) |
Mirrors the state of a specific key to nuklear. More... | |
NK_API void | nk_input_button (struct nk_context *, enum nk_buttons, int x, int y, nk_bool down) |
Mirrors the state of a specific mouse button to nuklear. More... | |
NK_API void | nk_input_scroll (struct nk_context *, struct nk_vec2 val) |
Copies the last mouse scroll value to nuklear. More... | |
NK_API void | nk_input_char (struct nk_context *, char) |
Copies a single ASCII character into an internal text buffer. More... | |
NK_API void | nk_input_glyph (struct nk_context *, const nk_glyph) |
Converts an encoded unicode rune into UTF-8 and copies the result into an internal text buffer. More... | |
NK_API void | nk_input_unicode (struct nk_context *, nk_rune) |
Converts a unicode rune into UTF-8 and copies the result into an internal text buffer. More... | |
NK_API void | nk_input_end (struct nk_context *) |
End the input mirroring process by resetting mouse grabbing state to ensure the mouse cursor is not grabbed indefinitely. More... | |
NK_API const struct nk_command * | nk__begin (struct nk_context *) |
Returns a draw command list iterator to iterate all draw commands accumulated over one frame. More... | |
NK_API const struct nk_command * | nk__next (struct nk_context *, const struct nk_command *) |
Returns draw command pointer pointing to the next command inside the draw command list. More... | |
NK_API nk_bool | nk_begin (struct nk_context *ctx, const char *title, struct nk_rect bounds, nk_flags flags) |
NK_API nk_bool | nk_begin_titled (struct nk_context *ctx, const char *name, const char *title, struct nk_rect bounds, nk_flags flags) |
NK_API void | nk_end (struct nk_context *ctx) |
NK_API struct nk_window * | nk_window_find (const struct nk_context *ctx, const char *name) |
NK_API struct nk_rect | nk_window_get_bounds (const struct nk_context *ctx) |
NK_API struct nk_vec2 | nk_window_get_position (const struct nk_context *ctx) |
NK_API struct nk_vec2 | nk_window_get_size (const struct nk_context *ctx) |
NK_API float | nk_window_get_width (const struct nk_context *ctx) |
nk_window_get_width More... | |
NK_API float | nk_window_get_height (const struct nk_context *ctx) |
NK_API struct nk_panel * | nk_window_get_panel (const struct nk_context *ctx) |
NK_API struct nk_rect | nk_window_get_content_region (const struct nk_context *ctx) |
NK_API struct nk_vec2 | nk_window_get_content_region_min (const struct nk_context *ctx) |
NK_API struct nk_vec2 | nk_window_get_content_region_max (const struct nk_context *ctx) |
NK_API struct nk_vec2 | nk_window_get_content_region_size (const struct nk_context *ctx) |
NK_API struct nk_command_buffer * | nk_window_get_canvas (const struct nk_context *ctx) |
NK_API void | nk_window_get_scroll (const struct nk_context *ctx, nk_uint *offset_x, nk_uint *offset_y) |
NK_API nk_bool | nk_window_has_focus (const struct nk_context *ctx) |
NK_API nk_bool | nk_window_is_hovered (const struct nk_context *ctx) |
NK_API nk_bool | nk_window_is_collapsed (const struct nk_context *ctx, const char *name) |
NK_API nk_bool | nk_window_is_closed (const struct nk_context *ctx, const char *name) |
NK_API nk_bool | nk_window_is_hidden (const struct nk_context *ctx, const char *name) |
NK_API nk_bool | nk_window_is_active (const struct nk_context *ctx, const char *name) |
NK_API nk_bool | nk_window_is_any_hovered (const struct nk_context *ctx) |
NK_API nk_bool | nk_item_is_any_active (const struct nk_context *ctx) |
NK_API void | nk_window_set_bounds (struct nk_context *ctx, const char *name, struct nk_rect bounds) |
NK_API void | nk_window_set_position (struct nk_context *ctx, const char *name, struct nk_vec2 pos) |
NK_API void | nk_window_set_size (struct nk_context *ctx, const char *name, struct nk_vec2 size) |
NK_API void | nk_window_set_focus (struct nk_context *ctx, const char *name) |
NK_API void | nk_window_set_scroll (struct nk_context *ctx, nk_uint offset_x, nk_uint offset_y) |
NK_API void | nk_window_close (struct nk_context *ctx, const char *name) |
NK_API void | nk_window_collapse (struct nk_context *ctx, const char *name, enum nk_collapse_states state) |
NK_API void | nk_window_collapse_if (struct nk_context *ctx, const char *name, enum nk_collapse_states state, int cond) |
NK_API void | nk_window_show (struct nk_context *ctx, const char *name, enum nk_show_states state) |
NK_API void | nk_window_show_if (struct nk_context *ctx, const char *name, enum nk_show_states state, int cond) |
NK_API void | nk_rule_horizontal (struct nk_context *ctx, struct nk_color color, nk_bool rounding) |
NK_API void | nk_layout_set_min_row_height (struct nk_context *, float height) |
Sets the currently used minimum row height. More... | |
NK_API void | nk_layout_reset_min_row_height (struct nk_context *) |
Reset the currently used minimum row height back to font_height + text_padding + padding More... | |
NK_API struct nk_rect | nk_layout_widget_bounds (const struct nk_context *ctx) |
Returns the width of the next row allocate by one of the layouting functions. More... | |
NK_API float | nk_layout_ratio_from_pixel (const struct nk_context *ctx, float pixel_width) |
Utility functions to calculate window ratio from pixel size. More... | |
NK_API void | nk_layout_row_dynamic (struct nk_context *ctx, float height, int cols) |
Sets current row layout to share horizontal space between @cols number of widgets evenly. More... | |
NK_API void | nk_layout_row_static (struct nk_context *ctx, float height, int item_width, int cols) |
Sets current row layout to fill @cols number of widgets in row with same @item_width horizontal size. More... | |
NK_API void | nk_layout_row_begin (struct nk_context *ctx, enum nk_layout_format fmt, float row_height, int cols) |
Starts a new dynamic or fixed row with given height and columns. More... | |
NK_API void | nk_layout_row_push (struct nk_context *, float value) |
\breif Specifies either window ratio or width of a single column More... | |
NK_API void | nk_layout_row_end (struct nk_context *) |
Finished previously started row. More... | |
NK_API void | nk_layout_row (struct nk_context *, enum nk_layout_format, float height, int cols, const float *ratio) |
Specifies row columns in array as either window ratio or size. More... | |
NK_API void | nk_layout_row_template_begin (struct nk_context *, float row_height) |
NK_API void | nk_layout_row_template_push_dynamic (struct nk_context *) |
NK_API void | nk_layout_row_template_push_variable (struct nk_context *, float min_width) |
NK_API void | nk_layout_row_template_push_static (struct nk_context *, float width) |
NK_API void | nk_layout_row_template_end (struct nk_context *) |
NK_API void | nk_layout_space_begin (struct nk_context *, enum nk_layout_format, float height, int widget_count) |
NK_API void | nk_layout_space_push (struct nk_context *, struct nk_rect bounds) |
NK_API void | nk_layout_space_end (struct nk_context *) |
NK_API struct nk_rect | nk_layout_space_bounds (const struct nk_context *ctx) |
NK_API struct nk_vec2 | nk_layout_space_to_screen (const struct nk_context *ctx, struct nk_vec2 vec) |
NK_API struct nk_vec2 | nk_layout_space_to_local (const struct nk_context *ctx, struct nk_vec2 vec) |
NK_API struct nk_rect | nk_layout_space_rect_to_screen (const struct nk_context *ctx, struct nk_rect bounds) |
NK_API struct nk_rect | nk_layout_space_rect_to_local (const struct nk_context *ctx, struct nk_rect bounds) |
NK_API void | nk_spacer (struct nk_context *ctx) |
NK_API nk_bool | nk_group_begin (struct nk_context *, const char *title, nk_flags) |
Starts a new widget group. More... | |
NK_API nk_bool | nk_group_begin_titled (struct nk_context *, const char *name, const char *title, nk_flags) |
Starts a new widget group. More... | |
NK_API void | nk_group_end (struct nk_context *) |
NK_API nk_bool | nk_group_scrolled_offset_begin (struct nk_context *, nk_uint *x_offset, nk_uint *y_offset, const char *title, nk_flags flags) |
NK_API nk_bool | nk_group_scrolled_begin (struct nk_context *, struct nk_scroll *off, const char *title, nk_flags) |
NK_API void | nk_group_scrolled_end (struct nk_context *) |
NK_API void | nk_group_get_scroll (struct nk_context *, const char *id, nk_uint *x_offset, nk_uint *y_offset) |
NK_API void | nk_group_set_scroll (struct nk_context *, const char *id, nk_uint x_offset, nk_uint y_offset) |
NK_API nk_bool | nk_tree_push_hashed (struct nk_context *, enum nk_tree_type, const char *title, enum nk_collapse_states initial_state, const char *hash, int len, int seed) |
NK_API nk_bool | nk_tree_image_push_hashed (struct nk_context *, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states initial_state, const char *hash, int len, int seed) |
NK_API void | nk_tree_pop (struct nk_context *) |
NK_API nk_bool | nk_tree_state_push (struct nk_context *, enum nk_tree_type, const char *title, enum nk_collapse_states *state) |
NK_API nk_bool | nk_tree_state_image_push (struct nk_context *, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states *state) |
NK_API void | nk_tree_state_pop (struct nk_context *) |
NK_API nk_bool | nk_tree_element_push_hashed (struct nk_context *, enum nk_tree_type, const char *title, enum nk_collapse_states initial_state, nk_bool *selected, const char *hash, int len, int seed) |
NK_API nk_bool | nk_tree_element_image_push_hashed (struct nk_context *, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states initial_state, nk_bool *selected, const char *hash, int len, int seed) |
NK_API void | nk_tree_element_pop (struct nk_context *) |
NK_API nk_bool | nk_list_view_begin (struct nk_context *, struct nk_list_view *out, const char *id, nk_flags, int row_height, int row_count) |
NK_API void | nk_list_view_end (struct nk_list_view *) |
NK_API enum nk_widget_layout_states | nk_widget (struct nk_rect *, const struct nk_context *) |
NK_API enum nk_widget_layout_states | nk_widget_fitting (struct nk_rect *, const struct nk_context *, struct nk_vec2) |
NK_API struct nk_rect | nk_widget_bounds (const struct nk_context *) |
NK_API struct nk_vec2 | nk_widget_position (const struct nk_context *) |
NK_API struct nk_vec2 | nk_widget_size (const struct nk_context *) |
NK_API float | nk_widget_width (const struct nk_context *) |
NK_API float | nk_widget_height (const struct nk_context *) |
NK_API nk_bool | nk_widget_is_hovered (const struct nk_context *) |
NK_API nk_bool | nk_widget_is_mouse_clicked (const struct nk_context *, enum nk_buttons) |
NK_API nk_bool | nk_widget_has_mouse_click_down (const struct nk_context *, enum nk_buttons, nk_bool down) |
NK_API void | nk_spacing (struct nk_context *, int cols) |
NK_API void | nk_widget_disable_begin (struct nk_context *ctx) |
NK_API void | nk_widget_disable_end (struct nk_context *ctx) |
NK_API void | nk_text (struct nk_context *, const char *, int, nk_flags) |
NK_API void | nk_text_colored (struct nk_context *, const char *, int, nk_flags, struct nk_color) |
NK_API void | nk_text_wrap (struct nk_context *, const char *, int) |
NK_API void | nk_text_wrap_colored (struct nk_context *, const char *, int, struct nk_color) |
NK_API void | nk_label (struct nk_context *, const char *, nk_flags align) |
NK_API void | nk_label_colored (struct nk_context *, const char *, nk_flags align, struct nk_color) |
NK_API void | nk_label_wrap (struct nk_context *, const char *) |
NK_API void | nk_label_colored_wrap (struct nk_context *, const char *, struct nk_color) |
NK_API void | nk_image (struct nk_context *, struct nk_image) |
NK_API void | nk_image_color (struct nk_context *, struct nk_image, struct nk_color) |
NK_API nk_bool | nk_button_text (struct nk_context *, const char *title, int len) |
NK_API nk_bool | nk_button_label (struct nk_context *, const char *title) |
NK_API nk_bool | nk_button_color (struct nk_context *, struct nk_color) |
NK_API nk_bool | nk_button_symbol (struct nk_context *, enum nk_symbol_type) |
NK_API nk_bool | nk_button_image (struct nk_context *, struct nk_image img) |
NK_API nk_bool | nk_button_symbol_label (struct nk_context *, enum nk_symbol_type, const char *, nk_flags text_alignment) |
NK_API nk_bool | nk_button_symbol_text (struct nk_context *, enum nk_symbol_type, const char *, int, nk_flags alignment) |
NK_API nk_bool | nk_button_image_label (struct nk_context *, struct nk_image img, const char *, nk_flags text_alignment) |
NK_API nk_bool | nk_button_image_text (struct nk_context *, struct nk_image img, const char *, int, nk_flags alignment) |
NK_API nk_bool | nk_button_text_styled (struct nk_context *, const struct nk_style_button *, const char *title, int len) |
NK_API nk_bool | nk_button_label_styled (struct nk_context *, const struct nk_style_button *, const char *title) |
NK_API nk_bool | nk_button_symbol_styled (struct nk_context *, const struct nk_style_button *, enum nk_symbol_type) |
NK_API nk_bool | nk_button_image_styled (struct nk_context *, const struct nk_style_button *, struct nk_image img) |
NK_API nk_bool | nk_button_symbol_text_styled (struct nk_context *, const struct nk_style_button *, enum nk_symbol_type, const char *, int, nk_flags alignment) |
NK_API nk_bool | nk_button_symbol_label_styled (struct nk_context *ctx, const struct nk_style_button *style, enum nk_symbol_type symbol, const char *title, nk_flags align) |
NK_API nk_bool | nk_button_image_label_styled (struct nk_context *, const struct nk_style_button *, struct nk_image img, const char *, nk_flags text_alignment) |
NK_API nk_bool | nk_button_image_text_styled (struct nk_context *, const struct nk_style_button *, struct nk_image img, const char *, int, nk_flags alignment) |
NK_API void | nk_button_set_behavior (struct nk_context *, enum nk_button_behavior) |
NK_API nk_bool | nk_button_push_behavior (struct nk_context *, enum nk_button_behavior) |
NK_API nk_bool | nk_button_pop_behavior (struct nk_context *) |
NK_API nk_bool | nk_check_label (struct nk_context *, const char *, nk_bool active) |
NK_API nk_bool | nk_check_text (struct nk_context *, const char *, int, nk_bool active) |
NK_API nk_bool | nk_check_text_align (struct nk_context *, const char *, int, nk_bool active, nk_flags widget_alignment, nk_flags text_alignment) |
NK_API unsigned | nk_check_flags_label (struct nk_context *, const char *, unsigned int flags, unsigned int value) |
NK_API unsigned | nk_check_flags_text (struct nk_context *, const char *, int, unsigned int flags, unsigned int value) |
NK_API nk_bool | nk_checkbox_label (struct nk_context *, const char *, nk_bool *active) |
NK_API nk_bool | nk_checkbox_label_align (struct nk_context *ctx, const char *label, nk_bool *active, nk_flags widget_alignment, nk_flags text_alignment) |
NK_API nk_bool | nk_checkbox_text (struct nk_context *, const char *, int, nk_bool *active) |
NK_API nk_bool | nk_checkbox_text_align (struct nk_context *ctx, const char *text, int len, nk_bool *active, nk_flags widget_alignment, nk_flags text_alignment) |
NK_API nk_bool | nk_checkbox_flags_label (struct nk_context *, const char *, unsigned int *flags, unsigned int value) |
NK_API nk_bool | nk_checkbox_flags_text (struct nk_context *, const char *, int, unsigned int *flags, unsigned int value) |
NK_API nk_bool | nk_radio_label (struct nk_context *, const char *, nk_bool *active) |
NK_API nk_bool | nk_radio_label_align (struct nk_context *ctx, const char *label, nk_bool *active, nk_flags widget_alignment, nk_flags text_alignment) |
NK_API nk_bool | nk_radio_text (struct nk_context *, const char *, int, nk_bool *active) |
NK_API nk_bool | nk_radio_text_align (struct nk_context *ctx, const char *text, int len, nk_bool *active, nk_flags widget_alignment, nk_flags text_alignment) |
NK_API nk_bool | nk_option_label (struct nk_context *, const char *, nk_bool active) |
NK_API nk_bool | nk_option_label_align (struct nk_context *ctx, const char *label, nk_bool active, nk_flags widget_alignment, nk_flags text_alignment) |
NK_API nk_bool | nk_option_text (struct nk_context *, const char *, int, nk_bool active) |
NK_API nk_bool | nk_option_text_align (struct nk_context *ctx, const char *text, int len, nk_bool is_active, nk_flags widget_alignment, nk_flags text_alignment) |
NK_API nk_bool | nk_selectable_label (struct nk_context *, const char *, nk_flags align, nk_bool *value) |
NK_API nk_bool | nk_selectable_text (struct nk_context *, const char *, int, nk_flags align, nk_bool *value) |
NK_API nk_bool | nk_selectable_image_label (struct nk_context *, struct nk_image, const char *, nk_flags align, nk_bool *value) |
NK_API nk_bool | nk_selectable_image_text (struct nk_context *, struct nk_image, const char *, int, nk_flags align, nk_bool *value) |
NK_API nk_bool | nk_selectable_symbol_label (struct nk_context *, enum nk_symbol_type, const char *, nk_flags align, nk_bool *value) |
NK_API nk_bool | nk_selectable_symbol_text (struct nk_context *, enum nk_symbol_type, const char *, int, nk_flags align, nk_bool *value) |
NK_API nk_bool | nk_select_label (struct nk_context *, const char *, nk_flags align, nk_bool value) |
NK_API nk_bool | nk_select_text (struct nk_context *, const char *, int, nk_flags align, nk_bool value) |
NK_API nk_bool | nk_select_image_label (struct nk_context *, struct nk_image, const char *, nk_flags align, nk_bool value) |
NK_API nk_bool | nk_select_image_text (struct nk_context *, struct nk_image, const char *, int, nk_flags align, nk_bool value) |
NK_API nk_bool | nk_select_symbol_label (struct nk_context *, enum nk_symbol_type, const char *, nk_flags align, nk_bool value) |
NK_API nk_bool | nk_select_symbol_text (struct nk_context *, enum nk_symbol_type, const char *, int, nk_flags align, nk_bool value) |
NK_API float | nk_slide_float (struct nk_context *, float min, float val, float max, float step) |
NK_API int | nk_slide_int (struct nk_context *, int min, int val, int max, int step) |
NK_API nk_bool | nk_slider_float (struct nk_context *, float min, float *val, float max, float step) |
NK_API nk_bool | nk_slider_int (struct nk_context *, int min, int *val, int max, int step) |
NK_API nk_bool | nk_knob_float (struct nk_context *, float min, float *val, float max, float step, enum nk_heading zero_direction, float dead_zone_degrees) |
NK_API nk_bool | nk_knob_int (struct nk_context *, int min, int *val, int max, int step, enum nk_heading zero_direction, float dead_zone_degrees) |
NK_API nk_bool | nk_progress (struct nk_context *, nk_size *cur, nk_size max, nk_bool modifyable) |
NK_API nk_size | nk_prog (struct nk_context *, nk_size cur, nk_size max, nk_bool modifyable) |
NK_API struct nk_colorf | nk_color_picker (struct nk_context *, struct nk_colorf, enum nk_color_format) |
NK_API nk_bool | nk_color_pick (struct nk_context *, struct nk_colorf *, enum nk_color_format) |
NK_API void | nk_property_int (struct nk_context *, const char *name, int min, int *val, int max, int step, float inc_per_pixel) |
NK_API void | nk_property_float (struct nk_context *, const char *name, float min, float *val, float max, float step, float inc_per_pixel) |
NK_API void | nk_property_double (struct nk_context *, const char *name, double min, double *val, double max, double step, float inc_per_pixel) |
NK_API int | nk_propertyi (struct nk_context *, const char *name, int min, int val, int max, int step, float inc_per_pixel) |
NK_API float | nk_propertyf (struct nk_context *, const char *name, float min, float val, float max, float step, float inc_per_pixel) |
NK_API double | nk_propertyd (struct nk_context *, const char *name, double min, double val, double max, double step, float inc_per_pixel) |
NK_API nk_flags | nk_edit_string (struct nk_context *, nk_flags, char *buffer, int *len, int max, nk_plugin_filter) |
NK_API nk_flags | nk_edit_string_zero_terminated (struct nk_context *, nk_flags, char *buffer, int max, nk_plugin_filter) |
NK_API nk_flags | nk_edit_buffer (struct nk_context *, nk_flags, struct nk_text_edit *, nk_plugin_filter) |
NK_API void | nk_edit_focus (struct nk_context *, nk_flags flags) |
NK_API void | nk_edit_unfocus (struct nk_context *) |
NK_API nk_bool | nk_chart_begin (struct nk_context *, enum nk_chart_type, int num, float min, float max) |
NK_API nk_bool | nk_chart_begin_colored (struct nk_context *, enum nk_chart_type, struct nk_color, struct nk_color active, int num, float min, float max) |
NK_API void | nk_chart_add_slot (struct nk_context *ctx, const enum nk_chart_type, int count, float min_value, float max_value) |
NK_API void | nk_chart_add_slot_colored (struct nk_context *ctx, const enum nk_chart_type, struct nk_color, struct nk_color active, int count, float min_value, float max_value) |
NK_API nk_flags | nk_chart_push (struct nk_context *, float) |
NK_API nk_flags | nk_chart_push_slot (struct nk_context *, float, int) |
NK_API void | nk_chart_end (struct nk_context *) |
NK_API void | nk_plot (struct nk_context *, enum nk_chart_type, const float *values, int count, int offset) |
NK_API void | nk_plot_function (struct nk_context *, enum nk_chart_type, void *userdata, float(*value_getter)(void *user, int index), int count, int offset) |
NK_API nk_bool | nk_popup_begin (struct nk_context *, enum nk_popup_type, const char *, nk_flags, struct nk_rect bounds) |
NK_API void | nk_popup_close (struct nk_context *) |
NK_API void | nk_popup_end (struct nk_context *) |
NK_API void | nk_popup_get_scroll (const struct nk_context *, nk_uint *offset_x, nk_uint *offset_y) |
NK_API void | nk_popup_set_scroll (struct nk_context *, nk_uint offset_x, nk_uint offset_y) |
NK_API int | nk_combo (struct nk_context *, const char *const *items, int count, int selected, int item_height, struct nk_vec2 size) |
NK_API int | nk_combo_separator (struct nk_context *, const char *items_separated_by_separator, int separator, int selected, int count, int item_height, struct nk_vec2 size) |
NK_API int | nk_combo_string (struct nk_context *, const char *items_separated_by_zeros, int selected, int count, int item_height, struct nk_vec2 size) |
NK_API int | nk_combo_callback (struct nk_context *, void(*item_getter)(void *, int, const char **), void *userdata, int selected, int count, int item_height, struct nk_vec2 size) |
NK_API void | nk_combobox (struct nk_context *, const char *const *items, int count, int *selected, int item_height, struct nk_vec2 size) |
NK_API void | nk_combobox_string (struct nk_context *, const char *items_separated_by_zeros, int *selected, int count, int item_height, struct nk_vec2 size) |
NK_API void | nk_combobox_separator (struct nk_context *, const char *items_separated_by_separator, int separator, int *selected, int count, int item_height, struct nk_vec2 size) |
NK_API void | nk_combobox_callback (struct nk_context *, void(*item_getter)(void *, int, const char **), void *, int *selected, int count, int item_height, struct nk_vec2 size) |
NK_API nk_bool | nk_combo_begin_text (struct nk_context *, const char *selected, int, struct nk_vec2 size) |
NK_API nk_bool | nk_combo_begin_label (struct nk_context *, const char *selected, struct nk_vec2 size) |
NK_API nk_bool | nk_combo_begin_color (struct nk_context *, struct nk_color color, struct nk_vec2 size) |
NK_API nk_bool | nk_combo_begin_symbol (struct nk_context *, enum nk_symbol_type, struct nk_vec2 size) |
NK_API nk_bool | nk_combo_begin_symbol_label (struct nk_context *, const char *selected, enum nk_symbol_type, struct nk_vec2 size) |
NK_API nk_bool | nk_combo_begin_symbol_text (struct nk_context *, const char *selected, int, enum nk_symbol_type, struct nk_vec2 size) |
NK_API nk_bool | nk_combo_begin_image (struct nk_context *, struct nk_image img, struct nk_vec2 size) |
NK_API nk_bool | nk_combo_begin_image_label (struct nk_context *, const char *selected, struct nk_image, struct nk_vec2 size) |
NK_API nk_bool | nk_combo_begin_image_text (struct nk_context *, const char *selected, int, struct nk_image, struct nk_vec2 size) |
NK_API nk_bool | nk_combo_item_label (struct nk_context *, const char *, nk_flags alignment) |
NK_API nk_bool | nk_combo_item_text (struct nk_context *, const char *, int, nk_flags alignment) |
NK_API nk_bool | nk_combo_item_image_label (struct nk_context *, struct nk_image, const char *, nk_flags alignment) |
NK_API nk_bool | nk_combo_item_image_text (struct nk_context *, struct nk_image, const char *, int, nk_flags alignment) |
NK_API nk_bool | nk_combo_item_symbol_label (struct nk_context *, enum nk_symbol_type, const char *, nk_flags alignment) |
NK_API nk_bool | nk_combo_item_symbol_text (struct nk_context *, enum nk_symbol_type, const char *, int, nk_flags alignment) |
NK_API void | nk_combo_close (struct nk_context *) |
NK_API void | nk_combo_end (struct nk_context *) |
NK_API nk_bool | nk_contextual_begin (struct nk_context *, nk_flags, struct nk_vec2, struct nk_rect trigger_bounds) |
NK_API nk_bool | nk_contextual_item_text (struct nk_context *, const char *, int, nk_flags align) |
NK_API nk_bool | nk_contextual_item_label (struct nk_context *, const char *, nk_flags align) |
NK_API nk_bool | nk_contextual_item_image_label (struct nk_context *, struct nk_image, const char *, nk_flags alignment) |
NK_API nk_bool | nk_contextual_item_image_text (struct nk_context *, struct nk_image, const char *, int len, nk_flags alignment) |
NK_API nk_bool | nk_contextual_item_symbol_label (struct nk_context *, enum nk_symbol_type, const char *, nk_flags alignment) |
NK_API nk_bool | nk_contextual_item_symbol_text (struct nk_context *, enum nk_symbol_type, const char *, int, nk_flags alignment) |
NK_API void | nk_contextual_close (struct nk_context *) |
NK_API void | nk_contextual_end (struct nk_context *) |
NK_API void | nk_tooltip (struct nk_context *, const char *) |
NK_API nk_bool | nk_tooltip_begin (struct nk_context *, float width) |
NK_API void | nk_tooltip_end (struct nk_context *) |
NK_API void | nk_menubar_begin (struct nk_context *) |
NK_API void | nk_menubar_end (struct nk_context *) |
NK_API nk_bool | nk_menu_begin_text (struct nk_context *, const char *title, int title_len, nk_flags align, struct nk_vec2 size) |
NK_API nk_bool | nk_menu_begin_label (struct nk_context *, const char *, nk_flags align, struct nk_vec2 size) |
NK_API nk_bool | nk_menu_begin_image (struct nk_context *, const char *, struct nk_image, struct nk_vec2 size) |
NK_API nk_bool | nk_menu_begin_image_text (struct nk_context *, const char *, int, nk_flags align, struct nk_image, struct nk_vec2 size) |
NK_API nk_bool | nk_menu_begin_image_label (struct nk_context *, const char *, nk_flags align, struct nk_image, struct nk_vec2 size) |
NK_API nk_bool | nk_menu_begin_symbol (struct nk_context *, const char *, enum nk_symbol_type, struct nk_vec2 size) |
NK_API nk_bool | nk_menu_begin_symbol_text (struct nk_context *, const char *, int, nk_flags align, enum nk_symbol_type, struct nk_vec2 size) |
NK_API nk_bool | nk_menu_begin_symbol_label (struct nk_context *, const char *, nk_flags align, enum nk_symbol_type, struct nk_vec2 size) |
NK_API nk_bool | nk_menu_item_text (struct nk_context *, const char *, int, nk_flags align) |
NK_API nk_bool | nk_menu_item_label (struct nk_context *, const char *, nk_flags alignment) |
NK_API nk_bool | nk_menu_item_image_label (struct nk_context *, struct nk_image, const char *, nk_flags alignment) |
NK_API nk_bool | nk_menu_item_image_text (struct nk_context *, struct nk_image, const char *, int len, nk_flags alignment) |
NK_API nk_bool | nk_menu_item_symbol_text (struct nk_context *, enum nk_symbol_type, const char *, int, nk_flags alignment) |
NK_API nk_bool | nk_menu_item_symbol_label (struct nk_context *, enum nk_symbol_type, const char *, nk_flags alignment) |
NK_API void | nk_menu_close (struct nk_context *) |
NK_API void | nk_menu_end (struct nk_context *) |
NK_API void | nk_style_default (struct nk_context *) |
NK_API void | nk_style_from_table (struct nk_context *, const struct nk_color *) |
NK_API void | nk_style_load_cursor (struct nk_context *, enum nk_style_cursor, const struct nk_cursor *) |
NK_API void | nk_style_load_all_cursors (struct nk_context *, const struct nk_cursor *) |
NK_API const char * | nk_style_get_color_by_name (enum nk_style_colors) |
NK_API void | nk_style_set_font (struct nk_context *, const struct nk_user_font *) |
NK_API nk_bool | nk_style_set_cursor (struct nk_context *, enum nk_style_cursor) |
NK_API void | nk_style_show_cursor (struct nk_context *) |
NK_API void | nk_style_hide_cursor (struct nk_context *) |
NK_API nk_bool | nk_style_push_font (struct nk_context *, const struct nk_user_font *) |
NK_API nk_bool | nk_style_push_float (struct nk_context *, float *, float) |
NK_API nk_bool | nk_style_push_vec2 (struct nk_context *, struct nk_vec2 *, struct nk_vec2) |
NK_API nk_bool | nk_style_push_style_item (struct nk_context *, struct nk_style_item *, struct nk_style_item) |
NK_API nk_bool | nk_style_push_flags (struct nk_context *, nk_flags *, nk_flags) |
NK_API nk_bool | nk_style_push_color (struct nk_context *, struct nk_color *, struct nk_color) |
NK_API nk_bool | nk_style_pop_font (struct nk_context *) |
NK_API nk_bool | nk_style_pop_float (struct nk_context *) |
NK_API nk_bool | nk_style_pop_vec2 (struct nk_context *) |
NK_API nk_bool | nk_style_pop_style_item (struct nk_context *) |
NK_API nk_bool | nk_style_pop_flags (struct nk_context *) |
NK_API nk_bool | nk_style_pop_color (struct nk_context *) |
NK_API struct nk_color | nk_rgb (int r, int g, int b) |
NK_API struct nk_color | nk_rgb_iv (const int *rgb) |
NK_API struct nk_color | nk_rgb_bv (const nk_byte *rgb) |
NK_API struct nk_color | nk_rgb_f (float r, float g, float b) |
NK_API struct nk_color | nk_rgb_fv (const float *rgb) |
NK_API struct nk_color | nk_rgb_cf (struct nk_colorf c) |
NK_API struct nk_color | nk_rgb_hex (const char *rgb) |
NK_API struct nk_color | nk_rgb_factor (struct nk_color col, float factor) |
NK_API struct nk_color | nk_rgba (int r, int g, int b, int a) |
NK_API struct nk_color | nk_rgba_u32 (nk_uint) |
NK_API struct nk_color | nk_rgba_iv (const int *rgba) |
NK_API struct nk_color | nk_rgba_bv (const nk_byte *rgba) |
NK_API struct nk_color | nk_rgba_f (float r, float g, float b, float a) |
NK_API struct nk_color | nk_rgba_fv (const float *rgba) |
NK_API struct nk_color | nk_rgba_cf (struct nk_colorf c) |
NK_API struct nk_color | nk_rgba_hex (const char *rgb) |
NK_API struct nk_colorf | nk_hsva_colorf (float h, float s, float v, float a) |
NK_API struct nk_colorf | nk_hsva_colorfv (const float *c) |
NK_API void | nk_colorf_hsva_f (float *out_h, float *out_s, float *out_v, float *out_a, struct nk_colorf in) |
NK_API void | nk_colorf_hsva_fv (float *hsva, struct nk_colorf in) |
NK_API struct nk_color | nk_hsv (int h, int s, int v) |
NK_API struct nk_color | nk_hsv_iv (const int *hsv) |
NK_API struct nk_color | nk_hsv_bv (const nk_byte *hsv) |
NK_API struct nk_color | nk_hsv_f (float h, float s, float v) |
NK_API struct nk_color | nk_hsv_fv (const float *hsv) |
NK_API struct nk_color | nk_hsva (int h, int s, int v, int a) |
NK_API struct nk_color | nk_hsva_iv (const int *hsva) |
NK_API struct nk_color | nk_hsva_bv (const nk_byte *hsva) |
NK_API struct nk_color | nk_hsva_f (float h, float s, float v, float a) |
NK_API struct nk_color | nk_hsva_fv (const float *hsva) |
NK_API void | nk_color_f (float *r, float *g, float *b, float *a, struct nk_color) |
NK_API void | nk_color_fv (float *rgba_out, struct nk_color) |
NK_API struct nk_colorf | nk_color_cf (struct nk_color) |
NK_API void | nk_color_d (double *r, double *g, double *b, double *a, struct nk_color) |
NK_API void | nk_color_dv (double *rgba_out, struct nk_color) |
NK_API nk_uint | nk_color_u32 (struct nk_color) |
NK_API void | nk_color_hex_rgba (char *output, struct nk_color) |
NK_API void | nk_color_hex_rgb (char *output, struct nk_color) |
NK_API void | nk_color_hsv_i (int *out_h, int *out_s, int *out_v, struct nk_color) |
NK_API void | nk_color_hsv_b (nk_byte *out_h, nk_byte *out_s, nk_byte *out_v, struct nk_color) |
NK_API void | nk_color_hsv_iv (int *hsv_out, struct nk_color) |
NK_API void | nk_color_hsv_bv (nk_byte *hsv_out, struct nk_color) |
NK_API void | nk_color_hsv_f (float *out_h, float *out_s, float *out_v, struct nk_color) |
NK_API void | nk_color_hsv_fv (float *hsv_out, struct nk_color) |
NK_API void | nk_color_hsva_i (int *h, int *s, int *v, int *a, struct nk_color) |
NK_API void | nk_color_hsva_b (nk_byte *h, nk_byte *s, nk_byte *v, nk_byte *a, struct nk_color) |
NK_API void | nk_color_hsva_iv (int *hsva_out, struct nk_color) |
NK_API void | nk_color_hsva_bv (nk_byte *hsva_out, struct nk_color) |
NK_API void | nk_color_hsva_f (float *out_h, float *out_s, float *out_v, float *out_a, struct nk_color) |
NK_API void | nk_color_hsva_fv (float *hsva_out, struct nk_color) |
NK_API nk_handle | nk_handle_ptr (void *) |
NK_API nk_handle | nk_handle_id (int) |
NK_API struct nk_image | nk_image_handle (nk_handle) |
NK_API struct nk_image | nk_image_ptr (void *) |
NK_API struct nk_image | nk_image_id (int) |
NK_API nk_bool | nk_image_is_subimage (const struct nk_image *img) |
NK_API struct nk_image | nk_subimage_ptr (void *, nk_ushort w, nk_ushort h, struct nk_rect sub_region) |
NK_API struct nk_image | nk_subimage_id (int, nk_ushort w, nk_ushort h, struct nk_rect sub_region) |
NK_API struct nk_image | nk_subimage_handle (nk_handle, nk_ushort w, nk_ushort h, struct nk_rect sub_region) |
NK_API struct nk_nine_slice | nk_nine_slice_handle (nk_handle, nk_ushort l, nk_ushort t, nk_ushort r, nk_ushort b) |
NK_API struct nk_nine_slice | nk_nine_slice_ptr (void *, nk_ushort l, nk_ushort t, nk_ushort r, nk_ushort b) |
NK_API struct nk_nine_slice | nk_nine_slice_id (int, nk_ushort l, nk_ushort t, nk_ushort r, nk_ushort b) |
NK_API int | nk_nine_slice_is_sub9slice (const struct nk_nine_slice *img) |
NK_API struct nk_nine_slice | nk_sub9slice_ptr (void *, nk_ushort w, nk_ushort h, struct nk_rect sub_region, nk_ushort l, nk_ushort t, nk_ushort r, nk_ushort b) |
NK_API struct nk_nine_slice | nk_sub9slice_id (int, nk_ushort w, nk_ushort h, struct nk_rect sub_region, nk_ushort l, nk_ushort t, nk_ushort r, nk_ushort b) |
NK_API struct nk_nine_slice | nk_sub9slice_handle (nk_handle, nk_ushort w, nk_ushort h, struct nk_rect sub_region, nk_ushort l, nk_ushort t, nk_ushort r, nk_ushort b) |
NK_API nk_hash | nk_murmur_hash (const void *key, int len, nk_hash seed) |
NK_API void | nk_triangle_from_direction (struct nk_vec2 *result, struct nk_rect r, float pad_x, float pad_y, enum nk_heading) |
NK_API struct nk_vec2 | nk_vec2 (float x, float y) |
NK_API struct nk_vec2 | nk_vec2i (int x, int y) |
NK_API struct nk_vec2 | nk_vec2v (const float *xy) |
NK_API struct nk_vec2 | nk_vec2iv (const int *xy) |
NK_API struct nk_rect | nk_get_null_rect (void) |
NK_API struct nk_rect | nk_rect (float x, float y, float w, float h) |
NK_API struct nk_rect | nk_recti (int x, int y, int w, int h) |
NK_API struct nk_rect | nk_recta (struct nk_vec2 pos, struct nk_vec2 size) |
NK_API struct nk_rect | nk_rectv (const float *xywh) |
NK_API struct nk_rect | nk_rectiv (const int *xywh) |
NK_API struct nk_vec2 | nk_rect_pos (struct nk_rect) |
NK_API struct nk_vec2 | nk_rect_size (struct nk_rect) |
NK_API int | nk_strlen (const char *str) |
NK_API int | nk_stricmp (const char *s1, const char *s2) |
NK_API int | nk_stricmpn (const char *s1, const char *s2, int n) |
NK_API int | nk_strtoi (const char *str, char **endptr) |
NK_API float | nk_strtof (const char *str, char **endptr) |
NK_API double | nk_strtod (const char *str, char **endptr) |
NK_API int | nk_strfilter (const char *text, const char *regexp) |
NK_API int | nk_strmatch_fuzzy_string (char const *str, char const *pattern, int *out_score) |
NK_API int | nk_strmatch_fuzzy_text (const char *txt, int txt_len, const char *pattern, int *out_score) |
NK_API int | nk_utf_decode (const char *, nk_rune *, int) |
NK_API int | nk_utf_encode (nk_rune, char *, int) |
NK_API int | nk_utf_len (const char *, int byte_len) |
NK_API const char * | nk_utf_at (const char *buffer, int length, int index, nk_rune *unicode, int *len) |
NK_API void | nk_buffer_init (struct nk_buffer *, const struct nk_allocator *, nk_size size) |
NK_API void | nk_buffer_init_fixed (struct nk_buffer *, void *memory, nk_size size) |
NK_API void | nk_buffer_info (struct nk_memory_status *, const struct nk_buffer *) |
NK_API void | nk_buffer_push (struct nk_buffer *, enum nk_buffer_allocation_type type, const void *memory, nk_size size, nk_size align) |
NK_API void | nk_buffer_mark (struct nk_buffer *, enum nk_buffer_allocation_type type) |
NK_API void | nk_buffer_reset (struct nk_buffer *, enum nk_buffer_allocation_type type) |
NK_API void | nk_buffer_clear (struct nk_buffer *) |
NK_API void | nk_buffer_free (struct nk_buffer *) |
NK_API void * | nk_buffer_memory (struct nk_buffer *) |
NK_API const void * | nk_buffer_memory_const (const struct nk_buffer *) |
NK_API nk_size | nk_buffer_total (const struct nk_buffer *) |
NK_API void | nk_str_init (struct nk_str *, const struct nk_allocator *, nk_size size) |
NK_API void | nk_str_init_fixed (struct nk_str *, void *memory, nk_size size) |
NK_API void | nk_str_clear (struct nk_str *) |
NK_API void | nk_str_free (struct nk_str *) |
NK_API int | nk_str_append_text_char (struct nk_str *, const char *, int) |
NK_API int | nk_str_append_str_char (struct nk_str *, const char *) |
NK_API int | nk_str_append_text_utf8 (struct nk_str *, const char *, int) |
NK_API int | nk_str_append_str_utf8 (struct nk_str *, const char *) |
NK_API int | nk_str_append_text_runes (struct nk_str *, const nk_rune *, int) |
NK_API int | nk_str_append_str_runes (struct nk_str *, const nk_rune *) |
NK_API int | nk_str_insert_at_char (struct nk_str *, int pos, const char *, int) |
NK_API int | nk_str_insert_at_rune (struct nk_str *, int pos, const char *, int) |
NK_API int | nk_str_insert_text_char (struct nk_str *, int pos, const char *, int) |
NK_API int | nk_str_insert_str_char (struct nk_str *, int pos, const char *) |
NK_API int | nk_str_insert_text_utf8 (struct nk_str *, int pos, const char *, int) |
NK_API int | nk_str_insert_str_utf8 (struct nk_str *, int pos, const char *) |
NK_API int | nk_str_insert_text_runes (struct nk_str *, int pos, const nk_rune *, int) |
NK_API int | nk_str_insert_str_runes (struct nk_str *, int pos, const nk_rune *) |
NK_API void | nk_str_remove_chars (struct nk_str *, int len) |
NK_API void | nk_str_remove_runes (struct nk_str *str, int len) |
NK_API void | nk_str_delete_chars (struct nk_str *, int pos, int len) |
NK_API void | nk_str_delete_runes (struct nk_str *, int pos, int len) |
NK_API char * | nk_str_at_char (struct nk_str *, int pos) |
NK_API char * | nk_str_at_rune (struct nk_str *, int pos, nk_rune *unicode, int *len) |
NK_API nk_rune | nk_str_rune_at (const struct nk_str *, int pos) |
NK_API const char * | nk_str_at_char_const (const struct nk_str *, int pos) |
NK_API const char * | nk_str_at_const (const struct nk_str *, int pos, nk_rune *unicode, int *len) |
NK_API char * | nk_str_get (struct nk_str *) |
NK_API const char * | nk_str_get_const (const struct nk_str *) |
NK_API int | nk_str_len (const struct nk_str *) |
NK_API int | nk_str_len_char (const struct nk_str *) |
NK_API nk_bool | nk_filter_default (const struct nk_text_edit *, nk_rune unicode) |
filter function | |
NK_API nk_bool | nk_filter_ascii (const struct nk_text_edit *, nk_rune unicode) |
NK_API nk_bool | nk_filter_float (const struct nk_text_edit *, nk_rune unicode) |
NK_API nk_bool | nk_filter_decimal (const struct nk_text_edit *, nk_rune unicode) |
NK_API nk_bool | nk_filter_hex (const struct nk_text_edit *, nk_rune unicode) |
NK_API nk_bool | nk_filter_oct (const struct nk_text_edit *, nk_rune unicode) |
NK_API nk_bool | nk_filter_binary (const struct nk_text_edit *, nk_rune unicode) |
NK_API void | nk_textedit_init (struct nk_text_edit *, const struct nk_allocator *, nk_size size) |
text editor | |
NK_API void | nk_textedit_init_fixed (struct nk_text_edit *, void *memory, nk_size size) |
NK_API void | nk_textedit_free (struct nk_text_edit *) |
NK_API void | nk_textedit_text (struct nk_text_edit *, const char *, int total_len) |
NK_API void | nk_textedit_delete (struct nk_text_edit *, int where, int len) |
NK_API void | nk_textedit_delete_selection (struct nk_text_edit *) |
NK_API void | nk_textedit_select_all (struct nk_text_edit *) |
NK_API nk_bool | nk_textedit_cut (struct nk_text_edit *) |
NK_API nk_bool | nk_textedit_paste (struct nk_text_edit *, char const *, int len) |
NK_API void | nk_textedit_undo (struct nk_text_edit *) |
NK_API void | nk_textedit_redo (struct nk_text_edit *) |
NK_API void | nk_stroke_line (struct nk_command_buffer *b, float x0, float y0, float x1, float y1, float line_thickness, struct nk_color) |
shape outlines | |
NK_API void | nk_stroke_curve (struct nk_command_buffer *, float, float, float, float, float, float, float, float, float line_thickness, struct nk_color) |
NK_API void | nk_stroke_rect (struct nk_command_buffer *, struct nk_rect, float rounding, float line_thickness, struct nk_color) |
NK_API void | nk_stroke_circle (struct nk_command_buffer *, struct nk_rect, float line_thickness, struct nk_color) |
NK_API void | nk_stroke_arc (struct nk_command_buffer *, float cx, float cy, float radius, float a_min, float a_max, float line_thickness, struct nk_color) |
NK_API void | nk_stroke_triangle (struct nk_command_buffer *, float, float, float, float, float, float, float line_thichness, struct nk_color) |
NK_API void | nk_stroke_polyline (struct nk_command_buffer *, const float *points, int point_count, float line_thickness, struct nk_color col) |
NK_API void | nk_stroke_polygon (struct nk_command_buffer *, const float *points, int point_count, float line_thickness, struct nk_color) |
NK_API void | nk_fill_rect (struct nk_command_buffer *, struct nk_rect, float rounding, struct nk_color) |
filled shades | |
NK_API void | nk_fill_rect_multi_color (struct nk_command_buffer *, struct nk_rect, struct nk_color left, struct nk_color top, struct nk_color right, struct nk_color bottom) |
NK_API void | nk_fill_circle (struct nk_command_buffer *, struct nk_rect, struct nk_color) |
NK_API void | nk_fill_arc (struct nk_command_buffer *, float cx, float cy, float radius, float a_min, float a_max, struct nk_color) |
NK_API void | nk_fill_triangle (struct nk_command_buffer *, float x0, float y0, float x1, float y1, float x2, float y2, struct nk_color) |
NK_API void | nk_fill_polygon (struct nk_command_buffer *, const float *points, int point_count, struct nk_color) |
NK_API void | nk_draw_image (struct nk_command_buffer *, struct nk_rect, const struct nk_image *, struct nk_color) |
misc | |
NK_API void | nk_draw_nine_slice (struct nk_command_buffer *, struct nk_rect, const struct nk_nine_slice *, struct nk_color) |
NK_API void | nk_draw_text (struct nk_command_buffer *, struct nk_rect, const char *text, int len, const struct nk_user_font *, struct nk_color, struct nk_color) |
NK_API void | nk_push_scissor (struct nk_command_buffer *, struct nk_rect) |
NK_API void | nk_push_custom (struct nk_command_buffer *, struct nk_rect, nk_command_custom_callback, nk_handle usr) |
NK_API nk_bool | nk_input_has_mouse_click (const struct nk_input *, enum nk_buttons) |
NK_API nk_bool | nk_input_has_mouse_click_in_rect (const struct nk_input *, enum nk_buttons, struct nk_rect) |
NK_API nk_bool | nk_input_has_mouse_click_in_button_rect (const struct nk_input *, enum nk_buttons, struct nk_rect) |
NK_API nk_bool | nk_input_has_mouse_click_down_in_rect (const struct nk_input *, enum nk_buttons, struct nk_rect, nk_bool down) |
NK_API nk_bool | nk_input_is_mouse_click_in_rect (const struct nk_input *, enum nk_buttons, struct nk_rect) |
NK_API nk_bool | nk_input_is_mouse_click_down_in_rect (const struct nk_input *i, enum nk_buttons id, struct nk_rect b, nk_bool down) |
NK_API nk_bool | nk_input_any_mouse_click_in_rect (const struct nk_input *, struct nk_rect) |
NK_API nk_bool | nk_input_is_mouse_prev_hovering_rect (const struct nk_input *, struct nk_rect) |
NK_API nk_bool | nk_input_is_mouse_hovering_rect (const struct nk_input *, struct nk_rect) |
NK_API nk_bool | nk_input_mouse_clicked (const struct nk_input *, enum nk_buttons, struct nk_rect) |
NK_API nk_bool | nk_input_is_mouse_down (const struct nk_input *, enum nk_buttons) |
NK_API nk_bool | nk_input_is_mouse_pressed (const struct nk_input *, enum nk_buttons) |
NK_API nk_bool | nk_input_is_mouse_released (const struct nk_input *, enum nk_buttons) |
NK_API nk_bool | nk_input_is_key_pressed (const struct nk_input *, enum nk_keys) |
NK_API nk_bool | nk_input_is_key_released (const struct nk_input *, enum nk_keys) |
NK_API nk_bool | nk_input_is_key_down (const struct nk_input *, enum nk_keys) |
NK_API struct nk_style_item | nk_style_item_color (struct nk_color) |
NK_API struct nk_style_item | nk_style_item_image (struct nk_image img) |
NK_API struct nk_style_item | nk_style_item_nine_slice (struct nk_nine_slice slice) |
NK_API struct nk_style_item | nk_style_item_hide (void) |
NK_CONFIGURATION_STACK_TYPE (struct nk, style_item, style_item) | |
NK_CONFIGURATION_STACK_TYPE (nk, float, float) | |
NK_CONFIGURATION_STACK_TYPE (struct nk, vec2, vec2) | |
NK_CONFIGURATION_STACK_TYPE (nk, flags, flags) | |
NK_CONFIGURATION_STACK_TYPE (struct nk, color, color) | |
NK_CONFIGURATION_STACK_TYPE (const struct nk, user_font, user_font *) | |
NK_CONFIGURATION_STACK_TYPE (enum nk, button_behavior, button_behavior) | |
NK_CONFIG_STACK (style_item, NK_STYLE_ITEM_STACK_SIZE) | |
NK_CONFIG_STACK (float, NK_FLOAT_STACK_SIZE) | |
NK_CONFIG_STACK (vec2, NK_VECTOR_STACK_SIZE) | |
NK_CONFIG_STACK (flags, NK_FLAGS_STACK_SIZE) | |
NK_CONFIG_STACK (color, NK_COLOR_STACK_SIZE) | |
NK_CONFIG_STACK (user_font, NK_FONT_STACK_SIZE) | |
NK_CONFIG_STACK (button_behavior, NK_BUTTON_BEHAVIOR_STACK_SIZE) | |
main API and documentation file
Definition in file nuklear.h.
#define NK_CONFIG_STACK | ( | type, | |
size | |||
) |
#define NK_CONFIGURATION_STACK_TYPE | ( | prefix, | |
name, | |||
type | |||
) |
Iterates over each draw command inside the context draw command list.
[in] | ctx | | Must point to an previously initialized nk_context struct at the end of a frame |
[in] | cmd | | Command pointer initialized to NULL |
#define NK_INTERSECT | ( | x0, | |
y0, | |||
w0, | |||
h0, | |||
x1, | |||
y1, | |||
w1, | |||
h1 | |||
) |
#define nk_tree_image_push | ( | ctx, | |
type, | |||
img, | |||
title, | |||
state | |||
) | nk_tree_image_push_hashed(ctx, type, img, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),__LINE__) |
Start a collapsible UI section with image and label header !!!
__FILE__
and __LINE__
to generate a unique ID. If you want to call this function in a loop please use nk_tree_image_push_id
or nk_tree_image_push_hashed
instead.Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node | |||
| Image to display inside the header on the left of the label | |||
| Label printed in the tree header | |||
| Initial tree state value out of nk_collapse_states |
true(1)
if visible and fillable with widgets or false(0)
otherwise #define nk_tree_image_push_id | ( | ctx, | |
type, | |||
img, | |||
title, | |||
state, | |||
id | |||
) | nk_tree_image_push_hashed(ctx, type, img, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),id) |
Start a collapsible UI section with image and label header and internal state management callable in a look
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node | |||
| Image to display inside the header on the left of the label | |||
| Label printed in the tree header | |||
| Initial tree state value out of nk_collapse_states | |||
| Loop counter index if this function is called in a loop |
true(1)
if visible and fillable with widgets or false(0)
otherwise #define nk_tree_push | ( | ctx, | |
type, | |||
title, | |||
state | |||
) | nk_tree_push_hashed(ctx, type, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),__LINE__) |
Starts a collapsible UI section with internal state management !!!
__FILE__
and __LINE__
to generate a unique ID. If you want to call this function in a loop please use nk_tree_push_id
or nk_tree_push_hashed
instead.Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node | |||
| Label printed in the tree header | |||
| Initial tree state value out of nk_collapse_states |
true(1)
if visible and fillable with widgets or false(0)
otherwise #define nk_tree_push_id | ( | ctx, | |
type, | |||
title, | |||
state, | |||
id | |||
) | nk_tree_push_hashed(ctx, type, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),id) |
Starts a collapsible UI section with internal state management callable in a look
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node | |||
| Label printed in the tree header | |||
| Initial tree state value out of nk_collapse_states | |||
| Loop counter index if this function is called in a loop |
true(1)
if visible and fillable with widgets or false(0)
otherwise enum nk_edit_events |
enum nk_widget_states |
enum nk_window_flags |
NK_API const struct nk_command* nk__begin | ( | struct nk_context * | ctx | ) |
Returns a draw command list iterator to iterate all draw commands accumulated over one frame.
[in] | ctx | | must point to an previously initialized nk_context struct at the end of a frame |
Definition at line 310 of file nuklear_context.c.
References nk_context::build, and nk_buffer::memory.
NK_API const struct nk_command* nk__next | ( | struct nk_context * | ctx, |
const struct nk_command * | cmd | ||
) |
Returns draw command pointer pointing to the next command inside the draw command list.
[in] | ctx | | Must point to an previously initialized nk_context struct at the end of a frame |
[in] | cmd | | Must point to an previously a draw command either returned by nk__begin or nk__next |
Definition at line 332 of file nuklear_context.c.
References nk_buffer::allocated, and nk_buffer::memory.
NK_API nk_bool nk_begin | ( | struct nk_context * | ctx, |
const char * | title, | ||
struct nk_rect | bounds, | ||
nk_flags | flags | ||
) |
Starts a new window; needs to be called every frame for every window (unless hidden) or otherwise the window gets removed
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Window title and identifier. Needs to be persistent over frames to identify the window | |||
| Initial position and window size. However if you do not define NK_WINDOW_SCALABLE or NK_WINDOW_MOVABLE you can set window position and size every frame | |||
| Window flags defined in the nk_panel_flags section with a number of different window behaviors |
true(1)
if the window can be filled up with widgets from this point until nk_end
or false(0)
otherwise for example if minimized Definition at line 136 of file nuklear_window.c.
References nk_begin_titled().
NK_API nk_bool nk_begin_titled | ( | struct nk_context * | ctx, |
const char * | name, | ||
const char * | title, | ||
struct nk_rect | bounds, | ||
nk_flags | flags | ||
) |
Extended window start with separated title and identifier to allow multiple windows with same title but not name
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Window identifier. Needs to be persistent over frames to identify the window | |||
| Window title displayed inside header if flag NK_WINDOW_TITLE or either NK_WINDOW_CLOSABLE or NK_WINDOW_MINIMIZED was set | |||
| Initial position and window size. However if you do not define NK_WINDOW_SCALABLE or NK_WINDOW_MOVABLE you can set window position and size every frame | |||
| Window flags defined in the nk_panel_flags section with a number of different window behaviors |
true(1)
if the window can be filled up with widgets from this point until nk_end
or false(0)
otherwise for example if minimized Definition at line 142 of file nuklear_window.c.
References nk_user_font::width.
Referenced by nk_begin().
NK_API void nk_clear | ( | struct nk_context * | ctx | ) |
Resets the context state at the end of the frame.
This includes mostly garbage collector tasks like removing windows or table not called and therefore used anymore.
[in] | ctx | Must point to a previously initialized nk_context struct |
Definition at line 110 of file nuklear_context.c.
NK_API void nk_end | ( | struct nk_context * | ctx | ) |
Needs to be called at the end of the window building process to process scaling, scrollbars and general cleanup. All widget calls after this functions will result in asserts or no state changes
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
Definition at line 297 of file nuklear_window.c.
NK_API void nk_free | ( | struct nk_context * | ctx | ) |
Frees all memory allocated by nuklear; Not needed if context was initialized with nk_init_fixed
.
[in] | ctx | Must point to a previously initialized nk_context struct |
Definition at line 88 of file nuklear_context.c.
NK_API nk_bool nk_group_begin | ( | struct nk_context * | ctx, |
const char * | title, | ||
nk_flags | flags | ||
) |
Starts a new widget group.
Requires a previous layouting function to specify a pos/size.
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Must be an unique identifier for this group that is also used for the group header | |||
| Window flags defined in the nk_panel_flags section with a number of different group behaviors |
true(1)
if visible and fillable with widgets or false(0)
otherwise Definition at line 160 of file nuklear_group.c.
References nk_group_begin_titled().
NK_API nk_bool nk_group_begin_titled | ( | struct nk_context * | ctx, |
const char * | name, | ||
const char * | title, | ||
nk_flags | flags | ||
) |
Starts a new widget group.
Requires a previous layouting function to specify a pos/size.
[in] | ctx | | Must point to an previously initialized nk_context struct |
[in] | id | | Must be an unique identifier for this group |
[in] | title | | Group header title |
[in] | flags | | Window flags defined in the nk_panel_flags section with a number of different group behaviors |
true(1)
if visible and fillable with widgets or false(0)
otherwise Definition at line 127 of file nuklear_group.c.
Referenced by nk_group_begin().
NK_API void nk_group_end | ( | struct nk_context * | ctx | ) |
Ends a widget group
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
Definition at line 165 of file nuklear_group.c.
References nk_group_scrolled_end().
NK_API void nk_group_get_scroll | ( | struct nk_context * | ctx, |
const char * | id, | ||
nk_uint * | x_offset, | ||
nk_uint * | y_offset | ||
) |
Gets the scroll position of the given group.
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| The id of the group to get the scroll position of | |||
| A pointer to the x offset output (or NULL to ignore) | |||
| A pointer to the y offset output (or NULL to ignore) |
Definition at line 170 of file nuklear_group.c.
NK_API nk_bool nk_group_scrolled_begin | ( | struct nk_context * | ctx, |
struct nk_scroll * | off, | ||
const char * | title, | ||
nk_flags | flags | ||
) |
Starts a new widget group. requires a previous layouting function to specify a size. Does not keep track of scrollbar.
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Both x- and y- scroll offset. Allows for manual scrollbar control | |||
| Window unique group title used to both identify and display in the group header | |||
| Window flags from nk_panel_flags section |
true(1)
if visible and fillable with widgets or false(0)
otherwise Definition at line 121 of file nuklear_group.c.
References nk_group_scrolled_offset_begin().
NK_API void nk_group_scrolled_end | ( | struct nk_context * | ctx | ) |
Ends a widget group after calling nk_group_scrolled_offset_begin or nk_group_scrolled_begin.
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
Definition at line 59 of file nuklear_group.c.
Referenced by nk_group_end().
NK_API nk_bool nk_group_scrolled_offset_begin | ( | struct nk_context * | ctx, |
nk_uint * | x_offset, | ||
nk_uint * | y_offset, | ||
const char * | title, | ||
nk_flags | flags | ||
) |
starts a new widget group. requires a previous layouting function to specify a size. Does not keep track of scrollbar.
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Scrollbar x-offset to offset all widgets inside the group horizontally. | |||
| Scrollbar y-offset to offset all widgets inside the group vertically | |||
| Window unique group title used to both identify and display in the group header | |||
| Window flags from the nk_panel_flags section |
true(1)
if visible and fillable with widgets or false(0)
otherwise Definition at line 10 of file nuklear_group.c.
Referenced by nk_group_scrolled_begin().
NK_API void nk_group_set_scroll | ( | struct nk_context * | ctx, |
const char * | id, | ||
nk_uint | x_offset, | ||
nk_uint | y_offset | ||
) |
Sets the scroll position of the given group.
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| The id of the group to scroll | |||
| The x offset to scroll to | |||
| The y offset to scroll to |
Definition at line 205 of file nuklear_group.c.
NK_API nk_bool nk_init | ( | struct nk_context * | ctx, |
const struct nk_allocator * | alloc, | ||
const struct nk_user_font * | font | ||
) |
Initializes a nk_context
struct with memory allocation callbacks for nuklear to allocate memory from. Used internally for nk_init_default
and provides a kitchen sink allocation interface to nuklear. Can be useful for cases like monitoring memory consumption.
Parameter | Description | |||
---|---|---|---|---|
| Must point to an either stack or heap allocated nk_context struct | |||
| Must point to a previously allocated memory allocator | |||
| Must point to a previously initialized font handle for more info look at font documentation |
false(0)
on failure or true(1)
on success. Definition at line 66 of file nuklear_context.c.
NK_API nk_bool nk_init_custom | ( | struct nk_context * | ctx, |
struct nk_buffer * | cmds, | ||
struct nk_buffer * | pool, | ||
const struct nk_user_font * | font | ||
) |
Initializes a nk_context
struct from two different either fixed or growing buffers.
The first buffer is for allocating draw commands while the second buffer is used for allocating windows, panels and state tables.
[in] | ctx | Must point to an either stack or heap allocated nk_context struct |
[in] | cmds | Must point to a previously initialized memory buffer either fixed or dynamic to store draw commands into |
[in] | pool | Must point to a previously initialized memory buffer either fixed or dynamic to store windows, panels and tables |
[in] | font | Must point to a previously initialized font handle for more info look at font documentation |
false(0)
on failure or true(1)
on success. Definition at line 45 of file nuklear_context.c.
References nk_buffer::type.
NK_API nk_bool nk_init_fixed | ( | struct nk_context * | ctx, |
void * | memory, | ||
nk_size | size, | ||
const struct nk_user_font * | font | ||
) |
Initializes a nk_context
struct from single fixed size memory block Should be used if you want complete control over nuklear's memory management. Especially recommended for system with little memory or systems with virtual memory. For the later case you can just allocate for example 16MB of virtual memory and only the required amount of memory will actually be committed.
!!! Warning make sure the passed memory block is aligned correctly for nk_draw_commands
.
Parameter | Description | |||
---|---|---|---|---|
| Must point to an either stack or heap allocated nk_context struct | |||
| Must point to a previously allocated memory block | |||
| Must contain the total size of memory | |||
| Must point to a previously initialized font handle for more info look at font documentation |
false(0)
on failure or true(1)
on success. Definition at line 34 of file nuklear_context.c.
NK_API void nk_input_begin | ( | struct nk_context * | ctx | ) |
Begins the input mirroring process by resetting text, scroll mouse, previous mouse position and movement as well as key state transitions.
[in] | ctx | Must point to a previously initialized nk_context struct |
Definition at line 10 of file nuklear_input.c.
NK_API void nk_input_button | ( | struct nk_context * | ctx, |
enum | nk_buttons, | ||
int | x, | ||
int | y, | ||
nk_bool | down | ||
) |
Mirrors the state of a specific mouse button to nuklear.
[in] | ctx | Must point to a previously initialized nk_context struct |
[in] | btn | Must be any value specified in enum nk_buttons that needs to be mirrored |
[in] | x | Must contain an integer describing mouse cursor x-position on click up/down |
[in] | y | Must contain an integer describing mouse cursor y-position on click up/down |
[in] | down | Must be 0 for key is up and 1 for key is down |
Definition at line 72 of file nuklear_input.c.
NK_API void nk_input_char | ( | struct nk_context * | ctx, |
char | c | ||
) |
Copies a single ASCII character into an internal text buffer.
This is basically a helper function to quickly push ASCII characters into nuklear.
nk_input_begin
and nk_input_end
.[in] | ctx | | Must point to a previously initialized nk_context struct |
[in] | c | | Must be a single ASCII character preferable one that can be printed |
Definition at line 125 of file nuklear_input.c.
NK_API void nk_input_end | ( | struct nk_context * | ctx | ) |
End the input mirroring process by resetting mouse grabbing state to ensure the mouse cursor is not grabbed indefinitely.
[in] | ctx | | Must point to a previously initialized nk_context struct |
Definition at line 30 of file nuklear_input.c.
NK_API void nk_input_glyph | ( | struct nk_context * | ctx, |
const | nk_glyph | ||
) |
Converts an encoded unicode rune into UTF-8 and copies the result into an internal text buffer.
nk_input_begin
and nk_input_end
.[in] | ctx | | Must point to a previously initialized nk_context struct |
[in] | g | | UTF-32 unicode codepoint |
Definition at line 107 of file nuklear_input.c.
NK_API void nk_input_key | ( | struct nk_context * | ctx, |
enum | nk_keys, | ||
nk_bool | down | ||
) |
Mirrors the state of a specific key to nuklear.
[in] | ctx | Must point to a previously initialized nk_context struct |
[in] | key | Must be any value specified in enum nk_keys that needs to be mirrored |
[in] | down | Must be 0 for key is up and 1 for key is down |
Definition at line 57 of file nuklear_input.c.
NK_API void nk_input_motion | ( | struct nk_context * | ctx, |
int | x, | ||
int | y | ||
) |
Mirrors current mouse position to nuklear.
[in] | ctx | Must point to a previously initialized nk_context struct |
[in] | x | Must hold an integer describing the current mouse cursor x-position |
[in] | y | Must hold an integer describing the current mouse cursor y-position |
Definition at line 45 of file nuklear_input.c.
NK_API void nk_input_scroll | ( | struct nk_context * | ctx, |
struct nk_vec2 | val | ||
) |
Copies the last mouse scroll value to nuklear.
Is generally a scroll value. So does not have to come from mouse and could also originate from balls, tracks, linear guide rails, or other programs.
[in] | ctx | | Must point to a previously initialized nk_context struct |
[in] | val | | vector with both X- as well as Y-scroll value |
Definition at line 99 of file nuklear_input.c.
NK_API void nk_input_unicode | ( | struct nk_context * | ctx, |
nk_rune | unicode | ||
) |
Converts a unicode rune into UTF-8 and copies the result into an internal text buffer.
nk_input_begin
and nk_input_end
.[in] | ctx | | Must point to a previously initialized nk_context struct |
[in] | rune | | UTF-32 unicode codepoint |
Definition at line 134 of file nuklear_input.c.
NK_API nk_bool nk_item_is_any_active | ( | const struct nk_context * | ctx | ) |
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
true(1)
if any window is hovered or any item is active or false(0)
otherwise Definition at line 473 of file nuklear_window.c.
References nk_window_is_any_hovered().
NK_API float nk_layout_ratio_from_pixel | ( | const struct nk_context * | ctx, |
float | pixel_width | ||
) |
Utility functions to calculate window ratio from pixel size.
[in] | ctx | | Must point to an previously initialized nk_context struct after call nk_begin_xxx |
[in] | pixel | | Pixel_width to convert to window ratio |
nk_rect
with both position and size of the next row Definition at line 137 of file nuklear_layout.c.
NK_API void nk_layout_reset_min_row_height | ( | struct nk_context * | ctx | ) |
Reset the currently used minimum row height back to font_height + text_padding + padding
[in] | ctx | | Must point to an previously initialized nk_context struct after call nk_begin_xxx |
Definition at line 26 of file nuklear_layout.c.
References nk_user_font::height.
NK_API void nk_layout_row | ( | struct nk_context * | ctx, |
enum | nk_layout_format, | ||
float | height, | ||
int | cols, | ||
const float * | ratio | ||
) |
Specifies row columns in array as either window ratio or size.
[in] | ctx | | Must point to an previously initialized nk_context struct after call nk_begin_xxx |
[in] | fmt | | Either NK_DYNAMIC for window ratio or NK_STATIC for fixed size columns |
[in] | height | | Holds height of each widget in row or zero for auto layouting |
[in] | columns | | Number of widget inside row |
Definition at line 229 of file nuklear_layout.c.
NK_API void nk_layout_row_begin | ( | struct nk_context * | ctx, |
enum nk_layout_format | fmt, | ||
float | row_height, | ||
int | cols | ||
) |
Starts a new dynamic or fixed row with given height and columns.
[in] | ctx | | Must point to an previously initialized nk_context struct after call nk_begin_xxx |
[in] | fmt | | either NK_DYNAMIC for window ratio or NK_STATIC for fixed size columns |
[in] | height | | holds height of each widget in row or zero for auto layouting |
[in] | columns | | Number of widget inside row |
Definition at line 157 of file nuklear_layout.c.
NK_API void nk_layout_row_dynamic | ( | struct nk_context * | ctx, |
float | height, | ||
int | cols | ||
) |
Sets current row layout to share horizontal space between @cols number of widgets evenly.
Once called all subsequent widget calls greater than @cols will allocate a new row with same layout.
[in] | ctx | | Must point to an previously initialized nk_context struct after call nk_begin_xxx |
[in] | height | | Holds height of each widget in row or zero for auto layouting |
[in] | columns | | Number of widget inside row |
Definition at line 147 of file nuklear_layout.c.
NK_API void nk_layout_row_end | ( | struct nk_context * | ctx | ) |
Finished previously started row.
[in] | ctx | | Must point to an previously initialized nk_context struct after call nk_begin_xxx |
Definition at line 209 of file nuklear_layout.c.
NK_API void nk_layout_row_push | ( | struct nk_context * | ctx, |
float | value | ||
) |
\breif Specifies either window ratio or width of a single column
[in] | ctx | | Must point to an previously initialized nk_context struct after call nk_begin_xxx |
[in] | value | | either a window ratio or fixed width depending on @fmt in previous nk_layout_row_begin call |
Definition at line 183 of file nuklear_layout.c.
NK_API void nk_layout_row_static | ( | struct nk_context * | ctx, |
float | height, | ||
int | item_width, | ||
int | cols | ||
) |
Sets current row layout to fill @cols number of widgets in row with same @item_width horizontal size.
Once called all subsequent widget calls greater than @cols will allocate a new row with same layout.
[in] | ctx | | Must point to an previously initialized nk_context struct after call nk_begin_xxx |
[in] | height | | Holds height of each widget in row or zero for auto layouting |
[in] | width | | Holds pixel width of each widget in the row |
[in] | columns | | Number of widget inside row |
Definition at line 152 of file nuklear_layout.c.
NK_API void nk_layout_row_template_begin | ( | struct nk_context * | ctx, |
float | row_height | ||
) |
Begins the row template declaration
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after call nk_begin_xxx | |||
| Holds height of each widget in row or zero for auto layouting |
Definition at line 268 of file nuklear_layout.c.
NK_API void nk_layout_row_template_end | ( | struct nk_context * | ctx | ) |
Marks the end of the row template
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after call nk_begin_xxx |
Definition at line 355 of file nuklear_layout.c.
NK_API void nk_layout_row_template_push_dynamic | ( | struct nk_context * | ctx | ) |
Adds a dynamic column that dynamically grows and can go to zero if not enough space
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after call nk_begin_xxx | |||
| Holds height of each widget in row or zero for auto layouting |
Definition at line 295 of file nuklear_layout.c.
NK_API void nk_layout_row_template_push_static | ( | struct nk_context * | ctx, |
float | width | ||
) |
Adds a static column that does not grow and will always have the same size
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after call nk_begin_xxx | |||
| Holds the absolute pixel width value the next column must be |
Definition at line 335 of file nuklear_layout.c.
NK_API void nk_layout_row_template_push_variable | ( | struct nk_context * | ctx, |
float | min_width | ||
) |
Adds a variable column that dynamically grows but does not shrink below specified pixel width
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after call nk_begin_xxx | |||
| Holds the minimum pixel width the next column must always be |
Definition at line 315 of file nuklear_layout.c.
NK_API void nk_layout_set_min_row_height | ( | struct nk_context * | ctx, |
float | height | ||
) |
Sets the currently used minimum row height.
!!!
[in] | ctx | | Must point to an previously initialized nk_context struct after call nk_begin_xxx |
[in] | height | | New minimum row height to be used for auto generating the row height |
Definition at line 10 of file nuklear_layout.c.
NK_API void nk_layout_space_begin | ( | struct nk_context * | ctx, |
enum | nk_layout_format, | ||
float | height, | ||
int | widget_count | ||
) |
Begins a new layouting space that allows to specify each widgets position and size.
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after call nk_begin_xxx | |||
| Either NK_DYNAMIC for window ratio or NK_STATIC for fixed size columns | |||
| Holds height of each widget in row or zero for auto layouting | |||
| Number of widgets inside row |
Definition at line 406 of file nuklear_layout.c.
NK_API struct nk_rect nk_layout_space_bounds | ( | const struct nk_context * | ctx | ) |
Utility function to calculate total space allocated for nk_layout_space
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after call nk_layout_space_begin |
nk_rect
holding the total space allocated Definition at line 465 of file nuklear_layout.c.
NK_API void nk_layout_space_end | ( | struct nk_context * | ctx | ) |
Marks the end of the layout space
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after call nk_layout_space_begin |
Definition at line 431 of file nuklear_layout.c.
NK_API void nk_layout_space_push | ( | struct nk_context * | ctx, |
struct nk_rect | bounds | ||
) |
Pushes position and size of the next widget in own coordinate space either as pixel or ratio
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after call nk_layout_space_begin | |||
| Position and size in laoyut space local coordinates |
Definition at line 450 of file nuklear_layout.c.
NK_API struct nk_rect nk_layout_space_rect_to_local | ( | const struct nk_context * | ctx, |
struct nk_rect | bounds | ||
) |
Converts rectangle from layout space into screen space
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after call nk_layout_space_begin | |||
| Rectangle to convert from layout space into screen space |
nk_rect
in layout space coordinates Definition at line 551 of file nuklear_layout.c.
NK_API struct nk_rect nk_layout_space_rect_to_screen | ( | const struct nk_context * | ctx, |
struct nk_rect | bounds | ||
) |
Converts rectangle from screen space into layout space
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after call nk_layout_space_begin | |||
| Rectangle to convert from layout space into screen space |
nk_rect
in screen space coordinates Definition at line 535 of file nuklear_layout.c.
NK_API struct nk_vec2 nk_layout_space_to_local | ( | const struct nk_context * | ctx, |
struct nk_vec2 | vec | ||
) |
Converts vector from layout space into screen space
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after call nk_layout_space_begin | |||
| Position to convert from screen space into layout coordinate space |
nk_vec2
in layout space coordinates Definition at line 519 of file nuklear_layout.c.
NK_API struct nk_vec2 nk_layout_space_to_screen | ( | const struct nk_context * | ctx, |
struct nk_vec2 | vec | ||
) |
Converts vector from nk_layout_space coordinate space into screen space
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after call nk_layout_space_begin | |||
| Position to convert from layout space into screen coordinate space |
nk_vec2
in screen space coordinates Definition at line 503 of file nuklear_layout.c.
NK_API struct nk_rect nk_layout_widget_bounds | ( | const struct nk_context * | ctx | ) |
Returns the width of the next row allocate by one of the layouting functions.
[in] | ctx | | Must point to an previously initialized nk_context struct after call nk_begin_xxx |
nk_rect
with both position and size of the next row Definition at line 484 of file nuklear_layout.c.
NK_API void nk_property_double | ( | struct nk_context * | ctx, |
const char * | name, | ||
double | min, | ||
double * | val, | ||
double | max, | ||
double | step, | ||
float | inc_per_pixel | ||
) |
Double 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 | |||
| Double 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 |
Definition at line 454 of file nuklear_property.c.
NK_API void nk_property_float | ( | struct nk_context * | ctx, |
const char * | name, | ||
float | min, | ||
float * | val, | ||
float | max, | ||
float | step, | ||
float | inc_per_pixel | ||
) |
Float 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 | |||
| Float 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 |
Definition at line 440 of file nuklear_property.c.
NK_API double nk_propertyd | ( | struct nk_context * | ctx, |
const char * | name, | ||
double | min, | ||
double | val, | ||
double | max, | ||
double | step, | ||
float | inc_per_pixel | ||
) |
Float property modifying a passed in value and returning the new value !!!
#
at the beginning. It will not be shown but guarantees correct behavior.[in] | ctx | Must point to an previously initialized nk_context struct after calling a layouting function |
[in] | name | String used both as a label as well as a unique identifier |
[in] | min | Minimum value not allowed to be underflown |
[in] | val | Current double value to be modified and returned |
[in] | max | Maximum value not allowed to be overflown |
[in] | step | Increment added and subtracted on increment and decrement button |
[in] | inc_per_pixel | Value per pixel added or subtracted on dragging |
Definition at line 496 of file nuklear_property.c.
NK_API float nk_propertyf | ( | struct nk_context * | ctx, |
const char * | name, | ||
float | min, | ||
float | val, | ||
float | max, | ||
float | step, | ||
float | inc_per_pixel | ||
) |
Float property modifying a passed in value and returning the new value !!!
#
at the beginning. It will not be shown but guarantees correct behavior.[in] | ctx | Must point to an previously initialized nk_context struct after calling a layouting function |
[in] | name | String used both as a label as well as a unique identifier |
[in] | min | Minimum value not allowed to be underflown |
[in] | val | Current float value to be modified and returned |
[in] | max | Maximum value not allowed to be overflown |
[in] | step | Increment added and subtracted on increment and decrement button |
[in] | inc_per_pixel | Value per pixel added or subtracted on dragging |
Definition at line 482 of file nuklear_property.c.
NK_API int nk_propertyi | ( | struct nk_context * | ctx, |
const char * | name, | ||
int | min, | ||
int | val, | ||
int | max, | ||
int | step, | ||
float | inc_per_pixel | ||
) |
Integer property modifying a passed in value and returning the new value !!!
#
at the beginning. It will not be shown but guarantees correct behavior.[in] | ctx | Must point to an previously initialized nk_context struct after calling a layouting function |
[in] | name | String used both as a label as well as a unique identifier |
[in] | min | Minimum value not allowed to be underflown |
[in] | val | Current integer value to be modified and returned |
[in] | max | Maximum value not allowed to be overflown |
[in] | step | Increment added and subtracted on increment and decrement button |
[in] | inc_per_pixel | Value per pixel added or subtracted on dragging |
Definition at line 468 of file nuklear_property.c.
NK_API void nk_rule_horizontal | ( | struct nk_context * | ctx, |
struct nk_color | color, | ||
nk_bool | rounding | ||
) |
Line for visual separation. Draws a line with thickness determined by the current row height.
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Color of the horizontal line | |||
| Whether or not to make the line round |
Definition at line 673 of file nuklear_window.c.
NK_API void nk_spacer | ( | struct nk_context * | ctx | ) |
Spacer is a dummy widget that consumes space as usual but doesn't draw anything
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after call nk_layout_space_begin |
Definition at line 764 of file nuklear_layout.c.
NK_API nk_bool nk_tree_image_push_hashed | ( | struct nk_context * | ctx, |
enum | nk_tree_type, | ||
struct nk_image | img, | ||
const char * | title, | ||
enum nk_collapse_states | initial_state, | ||
const char * | hash, | ||
int | len, | ||
int | seed | ||
) |
Start a collapsible UI section with internal state management with full control over internal unique ID used to store state
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node | |||
| Image to display inside the header on the left of the label | |||
| Label printed in the tree header | |||
| Initial tree state value out of nk_collapse_states | |||
| Memory block or string to generate the ID from | |||
| Size of passed memory block or string in hash | |||
| Seeding value if this function is called in a loop or default to 0 |
true(1)
if visible and fillable with widgets or false(0)
otherwise Definition at line 183 of file nuklear_tree.c.
NK_API void nk_tree_pop | ( | struct nk_context * | ctx | ) |
Ends a collapsabale UI section
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after calling nk_tree_xxx_push_xxx |
Definition at line 190 of file nuklear_tree.c.
References nk_tree_state_pop().
NK_API nk_bool nk_tree_push_hashed | ( | struct nk_context * | ctx, |
enum | nk_tree_type, | ||
const char * | title, | ||
enum nk_collapse_states | initial_state, | ||
const char * | hash, | ||
int | len, | ||
int | seed | ||
) |
Start a collapsible UI section with internal state management with full control over internal unique ID used to store state
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node | |||
| Label printed in the tree header | |||
| Initial tree state value out of nk_collapse_states | |||
| Memory block or string to generate the ID from | |||
| Size of passed memory block or string in hash | |||
| Seeding value if this function is called in a loop or default to 0 |
true(1)
if visible and fillable with widgets or false(0)
otherwise Definition at line 176 of file nuklear_tree.c.
NK_API nk_bool nk_tree_state_image_push | ( | struct nk_context * | ctx, |
enum | nk_tree_type, | ||
struct nk_image | img, | ||
const char * | title, | ||
enum nk_collapse_states * | state | ||
) |
Start a collapsible UI section with image and label header and external state management
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after calling nk_tree_xxx_push_xxx | |||
| Image to display inside the header on the left of the label | |||
| Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node | |||
| Label printed in the tree header | |||
| Persistent state to update |
true(1)
if visible and fillable with widgets or false(0)
otherwise Definition at line 151 of file nuklear_tree.c.
NK_API void nk_tree_state_pop | ( | struct nk_context * | ctx | ) |
Ends a collapsabale UI section
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after calling nk_tree_xxx_push_xxx |
Definition at line 157 of file nuklear_tree.c.
Referenced by nk_tree_pop().
NK_API nk_bool nk_tree_state_push | ( | struct nk_context * | ctx, |
enum | nk_tree_type, | ||
const char * | title, | ||
enum nk_collapse_states * | state | ||
) |
Start a collapsible UI section with external state management
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct after calling nk_tree_xxx_push_xxx | |||
| Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node | |||
| Label printed in the tree header | |||
| Persistent state to update |
true(1)
if visible and fillable with widgets or false(0)
otherwise Definition at line 145 of file nuklear_tree.c.
NK_API void nk_window_close | ( | struct nk_context * | ctx, |
const char * | name | ||
) |
Closes a window and marks it for being freed at the end of the frame
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Identifier of the window to close |
Definition at line 549 of file nuklear_window.c.
References NK_WINDOW_CLOSED, nk_window_find(), and NK_WINDOW_HIDDEN.
NK_API void nk_window_collapse | ( | struct nk_context * | ctx, |
const char * | name, | ||
enum nk_collapse_states | state | ||
) |
Updates collapse state of a window with given name
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Identifier of the window to close | |||
| value out of nk_collapse_states section |
Definition at line 603 of file nuklear_window.c.
Referenced by nk_window_collapse_if().
NK_API void nk_window_collapse_if | ( | struct nk_context * | ctx, |
const char * | name, | ||
enum nk_collapse_states | state, | ||
int | cond | ||
) |
Updates collapse state of a window with given name if given condition is met
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Identifier of the window to either collapse or maximize | |||
| value out of nk_collapse_states section the window should be put into | |||
| condition that has to be met to actually commit the collapse state change |
Definition at line 621 of file nuklear_window.c.
References nk_window_collapse().
NK_API struct nk_window* nk_window_find | ( | const struct nk_context * | ctx, |
const char * | name | ||
) |
Finds and returns a window from passed name
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Window identifier |
nk_window
struct pointing to the identified window or NULL if no window with the given name was found Definition at line 540 of file nuklear_window.c.
Referenced by nk_window_close(), nk_window_set_bounds(), nk_window_set_position(), and nk_window_set_size().
NK_API struct nk_rect nk_window_get_bounds | ( | const struct nk_context * | ctx | ) |
!!!
nk_begin_xxx
and nk_end
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
nk_rect
struct with window upper left window position and size Definition at line 314 of file nuklear_window.c.
NK_API struct nk_command_buffer* nk_window_get_canvas | ( | const struct nk_context * | ctx | ) |
nk_begin_xxx
and nk_end
!!! nk_end
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
nk_command_buffer
struct used as drawing canvas. Can be used to do custom drawing. Definition at line 391 of file nuklear_window.c.
NK_API struct nk_rect nk_window_get_content_region | ( | const struct nk_context * | ctx | ) |
!!!
nk_begin_xxx
and nk_end
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
nk_rect
struct with screen position and size (no scrollbar offset) of the visible space inside the current window Definition at line 354 of file nuklear_window.c.
NK_API struct nk_vec2 nk_window_get_content_region_max | ( | const struct nk_context * | ctx | ) |
!!!
nk_begin_xxx
and nk_end
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
nk_vec2
struct with lower right screen position (no scrollbar offset) of the visible space inside the current window Definition at line 371 of file nuklear_window.c.
NK_API struct nk_vec2 nk_window_get_content_region_min | ( | const struct nk_context * | ctx | ) |
!!!
nk_begin_xxx
and nk_end
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
returns nk_vec2
struct with upper left screen position (no scrollbar offset) of the visible space inside the current window
Definition at line 362 of file nuklear_window.c.
NK_API struct nk_vec2 nk_window_get_content_region_size | ( | const struct nk_context * | ctx | ) |
!!!
nk_begin_xxx
and nk_end
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
nk_vec2
struct with size the visible space inside the current window Definition at line 381 of file nuklear_window.c.
NK_API float nk_window_get_height | ( | const struct nk_context * | ctx | ) |
!!!
nk_begin_xxx
and nk_end
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
Definition at line 347 of file nuklear_window.c.
NK_API struct nk_panel* nk_window_get_panel | ( | const struct nk_context * | ctx | ) |
!!!
nk_begin_xxx
and nk_end
!!! nk_end
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
nk_panel
state. Definition at line 400 of file nuklear_window.c.
NK_API struct nk_vec2 nk_window_get_position | ( | const struct nk_context * | ctx | ) |
!!!
nk_begin_xxx
and nk_end
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
nk_vec2
struct with window upper left position Definition at line 322 of file nuklear_window.c.
NK_API void nk_window_get_scroll | ( | const struct nk_context * | ctx, |
nk_uint * | offset_x, | ||
nk_uint * | offset_y | ||
) |
Gets the scroll offset for the current window !!!
nk_begin_xxx
and nk_end
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| A pointer to the x offset output (or NULL to ignore) | |||
| A pointer to the y offset output (or NULL to ignore) |
Definition at line 408 of file nuklear_window.c.
NK_API struct nk_vec2 nk_window_get_size | ( | const struct nk_context * | ctx | ) |
!!!
nk_begin_xxx
and nk_end
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
nk_vec2
struct with window width and height Definition at line 330 of file nuklear_window.c.
NK_API float nk_window_get_width | ( | const struct nk_context * | ctx | ) |
nk_window_get_width
!!!
nk_begin_xxx
and nk_end
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
Definition at line 339 of file nuklear_window.c.
NK_API nk_bool nk_window_has_focus | ( | const struct nk_context * | ctx | ) |
nk_begin_xxx
and nk_end
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
false(0)
if current window is not active or true(1)
if it is Definition at line 422 of file nuklear_window.c.
NK_API nk_bool nk_window_is_active | ( | const struct nk_context * | ctx, |
const char * | name | ||
) |
Same as nk_window_has_focus for some reason
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Identifier of window you want to check if it is active |
true(1)
if current window is active or false(0)
window not found or not active Definition at line 525 of file nuklear_window.c.
NK_API nk_bool nk_window_is_any_hovered | ( | const struct nk_context * | ctx | ) |
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
true(1)
if any window is hovered or false(0)
otherwise Definition at line 446 of file nuklear_window.c.
References NK_WINDOW_HIDDEN.
Referenced by nk_item_is_any_active().
NK_API nk_bool nk_window_is_closed | ( | const struct nk_context * | ctx, |
const char * | name | ||
) |
nk_close
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Identifier of window you want to check if it is closed |
true(1)
if current window was closed or false(0)
window not found or not closed Definition at line 495 of file nuklear_window.c.
NK_API nk_bool nk_window_is_collapsed | ( | const struct nk_context * | ctx, |
const char * | name | ||
) |
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Identifier of window you want to check if it is collapsed |
true(1)
if current window is minimized and false(0)
if window not found or is not minimized Definition at line 480 of file nuklear_window.c.
NK_API nk_bool nk_window_is_hidden | ( | const struct nk_context * | ctx, |
const char * | name | ||
) |
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Identifier of window you want to check if it is hidden |
true(1)
if current window is hidden or false(0)
window not found or visible Definition at line 510 of file nuklear_window.c.
NK_API nk_bool nk_window_is_hovered | ( | const struct nk_context * | ctx | ) |
Return if the current window is being hovered !!!
nk_begin_xxx
and nk_end
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct |
true(1)
if current window is hovered or false(0)
otherwise Definition at line 431 of file nuklear_window.c.
References NK_WINDOW_HIDDEN, and NK_WINDOW_MINIMIZED.
NK_API void nk_window_set_bounds | ( | struct nk_context * | ctx, |
const char * | name, | ||
struct nk_rect | bounds | ||
) |
Updates position and size of window with passed in name
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Identifier of the window to modify both position and size | |||
| Must point to a nk_rect struct with the new position and size |
Definition at line 562 of file nuklear_window.c.
References nk_window_find().
NK_API void nk_window_set_focus | ( | struct nk_context * | ctx, |
const char * | name | ||
) |
Sets the window with given name as active
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Identifier of the window to set focus on |
Definition at line 655 of file nuklear_window.c.
NK_API void nk_window_set_position | ( | struct nk_context * | ctx, |
const char * | name, | ||
struct nk_vec2 | pos | ||
) |
Updates position of window with passed name
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Identifier of the window to modify both position | |||
| Must point to a nk_vec2 struct with the new position |
Definition at line 573 of file nuklear_window.c.
References nk_window_find().
NK_API void nk_window_set_scroll | ( | struct nk_context * | ctx, |
nk_uint | offset_x, | ||
nk_uint | offset_y | ||
) |
Sets the scroll offset for the current window !!!
nk_begin_xxx
and nk_end
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| The x offset to scroll to | |||
| The y offset to scroll to |
Definition at line 591 of file nuklear_window.c.
NK_API void nk_window_set_size | ( | struct nk_context * | ctx, |
const char * | name, | ||
struct nk_vec2 | size | ||
) |
Updates size of window with passed in name
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Identifier of the window to modify both window size | |||
| Must point to a nk_vec2 struct with new window size |
Definition at line 582 of file nuklear_window.c.
References nk_window_find().
NK_API void nk_window_show | ( | struct nk_context * | ctx, |
const char * | name, | ||
enum nk_show_states | state | ||
) |
updates visibility state of a window with given name
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Identifier of the window to either collapse or maximize | |||
| state with either visible or hidden to modify the window with |
Definition at line 629 of file nuklear_window.c.
Referenced by nk_window_show_if().
NK_API void nk_window_show_if | ( | struct nk_context * | ctx, |
const char * | name, | ||
enum nk_show_states | state, | ||
int | cond | ||
) |
Updates visibility state of a window with given name if a given condition is met
Parameter | Description | |||
---|---|---|---|---|
| Must point to an previously initialized nk_context struct | |||
| Identifier of the window to either hide or show | |||
| state with either visible or hidden to modify the window with | |||
| condition that has to be met to actually commit the visibility state change |
Definition at line 646 of file nuklear_window.c.
References nk_window_show().