1 | /*--------------------------------*-C-*---------------------------------* |
1 | /*--------------------------------*-C-*---------------------------------* |
2 | * File: scrollbar.c |
2 | * File: scrollbar.c |
3 | *----------------------------------------------------------------------* |
3 | *----------------------------------------------------------------------* |
4 | * $Id: scrollbar.C,v 1.8 2004/01/31 00:20:21 pcg Exp $ |
4 | * $Id: scrollbar.C,v 1.9 2004/01/31 02:15:02 pcg Exp $ |
5 | * |
5 | * |
6 | * Copyright (c) 1997,1998 mj olesen <olesen@me.QueensU.CA> |
6 | * Copyright (c) 1997,1998 mj olesen <olesen@me.QueensU.CA> |
7 | * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org> |
7 | * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org> |
8 | * - N*XTstep like scrollbars |
8 | * - N*XTstep like scrollbars |
9 | * Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com> |
9 | * Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com> |
… | |
… | |
72 | |
72 | |
73 | #if defined(XTERM_SCROLLBAR) |
73 | #if defined(XTERM_SCROLLBAR) |
74 | if (scrollBar.style == R_SB_XTERM) { |
74 | if (scrollBar.style == R_SB_XTERM) { |
75 | scrollBar.beg = R_SCROLLBEG_XTERM; |
75 | scrollBar.beg = R_SCROLLBEG_XTERM; |
76 | scrollBar.end = R_SCROLLEND_XTERM; |
76 | scrollBar.end = R_SCROLLEND_XTERM; |
77 | //scrollBar.update = rxvt_scrollbar_show_xterm; |
77 | scrollBar.update = &rxvt_term::scrollbar_show_xterm; |
78 | } |
78 | } |
79 | #endif |
79 | #endif |
80 | #if defined(NEXT_SCROLLBAR) |
80 | #if defined(NEXT_SCROLLBAR) |
81 | if (scrollBar.style == R_SB_NEXT) { |
81 | if (scrollBar.style == R_SB_NEXT) { |
82 | scrollBar.beg = R_SCROLLBEG_NEXT; |
82 | scrollBar.beg = R_SCROLLBEG_NEXT; |
83 | scrollBar.end = R_SCROLLEND_NEXT; |
83 | scrollBar.end = R_SCROLLEND_NEXT; |
84 | //scrollBar.update = rxvt_scrollbar_show_next; |
84 | scrollBar.update = &rxvt_term::scrollbar_show_next; |
85 | } |
85 | } |
86 | #endif |
86 | #endif |
87 | #if defined(RXVT_SCROLLBAR) |
87 | #if defined(RXVT_SCROLLBAR) |
88 | if (scrollBar.style == R_SB_RXVT) { |
88 | if (scrollBar.style == R_SB_RXVT) { |
89 | scrollBar.beg = R_SCROLLBEG_RXVT; |
89 | scrollBar.beg = R_SCROLLBEG_RXVT; |
90 | scrollBar.end = R_SCROLLEND_RXVT; |
90 | scrollBar.end = R_SCROLLEND_RXVT; |
91 | //scrollBar.update = rxvt_scrollbar_show_rxvt; |
91 | scrollBar.update = &rxvt_term::scrollbar_show_rxvt; |
92 | } |
92 | } |
93 | #endif |
93 | #endif |
94 | |
94 | |
95 | if (!scrollBar.win) { |
95 | if (!scrollBar.win) { |
96 | /* create the scrollbar window */ |
96 | /* create the scrollbar window */ |
… | |
… | |
146 | && scrollBar.bot == last_bot |
146 | && scrollBar.bot == last_bot |
147 | && (scrollBar.state == last_state || !scrollbar_isUpDn())) |
147 | && (scrollBar.state == last_state || !scrollbar_isUpDn())) |
148 | return 0; |
148 | return 0; |
149 | } |
149 | } |
150 | |
150 | |
151 | ret = scrollbar_update (update, last_top, last_bot, scrollbar_len); |
151 | ret = (this->*scrollBar.update) (update, last_top, last_bot, scrollbar_len); |
152 | |
152 | |
153 | last_top = scrollBar.top; |
153 | last_top = scrollBar.top; |
154 | last_bot = scrollBar.bot; |
154 | last_bot = scrollBar.bot; |
155 | last_state = scrollBar.state; |
155 | last_state = scrollBar.state; |
156 | #endif |
156 | #endif |