Lines Matching defs:string

133 /// NK_MAX_NUMBER_BUFFER            | Maximum buffer size for the conversion buffer between float and string Under normal circumstances this should be more than sufficient.
151 /// NK_STRTOD | You can define this to `strtod` or your own string to double conversion implementation replacement. If not defined nuklear will use its own imprecise and possibly unsafe version (does not handle nan or infinity!).
152 /// NK_DTOA | You can define this to `dtoa` or your own double to string conversion implementation replacement. If not defined nuklear will use its own imprecise and possibly unsafe version (does not handle nan or infinity!).
2888 /// __hash__ | Memory block or string to generate the ID from
2889 /// __len__ | Size of passed memory block or string in __hash__
2952 /// __hash__ | Memory block or string to generate the ID from
2953 /// __len__ | Size of passed memory block or string in __hash__
3763 font and a callback to calculate the width of a string. This way of handling
3921 /* font string width in pixel callback */
4160 /* Basic string buffer which is only used in context with the text editor
4161 * to manage and manipulate dynamic or fixed size string content. This is _NOT_
4162 * the default string handling method. The only instance you should have any contact
4223 * string length. This method is probably the easiest way of handling simple
4283 struct nk_str string;
4555 char string[1];
5821 NK_LIB int nk_string_float_limit(char *string, int prec);
5922 NK_LIB void nk_widget_text(struct nk_command_buffer *o, struct nk_rect b, const char *string, int len, const struct nk_text *t, nk_flags a, const struct nk_user_font *f);
5923 NK_LIB void nk_widget_text_wrap(struct nk_command_buffer *o, struct nk_rect b, const char *string, int len, const struct nk_text *t, const struct nk_user_font *f);
5930 NK_LIB int nk_do_button_text(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, const char *string, int len, nk_flags align, enum nk_button_behavior behavior, const struct nk_style_button *style, const struct nk_input *in, const struct nk_user_font *font);
5946 NK_LIB void nk_draw_checkbox(struct nk_command_buffer *out, nk_flags state, const struct nk_style_toggle *style, int active, const struct nk_rect *label, const struct nk_rect *selector, const struct nk_rect *cursors, const char *string, int len, const struct nk_user_font *font);
5947 NK_LIB void nk_draw_option(struct nk_command_buffer *out, nk_flags state, const struct nk_style_toggle *style, int active, const struct nk_rect *label, const struct nk_rect *selector, const struct nk_rect *cursors, const char *string, int len, const struct nk_user_font *font);
5967 NK_LIB void nk_draw_selectable(struct nk_command_buffer *out, nk_flags state, const struct nk_style_selectable *style, int active, const struct nk_rect *bounds, const struct nk_rect *icon, const struct nk_image *img, enum nk_symbol_type sym, const char *string, int len, nk_flags align, const struct nk_user_font *font);
6620 ^ matches the beginning of the input string
6621 $ matches the end of the input string
6625 do { /* must look even if string is empty */
6661 /* use "best" matched letter if multiple string letters match the pattern */
6758 nk_string_float_limit(char *string, int prec)
6761 char *c = string;
6775 return (int)(c - string);
6991 /* string */
7026 /* convert number to string */
7042 /* copy string value representation into buffer */
7055 /* copy string value representation into buffer */
7171 /* copy string value representation into buffer */
9170 const char *string, int length, const struct nk_user_font *font,
9178 if (!b || !string || !length || (bg.a == 0 && fg.a == 0)) return;
9186 text_width = font->width(font->userdata, font->height, string, length);
9190 length = nk_text_clamp(font, string, length, r.w, &glyphs, &txt_width, 0,0);
9206 NK_MEMCPY(cmd->string, string, (nk_size)length);
9207 cmd->string[length] = '\0';
10512 t->string, t->length, t->height, t->foreground);
19260 const char *string, int len, const struct nk_text *t,
19275 text_width = f->width(f->userdata, f->height, (const char*)string, len);
19301 nk_draw_text(o, label, (const char*)string, len, f, t->background, t->text);
19305 const char *string, int len, const struct nk_text *t,
19333 fitting = nk_text_clamp(f, string, len, line.w, &glyphs, &width, seperator,NK_LEN(seperator));
19336 nk_widget_text(o, line, &string[done], fitting, &text, NK_TEXT_LEFT, f);
19339 fitting = nk_text_clamp(f, &string[done], len - done, line.w, &glyphs, &width, seperator,NK_LEN(seperator));
19843 const char *string, int len, nk_flags align, enum nk_button_behavior behavior,
19853 NK_ASSERT(string);
19855 if (!out || !style || !font || !string)
19860 nk_draw_button_text(out, &bounds, &content, *state, style, string, len, align, font);
20378 const struct nk_rect *cursors, const char *string, int len,
20414 nk_widget_text(out, *label, string, len, &text, NK_TEXT_LEFT, font);
20420 const struct nk_rect *cursors, const char *string, int len,
20456 nk_widget_text(out, *label, string, len, &text, NK_TEXT_LEFT, font);
20685 const char *string, int len, nk_flags align, const struct nk_user_font *font)
20727 nk_widget_text(out, *bounds, string, len, &text, align, font);
21728 const char *str = nk_str_at_const(&edit->string, line_start + char_id, &unicode, &len);
21739 int len = nk_str_len_char(&edit->string);
21740 const char *end = nk_str_get_const(&edit->string) + len;
21741 const char *text = nk_str_at_const(&edit->string, line_start_id, &unicode, &l);
21757 int n = edit->string.len;
21808 if (nk_str_rune_at(&edit->string, i+r.num_chars-1) == '\n')
21842 int z = state->string.len;
21894 /* make the selection/cursor state valid if client altered the string */
21895 int n = state->string.len;
21910 nk_str_delete_runes(&state->string, where, len);
21970 if (!nk_str_at_rune(&state->string, idx, &c, &len)) return 1;
21990 const int len = state->string.len;
22035 if (nk_str_insert_text_char(&state->string, state->cursor, text, len)) {
22068 state->cursor < state->string.len)
22072 nk_str_delete_runes(&state->string, state->cursor, 1);
22074 if (nk_str_insert_text_utf8(&state->string, state->cursor,
22082 if (nk_str_insert_text_utf8(&state->string, state->cursor,
22310 int n = state->string.len;
22346 state->cursor = state->select_end = state->string.len;
22349 state->cursor = state->string.len;
22360 if (state->string.len && state->cursor == state->string.len)
22368 if (state->string.len && state->cursor == state->string.len)
22388 if (find.length > 0 && nk_str_rune_at(&state->string, state->cursor-1) == '\n')
22400 if (find.length > 0 && nk_str_rune_at(&state->string, state->cursor-1) == '\n')
22560 nk_str_rune_at(&state->string, u.where + i);
22563 nk_str_delete_runes(&state->string, u.where, u.delete_length);
22569 nk_str_insert_text_runes(&state->string, u.where,
22611 nk_str_rune_at(&state->string, u->where + i);
22614 nk_str_delete_runes(&state->string, r.where, r.delete_length);
22619 nk_str_insert_text_runes(&state->string, r.where,
22639 p[i] = nk_str_rune_at(&state->string, where+i);
22650 p[i] = nk_str_rune_at(&state->string, where+i);
22681 nk_str_init_fixed(&state->string, memory, size);
22691 nk_str_init(&state->string, alloc, size);
22701 nk_str_init_default(&state->string);
22709 state->select_end = state->string.len;
22716 nk_str_free(&state->string);
22921 edit->cursor = edit->string.len;
23003 text = nk_str_at_const(&edit->string, begin, &unicode, &glyph_len);
23036 {const char *text = nk_str_get_const(&edit->string);
23037 int len = nk_str_len_char(&edit->string);
23167 if (!cursor_ptr && edit->cursor == edit->string.len) {
23259 const char *begin = nk_str_get_const(&edit->string);
23260 int l = nk_str_len_char(&edit->string);
23268 const char *begin = nk_str_get_const(&edit->string);
23278 const char *begin = nk_str_get_const(&edit->string);
23279 select_end_ptr = begin + nk_str_len_char(&edit->string);
23289 selection_end < edit->string.len))
23293 const char *end = nk_str_get_const(&edit->string) +
23294 nk_str_len_char(&edit->string);
23308 if (edit->cursor >= nk_str_len(&edit->string) ||
23342 int l = nk_str_len_char(&edit->string);
23343 const char *begin = nk_str_get_const(&edit->string);
23439 nk_str_init_fixed(&edit->string, memory, (nk_size)max);
23440 edit->string.buffer.allocated = (nk_size)*len;
23441 edit->string.len = nk_utf_len(memory, *len);
23443 *len = (int)edit->string.buffer.allocated;
23487 edit->cursor = edit->string.len;
23644 char string[NK_MAX_NUMBER_BUFFER];
23686 nk_itoa(string, variant->value.i);
23687 num_len = nk_strlen(string);
23690 NK_DTOA(string, (double)variant->value.f);
23691 num_len = nk_string_float_limit(string, NK_MAX_FLOAT_PRECISION);
23694 NK_DTOA(string, variant->value.d);
23695 num_len = nk_string_float_limit(string, NK_MAX_FLOAT_PRECISION);
23698 size = font->width(font->userdata, font->height, string, num_len);
23699 dst = string;
23761 text_edit->string.len = *length;
23765 text_edit->string.buffer.allocated = (nk_size)*length;
23766 text_edit->string.buffer.memory.size = NK_MAX_NUMBER_BUFFER;
23767 text_edit->string.buffer.memory.ptr = dst;
23768 text_edit->string.buffer.size = NK_MAX_NUMBER_BUFFER;
23773 *length = text_edit->string.len;
25470 /// -[x.yy.zz]: Numerical version string representation. Each version number on the right
25505 /// - 2017/12/04 (2.00.6) - Added formated string tooltip widget.
25669 /// - 2016/08/26 (1.10.0) - Added window name string prepresentation to account for
25695 /// floating pointer number to string conversion for additional
25698 /// string to floating point number conversion for additional
25711 /// `nk_edit_string` which takes, edits and outputs a '\0' terminated string.