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.
 
Loading...
Searching...
No Matches
nuklear.h File Reference

main API and documentation file More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  nk_color
 
struct  nk_colorf
 
struct  nk_vec2
 
struct  nk_vec2i
 
struct  nk_rect
 
struct  nk_recti
 
union  nk_handle
 
struct  nk_image
 
struct  nk_nine_slice
 
struct  nk_cursor
 
struct  nk_scroll
 
struct  nk_allocator
 
struct  nk_draw_null_texture
 
struct  nk_convert_config
 
struct  nk_list_view
 
struct  nk_user_font
 
struct  nk_memory_status
 
struct  nk_buffer_marker
 
struct  nk_memory
 
struct  nk_buffer
 
struct  nk_str
 ============================================================== More...
 
struct  nk_clipboard
 
struct  nk_text_undo_record
 
struct  nk_text_undo_state
 
struct  nk_text_edit
 
struct  nk_command
 command base and header of every command inside the buffer More...
 
struct  nk_command_scissor
 
struct  nk_command_line
 
struct  nk_command_curve
 
struct  nk_command_rect
 
struct  nk_command_rect_filled
 
struct  nk_command_rect_multi_color
 
struct  nk_command_triangle
 
struct  nk_command_triangle_filled
 
struct  nk_command_circle
 
struct  nk_command_circle_filled
 
struct  nk_command_arc
 
struct  nk_command_arc_filled
 
struct  nk_command_polygon
 
struct  nk_command_polygon_filled
 
struct  nk_command_polyline
 
struct  nk_command_image
 
struct  nk_command_custom
 
struct  nk_command_text
 
struct  nk_command_buffer
 
struct  nk_mouse_button
 
struct  nk_mouse
 
struct  nk_key
 
struct  nk_keyboard
 
struct  nk_input
 
union  nk_style_item_data
 
struct  nk_style_item
 
struct  nk_style_text
 
struct  nk_style_button
 
struct  nk_style_toggle
 
struct  nk_style_selectable
 
struct  nk_style_slider
 
struct  nk_style_knob
 
struct  nk_style_progress
 
struct  nk_style_scrollbar
 
struct  nk_style_edit
 
struct  nk_style_property
 
struct  nk_style_chart
 
struct  nk_style_combo
 
struct  nk_style_tab
 
struct  nk_style_window_header
 
struct  nk_style_window
 
struct  nk_style
 
struct  nk_chart_slot
 
struct  nk_chart
 
struct  nk_row_layout
 
struct  nk_popup_buffer
 
struct  nk_menu_state
 
struct  nk_panel
 
struct  nk_popup_state
 
struct  nk_edit_state
 
struct  nk_property_state
 
struct  nk_window
 
struct  nk_configuration_stacks
 
struct  nk_table
 
union  nk_page_data
 
struct  nk_page_element
 
struct  nk_page
 
struct  nk_pool
 
struct  nk_context
 

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.
 
#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.
 
NK_API void nk_clear (struct nk_context *)
 Resets the context state at the end of the frame.
 
NK_API void nk_free (struct nk_context *)
 Frees all memory allocated by nuklear; Not needed if context was initialized with nk_init_fixed.
 
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.
 
NK_API void nk_input_motion (struct nk_context *, int x, int y)
 Mirrors current mouse position to nuklear.
 
NK_API void nk_input_key (struct nk_context *, enum nk_keys, nk_bool down)
 Mirrors the state of a specific key to nuklear.
 
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.
 
NK_API void nk_input_scroll (struct nk_context *, struct nk_vec2 val)
 Copies the last mouse scroll value to nuklear.
 
NK_API void nk_input_char (struct nk_context *, char)
 Copies a single ASCII character into an internal text buffer.
 
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.
 
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.
 
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.
 
NK_API const struct nk_commandnk__begin (struct nk_context *)
 Returns a draw command list iterator to iterate all draw commands accumulated over one frame.
 
NK_API const struct nk_commandnk__next (struct nk_context *, const struct nk_command *)
 Returns draw command pointer pointing to the next command inside the draw command list.
 
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_windownk_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
 
NK_API float nk_window_get_height (const struct nk_context *ctx)
 
NK_API struct nk_panelnk_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_buffernk_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.
 
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
 
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.
 
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.
 
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.
 
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.
 
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.
 
NK_API void nk_layout_row_push (struct nk_context *, float value)
 \breif Specifies either window ratio or width of a single column
 
NK_API void nk_layout_row_end (struct nk_context *)
 Finished previously started row.
 
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.
 
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.
 
NK_API nk_bool nk_group_begin_titled (struct nk_context *, const char *name, const char *title, nk_flags)
 Starts a new widget group.
 
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)
 

Detailed Description

main API and documentation file

Definition in file nuklear.h.

Macro Definition Documentation

◆ NK_ABS

#define NK_ABS (   a)    (((a) < 0) ? -(a) : (a))

Definition at line 5756 of file nuklear.h.

◆ NK_ALIGN_PTR

#define NK_ALIGN_PTR (   x,
  mask 
)     (NK_UINT_TO_PTR((NK_PTR_TO_UINT((nk_byte*)(x) + (mask-1)) & ~(mask-1))))

Definition at line 5793 of file nuklear.h.

◆ NK_ALIGN_PTR_BACK

#define NK_ALIGN_PTR_BACK (   x,
  mask 
)     (NK_UINT_TO_PTR((NK_PTR_TO_UINT((nk_byte*)(x)) & ~(mask-1))))

Definition at line 5795 of file nuklear.h.

◆ NK_ALIGNOF

#define NK_ALIGNOF (   t)    NK_OFFSETOF(struct {char c; t _h;}, _h)

Definition at line 5816 of file nuklear.h.

◆ NK_API

#define NK_API   extern

Definition at line 50 of file nuklear.h.

◆ NK_BETWEEN

#define NK_BETWEEN (   x,
  a,
 
)    ((a) <= (x) && (x) < (b))

Definition at line 5757 of file nuklear.h.

◆ NK_BOOL

#define NK_BOOL   int

could be char, use int for drop-in replacement backwards compatibility

Definition at line 192 of file nuklear.h.

◆ NK_BUTTON_BEHAVIOR_STACK_SIZE

#define NK_BUTTON_BEHAVIOR_STACK_SIZE   8

Definition at line 5596 of file nuklear.h.

◆ NK_CHART_MAX_SLOT

#define NK_CHART_MAX_SLOT   4

Definition at line 5385 of file nuklear.h.

◆ NK_CLAMP

#define NK_CLAMP (   i,
  v,
 
)    (NK_MAX(NK_MIN(v,x), i))

Definition at line 92 of file nuklear.h.

◆ NK_COLOR_STACK_SIZE

#define NK_COLOR_STACK_SIZE   32

Definition at line 5620 of file nuklear.h.

◆ NK_CONFIG_STACK

#define NK_CONFIG_STACK (   type,
  size 
)
Value:
struct nk_config_stack_##type {\
int head;\
struct nk_config_stack_##type##_element elements[size];\
}

Definition at line 5628 of file nuklear.h.

◆ NK_CONFIGURATION_STACK_TYPE

#define NK_CONFIGURATION_STACK_TYPE (   prefix,
  name,
  type 
)
Value:
struct nk_config_stack_##name##_element {\
prefix##_##type *address;\
prefix##_##type old_value;\
}

Definition at line 5623 of file nuklear.h.

◆ NK_CONTAINER_OF

#define NK_CONTAINER_OF (   ptr,
  type,
  member 
)     (type*)((void*)((char*)(1 ? (ptr): &((type*)0)->member) - NK_OFFSETOF(type, member)))

Definition at line 5819 of file nuklear.h.

◆ NK_CONTAINS

#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))

Definition at line 5763 of file nuklear.h.

◆ NK_FILE_LINE

#define NK_FILE_LINE   __FILE__ ":" NK_MACRO_STRINGIFY(__LINE__)

Definition at line 86 of file nuklear.h.

◆ NK_FLAG

#define NK_FLAG (   x)    (1 << (x))

Definition at line 65 of file nuklear.h.

◆ NK_FLAGS_STACK_SIZE

#define NK_FLAGS_STACK_SIZE   32

Definition at line 5616 of file nuklear.h.

◆ nk_float

#define nk_float   float

Definition at line 5634 of file nuklear.h.

◆ NK_FLOAT_STACK_SIZE

#define NK_FLOAT_STACK_SIZE   32

Definition at line 5608 of file nuklear.h.

◆ NK_FONT_STACK_SIZE

#define NK_FONT_STACK_SIZE   8

Definition at line 5600 of file nuklear.h.

◆ nk_foreach

#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.

#define nk_foreach(c, ctx)
Parameters
[in]ctx| Must point to an previously initialized nk_context struct at the end of a frame
[in]cmd| Command pointer initialized to NULL

Definition at line 1031 of file nuklear.h.

◆ NK_GLOBAL

#define NK_GLOBAL   static

Definition at line 63 of file nuklear.h.

◆ NK_INBOX

#define NK_INBOX (   px,
  py,
  x,
  y,
  w,
 
)     (NK_BETWEEN(px,x,x+w) && NK_BETWEEN(py,y,y+h))

Definition at line 5758 of file nuklear.h.

◆ NK_INPUT_MAX

#define NK_INPUT_MAX   16

Definition at line 24 of file nuklear.h.

◆ NK_INT16

#define NK_INT16   signed short

Definition at line 136 of file nuklear.h.

◆ NK_INT32

#define NK_INT32   signed int

Definition at line 145 of file nuklear.h.

◆ NK_INT8

#define NK_INT8   signed char

Definition at line 130 of file nuklear.h.

◆ NK_INTERN

#define NK_INTERN   static

Definition at line 61 of file nuklear.h.

◆ NK_INTERSECT

#define NK_INTERSECT (   x0,
  y0,
  w0,
  h0,
  x1,
  y1,
  w1,
  h1 
)
Value:
((x1 < (x0 + w0)) && (x0 < (x1 + w1)) && \
(y1 < (y0 + h0)) && (y0 < (y1 + h1)))

Definition at line 5760 of file nuklear.h.

◆ NK_LEN

#define NK_LEN (   a)    (sizeof(a)/sizeof(a)[0])

Definition at line 5755 of file nuklear.h.

◆ NK_LIB

#define NK_LIB   extern

Definition at line 57 of file nuklear.h.

◆ NK_MACRO_STRINGIFY

#define NK_MACRO_STRINGIFY (   x)    NK_STRINGIFY(x)

Definition at line 67 of file nuklear.h.

◆ NK_MAX

#define NK_MAX (   a,
 
)    ((a) < (b) ? (b) : (a))

Definition at line 91 of file nuklear.h.

◆ NK_MAX_FLOAT_PRECISION

#define NK_MAX_FLOAT_PRECISION   2

Definition at line 5751 of file nuklear.h.

◆ NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS

#define NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS   16

Definition at line 5382 of file nuklear.h.

◆ NK_MAX_NUMBER_BUFFER

#define NK_MAX_NUMBER_BUFFER   64

Definition at line 27 of file nuklear.h.

◆ NK_MIN

#define NK_MIN (   a,
 
)    ((a) < (b) ? (a) : (b))

Definition at line 90 of file nuklear.h.

◆ NK_OFFSETOF

#define NK_OFFSETOF (   st,
 
)    ((nk_ptr)&(((st*)0)->m))

Definition at line 5801 of file nuklear.h.

◆ NK_PI

#define NK_PI   3.141592654f

Definition at line 5748 of file nuklear.h.

◆ NK_PI_HALF

#define NK_PI_HALF   1.570796326f

Definition at line 5749 of file nuklear.h.

◆ NK_POINTER_TYPE

#define NK_POINTER_TYPE   unsigned long

Definition at line 182 of file nuklear.h.

◆ nk_ptr_add

#define nk_ptr_add (   t,
  p,
 
)    ((t*)((void*)((nk_byte*)(p) + (i))))

Definition at line 5771 of file nuklear.h.

◆ nk_ptr_add_const

#define nk_ptr_add_const (   t,
  p,
 
)    ((const t*)((const void*)((const nk_byte*)(p) + (i))))

Definition at line 5772 of file nuklear.h.

◆ NK_PTR_TO_UINT

#define NK_PTR_TO_UINT (   x)    ((nk_size)(((char*)x)-(char*)0))

Definition at line 5784 of file nuklear.h.

◆ NK_SATURATE

#define NK_SATURATE (   x)    (NK_MAX(0, NK_MIN(1.0f, x)))

Definition at line 5754 of file nuklear.h.

◆ NK_SCROLLBAR_HIDING_TIMEOUT

#define NK_SCROLLBAR_HIDING_TIMEOUT   4.0f

Definition at line 30 of file nuklear.h.

◆ NK_SIZE_TYPE

#define NK_SIZE_TYPE   unsigned long

Definition at line 167 of file nuklear.h.

◆ NK_STATIC_ASSERT

#define NK_STATIC_ASSERT (   exp)    typedef char NK_UNIQUE_NAME(_dummy_array)[(exp)?1:-1]

Definition at line 79 of file nuklear.h.

◆ NK_STORAGE

#define NK_STORAGE   static

Definition at line 62 of file nuklear.h.

◆ NK_STRING_JOIN

#define NK_STRING_JOIN (   arg1,
  arg2 
)    NK_STRING_JOIN_DELAY(arg1, arg2)

Definition at line 70 of file nuklear.h.

◆ NK_STRING_JOIN_DELAY

#define NK_STRING_JOIN_DELAY (   arg1,
  arg2 
)    NK_STRING_JOIN_IMMEDIATE(arg1, arg2)

Definition at line 69 of file nuklear.h.

◆ NK_STRING_JOIN_IMMEDIATE

#define NK_STRING_JOIN_IMMEDIATE (   arg1,
  arg2 
)    arg1 ## arg2

Definition at line 68 of file nuklear.h.

◆ NK_STRINGIFY

#define NK_STRINGIFY (   x)    #x

Definition at line 66 of file nuklear.h.

◆ NK_STRTOD

#define NK_STRTOD   nk_strtod

Definition at line 3819 of file nuklear.h.

◆ NK_STYLE_ITEM_STACK_SIZE

#define NK_STYLE_ITEM_STACK_SIZE   16

Definition at line 5604 of file nuklear.h.

◆ NK_TEXTEDIT_UNDOCHARCOUNT

#define NK_TEXTEDIT_UNDOCHARCOUNT   999

Definition at line 4308 of file nuklear.h.

◆ NK_TEXTEDIT_UNDOSTATECOUNT

#define NK_TEXTEDIT_UNDOSTATECOUNT   99

Definition at line 4304 of file nuklear.h.

◆ nk_tree_element_push

#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__)

Definition at line 3054 of file nuklear.h.

◆ nk_tree_element_push_id

#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)

Definition at line 3055 of file nuklear.h.

◆ nk_tree_image_push

#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__)

# nk_tree_image_push

Start a collapsible UI section with image and label header !!!

Warning
To keep track of the runtime tree collapsible state this function uses defines __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.
#define nk_tree_image_push(ctx, type, img, title, state)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]type
Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
Parameters
[in]img
Image to display inside the header on the left of the label
Parameters
[in]title
Label printed in the tree header
Parameters
[in]state
Initial tree state value out of nk_collapse_states
Returns
true(1) if visible and fillable with widgets or false(0) otherwise

Definition at line 2944 of file nuklear.h.

◆ nk_tree_image_push_id

#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)

# nk_tree_image_push_id

Start a collapsible UI section with image and label header and internal state management callable in a look

#define nk_tree_image_push_id(ctx, type, img, title, state, id)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]type
Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
Parameters
[in]img
Image to display inside the header on the left of the label
Parameters
[in]title
Label printed in the tree header
Parameters
[in]state
Initial tree state value out of nk_collapse_states
Parameters
[in]id
Loop counter index if this function is called in a loop
Returns
true(1) if visible and fillable with widgets or false(0) otherwise

Definition at line 2966 of file nuklear.h.

◆ nk_tree_push

#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__)

# nk_tree_push

Starts a collapsible UI section with internal state management !!!

Warning
To keep track of the runtime tree collapsible state this function uses defines __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.
#define nk_tree_push(ctx, type, title, state)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]type
Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
Parameters
[in]title
Label printed in the tree header
Parameters
[in]state
Initial tree state value out of nk_collapse_states
Returns
true(1) if visible and fillable with widgets or false(0) otherwise

Definition at line 2879 of file nuklear.h.

◆ nk_tree_push_id

#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)

# nk_tree_push_id

Starts a collapsible UI section with internal state management callable in a look

#define nk_tree_push_id(ctx, type, title, state, id)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]type
Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
Parameters
[in]title
Label printed in the tree header
Parameters
[in]state
Initial tree state value out of nk_collapse_states
Parameters
[in]id
Loop counter index if this function is called in a loop
Returns
true(1) if visible and fillable with widgets or false(0) otherwise

Definition at line 2898 of file nuklear.h.

◆ NK_UINT16

#define NK_UINT16   unsigned short

Definition at line 139 of file nuklear.h.

◆ NK_UINT32

#define NK_UINT32   unsigned int

Definition at line 152 of file nuklear.h.

◆ NK_UINT8

#define NK_UINT8   unsigned char

Definition at line 133 of file nuklear.h.

◆ NK_UINT_TO_PTR

#define NK_UINT_TO_PTR (   x)    ((void*)&((char*)0)[x])

Definition at line 5783 of file nuklear.h.

◆ NK_UNDEFINED

#define NK_UNDEFINED   (-1.0f)

Definition at line 20 of file nuklear.h.

◆ NK_UNIQUE_NAME

#define NK_UNIQUE_NAME (   name)    NK_STRING_JOIN(name,__LINE__)

Definition at line 75 of file nuklear.h.

◆ NK_UNUSED

#define NK_UNUSED (   x)    ((void)(x))

Definition at line 5753 of file nuklear.h.

◆ NK_UTF_INVALID [1/2]

#define NK_UTF_INVALID   0xFFFD

internal invalid utf8 rune

Definition at line 21 of file nuklear.h.

◆ NK_UTF_INVALID [2/2]

#define NK_UTF_INVALID   0xFFFD

internal invalid utf8 rune

Definition at line 21 of file nuklear.h.

◆ NK_UTF_SIZE

#define NK_UTF_SIZE   4

describes the number of bytes a glyph consists of

Definition at line 22 of file nuklear.h.

◆ NK_VALUE_PAGE_CAPACITY

#define NK_VALUE_PAGE_CAPACITY    (((NK_MAX(sizeof(struct nk_window),sizeof(struct nk_panel)) / sizeof(nk_uint))) / 2)

Definition at line 5664 of file nuklear.h.

◆ nk_vec2_add

#define nk_vec2_add (   a,
 
)    nk_vec2((a).x + (b).x, (a).y + (b).y)

Definition at line 5767 of file nuklear.h.

