Lines Matching defs:win
5372 struct nk_window *win;
5544 struct nk_window win;
5556 struct nk_page_element win[1];
5849 NK_LIB void nk_start(struct nk_context *ctx, struct nk_window *win);
5850 NK_LIB void nk_start_popup(struct nk_context *ctx, struct nk_window *win);
5869 NK_LIB void nk_free_window(struct nk_context *ctx, struct nk_window *win);
5871 NK_LIB void nk_insert_window(struct nk_context *ctx, struct nk_window *win, enum nk_window_insert_location loc);
5886 NK_LIB void nk_remove_table(struct nk_window *win, struct nk_table *tbl);
5888 NK_LIB void nk_push_table(struct nk_window *win, struct nk_table *tbl);
5889 NK_LIB nk_uint *nk_add_value(struct nk_context *ctx, struct nk_window *win, nk_hash name, nk_uint value);
5890 NK_LIB nk_uint *nk_find_value(struct nk_window *win, nk_hash name);
5906 NK_LIB void nk_panel_layout(const struct nk_context *ctx, struct nk_window *win, float height, int cols);
5908 NK_LIB void nk_panel_alloc_row(const struct nk_context *ctx, struct nk_window *win);
5909 NK_LIB void nk_layout_widget_space(struct nk_rect *bounds, const struct nk_context *ctx, struct nk_window *win, int modify);
14288 struct nk_style_window *win;
14727 win = &style->window;
14728 win->header.align = NK_HEADER_RIGHT;
14729 win->header.close_symbol = NK_SYMBOL_X;
14730 win->header.minimize_symbol = NK_SYMBOL_MINUS;
14731 win->header.maximize_symbol = NK_SYMBOL_PLUS;
14732 win->header.normal = nk_style_item_color(table[NK_COLOR_HEADER]);
14733 win->header.hover = nk_style_item_color(table[NK_COLOR_HEADER]);
14734 win->header.active = nk_style_item_color(table[NK_COLOR_HEADER]);
14735 win->header.label_normal = table[NK_COLOR_TEXT];
14736 win->header.label_hover = table[NK_COLOR_TEXT];
14737 win->header.label_active = table[NK_COLOR_TEXT];
14738 win->header.label_padding = nk_vec2(4,4);
14739 win->header.padding = nk_vec2(4,4);
14740 win->header.spacing = nk_vec2(0,0);
14783 win->background = table[NK_COLOR_WINDOW];
14784 win->fixed_background = nk_style_item_color(table[NK_COLOR_WINDOW]);
14785 win->border_color = table[NK_COLOR_BORDER];
14786 win->popup_border_color = table[NK_COLOR_BORDER];
14787 win->combo_border_color = table[NK_COLOR_BORDER];
14788 win->contextual_border_color = table[NK_COLOR_BORDER];
14789 win->menu_border_color = table[NK_COLOR_BORDER];
14790 win->group_border_color = table[NK_COLOR_BORDER];
14791 win->tooltip_border_color = table[NK_COLOR_BORDER];
14792 win->scaler = nk_style_item_color(table[NK_COLOR_TEXT]);
14794 win->rounding = 0.0f;
14795 win->spacing = nk_vec2(4,4);
14796 win->scrollbar_size = nk_vec2(10,10);
14797 win->min_size = nk_vec2(64,64);
14799 win->combo_border = 1.0f;
14800 win->contextual_border = 1.0f;
14801 win->menu_border = 1.0f;
14802 win->group_border = 1.0f;
14803 win->tooltip_border = 1.0f;
14804 win->popup_border = 1.0f;
14805 win->border = 2.0f;
14806 win->min_row_height_padding = 8;
14808 win->padding = nk_vec2(4,4);
14809 win->group_padding = nk_vec2(4,4);
14810 win->popup_padding = nk_vec2(4,4);
14811 win->combo_padding = nk_vec2(4,4);
14812 win->contextual_padding = nk_vec2(4,4);
14813 win->menu_padding = nk_vec2(4,4);
14814 win->tooltip_padding = nk_vec2(4,4);
15106 if (iter->popup.win && iter->popup.win->seq != ctx->seq) {
15107 nk_free_window(ctx, iter->popup.win);
15108 iter->popup.win = 0;
15144 nk_start(struct nk_context *ctx, struct nk_window *win)
15147 NK_ASSERT(win);
15148 nk_start_buffer(ctx, &win->buffer);
15151 nk_start_popup(struct nk_context *ctx, struct nk_window *win)
15155 NK_ASSERT(win);
15156 if (!ctx || !win) return;
15159 buf = &win->popup.buf;
15160 buf->begin = win->buffer.end;
15161 buf->end = win->buffer.end;
15162 buf->parent = win->buffer.last;
15167 nk_finish_popup(struct nk_context *ctx, struct nk_window *win)
15171 NK_ASSERT(win);
15172 if (!ctx || !win) return;
15174 buf = &win->popup.buf;
15175 buf->last = win->buffer.last;
15176 buf->end = win->buffer.end;
15187 nk_finish(struct nk_context *ctx, struct nk_window *win)
15194 NK_ASSERT(win);
15195 if (!ctx || !win) return;
15196 nk_finish_buffer(ctx, &win->buffer);
15197 if (!win->popup.buf.active) return;
15199 buf = &win->popup.buf;
15363 } return &pool->pages->win[pool->pages->size++];
15455 nk_push_table(struct nk_window *win, struct nk_table *tbl)
15457 if (!win->tables) {
15458 win->tables = tbl;
15462 win->table_count = 1;
15465 win->tables->prev = tbl;
15466 tbl->next = win->tables;
15469 win->tables = tbl;
15470 win->table_count++;
15473 nk_remove_table(struct nk_window *win, struct nk_table *tbl)
15475 if (win->tables == tbl)
15476 win->tables = tbl->next;
15485 nk_add_value(struct nk_context *ctx, struct nk_window *win,
15489 NK_ASSERT(win);
15490 if (!win || !ctx) return 0;
15491 if (!win->tables || win->tables->size >= NK_VALUE_PAGE_CAPACITY) {
15495 nk_push_table(win, tbl);
15497 win->tables->seq = win->seq;
15498 win->tables->keys[win->tables->size] = name;
15499 win->tables->values[win->tables->size] = value;
15500 return &win->tables->values[win->tables->size++];
15503 nk_find_value(struct nk_window *win, nk_hash name)
15505 struct nk_table *iter = win->tables;
15511 iter->seq = win->seq;
15610 struct nk_window *win;
15632 win = ctx->current;
15633 layout = win->layout;
15634 out = &win->buffer;
15635 in = (win->flags & NK_WINDOW_NO_INPUT) ? 0: &ctx->input;
15637 win->buffer.userdata = ctx->userdata;
15644 if ((win->flags & NK_WINDOW_MOVABLE) && !(win->flags & NK_WINDOW_ROM)) {
15651 header.x = win->bounds.x;
15652 header.y = win->bounds.y;
15653 header.w = win->bounds.w;
15654 if (nk_panel_has_header(win->flags, title)) {
15665 win->bounds.x = win->bounds.x + in->mouse.delta.x;
15666 win->bounds.y = win->bounds.y + in->mouse.delta.y;
15675 layout->flags = win->flags;
15676 layout->bounds = win->bounds;
15679 if (win->flags & NK_WINDOW_BORDER) {
15680 layout->border = nk_panel_get_border(style, win->flags, panel_type);
15696 if (!(win->flags & NK_WINDOW_NO_SCROLLBAR))
15700 if (!(win->flags & NK_WINDOW_NO_SCROLLBAR) || win->flags & NK_WINDOW_SCALABLE)
15706 if (nk_panel_has_header(win->flags, title))
15713 header.x = win->bounds.x;
15714 header.y = win->bounds.y;
15715 header.w = win->bounds.w;
15726 if (ctx->active == win) {
15741 nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
15752 if (win->flags & NK_WINDOW_CLOSABLE) {
15762 if (nk_do_button_symbol(&ws, &win->buffer, button,
15764 &style->window.header.close_button, in, style->font) && !(win->flags & NK_WINDOW_ROM))
15772 if (win->flags & NK_WINDOW_MINIMIZABLE) {
15776 if (!(win->flags & NK_WINDOW_CLOSABLE)) {
15785 if (nk_do_button_symbol(&ws, &win->buffer, button, (layout->flags & NK_WINDOW_MINIMIZED)?
15787 NK_BUTTON_DEFAULT, &style->window.header.minimize_button, in, style->font) && !(win->flags & NK_WINDOW_ROM))
15811 body.x = win->bounds.x;
15812 body.w = win->bounds.w;
15813 body.y = (win->bounds.y + layout->header_height);
15814 body.h = (win->bounds.h - layout->header_height);
15823 nk_unify(&clip, &win->buffer.clip, layout->clip.x, layout->clip.y,
16140 elem->data.win.seq = ctx->seq;
16141 return &elem->data.win;
16144 nk_free_window(struct nk_context *ctx, struct nk_window *win)
16147 struct nk_table *it = win->tables;
16148 if (win->popup.win) {
16149 nk_free_window(ctx, win->popup.win);
16150 win->popup.win = 0;
16152 win->next = 0;
16153 win->prev = 0;
16158 nk_remove_table(win, it);
16160 if (it == win->tables)
16161 win->tables = n;
16166 {union nk_page_data *pd = NK_CONTAINER_OF(win, union nk_page_data, win);
16187 nk_insert_window(struct nk_context *ctx, struct nk_window *win,
16192 NK_ASSERT(win);
16193 if (!win || !ctx) return;
16198 NK_ASSERT(iter != win);
16199 if (iter == win) return;
16204 win->next = 0;
16205 win->prev = 0;
16206 ctx->begin = win;
16207 ctx->end = win;
16215 end->next = win;
16216 win->prev = ctx->end;
16217 win->next = 0;
16218 ctx->end = win;
16223 ctx->begin->prev = win;
16224 win->next = ctx->begin;
16225 win->prev = 0;
16226 ctx->begin = win;
16232 nk_remove_window(struct nk_context *ctx, struct nk_window *win)
16234 if (win == ctx->begin || win == ctx->end) {
16235 if (win == ctx->begin) {
16236 ctx->begin = win->next;
16237 if (win->next)
16238 win->next->prev = 0;
16240 if (win == ctx->end) {
16241 ctx->end = win->prev;
16242 if (win->prev)
16243 win->prev->next = 0;
16246 if (win->next)
16247 win->next->prev = win->prev;
16248 if (win->prev)
16249 win->prev->next = win->next;
16251 if (win == ctx->active || !ctx->active) {
16256 win->next = 0;
16257 win->prev = 0;
16270 struct nk_window *win;
16288 win = nk_find_window(ctx, name_hash, name);
16289 if (!win) {
16292 win = (struct nk_window*)nk_create_window(ctx);
16293 NK_ASSERT(win);
16294 if (!win) return 0;
16297 nk_insert_window(ctx, win, NK_INSERT_FRONT);
16298 else nk_insert_window(ctx, win, NK_INSERT_BACK);
16299 nk_command_buffer_init(&win->buffer, &ctx->memory, NK_CLIPPING_ON);
16301 win->flags = flags;
16302 win->bounds = bounds;
16303 win->name = name_hash;
16305 NK_MEMCPY(win->name_string, name, name_length);
16306 win->name_string[name_length] = 0;
16307 win->popup.win = 0;
16309 ctx->active = win;
16312 win->flags &= ~(nk_flags)(NK_WINDOW_PRIVATE-1);
16313 win->flags |= flags;
16314 if (!(win->flags & (NK_WINDOW_MOVABLE | NK_WINDOW_SCALABLE)))
16315 win->bounds = bounds;
16323 NK_ASSERT(win->seq != ctx->seq);
16324 win->seq = ctx->seq;
16325 if (!ctx->active && !(win->flags & NK_WINDOW_HIDDEN)) {
16326 ctx->active = win;
16327 ctx->end = win;
16330 if (win->flags & NK_WINDOW_HIDDEN) {
16331 ctx->current = win;
16332 win->layout = 0;
16334 } else nk_start(ctx, win);
16337 if (!(win->flags & NK_WINDOW_HIDDEN) && !(win->flags & NK_WINDOW_NO_INPUT))
16340 struct nk_window *iter = win;
16343 struct nk_rect win_bounds = (!(win->flags & NK_WINDOW_MINIMIZED))?
16344 win->bounds: nk_rect(win->bounds.x, win->bounds.y, win->bounds.w, h);
16350 if ((win != ctx->active) && ishovered && !ctx->input.mouse.buttons[NK_BUTTON_LEFT].down) {
16351 iter = win->next;
16360 if (iter->popup.win && iter->popup.active && !(iter->flags & NK_WINDOW_HIDDEN) &&
16361 NK_INTERSECT(win->bounds.x, win_bounds.y, win_bounds.w, win_bounds.h,
16362 iter->popup.win->bounds.x, iter->popup.win->bounds.y,
16363 iter->popup.win->bounds.w, iter->popup.win->bounds.h))
16370 if (iter && inpanel && (win != ctx->end)) {
16371 iter = win->next;
16380 if (iter->popup.win && iter->popup.active && !(iter->flags & NK_WINDOW_HIDDEN) &&
16382 iter->popup.win->bounds.x, iter->popup.win->bounds.y,
16383 iter->popup.win->bounds.w, iter->popup.win->bounds.h))
16388 if (iter && !(win->flags & NK_WINDOW_ROM) && (win->flags & NK_WINDOW_BACKGROUND)) {
16389 win->flags |= (nk_flags)NK_WINDOW_ROM;
16399 if (!iter && ctx->end != win) {
16400 if (!(win->flags & NK_WINDOW_BACKGROUND)) {
16403 nk_remove_window(ctx, win);
16404 nk_insert_window(ctx, win, NK_INSERT_BACK);
16406 win->flags &= ~(nk_flags)NK_WINDOW_ROM;
16407 ctx->active = win;
16409 if (ctx->end != win && !(win->flags & NK_WINDOW_BACKGROUND))
16410 win->flags |= NK_WINDOW_ROM;
16413 win->layout = (struct nk_panel*)nk_create_panel(ctx);
16414 ctx->current = win;
16416 win->layout->offset_x = &win->scrollbar.x;
16417 win->layout->offset_y = &win->scrollbar.y;
16534 struct nk_window *win;
16539 win = ctx->current;
16541 *offset_x = win->scrollbar.x;
16543 *offset_y = win->scrollbar.y;
16575 if (iter->popup.active && iter->popup.win && nk_input_is_mouse_hovering_rect(&ctx->input, iter->popup.win->bounds))
16603 struct nk_window *win;
16609 win = nk_find_window(ctx, title_hash, name);
16610 if (!win) return 0;
16611 return win->flags & NK_WINDOW_MINIMIZED;
16618 struct nk_window *win;
16624 win = nk_find_window(ctx, title_hash, name);
16625 if (!win) return 1;
16626 return (win->flags & NK_WINDOW_CLOSED);
16633 struct nk_window *win;
16639 win = nk_find_window(ctx, title_hash, name);
16640 if (!win) return 1;
16641 return (win->flags & NK_WINDOW_HIDDEN);
16648 struct nk_window *win;
16654 win = nk_find_window(ctx, title_hash, name);
16655 if (!win) return 0;
16656 return win == ctx->active;
16670 struct nk_window *win;
16673 win = nk_window_find(ctx, name);
16674 if (!win) return;
16675 NK_ASSERT(ctx->current != win && "You cannot close a currently active window");
16676 if (ctx->current == win) return;
16677 win->flags |= NK_WINDOW_HIDDEN;
16678 win->flags |= NK_WINDOW_CLOSED;
16684 struct nk_window *win;
16687 win = nk_window_find(ctx, name);
16688 if (!win) return;
16689 NK_ASSERT(ctx->current != win && "You cannot update a currently in procecss window");
16690 win->bounds = bounds;
16696 struct nk_window *win = nk_window_find(ctx, name);
16697 if (!win) return;
16698 win->bounds.x = pos.x;
16699 win->bounds.y = pos.y;
16705 struct nk_window *win = nk_window_find(ctx, name);
16706 if (!win) return;
16707 win->bounds.w = size.x;
16708 win->bounds.h = size.y;
16713 struct nk_window *win;
16718 win = ctx->current;
16719 win->scrollbar.x = offset_x;
16720 win->scrollbar.y = offset_y;
16728 struct nk_window *win;
16734 win = nk_find_window(ctx, title_hash, name);
16735 if (!win) return;
16737 win->flags |= NK_WINDOW_MINIMIZED;
16738 else win->flags &= ~(nk_flags)NK_WINDOW_MINIMIZED;
16753 struct nk_window *win;
16759 win = nk_find_window(ctx, title_hash, name);
16760 if (!win) return;
16762 win->flags |= NK_WINDOW_HIDDEN;
16763 } else win->flags &= ~(nk_flags)NK_WINDOW_HIDDEN;
16779 struct nk_window *win;
16785 win = nk_find_window(ctx, title_hash, name);
16786 if (win && ctx->end != win) {
16787 nk_remove_window(ctx, win);
16788 nk_insert_window(ctx, win, NK_INSERT_BACK);
16790 ctx->active = win;
16806 struct nk_window *win;
16820 win = ctx->current;
16821 panel = win->layout;
16827 popup = win->popup.win;
16830 popup->parent = win;
16831 win->popup.win = popup;
16832 win->popup.active = 0;
16833 win->popup.type = NK_PANEL_POPUP;
16837 if (win->popup.name != title_hash) {
16838 if (!win->popup.active) {
16840 win->popup.name = title_hash;
16841 win->popup.active = 1;
16842 win->popup.type = NK_PANEL_POPUP;
16848 rect.x += win->layout->clip.x;
16849 rect.y += win->layout->clip.y;
16852 popup->parent = win;
16861 popup->buffer = win->buffer;
16862 nk_start_popup(ctx, win);
16869 root = win->layout;
16875 win->popup.active = 1;
16878 popup->layout->parent = win->layout;
16883 root = win->layout;
16888 win->popup.buf.active = 0;
16889 win->popup.active = 0;
16891 ctx->current = win;
16903 struct nk_window *win;
16914 win = ctx->current;
16915 panel = win->layout;
16918 popup = win->popup.win;
16922 popup->parent = win;
16923 win->popup.win = popup;
16924 win->popup.type = panel_type;
16939 win->popup.header = header;
16943 struct nk_panel *root = win->layout;
16951 popup->parent = win;
16957 win->popup.active = 1;
16960 nk_start_popup(ctx, win);
16961 popup->buffer = win->buffer;
16966 win->buffer = popup->buffer;
16967 popup->layout->parent = win->layout;
16973 root = win->layout;
16995 struct nk_window *win;
17006 win = popup->parent;
17009 root = win->layout;
17014 win->popup.active = 0;
17019 win->buffer = popup->buffer;
17020 nk_finish_popup(ctx, win);
17021 ctx->current = win;
17022 nk_push_scissor(&win->buffer, win->layout->clip);
17069 struct nk_window *win;
17084 win = ctx->current;
17085 ++win->popup.con_count;
17090 popup = win->popup.win;
17091 is_open = (popup && win->popup.type == NK_PANEL_CONTEXTUAL);
17093 if (win->popup.active_con && win->popup.con_count != win->popup.active_con)
17095 if (!is_open && win->popup.active_con)
17096 win->popup.active_con = 0;
17101 win->popup.active_con = win->popup.con_count;
17115 if (ret) win->popup.type = NK_PANEL_CONTEXTUAL;
17117 win->popup.active_con = 0;
17118 win->popup.type = NK_PANEL_NONE;
17119 if (win->popup.win)
17120 win->popup.win->flags = 0;
17128 struct nk_window *win;
17141 win = ctx->current;
17146 in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
17147 if (nk_do_button_text(&ctx->last_widget_state, &win->buffer, bounds,
17163 struct nk_window *win;
17176 win = ctx->current;
17181 in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
17182 if (nk_do_button_text_image(&ctx->last_widget_state, &win->buffer, bounds,
17199 struct nk_window *win;
17212 win = ctx->current;
17217 in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
17218 if (nk_do_button_text_symbol(&ctx->last_widget_state, &win->buffer, bounds,
17327 struct nk_window *win;
17337 win = ctx->current;
17338 out = &win->buffer;
17339 layout = win->layout;
17356 nk_menu_begin(struct nk_context *ctx, struct nk_window *win,
17376 popup = win->popup.win;
17378 is_active = (popup && (win->popup.name == hash) && win->popup.type == NK_PANEL_MENU);
17384 win->popup.type = NK_PANEL_MENU;
17385 win->popup.name = hash;
17392 struct nk_window *win;
17404 win = ctx->current;
17407 in = (state == NK_WIDGET_ROM || win->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
17408 if (nk_do_button_text(&ctx->last_widget_state, &win->buffer, header,
17411 return nk_menu_begin(ctx, win, title, is_clicked, header, size);
17422 struct nk_window *win;
17434 win = ctx->current;
17437 in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
17438 if (nk_do_button_image(&ctx->last_widget_state, &win->buffer, header,
17441 return nk_menu_begin(ctx, win, id, is_clicked, header, size);
17447 struct nk_window *win;
17459 win = ctx->current;
17462 in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
17463 if (nk_do_button_symbol(&ctx->last_widget_state, &win->buffer, header,
17466 return nk_menu_begin(ctx, win, id, is_clicked, header, size);
17472 struct nk_window *win;
17484 win = ctx->current;
17487 in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
17488 if (nk_do_button_text_image(&ctx->last_widget_state, &win->buffer,
17492 return nk_menu_begin(ctx, win, title, is_clicked, header, size);
17504 struct nk_window *win;
17516 win = ctx->current;
17520 in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
17521 if (nk_do_button_text_symbol(&ctx->last_widget_state, &win->buffer,
17524 return nk_menu_begin(ctx, win, title, is_clicked, header, size);
17586 struct nk_window *win;
17595 win = ctx->current;
17596 layout = win->layout;
17602 struct nk_window *win;
17611 win = ctx->current;
17612 layout = win->layout;
17638 nk_panel_layout(const struct nk_context *ctx, struct nk_window *win,
17655 layout = win->layout;
17657 out = &win->buffer;
17682 background.x = win->bounds.x;
17683 background.w = win->bounds.w;
17694 struct nk_window *win;
17701 win = ctx->current;
17702 nk_panel_layout(ctx, win, height, cols);
17704 win->layout->row.type = NK_LAYOUT_DYNAMIC_FIXED;
17705 else win->layout->row.type = NK_LAYOUT_STATIC_FIXED;
17707 win->layout->row.ratio = 0;
17708 win->layout->row.filled = 0;
17709 win->layout->row.item_offset = 0;
17710 win->layout->row.item_width = (float)width;
17715 struct nk_window *win;
17719 win = ctx->current;
17720 return NK_CLAMP(0.0f, pixel_width/win->bounds.x, 1.0f);
17736 struct nk_window *win;
17745 win = ctx->current;
17746 layout = win->layout;
17747 nk_panel_layout(ctx, win, row_height, cols);
17761 struct nk_window *win;
17770 win = ctx->current;
17771 layout = win->layout;
17787 struct nk_window *win;
17796 win = ctx->current;
17797 layout = win->layout;
17810 struct nk_window *win;
17819 win = ctx->current;
17820 layout = win->layout;
17821 nk_panel_layout(ctx, win, height, cols);
17846 struct nk_window *win;
17855 win = ctx->current;
17856 layout = win->layout;
17857 nk_panel_layout(ctx, win, height, 1);
17873 struct nk_window *win;
17882 win = ctx->current;
17883 layout = win->layout;
17893 struct nk_window *win;
17902 win = ctx->current;
17903 layout = win->layout;
17913 struct nk_window *win;
17922 win = ctx->current;
17923 layout = win->layout;
17933 struct nk_window *win;
17949 win = ctx->current;
17950 layout = win->layout;
17985 struct nk_window *win;
17994 win = ctx->current;
17995 layout = win->layout;
17996 nk_panel_layout(ctx, win, height, widget_count);
18009 struct nk_window *win;
18018 win = ctx->current;
18019 layout = win->layout;
18028 struct nk_window *win;
18037 win = ctx->current;
18038 layout = win->layout;
18045 struct nk_window *win;
18051 win = ctx->current;
18052 layout = win->layout;
18064 struct nk_window *win;
18070 win = ctx->current;
18071 layout = win->layout;
18082 struct nk_window *win;
18088 win = ctx->current;
18089 layout = win->layout;
18098 struct nk_window *win;
18104 win = ctx->current;
18105 layout = win->layout;
18114 struct nk_window *win;
18120 win = ctx->current;
18121 layout = win->layout;
18130 struct nk_window *win;
18136 win = ctx->current;
18137 layout = win->layout;
18144 nk_panel_alloc_row(const struct nk_context *ctx, struct nk_window *win)
18146 struct nk_panel *layout = win->layout;
18149 nk_panel_layout(ctx, win, row_height, layout->row.columns);
18153 struct nk_window *win, int modify)
18172 win = ctx->current;
18173 layout = win->layout;
18291 struct nk_window *win;
18301 win = ctx->current;
18302 layout = win->layout;
18304 nk_panel_alloc_row(ctx, win);
18307 nk_layout_widget_space(bounds, ctx, win, nk_true);
18315 struct nk_window *win;
18324 win = ctx->current;
18325 layout = win->layout;
18332 nk_layout_widget_space(bounds, ctx, win, nk_false);
18353 struct nk_window *win;
18377 win = ctx->current;
18378 layout = win->layout;
18379 out = &win->buffer;
18426 nk_do_button_symbol(&ws, &win->buffer, sym, symbol, NK_BUTTON_DEFAULT,
18432 nk_draw_image(&win->buffer, sym, img, nk_white);
18462 struct nk_window *win = ctx->current;
18472 state = nk_find_value(win, tree_hash);
18474 state = nk_add_value(ctx, win, tree_hash, 0);
18494 struct nk_window *win = 0;
18503 win = ctx->current;
18504 layout = win->layout;
18534 struct nk_window *win;
18562 win = ctx->current;
18563 layout = win->layout;
18564 out = &win->buffer;
18608 if (nk_do_button_symbol(&ws, &win->buffer, sym, symbol, NK_BUTTON_DEFAULT, button, in, style->font))
18626 nk_do_selectable_image(&dummy, &win->buffer, label, title, title_len, NK_TEXT_LEFT,
18628 } else nk_do_selectable(&dummy, &win->buffer, label, title, title_len, NK_TEXT_LEFT,
18645 struct nk_window *win = ctx->current;
18655 state = nk_find_value(win, tree_hash);
18657 state = nk_add_value(ctx, win, tree_hash, 0);
18697 struct nk_window *win;
18699 win = ctx->current;
18701 {const struct nk_rect *c = &win->layout->clip;
18706 if (win->flags & NK_WINDOW_ROM)
18715 panel.buffer = win->buffer;
18720 win->buffer = panel.buffer;
18721 win->buffer.clip = panel.layout->clip;
18724 panel.layout->parent = win->layout;
18725 win->layout = panel.layout;
18727 ctx->current = win;
18743 struct nk_window *win;
18758 win = ctx->current;
18759 NK_ASSERT(win->layout);
18760 g = win->layout;
18784 pan.buffer = win->buffer;
18786 pan.parent = win;
18795 win->buffer = pan.buffer;
18796 nk_push_scissor(&win->buffer, parent->clip);
18797 ctx->current = win;
18798 win->layout = parent;
18814 struct nk_window *win;
18826 win = ctx->current;
18829 x_offset = nk_find_value(win, id_hash);
18831 x_offset = nk_add_value(ctx, win, id_hash, 0);
18832 y_offset = nk_add_value(ctx, win, id_hash+1, 0);
18838 } else y_offset = nk_find_value(win, id_hash+1);
18856 struct nk_window *win;
18868 win = ctx->current;
18871 x_offset_ptr = nk_find_value(win, id_hash);
18873 x_offset_ptr = nk_add_value(ctx, win, id_hash, 0);
18874 y_offset_ptr = nk_add_value(ctx, win, id_hash+1, 0);
18880 } else y_offset_ptr = nk_find_value(win, id_hash+1);
18891 struct nk_window *win;
18903 win = ctx->current;
18906 x_offset_ptr = nk_find_value(win, id_hash);
18908 x_offset_ptr = nk_add_value(ctx, win, id_hash, 0);
18909 y_offset_ptr = nk_add_value(ctx, win, id_hash+1, 0);
18915 } else y_offset_ptr = nk_find_value(win, id_hash+1);
18938 struct nk_window *win;
18948 win = ctx->current;
18956 x_offset = nk_find_value(win, title_hash);
18958 x_offset = nk_add_value(ctx, win, title_hash, 0);
18959 y_offset = nk_add_value(ctx, win, title_hash+1, 0);
18965 } else y_offset = nk_find_value(win, title_hash+1);
18971 win = ctx->current;
18972 layout = win->layout;
18986 struct nk_window *win;
18995 win = ctx->current;
18996 layout = win->layout;
19140 struct nk_window *win;
19152 win = ctx->current;
19153 layout = win->layout;
19189 struct nk_window *win;
19201 win = ctx->current;
19203 layout = win->layout;
19220 struct nk_window *win;
19232 win = ctx->current;
19233 layout = win->layout;
19238 nk_panel_alloc_row(ctx, win);
19346 struct nk_window *win;
19358 win = ctx->current;
19367 nk_widget_text(&win->buffer, bounds, str, len, &text, alignment, style->font);
19373 struct nk_window *win;
19385 win = ctx->current;
19394 nk_widget_text_wrap(&win->buffer, bounds, str, len, &text, style->font);
19655 struct nk_window *win;
19663 win = ctx->current;
19665 nk_draw_image(&win->buffer, bounds, &img, nk_white);
19670 struct nk_window *win;
19678 win = ctx->current;
19680 nk_draw_image(&win->buffer, bounds, &img, col);
20118 struct nk_window *win;
20131 win = ctx->current;
20132 layout = win->layout;
20137 return nk_do_button_text(&ctx->last_widget_state, &win->buffer, bounds,
20160 struct nk_window *win;
20176 win = ctx->current;
20177 layout = win->layout;
20187 ret = nk_do_button(&ctx->last_widget_state, &win->buffer, bounds,
20189 nk_draw_button(&win->buffer, &bounds, ctx->last_widget_state, &button);
20196 struct nk_window *win;
20209 win = ctx->current;
20210 layout = win->layout;
20214 return nk_do_button_symbol(&ctx->last_widget_state, &win->buffer, bounds,
20228 struct nk_window *win;
20241 win = ctx->current;
20242 layout = win->layout;
20247 return nk_do_button_image(&ctx->last_widget_state, &win->buffer, bounds,
20262 struct nk_window *win;
20275 win = ctx->current;
20276 layout = win->layout;
20281 return nk_do_button_text_symbol(&ctx->last_widget_state, &win->buffer, bounds,
20309 struct nk_window *win;
20322 win = ctx->current;
20323 layout = win->layout;
20328 return nk_do_button_text_image(&ctx->last_widget_state, &win->buffer,
20528 struct nk_window *win;
20542 win = ctx->current;
20544 layout = win->layout;
20549 nk_do_toggle(&ctx->last_widget_state, &win->buffer, bounds, &active,
20623 struct nk_window *win;
20637 win = ctx->current;
20639 layout = win->layout;
20644 nk_do_toggle(&ctx->last_widget_state, &win->buffer, bounds, &is_active,
20864 struct nk_window *win;
20879 win = ctx->current;
20880 layout = win->layout;
20886 return nk_do_selectable(&ctx->last_widget_state, &win->buffer, bounds,
20893 struct nk_window *win;
20908 win = ctx->current;
20909 layout = win->layout;
20915 return nk_do_selectable_image(&ctx->last_widget_state, &win->buffer, bounds,
20922 struct nk_window *win;
20937 win = ctx->current;
20938 layout = win->layout;
20944 return nk_do_selectable_symbol(&ctx->last_widget_state, &win->buffer, bounds,
21197 struct nk_window *win;
21214 win = ctx->current;
21216 layout = win->layout;
21223 *value = nk_do_slider(&ctx->last_widget_state, &win->buffer, bounds, min_value,
21357 struct nk_window *win;
21373 win = ctx->current;
21375 layout = win->layout;
21381 *cur = nk_do_progress(&ctx->last_widget_state, &win->buffer, bounds,
23373 struct nk_window *win;
23379 win = ctx->current;
23380 hash = win->edit.seq;
23381 win->edit.active = nk_true;
23382 win->edit.name = hash;
23384 win->edit.mode = NK_TEXT_EDIT_MODE_INSERT;
23389 struct nk_window *win;
23394 win = ctx->current;
23395 win->edit.active = nk_false;
23396 win->edit.name = 0;
23405 struct nk_window *win;
23414 win = ctx->current;
23415 hash = win->edit.seq;
23420 if (win->edit.active && hash == win->edit.name) {
23423 else edit->cursor = win->edit.cursor;
23425 edit->select_start = win->edit.cursor;
23426 edit->select_end = win->edit.cursor;
23428 edit->select_start = win->edit.sel_start;
23429 edit->select_end = win->edit.sel_end;
23431 edit->mode = win->edit.mode;
23432 edit->scrollbar.x = (float)win->edit.scrollbar.x;
23433 edit->scrollbar.y = (float)win->edit.scrollbar.y;
23446 win->edit.cursor = edit->cursor;
23447 win->edit.sel_start = edit->select_start;
23448 win->edit.sel_end = edit->select_end;
23449 win->edit.mode = edit->mode;
23450 win->edit.scrollbar.x = (nk_uint)edit->scrollbar.x;
23451 win->edit.scrollbar.y = (nk_uint)edit->scrollbar.y;
23458 struct nk_window *win;
23477 win = ctx->current;
23481 in = (win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
23484 hash = win->edit.seq++;
23485 if (win->edit.active && hash == win->edit.name) {
23494 edit->active = (unsigned char)win->edit.active;
23496 edit->mode = win->edit.mode;
23501 ret_flags = nk_do_edit(&ctx->last_widget_state, &win->buffer, bounds, flags,
23508 win->edit.active = nk_true;
23509 win->edit.name = hash;
23512 win->edit.active = nk_false;
23841 struct nk_window *win;
23871 win = ctx->current;
23872 layout = win->layout;
23879 hash = nk_murmur_hash(name, (int)nk_strlen(name), win->property.seq++);
23884 if (win->property.active && hash == win->property.name) {
23885 buffer = win->property.buffer;
23886 len = &win->property.length;
23887 cursor = &win->property.cursor;
23888 state = &win->property.state;
23889 select_begin = &win->property.select_start;
23890 select_end = &win->property.select_end;
23903 in = ((s == NK_WIDGET_ROM && !win->property.active) ||
23905 nk_do_property(&ctx->last_widget_state, &win->buffer, bounds, name,
23910 if (in && *state != NK_PROPERTY_DEFAULT && !win->property.active) {
23912 win->property.active = 1;
23913 NK_MEMCPY(win->property.buffer, buffer, (nk_size)*len);
23914 win->property.length = *len;
23915 win->property.cursor = *cursor;
23916 win->property.state = *state;
23917 win->property.name = hash;
23918 win->property.select_start = *select_begin;
23919 win->property.select_end = *select_end;
23932 win->property.select_start = 0;
23933 win->property.select_end = 0;
23934 win->property.active = 0;
24036 struct nk_window *win;
24055 win = ctx->current;
24057 chart = &win->layout->chart;
24082 nk_draw_image(&win->buffer, bounds, &background->data.image, nk_white);
24084 nk_fill_rect(&win->buffer, bounds, style->rounding, style->border_color);
24085 nk_fill_rect(&win->buffer, nk_shrink_rect(bounds, style->border),
24128 nk_chart_push_line(struct nk_context *ctx, struct nk_window *win,
24131 struct nk_panel *layout = win->layout;
24133 struct nk_command_buffer *out = &win->buffer;
24198 nk_chart_push_column(const struct nk_context *ctx, struct nk_window *win,
24201 struct nk_command_buffer *out = &win->buffer;
24203 struct nk_panel *layout = win->layout;
24247 struct nk_window *win;
24256 win = ctx->current;
24257 if (win->layout->chart.slot < slot) return nk_false;
24258 switch (win->layout->chart.slots[slot].type) {
24260 flags = nk_chart_push_line(ctx, win, &win->layout->chart, value, slot); break;
24262 flags = nk_chart_push_column(ctx, win, &win->layout->chart, value, slot); break;
24277 struct nk_window *win;
24285 win = ctx->current;
24286 chart = &win->layout->chart;
24511 struct nk_window *win;
24526 win = ctx->current;
24528 layout = win->layout;
24532 return nk_do_color_picker(&ctx->last_widget_state, &win->buffer, color, fmt, bounds,
24553 nk_combo_begin(struct nk_context *ctx, struct nk_window *win,
24568 popup = win->popup.win;
24574 hash = win->popup.combo_count++;
24576 is_active = (popup && (win->popup.name == hash) && win->popup.type == NK_PANEL_COMBO);
24582 win->popup.type = NK_PANEL_COMBO;
24583 win->popup.name = hash;
24591 struct nk_window *win;
24607 win = ctx->current;
24613 in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;
24630 nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
24633 nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);
24634 nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);
24666 nk_widget_text(&win->buffer, label, selected, len, &text,
24670 nk_draw_button_symbol(&win->buffer, &button, &content, ctx->last_widget_state,
24673 return nk_combo_begin(ctx, win, size, is_clicked, header);
24683 struct nk_window *win;
24698 win = ctx->current;
24704 in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;
24716 nk_draw_image(&win->buffer, header, &background->data.image,nk_white);
24718 nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);
24719 nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);
24749 nk_fill_rect(&win->buffer, bounds, 0, color);
24752 nk_draw_button_symbol(&win->buffer, &button, &content, ctx->last_widget_state,
24755 return nk_combo_begin(ctx, win, size, is_clicked, header);
24760 struct nk_window *win;
24777 win = ctx->current;
24783 in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;
24801 nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
24804 nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);
24805 nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);
24835 nk_draw_symbol(&win->buffer, symbol, bounds, sym_background, symbol_color,
24839 nk_draw_button_symbol(&win->buffer, &bounds, &content, ctx->last_widget_state,
24842 return nk_combo_begin(ctx, win, size, is_clicked, header);
24848 struct nk_window *win;
24865 win = ctx->current;
24870 in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;
24890 nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
24893 nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);
24894 nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);
24919 nk_draw_button_symbol(&win->buffer, &button, &content, ctx->last_widget_state,
24927 nk_draw_symbol(&win->buffer, symbol, image, text.background, symbol_color,
24936 nk_widget_text(&win->buffer, label, selected, len, &text, NK_TEXT_LEFT, style->font);
24938 return nk_combo_begin(ctx, win, size, is_clicked, header);
24943 struct nk_window *win;
24958 win = ctx->current;
24964 in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;
24976 nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
24978 nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);
24979 nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);
25009 nk_draw_image(&win->buffer, bounds, &img, nk_white);
25012 nk_draw_button_symbol(&win->buffer, &bounds, &content, ctx->last_widget_state,
25015 return nk_combo_begin(ctx, win, size, is_clicked, header);
25021 struct nk_window *win;
25037 win = ctx->current;
25042 in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;
25059 nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
25062 nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);
25063 nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);
25088 nk_draw_button_symbol(&win->buffer, &button, &content, ctx->last_widget_state,
25096 nk_draw_image(&win->buffer, image, &img, nk_white);
25104 nk_widget_text(&win->buffer, label, selected, len, &text, NK_TEXT_LEFT, style->font);
25106 return nk_combo_begin(ctx, win, size, is_clicked, header);
25320 struct nk_window *win;
25332 win = ctx->current;
25334 if (win->popup.win && (win->popup.type & NK_PANEL_SET_NONBLOCK))
25339 x = nk_ifloorf(in->mouse.pos.x + 1) - (int)win->layout->clip.x;
25340 y = nk_ifloorf(in->mouse.pos.y + 1) - (int)win->layout->clip.y;
25349 if (ret) win->layout->flags &= ~(nk_flags)NK_WINDOW_ROM;
25350 win->popup.type = NK_PANEL_TOOLTIP;