Lines Matching refs:value

180 /// static float value = 0.6f;
204 /// nk_slider_float(&ctx, 0, &value, 1.0f, 0.1f);
815 /// __key__ | Must be any value specified in enum `nk_keys` that needs to be mirrored
829 /// __btn__ | Must be any value specified in enum `nk_buttons` that needs to be mirrored
836 /// Copies the last mouse scroll value to nuklear. Is generally
837 /// a scroll value. So does not have to come from mouse and could also originate
847 /// __val__ | vector with both X- as well as Y-scroll value
1156 float global_alpha; /* global alpha value */
1331 /// is recommended to check the return value of `nk_begin_xxx` and only process
1332 /// widgets inside the window if the value is not 0. Either way you have to call
1944 /// __state__ | value out of nk_collapse_states section
1957 /// __state__ | value out of nk_collapse_states section the window should be put into
2016 /// value if zero. <br /><br />
2024 /// a minimum row height smaller than the font you have to repush your value. <br /><br />
2095 /// both. Furthermore it is a immediate mode API so each value is directly
2233 /// nk_layout_set_min_row_height | Set the currently used minimum row height to a specified value
2363 /// void nk_layout_row_push(struct nk_context*, float value);
2371 NK_API void nk_layout_row_push(struct nk_context*, float value);
2442 /// __width__ | Holds the absolute pixel width value the next column must be
2578 /// is required to check the return value of `nk_group_begin_xxx` and only process
2579 /// widgets inside the window if the value is not 0.
2853 /// __state__ | Initial tree state value out of nk_collapse_states
2869 /// __state__ | Initial tree state value out of nk_collapse_states
2887 /// __state__ | Initial tree state value out of nk_collapse_states
2890 /// __seed__ | Seeding value if this function is called in a loop or default to `0`
2913 /// __state__ | Initial tree state value out of nk_collapse_states
2932 /// __state__ | Initial tree state value out of nk_collapse_states
2951 /// __state__ | Initial tree state value out of nk_collapse_states
2954 /// __seed__ | Seeding value if this function is called in a loop or default to `0`
3145 NK_API unsigned nk_check_flags_label(struct nk_context*, const char*, unsigned int flags, unsigned int value);
3146 NK_API unsigned nk_check_flags_text(struct nk_context*, const char*, int, unsigned int flags, unsigned int value);
3149 NK_API int nk_checkbox_flags_label(struct nk_context*, const char*, unsigned int *flags, unsigned int value);
3150 NK_API int nk_checkbox_flags_text(struct nk_context*, const char*, int, unsigned int *flags, unsigned int value);
3165 NK_API int nk_selectable_label(struct nk_context*, const char*, nk_flags align, int *value);
3166 NK_API int nk_selectable_text(struct nk_context*, const char*, int, nk_flags align, int *value);
3167 NK_API int nk_selectable_image_label(struct nk_context*,struct nk_image, const char*, nk_flags align, int *value);
3168 NK_API int nk_selectable_image_text(struct nk_context*,struct nk_image, const char*, int, nk_flags align, int *value);
3169 NK_API int nk_selectable_symbol_label(struct nk_context*,enum nk_symbol_type, const char*, nk_flags align, int *value);
3170 NK_API int nk_selectable_symbol_text(struct nk_context*,enum nk_symbol_type, const char*, int, nk_flags align, int *value);
3172 NK_API int nk_select_label(struct nk_context*, const char*, nk_flags align, int value);
3173 NK_API int nk_select_text(struct nk_context*, const char*, int, nk_flags align, int value);
3174 NK_API int nk_select_image_label(struct nk_context*, struct nk_image,const char*, nk_flags align, int value);
3175 NK_API int nk_select_image_text(struct nk_context*, struct nk_image,const char*, int, nk_flags align, int value);
3176 NK_API int nk_select_symbol_label(struct nk_context*,enum nk_symbol_type, const char*, nk_flags align, int value);
3177 NK_API int nk_select_symbol_text(struct nk_context*,enum nk_symbol_type, const char*, int, nk_flags align, int value);
3209 /// Properties are the main value modification widgets in Nuklear. Changing a value
3217 /// unique ID. Each propery also takes in a minimum and maximum value. If you want
3221 /// a increment value that will be added or subtracted if either the increment
3222 /// decrement button is clicked. Finally there is a value for increment per pixel
3223 /// dragged that is added or subtracted from the value.
3226 /// int value = 0;
3246 /// nk_property_int(ctx, "ID", INT_MIN, &value, INT_MAX, 1, 1);
3271 /// nk_property_int | Integer property directly modifing a passed in value
3272 /// nk_property_float | Float property directly modifing a passed in value
3273 /// nk_property_double | Double property directly modifing a passed in value
3274 /// nk_propertyi | Integer property returning the modified int value
3275 /// nk_propertyf | Float property returning the modified float value
3276 /// nk_propertyd | Double property returning the modified double value
3280 /// Integer property directly modifing a passed in value
3293 /// __min__ | Minimum value not allowed to be underflown
3295 /// __max__ | Maximum value not allowed to be overflown
3301 /// Float property directly modifing a passed in value
3314 /// __min__ | Minimum value not allowed to be underflown
3316 /// __max__ | Maximum value not allowed to be overflown
3322 /// Double property directly modifing a passed in value
3335 /// __min__ | Minimum value not allowed to be underflown
3337 /// __max__ | Maximum value not allowed to be overflown
3343 /// Integer property modifing a passed in value and returning the new value
3356 /// __min__ | Minimum value not allowed to be underflown
3357 /// __val__ | Current integer value to be modified and returned
3358 /// __max__ | Maximum value not allowed to be overflown
3362 /// Returns the new modified integer value
3366 /// Float property modifing a passed in value and returning the new value
3379 /// __min__ | Minimum value not allowed to be underflown
3380 /// __val__ | Current float value to be modified and returned
3381 /// __max__ | Maximum value not allowed to be overflown
3385 /// Returns the new modified float value
3389 /// Float property modifing a passed in value and returning the new value
3402 /// __min__ | Minimum value not allowed to be underflown
3403 /// __val__ | Current double value to be modified and returned
3404 /// __max__ | Maximum value not allowed to be overflown
3408 /// Returns the new modified double value
5672 template<typename T, int size_diff> struct nk_helper{enum {value = size_diff};};
5673 template<typename T> struct nk_helper<T,0>{enum {value = nk_alignof<T>::value};};
5675 diff = sizeof(Big) - sizeof(T), value = nk_helper<Big, diff>::value};};
5676 #define NK_ALIGNOF(t) (nk_alignof<t>::value)
5889 NK_LIB nk_uint *nk_add_value(struct nk_context *ctx, struct nk_window *win, nk_hash name, nk_uint value);
5951 NK_LIB nk_size nk_progress_behavior(nk_flags *state, struct nk_input *in, struct nk_rect r, struct nk_rect cursor, nk_size max, nk_size value, int modifiable);
5952 NK_LIB void nk_draw_progress(struct nk_command_buffer *out, nk_flags state, const struct nk_style_progress *style, const struct nk_rect *bounds, const struct nk_rect *scursor, nk_size value, nk_size max);
5953 NK_LIB nk_size nk_do_progress(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, nk_size value, nk_size max, int modifiable, const struct nk_style_progress *style, struct nk_input *in);
5957 NK_LIB void nk_draw_slider(struct nk_command_buffer *out, nk_flags state, const struct nk_style_slider *style, const struct nk_rect *bounds, const struct nk_rect *visual_cursor, float min, float value, float max);
5968 NK_LIB int nk_do_selectable(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, const char *str, int len, nk_flags align, int *value, const struct nk_style_selectable *style, const struct nk_input *in, const struct nk_user_font *font);
5969 NK_LIB int nk_do_selectable_image(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, const char *str, int len, nk_flags align, int *value, const struct nk_image *img, const struct nk_style_selectable *style, const struct nk_input *in, const struct nk_user_font *font);
6002 union nk_property value;
6007 NK_LIB struct nk_property_variant nk_property_variant_int(int value, int min_value, int max_value, int step);
6008 NK_LIB struct nk_property_variant nk_property_variant_float(float value, float min_value, float max_value, float step);
6009 NK_LIB struct nk_property_variant nk_property_variant_double(double value, double min_value, double max_value, double step);
6045 approximations for value range 0...2*PI. The reason why I decided to
6460 int value = 0;
6472 value = value * 10 + (int) (*p - '0');
6477 return neg*value;
6485 double value = 0;
6499 value = value * 10.0 + (double) (*p - '0');
6506 value = value + (double) (*p - '0') * m;
6528 value /= m;
6529 else value *= m;
6531 number = value * neg;
6636 * if found then out_score is also set. Score value has no intrinsic meaning.
7009 long value = 0;
7015 /* retrieve correct value type */
7017 value = (signed char)va_arg(args, int);
7019 value = (signed short)va_arg(args, int);
7021 value = va_arg(args, signed long);
7023 value = (unsigned char)va_arg(args, int);
7024 else value = va_arg(args, signed int);
7027 nk_itoa(number_buffer, value);
7042 /* copy string value representation into buffer */
7043 if ((flag & NK_ARG_FLAG_PLUS) && value >= 0 && len < buf_size)
7045 else if ((flag & NK_ARG_FLAG_SPACE) && value >= 0 && len < buf_size)
7055 /* copy string value representation into buffer */
7067 unsigned long value = 0;
7073 /* print oct/hex/dec value */
7079 /* retrieve correct value type */
7081 value = (unsigned char)va_arg(args, int);
7083 value = (unsigned short)va_arg(args, int);
7085 value = va_arg(args, unsigned long);
7086 else value = va_arg(args, unsigned int);
7090 int digit = output_format[value % base];
7093 value /= base;
7094 } while (value > 0);
7144 double value = va_arg(args, double);
7149 NK_DTOA(number_buffer, value);
7171 /* copy string value representation into buffer */
7173 if ((flag & NK_ARG_FLAG_PLUS) && (value >= 0) && (len < buf_size))
7175 else if ((flag & NK_ARG_FLAG_SPACE) && (value >= 0) && (len < buf_size))
9479 /* if this triggers you tried to provide a value format for a color */
9556 /* if this triggers you tried to provide a color format for a value */
9563 char value = (char)NK_CLAMP((float)NK_SCHAR_MIN, values[value_index], (float)NK_SCHAR_MAX);
9564 NK_MEMCPY(attribute, &value, sizeof(value));
9568 nk_short value = (nk_short)NK_CLAMP((float)NK_SSHORT_MIN, values[value_index], (float)NK_SSHORT_MAX);
9569 NK_MEMCPY(attribute, &value, sizeof(value));
9570 attribute = (void*)((char*)attribute + sizeof(value));
9573 nk_int value = (nk_int)NK_CLAMP((float)NK_SINT_MIN, values[value_index], (float)NK_SINT_MAX);
9574 NK_MEMCPY(attribute, &value, sizeof(value));
9578 unsigned char value = (unsigned char)NK_CLAMP((float)NK_UCHAR_MIN, values[value_index], (float)NK_UCHAR_MAX);
9579 NK_MEMCPY(attribute, &value, sizeof(value));
9583 nk_ushort value = (nk_ushort)NK_CLAMP((float)NK_USHORT_MIN, values[value_index], (float)NK_USHORT_MAX);
9584 NK_MEMCPY(attribute, &value, sizeof(value));
9585 attribute = (void*)((char*)attribute + sizeof(value));
9588 nk_uint value = (nk_uint)NK_CLAMP((float)NK_UINT_MIN, values[value_index], (float)NK_UINT_MAX);
9589 NK_MEMCPY(attribute, &value, sizeof(value));
9597 double value = (double)values[value_index];
9598 NK_MEMCPY(attribute, &value, sizeof(value));
14868 nk_style_push_##type(struct nk_context *ctx, prefix##_##type *address, prefix##_##type value)\
14881 *address = value;\
15486 nk_hash name, nk_uint value)
15499 win->tables->values[win->tables->size] = value;
18825 /* find persistent group scrollbar value */
18867 /* find persistent group scrollbar value */
18902 /* find persistent group scrollbar value */
19466 nk_value_bool(struct nk_context *ctx, const char *prefix, int value)
19468 nk_labelf(ctx, NK_TEXT_LEFT, "%s: %s", prefix, ((value) ? "true": "false"));
19471 nk_value_int(struct nk_context *ctx, const char *prefix, int value)
19473 nk_labelf(ctx, NK_TEXT_LEFT, "%s: %d", prefix, value);
19476 nk_value_uint(struct nk_context *ctx, const char *prefix, unsigned int value)
19478 nk_labelf(ctx, NK_TEXT_LEFT, "%s: %u", prefix, value);
19481 nk_value_float(struct nk_context *ctx, const char *prefix, float value)
19483 double double_value = (double)value;
20555 unsigned int flags, unsigned int value)
20561 old_active = (int)((flags & value) & value);
20563 flags |= value;
20564 else flags &= ~value;
20581 unsigned int *flags, unsigned int value)
20589 active = (int)((*flags & value) & value);
20591 if (active) *flags |= value;
20592 else *flags &= ~value;
20602 unsigned int flags, unsigned int value)
20604 return nk_check_flags_text(ctx, label, nk_strlen(label), flags, value);
20611 unsigned int *flags, unsigned int value)
20613 return nk_checkbox_flags_text(ctx, label, nk_strlen(label), flags, value);
20731 struct nk_rect bounds, const char *str, int len, nk_flags align, int *value,
20742 NK_ASSERT(value);
20746 if (!state || !out || !str || !len || !value || !style || !font) return 0;
20747 old_value = *value;
20757 *value = !(*value);
20761 nk_draw_selectable(out, *state, style, *value, &bounds, 0,0,NK_SYMBOL_NONE, str, len, align, font);
20763 return old_value != *value;
20767 struct nk_rect bounds, const char *str, int len, nk_flags align, int *value,
20779 NK_ASSERT(value);
20783 if (!state || !out || !str || !len || !value || !style || !font) return 0;
20784 old_value = *value;
20792 *value = !(*value);
20808 nk_draw_selectable(out, *state, style, *value, &bounds, &icon, img, NK_SYMBOL_NONE, str, len, align, font);
20810 return old_value != *value;
20814 struct nk_rect bounds, const char *str, int len, nk_flags align, int *value,
20826 NK_ASSERT(value);
20830 if (!state || !out || !str || !len || !value || !style || !font) return 0;
20831 old_value = *value;
20839 *value = !(*value);
20855 nk_draw_selectable(out, *state, style, *value, &bounds, &icon, 0, sym, str, len, align, font);
20857 return old_value != *value;
20862 nk_flags align, int *value)
20873 NK_ASSERT(value);
20876 if (!ctx || !ctx->current || !ctx->current->layout || !value)
20887 str, len, align, value, &style->selectable, in, style->font);
20891 const char *str, int len, nk_flags align, int *value)
20902 NK_ASSERT(value);
20905 if (!ctx || !ctx->current || !ctx->current->layout || !value)
20916 str, len, align, value, &img, &style->selectable, in, style->font);
20920 const char *str, int len, nk_flags align, int *value)
20931 NK_ASSERT(value);
20934 if (!ctx || !ctx->current || !ctx->current->layout || !value)
20945 str, len, align, value, sym, &style->selectable, in, style->font);
20949 const char *title, nk_flags align, int *value)
20951 return nk_selectable_symbol_text(ctx, sym, title, nk_strlen(title), align, value);
20954 nk_flags align, int value)
20956 nk_selectable_text(ctx, str, len, align, &value);return value;
20958 NK_API int nk_selectable_label(struct nk_context *ctx, const char *str, nk_flags align, int *value)
20960 return nk_selectable_text(ctx, str, nk_strlen(str), align, value);
20963 const char *str, nk_flags align, int *value)
20965 return nk_selectable_image_text(ctx, img, str, nk_strlen(str), align, value);
20967 NK_API int nk_select_label(struct nk_context *ctx, const char *str, nk_flags align, int value)
20969 nk_selectable_text(ctx, str, nk_strlen(str), align, &value);return value;
20972 const char *str, nk_flags align, int value)
20974 nk_selectable_image_text(ctx, img, str, nk_strlen(str), align, &value);return value;
20977 const char *str, int len, nk_flags align, int value)
20979 nk_selectable_image_text(ctx, img, str, len, align, &value);return value;
20983 const char *title, int title_len, nk_flags align, int value)
20985 nk_selectable_symbol_text(ctx, sym, title, title_len, align, &value);return value;
20989 const char *title, nk_flags align, int value)
20991 return nk_select_symbol_text(ctx, sym, title, nk_strlen(title), align, value);
21023 /* only update value if the next slider step is reached */
21048 const struct nk_rect *visual_cursor, float min, float value, float max)
21060 NK_UNUSED(value);
21172 and one for updating the actual cursor value. */
21194 nk_slider_float(struct nk_context *ctx, float min_value, float *value, float max_value,
21210 NK_ASSERT(value);
21211 if (!ctx || !ctx->current || !ctx->current->layout || !value)
21222 old_value = *value;
21223 *value = nk_do_slider(&ctx->last_widget_state, &win->buffer, bounds, min_value,
21225 return (old_value > *value || old_value < *value);
21235 float value = (float)val;
21236 nk_slider_float(ctx, (float)min, &value, (float)max, (float)step);
21237 return (int)value;
21243 float value = (float)*val;
21244 ret = nk_slider_float(ctx, (float)min, &value, (float)max, (float)step);
21245 *val = (int)value;
21260 struct nk_rect r, struct nk_rect cursor, nk_size max, nk_size value, int modifiable)
21266 if (!in || !modifiable) return value;
21276 value = (nk_size)NK_CLAMP(0, (float)max * ratio, (float)max);
21286 return value;
21291 const struct nk_rect *scursor, nk_size value, nk_size max)
21297 NK_UNUSED(value);
21326 nk_size value, nk_size max, int modifiable,
21341 prog_scale = (float)value / (float)max;
21344 prog_value = NK_MIN(value, max);
21350 nk_draw_progress(out, *state, style, &bounds, &cursor, value, max);
23555 variant->value.i = variant->value.i + (int)delta;
23556 variant->value.i = NK_CLAMP(variant->min_value.i, variant->value.i, variant->max_value.i);
23559 variant->value.f = variant->value.f + (float)delta;
23560 variant->value.f = NK_CLAMP(variant->min_value.f, variant->value.f, variant->max_value.f);
23563 variant->value.d = variant->value.d + (double)delta;
23564 variant->value.d = NK_CLAMP(variant->min_value.d, variant->value.d, variant->max_value.d);
23686 nk_itoa(string, variant->value.i);
23690 NK_DTOA(string, (double)variant->value.f);
23694 NK_DTOA(string, variant->value.d);
23729 variant->value.i = NK_CLAMP(variant->min_value.i, variant->value.i - variant->step.i, variant->max_value.i); break;
23731 variant->value.f = NK_CLAMP(variant->min_value.f, variant->value.f - variant->step.f, variant->max_value.f); break;
23733 variant->value.d = NK_CLAMP(variant->min_value.d, variant->value.d - variant->step.d, variant->max_value.d); break;
23741 variant->value.i = NK_CLAMP(variant->min_value.i, variant->value.i + variant->step.i, variant->max_value.i); break;
23743 variant->value.f = NK_CLAMP(variant->min_value.f, variant->value.f + variant->step.f, variant->max_value.f); break;
23745 variant->value.d = NK_CLAMP(variant->min_value.d, variant->value.d + variant->step.d, variant->max_value.d); break;
23781 /* property is now not active so convert edit text to value*/
23787 variant->value.i = nk_strtoi(buffer, 0);
23788 variant->value.i = NK_CLAMP(variant->min_value.i, variant->value.i, variant->max_value.i);
23792 variant->value.f = nk_strtof(buffer, 0);
23793 variant->value.f = NK_CLAMP(variant->min_value.f, variant->value.f, variant->max_value.f);
23797 variant->value.d = nk_strtod(buffer, 0);
23798 variant->value.d = NK_CLAMP(variant->min_value.d, variant->value.d, variant->max_value.d);
23804 nk_property_variant_int(int value, int min_value, int max_value, int step)
23808 result.value.i = value;
23815 nk_property_variant_float(float value, float min_value, float max_value, float step)
23819 result.value.f = value;
23826 nk_property_variant_double(double value, double min_value, double max_value,
23831 result.value.d = value;
23949 *val = variant.value.i;
23963 *val = variant.value.f;
23977 *val = variant.value.d;
23990 val = variant.value.i;
24004 val = variant.value.f;
24018 val = variant.value.d;
24129 struct nk_chart *g, float value, int slot)
24146 ratio = (value - g->slots[slot].min) / range;
24199 struct nk_chart *chart, float value, int slot)
24220 item.h = chart->h * NK_ABS((value/chart->slots[slot].range));
24221 if (value >= 0) {
24222 ratio = (value + NK_ABS(chart->slots[slot].min)) / NK_ABS(chart->slots[slot].range);
24225 ratio = (value - chart->slots[slot].max) / chart->slots[slot].range;
24244 nk_chart_push_slot(struct nk_context *ctx, float value, int slot)
24260 flags = nk_chart_push_line(ctx, win, &win->layout->chart, value, slot); break;
24262 flags = nk_chart_push_column(ctx, win, &win->layout->chart, value, slot); break;
24270 nk_chart_push(struct nk_context *ctx, float value)
24272 return nk_chart_push_slot(ctx, value, 0);
24329 float value = value_getter(userdata, i + offset);
24330 min_value = NK_MIN(value, min_value);
24331 max_value = NK_MAX(value, max_value);
25533 /// reset the value back by calling `nk_layout_reset_min_row_height.
25676 /// - 2016/08/17 (1.09.6) - Removed invalid check for value zero in `nk_propertyx`.