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