Lines Matching defs:header
40 /// - Single header library
74 /// This library is self contained in one single header file and can be used either
75 /// in header only mode or in implementation mode. The header only mode is used
76 /// by default when included and allows including this header in other headers
88 /// below in header and implementation mode if you want to use additional functionality
98 /// NK_INCLUDE_FIXED_TYPES | If defined it will include header `<stdint.h>` for fixed sized types otherwise nuklear tries to select the correct type. If that fails it will throw a compiler error and you have to select the correct types yourself.
99 /// NK_INCLUDE_DEFAULT_ALLOCATOR | If defined it will include header `<stdlib.h>` and provide additional functions to use this library without caring for memory allocation control and therefore ease memory management.
100 /// NK_INCLUDE_STANDARD_IO | If defined it will include header `<stdio.h>` and provide additional functions depending on file loading.
101 /// NK_INCLUDE_STANDARD_VARARGS | If defined it will include header <stdio.h> and provide additional functions depending on file loading.
118 /// The following flags if defined need to be defined for both header and implementation:
137 /// The following constants if defined need to be defined for both header and implementation:
160 /// The following dependencies if defined need to be defined for both header and implementation:
1433 /// NK_WINDOW_MOVABLE | The movable flag indicates that a window can be moved by user input or by dragging the window header
1435 /// NK_WINDOW_CLOSABLE | Adds a closable icon into the header
1436 /// NK_WINDOW_MINIMIZABLE | Adds a minimize icon into the header
1438 /// NK_WINDOW_TITLE | Forces a header at the top at the window showing the title
1495 /// __title__ | Window title displayed inside header if flag `NK_WINDOW_TITLE` or either `NK_WINDOW_CLOSABLE` or `NK_WINDOW_MINIMIZED` was set
2659 /// __title__ | Must be an unique identifier for this group that is also used for the group header
2675 /// __title__ | Group header title
2704 /// __title__ | Window unique group title used to both identify and display in the group header
2721 /// __title__ | Window unique group title used to both identify and display in the group header
2800 /// The tree header does not require and layouting function and instead
2821 /// nk_tree_image_push | Start a collapsable UI section with image and label header
2822 /// nk_tree_image_push_id | Start a collapsable UI section with image and label header and internal state management callable in a look
2823 /// nk_tree_image_push_hashed | Start a collapsable UI section with image and label header and internal state management with full control over internal unique ID use to store state
2827 /// nk_tree_state_image_push | Start a collapsable UI section with image and label header and external state management
2833 /// NK_TREE_NODE | Highlighted tree header to mark a collapsable UI section
2834 /// NK_TREE_TAB | Non-highighted tree header closer to tree representations
2851 /// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
2852 /// __title__ | Label printed in the tree header
2867 /// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
2868 /// __title__ | Label printed in the tree header
2885 /// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
2886 /// __title__ | Label printed in the tree header
2896 /// Start a collapsable UI section with image and label header
2910 /// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
2911 /// __img__ | Image to display inside the header on the left of the label
2912 /// __title__ | Label printed in the tree header
2919 /// Start a collapsable UI section with image and label header and internal state
2929 /// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
2930 /// __img__ | Image to display inside the header on the left of the label
2931 /// __title__ | Label printed in the tree header
2948 /// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
2949 /// __img__ | Image to display inside the header on the left of the label
2950 /// __title__ | Label printed in the tree header
2979 /// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
2980 /// __title__ | Label printed in the tree header
2987 /// Start a collapsable UI section with image and label header and external state management
2995 /// __img__ | Image to display inside the header on the left of the label
2996 /// __type__ | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node
2997 /// __title__ | Label printed in the tree header
4397 /* command base and header of every command inside the buffer */
4407 struct nk_command header;
4413 struct nk_command header;
4421 struct nk_command header;
4430 struct nk_command header;
4439 struct nk_command header;
4447 struct nk_command header;
4457 struct nk_command header;
4466 struct nk_command header;
4474 struct nk_command header;
4482 struct nk_command header;
4489 struct nk_command header;
4498 struct nk_command header;
4506 struct nk_command header;
4514 struct nk_command header;
4521 struct nk_command header;
4529 struct nk_command header;
4539 struct nk_command header;
4547 struct nk_command header;
5177 struct nk_style_window_header header;
5380 struct nk_rect header;
5914 NK_LIB int nk_nonblock_begin(struct nk_context *ctx, nk_flags flags, struct nk_rect body, struct nk_rect header, enum nk_panel_type panel_type);
14726 /* window header */
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);
14742 /* window header close button */
14743 button = &style->window.header.close_button;
14762 /* window header minimize button */
14763 button = &style->window.header.minimize_button;
15650 struct nk_rect header;
15651 header.x = win->bounds.x;
15652 header.y = win->bounds.y;
15653 header.w = win->bounds.w;
15655 header.h = font->height + 2.0f * style->window.header.padding.y;
15656 header.h += 2.0f * style->window.header.label_padding.y;
15657 } else header.h = panel_padding.y;
15663 NK_BUTTON_LEFT, header, nk_true);
15705 /* panel header */
15709 struct nk_rect header;
15712 /* calculate header bounds */
15713 header.x = win->bounds.x;
15714 header.y = win->bounds.y;
15715 header.w = win->bounds.w;
15716 header.h = font->height + 2.0f * style->window.header.padding.y;
15717 header.h += (2.0f * style->window.header.label_padding.y);
15719 /* shrink panel by header */
15720 layout->header_height = header.h;
15721 layout->bounds.y += header.h;
15722 layout->bounds.h -= header.h;
15723 layout->at_y += header.h;
15725 /* select correct header background and text color */
15727 background = &style->window.header.active;
15728 text.text = style->window.header.label_active;
15729 } else if (nk_input_is_mouse_hovering_rect(&ctx->input, header)) {
15730 background = &style->window.header.hover;
15731 text.text = style->window.header.label_hover;
15733 background = &style->window.header.normal;
15734 text.text = style->window.header.label_normal;
15737 /* draw header background */
15738 header.h += 1.0f;
15741 nk_draw_image(&win->buffer, header, &background->data.image, nk_white);
15744 nk_fill_rect(out, header, 0, background->data.color);
15749 button.y = header.y + style->window.header.padding.y;
15750 button.h = header.h - 2 * style->window.header.padding.y;
15754 if (style->window.header.align == NK_HEADER_RIGHT) {
15755 button.x = (header.w + header.x) - (button.w + style->window.header.padding.x);
15756 header.w -= button.w + style->window.header.spacing.x + style->window.header.padding.x;
15758 button.x = header.x + style->window.header.padding.x;
15759 header.x += button.w + style->window.header.spacing.x + style->window.header.padding.x;
15763 style->window.header.close_symbol, NK_BUTTON_DEFAULT,
15764 &style->window.header.close_button, in, style->font) && !(win->flags & NK_WINDOW_ROM))
15774 if (style->window.header.align == NK_HEADER_RIGHT) {
15775 button.x = (header.w + header.x) - button.w;
15777 button.x -= style->window.header.padding.x;
15778 header.w -= style->window.header.padding.x;
15780 header.w -= button.w + style->window.header.spacing.x;
15782 button.x = header.x;
15783 header.x += button.w + style->window.header.spacing.x + style->window.header.padding.x;
15786 style->window.header.maximize_symbol: style->window.header.minimize_symbol,
15787 NK_BUTTON_DEFAULT, &style->window.header.minimize_button, in, style->font) && !(win->flags & NK_WINDOW_ROM))
15793 {/* window header title */
15799 label.x = header.x + style->window.header.padding.x;
15800 label.x += style->window.header.label_padding.x;
15801 label.y = header.y + style->window.header.label_padding.y;
15802 label.h = font->height + 2 * style->window.header.label_padding.y;
15803 label.w = t + 2 * style->window.header.spacing.x;
15804 label.w = NK_CLAMP(0, label.w, header.x + header.w - label.x);
16341 float h = ctx->style.font->height + 2.0f * style->window.header.padding.y +
16342 (2.0f * style->window.header.label_padding.y);
16579 struct nk_rect header = iter->bounds;
16580 header.h = ctx->style.font->height + 2 * ctx->style.window.header.padding.y;
16581 if (nk_input_is_mouse_hovering_rect(&ctx->input, header))
16899 nk_flags flags, struct nk_rect body, struct nk_rect header,
16927 /* close the popup if user pressed outside or in the header */
16935 in_header = nk_input_is_mouse_hovering_rect(&ctx->input, header);
16939 win->popup.header = header;
17357 const char *id, int is_clicked, struct nk_rect header, struct nk_vec2 size)
17371 body.x = header.x;
17373 body.y = header.y + header.h;
17381 if (!nk_nonblock_begin(ctx, NK_WINDOW_NO_SCROLLBAR, body, header, NK_PANEL_MENU))
17394 struct nk_rect header;
17405 state = nk_widget(&header, ctx);
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);
17423 struct nk_rect header;
17435 state = nk_widget(&header, ctx);
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);
17449 struct nk_rect header;
17460 state = nk_widget(&header, ctx);
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);
17473 struct nk_rect header;
17485 state = nk_widget(&header, ctx);
17489 header, img, title, len, align, NK_BUTTON_DEFAULT, &ctx->style.menu_button,
17492 return nk_menu_begin(ctx, win, title, is_clicked, header, size);
17505 struct nk_rect header;
17517 state = nk_widget(&header, ctx);
17522 header, sym, title, len, align, NK_BUTTON_DEFAULT, &ctx->style.menu_button,
17524 return nk_menu_begin(ctx, win, title, is_clicked, header, size);
18363 struct nk_rect header = {0,0,0,0};
18383 /* calculate header bounds and draw background */
18389 widget_state = nk_widget(&header, ctx);
18393 nk_draw_image(out, header, &background->data.image, nk_white);
18397 nk_fill_rect(out, header, 0, style->tab.border_color);
18398 nk_fill_rect(out, nk_shrink_rect(header, style->tab.border),
18406 if (nk_button_behavior(&ws, header, in, NK_BUTTON_DEFAULT))
18424 sym.y = header.y + style->tab.padding.y;
18425 sym.x = header.x + style->tab.padding.x;
18438 header.w = NK_MAX(header.w, sym.w + item_spacing.x);
18441 label.w = header.w - (sym.w + item_spacing.y + style->tab.indent);
18450 layout->at_x = header.x + (float)*layout->offset_x + style->tab.indent;
18548 struct nk_rect header = {0,0,0,0};
18569 /* calculate header bounds and draw background */
18575 widget_state = nk_widget(&header, ctx);
18579 nk_draw_image(out, header, &background->data.image, nk_white);
18583 nk_fill_rect(out, header, 0, style->tab.border_color);
18584 nk_fill_rect(out, nk_shrink_rect(header, style->tab.border),
18606 sym.y = header.y + style->tab.padding.y;
18607 sym.x = header.x + style->tab.padding.x;
18619 header.w = NK_MAX(header.w, sym.w + item_spacing.x);
18622 label.w = NK_MIN(header.w - (sym.w + item_spacing.y + style->tab.indent), text_width);
18633 layout->at_x = header.x + (float)*layout->offset_x + style->tab.indent;
24554 struct nk_vec2 size, int is_clicked, struct nk_rect header)
24569 body.x = header.x;
24571 body.y = header.y + header.h-ctx->style.window.combo_border;
24580 (is_clicked && is_open)?nk_rect(0,0,0,0):header, NK_PANEL_COMBO)) return 0;
24596 struct nk_rect header;
24609 s = nk_widget(&header, ctx);
24614 if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))
24617 /* draw combo box header background and border */
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);
24650 button.w = header.h - 2 * style->combo.button_padding.y;
24651 button.x = (header.x + header.w - header.h) - style->combo.button_padding.x;
24652 button.y = header.y + style->combo.button_padding.y;
24662 label.x = header.x + style->combo.content_padding.x;
24663 label.y = header.y + style->combo.content_padding.y;
24665 label.h = header.h - 2 * style->combo.content_padding.y;
24673 return nk_combo_begin(ctx, win, size, is_clicked, header);
24687 struct nk_rect header;
24700 s = nk_widget(&header, ctx);
24705 if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))
24708 /* draw combo box header background and border */
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);
24734 button.w = header.h - 2 * style->combo.button_padding.y;
24735 button.x = (header.x + header.w - header.h) - style->combo.button_padding.x;
24736 button.y = header.y + style->combo.button_padding.y;
24745 bounds.h = header.h - 4 * style->combo.content_padding.y;
24746 bounds.y = header.y + 2 * style->combo.content_padding.y;
24747 bounds.x = header.x + 2 * style->combo.content_padding.x;
24755 return nk_combo_begin(ctx, win, size, is_clicked, header);
24764 struct nk_rect header;
24779 s = nk_widget(&header, ctx);
24784 if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))
24787 /* draw combo box header background and border */
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);
24820 button.w = header.h - 2 * style->combo.button_padding.y;
24821 button.x = (header.x + header.w - header.h) - style->combo.button_padding.y;
24822 button.y = header.y + style->combo.button_padding.y;
24831 bounds.h = header.h - 2 * style->combo.content_padding.y;
24832 bounds.y = header.y + style->combo.content_padding.y;
24833 bounds.x = header.x + style->combo.content_padding.x;
24842 return nk_combo_begin(ctx, win, size, is_clicked, header);
24852 struct nk_rect header;
24867 s = nk_widget(&header, ctx);
24871 if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))
24874 /* draw combo box header background and border */
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);
24910 button.w = header.h - 2 * style->combo.button_padding.y;
24911 button.x = (header.x + header.w - header.h) - style->combo.button_padding.x;
24912 button.y = header.y + style->combo.button_padding.y;
24923 image.x = header.x + style->combo.content_padding.x;
24924 image.y = header.y + style->combo.content_padding.y;
24925 image.h = header.h - 2 * style->combo.content_padding.y;
24933 label.y = header.y + style->combo.content_padding.y;
24935 label.h = header.h - 2 * style->combo.content_padding.y;
24938 return nk_combo_begin(ctx, win, size, is_clicked, header);
24947 struct nk_rect header;
24960 s = nk_widget(&header, ctx);
24965 if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))
24968 /* draw combo box header background and border */
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);
24994 button.w = header.h - 2 * style->combo.button_padding.y;
24995 button.x = (header.x + header.w - header.h) - style->combo.button_padding.y;
24996 button.y = header.y + style->combo.button_padding.y;
25005 bounds.h = header.h - 2 * style->combo.content_padding.y;
25006 bounds.y = header.y + style->combo.content_padding.y;
25007 bounds.x = header.x + style->combo.content_padding.x;
25015 return nk_combo_begin(ctx, win, size, is_clicked, header);
25025 struct nk_rect header;
25039 s = nk_widget(&header, ctx);
25043 if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))
25046 /* draw combo box header background and border */
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);
25079 button.w = header.h - 2 * style->combo.button_padding.y;
25080 button.x = (header.x + header.w - header.h) - style->combo.button_padding.x;
25081 button.y = header.y + style->combo.button_padding.y;
25092 image.x = header.x + style->combo.content_padding.x;
25093 image.y = header.y + style->combo.content_padding.y;
25094 image.h = header.h - 2 * style->combo.content_padding.y;
25101 label.y = header.y + style->combo.content_padding.y;
25103 label.h = header.h - 2 * style->combo.content_padding.y;
25106 return nk_combo_begin(ctx, win, size, is_clicked, header);
25476 /// - 2019/09/20 (4.01.3) - Fixed a bug wherein combobox cannot be closed by clicking the header
25551 /// - 2017/03/18 (1.34.3) - Fixed long window header titles.
25736 /// - 2016/08/01 (1.03.1) - Added helper macros into header include guard.
25737 /// - 2016/07/29 (1.03.0) - Moved the window/table pool into the header part to
25774 /// Barret for his amazing single header libraries which restored my faith
25776 /// for his single header file packer.