14#ifndef FC__WIDGET_SCROLLBAR_H
15#define FC__WIDGET_SCROLLBAR_H
32#define scrollbar_size(scroll) \
33 ((float)((float)(scroll->active * scroll->step) / \
34 (float)scroll->count) * (scroll->max - scroll->min))
36#define hide_scrollbar(scrollbar) \
38 if (scrollbar->up_left_button) { \
39 if (!(get_wflags(scrollbar->up_left_button) & WF_HIDDEN)) {\
40 widget_undraw(scrollbar->up_left_button); \
41 widget_mark_dirty(scrollbar->up_left_button); \
42 set_wflag(scrollbar->up_left_button, WF_HIDDEN); \
44 if (!(get_wflags(scrollbar->down_right_button) & WF_HIDDEN)) {\
45 widget_undraw(scrollbar->down_right_button); \
46 widget_mark_dirty(scrollbar->down_right_button); \
47 set_wflag(scrollbar->down_right_button, WF_HIDDEN); \
50 if (scrollbar->pscroll_bar) { \
51 if (!(get_wflags(scrollbar->pscroll_bar) & WF_HIDDEN)) { \
52 widget_undraw(scrollbar->pscroll_bar); \
53 widget_mark_dirty(scrollbar->pscroll_bar); \
54 set_wflag(scrollbar->pscroll_bar, WF_HIDDEN); \
59#define show_scrollbar(scrollbar) \
61 if (scrollbar->up_left_button) { \
62 clear_wflag(scrollbar->up_left_button, WF_HIDDEN); \
63 clear_wflag(scrollbar->down_right_button, WF_HIDDEN); \
65 if (scrollbar->pscroll_bar) { \
66 clear_wflag(scrollbar->pscroll_bar, WF_HIDDEN); \
struct canvas int int struct sprite int int int int height
struct canvas int int struct sprite int int int width