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.19 by ayin, Tue Feb 19 10:47:03 2008 UTC vs.
Revision 1.23 by root, Wed Nov 5 14:43:54 2008 UTC

44 STATE_MOTION, 44 STATE_MOTION,
45 STATE_UP, 45 STATE_UP,
46 STATE_DOWN, 46 STATE_DOWN,
47}; 47};
48 48
49struct scrollBar_t { 49struct scrollBar_t
50{
50 rxvt_term *term; 51 rxvt_term *term;
51 char state; /* scrollbar state */ 52 char state; /* scrollbar state */
52 char init; /* scrollbar has been initialised */ 53 char init; /* scrollbar has been initialised */
53 unsigned int beg; /* slider sub-window begin height */ 54 unsigned int beg; /* slider sub-window begin height */
54 unsigned int end; /* slider sub-window end height */ 55 unsigned int end; /* slider sub-window end height */
58 unsigned int width; /* scrollbar width */ 59 unsigned int width; /* scrollbar width */
59 int shadow; /* scrollbar shadow width */ 60 int shadow; /* scrollbar shadow width */
60 int last_bot; /* scrollbar last bottom position */ 61 int last_bot; /* scrollbar last bottom position */
61 int last_top; /* scrollbar last top position */ 62 int last_top; /* scrollbar last top position */
62 int last_state; /* scrollbar last state */ 63 int last_state; /* scrollbar last state */
63 int len;
64 unsigned char align; 64 unsigned char align;
65 Window win; 65 Window win;
66 Cursor leftptr_cursor; 66 Cursor leftptr_cursor;
67 int (rxvt_term::*update)(int, int, int, int); 67 int (scrollBar_t::*update)(int);
68 void setup (rxvt_term *); 68 void setup (rxvt_term *);
69 // update style dependent data
70 void update_data ();
71 void resize (); 69 void resize ();
72 int map (int); 70 int map (int);
73 int show (int); 71 int show (int);
72 void destroy ();
74 73
75 bool upButton (int y) 74 bool upButton (int y)
76 { 75 {
77 if (style == R_SB_NEXT) 76 if (style == R_SB_NEXT)
78 return y > end && y <= end + width + 1; 77 return y > end && y <= end + width + 1;
98 } 97 }
99 unsigned total_width () 98 unsigned total_width ()
100 { 99 {
101 return width + shadow * 2; 100 return width + shadow * 2;
102 } 101 }
102
103#if defined(NEXT_SCROLLBAR)
104 GC blackGC,
105 whiteGC,
106 grayGC,
107 darkGC,
108 stippleGC;
109 Pixmap dimple,
110 upArrow,
111 downArrow,
112 upArrowHi,
113 downArrowHi;
114#endif
115
116#if defined(RXVT_SCROLLBAR)
117 GC scrollbarGC,
118 topShadowGC,
119 botShadowGC;
120#endif
121
122#if defined(XTERM_SCROLLBAR)
123 GC xscrollbarGC,
124 ShadowGC;
125#endif
126
127#if defined(PLAIN_SCROLLBAR)
128 GC pscrollbarGC;
129#endif
130
131private:
132 // update style dependent data
133 void update_data ();
134
135 // scrollbar-next.C
136 int show_next (int);
137 // scrollbar-rxvt.C
138 int show_rxvt (int);
139 // scrollbar-xterm.C
140 int show_xterm (int);
141 // scrollbar-plain.C
142 int show_plain (int);
143
144 void init_next ();
103}; 145};
104 146
105#define scrollbar_above_slider(y) ((y) < scrollBar.top) 147#define scrollbar_above_slider(y) ((y) < scrollBar.top)
106#define scrollbar_below_slider(y) ((y) > scrollBar.bot) 148#define scrollbar_below_slider(y) ((y) > scrollBar.bot)
107#define scrollbar_position(y) ((y) - scrollBar.beg) 149#define scrollbar_position(y) ((y) - scrollBar.beg)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines