Lines Matching defs:ratio
193 /// // fixed widget window ratio width
2093 /// specify each column pixel or window ratio in a row. It supports either
2094 /// directly setting per column pixel width or widget window ratio but not
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
2130 /// functions. Instead of pushing either pixel or window ratio for every widget
2139 /// nk_layout_row(ctx, NK_STATIC, 30, 2, ratio);
2145 /// // two rows with height: 30 composed of two widgets with window ratio 0.25 and 0.75
2146 /// const float ratio[] = {0.25, 0.75};
2147 /// nk_layout_row(ctx, NK_DYNAMIC, 30, 2, ratio);
2153 /// // two rows with auto generated height composed of two widgets with window ratio 0.25 and 0.75
2154 /// const float ratio[] = {0.25, 0.75};
2155 /// nk_layout_row(ctx, NK_DYNAMIC, 30, 2, ratio);
2205 /// and size hereby can be either specified as ratio of allocated space or
2236 /// nk_layout_ratio_from_pixel | Utility functions to calculate window ratio from pixel size
2241 /// nk_layout_row_push | Pushes another column with given size or window ratio
2243 /// nk_layout_row | Specifies row columns in array as either window ratio or size
2252 /// nk_layout_space_push | Pushes position and size of the next widget in own coordinate space either as pixel or ratio
2302 /// Utility functions to calculate window ratio from pixel size
2310 /// __pixel__ | Pixel_width to convert to window ratio
2355 /// __fmt__ | either `NK_DYNAMIC` for window ratio or `NK_STATIC` for fixed size columns
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
2384 /// Specifies row columns in array as either window ratio or size
2386 /// void nk_layout_row(struct nk_context*, enum nk_layout_format, float height, int cols, const float *ratio);
2392 /// __fmt__ | Either `NK_DYNAMIC` for window ratio or `NK_STATIC` for fixed size columns
2396 NK_API void nk_layout_row(struct nk_context*, enum nk_layout_format, float height, int cols, const float *ratio);
2465 /// __fmt__ | Either `NK_DYNAMIC` for window ratio or `NK_STATIC` for fixed size columns
2471 /// Pushes position and size of the next widget in own coordinate space either as pixel or ratio
5303 const float *ratio;
15691 layout->row.ratio = 0;
17707 win->layout->row.ratio = 0;
17752 layout->row.ratio = 0;
17777 float ratio = ratio_or_width;
17778 if ((ratio + layout->row.filled) > 1.0f) return;
17779 if (ratio > 0.0f)
17780 layout->row.item_width = NK_SATURATE(ratio);
17806 float height, int cols, const float *ratio)
17825 layout->row.ratio = ratio;
17827 if (ratio[i] < 0.0f)
17829 else r += ratio[i];
17835 layout->row.ratio = ratio;
17860 layout->row.ratio = 0;
18001 layout->row.ratio = 0;
18193 /* scaling single ratio widget width */
18217 float ratio, w;
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];
18222 w = (ratio * panel_space);
18229 layout->row.filled += ratio;
18239 /* scaling single ratio widget width */
18260 item_width = layout->row.ratio[layout->row.index];
21019 float ratio = 0;
21029 ratio = (slider_value - slider_min)/slider_step;
21030 logical_cursor->x = bounds.x + (logical_cursor->w * ratio);
21275 float ratio = NK_MAX(0, (float)(in->mouse.pos.x - cursor.x)) / (float)cursor.w;
21276 value = (nk_size)NK_CLAMP(0, (float)max * ratio, (float)max);
24141 float ratio;
24146 ratio = (value - g->slots[slot].min) / range;
24151 g->slots[slot].last.y = (g->y + g->h) - ratio * (float)g->h;
24173 cur.y = (g->y + g->h) - (ratio * (float)g->h);
24205 float ratio;
24222 ratio = (value + NK_ABS(chart->slots[slot].min)) / NK_ABS(chart->slots[slot].range);
24223 item.y = (chart->y + chart->h) - chart->h * ratio;
24225 ratio = (value - chart->slots[slot].max) / chart->slots[slot].range;
24226 item.y = chart->y + (chart->h * NK_ABS(ratio)) - item.h;