rofi 1.7.5
|
Data Structures | |
struct | _scrollbar |
Typedefs | |
typedef struct _scrollbar | scrollbar |
Functions | |
scrollbar * | scrollbar_create (widget *parent, const char *name) |
void | scrollbar_set_handle_length (scrollbar *sb, unsigned int pos_length) |
void | scrollbar_set_handle (scrollbar *sb, unsigned int pos) |
void | scrollbar_set_max_value (scrollbar *sb, unsigned int max) |
guint | scrollbar_scroll_get_line (const scrollbar *sb, int y) |
typedef struct _scrollbar scrollbar |
Internal structure for the scrollbar.
parent | The parent widget. |
name | The name of the widget. |
Create a new scrollbar
Definition at line 103 of file scrollbar.c.
References DEFAULT_SCROLLBAR_WIDTH, distance_get_pixel(), _widget::draw, _widget::free, _widget::get_desired_height, _widget::h, _scrollbar::length, _widget::motion_notify, _scrollbar::pos, _scrollbar::pos_length, ROFI_ORIENTATION_HORIZONTAL, rofi_theme_get_distance(), scrollbar_draw(), scrollbar_free(), scrollbar_get_desired_height(), scrollbar_motion_notify(), scrollbar_trigger_action(), _widget::trigger_action, _widget::w, WIDGET, _scrollbar::widget, widget_init(), widget_padding_get_padding_height(), widget_padding_get_padding_width(), WIDGET_TYPE_SCROLLBAR, _scrollbar::width, _widget::x, and _widget::y.
Referenced by listview_create().
guint scrollbar_scroll_get_line | ( | const scrollbar * | sb, |
int | y ) |
sb | scrollbar object |
y | clicked position |
Calculate the position of the click relative to the max value of bar
Definition at line 51 of file scrollbar.c.
References RofiDistance::base, _widget::border, RofiDistanceUnit::distance, _widget::h, _scrollbar::length, _scrollbar::pos_length, RofiPadding::top, and _scrollbar::widget.
Referenced by scrollbar_scroll().
void scrollbar_set_handle | ( | scrollbar * | sb, |
unsigned int | pos ) |
sb | scrollbar object |
pos | new position |
set the position of the handle relative to the set max value of bar.
Definition at line 138 of file scrollbar.c.
References _scrollbar::length, and _scrollbar::pos.
Referenced by listview_draw().
void scrollbar_set_handle_length | ( | scrollbar * | sb, |
unsigned int | pos_length ) |
sb | scrollbar object |
pos_length | new length |
set the length of the handle relative to the max value of bar.
Definition at line 144 of file scrollbar.c.
References _scrollbar::length, and _scrollbar::pos_length.
Referenced by listview_draw().
void scrollbar_set_max_value | ( | scrollbar * | sb, |
unsigned int | max ) |
sb | scrollbar object |
max | the new max |
set the max value of the bar.
Definition at line 132 of file scrollbar.c.
References _scrollbar::length.
Referenced by listview_draw().