◆ nk_vec2_len_sqr

#define nk_vec2_len_sqr (   a)    ((a).x*(a).x+(a).y*(a).y)

Definition at line 5768 of file nuklear.h.

◆ nk_vec2_muls

#define nk_vec2_muls (   a,
 
)    nk_vec2((a).x * (t), (a).y * (t))

Definition at line 5769 of file nuklear.h.

◆ nk_vec2_sub

#define nk_vec2_sub (   a,
 
)    nk_vec2((a).x - (b).x, (a).y - (b).y)

Definition at line 5766 of file nuklear.h.

◆ NK_VECTOR_STACK_SIZE

#define NK_VECTOR_STACK_SIZE   16

Definition at line 5612 of file nuklear.h.

◆ NK_WIDGET_DISABLED_FACTOR

#define NK_WIDGET_DISABLED_FACTOR   0.5f

Definition at line 3627 of file nuklear.h.

◆ NK_WINDOW_MAX_NAME

#define NK_WINDOW_MAX_NAME   64

Definition at line 5485 of file nuklear.h.

◆ nk_zero_struct

#define nk_zero_struct (   s)    nk_zero(&s, sizeof(s))

Definition at line 5773 of file nuklear.h.

Typedef Documentation

◆ nk_bool

typedef NK_BOOL nk_bool

Definition at line 205 of file nuklear.h.

◆ nk_byte

typedef NK_UINT8 nk_byte

Definition at line 198 of file nuklear.h.

◆ nk_char

typedef NK_INT8 nk_char

Definition at line 196 of file nuklear.h.

◆ nk_command_custom_callback

typedef void(* nk_command_custom_callback) (void *canvas, short x, short y, unsigned short w, unsigned short h, nk_handle callback_data)

Definition at line 4605 of file nuklear.h.

◆ nk_flags

typedef nk_uint nk_flags

Definition at line 208 of file nuklear.h.

◆ nk_glyph

typedef char nk_glyph[NK_UTF_SIZE]

Definition at line 267 of file nuklear.h.

◆ nk_hash

typedef nk_uint nk_hash

Definition at line 207 of file nuklear.h.

◆ nk_int

typedef NK_INT32 nk_int

Definition at line 201 of file nuklear.h.

◆ nk_plugin_alloc

typedef void *(* nk_plugin_alloc) (nk_handle, void *old, nk_size)

Definition at line 287 of file nuklear.h.

◆ nk_plugin_copy

typedef void(* nk_plugin_copy) (nk_handle, const char *, int len)

Definition at line 291 of file nuklear.h.

◆ nk_plugin_filter

typedef nk_bool(* nk_plugin_filter) (const struct nk_text_edit *, nk_rune unicode)

Definition at line 289 of file nuklear.h.

◆ nk_plugin_free

typedef void(* nk_plugin_free) (nk_handle, void *old)

Definition at line 288 of file nuklear.h.

◆ nk_plugin_paste

typedef void(* nk_plugin_paste) (nk_handle, struct nk_text_edit *)

Definition at line 290 of file nuklear.h.

◆ nk_ptr

typedef NK_POINTER_TYPE nk_ptr

Definition at line 204 of file nuklear.h.

◆ nk_query_font_glyph_f

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)

Definition at line 3993 of file nuklear.h.

◆ nk_rune

typedef nk_uint nk_rune

Definition at line 209 of file nuklear.h.

◆ nk_short

typedef NK_INT16 nk_short

Definition at line 199 of file nuklear.h.

◆ nk_size

typedef NK_SIZE_TYPE nk_size

Definition at line 203 of file nuklear.h.

◆ nk_text_width_f

typedef float(* nk_text_width_f) (nk_handle, float h, const char *, int len)

Definition at line 3992 of file nuklear.h.

◆ nk_uchar

typedef NK_UINT8 nk_uchar

Definition at line 197 of file nuklear.h.

◆ nk_uint

typedef NK_UINT32 nk_uint

Definition at line 202 of file nuklear.h.

◆ nk_ushort

typedef NK_UINT16 nk_ushort

Definition at line 200 of file nuklear.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Definition at line 260 of file nuklear.h.

◆ nk_allocation_type

enum nk_allocation_type

Definition at line 4172 of file nuklear.h.

◆ nk_anti_aliasing

enum nk_anti_aliasing

Definition at line 966 of file nuklear.h.

◆ nk_buffer_allocation_type

enum nk_buffer_allocation_type

Definition at line 4177 of file nuklear.h.

◆ nk_button_behavior

enum nk_button_behavior

Definition at line 275 of file nuklear.h.

◆ nk_buttons

enum nk_buttons

Definition at line 589 of file nuklear.h.

◆ nk_chart_event

enum nk_chart_event

Definition at line 281 of file nuklear.h.

◆ nk_chart_type

enum nk_chart_type

Definition at line 280 of file nuklear.h.

◆ nk_collapse_states

enum nk_collapse_states

Definition at line 278 of file nuklear.h.

◆ nk_color_format

enum nk_color_format

Definition at line 282 of file nuklear.h.

◆ nk_command_clipping

enum nk_command_clipping

Definition at line 4627 of file nuklear.h.

◆ nk_command_type

enum nk_command_type

Definition at line 4444 of file nuklear.h.

◆ nk_convert_result

enum nk_convert_result

Definition at line 967 of file nuklear.h.

◆ nk_edit_events

Enumerator
NK_EDIT_INACTIVE 

!< edit widget is currently being modified

NK_EDIT_ACTIVATED 

!< edit widget is not active and is not being modified

NK_EDIT_DEACTIVATED 

!< edit widget went from state inactive to state active

NK_EDIT_COMMITED 

!< edit widget went from state active to state inactive

Definition at line 3501 of file nuklear.h.

◆ nk_edit_flags

enum nk_edit_flags

Definition at line 3480 of file nuklear.h.

◆ nk_edit_types

enum nk_edit_types

Definition at line 3495 of file nuklear.h.

◆ nk_heading

enum nk_heading

Definition at line 274 of file nuklear.h.

◆ nk_keys

enum nk_keys

Definition at line 554 of file nuklear.h.

◆ nk_layout_format

enum nk_layout_format

Definition at line 284 of file nuklear.h.

◆ nk_modify

enum nk_modify

Definition at line 276 of file nuklear.h.

◆ nk_orientation

enum nk_orientation

Definition at line 277 of file nuklear.h.

◆ nk_panel_flags

enum nk_panel_flags

Definition at line 1284 of file nuklear.h.

◆ nk_panel_row_layout_type

enum nk_panel_row_layout_type

Definition at line 5421 of file nuklear.h.

◆ nk_panel_set

enum nk_panel_set

Definition at line 5398 of file nuklear.h.

◆ nk_panel_type

enum nk_panel_type

Definition at line 5388 of file nuklear.h.

◆ nk_popup_type

enum nk_popup_type

Definition at line 283 of file nuklear.h.

◆ nk_show_states

enum nk_show_states

Definition at line 279 of file nuklear.h.

◆ nk_style_colors

enum nk_style_colors

Definition at line 3629 of file nuklear.h.

◆ nk_style_cursor

enum nk_style_cursor

Definition at line 3664 of file nuklear.h.

◆ nk_style_header_align

enum nk_style_header_align

Definition at line 5280 of file nuklear.h.

◆ nk_style_item_type

enum nk_style_item_type

Definition at line 4878 of file nuklear.h.

◆ nk_symbol_type

enum nk_symbol_type

Definition at line 298 of file nuklear.h.

◆ nk_text_align

enum nk_text_align

Definition at line 3115 of file nuklear.h.

◆ nk_text_alignment

enum nk_text_alignment

Definition at line 3123 of file nuklear.h.

◆ nk_text_edit_mode

enum nk_text_edit_mode

Definition at line 4339 of file nuklear.h.

◆ nk_text_edit_type

enum nk_text_edit_type

Definition at line 4334 of file nuklear.h.

◆ nk_tree_type

enum nk_tree_type

Definition at line 285 of file nuklear.h.

◆ nk_widget_align

enum nk_widget_align

Definition at line 2206 of file nuklear.h.

◆ nk_widget_alignment

enum nk_widget_alignment

Definition at line 2214 of file nuklear.h.

◆ nk_widget_layout_states

Enumerator
NK_WIDGET_INVALID 

The widget cannot be seen and is completely out of view.

NK_WIDGET_VALID 

The widget is completely inside the window and can be updated and drawn.

NK_WIDGET_ROM 

The widget is partially visible and cannot be updated.

NK_WIDGET_DISABLED 

The widget is manually disabled and acts like NK_WIDGET_ROM.

Definition at line 3081 of file nuklear.h.

◆ nk_widget_states

Enumerator
NK_WIDGET_STATE_ENTERED 

!< widget is neither active nor hovered

NK_WIDGET_STATE_HOVER 

!< widget has been hovered on the current frame

NK_WIDGET_STATE_ACTIVED 

!< widget is being hovered

NK_WIDGET_STATE_LEFT 

!< widget is currently activated

NK_WIDGET_STATE_HOVERED 

!< widget is from this frame on not hovered anymore

NK_WIDGET_STATE_ACTIVE 

!< widget is being hovered

Definition at line 3087 of file nuklear.h.

◆ nk_window_flags

Enumerator
NK_WINDOW_DYNAMIC 

special window type growing up in height while being filled to a certain maximum height

NK_WINDOW_ROM 

sets window widgets into a read only mode and does not allow input changes

NK_WINDOW_NOT_INTERACTIVE 

prevents all interaction caused by input to either window or widgets inside

NK_WINDOW_HIDDEN 

Hides window and stops any window interaction and drawing.

NK_WINDOW_CLOSED 

Directly closes and frees the window at the end of the frame.

NK_WINDOW_MINIMIZED 

marks the window as minimized

NK_WINDOW_REMOVE_ROM 

Removes read only mode at the end of the window.

Definition at line 5489 of file nuklear.h.

Function Documentation

◆ nk__begin()

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.

const struct nk_command* nk__begin(struct nk_context*);
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.
command base and header of every command inside the buffer
Definition nuklear.h:4467
Parameters
[in]ctx| must point to an previously initialized nk_context struct at the end of a frame
Returns
draw command pointer pointing to the first command inside the draw command list

Definition at line 310 of file nuklear_context.c.

References nk_context::build, nk_buffer::memory, and NK_WINDOW_HIDDEN.

◆ nk__next()

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.

const struct nk_command* nk__next(struct nk_context*, const struct nk_command*);
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.
Parameters
[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
Returns
draw command pointer pointing to the next command inside the draw command list

Definition at line 332 of file nuklear_context.c.

References nk_buffer::allocated, and nk_buffer::memory.

◆ nk_begin()

NK_API nk_bool nk_begin ( struct nk_context ctx,
const char *  title,
struct nk_rect  bounds,
nk_flags  flags 
)

# nk_begin

Starts a new window; needs to be called every frame for every window (unless hidden) or otherwise the window gets removed

nk_bool nk_begin(struct nk_context *ctx, const char *title, struct nk_rect bounds, nk_flags flags);
NK_API nk_bool nk_begin(struct nk_context *ctx, const char *title, struct nk_rect bounds, nk_flags flags)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]title
Window title and identifier. Needs to be persistent over frames to identify the window
Parameters
[in]bounds
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
Parameters
[in]flags
Window flags defined in the nk_panel_flags section with a number of different window behaviors
Returns
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_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 
)

# nk_begin_titled

Extended window start with separated title and identifier to allow multiple windows with same title but not name

nk_bool nk_begin_titled(struct nk_context *ctx, const char *name, 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)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]name
Window identifier. Needs to be persistent over frames to identify the window
Parameters
[in]title
Window title displayed inside header if flag NK_WINDOW_TITLE or either NK_WINDOW_CLOSABLE or NK_WINDOW_MINIMIZED was set
Parameters
[in]bounds
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
Parameters
[in]flags
Window flags defined in the nk_panel_flags section with a number of different window behaviors
Returns
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::height, NK_WINDOW_HIDDEN, NK_WINDOW_MINIMIZED, NK_WINDOW_ROM, and nk_user_font::width.

Referenced by nk_begin().

◆ nk_buffer_clear()

NK_API void nk_buffer_clear ( struct nk_buffer b)

Definition at line 225 of file nuklear_buffer.c.

◆ nk_buffer_free()

NK_API void nk_buffer_free ( struct nk_buffer b)

Definition at line 235 of file nuklear_buffer.c.

◆ nk_buffer_info()

NK_API void nk_buffer_info ( struct nk_memory_status s,
const struct nk_buffer b 
)

Definition at line 245 of file nuklear_buffer.c.

◆ nk_buffer_init()

NK_API void nk_buffer_init ( struct nk_buffer b,
const struct nk_allocator a,
nk_size  size 
)

Definition at line 35 of file nuklear_buffer.c.

◆ nk_buffer_init_fixed()

NK_API void nk_buffer_init_fixed ( struct nk_buffer b,
void *  memory,
nk_size  size 
)

Definition at line 52 of file nuklear_buffer.c.

◆ nk_buffer_mark()

NK_API void nk_buffer_mark ( struct nk_buffer buffer,
enum nk_buffer_allocation_type  type 
)

Definition at line 194 of file nuklear_buffer.c.

◆ nk_buffer_memory()

NK_API void * nk_buffer_memory ( struct nk_buffer buffer)

Definition at line 257 of file nuklear_buffer.c.

◆ nk_buffer_memory_const()

NK_API const void * nk_buffer_memory_const ( const struct nk_buffer buffer)

Definition at line 264 of file nuklear_buffer.c.

◆ nk_buffer_push()

NK_API void nk_buffer_push ( struct nk_buffer b,
enum nk_buffer_allocation_type  type,
const void *  memory,
nk_size  size,
nk_size  align 
)

Definition at line 186 of file nuklear_buffer.c.

◆ nk_buffer_reset()

NK_API void nk_buffer_reset ( struct nk_buffer buffer,
enum nk_buffer_allocation_type  type 
)

Definition at line 204 of file nuklear_buffer.c.

◆ nk_buffer_total()

NK_API nk_size nk_buffer_total ( const struct nk_buffer buffer)

Definition at line 271 of file nuklear_buffer.c.

◆ nk_button_color()

NK_API nk_bool nk_button_color ( struct nk_context ctx,
struct nk_color  color 
)

Definition at line 501 of file nuklear_button.c.

◆ nk_button_image()

NK_API nk_bool nk_button_image ( struct nk_context ctx,
struct nk_image  img 
)

Definition at line 594 of file nuklear_button.c.

◆ nk_button_image_label()

NK_API nk_bool nk_button_image_label ( struct nk_context ctx,
struct nk_image  img,
const char *  label,
nk_flags  text_alignment 
)

Definition at line 681 of file nuklear_button.c.

◆ nk_button_image_label_styled()

NK_API nk_bool nk_button_image_label_styled ( struct nk_context ctx,
const struct nk_style_button style,
struct nk_image  img,
const char *  label,
nk_flags  text_alignment 
)

Definition at line 686 of file nuklear_button.c.

◆ nk_button_image_styled()

NK_API nk_bool nk_button_image_styled ( struct nk_context ctx,
const struct nk_style_button style,
struct nk_image  img 
)

Definition at line 568 of file nuklear_button.c.

◆ nk_button_image_text()

NK_API nk_bool nk_button_image_text ( struct nk_context ctx,
struct nk_image  img,
const char *  text,
int  len,
nk_flags  alignment 
)

Definition at line 676 of file nuklear_button.c.

◆ nk_button_image_text_styled()

NK_API nk_bool nk_button_image_text_styled ( struct nk_context ctx,
const struct nk_style_button style,
struct nk_image  img,
const char *  text,
int  len,
nk_flags  alignment 
)

Definition at line 648 of file nuklear_button.c.

◆ nk_button_label()

NK_API nk_bool nk_button_label ( struct nk_context ctx,
const char *  title 
)

Definition at line 496 of file nuklear_button.c.

◆ nk_button_label_styled()

NK_API nk_bool nk_button_label_styled ( struct nk_context ctx,
const struct nk_style_button style,
const char *  title 
)

Definition at line 491 of file nuklear_button.c.

◆ nk_button_pop_behavior()

NK_API nk_bool nk_button_pop_behavior ( struct nk_context ctx)

Definition at line 440 of file nuklear_button.c.

◆ nk_button_push_behavior()

NK_API nk_bool nk_button_push_behavior ( struct nk_context ctx,
enum  nk_button_behavior 
)

Definition at line 420 of file nuklear_button.c.

◆ nk_button_set_behavior()

NK_API void nk_button_set_behavior ( struct nk_context ctx,
enum  nk_button_behavior 
)

Definition at line 413 of file nuklear_button.c.

◆ nk_button_symbol()

NK_API nk_bool nk_button_symbol ( struct nk_context ctx,
enum  nk_symbol_type 
)

Definition at line 561 of file nuklear_button.c.

◆ nk_button_symbol_label()

NK_API nk_bool nk_button_symbol_label ( struct nk_context ctx,
enum  nk_symbol_type,
const char *  label,
nk_flags  text_alignment 
)

Definition at line 636 of file nuklear_button.c.

◆ nk_button_symbol_label_styled()

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 
)

Definition at line 641 of file nuklear_button.c.

◆ nk_button_symbol_styled()

NK_API nk_bool nk_button_symbol_styled ( struct nk_context ctx,
const struct nk_style_button style,
enum  nk_symbol_type 
)

Definition at line 536 of file nuklear_button.c.

◆ nk_button_symbol_text()

NK_API nk_bool nk_button_symbol_text ( struct nk_context ctx,
enum  nk_symbol_type,
const char *  text,
int  len,
nk_flags  alignment 
)

Definition at line 629 of file nuklear_button.c.

◆ nk_button_symbol_text_styled()

NK_API nk_bool nk_button_symbol_text_styled ( struct nk_context ctx,
const struct nk_style_button style,
enum  nk_symbol_type,
const char *  text,
int  len,
nk_flags  alignment 
)

Definition at line 601 of file nuklear_button.c.

◆ nk_button_text()

NK_API nk_bool nk_button_text ( struct nk_context ctx,
const char *  title,
int  len 
)

Definition at line 485 of file nuklear_button.c.

◆ nk_button_text_styled()

NK_API nk_bool nk_button_text_styled ( struct nk_context ctx,
const struct nk_style_button style,
const char *  title,
int  len 
)

Definition at line 458 of file nuklear_button.c.

◆ nk_chart_add_slot()

NK_API void nk_chart_add_slot ( struct nk_context ctx,
const enum  nk_chart_type,
int  count,
float  min_value,
float  max_value 
)

Definition at line 112 of file nuklear_chart.c.

◆ nk_chart_add_slot_colored()

