Lines Matching defs:pos

1092 ///     float pos[2]; // important to keep it to 2 floats
1098 /// {NK_VERTEX_POSITION, NK_FORMAT_FLOAT, NK_OFFSETOF(struct your_vertex, pos)},
1871 /// void nk_window_set_position(struct nk_context*, const char *name, struct nk_vec2 pos);
1880 NK_API void nk_window_set_position(struct nk_context*, const char *name, struct nk_vec2 pos);
2651 /// Starts a new widget group. Requires a previous layouting function to specify a pos/size.
2666 /// Starts a new widget group. Requires a previous layouting function to specify a pos/size.
3719 NK_API struct nk_rect nk_recta(struct nk_vec2 pos, struct nk_vec2 size);
4185 NK_API int nk_str_insert_at_char(struct nk_str*, int pos, const char*, int);
4186 NK_API int nk_str_insert_at_rune(struct nk_str*, int pos, const char*, int);
4188 NK_API int nk_str_insert_text_char(struct nk_str*, int pos, const char*, int);
4189 NK_API int nk_str_insert_str_char(struct nk_str*, int pos, const char*);
4190 NK_API int nk_str_insert_text_utf8(struct nk_str*, int pos, const char*, int);
4191 NK_API int nk_str_insert_str_utf8(struct nk_str*, int pos, const char*);
4192 NK_API int nk_str_insert_text_runes(struct nk_str*, int pos, const nk_rune*, int);
4193 NK_API int nk_str_insert_str_runes(struct nk_str*, int pos, const nk_rune*);
4197 NK_API void nk_str_delete_chars(struct nk_str*, int pos, int len);
4198 NK_API void nk_str_delete_runes(struct nk_str*, int pos, int len);
4200 NK_API char *nk_str_at_char(struct nk_str*, int pos);
4201 NK_API char *nk_str_at_rune(struct nk_str*, int pos, nk_rune *unicode, int *len);
4202 NK_API nk_rune nk_str_rune_at(const struct nk_str*, int pos);
4203 NK_API const char *nk_str_at_char_const(const struct nk_str*, int pos);
4204 NK_API const char *nk_str_at_const(const struct nk_str*, int pos, nk_rune *unicode, int *len);
4607 struct nk_vec2 pos;
4769 NK_API void nk_draw_list_path_line_to(struct nk_draw_list*, struct nk_vec2 pos);
6192 nk_recta(struct nk_vec2 pos, struct nk_vec2 size)
6194 return nk_rect(pos.x, pos.y, size.x, size.y);
8391 nk_str_insert_at_char(struct nk_str *s, int pos, const char *str, int len)
8402 if (!s || !str || !len || (nk_size)pos > s->buffer.allocated) return 0;
8406 copylen = (int)s->buffer.allocated - pos;
8415 NK_ASSERT(((int)pos + (int)len + ((int)copylen - 1)) >= 0);
8416 NK_ASSERT(((int)pos + ((int)copylen - 1)) >= 0);
8417 dst = nk_ptr_add(char, s->buffer.memory.ptr, pos + len + (copylen - 1));
8418 src = nk_ptr_add(char, s->buffer.memory.ptr, pos + (copylen-1));
8420 mem = nk_ptr_add(void, s->buffer.memory.ptr, pos);
8426 nk_str_insert_at_rune(struct nk_str *str, int pos, const char *cstr, int len)
8437 begin = nk_str_at_rune(str, pos, &unicode, &glyph_len);
8445 nk_str_insert_text_char(struct nk_str *str, int pos, const char *text, int len)
8447 return nk_str_insert_text_utf8(str, pos, text, len);
8450 nk_str_insert_str_char(struct nk_str *str, int pos, const char *text)
8452 return nk_str_insert_text_utf8(str, pos, text, nk_strlen(text));
8455 nk_str_insert_text_utf8(struct nk_str *str, int pos, const char *text, int len)
8466 nk_str_insert_at_rune(str, pos, text, byte_len);
8470 nk_str_insert_str_utf8(struct nk_str *str, int pos, const char *text)
8485 nk_str_insert_at_rune(str, pos, text, byte_len);
8489 nk_str_insert_text_runes(struct nk_str *str, int pos, const nk_rune *runes, int len)
8500 nk_str_insert_at_rune(str, pos+i, glyph, byte_len);
8505 nk_str_insert_str_runes(struct nk_str *str, int pos, const nk_rune *runes)
8514 nk_str_insert_at_rune(str, pos+i, glyph, byte_len);
8551 nk_str_delete_chars(struct nk_str *s, int pos, int len)
8554 if (!s || !len || (nk_size)pos > s->buffer.allocated ||
8555 (nk_size)(pos + len) > s->buffer.allocated) return;
8557 if ((nk_size)(pos + len) < s->buffer.allocated) {
8559 char *dst = nk_ptr_add(char, s->buffer.memory.ptr, pos);
8560 char *src = nk_ptr_add(char, s->buffer.memory.ptr, pos + len);
8561 NK_MEMCPY(dst, src, s->buffer.allocated - (nk_size)(pos + len));
8568 nk_str_delete_runes(struct nk_str *s, int pos, int len)
8577 NK_ASSERT(s->len >= pos + len);
8578 if (s->len < pos + len)
8579 len = NK_CLAMP(0, (s->len - pos), s->len);
8583 begin = nk_str_at_rune(s, pos, &unicode, &unused);
8592 nk_str_at_char(struct nk_str *s, int pos)
8595 if (!s || pos > (int)s->buffer.allocated) return 0;
8596 return nk_ptr_add(char, s->buffer.memory.ptr, pos);
8599 nk_str_at_rune(struct nk_str *str, int pos, nk_rune *unicode, int *len)
8612 if (pos < 0) {
8622 if (i == pos) {
8631 if (i != pos) return 0;
8635 nk_str_at_char_const(const struct nk_str *s, int pos)
8638 if (!s || pos > (int)s->buffer.allocated) return 0;
8639 return nk_ptr_add(char, s->buffer.memory.ptr, pos);
8642 nk_str_at_const(const struct nk_str *str, int pos, nk_rune *unicode, int *len)
8655 if (pos < 0) {
8665 if (i == pos) {
8674 if (i != pos) return 0;
8678 nk_str_rune_at(const struct nk_str *str, int pos)
8682 nk_str_at_const(str, pos, &unicode, &len);
9606 struct nk_vec2 pos, struct nk_vec2 uv, struct nk_colorf color)
9615 case NK_VERTEX_POSITION: nk_draw_vertex_element(address, &pos.x, 2, elem_iter->format); break;
9997 nk_draw_list_path_line_to(struct nk_draw_list *list, struct nk_vec2 pos)
10012 points[0] = pos;
10867 unsigned right, left = 0, stack[NK_MAX_SORT_STACK], pos = 0;
10872 if (pos == NK_MAX_SORT_STACK) len = stack[pos = 0];
10875 stack[pos++] = len;
10885 if (pos == 0) break;
10887 len = stack[--pos];
13955 in->mouse.prev.x = in->mouse.pos.x;
13956 in->mouse.prev.y = in->mouse.pos.y;
13984 in->mouse.pos.x = (float)x;
13985 in->mouse.pos.y = (float)y;
13986 in->mouse.delta.x = in->mouse.pos.x - in->mouse.prev.x;
13987 in->mouse.delta.y = in->mouse.pos.y - in->mouse.prev.y;
14124 return NK_INBOX(i->mouse.pos.x, i->mouse.pos.y, rect.x, rect.y, rect.w, rect.h);
15220 mouse_bounds.x = ctx->input.mouse.pos.x - cursor->offset.x;
15221 mouse_bounds.y = ctx->input.mouse.pos.y - cursor->offset.y;
16058 if ((delta_x < 0) || (delta_x > 0 && in->mouse.pos.x >= scaler.x)) {
16066 if ((in->mouse.delta.y < 0) || (in->mouse.delta.y > 0 && in->mouse.pos.y >= scaler.y)) {
16376 if (NK_INBOX(ctx->input.mouse.pos.x, ctx->input.mouse.pos.y,
16694 const char *name, struct nk_vec2 pos)
16698 win->bounds.x = pos.x;
16699 win->bounds.y = pos.y;
17103 body.x = ctx->input.mouse.pos.x;
17104 body.y = ctx->input.mouse.pos.y;
19180 if (!NK_INBOX(in->mouse.pos.x, in->mouse.pos.y, v.x, v.y, v.w, v.h))
21020 const float d = in->mouse.pos.x - (visual_cursor->x+visual_cursor->w*0.5f);
21275 float ratio = NK_MAX(0, (float)(in->mouse.pos.x - cursor.x)) / (float)cursor.w;
22491 nk_textedit_createundo(struct nk_text_undo_state *state, int pos,
22498 r->where = pos;
22909 edit->active = NK_INBOX(in->mouse.pos.x, in->mouse.pos.y,
22938 const float mouse_x = (in->mouse.pos.x - area.x) + edit->scrollbar.x;
22939 const float mouse_y = (in->mouse.pos.y - area.y) + edit->scrollbar.y;
24159 NK_INBOX(i->mouse.pos.x,i->mouse.pos.y, g->slots[slot].last.x-3, g->slots[slot].last.y-3, 6, 6)){
24233 NK_INBOX(in->mouse.pos.x,in->mouse.pos.y,item.x,item.y,item.w,item.h)) {
24368 hsva[1] = NK_SATURATE((in->mouse.pos.x - matrix->x) / (matrix->w-1));
24369 hsva[2] = 1.0f - NK_SATURATE((in->mouse.pos.y - matrix->y) / (matrix->h-1));
24374 hsva[0] = NK_SATURATE((in->mouse.pos.y - hue_bar->y) / (hue_bar->h-1));
24380 hsva[3] = 1.0f - NK_SATURATE((in->mouse.pos.y - alpha_bar->y) / (alpha_bar->h-1));
25339 x = nk_ifloorf(in->mouse.pos.x + 1) - (int)win->layout->clip.x;
25340 y = nk_ifloorf(in->mouse.pos.y + 1) - (int)win->layout->clip.y;