--- rxvt-unicode/src/scrollbar.h 2008/02/18 11:41:40 1.18 +++ rxvt-unicode/src/scrollbar.h 2008/11/05 14:43:54 1.23 @@ -46,7 +46,8 @@ STATE_DOWN, }; -struct scrollBar_t { +struct scrollBar_t +{ rxvt_term *term; char state; /* scrollbar state */ char init; /* scrollbar has been initialised */ @@ -60,14 +61,15 @@ int last_bot; /* scrollbar last bottom position */ int last_top; /* scrollbar last top position */ int last_state; /* scrollbar last state */ - int len; unsigned char align; Window win; Cursor leftptr_cursor; - int (rxvt_term::*update)(int, int, int, int); + int (scrollBar_t::*update)(int); void setup (rxvt_term *); - // update style dependent data - void update_data (); + void resize (); + int map (int); + int show (int); + void destroy (); bool upButton (int y) { @@ -97,6 +99,49 @@ { return width + shadow * 2; } + +#if defined(NEXT_SCROLLBAR) + GC blackGC, + whiteGC, + grayGC, + darkGC, + stippleGC; + Pixmap dimple, + upArrow, + downArrow, + upArrowHi, + downArrowHi; +#endif + +#if defined(RXVT_SCROLLBAR) + GC scrollbarGC, + topShadowGC, + botShadowGC; +#endif + +#if defined(XTERM_SCROLLBAR) + GC xscrollbarGC, + ShadowGC; +#endif + +#if defined(PLAIN_SCROLLBAR) + GC pscrollbarGC; +#endif + +private: + // update style dependent data + void update_data (); + + // scrollbar-next.C + int show_next (int); + // scrollbar-rxvt.C + int show_rxvt (int); + // scrollbar-xterm.C + int show_xterm (int); + // scrollbar-plain.C + int show_plain (int); + + void init_next (); }; #define scrollbar_above_slider(y) ((y) < scrollBar.top)