NK_API void nk_chart_add_slot_colored ( struct nk_context ctx,
const enum  nk_chart_type,
struct nk_color  color,
struct nk_color  active,
int  count,
float  min_value,
float  max_value 
)

Definition at line 84 of file nuklear_chart.c.

◆ nk_chart_begin()

NK_API nk_bool nk_chart_begin ( struct nk_context ctx,
enum  nk_chart_type,
int  num,
float  min,
float  max 
)

Definition at line 77 of file nuklear_chart.c.

◆ nk_chart_begin_colored()

NK_API nk_bool nk_chart_begin_colored ( struct nk_context ctx,
enum  nk_chart_type,
struct nk_color  color,
struct nk_color  active,
int  num,
float  min,
float  max 
)

Definition at line 10 of file nuklear_chart.c.

◆ nk_chart_end()

NK_API void nk_chart_end ( struct nk_context ctx)

Definition at line 270 of file nuklear_chart.c.

◆ nk_chart_push()

NK_API nk_flags nk_chart_push ( struct nk_context ctx,
float  value 
)

Definition at line 265 of file nuklear_chart.c.

◆ nk_chart_push_slot()

NK_API nk_flags nk_chart_push_slot ( struct nk_context ctx,
float  value,
int  slot 
)

Definition at line 239 of file nuklear_chart.c.

◆ nk_check_flags_label()

NK_API unsigned nk_check_flags_label ( struct nk_context ctx,
const char *  label,
unsigned int  flags,
unsigned int  value 
)

Definition at line 316 of file nuklear_toggle.c.

◆ nk_check_flags_text()

NK_API unsigned nk_check_flags_text ( struct nk_context ctx,
const char *  text,
int  len,
unsigned int  flags,
unsigned int  value 
)

Definition at line 257 of file nuklear_toggle.c.

◆ nk_check_label()

NK_API nk_bool nk_check_label ( struct nk_context ctx,
const char *  label,
nk_bool  active 
)

Definition at line 312 of file nuklear_toggle.c.

◆ nk_check_text()

NK_API nk_bool nk_check_text ( struct nk_context ctx,
const char *  text,
int  len,
nk_bool  active 
)

Definition at line 201 of file nuklear_toggle.c.

◆ nk_check_text_align()

NK_API nk_bool nk_check_text_align ( struct nk_context ctx,
const char *  text,
int  len,
nk_bool  active,
nk_flags  widget_alignment,
nk_flags  text_alignment 
)

Definition at line 229 of file nuklear_toggle.c.

◆ nk_checkbox_flags_label()

NK_API nk_bool nk_checkbox_flags_label ( struct nk_context ctx,
const char *  label,
unsigned int *  flags,
unsigned int  value 
)

Definition at line 329 of file nuklear_toggle.c.

◆ nk_checkbox_flags_text()

NK_API nk_bool nk_checkbox_flags_text ( struct nk_context ctx,
const char *  text,
int  len,
unsigned int *  flags,
unsigned int  value 
)

Definition at line 295 of file nuklear_toggle.c.

◆ nk_checkbox_label()

NK_API nk_bool nk_checkbox_label ( struct nk_context ctx,
const char *  label,
nk_bool *  active 
)

Definition at line 321 of file nuklear_toggle.c.

◆ nk_checkbox_label_align()

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 
)

Definition at line 325 of file nuklear_toggle.c.

◆ nk_checkbox_text()

NK_API nk_bool nk_checkbox_text ( struct nk_context ctx,
const char *  text,
int  len,
nk_bool *  active 
)

Definition at line 271 of file nuklear_toggle.c.

◆ nk_checkbox_text_align()

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 
)

Definition at line 283 of file nuklear_toggle.c.

◆ nk_clear()

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.

void nk_clear(struct nk_context *ctx);
NK_API void nk_clear(struct nk_context *)
Resets the context state at the end of the frame.
Parameters
[in]ctxMust point to a previously initialized nk_context struct

Definition at line 110 of file nuklear_context.c.

References nk_context::build, nk_buffer::calls, NK_WINDOW_CLOSED, NK_WINDOW_HIDDEN, NK_WINDOW_MINIMIZED, NK_WINDOW_ROM, and nk_context::overlay.

◆ nk_color_cf()

NK_API struct nk_colorf nk_color_cf ( struct nk_color  in)

Definition at line 288 of file nuklear_color.c.

◆ nk_color_d()

NK_API void nk_color_d ( double *  r,
double *  g,
double *  b,
double *  a,
struct nk_color  in 
)

Definition at line 295 of file nuklear_color.c.

◆ nk_color_dv()

NK_API void nk_color_dv ( double *  rgba_out,
struct nk_color  in 
)

Definition at line 304 of file nuklear_color.c.

◆ nk_color_f()

NK_API void nk_color_f ( float *  r,
float *  g,
float *  b,
float *  a,
struct nk_color  in 
)

Definition at line 274 of file nuklear_color.c.

◆ nk_color_fv()

NK_API void nk_color_fv ( float *  rgba_out,
struct nk_color  in 
)

Definition at line 283 of file nuklear_color.c.

◆ nk_color_hex_rgb()

NK_API void nk_color_hex_rgb ( char *  output,
struct nk_color  col 
)

Definition at line 85 of file nuklear_color.c.

◆ nk_color_hex_rgba()

NK_API void nk_color_hex_rgba ( char *  output,
struct nk_color  col 
)

Definition at line 70 of file nuklear_color.c.

◆ nk_color_hsv_b()

NK_API void nk_color_hsv_b ( nk_byte *  out_h,
nk_byte *  out_s,
nk_byte *  out_v,
struct nk_color  in 
)

Definition at line 402 of file nuklear_color.c.

◆ nk_color_hsv_bv()

NK_API void nk_color_hsv_bv ( nk_byte *  hsv_out,
struct nk_color  in 
)

Definition at line 416 of file nuklear_color.c.

◆ nk_color_hsv_f()

NK_API void nk_color_hsv_f ( float *  out_h,
float *  out_s,
float *  out_v,
struct nk_color  in 
)

Definition at line 309 of file nuklear_color.c.

◆ nk_color_hsv_fv()

NK_API void nk_color_hsv_fv ( float *  hsv_out,
struct nk_color  in 
)

Definition at line 315 of file nuklear_color.c.

◆ nk_color_hsv_i()

NK_API void nk_color_hsv_i ( int *  out_h,
int *  out_s,
int *  out_v,
struct nk_color  in 
)

Definition at line 396 of file nuklear_color.c.

◆ nk_color_hsv_iv()

NK_API void nk_color_hsv_iv ( int *  hsv_out,
struct nk_color  in 
)

Definition at line 411 of file nuklear_color.c.

◆ nk_color_hsva_b()

NK_API void nk_color_hsva_b ( nk_byte *  h,
nk_byte *  s,
nk_byte *  v,
nk_byte *  a,
struct nk_color  in 
)

Definition at line 386 of file nuklear_color.c.

◆ nk_color_hsva_bv()

NK_API void nk_color_hsva_bv ( nk_byte *  hsva_out,
struct nk_color  in 
)

Definition at line 376 of file nuklear_color.c.

◆ nk_color_hsva_f()

NK_API void nk_color_hsva_f ( float *  out_h,
float *  out_s,
float *  out_v,
float *  out_a,
struct nk_color  in 
)

Definition at line 347 of file nuklear_color.c.

◆ nk_color_hsva_fv()

NK_API void nk_color_hsva_fv ( float *  hsva_out,
struct nk_color  in 
)

Definition at line 355 of file nuklear_color.c.

◆ nk_color_hsva_i()

NK_API void nk_color_hsva_i ( int *  h,
int *  s,
int *  v,
int *  a,
struct nk_color  in 
)

Definition at line 360 of file nuklear_color.c.

◆ nk_color_hsva_iv()

NK_API void nk_color_hsva_iv ( int *  hsva_out,
struct nk_color  in 
)

Definition at line 371 of file nuklear_color.c.

◆ nk_color_pick()

NK_API nk_bool nk_color_pick ( struct nk_context ctx,
struct nk_colorf color,
enum  nk_color_format 
)

Definition at line 167 of file nuklear_color_picker.c.

◆ nk_color_picker()

NK_API struct nk_colorf nk_color_picker ( struct nk_context ctx,
struct nk_colorf  color,
enum  nk_color_format 
)

Definition at line 195 of file nuklear_color_picker.c.

◆ nk_color_u32()

NK_API nk_uint nk_color_u32 ( struct nk_color  in)

Definition at line 265 of file nuklear_color.c.

◆ nk_colorf_hsva_f()

NK_API void nk_colorf_hsva_f ( float *  out_h,
float *  out_s,
float *  out_v,
float *  out_a,
struct nk_colorf  in 
)

Definition at line 321 of file nuklear_color.c.

◆ nk_colorf_hsva_fv()

NK_API void nk_colorf_hsva_fv ( float *  hsva,
struct nk_colorf  in 
)

Definition at line 342 of file nuklear_color.c.

◆ nk_combo()

NK_API int nk_combo ( struct nk_context ctx,
const char *const *  items,
int  count,
int  selected,
int  item_height,
struct nk_vec2  size 
)

Definition at line 705 of file nuklear_combo.c.

◆ nk_combo_begin_color()

NK_API nk_bool nk_combo_begin_color ( struct nk_context ctx,
struct nk_color  color,
struct nk_vec2  size 
)

Definition at line 157 of file nuklear_combo.c.

◆ nk_combo_begin_image()

NK_API nk_bool nk_combo_begin_image ( struct nk_context ctx,
struct nk_image  img,
struct nk_vec2  size 
)

Definition at line 451 of file nuklear_combo.c.

◆ nk_combo_begin_image_label()

NK_API nk_bool nk_combo_begin_image_label ( struct nk_context ctx,
const char *  selected,
struct nk_image  img,
struct nk_vec2  size 
)

Definition at line 657 of file nuklear_combo.c.

◆ nk_combo_begin_image_text()

NK_API nk_bool nk_combo_begin_image_text ( struct nk_context ctx,
const char *  selected,
int  len,
struct nk_image  img,
struct nk_vec2  size 
)

Definition at line 542 of file nuklear_combo.c.

◆ nk_combo_begin_label()

NK_API nk_bool nk_combo_begin_label ( struct nk_context ctx,
const char *  selected,
struct nk_vec2  size 
)

Definition at line 152 of file nuklear_combo.c.

◆ nk_combo_begin_symbol()

NK_API nk_bool nk_combo_begin_symbol ( struct nk_context ctx,
enum  nk_symbol_type,
struct nk_vec2  size 
)

Definition at line 248 of file nuklear_combo.c.

◆ nk_combo_begin_symbol_label()

NK_API nk_bool nk_combo_begin_symbol_label ( struct nk_context ctx,
const char *  selected,
enum  nk_symbol_type,
struct nk_vec2  size 
)

Definition at line 651 of file nuklear_combo.c.

◆ nk_combo_begin_symbol_text()

NK_API nk_bool nk_combo_begin_symbol_text ( struct nk_context ctx,
const char *  selected,
int  len,
enum  nk_symbol_type,
struct nk_vec2  size 
)

Definition at line 344 of file nuklear_combo.c.

◆ nk_combo_begin_text()

NK_API nk_bool nk_combo_begin_text ( struct nk_context ctx,
const char *  selected,
int  len,
struct nk_vec2  size 
)

Definition at line 44 of file nuklear_combo.c.

◆ nk_combo_callback()

NK_API int nk_combo_callback ( struct nk_context ctx,
void(*)(void *, int, const char **)  item_getter,
void *  userdata,
int  selected,
int  count,
int  item_height,
struct nk_vec2  size 
)

Definition at line 790 of file nuklear_combo.c.

◆ nk_combo_close()

NK_API void nk_combo_close ( struct nk_context ctx)

Definition at line 700 of file nuklear_combo.c.

◆ nk_combo_end()

NK_API void nk_combo_end ( struct nk_context ctx)

Definition at line 696 of file nuklear_combo.c.

◆ nk_combo_item_image_label()

NK_API nk_bool nk_combo_item_image_label ( struct nk_context ctx,
struct nk_image  img,
const char *  text,
nk_flags  alignment 
)

Definition at line 679 of file nuklear_combo.c.

◆ nk_combo_item_image_text()

NK_API nk_bool nk_combo_item_image_text ( struct nk_context ctx,
struct nk_image  img,
const char *  text,
int  len,
nk_flags  alignment 
)

Definition at line 673 of file nuklear_combo.c.

◆ nk_combo_item_label()

NK_API nk_bool nk_combo_item_label ( struct nk_context ctx,
const char *  label,
nk_flags  alignment 
)

Definition at line 668 of file nuklear_combo.c.

◆ nk_combo_item_symbol_label()

NK_API nk_bool nk_combo_item_symbol_label ( struct nk_context ctx,
enum  nk_symbol_type,
const char *  label,
nk_flags  alignment 
)

Definition at line 691 of file nuklear_combo.c.

◆ nk_combo_item_symbol_text()

NK_API nk_bool nk_combo_item_symbol_text ( struct nk_context ctx,
enum  nk_symbol_type,
const char *  text,
int  len,
nk_flags  alignment 
)

Definition at line 685 of file nuklear_combo.c.

◆ nk_combo_item_text()

NK_API nk_bool nk_combo_item_text ( struct nk_context ctx,
const char *  text,
int  len,
nk_flags  alignment 
)

Definition at line 663 of file nuklear_combo.c.

◆ nk_combo_separator()

NK_API int nk_combo_separator ( struct nk_context ctx,
const char *  items_separated_by_separator,
int  separator,
int  selected,
int  count,
int  item_height,
struct nk_vec2  size 
)

Definition at line 735 of file nuklear_combo.c.

◆ nk_combo_string()

NK_API int nk_combo_string ( struct nk_context ctx,
const char *  items_separated_by_zeros,
int  selected,
int  count,
int  item_height,
struct nk_vec2  size 
)

Definition at line 784 of file nuklear_combo.c.

◆ nk_combobox()

NK_API void nk_combobox ( struct nk_context ctx,
const char *const *  items,
int  count,
int *  selected,
int  item_height,
struct nk_vec2  size 
)

Definition at line 823 of file nuklear_combo.c.

◆ nk_combobox_separator()

NK_API void nk_combobox_separator ( struct nk_context ctx,
const char *  items_separated_by_separator,
int  separator,
int *  selected,
int  count,
int  item_height,
struct nk_vec2  size 
)

Definition at line 835 of file nuklear_combo.c.

◆ nk_combobox_string()

NK_API void nk_combobox_string ( struct nk_context ctx,
const char *  items_separated_by_zeros,
int *  selected,
int  count,
int  item_height,
struct nk_vec2  size 
)

Definition at line 829 of file nuklear_combo.c.

◆ nk_contextual_begin()

NK_API nk_bool nk_contextual_begin ( struct nk_context ctx,
nk_flags  flags,
struct nk_vec2  size,
struct nk_rect  trigger_bounds 
)

Definition at line 10 of file nuklear_contextual.c.

◆ nk_contextual_close()

NK_API void nk_contextual_close ( struct nk_context ctx)

Definition at line 181 of file nuklear_contextual.c.

◆ nk_contextual_end()

NK_API void nk_contextual_end ( struct nk_context ctx)

Definition at line 190 of file nuklear_contextual.c.

◆ nk_contextual_item_image_label()

NK_API nk_bool nk_contextual_item_image_label ( struct nk_context ctx,
struct nk_image  img,
const char *  label,
nk_flags  alignment 
)

Definition at line 139 of file nuklear_contextual.c.

◆ nk_contextual_item_image_text()

NK_API nk_bool nk_contextual_item_image_text ( struct nk_context ctx,
struct nk_image  img,
const char *  text,
int  len,
nk_flags  alignment 
)

Definition at line 109 of file nuklear_contextual.c.

◆ nk_contextual_item_label()

NK_API nk_bool nk_contextual_item_label ( struct nk_context ctx,
const char *  label,
nk_flags  align 
)

Definition at line 104 of file nuklear_contextual.c.

◆ nk_contextual_item_symbol_label()

NK_API nk_bool nk_contextual_item_symbol_label ( struct nk_context ctx,
enum  nk_symbol_type,
const char *  text,
nk_flags  alignment 
)

Definition at line 175 of file nuklear_contextual.c.

◆ nk_contextual_item_symbol_text()

NK_API nk_bool nk_contextual_item_symbol_text ( struct nk_context ctx,
enum  nk_symbol_type,
const char *  text,
int  len,
nk_flags  alignment 
)

Definition at line 145 of file nuklear_contextual.c.

◆ nk_contextual_item_text()

NK_API nk_bool nk_contextual_item_text ( struct nk_context ctx,
const char *  text,
int  len,
nk_flags  align 
)

Definition at line 74 of file nuklear_contextual.c.

◆ nk_draw_image()

NK_API void nk_draw_image ( struct nk_command_buffer b,
struct nk_rect  r,
const struct nk_image img,
struct nk_color  col 
)

misc

Definition at line 395 of file nuklear_draw.c.

◆ nk_draw_nine_slice()

NK_API void nk_draw_nine_slice ( struct nk_command_buffer b,
struct nk_rect  r,
const struct nk_nine_slice slc,
struct nk_color  col 
)

Definition at line 418 of file nuklear_draw.c.

◆ nk_draw_text()

NK_API void nk_draw_text ( struct nk_command_buffer b,
struct nk_rect  r,
const char *  text,
int  len,
const struct nk_user_font font,
struct nk_color  bg,
struct nk_color  fg 
)

Definition at line 518 of file nuklear_draw.c.

◆ nk_edit_buffer()

NK_API nk_flags nk_edit_buffer ( struct nk_context ctx,
nk_flags  flags,
struct nk_text_edit edit,
nk_plugin_filter  filter 
)

Definition at line 764 of file nuklear_edit.c.

◆ nk_edit_focus()

NK_API void nk_edit_focus ( struct nk_context ctx,
nk_flags  flags 
)

Definition at line 679 of file nuklear_edit.c.

◆ nk_edit_string()

NK_API nk_flags nk_edit_string ( struct nk_context ctx,
nk_flags  flags,
char *  buffer,
int *  len,
int  max,
nk_plugin_filter  filter 
)

Definition at line 708 of file nuklear_edit.c.

◆ nk_edit_string_zero_terminated()

NK_API nk_flags nk_edit_string_zero_terminated ( struct nk_context ctx,
nk_flags  flags,
char *  buffer,
int  max,
nk_plugin_filter  filter 
)

Definition at line 827 of file nuklear_edit.c.

◆ nk_edit_unfocus()

NK_API void nk_edit_unfocus ( struct nk_context ctx)

Definition at line 696 of file nuklear_edit.c.

◆ nk_end()

NK_API void nk_end ( struct nk_context ctx)

# nk_end

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

