--- rxvt-unicode/src/scrollbar.h 2011/08/27 00:44:38 1.26 +++ rxvt-unicode/src/scrollbar.h 2012/10/02 10:29:12 1.30 @@ -32,24 +32,24 @@ #define SB_THUMB_MIN_HEIGHT (SB_BUTTON_WIDTH - (SB_PADDING * 2)) enum sb_state { - STATE_OFF, - STATE_IDLE, - STATE_MOTION, - STATE_UP, - STATE_DOWN, + SB_STATE_OFF, + SB_STATE_IDLE, + SB_STATE_MOTION, + SB_STATE_UP, + SB_STATE_DOWN, }; enum sb_style { - R_SB_NEXT = 1, - R_SB_XTERM = 2, - R_SB_PLAIN = 4, - R_SB_RXVT = 8, + SB_STYLE_NEXT = 1, + SB_STYLE_XTERM = 2, + SB_STYLE_PLAIN = 4, + SB_STYLE_RXVT = 8, }; enum sb_align { - R_SB_ALIGN_CENTRE, - R_SB_ALIGN_TOP, - R_SB_ALIGN_BOTTOM, + SB_ALIGN_CENTRE, + SB_ALIGN_TOP, + SB_ALIGN_BOTTOM, }; struct scrollBar_t @@ -73,33 +73,34 @@ int (scrollBar_t::*update)(int); void setup (rxvt_term *); void resize (); - int map (int); + void map (int); int show (int); void destroy (); + int color (); bool upButton (int y) { - if (style == R_SB_NEXT) + if (style == SB_STYLE_NEXT) return y > end && y <= end + width + 1; - if (style == R_SB_RXVT) + if (style == SB_STYLE_RXVT) return y < beg; return false; } bool dnButton (int y) { - if (style == R_SB_NEXT) + if (style == SB_STYLE_NEXT) return y > end + width + 1; - if (style == R_SB_RXVT) + if (style == SB_STYLE_RXVT) return y > end; return false; } int min_height () { - return style == R_SB_NEXT ? SB_THUMB_MIN_HEIGHT : 10; + return style == SB_STYLE_NEXT ? SB_THUMB_MIN_HEIGHT : 10; } int size () { - return max (end - beg - min_height (), 0); + return max (end - beg, 0); } int total_width () {