Lines Matching refs:popup

5423     struct nk_popup_state popup;
5913 /* popup */
15105 /* free unused popup windows */
15106 if (iter->popup.win && iter->popup.win->seq != ctx->seq) {
15107 nk_free_window(ctx, iter->popup.win);
15108 iter->popup.win = 0;
15158 /* save buffer fill state for popup */
15159 buf = &win->popup.buf;
15174 buf = &win->popup.buf;
15197 if (!win->popup.buf.active) return;
15199 buf = &win->popup.buf;
15245 /* append all popup draw commands into lists */
15250 if (!it->popup.buf.active)
15253 buf = &it->popup.buf;
16112 if (window->popup.active_con && window->popup.con_old != window->popup.con_count) {
16113 window->popup.con_count = 0;
16114 window->popup.con_old = 0;
16115 window->popup.active_con = 0;
16117 window->popup.con_old = window->popup.con_count;
16118 window->popup.con_count = 0;
16120 window->popup.combo_count = 0;
16148 if (win->popup.win) {
16149 nk_free_window(ctx, win->popup.win);
16150 win->popup.win = 0;
16307 win->popup.win = 0;
16360 if (iter->popup.win && iter->popup.active && !(iter->flags & NK_WINDOW_HIDDEN) &&
16362 iter->popup.win->bounds.x, iter->popup.win->bounds.y,
16363 iter->popup.win->bounds.w, iter->popup.win->bounds.h))
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))
16574 /* check if window popup is being hovered */
16575 if (iter->popup.active && iter->popup.win && nk_input_is_mouse_hovering_rect(&ctx->input, iter->popup.win->bounds))
16805 struct nk_window *popup;
16827 popup = win->popup.win;
16828 if (!popup) {
16829 popup = (struct nk_window*)nk_create_window(ctx);
16830 popup->parent = win;
16831 win->popup.win = popup;
16832 win->popup.active = 0;
16833 win->popup.type = NK_PANEL_POPUP;
16836 /* make sure we have correct popup */
16837 if (win->popup.name != title_hash) {
16838 if (!win->popup.active) {
16839 nk_zero(popup, sizeof(*popup));
16840 win->popup.name = title_hash;
16841 win->popup.active = 1;
16842 win->popup.type = NK_PANEL_POPUP;
16846 /* popup position is local to window */
16847 ctx->current = popup;
16851 /* setup popup data */
16852 popup->parent = win;
16853 popup->bounds = rect;
16854 popup->seq = ctx->seq;
16855 popup->layout = (struct nk_panel*)nk_create_panel(ctx);
16856 popup->flags = flags;
16857 popup->flags |= NK_WINDOW_BORDER;
16859 popup->flags |= NK_WINDOW_DYNAMIC;
16861 popup->buffer = win->buffer;
16864 nk_push_scissor(&popup->buffer, nk_null_rect);
16867 /* popup is running therefore invalidate parent panels */
16875 win->popup.active = 1;
16876 popup->layout->offset_x = &popup->scrollbar.x;
16877 popup->layout->offset_y = &popup->scrollbar.y;
16878 popup->layout->parent = win->layout;
16881 /* popup was closed/is invalid so cleanup */
16888 win->popup.buf.active = 0;
16889 win->popup.active = 0;
16892 nk_free_panel(ctx, popup->layout);
16893 popup->layout = 0;
16902 struct nk_window *popup;
16918 popup = win->popup.win;
16919 if (!popup) {
16920 /* create window for nonblocking popup */
16921 popup = (struct nk_window*)nk_create_window(ctx);
16922 popup->parent = win;
16923 win->popup.win = popup;
16924 win->popup.type = panel_type;
16925 nk_command_buffer_init(&popup->buffer, &ctx->memory, NK_CLIPPING_ON);
16927 /* close the popup if user pressed outside or in the header */
16939 win->popup.header = header;
16950 popup->bounds = body;
16951 popup->parent = win;
16952 popup->layout = (struct nk_panel*)nk_create_panel(ctx);
16953 popup->flags = flags;
16954 popup->flags |= NK_WINDOW_BORDER;
16955 popup->flags |= NK_WINDOW_DYNAMIC;
16956 popup->seq = ctx->seq;
16957 win->popup.active = 1;
16958 NK_ASSERT(popup->layout);
16961 popup->buffer = win->buffer;
16962 nk_push_scissor(&popup->buffer, nk_null_rect);
16963 ctx->current = popup;
16966 win->buffer = popup->buffer;
16967 popup->layout->parent = win->layout;
16968 popup->layout->offset_x = &popup->scrollbar.x;
16969 popup->layout->offset_y = &popup->scrollbar.y;
16983 struct nk_window *popup;
16987 popup = ctx->current;
16988 NK_ASSERT(popup->parent);
16989 NK_ASSERT(popup->layout->type & NK_PANEL_SET_POPUP);
16990 popup->flags |= NK_WINDOW_HIDDEN;
16996 struct nk_window *popup;
17004 popup = ctx->current;
17005 if (!popup->parent) return;
17006 win = popup->parent;
17007 if (popup->flags & NK_WINDOW_HIDDEN) {
17014 win->popup.active = 0;
17016 nk_push_scissor(&popup->buffer, nk_null_rect);
17019 win->buffer = popup->buffer;
17027 struct nk_window *popup;
17035 popup = ctx->current;
17037 *offset_x = popup->scrollbar.x;
17039 *offset_y = popup->scrollbar.y;
17044 struct nk_window *popup;
17052 popup = ctx->current;
17053 popup->scrollbar.x = offset_x;
17054 popup->scrollbar.y = offset_y;
17070 struct nk_window *popup;
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;
17106 body.x = popup->bounds.x;
17107 body.y = popup->bounds.y;
17112 /* start nonblocking contextual popup */
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;
17243 struct nk_window *popup;
17249 popup = ctx->current;
17250 panel = popup->layout;
17251 NK_ASSERT(popup->parent);
17255 This is a bit of a hack solution since we do not know before we end our popup
17257 click outside the non-blocking popup must close it at that direct frame.
17269 popup->flags |= NK_WINDOW_HIDDEN;
17272 if (popup->flags & NK_WINDOW_HIDDEN)
17273 popup->seq = 0;
17362 struct nk_window *popup;
17376 popup = win->popup.win;
17377 is_open = popup ? nk_true : nk_false;
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;
17662 a window, group, popup, combobox or contextual menu `begin` and `end` block.
19158 a window, group, popup, combobox or contextual menu `begin` and `end` block.
24556 struct nk_window *popup;
24568 popup = win->popup.win;
24574 hash = win->popup.combo_count++;
24575 is_open = (popup) ? nk_true:nk_false;
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;
25209 /* calculate popup window */
25262 /* calculate popup window */
25331 /* make sure that no nonblocking popup is currently active */
25334 if (win->popup.win && (win->popup.type & NK_PANEL_SET_NONBLOCK))
25350 win->popup.type = NK_PANEL_TOOLTIP;
25548 /// - 2017/03/25 (1.35.2) - Fixed popup overlapping for `NK_WINDOW_BACKGROUND` windows.
25569 /// - 2016/11/19 (1.28.3) - Fixed memory leak caused by popup repeated closing.
25570 /// - 2016/11/18 (1.28.2) - Fixed memory leak caused by popup panel allocation.
25613 /// - 2016/09/13 (1.21.0) - !BREAKING! Fixed nonblocking popup behavior in menu, combo,
25615 /// popup did not reach max height.
25617 /// for width and height to have more control over the popup size.
25656 /// - 2016/08/30 (1.13.1) - Fixed popup panel padding handling which was previously just
25677 /// - 2016/08/16 (1.09.5) - Fixed ROM mode for deeper levels of popup windows parents.
25716 /// - 2016/08/07 (1.05.1) - Hopefully finally fixed combobox popup drawing bug.