void nk_end(struct nk_context *ctx);
NK_API void nk_end(struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct

Definition at line 297 of file nuklear_window.c.

References NK_WINDOW_HIDDEN.

Referenced by nk_group_scrolled_end().

◆ nk_fill_arc()

NK_API void nk_fill_arc ( struct nk_command_buffer b,
float  cx,
float  cy,
float  radius,
float  a_min,
float  a_max,
struct nk_color  c 
)

Definition at line 261 of file nuklear_draw.c.

◆ nk_fill_circle()

NK_API void nk_fill_circle ( struct nk_command_buffer b,
struct nk_rect  r,
struct nk_color  c 
)

Definition at line 223 of file nuklear_draw.c.

◆ nk_fill_polygon()

NK_API void nk_fill_polygon ( struct nk_command_buffer b,
const float *  points,
int  point_count,
struct nk_color  col 
)

Definition at line 353 of file nuklear_draw.c.

◆ nk_fill_rect()

NK_API void nk_fill_rect ( struct nk_command_buffer b,
struct nk_rect  rect,
float  rounding,
struct nk_color  c 
)

filled shades

Definition at line 152 of file nuklear_draw.c.

Referenced by nk_rule_horizontal().

◆ nk_fill_rect_multi_color()

NK_API void nk_fill_rect_multi_color ( struct nk_command_buffer b,
struct nk_rect  rect,
struct nk_color  left,
struct nk_color  top,
struct nk_color  right,
struct nk_color  bottom 
)

Definition at line 175 of file nuklear_draw.c.

◆ nk_fill_triangle()

NK_API void nk_fill_triangle ( struct nk_command_buffer b,
float  x0,
float  y0,
float  x1,
float  y1,
float  x2,
float  y2,
struct nk_color  c 
)

Definition at line 305 of file nuklear_draw.c.

◆ nk_filter_ascii()

NK_API nk_bool nk_filter_ascii ( const struct nk_text_edit box,
nk_rune  unicode 
)

Definition at line 17 of file nuklear_edit.c.

◆ nk_filter_binary()

NK_API nk_bool nk_filter_binary ( const struct nk_text_edit box,
nk_rune  unicode 
)

Definition at line 58 of file nuklear_edit.c.

◆ nk_filter_decimal()

NK_API nk_bool nk_filter_decimal ( const struct nk_text_edit box,
nk_rune  unicode 
)

Definition at line 32 of file nuklear_edit.c.

◆ nk_filter_default()

NK_API nk_bool nk_filter_default ( const struct nk_text_edit box,
nk_rune  unicode 
)

filter function

Definition at line 10 of file nuklear_edit.c.

References nk_filter_default().

Referenced by nk_filter_default().

◆ nk_filter_float()

NK_API nk_bool nk_filter_float ( const struct nk_text_edit box,
nk_rune  unicode 
)

Definition at line 24 of file nuklear_edit.c.

◆ nk_filter_hex()

NK_API nk_bool nk_filter_hex ( const struct nk_text_edit box,
nk_rune  unicode 
)

Definition at line 40 of file nuklear_edit.c.

◆ nk_filter_oct()

NK_API nk_bool nk_filter_oct ( const struct nk_text_edit box,
nk_rune  unicode 
)

Definition at line 50 of file nuklear_edit.c.

◆ nk_free()

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.

void nk_free(struct nk_context *ctx);
NK_API void nk_free(struct nk_context *)
Frees all memory allocated by nuklear; Not needed if context was initialized with nk_init_fixed.
Parameters
[in]ctxMust point to a previously initialized nk_context struct

Definition at line 88 of file nuklear_context.c.

References nk_context::build.

◆ nk_get_null_rect()

NK_API struct nk_rect nk_get_null_rect ( void  )

Definition at line 206 of file nuklear_math.c.

◆ nk_group_begin()

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.

nk_bool nk_group_begin(struct nk_context*, const char *title, nk_flags);
NK_API nk_bool nk_group_begin(struct nk_context *, const char *title, nk_flags)
Starts a new widget group.
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]title
Must be an unique identifier for this group that is also used for the group header
Parameters
[in]flags
Window flags defined in the nk_panel_flags section with a number of different group behaviors
Returns
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_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.

nk_bool nk_group_begin_titled(struct nk_context*, const char *name, const char *title, nk_flags);
NK_API nk_bool nk_group_begin_titled(struct nk_context *, const char *name, const char *title, nk_flags)
Starts a new widget group.
Parameters
[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
Returns
true(1) if visible and fillable with widgets or false(0) otherwise

Definition at line 127 of file nuklear_group.c.

References nk_group_scrolled_offset_begin().

Referenced by nk_group_begin().

◆ nk_group_end()

NK_API void nk_group_end ( struct nk_context ctx)

# nk_group_end

Ends a widget group

void nk_group_end(struct nk_context*);
NK_API void nk_group_end(struct nk_context *)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct

Definition at line 165 of file nuklear_group.c.

References nk_group_scrolled_end().

◆ nk_group_get_scroll()

NK_API void nk_group_get_scroll ( struct nk_context ctx,
const char *  id,
nk_uint *  x_offset,
nk_uint *  y_offset 
)

# nk_group_get_scroll

Gets the scroll position of the given group.

void nk_group_get_scroll(struct nk_context*, const char *id, nk_uint *x_offset, nk_uint *y_offset);
NK_API void nk_group_get_scroll(struct nk_context *, const char *id, nk_uint *x_offset, nk_uint *y_offset)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]id
The id of the group to get the scroll position of
Parameters
[in]x_offset
A pointer to the x offset output (or NULL to ignore)
Parameters
[in]y_offset
A pointer to the y offset output (or NULL to ignore)

Definition at line 170 of file nuklear_group.c.

◆ nk_group_scrolled_begin()

NK_API nk_bool nk_group_scrolled_begin ( struct nk_context ctx,
struct nk_scroll off,
const char *  title,
nk_flags  flags 
)

# nk_group_scrolled_begin

Starts a new widget group. requires a previous layouting function to specify a size. Does not keep track of scrollbar.

nk_bool nk_group_scrolled_begin(struct nk_context*, struct nk_scroll *off, const char *title, nk_flags);
NK_API nk_bool nk_group_scrolled_begin(struct nk_context *, struct nk_scroll *off, const char *title, nk_flags)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]off
Both x- and y- scroll offset. Allows for manual scrollbar control
Parameters
[in]title
Window unique group title used to both identify and display in the group header
Parameters
[in]flags
Window flags from nk_panel_flags section
Returns
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_group_scrolled_end()

NK_API void nk_group_scrolled_end ( struct nk_context ctx)

# nk_group_scrolled_end

Ends a widget group after calling nk_group_scrolled_offset_begin or nk_group_scrolled_begin.

NK_API void nk_group_scrolled_end(struct nk_context *)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct

Definition at line 59 of file nuklear_group.c.

References nk_end().

Referenced by nk_group_end(), and nk_group_scrolled_offset_begin().

◆ nk_group_scrolled_offset_begin()

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 
)

# nk_group_scrolled_offset_begin

starts a new widget group. requires a previous layouting function to specify a size. Does not keep track of scrollbar.

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_offset_begin(struct nk_context *, nk_uint *x_offset, nk_uint *y_offset, const char *title, nk_flags flags)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]x_offset
Scrollbar x-offset to offset all widgets inside the group horizontally.
Parameters
[in]y_offset
Scrollbar y-offset to offset all widgets inside the group vertically
Parameters
[in]title
Window unique group title used to both identify and display in the group header
Parameters
[in]flags
Window flags from the nk_panel_flags section
Returns
true(1) if visible and fillable with widgets or false(0) otherwise

Definition at line 10 of file nuklear_group.c.

References nk_group_scrolled_end(), nk_group_scrolled_offset_begin(), NK_WINDOW_CLOSED, NK_WINDOW_MINIMIZED, and NK_WINDOW_ROM.

Referenced by nk_group_begin_titled(), nk_group_scrolled_begin(), and nk_group_scrolled_offset_begin().

◆ nk_group_set_scroll()

NK_API void nk_group_set_scroll ( struct nk_context ctx,
const char *  id,
nk_uint  x_offset,
nk_uint  y_offset 
)

# nk_group_set_scroll

Sets the scroll position of the given group.

void nk_group_set_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)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]id
The id of the group to scroll
Parameters
[in]x_offset
The x offset to scroll to
Parameters
[in]y_offset
The y offset to scroll to

Definition at line 205 of file nuklear_group.c.

◆ nk_handle_id()

NK_API nk_handle nk_handle_id ( int  id)

Definition at line 17 of file nuklear_image.c.

◆ nk_handle_ptr()

NK_API nk_handle nk_handle_ptr ( void *  ptr)

Definition at line 10 of file nuklear_image.c.

◆ nk_hsv()

NK_API struct nk_color nk_hsv ( int  h,
int  s,
int  v 
)

Definition at line 178 of file nuklear_color.c.

◆ nk_hsv_bv()

NK_API struct nk_color nk_hsv_bv ( const nk_byte *  hsv)

Definition at line 188 of file nuklear_color.c.

◆ nk_hsv_f()

NK_API struct nk_color nk_hsv_f ( float  h,
float  s,
float  v 
)

Definition at line 193 of file nuklear_color.c.

◆ nk_hsv_fv()

NK_API struct nk_color nk_hsv_fv ( const float *  hsv)

Definition at line 198 of file nuklear_color.c.

◆ nk_hsv_iv()

NK_API struct nk_color nk_hsv_iv ( const int *  hsv)

Definition at line 183 of file nuklear_color.c.

◆ nk_hsva()

NK_API struct nk_color nk_hsva ( int  h,
int  s,
int  v,
int  a 
)

Definition at line 203 of file nuklear_color.c.

◆ nk_hsva_bv()

NK_API struct nk_color nk_hsva_bv ( const nk_byte *  hsva)

Definition at line 217 of file nuklear_color.c.

◆ nk_hsva_colorf()

NK_API struct nk_colorf nk_hsva_colorf ( float  h,
float  s,
float  v,
float  a 
)

Definition at line 222 of file nuklear_color.c.

◆ nk_hsva_colorfv()

NK_API struct nk_colorf nk_hsva_colorfv ( const float *  c)

Definition at line 249 of file nuklear_color.c.

◆ nk_hsva_f()

NK_API struct nk_color nk_hsva_f ( float  h,
float  s,
float  v,
float  a 
)

Definition at line 254 of file nuklear_color.c.

◆ nk_hsva_fv()

NK_API struct nk_color nk_hsva_fv ( const float *  hsva)

Definition at line 260 of file nuklear_color.c.

◆ nk_hsva_iv()

NK_API struct nk_color nk_hsva_iv ( const int *  hsva)

Definition at line 212 of file nuklear_color.c.

◆ nk_image()

NK_API void nk_image ( struct nk_context ctx,
struct nk_image  img 
)

Definition at line 110 of file nuklear_image.c.

◆ nk_image_color()

NK_API void nk_image_color ( struct nk_context ctx,
struct nk_image  img,
struct nk_color  col 
)

Definition at line 125 of file nuklear_image.c.

◆ nk_image_handle()

NK_API struct nk_image nk_image_handle ( nk_handle  handle)

Definition at line 64 of file nuklear_image.c.

◆ nk_image_id()

NK_API struct nk_image nk_image_id ( int  id)

Definition at line 91 of file nuklear_image.c.

◆ nk_image_is_subimage()

NK_API nk_bool nk_image_is_subimage ( const struct nk_image img)

Definition at line 104 of file nuklear_image.c.

◆ nk_image_ptr()

NK_API struct nk_image nk_image_ptr ( void *  ptr)

Definition at line 77 of file nuklear_image.c.

◆ nk_init()

NK_API nk_bool nk_init ( struct nk_context ctx,
const struct nk_allocator alloc,
const struct nk_user_font font 
)

nk_init

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.

nk_bool nk_init(struct nk_context *ctx, const struct nk_allocator *alloc, const struct nk_user_font *font);
NK_API nk_bool nk_init(struct nk_context *, const struct nk_allocator *, const struct nk_user_font *)
Parameter Description
Parameters
[in]ctx
Must point to an either stack or heap allocated nk_context struct
Parameters
[in]alloc
Must point to a previously allocated memory allocator
Parameters
[in]font
Must point to a previously initialized font handle for more info look at font documentation
Returns
either false(0) on failure or true(1) on success.

Definition at line 66 of file nuklear_context.c.

◆ nk_init_custom()

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.

