Lines Matching defs:row

1998 /// All layouting methods in this library are based around the concept of a row.
1999 /// A row has a height the window content grows by and a number of columns and each
2000 /// layouting method specifies how each widget is placed inside the row.
2001 /// After a row has been allocated by calling a layouting functions and then
2002 /// filled with widgets will advance an internal pointer over the allocated row. <br /><br />
2007 /// functions it will allocate the next row without you having to make another layouting <br /><br />
2011 /// is that you have to define the row height for each. However the row height
2014 /// To fix that internally nuklear uses a minimum row height that is set to the
2015 /// height plus padding of currently active font and overwrites the row height
2018 /// If you manually want to change the minimum row height then
2023 /// row height for you and. This means if you change the font but still want
2024 /// a minimum row height smaller than the font you have to repush your value. <br /><br />
2035 /// widgets with same horizontal space inside the row and dynamically grows
2044 /// library will allocate a new row and keep all layouting parameters previously
2049 /// // first row with height: 30 composed of two widgets
2054 /// // second row with same parameter as defined above
2058 /// // third row uses 0 for height which will use auto layouting
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
2078 /// // second row with same parameter as defined above
2082 /// // third row uses 0 for height which will use auto layouting
2093 /// specify each column pixel or window ratio in a row. It supports either
2101 /// // first row with height: 25 composed of two widgets with width 60 and 40
2109 /// // second row with height: 25 composed of two widgets with window ratio 0.25 and 0.75
2117 /// // third row with auto generated height: composed of two widgets with window ratio 0.25 and 0.75
2169 /// The row template layout has three different per widget size specifier. The first
2171 /// They do not grow if the row grows and will always stay the same.
2188 /// // first row
2193 /// // second row same layout
2204 /// row auto repeat and directly sets position and size of a widget. Position
2212 /// // static row with height: 500 (you can set column count to INT_MAX if you don't want to be bothered)
2220 /// // dynamic row with height: 500 (you can set column count to INT_MAX if you don't want to be bothered)
2233 /// nk_layout_set_min_row_height | Set the currently used minimum row height to a specified value
2234 /// nk_layout_reset_min_row_height | Resets the currently used minimum row height to font height
2235 /// nk_layout_widget_bounds | Calculates current width a static layout row can fit inside a window
2240 /// nk_layout_row_begin | Starts a new row with given height and number of columns
2242 /// nk_layout_row_end | Finished previously started row
2243 /// nk_layout_row | Specifies row columns in array as either window ratio or size
2245 /// nk_layout_row_template_begin | Begins the row template declaration
2249 /// nk_layout_row_template_end | Marks the end of the row template
2262 /// Sets the currently used minimum row height.
2264 /// The passed height needs to include both your preferred row height
2274 /// __height__ | New minimum row height to be used for auto generating the row height
2278 /// Reset the currently used minimum row height back to `font_height + text_padding + padding`
2289 /// Returns the width of the next row allocate by one of the layouting functions
2298 /// Return `nk_rect` with both position and size of the next row
2312 /// Returns `nk_rect` with both position and size of the next row
2316 /// Sets current row layout to share horizontal space
2318 /// calls greater than @cols will allocate a new row with same layout.
2326 /// __height__ | Holds height of each widget in row or zero for auto layouting
2327 /// __columns__ | Number of widget inside row
2331 /// Sets current row layout to fill @cols number of widgets
2332 /// in row with same @item_width horizontal size. Once called all subsequent widget
2333 /// calls greater than @cols will allocate a new row with same layout.
2341 /// __height__ | Holds height of each widget in row or zero for auto layouting
2342 /// __width__ | Holds pixel width of each widget in the row
2343 /// __columns__ | Number of widget inside row
2347 /// Starts a new dynamic or fixed row with given height and columns.
2356 /// __height__ | holds height of each widget in row or zero for auto layouting
2357 /// __columns__ | Number of widget inside row
2373 /// Finished previously started row
2384 /// Specifies row columns in array as either window ratio or size
2393 /// __height__ | Holds height of each widget in row or zero for auto layouting
2394 /// __columns__ | Number of widget inside row
2398 /// Begins the row template declaration
2406 /// __height__ | Holds height of each widget in row or zero for auto layouting
2418 /// __height__ | Holds height of each widget in row or zero for auto layouting
2446 /// Marks the end of the row template
2466 /// __height__ | Holds height of each widget in row or zero for auto layouting
2467 /// __columns__ | Number of widgets inside row
5339 struct nk_row_layout row;
11436 if (was_off) /* two off-curve control points in a row means interpolate an on-curve midpoint */
15689 layout->row.index = 0;
15690 layout->row.columns = 0;
15691 layout->row.ratio = 0;
15692 layout->row.item_width = 0;
15693 layout->row.tree_depth = 0;
15694 layout->row.height = panel_padding.y;
15860 layout->at_y += layout->row.height;
16122 NK_ASSERT(!layout->row.tree_depth);
17263 body.y = (panel->at_y + panel->footer_height + panel->border + padding.y + panel->row.height);
17318 layout->menu.y = layout->at_y + layout->row.height;
17344 layout->bounds.y += layout->menu.h + ctx->style.window.spacing.y + layout->row.height;
17345 layout->bounds.h -= layout->menu.h + ctx->style.window.spacing.y + layout->row.height;
17349 layout->at_y = layout->bounds.y - layout->row.height;
17597 layout->row.min_height = height;
17613 layout->row.min_height = ctx->style.font->height;
17614 layout->row.min_height += ctx->style.text.padding.y*2;
17615 layout->row.min_height += ctx->style.window.min_row_height_padding*2;
17670 /* update the current row and set the current row layout */
17671 layout->row.index = 0;
17672 layout->at_y += layout->row.height;
17673 layout->row.columns = cols;
17675 layout->row.height = NK_MAX(height, layout->row.min_height) + item_spacing.y;
17676 else layout->row.height = height + item_spacing.y;
17678 layout->row.item_offset = 0;
17685 background.h = layout->row.height + 1.0f;
17693 /* update the current row and set the current row layout */
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;
17749 layout->row.type = NK_LAYOUT_DYNAMIC_ROW;
17750 else layout->row.type = NK_LAYOUT_STATIC_ROW;
17752 layout->row.ratio = 0;
17753 layout->row.filled = 0;
17754 layout->row.item_width = 0;
17755 layout->row.item_offset = 0;
17756 layout->row.columns = cols;
17772 NK_ASSERT(layout->row.type == NK_LAYOUT_STATIC_ROW || layout->row.type == NK_LAYOUT_DYNAMIC_ROW);
17773 if (layout->row.type != NK_LAYOUT_STATIC_ROW && layout->row.type != NK_LAYOUT_DYNAMIC_ROW)
17776 if (layout->row.type == NK_LAYOUT_DYNAMIC_ROW) {
17778 if ((ratio + layout->row.filled) > 1.0f) return;
17780 layout->row.item_width = NK_SATURATE(ratio);
17781 else layout->row.item_width = 1.0f - layout->row.filled;
17782 } else layout->row.item_width = ratio_or_width;
17798 NK_ASSERT(layout->row.type == NK_LAYOUT_STATIC_ROW || layout->row.type == NK_LAYOUT_DYNAMIC_ROW);
17799 if (layout->row.type != NK_LAYOUT_STATIC_ROW && layout->row.type != NK_LAYOUT_DYNAMIC_ROW)
17801 layout->row.item_width = 0;
17802 layout->row.item_offset = 0;
17825 layout->row.ratio = ratio;
17832 layout->row.type = NK_LAYOUT_DYNAMIC;
17833 layout->row.item_width = (r > 0 && n_undef > 0) ? (r / (float)n_undef):0;
17835 layout->row.ratio = ratio;
17836 layout->row.type = NK_LAYOUT_STATIC;
17837 layout->row.item_width = 0;
17838 layout->row.item_offset = 0;
17840 layout->row.item_offset = 0;
17841 layout->row.filled = 0;
17858 layout->row.type = NK_LAYOUT_TEMPLATE;
17859 layout->row.columns = 0;
17860 layout->row.ratio = 0;
17861 layout->row.item_width = 0;
17862 layout->row.item_height = 0;
17863 layout->row.item_offset = 0;
17864 layout->row.filled = 0;
17865 layout->row.item.x = 0;
17866 layout->row.item.y = 0;
17867 layout->row.item.w = 0;
17868 layout->row.item.h = 0;
17884 NK_ASSERT(layout->row.type == NK_LAYOUT_TEMPLATE);
17885 NK_ASSERT(layout->row.columns < NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS);
17886 if (layout->row.type != NK_LAYOUT_TEMPLATE) return;
17887 if (layout->row.columns >= NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS) return;
17888 layout->row.templates[layout->row.columns++] = -1.0f;
17904 NK_ASSERT(layout->row.type == NK_LAYOUT_TEMPLATE);
17905 NK_ASSERT(layout->row.columns < NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS);
17906 if (layout->row.type != NK_LAYOUT_TEMPLATE) return;
17907 if (layout->row.columns >= NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS) return;
17908 layout->row.templates[layout->row.columns++] = -min_width;
17924 NK_ASSERT(layout->row.type == NK_LAYOUT_TEMPLATE);
17925 NK_ASSERT(layout->row.columns < NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS);
17926 if (layout->row.type != NK_LAYOUT_TEMPLATE) return;
17927 if (layout->row.columns >= NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS) return;
17928 layout->row.templates[layout->row.columns++] = width;
17951 NK_ASSERT(layout->row.type == NK_LAYOUT_TEMPLATE);
17952 if (layout->row.type != NK_LAYOUT_TEMPLATE) return;
17953 for (i = 0; i < layout->row.columns; ++i) {
17954 float width = layout->row.templates[i];
17970 layout->bounds.w, layout->row.columns);
17975 for (i = 0; i < layout->row.columns; ++i) {
17976 float *width = &layout->row.templates[i];
17998 layout->row.type = NK_LAYOUT_STATIC_FREE;
17999 else layout->row.type = NK_LAYOUT_DYNAMIC_FREE;
18001 layout->row.ratio = 0;
18002 layout->row.filled = 0;
18003 layout->row.item_width = 0;
18004 layout->row.item_offset = 0;
18020 layout->row.item_width = 0;
18021 layout->row.item_height = 0;
18022 layout->row.item_offset = 0;
18023 nk_zero(&layout->row.item, sizeof(layout->row.item));
18039 layout->row.item = rect;
18057 ret.h = layout->row.height;
18076 ret.h = layout->row.height;
18148 const float row_height = layout->row.height - spacing.y;
18149 nk_panel_layout(ctx, win, row_height, layout->row.columns);
18180 layout->bounds.w, layout->row.columns);
18184 switch (layout->row.type) {
18187 float w = NK_MAX(1.0f,panel_space) / (float)layout->row.columns;
18188 item_offset = (float)layout->row.index * w;
18190 item_spacing = (float)layout->row.index * spacing.x;
18194 float w = layout->row.item_width * panel_space;
18195 item_offset = layout->row.item_offset;
18200 layout->row.item_offset += w + spacing.x;
18201 layout->row.filled += layout->row.item_width;
18202 layout->row.index = 0;
18207 bounds->x = layout->at_x + (layout->bounds.w * layout->row.item.x);
18209 bounds->y = layout->at_y + (layout->row.height * layout->row.item.y);
18211 bounds->w = layout->bounds.w * layout->row.item.w + NK_FRAC(bounds->x);
18212 bounds->h = layout->row.height * layout->row.item.h + NK_FRAC(bounds->y);
18218 NK_ASSERT(layout->row.ratio);
18219 ratio = (layout->row.ratio[layout->row.index] < 0) ?
18220 layout->row.item_width : layout->row.ratio[layout->row.index];
18223 item_spacing = (float)layout->row.index * spacing.x;
18224 item_offset = layout->row.item_offset;
18228 layout->row.item_offset += w;
18229 layout->row.filled += ratio;
18234 item_width = layout->row.item_width;
18235 item_offset = (float)layout->row.index * item_width;
18236 item_spacing = (float)layout->row.index * spacing.x;
18240 item_width = layout->row.item_width;
18241 item_offset = layout->row.item_offset;
18242 item_spacing = (float)layout->row.index * spacing.x;
18243 if (modify) layout->row.item_offset += item_width;
18247 bounds->x = layout->at_x + layout->row.item.x;
18248 bounds->w = layout->row.item.w;
18252 bounds->y = layout->at_y + layout->row.item.y;
18254 bounds->h = layout->row.item.h;
18259 item_spacing = (float)layout->row.index * spacing.x;
18260 item_width = layout->row.ratio[layout->row.index];
18261 item_offset = layout->row.item_offset;
18262 if (modify) layout->row.item_offset += item_width;
18265 /* stretchy row layout with combined dynamic/static widget width*/
18267 NK_ASSERT(layout->row.index < layout->row.columns);
18268 NK_ASSERT(layout->row.index < NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS);
18269 w = layout->row.templates[layout->row.index];
18270 item_offset = layout->row.item_offset;
18272 item_spacing = (float)layout->row.index * spacing.x;
18273 if (modify) layout->row.item_offset += w;
18281 bounds->h = layout->row.height - spacing.y;
18300 /* check if the end of the row has been hit and begin new row if so */
18303 if (layout->row.index >= layout->row.columns)
18308 layout->row.index++;
18327 index = layout->row.index;
18328 if (layout->row.index >= layout->row.columns) {
18329 layout->at_y += layout->row.height;
18330 layout->row.index = 0;
18333 if (!layout->row.index) {
18334 bounds->x -= layout->row.item_offset;
18337 layout->row.index = index;
18453 layout->row.tree_depth++;
18507 NK_ASSERT(layout->row.tree_depth);
18508 layout->row.tree_depth--;
18636 layout->row.tree_depth++;
19207 if (layout->row.index == 1) {
19212 if (layout->row.index == layout->row.columns)
19231 /* spacing over row boundaries */
19234 index = (layout->row.index + cols) % layout->row.columns;
19235 rows = (layout->row.index + cols) / layout->row.columns;
19242 if (layout->row.type != NK_LAYOUT_DYNAMIC_FIXED &&
19243 layout->row.type != NK_LAYOUT_STATIC_FIXED) {
19246 } layout->row.index = index;
21702 int first_char, length; /* first char of row, and length */
21703 int prev_first; /*_ first char of previous row */
21710 /* position of baseline relative to previous row's baseline*/
21712 /* height of row above and below baseline */
21791 /* search characters in row for one that straddles 'x' */
21839 * row in case we get a move-up event (for page up, we'll have to rescan) */
22212 struct nk_text_edit_row row;
22231 /* now find character position down a row */
22239 nk_textedit_layout_row(&row, state, state->cursor, row_height, font);
22240 x = row.x0;
22242 for (i=0; i < row.num_chars && x < row.x1; ++i) {
22260 struct nk_text_edit_row row;
22279 /* can only go up if there's a previous row */
22281 /* now find character position up a row */
22286 nk_textedit_layout_row(&row, state, state->cursor, row_height, font);
22287 x = row.x0;
22289 for (i=0; i < row.num_chars && x < row.x1; ++i) {
25528 /// comes in effect if you pass in zero was row height argument.
25531 /// row height derived from font height. If you need a row smaller than
25560 /// - 2017/01/13 (1.31.0) - Added additional row layouting method to combine both