Lines Matching refs:scroll

730 /// __nk_input_scroll__ | Mirrors mouse scroll values
779 /// Begins the input mirroring process by resetting text, scroll
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
1406 /// nk_window_get_scroll | Gets the scroll offset of the current window
1420 /// nk_window_set_scroll | Sets the scroll offset of the current window
1725 /// Gets the scroll offset for the current window
1907 /// Sets the scroll offset for the current window
1918 /// __offset_x__ | The x offset to scroll to
1919 /// __offset_y__ | The y offset to scroll to
2647 /// nk_group_get_scroll | Gets the scroll offset for the given group
2648 /// nk_group_set_scroll | Sets the scroll offset for the given group
2720 /// __off__ | Both x- and y- scroll offset. Allows for manual scrollbar control
2739 /// Gets the scroll position of the given group.
2747 /// __id__ | The id of the group to get the scroll position of
2753 /// Sets the scroll position of the given group.
2761 /// __id__ | The id of the group to scroll
2762 /// __x_offset__ | The x offset to scroll to
2763 /// __y_offset__ | The y offset to scroll to
5961 NK_LIB float nk_scrollbar_behavior(nk_flags *state, struct nk_input *in, int has_scrolling, const struct nk_rect *scroll, const struct nk_rect *cursor, const struct nk_rect *empty0, const struct nk_rect *empty1, float scroll_offset, float target, float scroll_step, enum nk_orientation o);
5962 NK_LIB void nk_draw_scrollbar(struct nk_command_buffer *out, nk_flags state, const struct nk_style_scrollbar *style, const struct nk_rect *bounds, const struct nk_rect *scroll);
5963 NK_LIB float nk_do_scrollbarv(nk_flags *state, struct nk_command_buffer *out, struct nk_rect scroll, int has_scrolling, float offset, float target, float step, float button_pixel_inc, const struct nk_style_scrollbar *style, struct nk_input *in, const struct nk_user_font *font);
5964 NK_LIB float nk_do_scrollbarh(nk_flags *state, struct nk_command_buffer *out, struct nk_rect scroll, int has_scrolling, float offset, float target, float step, float button_pixel_inc, const struct nk_style_scrollbar *style, struct nk_input *in, const struct nk_user_font *font);
14282 struct nk_style_scrollbar *scroll;
14488 scroll = &style->scrollh;
14489 nk_zero_struct(*scroll);
14490 scroll->normal = nk_style_item_color(table[NK_COLOR_SCROLLBAR]);
14491 scroll->hover = nk_style_item_color(table[NK_COLOR_SCROLLBAR]);
14492 scroll->active = nk_style_item_color(table[NK_COLOR_SCROLLBAR]);
14493 scroll->cursor_normal = nk_style_item_color(table[NK_COLOR_SCROLLBAR_CURSOR]);
14494 scroll->cursor_hover = nk_style_item_color(table[NK_COLOR_SCROLLBAR_CURSOR_HOVER]);
14495 scroll->cursor_active = nk_style_item_color(table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE]);
14496 scroll->dec_symbol = NK_SYMBOL_CIRCLE_SOLID;
14497 scroll->inc_symbol = NK_SYMBOL_CIRCLE_SOLID;
14498 scroll->userdata = nk_handle_ptr(0);
14499 scroll->border_color = table[NK_COLOR_SCROLLBAR];
14500 scroll->cursor_border_color = table[NK_COLOR_SCROLLBAR];
14501 scroll->padding = nk_vec2(0,0);
14502 scroll->show_buttons = nk_false;
14503 scroll->border = 0;
14504 scroll->rounding = 0;
14505 scroll->border_cursor = 0;
14506 scroll->rounding_cursor = 0;
14507 scroll->draw_begin = 0;
14508 scroll->draw_end = 0;
15908 struct nk_rect scroll;
15955 scroll.x = layout->bounds.x + layout->bounds.w + panel_padding.x;
15956 scroll.y = layout->bounds.y;
15957 scroll.w = scrollbar_size.x;
15958 scroll.h = layout->bounds.h;
15961 scroll_step = scroll.h * 0.10f;
15962 scroll_inc = scroll.h * 0.01f;
15963 scroll_target = (float)(int)(layout->at_y - scroll.y);
15964 scroll_offset = nk_do_scrollbarv(&state, out, scroll, scroll_has_scrolling,
15974 scroll.x = layout->bounds.x;
15975 scroll.y = layout->bounds.y + layout->bounds.h;
15976 scroll.w = layout->bounds.w;
15977 scroll.h = scrollbar_size.y;
15980 scroll_target = (float)(int)(layout->max_x - scroll.x);
15983 scroll_offset = nk_do_scrollbarh(&state, out, scroll, scroll_has_scrolling,
15990 /* hide scroll if no user input */
18804 struct nk_scroll *scroll, const char *title, nk_flags flags)
18806 return nk_group_scrolled_offset_begin(ctx, &scroll->x, &scroll->y, title, flags);
21403 int has_scrolling, const struct nk_rect *scroll,
21421 if (nk_input_is_mouse_hovering_rect(in, *scroll))
21432 delta = (pixel / scroll->h) * target;
21433 scroll_offset = NK_CLAMP(0, scroll_offset + delta, target - scroll->h);
21434 cursor_y = scroll->y + ((scroll_offset/target) * scroll->h);
21439 delta = (pixel / scroll->w) * target;
21440 scroll_offset = NK_CLAMP(0, scroll_offset + delta, target - scroll->w);
21441 cursor_x = scroll->x + ((scroll_offset/target) * scroll->w);
21446 /* scroll page up by click on empty space or shortcut */
21448 scroll_offset = NK_MAX(0, scroll_offset - scroll->h);
21449 else scroll_offset = NK_MAX(0, scroll_offset - scroll->w);
21452 /* scroll page down by click on empty space or shortcut */
21454 scroll_offset = NK_MIN(scroll_offset + scroll->h, target - scroll->h);
21455 else scroll_offset = NK_MIN(scroll_offset + scroll->w, target - scroll->w);
21461 scroll_offset = NK_CLAMP(0, scroll_offset, target - scroll->h);
21462 else scroll_offset = NK_CLAMP(0, scroll_offset, target - scroll->w);
21468 if (o == NK_VERTICAL) scroll_offset = target - scroll->h;
21471 if (*state & NK_WIDGET_STATE_HOVER && !nk_input_is_mouse_prev_hovering_rect(in, *scroll))
21473 else if (nk_input_is_mouse_prev_hovering_rect(in, *scroll))
21480 const struct nk_rect *scroll)
21507 nk_fill_rect(out, *scroll, style->rounding_cursor, cursor->data.color);
21508 nk_stroke_rect(out, *scroll, style->rounding_cursor, style->border_cursor, style->cursor_border_color);
21509 } else nk_draw_image(out, *scroll, &cursor->data.image, nk_white);
21513 struct nk_command_buffer *out, struct nk_rect scroll, int has_scrolling,
21532 scroll.w = NK_MAX(scroll.w, 1);
21533 scroll.h = NK_MAX(scroll.h, 0);
21534 if (target <= scroll.h) return 0;
21542 button.x = scroll.x;
21543 button.w = scroll.w;
21544 button.h = scroll.w;
21546 scroll_h = NK_MAX(scroll.h - 2 * button.h,0);
21550 button.y = scroll.y;
21556 button.y = scroll.y + scroll.h - button.h;
21561 scroll.y = scroll.y + button.h;
21562 scroll.h = scroll_h;
21566 scroll_step = NK_MIN(step, scroll.h);
21567 scroll_offset = NK_CLAMP(0, offset, target - scroll.h);
21568 scroll_ratio = scroll.h / target;
21572 cursor.h = NK_MAX((scroll_ratio * scroll.h) - (2*style->border + 2*style->padding.y), 0);
21573 cursor.y = scroll.y + (scroll_off * scroll.h) + style->border + style->padding.y;
21574 cursor.w = scroll.w - (2 * style->border + 2 * style->padding.x);
21575 cursor.x = scroll.x + style->border + style->padding.x;
21578 empty_north.x = scroll.x;
21579 empty_north.y = scroll.y;
21580 empty_north.w = scroll.w;
21581 empty_north.h = NK_MAX(cursor.y - scroll.y, 0);
21583 empty_south.x = scroll.x;
21585 empty_south.w = scroll.w;
21586 empty_south.h = NK_MAX((scroll.y + scroll.h) - (cursor.y + cursor.h), 0);
21589 scroll_offset = nk_scrollbar_behavior(state, in, has_scrolling, &scroll, &cursor,
21592 cursor.y = scroll.y + (scroll_off * scroll.h) + style->border_cursor + style->padding.y;
21596 nk_draw_scrollbar(out, *state, style, &scroll, &cursor);
21602 struct nk_command_buffer *out, struct nk_rect scroll, int has_scrolling,
21621 scroll.h = NK_MAX(scroll.h, 1);
21622 scroll.w = NK_MAX(scroll.w, 2 * scroll.h);
21623 if (target <= scroll.w) return 0;
21630 button.y = scroll.y;
21631 button.w = scroll.h;
21632 button.h = scroll.h;
21634 scroll_w = scroll.w - 2 * button.w;
21638 button.x = scroll.x;
21644 button.x = scroll.x + scroll.w - button.w;
21649 scroll.x = scroll.x + button.w;
21650 scroll.w = scroll_w;
21654 scroll_step = NK_MIN(step, scroll.w);
21655 scroll_offset = NK_CLAMP(0, offset, target - scroll.w);
21656 scroll_ratio = scroll.w / target;
21660 cursor.w = (scroll_ratio * scroll.w) - (2*style->border + 2*style->padding.x);
21661 cursor.x = scroll.x + (scroll_off * scroll.w) + style->border + style->padding.x;
21662 cursor.h = scroll.h - (2 * style->border + 2 * style->padding.y);
21663 cursor.y = scroll.y + style->border + style->padding.y;
21666 empty_west.x = scroll.x;
21667 empty_west.y = scroll.y;
21668 empty_west.w = cursor.x - scroll.x;
21669 empty_west.h = scroll.h;
21672 empty_east.y = scroll.y;
21673 empty_east.w = (scroll.x + scroll.w) - (cursor.x + cursor.w);
21674 empty_east.h = scroll.h;
21677 scroll_offset = nk_scrollbar_behavior(state, in, has_scrolling, &scroll, &cursor,
21680 cursor.x = scroll.x + (scroll_off * scroll.w);
21684 nk_draw_scrollbar(out, *state, style, &scroll, &cursor);
23178 /* horizontal scroll */
23187 /* vertical scroll */
23199 struct nk_rect scroll;
23205 scroll = area;
23206 scroll.x = (bounds.x + bounds.w - style->border) - style->scrollbar_size.x;
23207 scroll.w = style->scrollbar_size.x;
23210 scroll_step = scroll.h * 0.10f;
23211 scroll_inc = scroll.h * 0.01f;
23213 edit->scrollbar.y = nk_do_scrollbarv(&ws, out, scroll, 0,
25550 /// - 2017/03/18 (1.35.0) - Added horizontal scroll requested in #377.