nk_bool nk_init_custom(struct nk_context *ctx, struct nk_buffer *cmds, struct nk_buffer *pool, const struct nk_user_font *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.
Parameters
[in]ctxMust point to an either stack or heap allocated nk_context struct
[in]cmdsMust point to a previously initialized memory buffer either fixed or dynamic to store draw commands into
[in]poolMust point to a previously initialized memory buffer either fixed or dynamic to store windows, panels and tables
[in]fontMust point to a previously initialized font handle for more info look at font documentation
Returns
either false(0) on failure or true(1) on success.

Definition at line 45 of file nuklear_context.c.

References nk_buffer::memory, nk_buffer::pool, and nk_buffer::type.

◆ nk_init_fixed()

NK_API nk_bool nk_init_fixed ( struct nk_context ctx,
void *  memory,
nk_size  size,
const struct nk_user_font font 
)

nk_init_fixed

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.

nk_bool nk_init_fixed(struct nk_context *ctx, void *memory, nk_size size, const struct nk_user_font *font);
NK_API nk_bool nk_init_fixed(struct nk_context *, void *memory, nk_size size, const struct nk_user_font *)

!!! Warning make sure the passed memory block is aligned correctly for nk_draw_commands.

Parameter Description
Parameters
[in]ctx
Must point to an either stack or heap allocated nk_context struct
Parameters
[in]memory
Must point to a previously allocated memory block
Parameters
[in]size
Must contain the total size of memory
Parameters
[in]font
Must point to a previously initialized font handle for more info look at font documentation
Returns
either false(0) on failure or true(1) on success.

Definition at line 34 of file nuklear_context.c.

◆ nk_input_any_mouse_click_in_rect()

NK_API nk_bool nk_input_any_mouse_click_in_rect ( const struct nk_input in,
struct nk_rect  b 
)

Definition at line 207 of file nuklear_input.c.

◆ nk_input_begin()

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.

void nk_input_begin(struct nk_context*);
NK_API void nk_input_begin(struct nk_context *)
Begins the input mirroring process by resetting text, scroll mouse, previous mouse position and movem...
Parameters
[in]ctxMust point to a previously initialized nk_context struct

Definition at line 10 of file nuklear_input.c.

References nk_input_begin().

Referenced by nk_input_begin().

◆ nk_input_button()

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.

void nk_input_button(struct nk_context *ctx, enum nk_buttons btn, int x, int y, nk_bool down);
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.
Parameters
[in]ctxMust point to a previously initialized nk_context struct
[in]btnMust be any value specified in enum nk_buttons that needs to be mirrored
[in]xMust contain an integer describing mouse cursor x-position on click up/down
[in]yMust contain an integer describing mouse cursor y-position on click up/down
[in]downMust be 0 for key is up and 1 for key is down

Definition at line 72 of file nuklear_input.c.

◆ nk_input_char()

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.

Note
Stores up to NK_INPUT_MAX bytes between nk_input_begin and nk_input_end.
void nk_input_char(struct nk_context *ctx, char c);
NK_API void nk_input_char(struct nk_context *, char)
Copies a single ASCII character into an internal text buffer.
Parameters
[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.

References nk_input_glyph().

◆ nk_input_end()

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.

void nk_input_end(struct nk_context *ctx);
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 g...
Parameters
[in]ctx| Must point to a previously initialized nk_context struct

Definition at line 30 of file nuklear_input.c.

◆ nk_input_glyph()

NK_API void nk_input_glyph ( struct nk_context ctx,
const nk_glyph  glyph 
)

Converts an encoded unicode rune into UTF-8 and copies the result into an internal text buffer.

Note
Stores up to NK_INPUT_MAX bytes between nk_input_begin and nk_input_end.
void nk_input_glyph(struct nk_context *ctx, const nk_glyph g);
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.
Parameters
[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.

References NK_UTF_SIZE.

Referenced by nk_input_char(), and nk_input_unicode().

◆ nk_input_has_mouse_click()

NK_API nk_bool nk_input_has_mouse_click ( const struct nk_input i,
enum  nk_buttons 
)

Definition at line 143 of file nuklear_input.c.

◆ nk_input_has_mouse_click_down_in_rect()

NK_API nk_bool nk_input_has_mouse_click_down_in_rect ( const struct nk_input i,
enum  nk_buttons,
struct nk_rect  b,
nk_bool  down 
)

Definition at line 178 of file nuklear_input.c.

◆ nk_input_has_mouse_click_in_button_rect()

NK_API nk_bool nk_input_has_mouse_click_in_button_rect ( const struct nk_input i,
enum  nk_buttons,
struct nk_rect  b 
)

Definition at line 162 of file nuklear_input.c.

◆ nk_input_has_mouse_click_in_rect()

NK_API nk_bool nk_input_has_mouse_click_in_rect ( const struct nk_input i,
enum  nk_buttons,
struct nk_rect  b 
)

Definition at line 151 of file nuklear_input.c.

◆ nk_input_is_key_down()

NK_API nk_bool nk_input_is_key_down ( const struct nk_input i,
enum  nk_keys 
)

Definition at line 276 of file nuklear_input.c.

◆ nk_input_is_key_pressed()

NK_API nk_bool nk_input_is_key_pressed ( const struct nk_input i,
enum  nk_keys 
)

Definition at line 256 of file nuklear_input.c.

◆ nk_input_is_key_released()

NK_API nk_bool nk_input_is_key_released ( const struct nk_input i,
enum  nk_keys 
)

Definition at line 266 of file nuklear_input.c.

◆ nk_input_is_mouse_click_down_in_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 
)

Definition at line 197 of file nuklear_input.c.

◆ nk_input_is_mouse_click_in_rect()

NK_API nk_bool nk_input_is_mouse_click_in_rect ( const struct nk_input i,
enum  nk_buttons,
struct nk_rect  b 
)

Definition at line 187 of file nuklear_input.c.

◆ nk_input_is_mouse_down()

NK_API nk_bool nk_input_is_mouse_down ( const struct nk_input i,
enum  nk_buttons 
)

Definition at line 234 of file nuklear_input.c.

◆ nk_input_is_mouse_hovering_rect()

NK_API nk_bool nk_input_is_mouse_hovering_rect ( const struct nk_input i,
struct nk_rect  rect 
)

Definition at line 215 of file nuklear_input.c.

◆ nk_input_is_mouse_pressed()

NK_API nk_bool nk_input_is_mouse_pressed ( const struct nk_input i,
enum  nk_buttons 
)

Definition at line 240 of file nuklear_input.c.

◆ nk_input_is_mouse_prev_hovering_rect()

NK_API nk_bool nk_input_is_mouse_prev_hovering_rect ( const struct nk_input i,
struct nk_rect  rect 
)

Definition at line 221 of file nuklear_input.c.

◆ nk_input_is_mouse_released()

NK_API nk_bool nk_input_is_mouse_released ( const struct nk_input i,
enum  nk_buttons 
)

Definition at line 250 of file nuklear_input.c.

◆ nk_input_key()

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.

void nk_input_key(struct nk_context*, enum nk_keys key, nk_bool down);
NK_API void nk_input_key(struct nk_context *, enum nk_keys, nk_bool down)
Mirrors the state of a specific key to nuklear.
Parameters
[in]ctxMust point to a previously initialized nk_context struct
[in]keyMust be any value specified in enum nk_keys that needs to be mirrored
[in]downMust be 0 for key is up and 1 for key is down

Definition at line 57 of file nuklear_input.c.

◆ nk_input_motion()

NK_API void nk_input_motion ( struct nk_context ctx,
int  x,
int  y 
)

Mirrors current mouse position to nuklear.

void nk_input_motion(struct nk_context *ctx, int x, int y);
NK_API void nk_input_motion(struct nk_context *, int x, int y)
Mirrors current mouse position to nuklear.
Parameters
[in]ctxMust point to a previously initialized nk_context struct
[in]xMust hold an integer describing the current mouse cursor x-position
[in]yMust hold an integer describing the current mouse cursor y-position

Definition at line 45 of file nuklear_input.c.

◆ nk_input_mouse_clicked()

NK_API nk_bool nk_input_mouse_clicked ( const struct nk_input i,
enum  nk_buttons,
struct nk_rect  rect 
)

Definition at line 227 of file nuklear_input.c.

◆ nk_input_scroll()

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.

void nk_input_scroll(struct nk_context *ctx, struct nk_vec2 val);
NK_API void nk_input_scroll(struct nk_context *, struct nk_vec2 val)
Copies the last mouse scroll value to nuklear.
Parameters
[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_input_unicode()

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.

Note
Stores up to NK_INPUT_MAX bytes between nk_input_begin and nk_input_end.
void nk_input_unicode(struct nk_context*, nk_rune rune);
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.
Parameters
[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.

References nk_input_glyph(), and NK_UTF_SIZE.

◆ nk_item_is_any_active()

NK_API nk_bool nk_item_is_any_active ( const struct nk_context ctx)

# nk_item_is_any_active

Returns
if the any window is being hovered or any widget is currently active. Can be used to decide if input should be processed by UI or your specific input handling. Example could be UI and 3D camera to move inside a 3D space.
NK_API nk_bool nk_item_is_any_active(const struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Returns
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_knob_float()

NK_API nk_bool nk_knob_float ( struct nk_context ctx,
float  min,
float *  val,
float  max,
float  step,
enum nk_heading  zero_direction,
float  dead_zone_degrees 
)

Definition at line 208 of file nuklear_knob.c.

◆ nk_knob_int()

NK_API nk_bool nk_knob_int ( struct nk_context ctx,
int  min,
int *  val,
int  max,
int  step,
enum nk_heading  zero_direction,
float  dead_zone_degrees 
)

Definition at line 244 of file nuklear_knob.c.

◆ nk_label()

NK_API void nk_label ( struct nk_context ctx,
const char *  str,
nk_flags  align 
)

Definition at line 272 of file nuklear_text.c.

◆ nk_label_colored()

NK_API void nk_label_colored ( struct nk_context ctx,
const char *  str,
nk_flags  align,
struct nk_color  color 
)

Definition at line 277 of file nuklear_text.c.

◆ nk_label_colored_wrap()

NK_API void nk_label_colored_wrap ( struct nk_context ctx,
const char *  str,
struct nk_color  color 
)

Definition at line 288 of file nuklear_text.c.

◆ nk_label_wrap()

NK_API void nk_label_wrap ( struct nk_context ctx,
const char *  str 
)

Definition at line 283 of file nuklear_text.c.

◆ nk_layout_ratio_from_pixel()

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.

float nk_layout_ratio_from_pixel(struct nk_context*, float pixel_width);
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.
Parameters
[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
Returns
nk_rect with both position and size of the next row

Definition at line 137 of file nuklear_layout.c.

◆ nk_layout_reset_min_row_height()

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

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
Parameters
[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_layout_row()

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.

void nk_layout_row(struct nk_context*, enum nk_layout_format, float height, int cols, const float *ratio);
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.
Parameters
[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_layout_row_begin()

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.

void nk_layout_row_begin(struct nk_context *ctx, enum nk_layout_format fmt, float row_height, int cols);
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.
Parameters
[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_layout_row_dynamic()

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.

void nk_layout_row_dynamic(struct nk_context *ctx, float height, int cols);
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.
Parameters
[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_layout_row_end()

NK_API void nk_layout_row_end ( struct nk_context ctx)

Finished previously started row.

NK_API void nk_layout_row_end(struct nk_context *)
Finished previously started row.
Parameters
[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_layout_row_push()

NK_API void nk_layout_row_push ( struct nk_context ctx,
float  value 
)

\breif Specifies either window ratio or width of a single column

void nk_layout_row_push(struct nk_context*, float value);
NK_API void nk_layout_row_push(struct nk_context *, float value)
\breif Specifies either window ratio or width of a single column
Parameters
[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_layout_row_static()

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.

void nk_layout_row_static(struct nk_context *ctx, float height, int item_width, int cols);
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.
Parameters
[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_layout_row_template_begin()

NK_API void nk_layout_row_template_begin ( struct nk_context ctx,
float  row_height 
)

# nk_layout_row_template_begin

Begins the row template declaration

void nk_layout_row_template_begin(struct nk_context*, float row_height);
NK_API void nk_layout_row_template_begin(struct nk_context *, float row_height)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after call nk_begin_xxx
Parameters
[in]height
Holds height of each widget in row or zero for auto layouting

Definition at line 268 of file nuklear_layout.c.

◆ nk_layout_row_template_end()

NK_API void nk_layout_row_template_end ( struct nk_context ctx)

# nk_layout_row_template_end

Marks the end of the row template

NK_API void nk_layout_row_template_end(struct nk_context *)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after call nk_begin_xxx

Definition at line 355 of file nuklear_layout.c.

◆ nk_layout_row_template_push_dynamic()

NK_API void nk_layout_row_template_push_dynamic ( struct nk_context ctx)

# nk_layout_row_template_push_dynamic

Adds a dynamic column that dynamically grows and can go to zero if not enough space

NK_API void nk_layout_row_template_push_dynamic(struct nk_context *)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after call nk_begin_xxx
Parameters
[in]height
Holds height of each widget in row or zero for auto layouting

Definition at line 295 of file nuklear_layout.c.

◆ nk_layout_row_template_push_static()

NK_API void nk_layout_row_template_push_static ( struct nk_context ctx,
float  width 
)

# nk_layout_row_template_push_static

Adds a static column that does not grow and will always have the same size

NK_API void nk_layout_row_template_push_static(struct nk_context *, float width)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after call nk_begin_xxx
Parameters
[in]width
Holds the absolute pixel width value the next column must be

Definition at line 335 of file nuklear_layout.c.

◆ nk_layout_row_template_push_variable()

NK_API void nk_layout_row_template_push_variable ( struct nk_context ctx,
float  min_width 
)

# nk_layout_row_template_push_variable

Adds a variable column that dynamically grows but does not shrink below specified pixel width

void nk_layout_row_template_push_variable(struct nk_context*, float min_width);
NK_API void nk_layout_row_template_push_variable(struct nk_context *, float min_width)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after call nk_begin_xxx
Parameters
[in]width
Holds the minimum pixel width the next column must always be

Definition at line 315 of file nuklear_layout.c.

◆ nk_layout_set_min_row_height()

NK_API void nk_layout_set_min_row_height ( struct nk_context ctx,
float  height 
)

Sets the currently used minimum row height.

!!!

Warning
The passed height needs to include both your preferred row height as well as padding. No internal padding is added.
void nk_layout_set_min_row_height(struct nk_context*, float height);
NK_API void nk_layout_set_min_row_height(struct nk_context *, float height)
Sets the currently used minimum row height.
Parameters
[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.

References nk_layout_set_min_row_height().

Referenced by nk_layout_set_min_row_height().

◆ nk_layout_space_begin()

NK_API void nk_layout_space_begin ( struct nk_context ctx,
enum  nk_layout_format,
float  height,
int  widget_count 
)

# nk_layout_space_begin

Begins a new layouting space that allows to specify each widgets position and size.

void nk_layout_space_begin(struct nk_context*, enum nk_layout_format, float height, int widget_count);
NK_API void nk_layout_space_begin(struct nk_context *, enum nk_layout_format, float height, int widget_count)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after call nk_begin_xxx
Parameters
[in]fmt
Either NK_DYNAMIC for window ratio or NK_STATIC for fixed size columns
Parameters
[in]height
Holds height of each widget in row or zero for auto layouting
Parameters
[in]columns
Number of widgets inside row

Definition at line 406 of file nuklear_layout.c.

◆ nk_layout_space_bounds()

NK_API struct nk_rect nk_layout_space_bounds ( const struct nk_context ctx)

# nk_layout_space_bounds

Utility function to calculate total space allocated for nk_layout_space

NK_API struct nk_rect nk_layout_space_bounds(const struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after call nk_layout_space_begin
Returns
nk_rect holding the total space allocated

Definition at line 466 of file nuklear_layout.c.

◆ nk_layout_space_end()

NK_API void nk_layout_space_end ( struct nk_context ctx)

# nk_layout_space_end

Marks the end of the layout space

NK_API void nk_layout_space_end(struct nk_context *)
Parameter Description
Parameters
[in]ctx
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_layout_space_push()

NK_API void nk_layout_space_push ( struct nk_context ctx,
struct nk_rect  bounds 
)

# nk_layout_space_push

Pushes position and size of the next widget in own coordinate space either as pixel or ratio

void nk_layout_space_push(struct nk_context *ctx, struct nk_rect bounds);
NK_API void nk_layout_space_push(struct nk_context *, struct nk_rect bounds)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after call nk_layout_space_begin
Parameters
[in]bounds
Position and size in laoyut space local coordinates

Definition at line 450 of file nuklear_layout.c.

◆ nk_layout_space_rect_to_local()

NK_API struct nk_rect nk_layout_space_rect_to_local ( const struct nk_context ctx,
struct nk_rect  bounds 
)

# nk_layout_space_rect_to_local

Converts rectangle from layout space into screen space

NK_API struct nk_rect nk_layout_space_rect_to_local(const struct nk_context *ctx, struct nk_rect bounds)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after call nk_layout_space_begin
Parameters
[in]bounds
Rectangle to convert from layout space into screen space
Returns
transformed nk_rect in layout space coordinates

Definition at line 552 of file nuklear_layout.c.

◆ nk_layout_space_rect_to_screen()

NK_API struct nk_rect nk_layout_space_rect_to_screen ( const struct nk_context ctx,
struct nk_rect  bounds 
)

# nk_layout_space_rect_to_screen

Converts rectangle from screen space into layout space

NK_API struct nk_rect nk_layout_space_rect_to_screen(const struct nk_context *ctx, struct nk_rect bounds)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after call nk_layout_space_begin
Parameters
[in]bounds
Rectangle to convert from layout space into screen space
Returns
transformed nk_rect in screen space coordinates

Definition at line 536 of file nuklear_layout.c.

◆ nk_layout_space_to_local()

NK_API struct nk_vec2 nk_layout_space_to_local ( const struct nk_context ctx,
struct nk_vec2  vec 
)

# nk_layout_space_to_local

Converts vector from layout space into screen space

NK_API struct nk_vec2 nk_layout_space_to_local(const struct nk_context *ctx, struct nk_vec2 vec)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after call nk_layout_space_begin
Parameters
[in]vec
Position to convert from screen space into layout coordinate space
Returns
transformed nk_vec2 in layout space coordinates

Definition at line 520 of file nuklear_layout.c.

◆ nk_layout_space_to_screen()

NK_API struct nk_vec2 nk_layout_space_to_screen ( const struct nk_context ctx,
struct nk_vec2  vec 
)

# nk_layout_space_to_screen

Converts vector from nk_layout_space coordinate space into screen space

NK_API struct nk_vec2 nk_layout_space_to_screen(const struct nk_context *ctx, struct nk_vec2 vec)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after call nk_layout_space_begin
Parameters
[in]vec
Position to convert from layout space into screen coordinate space
Returns
transformed nk_vec2 in screen space coordinates

Definition at line 504 of file nuklear_layout.c.

◆ nk_layout_widget_bounds()

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.

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.
Parameters
[in]ctx| Must point to an previously initialized nk_context struct after call nk_begin_xxx
Returns
nk_rect with both position and size of the next row

Definition at line 485 of file nuklear_layout.c.

◆ nk_list_view_begin()

NK_API nk_bool nk_list_view_begin ( struct nk_context ctx,
struct nk_list_view out,
const char *  id,
nk_flags  flags,
int  row_height,
int  row_count 
)

Definition at line 10 of file nuklear_list_view.c.

◆ nk_list_view_end()

NK_API void nk_list_view_end ( struct nk_list_view view)

Definition at line 64 of file nuklear_list_view.c.

◆ nk_menu_begin_image()

NK_API nk_bool nk_menu_begin_image ( struct nk_context ctx,
const char *  id,
struct nk_image  img,
struct nk_vec2  size 
)

Definition at line 143 of file nuklear_menu.c.

◆ nk_menu_begin_image_label()

NK_API nk_bool nk_menu_begin_image_label ( struct nk_context ctx,
const char *  title,
nk_flags  align,
struct nk_image  img,
struct nk_vec2  size 
)

Definition at line 219 of file nuklear_menu.c.

◆ nk_menu_begin_image_text()

NK_API nk_bool nk_menu_begin_image_text ( struct nk_context ctx,
const char *  title,
int  len,
nk_flags  align,
struct nk_image  img,
struct nk_vec2  size 
)

Definition at line 193 of file nuklear_menu.c.

◆ nk_menu_begin_label()

NK_API nk_bool nk_menu_begin_label ( struct nk_context ctx,
const char *  text,
nk_flags  align,
struct nk_vec2  size 
)

Definition at line 137 of file nuklear_menu.c.

◆ nk_menu_begin_symbol()

NK_API nk_bool nk_menu_begin_symbol ( struct nk_context ctx,
const char *  id,
enum  nk_symbol_type,
struct nk_vec2  size 
)

Definition at line 168 of file nuklear_menu.c.

◆ nk_menu_begin_symbol_label()

NK_API nk_bool nk_menu_begin_symbol_label ( struct nk_context ctx,
const char *  title,
nk_flags  align,
enum  nk_symbol_type,
struct nk_vec2  size 
)

Definition at line 251 of file nuklear_menu.c.

◆ nk_menu_begin_symbol_text()

NK_API nk_bool nk_menu_begin_symbol_text ( struct nk_context ctx,
const char *  title,
int  len,
nk_flags  align,
enum  nk_symbol_type,
struct nk_vec2  size 
)

Definition at line 225 of file nuklear_menu.c.

◆ nk_menu_begin_text()

NK_API nk_bool nk_menu_begin_text ( struct nk_context ctx,
const char *  title,
int  title_len,
nk_flags  align,
struct nk_vec2  size 
)

Definition at line 113 of file nuklear_menu.c.

◆ nk_menu_close()

NK_API void nk_menu_close ( struct nk_context ctx)

Definition at line 288 of file nuklear_menu.c.

◆ nk_menu_end()

NK_API void nk_menu_end ( struct nk_context ctx)

Definition at line 293 of file nuklear_menu.c.

◆ nk_menu_item_image_label()

NK_API nk_bool nk_menu_item_image_label ( struct nk_context ctx,
struct nk_image  img,
const char *  label,
nk_flags  alignment 
)

Definition at line 267 of file nuklear_menu.c.

◆ nk_menu_item_image_text()

NK_API nk_bool nk_menu_item_image_text ( struct nk_context ctx,
struct nk_image  img,
const char *  text,
int  len,
nk_flags  alignment 
)

Definition at line 273 of file nuklear_menu.c.

◆ nk_menu_item_label()

NK_API nk_bool nk_menu_item_label ( struct nk_context ctx,
const char *  label,
nk_flags  alignment 
)

Definition at line 262 of file nuklear_menu.c.

◆ nk_menu_item_symbol_label()

NK_API nk_bool nk_menu_item_symbol_label ( struct nk_context ctx,
enum  nk_symbol_type,
const char *  label,
nk_flags  alignment 
)

Definition at line 283 of file nuklear_menu.c.

◆ nk_menu_item_symbol_text()

NK_API nk_bool nk_menu_item_symbol_text ( struct nk_context ctx,
enum  nk_symbol_type,
const char *  text,
int  len,
nk_flags  alignment 
)

Definition at line 278 of file nuklear_menu.c.

◆ nk_menu_item_text()

NK_API nk_bool nk_menu_item_text ( struct nk_context ctx,
const char *  title,
int  len,
nk_flags  align 
)

Definition at line 257 of file nuklear_menu.c.

◆ nk_menubar_begin()

NK_API void nk_menubar_begin ( struct nk_context ctx)

Definition at line 10 of file nuklear_menu.c.

◆ nk_menubar_end()

NK_API void nk_menubar_end ( struct nk_context ctx)

Definition at line 47 of file nuklear_menu.c.

◆ nk_murmur_hash()

NK_API nk_hash nk_murmur_hash ( const void *  key,
int  len,
nk_hash  seed 
)

Definition at line 922 of file nuklear_util.c.

◆ nk_nine_slice_handle()

NK_API struct nk_nine_slice nk_nine_slice_handle ( nk_handle  handle,
nk_ushort  l,
nk_ushort  t,
nk_ushort  r,
nk_ushort  b 
)

Definition at line 55 of file nuklear_9slice.c.

◆ nk_nine_slice_id()

NK_API struct nk_nine_slice nk_nine_slice_id ( int  id,
nk_ushort  l,
nk_ushort  t,
nk_ushort  r,
nk_ushort  b 
)

Definition at line 86 of file nuklear_9slice.c.

◆ nk_nine_slice_is_sub9slice()

NK_API int nk_nine_slice_is_sub9slice ( const struct nk_nine_slice img)

Definition at line 101 of file nuklear_9slice.c.

◆ nk_nine_slice_ptr()

NK_API struct nk_nine_slice nk_nine_slice_ptr ( void *  ptr,
nk_ushort  l,
nk_ushort  t,
nk_ushort  r,
nk_ushort  b 
)

Definition at line 70 of file nuklear_9slice.c.

◆ nk_option_label()

NK_API nk_bool nk_option_label ( struct nk_context ctx,
const char *  label,
nk_bool  active 
)

Definition at line 420 of file nuklear_toggle.c.

◆ nk_option_label_align()

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 
)

Definition at line 425 of file nuklear_toggle.c.

◆ nk_option_text()

NK_API nk_bool nk_option_text ( struct nk_context ctx,
const char *  text,
int  len,
nk_bool  active 
)

Definition at line 340 of file nuklear_toggle.c.

◆ nk_option_text_align()

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 
)

Definition at line 368 of file nuklear_toggle.c.

◆ nk_plot()

NK_API void nk_plot ( struct nk_context ctx,
enum  nk_chart_type,
const float *  values,
int  count,
int  offset 
)

Definition at line 286 of file nuklear_chart.c.

◆ nk_plot_function()

NK_API void nk_plot_function ( struct nk_context ctx,
enum  nk_chart_type,
void *  userdata,
float(*)(void *user, int index)  value_getter,
int  count,
int  offset 
)

Definition at line 311 of file nuklear_chart.c.

◆ nk_popup_begin()

NK_API nk_bool nk_popup_begin ( struct nk_context ctx,
enum  nk_popup_type,
const char *  title,
nk_flags  flags,
struct nk_rect  bounds 
)

Definition at line 10 of file nuklear_popup.c.

◆ nk_popup_close()

NK_API void nk_popup_close ( struct nk_context ctx)

Definition at line 189 of file nuklear_popup.c.

◆ nk_popup_end()

NK_API void nk_popup_end ( struct nk_context ctx)

Definition at line 201 of file nuklear_popup.c.

◆ nk_popup_get_scroll()

NK_API void nk_popup_get_scroll ( const struct nk_context ctx,
nk_uint *  offset_x,
nk_uint *  offset_y 
)

Definition at line 233 of file nuklear_popup.c.

◆ nk_popup_set_scroll()

NK_API void nk_popup_set_scroll ( struct nk_context ctx,
nk_uint  offset_x,
nk_uint  offset_y 
)

Definition at line 250 of file nuklear_popup.c.

◆ nk_prog()

NK_API nk_size nk_prog ( struct nk_context ctx,
nk_size  cur,
nk_size  max,
nk_bool  modifyable 
)

Definition at line 153 of file nuklear_progress.c.

◆ nk_progress()

NK_API nk_bool nk_progress ( struct nk_context ctx,
nk_size *  cur,
nk_size  max,
nk_bool  modifyable 
)

Definition at line 122 of file nuklear_progress.c.

◆ nk_property_double()

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 
)

# nk_property_double

Double property directly modifying a passed in value !!!

Warning
To generate a unique property ID using the same label make sure to insert a # at the beginning. It will not be shown but guarantees correct behavior.
void nk_property_double(struct nk_context *ctx, const char *name, double min, double *val, double max, double step, double 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)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after calling a layouting function
Parameters
[in]name
String used both as a label as well as a unique identifier
Parameters
[in]min
Minimum value not allowed to be underflown
Parameters
[in]val
Double pointer to be modified
Parameters
[in]max
Maximum value not allowed to be overflown
Parameters
[in]step
Increment added and subtracted on increment and decrement button
Parameters
[in]inc_per_pixel
Value per pixel added or subtracted on dragging

Definition at line 454 of file nuklear_property.c.

◆ nk_property_float()

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 
)

# nk_property_float

Float property directly modifying a passed in value !!!

Warning
To generate a unique property ID using the same label make sure to insert a # at the beginning. It will not be shown but guarantees correct behavior.
void nk_property_float(struct nk_context *ctx, const char *name, float min, float *val, float max, float 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)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after calling a layouting function
Parameters
[in]name
String used both as a label as well as a unique identifier
Parameters
[in]min
Minimum value not allowed to be underflown
Parameters
[in]val
Float pointer to be modified
Parameters
[in]max
Maximum value not allowed to be overflown
Parameters
[in]step
Increment added and subtracted on increment and decrement button
Parameters
[in]inc_per_pixel
Value per pixel added or subtracted on dragging

Definition at line 440 of file nuklear_property.c.

◆ nk_property_int()

NK_API void nk_property_int ( struct nk_context ctx,
const char *  name,
int  min,
int *  val,
int  max,
int  step,
float  inc_per_pixel 
)

Definition at line 426 of file nuklear_property.c.

◆ nk_propertyd()

NK_API double nk_propertyd ( struct nk_context ctx,
const char *  name,
double  min,
double  val,
double  max,
double  step,
float  inc_per_pixel 
)

# nk_propertyd

Float property modifying a passed in value and returning the new value !!!

Warning
To generate a unique property ID using the same label make sure to insert a # at the beginning. It will not be shown but guarantees correct behavior.
float nk_propertyd(struct nk_context *ctx, const char *name, double min, double val, double max, double step, double 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)
Parameters
[in]ctxMust point to an previously initialized nk_context struct after calling a layouting function
[in]nameString used both as a label as well as a unique identifier
[in]minMinimum value not allowed to be underflown
[in]valCurrent double value to be modified and returned
[in]maxMaximum value not allowed to be overflown
[in]stepIncrement added and subtracted on increment and decrement button
[in]inc_per_pixelValue per pixel added or subtracted on dragging
Returns
the new modified double value

Definition at line 496 of file nuklear_property.c.

◆ nk_propertyf()

NK_API float nk_propertyf ( struct nk_context ctx,
const char *  name,
float  min,
float  val,
float  max,
float  step,
float  inc_per_pixel 
)

# nk_propertyf

Float property modifying a passed in value and returning the new value !!!

Warning
To generate a unique property ID using the same label make sure to insert a # at the beginning. It will not be shown but guarantees correct behavior.
float nk_propertyf(struct nk_context *ctx, const char *name, float min, float val, float max, float 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)
Parameters
[in]ctxMust point to an previously initialized nk_context struct after calling a layouting function
[in]nameString used both as a label as well as a unique identifier
[in]minMinimum value not allowed to be underflown
[in]valCurrent float value to be modified and returned
[in]maxMaximum value not allowed to be overflown
[in]stepIncrement added and subtracted on increment and decrement button
[in]inc_per_pixelValue per pixel added or subtracted on dragging
Returns
the new modified float value

Definition at line 482 of file nuklear_property.c.

◆ nk_propertyi()

NK_API int nk_propertyi ( struct nk_context ctx,
const char *  name,
int  min,
int  val,
int  max,
int  step,
float  inc_per_pixel 
)

# nk_propertyi

Integer property modifying a passed in value and returning the new value !!!

Warning
To generate a unique property ID using the same label make sure to insert a # at the beginning. It will not be shown but guarantees correct behavior.
int nk_propertyi(struct nk_context *ctx, const char *name, int min, int val, int max, int 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)
Parameters
[in]ctxMust point to an previously initialized nk_context struct after calling a layouting function
[in]nameString used both as a label as well as a unique identifier
[in]minMinimum value not allowed to be underflown
[in]valCurrent integer value to be modified and returned
[in]maxMaximum value not allowed to be overflown
[in]stepIncrement added and subtracted on increment and decrement button
[in]inc_per_pixelValue per pixel added or subtracted on dragging
Returns
the new modified integer value

Definition at line 468 of file nuklear_property.c.

◆ nk_push_custom()

NK_API void nk_push_custom ( struct nk_command_buffer b,
struct nk_rect  r,
nk_command_custom_callback  cb,
nk_handle  usr 
)

Definition at line 495 of file nuklear_draw.c.

◆ nk_push_scissor()

NK_API void nk_push_scissor ( struct nk_command_buffer b,
struct nk_rect  r 
)

Definition at line 69 of file nuklear_draw.c.

◆ nk_radio_label()

NK_API nk_bool nk_radio_label ( struct nk_context ctx,
const char *  label,
nk_bool *  active 
)

Definition at line 430 of file nuklear_toggle.c.

◆ nk_radio_label_align()

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 
)

Definition at line 435 of file nuklear_toggle.c.

◆ nk_radio_text()

NK_API nk_bool nk_radio_text ( struct nk_context ctx,
const char *  text,
int  len,
nk_bool *  active 
)

Definition at line 396 of file nuklear_toggle.c.

◆ nk_radio_text_align()

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 
)

Definition at line 408 of file nuklear_toggle.c.

◆ nk_rect()

NK_API struct nk_rect nk_rect ( float  x,
float  y,
float  w,
float  h 
)

Definition at line 211 of file nuklear_math.c.

◆ nk_rect_pos()

NK_API struct nk_vec2 nk_rect_pos ( struct nk_rect  r)

Definition at line 244 of file nuklear_math.c.

◆ nk_rect_size()

NK_API struct nk_vec2 nk_rect_size ( struct nk_rect  r)

Definition at line 251 of file nuklear_math.c.

◆ nk_recta()

NK_API struct nk_rect nk_recta ( struct nk_vec2  pos,
struct nk_vec2  size 
)

Definition at line 229 of file nuklear_math.c.

◆ nk_recti()

NK_API struct nk_rect nk_recti ( int  x,
int  y,
int  w,
int  h 
)

Definition at line 219 of file nuklear_math.c.

◆ nk_rectiv()

NK_API struct nk_rect nk_rectiv ( const int *  xywh)

Definition at line 239 of file nuklear_math.c.

◆ nk_rectv()

NK_API struct nk_rect nk_rectv ( const float *  xywh)

Definition at line 234 of file nuklear_math.c.

◆ nk_rgb()

NK_API struct nk_color nk_rgb ( int  r,
int  g,
int  b 
)

Definition at line 108 of file nuklear_color.c.

◆ nk_rgb_bv()

NK_API struct nk_color nk_rgb_bv ( const nk_byte *  rgb)

Definition at line 123 of file nuklear_color.c.

◆ nk_rgb_cf()

NK_API struct nk_color nk_rgb_cf ( struct nk_colorf  c)

Definition at line 173 of file nuklear_color.c.

◆ nk_rgb_f()

NK_API struct nk_color nk_rgb_f ( float  r,
float  g,
float  b 
)

Definition at line 158 of file nuklear_color.c.

◆ nk_rgb_factor()

NK_API struct nk_color nk_rgb_factor ( struct nk_color  col,
float  factor 
)

Definition at line 26 of file nuklear_color.c.

◆ nk_rgb_fv()

NK_API struct nk_color nk_rgb_fv ( const float *  rgb)

Definition at line 168 of file nuklear_color.c.

◆ nk_rgb_hex()

NK_API struct nk_color nk_rgb_hex ( const char *  rgb)

Definition at line 46 of file nuklear_color.c.

◆ nk_rgb_iv()

NK_API struct nk_color nk_rgb_iv ( const int *  rgb)

Definition at line 118 of file nuklear_color.c.

◆ nk_rgba()

NK_API struct nk_color nk_rgba ( int  r,
int  g,
int  b,
int  a 
)

Definition at line 36 of file nuklear_color.c.

◆ nk_rgba_bv()

NK_API struct nk_color nk_rgba_bv ( const nk_byte *  rgba)

Definition at line 103 of file nuklear_color.c.

◆ nk_rgba_cf()

NK_API struct nk_color nk_rgba_cf ( struct nk_colorf  c)

Definition at line 153 of file nuklear_color.c.

◆ nk_rgba_f()

NK_API struct nk_color nk_rgba_f ( float  r,
float  g,
float  b,
float  a 
)

Definition at line 138 of file nuklear_color.c.

◆ nk_rgba_fv()

NK_API struct nk_color nk_rgba_fv ( const float *  rgba)

Definition at line 148 of file nuklear_color.c.

◆ nk_rgba_hex()

NK_API struct nk_color nk_rgba_hex ( const char *  rgb)

Definition at line 58 of file nuklear_color.c.

◆ nk_rgba_iv()

NK_API struct nk_color nk_rgba_iv ( const int *  rgba)

Definition at line 98 of file nuklear_color.c.

◆ nk_rgba_u32()

NK_API struct nk_color nk_rgba_u32 ( nk_uint  in)

Definition at line 128 of file nuklear_color.c.

◆ nk_rule_horizontal()

NK_API void nk_rule_horizontal ( struct nk_context ctx,
struct nk_color  color,
nk_bool  rounding 
)

# nk_window_show_if

Line for visual separation. Draws a line with thickness determined by the current row height.

void nk_rule_horizontal(struct nk_context *ctx, struct nk_color color, NK_BOOL rounding)
NK_API void nk_rule_horizontal(struct nk_context *ctx, struct nk_color color, nk_bool rounding)
#define NK_BOOL
could be char, use int for drop-in replacement backwards compatibility
Definition nuklear.h:192
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]color
Color of the horizontal line
Parameters
[in]rounding
Whether or not to make the line round

Definition at line 673 of file nuklear_window.c.

References nk_fill_rect(), and nk_window_get_canvas().

◆ nk_select_image_label()

NK_API nk_bool nk_select_image_label ( struct nk_context ctx,
struct nk_image  img,
const char *  str,
nk_flags  align,
nk_bool  value 
)

Definition at line 310 of file nuklear_selectable.c.

◆ nk_select_image_text()

NK_API nk_bool nk_select_image_text ( struct nk_context ctx,
struct nk_image  img,
const char *  str,
int  len,
nk_flags  align,
nk_bool  value 
)

Definition at line 315 of file nuklear_selectable.c.

◆ nk_select_label()

NK_API nk_bool nk_select_label ( struct nk_context ctx,
const char *  str,
nk_flags  align,
nk_bool  value 
)

Definition at line 306 of file nuklear_selectable.c.

◆ nk_select_symbol_label()

NK_API nk_bool nk_select_symbol_label ( struct nk_context ctx,
enum  nk_symbol_type,
const char *  title,
nk_flags  align,
nk_bool  value 
)

Definition at line 327 of file nuklear_selectable.c.

◆ nk_select_symbol_text()

NK_API nk_bool nk_select_symbol_text ( struct nk_context ctx,
enum  nk_symbol_type,
const char *  title,
int  title_len,
nk_flags  align,
nk_bool  value 
)

Definition at line 321 of file nuklear_selectable.c.

◆ nk_select_text()

NK_API nk_bool nk_select_text ( struct nk_context ctx,
const char *  str,
int  len,
nk_flags  align,
nk_bool  value 
)

Definition at line 292 of file nuklear_selectable.c.

◆ nk_selectable_image_label()

NK_API nk_bool nk_selectable_image_label ( struct nk_context ctx,
struct nk_image  img,
const char *  str,
nk_flags  align,
nk_bool *  value 
)

Definition at line 301 of file nuklear_selectable.c.

◆ nk_selectable_image_text()

NK_API nk_bool nk_selectable_image_text ( struct nk_context ctx,
struct nk_image  img,
const char *  str,
int  len,
nk_flags  align,
nk_bool *  value 
)

Definition at line 229 of file nuklear_selectable.c.

◆ nk_selectable_label()

NK_API nk_bool nk_selectable_label ( struct nk_context ctx,
const char *  str,
nk_flags  align,
nk_bool *  value 
)

Definition at line 297 of file nuklear_selectable.c.

◆ nk_selectable_symbol_label()

NK_API nk_bool nk_selectable_symbol_label ( struct nk_context ctx,
enum  nk_symbol_type,
const char *  title,
nk_flags  align,
nk_bool *  value 
)

Definition at line 287 of file nuklear_selectable.c.

◆ nk_selectable_symbol_text()

NK_API nk_bool nk_selectable_symbol_text ( struct nk_context ctx,
enum  nk_symbol_type,
const char *  str,
int  len,
nk_flags  align,
nk_bool *  value 
)

Definition at line 258 of file nuklear_selectable.c.

◆ nk_selectable_text()

NK_API nk_bool nk_selectable_text ( struct nk_context ctx,
const char *  str,
int  len,
nk_flags  align,
nk_bool *  value 
)

Definition at line 200 of file nuklear_selectable.c.

◆ nk_slide_float()

NK_API float nk_slide_float ( struct nk_context ctx,
float  min,
float  val,
float  max,
float  step 
)

Definition at line 242 of file nuklear_slider.c.

◆ nk_slide_int()

NK_API int nk_slide_int ( struct nk_context ctx,
int  min,
int  val,
int  max,
int  step 
)

Definition at line 247 of file nuklear_slider.c.

◆ nk_slider_float()

NK_API nk_bool nk_slider_float ( struct nk_context ctx,
float  min,
float *  val,
float  max,
float  step 
)

Definition at line 208 of file nuklear_slider.c.

◆ nk_slider_int()

NK_API nk_bool nk_slider_int ( struct nk_context ctx,
int  min,
int *  val,
int  max,
int  step 
)

Definition at line 254 of file nuklear_slider.c.

◆ nk_spacer()

NK_API void nk_spacer ( struct nk_context ctx)

# nk_spacer

Spacer is a dummy widget that consumes space as usual but doesn't draw anything

void nk_spacer(struct nk_context* );
NK_API void nk_spacer(struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
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_spacing()

NK_API void nk_spacing ( struct nk_context ctx,
int  cols 
)

Definition at line 202 of file nuklear_widget.c.

◆ nk_str_append_str_char()

NK_API int nk_str_append_str_char ( struct nk_str s,
const char *  str 
)

Definition at line 48 of file nuklear_string.c.

◆ nk_str_append_str_runes()

NK_API int nk_str_append_str_runes ( struct nk_str str,
const nk_rune *  runes 
)

Definition at line 99 of file nuklear_string.c.

◆ nk_str_append_str_utf8()

NK_API int nk_str_append_str_utf8 ( struct nk_str str,
const char *  text 
)

Definition at line 65 of file nuklear_string.c.

◆ nk_str_append_text_char()

NK_API int nk_str_append_text_char ( struct nk_str s,
const char *  str,
int  len 
)

Definition at line 35 of file nuklear_string.c.

◆ nk_str_append_text_runes()

NK_API int nk_str_append_text_runes ( struct nk_str str,
const nk_rune *  text,
int  len 
)

Definition at line 83 of file nuklear_string.c.

◆ nk_str_append_text_utf8()

NK_API int nk_str_append_text_utf8 ( struct nk_str str,
const char *  text,
int  len 
)

Definition at line 53 of file nuklear_string.c.

◆ nk_str_at_char()

NK_API char * nk_str_at_char ( struct nk_str s,
int  pos 
)

Definition at line 314 of file nuklear_string.c.

◆ nk_str_at_char_const()

NK_API const char * nk_str_at_char_const ( const struct nk_str s,
int  pos 
)

Definition at line 357 of file nuklear_string.c.

◆ nk_str_at_const()

NK_API const char * nk_str_at_const ( const struct nk_str str,
int  pos,
nk_rune *  unicode,
int *  len 
)

Definition at line 364 of file nuklear_string.c.

◆ nk_str_at_rune()

NK_API char * nk_str_at_rune ( struct nk_str str,
int  pos,
nk_rune *  unicode,
int *  len 
)

Definition at line 321 of file nuklear_string.c.

◆ nk_str_clear()

NK_API void nk_str_clear ( struct nk_str str)

Definition at line 436 of file nuklear_string.c.

◆ nk_str_delete_chars()

NK_API void nk_str_delete_chars ( struct nk_str s,
int  pos,
int  len 
)

Definition at line 273 of file nuklear_string.c.

◆ nk_str_delete_runes()

NK_API void nk_str_delete_runes ( struct nk_str s,
int  pos,
int  len 
)

Definition at line 290 of file nuklear_string.c.

◆ nk_str_free()

NK_API void nk_str_free ( struct nk_str str)

Definition at line 443 of file nuklear_string.c.

◆ nk_str_get()

NK_API char * nk_str_get ( struct nk_str s)

Definition at line 408 of file nuklear_string.c.

◆ nk_str_get_const()

NK_API const char * nk_str_get_const ( const struct nk_str s)

Definition at line 415 of file nuklear_string.c.

◆ nk_str_init()

NK_API void nk_str_init ( struct nk_str str,
const struct nk_allocator alloc,
nk_size  size 
)

Definition at line 23 of file nuklear_string.c.

◆ nk_str_init_fixed()

NK_API void nk_str_init_fixed ( struct nk_str str,
void *  memory,
nk_size  size 
)

Definition at line 29 of file nuklear_string.c.

◆ nk_str_insert_at_char()

NK_API int nk_str_insert_at_char ( struct nk_str s,
int  pos,
const char *  str,
int  len 
)

Definition at line 114 of file nuklear_string.c.

◆ nk_str_insert_at_rune()

NK_API int nk_str_insert_at_rune ( struct nk_str str,
int  pos,
const char *  cstr,
int  len 
)

Definition at line 149 of file nuklear_string.c.

◆ nk_str_insert_str_char()

NK_API int nk_str_insert_str_char ( struct nk_str str,
int  pos,
const char *  text 
)

Definition at line 173 of file nuklear_string.c.

◆ nk_str_insert_str_runes()

NK_API int nk_str_insert_str_runes ( struct nk_str str,
int  pos,
const nk_rune *  runes 
)

Definition at line 227 of file nuklear_string.c.

◆ nk_str_insert_str_utf8()

NK_API int nk_str_insert_str_utf8 ( struct nk_str str,
int  pos,
const char *  text 
)

Definition at line 193 of file nuklear_string.c.

◆ nk_str_insert_text_char()

NK_API int nk_str_insert_text_char ( struct nk_str str,
int  pos,
const char *  text,
int  len 
)

Definition at line 168 of file nuklear_string.c.

◆ nk_str_insert_text_runes()

NK_API int nk_str_insert_text_runes ( struct nk_str str,
int  pos,
const nk_rune *  runes,
int  len 
)

Definition at line 211 of file nuklear_string.c.

◆ nk_str_insert_text_utf8()

NK_API int nk_str_insert_text_utf8 ( struct nk_str str,
int  pos,
const char *  text,
int  len 
)

Definition at line 178 of file nuklear_string.c.

◆ nk_str_len()

NK_API int nk_str_len ( const struct nk_str s)

Definition at line 422 of file nuklear_string.c.

◆ nk_str_len_char()

NK_API int nk_str_len_char ( const struct nk_str s)

Definition at line 429 of file nuklear_string.c.

◆ nk_str_remove_chars()

NK_API void nk_str_remove_chars ( struct nk_str s,
int  len 
)

Definition at line 242 of file nuklear_string.c.

◆ nk_str_remove_runes()

NK_API void nk_str_remove_runes ( struct nk_str str,
int  len 
)

Definition at line 252 of file nuklear_string.c.

◆ nk_str_rune_at()

NK_API nk_rune nk_str_rune_at ( const struct nk_str str,
int  pos 
)

Definition at line 400 of file nuklear_string.c.

◆ nk_strfilter()

NK_API int nk_strfilter ( const char *  text,
const char *  regexp 
)

Definition at line 303 of file nuklear_util.c.

◆ nk_stricmp()

NK_API int nk_stricmp ( const char *  s1,
const char *  s2 
)

Definition at line 234 of file nuklear_util.c.

◆ nk_stricmpn()

NK_API int nk_stricmpn ( const char *  s1,
const char *  s2,
int  n 
)

Definition at line 256 of file nuklear_util.c.

◆ nk_strlen()

NK_API int nk_strlen ( const char *  str)

Definition at line 136 of file nuklear_util.c.

◆ nk_strmatch_fuzzy_string()

NK_API int nk_strmatch_fuzzy_string ( char const *  str,
char const *  pattern,
int *  out_score 
)

Definition at line 441 of file nuklear_util.c.

◆ nk_strmatch_fuzzy_text()

NK_API int nk_strmatch_fuzzy_text ( const char *  txt,
int  txt_len,
const char *  pattern,
int *  out_score 
)

Definition at line 320 of file nuklear_util.c.

◆ nk_stroke_arc()

NK_API void nk_stroke_arc ( struct nk_command_buffer b,
float  cx,
float  cy,
float  radius,
float  a_min,
float  a_max,
float  line_thickness,
struct nk_color  c 
)

Definition at line 244 of file nuklear_draw.c.

◆ nk_stroke_circle()

NK_API void nk_stroke_circle ( struct nk_command_buffer b,
struct nk_rect  r,
float  line_thickness,
struct nk_color  c 
)

Definition at line 201 of file nuklear_draw.c.

◆ nk_stroke_curve()

NK_API void nk_stroke_curve ( struct nk_command_buffer b,
float  ax,
float  ay,
float  ctrl0x,
float  ctrl0y,
float  ctrl1x,
float  ctrl1y,
float  bx,
float  by,
float  line_thickness,
struct nk_color  col 
)

Definition at line 106 of file nuklear_draw.c.

◆ nk_stroke_line()

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  c 
)

shape outlines

Definition at line 89 of file nuklear_draw.c.

◆ nk_stroke_polygon()

NK_API void nk_stroke_polygon ( struct nk_command_buffer b,
const float *  points,
int  point_count,
float  line_thickness,
struct nk_color  col 
)

Definition at line 332 of file nuklear_draw.c.

◆ nk_stroke_polyline()

NK_API void nk_stroke_polyline ( struct nk_command_buffer b,
const float *  points,
int  point_count,
float  line_thickness,
struct nk_color  col 
)

Definition at line 374 of file nuklear_draw.c.

◆ nk_stroke_rect()

NK_API void nk_stroke_rect ( struct nk_command_buffer b,
struct nk_rect  rect,
float  rounding,
float  line_thickness,
struct nk_color  c 
)

Definition at line 129 of file nuklear_draw.c.

◆ nk_stroke_triangle()

NK_API void nk_stroke_triangle ( struct nk_command_buffer b,
float  x0,
float  y0,
float  x1,
float  y1,
float  x2,
float  y2,
float  line_thichness,
struct nk_color  c 
)

Definition at line 278 of file nuklear_draw.c.

◆ nk_strtod()

NK_API double nk_strtod ( const char *  str,
char **  endptr 
)

Definition at line 168 of file nuklear_util.c.

◆ nk_strtof()

NK_API float nk_strtof ( const char *  str,
char **  endptr 
)

Definition at line 225 of file nuklear_util.c.

◆ nk_strtoi()

NK_API int nk_strtoi ( const char *  str,
char **  endptr 
)

Definition at line 144 of file nuklear_util.c.

◆ nk_style_default()

NK_API void nk_style_default ( struct nk_context ctx)

Definition at line 9 of file nuklear_style.c.

◆ nk_style_from_table()

NK_API void nk_style_from_table ( struct nk_context ctx,
const struct nk_color table 
)

Definition at line 94 of file nuklear_style.c.

◆ nk_style_get_color_by_name()

NK_API const char * nk_style_get_color_by_name ( enum  nk_style_colors)

Definition at line 57 of file nuklear_style.c.

◆ nk_style_hide_cursor()

NK_API void nk_style_hide_cursor ( struct nk_context ctx)

Definition at line 838 of file nuklear_style.c.

◆ nk_style_item_color()

NK_API struct nk_style_item nk_style_item_color ( struct nk_color  col)

Definition at line 62 of file nuklear_style.c.

◆ nk_style_item_hide()

NK_API struct nk_style_item nk_style_item_hide ( void  )

Definition at line 86 of file nuklear_style.c.

◆ nk_style_item_image()

NK_API struct nk_style_item nk_style_item_image ( struct nk_image  img)

Definition at line 70 of file nuklear_style.c.

◆ nk_style_item_nine_slice()

NK_API struct nk_style_item nk_style_item_nine_slice ( struct nk_nine_slice  slice)

Definition at line 78 of file nuklear_style.c.

◆ nk_style_load_all_cursors()

NK_API void nk_style_load_all_cursors ( struct nk_context ctx,
const struct nk_cursor cursors 
)

Definition at line 853 of file nuklear_style.c.

◆ nk_style_load_cursor()

NK_API void nk_style_load_cursor ( struct nk_context ctx,
enum  nk_style_cursor,
const struct nk_cursor c 
)

Definition at line 843 of file nuklear_style.c.

◆ nk_style_pop_font()

NK_API nk_bool nk_style_pop_font ( struct nk_context ctx)

Definition at line 758 of file nuklear_style.c.

◆ nk_style_push_font()

NK_API nk_bool nk_style_push_font ( struct nk_context ctx,
const struct nk_user_font font 
)

Definition at line 738 of file nuklear_style.c.

◆ nk_style_set_font()

NK_API void nk_style_set_font ( struct nk_context ctx,
const struct nk_user_font font 
)

Definition at line 725 of file nuklear_style.c.

◆ nk_style_show_cursor()

NK_API void nk_style_show_cursor ( struct nk_context ctx)

Definition at line 833 of file nuklear_style.c.

◆ nk_sub9slice_handle()

NK_API struct nk_nine_slice nk_sub9slice_handle ( nk_handle  handle,
nk_ushort  w,
nk_ushort  h,
struct nk_rect  sub_region,
nk_ushort  l,
nk_ushort  t,
nk_ushort  r,
nk_ushort  b 
)

Definition at line 40 of file nuklear_9slice.c.

◆ nk_sub9slice_id()

NK_API struct nk_nine_slice nk_sub9slice_id ( int  id,
nk_ushort  w,
nk_ushort  h,
struct nk_rect  sub_region,
nk_ushort  l,
nk_ushort  t,
nk_ushort  r,
nk_ushort  b 
)

Definition at line 25 of file nuklear_9slice.c.

◆ nk_sub9slice_ptr()

NK_API struct nk_nine_slice nk_sub9slice_ptr ( void *  ptr,
nk_ushort  w,
nk_ushort  h,
struct nk_rect  sub_region,
nk_ushort  l,
nk_ushort  t,
nk_ushort  r,
nk_ushort  b 
)

Definition at line 10 of file nuklear_9slice.c.

◆ nk_subimage_handle()

NK_API struct nk_image nk_subimage_handle ( nk_handle  handle,
nk_ushort  w,
nk_ushort  h,
struct nk_rect  sub_region 
)

Definition at line 51 of file nuklear_image.c.

◆ nk_subimage_id()

NK_API struct nk_image nk_subimage_id ( int  id,
nk_ushort  w,
nk_ushort  h,
struct nk_rect  sub_region 
)

Definition at line 38 of file nuklear_image.c.

◆ nk_subimage_ptr()

NK_API struct nk_image nk_subimage_ptr ( void *  ptr,
nk_ushort  w,
nk_ushort  h,
struct nk_rect  sub_region 
)

Definition at line 25 of file nuklear_image.c.

◆ nk_text()

NK_API void nk_text ( struct nk_context ctx,
const char *  str,
int  len,
nk_flags  alignment 
)

Definition at line 258 of file nuklear_text.c.

◆ nk_text_colored()

NK_API void nk_text_colored ( struct nk_context ctx,
const char *  str,
int  len,
nk_flags  alignment,
struct nk_color  color 
)

Definition at line 94 of file nuklear_text.c.

◆ nk_text_wrap()

NK_API void nk_text_wrap ( struct nk_context ctx,
const char *  str,
int  len 
)

Definition at line 265 of file nuklear_text.c.

◆ nk_text_wrap_colored()

NK_API void nk_text_wrap_colored ( struct nk_context ctx,
const char *  str,
int  len,
struct nk_color  color 
)

Definition at line 121 of file nuklear_text.c.

◆ nk_textedit_cut()

NK_API nk_bool nk_textedit_cut ( struct nk_text_edit state)

Definition at line 330 of file nuklear_text_editor.c.

◆ nk_textedit_delete()

NK_API void nk_textedit_delete ( struct nk_text_edit state,
int  where,
int  len 
)

Definition at line 217 of file nuklear_text_editor.c.

◆ nk_textedit_delete_selection()

NK_API void nk_textedit_delete_selection ( struct nk_text_edit state)

Definition at line 225 of file nuklear_text_editor.c.

◆ nk_textedit_free()

NK_API void nk_textedit_free ( struct nk_text_edit state)

Definition at line 1033 of file nuklear_text_editor.c.

◆ nk_textedit_init()

NK_API void nk_textedit_init ( struct nk_text_edit state,
const struct nk_allocator alloc,
nk_size  size 
)

text editor

Definition at line 1005 of file nuklear_text_editor.c.

◆ nk_textedit_init_fixed()

NK_API void nk_textedit_init_fixed ( struct nk_text_edit state,
void *  memory,
nk_size  size 
)

Definition at line 995 of file nuklear_text_editor.c.

◆ nk_textedit_paste()

NK_API nk_bool nk_textedit_paste ( struct nk_text_edit state,
char const *  ctext,
int  len 
)

Definition at line 343 of file nuklear_text_editor.c.

◆ nk_textedit_redo()

NK_API void nk_textedit_redo ( struct nk_text_edit state)

Definition at line 900 of file nuklear_text_editor.c.

◆ nk_textedit_select_all()

NK_API void nk_textedit_select_all ( struct nk_text_edit state)

Definition at line 1026 of file nuklear_text_editor.c.

◆ nk_textedit_text()

NK_API void nk_textedit_text ( struct nk_text_edit state,
const char *  text,
int  total_len 
)

Definition at line 368 of file nuklear_text_editor.c.

◆ nk_textedit_undo()

NK_API void nk_textedit_undo ( struct nk_text_edit state)

Definition at line 833 of file nuklear_text_editor.c.

◆ nk_tooltip()

NK_API void nk_tooltip ( struct nk_context ctx,
const char *  text 
)

Definition at line 59 of file nuklear_tooltip.c.

◆ nk_tooltip_begin()

NK_API nk_bool nk_tooltip_begin ( struct nk_context ctx,
float  width 
)

Definition at line 10 of file nuklear_tooltip.c.

◆ nk_tooltip_end()

NK_API void nk_tooltip_end ( struct nk_context ctx)

Definition at line 49 of file nuklear_tooltip.c.

◆ nk_tree_element_image_push_hashed()

NK_API nk_bool nk_tree_element_image_push_hashed ( struct nk_context ctx,
enum  nk_tree_type,
struct nk_image  img,
const char *  title,
enum nk_collapse_states  initial_state,
nk_bool *  selected,
const char *  hash,
int  len,
int  seed 
)

Definition at line 340 of file nuklear_tree.c.

◆ nk_tree_element_pop()

NK_API void nk_tree_element_pop ( struct nk_context ctx)

Definition at line 347 of file nuklear_tree.c.

◆ nk_tree_element_push_hashed()

NK_API nk_bool nk_tree_element_push_hashed ( struct nk_context ctx,
enum  nk_tree_type,
const char *  title,
enum nk_collapse_states  initial_state,
nk_bool *  selected,
const char *  hash,
int  len,
int  seed 
)

Definition at line 333 of file nuklear_tree.c.

◆ nk_tree_image_push_hashed()

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 
)

# nk_tree_image_push_hashed

Start a collapsible UI section with internal state management with full control over internal unique ID used to store state

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 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)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]type
Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
Parameters
[in]img
Image to display inside the header on the left of the label
Parameters
[in]title
Label printed in the tree header
Parameters
[in]state
Initial tree state value out of nk_collapse_states
Parameters
[in]hash
Memory block or string to generate the ID from
Parameters
[in]len
Size of passed memory block or string in hash
Parameters
[in]seed
Seeding value if this function is called in a loop or default to 0
Returns
true(1) if visible and fillable with widgets or false(0) otherwise

Definition at line 183 of file nuklear_tree.c.

◆ nk_tree_pop()

NK_API void nk_tree_pop ( struct nk_context ctx)

# nk_tree_pop

Ends a collapsabale UI section

void nk_tree_pop(struct nk_context*);
NK_API void nk_tree_pop(struct nk_context *)
Parameter Description
Parameters
[in]ctx
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_tree_push_hashed()

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 
)

# nk_tree_push_hashed

Start a collapsible UI section with internal state management with full control over internal unique ID used to store state

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_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)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]type
Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
Parameters
[in]title
Label printed in the tree header
Parameters
[in]state
Initial tree state value out of nk_collapse_states
Parameters
[in]hash
Memory block or string to generate the ID from
Parameters
[in]len
Size of passed memory block or string in hash
Parameters
[in]seed
Seeding value if this function is called in a loop or default to 0
Returns
true(1) if visible and fillable with widgets or false(0) otherwise

Definition at line 176 of file nuklear_tree.c.

◆ nk_tree_state_image_push()

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 
)

# nk_tree_state_image_push

Start a collapsible UI section with image and label header and external state management

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 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)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after calling nk_tree_xxx_push_xxx
Parameters
[in]img
Image to display inside the header on the left of the label
Parameters
[in]type
Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
Parameters
[in]title
Label printed in the tree header
Parameters
[in]state
Persistent state to update
Returns
true(1) if visible and fillable with widgets or false(0) otherwise

