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

Comparing rxvt-unicode/src/scrollbar.C (file contents):
Revision 1.60 by ayin, Tue Feb 19 10:47:03 2008 UTC vs.
Revision 1.61 by ayin, Tue Feb 19 13:01:33 2008 UTC

129 && (state == last_state 129 && (state == last_state
130 || !(state == STATE_UP || state == STATE_DOWN))) 130 || !(state == STATE_UP || state == STATE_DOWN)))
131 return 0; 131 return 0;
132 } 132 }
133 133
134 ret = (term->*update) (refresh, last_top, last_bot, len); 134 ret = (this->*update) (refresh);
135 135
136 last_top = top; 136 last_top = top;
137 last_bot = bot; 137 last_bot = bot;
138 last_state = state; 138 last_state = state;
139 139
215 /* cursor scrollBar: Black-on-White */ 215 /* cursor scrollBar: Black-on-White */
216 leftptr_cursor = XCreateFontCursor (term->dpy, XC_left_ptr); 216 leftptr_cursor = XCreateFontCursor (term->dpy, XC_left_ptr);
217} 217}
218 218
219void 219void
220scrollBar_t::destroy ()
221{
222#ifdef XTERM_SCROLLBAR
223 if (xscrollbarGC) XFreeGC (term->dpy, xscrollbarGC);
224 if (ShadowGC) XFreeGC (term->dpy, ShadowGC);
225#endif
226#ifdef PLAIN_SCROLLBAR
227 if (pscrollbarGC) XFreeGC (term->dpy, pscrollbarGC);
228#endif
229#ifdef NEXT_SCROLLBAR
230 if (blackGC) XFreeGC (term->dpy, blackGC);
231 if (whiteGC) XFreeGC (term->dpy, whiteGC);
232 if (grayGC) XFreeGC (term->dpy, grayGC);
233 if (darkGC) XFreeGC (term->dpy, darkGC);
234 if (stippleGC) XFreeGC (term->dpy, stippleGC);
235 if (dimple) XFreePixmap (term->dpy, dimple);
236 if (upArrow) XFreePixmap (term->dpy, upArrow);
237 if (downArrow) XFreePixmap (term->dpy, downArrow);
238 if (upArrowHi) XFreePixmap (term->dpy, upArrowHi);
239 if (downArrowHi) XFreePixmap (term->dpy, downArrowHi);
240#endif
241#ifdef RXVT_SCROLLBAR
242 if (topShadowGC) XFreeGC (term->dpy, topShadowGC);
243 if (botShadowGC) XFreeGC (term->dpy, botShadowGC);
244 if (scrollbarGC) XFreeGC (term->dpy, scrollbarGC);
245#endif
246}
247
248void
220scrollBar_t::update_data () 249scrollBar_t::update_data ()
221{ 250{
222#if defined(PLAIN_SCROLLBAR) 251#if defined(PLAIN_SCROLLBAR)
223 if (style == R_SB_PLAIN) 252 if (style == R_SB_PLAIN)
224 { 253 {
225 beg = 0; 254 beg = 0;
226 end = term->szHint.height; 255 end = term->szHint.height;
227 update = &rxvt_term::scrollbar_show_plain; 256 update = &scrollBar_t::show_plain;
228 } 257 }
229#endif 258#endif
230#if defined(XTERM_SCROLLBAR) 259#if defined(XTERM_SCROLLBAR)
231 if (style == R_SB_XTERM) 260 if (style == R_SB_XTERM)
232 { 261 {
233 beg = 0; 262 beg = 0;
234 end = term->szHint.height; 263 end = term->szHint.height;
235 update = &rxvt_term::scrollbar_show_xterm; 264 update = &scrollBar_t::show_xterm;
236 } 265 }
237#endif 266#endif
238#if defined(NEXT_SCROLLBAR) 267#if defined(NEXT_SCROLLBAR)
239 if (style == R_SB_NEXT) 268 if (style == R_SB_NEXT)
240 { 269 {
241 beg = 0; 270 beg = 0;
242 end = term->szHint.height - (SB_BUTTON_TOTAL_HEIGHT + SB_PADDING); 271 end = term->szHint.height - (SB_BUTTON_TOTAL_HEIGHT + SB_PADDING);
243 update = &rxvt_term::scrollbar_show_next; 272 update = &scrollBar_t::show_next;
244 } 273 }
245#endif 274#endif
246#if defined(RXVT_SCROLLBAR) 275#if defined(RXVT_SCROLLBAR)
247 if (style == R_SB_RXVT) 276 if (style == R_SB_RXVT)
248 { 277 {
249 beg = (width + 1) + shadow; 278 beg = (width + 1) + shadow;
250 end = term->szHint.height - beg - (2 * shadow); 279 end = term->szHint.height - beg - (2 * shadow);
251 update = &rxvt_term::scrollbar_show_rxvt; 280 update = &scrollBar_t::show_rxvt;
252 } 281 }
253#endif 282#endif
254} 283}
255 284
256/*----------------------- end-of-file (C source) -----------------------*/ 285/*----------------------- end-of-file (C source) -----------------------*/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines