rofi  1.5.4
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)
 

Variables

widget _scrollbar::widget
 
unsigned int _scrollbar::length
 
unsigned int _scrollbar::pos
 
unsigned int _scrollbar::pos_length
 
RofiDistance _scrollbar::width
 

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 51 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 139 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 146 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 132 of file scrollbar.c.

References _scrollbar::length.

Referenced by listview_draw().

Here is the caller graph for this function:

Variable Documentation

◆ length

◆ pos

unsigned int _scrollbar::pos

Definition at line 47 of file scrollbar.h.

Referenced by scrollbar_create(), scrollbar_draw(), and scrollbar_set_handle().

◆ pos_length

unsigned int _scrollbar::pos_length

◆ widget

widget _scrollbar::widget

Definition at line 45 of file scrollbar.h.

Referenced by scrollbar_create(), scrollbar_scroll(), and scrollbar_scroll_get_line().

◆ width

RofiDistance _scrollbar::width

Definition at line 49 of file scrollbar.h.

Referenced by scrollbar_create().