Definition at line 151 of file nuklear_tree.c.

◆ nk_tree_state_pop()

NK_API void nk_tree_state_pop ( struct nk_context ctx)

# nk_tree_state_pop

Ends a collapsabale UI section

NK_API void nk_tree_state_pop(struct nk_context *)
Parameter Description
Parameters
[in]ctx
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_tree_state_push()

NK_API nk_bool nk_tree_state_push ( struct nk_context ctx,
enum  nk_tree_type,
const char *  title,
enum nk_collapse_states *  state 
)

# nk_tree_state_push

Start a collapsible UI section with external state management

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_push(struct nk_context *, enum nk_tree_type, const char *title, enum nk_collapse_states *state)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct after calling nk_tree_xxx_push_xxx
Parameters
[in]type
Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
Parameters
[in]title
Label printed in the tree header
Parameters
[in]state
Persistent state to update
Returns
true(1) if visible and fillable with widgets or false(0) otherwise

Definition at line 145 of file nuklear_tree.c.

◆ nk_triangle_from_direction()

NK_API void nk_triangle_from_direction ( struct nk_vec2 result,
struct nk_rect  r,
float  pad_x,
float  pad_y,
enum  nk_heading 
)

Definition at line 319 of file nuklear_math.c.

◆ nk_utf_at()

