rofi  1.5.1
Scrollbar
Collaboration diagram for Scrollbar:

Data Structures

struct  _scrollbar
 

Typedefs

typedef struct _scrollbar scrollbar
 

Functions

scrollbarscrollbar_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 50 of file scrollbar.c.

References _widget::border, RofiDistance::distance, _widget::h, _scrollbar::length, _scrollbar::pos_length, RofiPadding::top, and _scrollbar::widget.

Referenced by scrollbar_scroll().

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 138 of file scrollbar.c.

References _scrollbar::length, and _scrollbar::pos.

Referenced by listview_draw().

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, and _scrollbar::pos_length.

Referenced by listview_draw().

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 131 of file scrollbar.c.

References _scrollbar::length.

Referenced by listview_draw().

Here is the caller graph for this function: