rofi
1.5.1
|
#include <config.h>
#include <xkbcommon/xkbcommon.h>
#include <glib.h>
#include "widgets/textbox.h"
#include "widgets/listview.h"
#include "widgets/scrollbar.h"
#include "theme.h"
Go to the source code of this file.
Macros | |
#define | DEFAULT_SCROLLBAR_WIDTH 8 |
Functions | |
static void | scrollbar_draw (widget *, cairo_t *) |
static void | scrollbar_free (widget *) |
static int | scrollbar_get_desired_height (widget *wid) |
guint | scrollbar_scroll_get_line (const scrollbar *sb, int y) |
static void | scrollbar_scroll (scrollbar *sb, int y) |
static WidgetTriggerActionResult | scrollbar_trigger_action (widget *wid, MouseBindingMouseDefaultAction action, G_GNUC_UNUSED gint x, gint y, G_GNUC_UNUSED void *user_data) |
static gboolean | scrollbar_motion_notify (widget *wid, G_GNUC_UNUSED gint x, gint y) |
scrollbar * | scrollbar_create (widget *parent, const char *name) |
void | scrollbar_set_max_value (scrollbar *sb, unsigned int max) |
void | scrollbar_set_handle (scrollbar *sb, unsigned int pos) |
void | scrollbar_set_handle_length (scrollbar *sb, unsigned int pos_length) |
#define DEFAULT_SCROLLBAR_WIDTH 8 |
Definition at line 37 of file scrollbar.c.
Referenced by scrollbar_create().
|
static |
The range is the height - handle length. r = h - handle; handle is the element length of the handle* length of one element. handle = r / ( num ) * hl
r = h - r / ( num) *hl r*num = num*h - r*hl r*num+r*hl = num*h; r ( num+hl ) = num*h r = (num*h)/(num+hl)
Definition at line 164 of file scrollbar.c.
References _widget::h, _scrollbar::length, _scrollbar::pos, _scrollbar::pos_length, rofi_theme_get_color(), WIDGET, widget_padding_get_left(), widget_padding_get_remaining_height(), widget_padding_get_remaining_width(), and widget_padding_get_top().
Referenced by scrollbar_create().
|
static |
Definition at line 125 of file scrollbar.c.
Referenced by scrollbar_create().
|
static |
Definition at line 42 of file scrollbar.c.
References _widget::h.
Referenced by scrollbar_create().
|
static |
Definition at line 94 of file scrollbar.c.
References scrollbar_scroll().
Referenced by scrollbar_create().
|
static |
Definition at line 72 of file scrollbar.c.
References listview_set_selected(), _widget::parent, scrollbar_scroll_get_line(), and _scrollbar::widget.
Referenced by scrollbar_motion_notify(), and scrollbar_trigger_action().
|
static |
Definition at line 77 of file scrollbar.c.
References MOUSE_CLICK_DOWN, MOUSE_CLICK_UP, MOUSE_DCLICK_DOWN, MOUSE_DCLICK_UP, scrollbar_scroll(), WIDGET_TRIGGER_ACTION_RESULT_GRAB_MOTION_BEGIN, and WIDGET_TRIGGER_ACTION_RESULT_GRAB_MOTION_END.
Referenced by scrollbar_create().