NK_API const char * nk_utf_at ( const char *  buffer,
int  length,
int  index,
nk_rune *  unicode,
int *  len 
)

Definition at line 108 of file nuklear_utf8.c.

◆ nk_utf_decode()

NK_API int nk_utf_decode ( const char *  c,
nk_rune *  u,
int  clen 
)

Definition at line 37 of file nuklear_utf8.c.

◆ nk_utf_encode()

NK_API int nk_utf_encode ( nk_rune  u,
char *  c,
int  clen 
)

Definition at line 70 of file nuklear_utf8.c.

◆ nk_utf_len()

NK_API int nk_utf_len ( const char *  str,
int  byte_len 
)

Definition at line 85 of file nuklear_utf8.c.

◆ nk_vec2()

NK_API struct nk_vec2 nk_vec2 ( float  x,
float  y 
)

Definition at line 280 of file nuklear_math.c.

◆ nk_vec2i()

NK_API struct nk_vec2 nk_vec2i ( int  x,
int  y 
)

Definition at line 287 of file nuklear_math.c.

◆ nk_vec2iv()

NK_API struct nk_vec2 nk_vec2iv ( const int *  xy)

Definition at line 300 of file nuklear_math.c.

◆ nk_vec2v()

NK_API struct nk_vec2 nk_vec2v ( const float *  xy)

