… | |
… | |
12 | unsigned int end; /* slider sub-window end height */ |
12 | unsigned int end; /* slider sub-window end height */ |
13 | unsigned int top; /* slider top position */ |
13 | unsigned int top; /* slider top position */ |
14 | unsigned int bot; /* slider bottom position */ |
14 | unsigned int bot; /* slider bottom position */ |
15 | unsigned int style; /* style: rxvt, xterm, next */ |
15 | unsigned int style; /* style: rxvt, xterm, next */ |
16 | unsigned int width; /* scrollbar width */ |
16 | unsigned int width; /* scrollbar width */ |
|
|
17 | int sb_shadow; /* scrollbar shadow width */ |
17 | Window win; |
18 | Window win; |
18 | int (rxvt_term::*update)(int, int, int, int); |
19 | int (rxvt_term::*update)(int, int, int, int); |
19 | |
20 | |
20 | void setIdle() { state = 1 ; } |
21 | void setIdle() { state = 1 ; } |
21 | void setMotion() { state = 'm'; } |
22 | void setMotion() { state = 'm'; } |
22 | void setUp() { state = 'U'; } |
23 | void setUp() { state = 'U'; } |
23 | void setDn() { state = 'D'; } |
24 | void setDn() { state = 'D'; } |
24 | } scrollBar_t; |
25 | } scrollBar_t; |
25 | |
26 | |
|
|
27 | #define scrollbar_TotalWidth() (scrollBar.width + scrollBar.sb_shadow * 2) |
26 | #define scrollbar_isMotion() (scrollBar.state == 'm') |
28 | #define scrollbar_isMotion() (scrollBar.state == 'm') |
27 | #define scrollbar_isUp() (scrollBar.state == 'U') |
29 | #define scrollbar_isUp() (scrollBar.state == 'U') |
28 | #define scrollbar_isDn() (scrollBar.state == 'D') |
30 | #define scrollbar_isDn() (scrollBar.state == 'D') |
29 | #define scrollbar_isUpDn() isupper (scrollBar.state) |
31 | #define scrollbar_isUpDn() isupper (scrollBar.state) |
30 | #define isScrollbarWindow(w) (scrollBar.state && (w) == scrollBar.win) |
32 | #define isScrollbarWindow(w) (scrollBar.state && (w) == scrollBar.win) |