… | |
… | |
62 | int last_state; /* scrollbar last state */ |
62 | int last_state; /* scrollbar last state */ |
63 | int len; |
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 (); |
|
|
72 | int map (int); |
|
|
73 | int show (int); |
|
|
74 | void destroy (); |
69 | |
75 | |
70 | bool upButton (int y) |
76 | bool upButton (int y) |
71 | { |
77 | { |
72 | if (style == R_SB_NEXT) |
78 | if (style == R_SB_NEXT) |
73 | return y > end && y <= end + width + 1; |
79 | return y > end && y <= end + width + 1; |
… | |
… | |
93 | } |
99 | } |
94 | unsigned total_width () |
100 | unsigned total_width () |
95 | { |
101 | { |
96 | return width + shadow * 2; |
102 | return width + shadow * 2; |
97 | } |
103 | } |
|
|
104 | |
|
|
105 | #if defined(NEXT_SCROLLBAR) |
|
|
106 | GC blackGC, |
|
|
107 | whiteGC, |
|
|
108 | grayGC, |
|
|
109 | darkGC, |
|
|
110 | stippleGC; |
|
|
111 | Pixmap dimple, |
|
|
112 | upArrow, |
|
|
113 | downArrow, |
|
|
114 | upArrowHi, |
|
|
115 | downArrowHi; |
|
|
116 | #endif |
|
|
117 | |
|
|
118 | #if defined(RXVT_SCROLLBAR) |
|
|
119 | GC scrollbarGC, |
|
|
120 | topShadowGC, |
|
|
121 | botShadowGC; |
|
|
122 | #endif |
|
|
123 | |
|
|
124 | #if defined(XTERM_SCROLLBAR) |
|
|
125 | GC xscrollbarGC, |
|
|
126 | ShadowGC; |
|
|
127 | #endif |
|
|
128 | |
|
|
129 | #if defined(PLAIN_SCROLLBAR) |
|
|
130 | GC pscrollbarGC; |
|
|
131 | #endif |
|
|
132 | |
|
|
133 | // scrollbar-next.C |
|
|
134 | int show_next (int); |
|
|
135 | // scrollbar-rxvt.C |
|
|
136 | int show_rxvt (int); |
|
|
137 | // scrollbar-xterm.C |
|
|
138 | int show_xterm (int); |
|
|
139 | // scrollbar-plain.C |
|
|
140 | int show_plain (int); |
|
|
141 | |
|
|
142 | private: |
|
|
143 | void init_next (); |
98 | }; |
144 | }; |
99 | |
145 | |
100 | #define scrollbar_above_slider(y) ((y) < scrollBar.top) |
146 | #define scrollbar_above_slider(y) ((y) < scrollBar.top) |
101 | #define scrollbar_below_slider(y) ((y) > scrollBar.bot) |
147 | #define scrollbar_below_slider(y) ((y) > scrollBar.bot) |
102 | #define scrollbar_position(y) ((y) - scrollBar.beg) |
148 | #define scrollbar_position(y) ((y) - scrollBar.beg) |