Definition at line 295 of file nuklear_math.c.

◆ nk_widget()

NK_API enum nk_widget_layout_states nk_widget ( struct nk_rect bounds,
const struct nk_context ctx 
)

Definition at line 135 of file nuklear_widget.c.

◆ nk_widget_bounds()

NK_API struct nk_rect nk_widget_bounds ( const struct nk_context ctx)

Definition at line 10 of file nuklear_widget.c.

◆ nk_widget_disable_begin()

NK_API void nk_widget_disable_begin ( struct nk_context ctx)

Definition at line 233 of file nuklear_widget.c.

◆ nk_widget_disable_end()

NK_API void nk_widget_disable_end ( struct nk_context ctx)

Definition at line 296 of file nuklear_widget.c.

◆ nk_widget_fitting()

NK_API enum nk_widget_layout_states nk_widget_fitting ( struct nk_rect bounds,
const struct nk_context ctx,
struct nk_vec2  item_padding 
)

Definition at line 185 of file nuklear_widget.c.

◆ nk_widget_has_mouse_click_down()

NK_API nk_bool nk_widget_has_mouse_click_down ( const struct nk_context ctx,
enum  nk_buttons,
nk_bool  down 
)

Definition at line 113 of file nuklear_widget.c.

◆ nk_widget_height()

NK_API float nk_widget_height ( const struct nk_context ctx)

Definition at line 57 of file nuklear_widget.c.

◆ nk_widget_is_hovered()

NK_API nk_bool nk_widget_is_hovered ( const struct nk_context ctx)

Definition at line 69 of file nuklear_widget.c.

◆ nk_widget_is_mouse_clicked()

NK_API nk_bool nk_widget_is_mouse_clicked ( const struct nk_context ctx,
enum  nk_buttons 
)

Definition at line 91 of file nuklear_widget.c.

◆ nk_widget_position()

NK_API struct nk_vec2 nk_widget_position ( const struct nk_context ctx)

Definition at line 21 of file nuklear_widget.c.

◆ nk_widget_size()

NK_API struct nk_vec2 nk_widget_size ( const struct nk_context ctx)

Definition at line 33 of file nuklear_widget.c.

◆ nk_widget_width()

NK_API float nk_widget_width ( const struct nk_context ctx)

Definition at line 45 of file nuklear_widget.c.

◆ nk_window_close()

NK_API void nk_window_close ( struct nk_context ctx,
const char *  name 
)

# nk_window_close

Closes a window and marks it for being freed at the end of the frame

void nk_window_close(struct nk_context *ctx, const char *name);
NK_API void nk_window_close(struct nk_context *ctx, const char *name)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]name
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_window_collapse()

NK_API void nk_window_collapse ( struct nk_context ctx,
const char *  name,
enum nk_collapse_states  state 
)

# nk_window_collapse

Updates collapse state of a window with given name

void nk_window_collapse(struct nk_context*, const char *name, enum nk_collapse_states state);
NK_API void nk_window_collapse(struct nk_context *ctx, const char *name, enum nk_collapse_states state)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]name
Identifier of the window to close
Parameters
[in]state
value out of nk_collapse_states section

Definition at line 603 of file nuklear_window.c.

References NK_WINDOW_MINIMIZED.

Referenced by nk_window_collapse_if().

◆ 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 
)

# nk_window_collapse_if

Updates collapse state of a window with given name if given condition is met

void nk_window_collapse_if(struct nk_context*, const char *name, enum nk_collapse_states, int cond);
NK_API void nk_window_collapse_if(struct nk_context *ctx, const char *name, enum nk_collapse_states state, int cond)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]name
Identifier of the window to either collapse or maximize
Parameters
[in]state
value out of nk_collapse_states section the window should be put into
Parameters
[in]cond
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_window_find()

NK_API struct nk_window * nk_window_find ( const struct nk_context ctx,
const char *  name 
)

# nk_window_find

Finds and returns a window from passed name

struct nk_window *nk_window_find(struct nk_context *ctx, const char *name);
NK_API struct nk_window * nk_window_find(const struct nk_context *ctx, const char *name)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]name
Window identifier
Returns
a 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_window_get_bounds()

NK_API struct nk_rect nk_window_get_bounds ( const struct nk_context ctx)

# nk_window_get_bounds

Returns
a rectangle with screen position and size of the currently processed window

!!!

Warning
Only call this function between calls nk_begin_xxx and nk_end
struct nk_rect nk_window_get_bounds(const struct nk_context *ctx);
NK_API struct nk_rect nk_window_get_bounds(const struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Returns
a nk_rect struct with window upper left window position and size

Definition at line 315 of file nuklear_window.c.

◆ nk_window_get_canvas()

NK_API struct nk_command_buffer * nk_window_get_canvas ( const struct nk_context ctx)

# nk_window_get_canvas

Returns
the draw command buffer. Can be used to draw custom widgets !!!
Warning
Only call this function between calls nk_begin_xxx and nk_end !!!
Do not keep the returned command buffer pointer around it is only valid until nk_end
NK_API struct nk_command_buffer * nk_window_get_canvas(const struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Returns
a pointer to window internal nk_command_buffer struct used as drawing canvas. Can be used to do custom drawing.

Definition at line 391 of file nuklear_window.c.

Referenced by nk_rule_horizontal().

◆ nk_window_get_content_region()

NK_API struct nk_rect nk_window_get_content_region ( const struct nk_context ctx)

# nk_window_get_content_region

Returns
the position and size of the currently visible and non-clipped space inside the currently processed window.

!!!

Warning
Only call this function between calls nk_begin_xxx and nk_end
NK_API struct nk_rect nk_window_get_content_region(const struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Returns
nk_rect struct with screen position and size (no scrollbar offset) of the visible space inside the current window

Definition at line 355 of file nuklear_window.c.

◆ nk_window_get_content_region_max()

NK_API struct nk_vec2 nk_window_get_content_region_max ( const struct nk_context ctx)

# nk_window_get_content_region_max

Returns
the lower right screen position of the currently visible and non-clipped space inside the currently processed window.

!!!

Warning
Only call this function between calls nk_begin_xxx and nk_end
NK_API struct nk_vec2 nk_window_get_content_region_max(const struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Returns
nk_vec2 struct with lower right screen position (no scrollbar offset) of the visible space inside the current window

Definition at line 372 of file nuklear_window.c.

◆ nk_window_get_content_region_min()

NK_API struct nk_vec2 nk_window_get_content_region_min ( const struct nk_context ctx)

# nk_window_get_content_region_min

Returns
the upper left position of the currently visible and non-clipped space inside the currently processed window.

!!!

Warning
Only call this function between calls nk_begin_xxx and nk_end
NK_API struct nk_vec2 nk_window_get_content_region_min(const struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
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 363 of file nuklear_window.c.

◆ nk_window_get_content_region_size()

NK_API struct nk_vec2 nk_window_get_content_region_size ( const struct nk_context ctx)

# nk_window_get_content_region_size

Returns
the size of the currently visible and non-clipped space inside the currently processed window

!!!

Warning
Only call this function between calls nk_begin_xxx and nk_end
NK_API struct nk_vec2 nk_window_get_content_region_size(const struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Returns
nk_vec2 struct with size the visible space inside the current window

Definition at line 382 of file nuklear_window.c.

◆ nk_window_get_height()

NK_API float nk_window_get_height ( const struct nk_context ctx)

# nk_window_get_height

Returns
the height of the currently processed window.

!!!

Warning
Only call this function between calls nk_begin_xxx and nk_end
float nk_window_get_height(const struct nk_context *ctx);
NK_API float nk_window_get_height(const struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Returns
the current window height

Definition at line 347 of file nuklear_window.c.

◆ nk_window_get_panel()

NK_API struct nk_panel * nk_window_get_panel ( const struct nk_context ctx)

# nk_window_get_panel

Returns
the underlying panel which contains all processing state of the current window.

!!!

Warning
Only call this function between calls nk_begin_xxx and nk_end !!!
Do not keep the returned panel pointer around, it is only valid until nk_end
NK_API struct nk_panel * nk_window_get_panel(const struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Returns
a pointer to window internal nk_panel state.

Definition at line 400 of file nuklear_window.c.

◆ nk_window_get_position()

NK_API struct nk_vec2 nk_window_get_position ( const struct nk_context ctx)

# nk_window_get_position

Returns
the position of the currently processed window.

!!!

Warning
Only call this function between calls nk_begin_xxx and nk_end
struct nk_vec2 nk_window_get_position(const struct nk_context *ctx);
NK_API struct nk_vec2 nk_window_get_position(const struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Returns
a nk_vec2 struct with window upper left position

Definition at line 323 of file nuklear_window.c.

◆ nk_window_get_scroll()

NK_API void nk_window_get_scroll ( const struct nk_context ctx,
nk_uint *  offset_x,
nk_uint *  offset_y 
)

# nk_window_get_scroll

Gets the scroll offset for the current window !!!

Warning
Only call this function between calls nk_begin_xxx and nk_end
void nk_window_get_scroll(struct nk_context *ctx, nk_uint *offset_x, nk_uint *offset_y);
NK_API void nk_window_get_scroll(const struct nk_context *ctx, nk_uint *offset_x, nk_uint *offset_y)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]offset_x
A pointer to the x offset output (or NULL to ignore)
Parameters
[in]offset_y
A pointer to the y offset output (or NULL to ignore)

Definition at line 408 of file nuklear_window.c.

◆ nk_window_get_size()

NK_API struct nk_vec2 nk_window_get_size ( const struct nk_context ctx)

# nk_window_get_size

Returns
the size with width and height of the currently processed window.

!!!

Warning
Only call this function between calls nk_begin_xxx and nk_end
struct nk_vec2 nk_window_get_size(const struct nk_context *ctx);
NK_API struct nk_vec2 nk_window_get_size(const struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Returns
a nk_vec2 struct with window width and height

Definition at line 331 of file nuklear_window.c.

◆ nk_window_get_width()

NK_API float nk_window_get_width ( const struct nk_context ctx)

nk_window_get_width

Returns
the width of the currently processed window.

!!!

Warning
Only call this function between calls nk_begin_xxx and nk_end
float nk_window_get_width(const struct nk_context *ctx);
NK_API float nk_window_get_width(const struct nk_context *ctx)
nk_window_get_width
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Returns
the current window width

Definition at line 339 of file nuklear_window.c.

◆ nk_window_has_focus()

NK_API nk_bool nk_window_has_focus ( const struct nk_context ctx)

# nk_window_has_focus

Returns
if the currently processed window is currently active !!!
Warning
Only call this function between calls nk_begin_xxx and nk_end
nk_bool nk_window_has_focus(const struct nk_context *ctx);
NK_API nk_bool nk_window_has_focus(const struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Returns
false(0) if current window is not active or true(1) if it is

Definition at line 422 of file nuklear_window.c.

◆ nk_window_is_active()

NK_API nk_bool nk_window_is_active ( const struct nk_context ctx,
const char *  name 
)

# nk_window_is_active

Same as nk_window_has_focus for some reason

nk_bool nk_window_is_active(struct nk_context *ctx, const char *name);
NK_API nk_bool nk_window_is_active(const struct nk_context *ctx, const char *name)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]name
Identifier of window you want to check if it is active
Returns
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_window_is_any_hovered()

NK_API nk_bool nk_window_is_any_hovered ( const struct nk_context ctx)

# nk_window_is_any_hovered

Returns
if the any window is being hovered
NK_API nk_bool nk_window_is_any_hovered(const struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Returns
true(1) if any window is hovered or false(0) otherwise

Definition at line 446 of file nuklear_window.c.

References nk_user_font::height, NK_WINDOW_HIDDEN, and NK_WINDOW_MINIMIZED.

Referenced by nk_item_is_any_active().

◆ nk_window_is_closed()

NK_API nk_bool nk_window_is_closed ( const struct nk_context ctx,
const char *  name 
)

# nk_window_is_closed

Returns
if the window with given name was closed by calling nk_close
nk_bool nk_window_is_closed(struct nk_context *ctx, const char *name);
NK_API nk_bool nk_window_is_closed(const struct nk_context *ctx, const char *name)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]name
Identifier of window you want to check if it is closed
Returns
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.

References NK_WINDOW_CLOSED.

◆ nk_window_is_collapsed()

NK_API nk_bool nk_window_is_collapsed ( const struct nk_context ctx,
const char *  name 
)

# nk_window_is_collapsed

Returns
if the window with given name is currently minimized/collapsed
nk_bool nk_window_is_collapsed(struct nk_context *ctx, const char *name);
NK_API nk_bool nk_window_is_collapsed(const struct nk_context *ctx, const char *name)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]name
Identifier of window you want to check if it is collapsed
Returns
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.

References NK_WINDOW_MINIMIZED.

◆ nk_window_is_hidden()

NK_API nk_bool nk_window_is_hidden ( const struct nk_context ctx,
const char *  name 
)

# nk_window_is_hidden

Returns
if the window with given name is hidden
nk_bool nk_window_is_hidden(struct nk_context *ctx, const char *name);
NK_API nk_bool nk_window_is_hidden(const struct nk_context *ctx, const char *name)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]name
Identifier of window you want to check if it is hidden
Returns
true(1) if current window is hidden or false(0) window not found or visible

Definition at line 510 of file nuklear_window.c.

References NK_WINDOW_HIDDEN.

◆ nk_window_is_hovered()

NK_API nk_bool nk_window_is_hovered ( const struct nk_context ctx)

# nk_window_is_hovered

Return if the current window is being hovered !!!

Warning
Only call this function between calls nk_begin_xxx and nk_end
nk_bool nk_window_is_hovered(struct nk_context *ctx);
NK_API nk_bool nk_window_is_hovered(const struct nk_context *ctx)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Returns
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_window_set_bounds()

NK_API void nk_window_set_bounds ( struct nk_context ctx,
const char *  name,
struct nk_rect  bounds 
)

# nk_window_set_bounds

Updates position and size of window with passed in name

void nk_window_set_bounds(struct nk_context*, const char *name, struct nk_rect bounds);
NK_API void nk_window_set_bounds(struct nk_context *ctx, const char *name, struct nk_rect bounds)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]name
Identifier of the window to modify both position and size
Parameters
[in]bounds
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_window_set_focus()

NK_API void nk_window_set_focus ( struct nk_context ctx,
const char *  name 
)

# nk_window_set_focus

Sets the window with given name as active

void nk_window_set_focus(struct nk_context*, const char *name);
NK_API void nk_window_set_focus(struct nk_context *ctx, const char *name)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]name
Identifier of the window to set focus on

Definition at line 655 of file nuklear_window.c.

◆ nk_window_set_position()

NK_API void nk_window_set_position ( struct nk_context ctx,
const char *  name,
struct nk_vec2  pos 
)

# nk_window_set_position

Updates position of window with passed name

void nk_window_set_position(struct nk_context*, const char *name, struct nk_vec2 pos);
NK_API void nk_window_set_position(struct nk_context *ctx, const char *name, struct nk_vec2 pos)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]name
Identifier of the window to modify both position
Parameters
[in]pos
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_window_set_scroll()

NK_API void nk_window_set_scroll ( struct nk_context ctx,
nk_uint  offset_x,
nk_uint  offset_y 
)

# nk_window_set_scroll

Sets the scroll offset for the current window !!!

Warning
Only call this function between calls nk_begin_xxx and nk_end
void nk_window_set_scroll(struct nk_context *ctx, nk_uint offset_x, nk_uint offset_y);
NK_API void nk_window_set_scroll(struct nk_context *ctx, nk_uint offset_x, nk_uint offset_y)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]offset_x
The x offset to scroll to
Parameters
[in]offset_y
The y offset to scroll to

Definition at line 591 of file nuklear_window.c.

◆ nk_window_set_size()

NK_API void nk_window_set_size ( struct nk_context ctx,
const char *  name,
struct nk_vec2  size 
)

# nk_window_set_size

Updates size of window with passed in name

void nk_window_set_size(struct nk_context*, const char *name, struct nk_vec2);
NK_API void nk_window_set_size(struct nk_context *ctx, const char *name, struct nk_vec2 size)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]name
Identifier of the window to modify both window size
Parameters
[in]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_window_show()

NK_API void nk_window_show ( struct nk_context ctx,
const char *  name,
enum nk_show_states  state 
)

# nk_window_show

updates visibility state of a window with given name

void nk_window_show(struct nk_context*, const char *name, enum nk_show_states);
NK_API void nk_window_show(struct nk_context *ctx, const char *name, enum nk_show_states state)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]name
Identifier of the window to either collapse or maximize
Parameters
[in]state
state with either visible or hidden to modify the window with

Definition at line 629 of file nuklear_window.c.

References NK_WINDOW_HIDDEN.

Referenced by nk_window_show_if().

◆ 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 
)

# nk_window_show_if

Updates visibility state of a window with given name if a given condition is met

void nk_window_show_if(struct nk_context*, const char *name, enum nk_show_states, int cond);
NK_API void nk_window_show_if(struct nk_context *ctx, const char *name, enum nk_show_states state, int cond)
Parameter Description
Parameters
[in]ctx
Must point to an previously initialized nk_context struct
Parameters
[in]name
Identifier of the window to either hide or show
Parameters
[in]state
state with either visible or hidden to modify the window with
Parameters
[in]cond
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().