ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/scrollbar.h
(Generate patch)

Comparing rxvt-unicode/src/scrollbar.h (file contents):
Revision 1.2 by ayin, Sat Dec 29 14:25:43 2007 UTC vs.
Revision 1.5 by ayin, Sat Dec 29 14:52:55 2007 UTC

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 int shadow; /* scrollbar shadow width */
18 Window win; 18 Window win;
19 int (rxvt_term::*update)(int, int, int, int); 19 int (rxvt_term::*update)(int, int, int, int);
20 20
21 void setIdle() { state = 1 ; } 21 void setIdle() { state = 1 ; }
22 void setMotion() { state = 'm'; } 22 void setMotion() { state = 'm'; }
23 void setUp() { state = 'U'; } 23 void setUp() { state = 'U'; }
24 void setDn() { state = 'D'; } 24 void setDn() { state = 'D'; }
25} scrollBar_t; 25} scrollBar_t;
26 26
27#define scrollbar_TotalWidth() (scrollBar.width + scrollBar.sb_shadow * 2) 27#define scrollbar_TotalWidth() (scrollBar.width + scrollBar.shadow * 2)
28#define scrollbar_isMotion() (scrollBar.state == 'm') 28#define scrollbar_isMotion() (scrollBar.state == 'm')
29#define scrollbar_isUp() (scrollBar.state == 'U') 29#define scrollbar_isUp() (scrollBar.state == 'U')
30#define scrollbar_isDn() (scrollBar.state == 'D') 30#define scrollbar_isDn() (scrollBar.state == 'D')
31#define scrollbar_isUpDn() isupper (scrollBar.state) 31#define scrollbar_isUpDn() (scrollbar_isUp () || scrollbar_isDn ())
32#define isScrollbarWindow(w) (scrollBar.state && (w) == scrollBar.win) 32#define isScrollbarWindow(w) (scrollBar.state && (w) == scrollBar.win)
33 33
34#define scrollbarnext_dnval() (scrollBar.end + (scrollBar.width + 1)) 34#define scrollbarnext_dnval() (scrollBar.end + (scrollBar.width + 1))
35#define scrollbarnext_upButton(y) ((y) > scrollBar.end \ 35#define scrollbarnext_upButton(y) ((y) > scrollBar.end \
36 && (y) <= scrollbarnext_dnval ()) 36 && (y) <= scrollbarnext_dnval ())
37#define scrollbarnext_dnButton(y) ((y) > scrollbarnext_dnval()) 37#define scrollbarnext_dnButton(y) ((y) > scrollbarnext_dnval())
38#define SCROLLNEXT_MINHEIGHT SB_THUMB_MIN_HEIGHT 38#define SCROLLNEXT_MINHEIGHT SB_THUMB_MIN_HEIGHT
39#define scrollbarrxvt_upButton(y) ((y) < scrollBar.beg) 39#define scrollbarrxvt_upButton(y) ((y) < scrollBar.beg)
40#define scrollbarrxvt_dnButton(y) ((y) > scrollBar.end) 40#define scrollbarrxvt_dnButton(y) ((y) > scrollBar.end)
41#define SCROLLRXVT_MINHEIGHT 10 41#define SCROLLRXVT_MINHEIGHT 10
42#define SCROLLXTERM_MINHEIGHT 10
43 42
44#define scrollbar_minheight() (scrollBar.style == R_SB_NEXT \ 43#define scrollbar_minheight() (scrollBar.style == R_SB_NEXT \
45 ? SCROLLNEXT_MINHEIGHT \ 44 ? SCROLLNEXT_MINHEIGHT \
46 : SCROLLRXVT_MINHEIGHT) 45 : SCROLLRXVT_MINHEIGHT)
47#define scrollbar_above_slider(y) ((y) < scrollBar.top) 46#define scrollbar_above_slider(y) ((y) < scrollBar.top)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines