rofi 2.1.0
Scrollbar
Collaboration diagram for Scrollbar:

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)

Detailed Description

Typedef Documentation

◆ scrollbar

typedef struct _scrollbar scrollbar

Internal structure for the scrollbar.

Function Documentation

◆ scrollbar_create()

◆ scrollbar_scroll_get_line()

guint scrollbar_scroll_get_line ( const scrollbar * sb,
int y )
Parameters
sbscrollbar object
yclicked position

Calculate the position of the click relative to the max value of bar

Definition at line 52 of file scrollbar.c.

References RofiDistance::base, _widget::border, RofiDistanceUnit::distance, _widget::h, _scrollbar::length, _scrollbar::pos_length, scrollbar_scroll_get_line(), RofiPadding::top, and _scrollbar::widget.

Referenced by scrollbar_scroll(), and scrollbar_scroll_get_line().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scrollbar_set_handle()

void scrollbar_set_handle ( scrollbar * sb,
unsigned int pos )
Parameters
sbscrollbar object
posnew position

set the position of the handle relative to the set max value of bar.

Definition at line 139 of file scrollbar.c.

References _scrollbar::length, _scrollbar::pos, and scrollbar_set_handle().

Referenced by listview_draw(), and scrollbar_set_handle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scrollbar_set_handle_length()

void scrollbar_set_handle_length ( scrollbar * sb,
unsigned int pos_length )
Parameters
sbscrollbar object
pos_lengthnew length

set the length of the handle relative to the max value of bar.

Definition at line 145 of file scrollbar.c.

References _scrollbar::length, _scrollbar::pos_length, and scrollbar_set_handle_length().

Referenced by listview_draw(), and scrollbar_set_handle_length().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scrollbar_set_max_value()

void scrollbar_set_max_value ( scrollbar * sb,
unsigned int max )
Parameters
sbscrollbar object
maxthe new max

set the max value of the bar.

Definition at line 133 of file scrollbar.c.

References _scrollbar::length, and scrollbar_set_max_value().

Referenced by listview_draw(), and scrollbar_set_max_value().

Here is the call graph for this function:
Here is the caller graph for this function: