Lines Matching +defs:tab +defs:width

187 ///     // fixed widget pixel width
193 /// // fixed widget window ratio width
198 /// // custom widget pixel width
1397 /// nk_window_get_size | Returns the size with width and height of the currently processed window
1398 /// nk_window_get_width | Returns the width of the currently processed window
1565 /// Returns the size with width and height of the currently processed window.
1577 /// Returns a `nk_vec2` struct with window width and height
1581 /// Returns the width of the currently processed window.
1593 /// Returns the current window width
2036 /// if the owning window grows in width. So the number of columns dictates
2068 /// widget with same horizontal pixel width inside the row and does not grow
2073 /// // first row with height: 30 composed of two widgets with width: 80
2094 /// directly setting per column pixel width or widget window ratio but not
2101 /// // first row with height: 25 composed of two widgets with width 60 and 40
2137 /// // two rows with height: 30 composed of two widgets with width 60 and 40
2170 /// one is the `nk_layout_row_template_push_static` with fixed widget pixel width.
2191 /// nk_widget(...); // static widget with fixed 80 pixel width
2235 /// nk_layout_widget_bounds | Calculates current width a static layout row can fit inside a window
2247 /// nk_layout_row_template_push_variable | Adds a variable column that dynamically grows but does not shrink below specified pixel width
2289 /// Returns the width of the next row allocate by one of the layouting functions
2342 /// __width__ | Holds pixel width of each widget in the row
2361 /// Specifies either window ratio or width of a single column
2369 /// __value__ | either a window ratio or fixed width depending on @fmt in previous `nk_layout_row_begin` call
2422 /// Adds a variable column that dynamically grows but does not shrink below specified pixel width
2430 /// __width__ | Holds the minimum pixel width the next column must always be
2436 /// void nk_layout_row_template_push_static(struct nk_context*, float width);
2442 /// __width__ | Holds the absolute pixel width value the next column must be
2444 NK_API void nk_layout_row_template_push_static(struct nk_context*, float width);
3532 NK_API int nk_tooltip_begin(struct nk_context*, float width);
3763 font and a callback to calculate the width of a string. This way of handling
3781 font.width = your_text_width_calculation;
3805 glyph.width = ...;
3819 font.width = your_text_width_calculation;
3854 The baking process returns image memory, width and height which can be used to
3908 float width, height;
3920 nk_text_width_f width;
3921 /* font string width in pixel callback */
4052 NK_API const void* nk_font_atlas_bake(struct nk_font_atlas*, int *width, int *height, enum nk_font_atlas_format);
5234 struct nk_style_tab tab;
5907 NK_LIB void nk_row_layout(struct nk_context *ctx, enum nk_layout_format fmt, float height, int cols, int width);
6914 int width = NK_DEFAULT;
6942 /* width argument */
6943 width = NK_DEFAULT;
6946 width = nk_strtoi(iter, &end);
6948 width = -1;
6951 width = va_arg(args, int);
6987 NK_ASSERT(width == NK_DEFAULT);
6996 NK_ASSERT(width == NK_DEFAULT);
7005 NK_ASSERT(width == NK_DEFAULT);
7013 int cur_width = NK_MAX(width, 0);
7033 /* fill left padding up to a total of `width` characters */
7060 /* fill right padding up to width characters */
7070 int cur_width = NK_MAX(width, 0);
7101 /* fill left padding up to a total of `width` characters */
7134 /* fill right padding up to width characters */
7143 int prefix, cur_width = NK_MAX(width, 0);
7162 /* fill left padding up to a total of `width` characters */
7197 /* fill right padding up to width characters */
7338 float width = 0;
7349 while (glyph_len && (width < space) && (len < text_len)) {
7351 s = font->width(font->userdata, font->height, text, len);
7354 sep_width = last_width = width;
7360 last_width = sep_width = width;
7363 width = s;
7395 glyph_width = font->width(font->userdata, font->height, begin, glyph_len);
7423 glyph_width = font->width(font->userdata, font->height, begin+text_len, glyph_len);
9186 text_width = font->width(font->userdata, font->height, string, length);
10376 gw = g.width; gh = g.height;
10581 int width;
10590 /* we allocate two extra nodes so optimal user-node-count is 'width' not 'width+2' */
10618 /* I.e. num_nodes * align >= width */
10619 /* align >= width / num_nodes */
10620 /* align = ceil(width/num_nodes) */
10621 context->align = (context->width + context->num_nodes-1) / context->num_nodes;
10625 nk_rp_init_target(struct nk_rp_context *context, int width, int height,
10630 NK_ASSERT(width <= 0xffff && height <= 0xffff);
10640 context->width = width;
10645 /* node 0 is the full width, node 1 is the sentinel (lets us not store width explicitly) */
10649 context->extra[1].x = (nk_rp_coord) width;
10656 int x0, int width, int *pwaste)
10659 int x1 = x0 + width;
10687 if (under_width + visited_width > width)
10688 under_width = width - visited_width;
10698 nk_rp__skyline_find_best_pos(struct nk_rp_context *c, int width, int height)
10705 width = (width + c->align - 1);
10706 width -= width % c->align;
10707 NK_ASSERT(width % c->align == 0);
10711 while (node->x + width <= c->width) {
10713 y = nk_rp__skyline_find_min_y(c, node, node->x, width, &waste);
10759 while (tail->x < width)
10763 int xpos = tail->x - width;
10772 y = nk_rp__skyline_find_min_y(c, node, xpos, width, &waste);
10793 nk_rp__skyline_pack_rectangle(struct nk_rp_context *context, int width, int height)
10796 struct nk_rp__findresult res = nk_rp__skyline_find_best_pos(context, width, height);
10830 while (cur->next && cur->next->x <= res.x + width) {
10840 if (cur->x < res.x + width)
10841 cur->x = (nk_rp_coord) (res.x + width);
10964 int width;
12272 spc->width = pw;
12436 /* The prefilter is a box filter of width "oversample", */
12728 nk_size *image_memory, int *width, int *height, struct nk_recti *custom,
12740 NK_ASSERT(width);
12746 if (!image_memory || !width || !height || !config_list || !count) return nk_false;
12762 *width = (total_glyph_count > 1000) ? 1024 : 512;
12763 nk_tt_PackBegin(&baker->spc, 0, (int)*width, (int)max_height, 0, 1, alloc);
12837 *image_memory = (nk_size)(*width) * (nk_size)(*height);
12841 nk_font_bake(struct nk_font_baker *baker, void *image_memory, int width, int height,
12851 NK_ASSERT(width);
12857 if (!image_memory || !width || !height || !config_list ||
12862 nk_zero(image_memory, (nk_size)((nk_size)width * (nk_size)height));
12918 nk_tt_GetPackedQuad(range->chardata_for_range, (int)width,
12932 glyph->u0 = q.s0 * (float)width;
12934 glyph->u1 = q.s1 * (float)width;
13058 glyph->width = (g->x1 - g->x0) * scale;
13116 font->handle.width = nk_font_text_width;
13712 nk_font_atlas_bake(struct nk_font_atlas *atlas, int *width, int *height,
13727 NK_ASSERT(width);
13729 if (!atlas || !width || !height ||
13759 if (!nk_font_bake_pack(baker, &img_size, width, height, &atlas->custom,
13770 nk_font_bake(baker, atlas->pixel, *width, *height,
13772 nk_font_bake_custom_data(atlas->pixel, *width, *height, atlas->custom,
13778 (nk_size)(*width * *height * 4));
13781 nk_font_bake_convert(img_rgba, *width, *height, atlas->pixel);
13785 atlas->tex_width = *width;
13809 cursor->img.w = (unsigned short)*width;
14287 struct nk_style_tab *tab;
14671 /* tab */
14672 tab = &style->tab;
14673 tab->background = nk_style_item_color(table[NK_COLOR_TAB_HEADER]);
14674 tab->border_color = table[NK_COLOR_BORDER];
14675 tab->text = table[NK_COLOR_TEXT];
14676 tab->sym_minimize = NK_SYMBOL_TRIANGLE_RIGHT;
14677 tab->sym_maximize = NK_SYMBOL_TRIANGLE_DOWN;
14678 tab->padding = nk_vec2(4,4);
14679 tab->spacing = nk_vec2(4,4);
14680 tab->indent = 10.0f;
14681 tab->border = 1;
14682 tab->rounding = 0;
14684 /* tab button */
14685 button = &style->tab.tab_minimize_button;
14703 style->tab.tab_maximize_button =*button;
14706 button = &style->tab.node_minimize_button;
14724 style->tab.node_maximize_button =*button;
15796 float t = font->width(font->userdata, font->height, title, text_len);
16082 /* window is visible and not tab */
16279 NK_ASSERT(ctx->style.font && ctx->style.font->width && "if this triggers you forgot to add a font");
17691 float height, int cols, int width)
17710 win->layout->row.item_width = (float)width;
17823 /* calculate width of undefined widget ratios */
17911 nk_layout_row_template_push_static(struct nk_context *ctx, float width)
17928 layout->row.templates[layout->row.columns++] = width;
17954 float width = layout->row.templates[i];
17955 if (width >= 0.0f) {
17956 total_fixed_width += width;
17957 min_fixed_width += width;
17958 } else if (width < -1.0f) {
17959 width = -width;
17960 total_fixed_width += width;
17961 max_variable_width = NK_MAX(max_variable_width, width);
17976 float *width = &layout->row.templates[i];
17977 *width = (*width >= 0.0f)? *width: (*width < -1.0f && !enough_space)? -(*width): var_width;
18183 /* calculate the width of one item inside the current layout space */
18186 /* scaling fixed size widgets item width */
18193 /* scaling single ratio widget width */
18206 /* panel width depended free widget placing */
18216 /* scaling arrays of panel width ratios for every widget */
18233 /* non-scaling fixed widgets item width */
18239 /* scaling single ratio widget width */
18258 /* non-scaling array of panel pixel width for every widget */
18265 /* stretchy row layout with combined dynamic/static widget width*/
18384 row_height = style->font->height + 2 * style->tab.padding.y;
18391 const struct nk_style_item *background = &style->tab.background;
18397 nk_fill_rect(out, header, 0, style->tab.border_color);
18398 nk_fill_rect(out, nk_shrink_rect(header, style->tab.border),
18399 style->tab.rounding, background->data.color);
18411 symbol = style->tab.sym_maximize;
18413 button = &style->tab.tab_maximize_button;
18414 else button = &style->tab.node_maximize_button;
18416 symbol = style->tab.sym_minimize;
18418 button = &style->tab.tab_minimize_button;
18419 else button = &style->tab.node_minimize_button;
18424 sym.y = header.y + style->tab.padding.y;
18425 sym.x = header.x + style->tab.padding.x;
18433 sym.w = style->font->height + style->tab.spacing.x;}
18441 label.w = header.w - (sym.w + item_spacing.y + style->tab.indent);
18443 text.text = style->tab.text;
18450 layout->at_x = header.x + (float)*layout->offset_x + style->tab.indent;
18451 layout->bounds.w = NK_MAX(layout->bounds.w, style->tab.indent);
18452 layout->bounds.w -= (style->tab.indent + style->window.padding.x);
18505 layout->at_x -= ctx->style.tab.indent + ctx->style.window.padding.x;
18506 layout->bounds.w += ctx->style.tab.indent + ctx->style.window.padding.x;
18570 row_height = style->font->height + 2 * style->tab.padding.y;
18577 const struct nk_style_item *background = &style->tab.background;
18583 nk_fill_rect(out, header, 0, style->tab.border_color);
18584 nk_fill_rect(out, nk_shrink_rect(header, style->tab.border),
18585 style->tab.rounding, background->data.color);
18594 symbol = style->tab.sym_maximize;
18596 button = &style->tab.tab_maximize_button;
18597 else button = &style->tab.node_maximize_button;
18599 symbol = style->tab.sym_minimize;
18601 button = &style->tab.tab_minimize_button;
18602 else button = &style->tab.node_minimize_button;
18606 sym.y = header.y + style->tab.padding.y;
18607 sym.x = header.x + style->tab.padding.x;
18616 text_width = style->font->width(style->font->userdata, style->font->height, title, text_len);
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;
18634 layout->bounds.w = NK_MAX(layout->bounds.w, style->tab.indent);
18635 layout->bounds.w -= (style->tab.indent + style->window.padding.x);
19275 text_width = f->width(f->userdata, f->height, (const char*)string, len);
19308 float width;
19333 fitting = nk_text_clamp(f, string, len, line.w, &glyphs, &width, seperator,NK_LEN(seperator));
19339 fitting = nk_text_clamp(f, &string[done], len - done, line.w, &glyphs, &width, seperator,NK_LEN(seperator));
21729 return font->width(font->userdata, font->height, str, len);
22848 glyph_width = font->width(font->userdata, font->height, text+text_len, glyph_len);
23019 /* tab handler */
23020 {int tab = nk_input_is_key_pressed(in, NK_KEY_TAB);
23021 if (tab && (flags & NK_EDIT_ALLOW_TAB)) {
23085 glyph_width = font->width(font->userdata, font->height, text, glyph_len);
23151 glyph_width = font->width(font->userdata, font->height, text+text_len, glyph_len);
23160 glyph_width = font->width(font->userdata, font->height,
23330 label.w = font->width(font->userdata, font->height, cursor_ptr, glyph_len);
23664 size = font->width(font->userdata, font->height, name, name_len);
23678 size = font->width(font->userdata, font->height, buffer, *len);
23698 size = font->width(font->userdata, font->height, string, num_len);
25317 nk_tooltip_begin(struct nk_context *ctx, float width)
25337 w = nk_iceilf(width);
25388 text_width = style->font->width(style->font->userdata,
25617 /// for width and height to have more control over the popup size.
25702 /// to wrong wiget width calculation which results in widgets falsly
25715 /// wrong item spacing and panel width.