… | |
… | |
4 | * |
4 | * |
5 | * Copyright (c) 1997,1998 mj olesen <olesen@me.QueensU.CA> |
5 | * Copyright (c) 1997,1998 mj olesen <olesen@me.QueensU.CA> |
6 | * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org> |
6 | * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org> |
7 | * - N*XTstep like scrollbars |
7 | * - N*XTstep like scrollbars |
8 | * Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com> |
8 | * Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com> |
9 | * Copyright (c) 2004-2006 Marc Lehmann <pcg@goof.com> |
9 | * Copyright (c) 2004-2006 Marc Lehmann <schmorp@schmorp.de> |
10 | * |
10 | * |
11 | * This program is free software; you can redistribute it and/or modify |
11 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License as published by |
12 | * it under the terms of the GNU General Public License as published by |
13 | * the Free Software Foundation; either version 2 of the License, or |
13 | * the Free Software Foundation; either version 2 of the License, or |
14 | * (at your option) any later version. |
14 | * (at your option) any later version. |
… | |
… | |
72 | |
72 | |
73 | if (!win) |
73 | if (!win) |
74 | { |
74 | { |
75 | /* create the scrollbar window */ |
75 | /* create the scrollbar window */ |
76 | win = XCreateSimpleWindow (term->dpy, |
76 | win = XCreateSimpleWindow (term->dpy, |
77 | term->parent[0], |
77 | term->parent, |
78 | window_sb_x, 0, |
78 | window_sb_x, 0, |
79 | total_width (), |
79 | total_width (), |
80 | term->szHint.height, |
80 | term->szHint.height, |
81 | 0, |
81 | 0, |
82 | term->pix_colors[Color_fg], |
82 | term->pix_colors[Color_fg], |
… | |
… | |
192 | |
192 | |
193 | if (style != R_SB_NEXT) /* dishonour request - for now */ |
193 | if (style != R_SB_NEXT) /* dishonour request - for now */ |
194 | if (thickness && (i = atoi (thickness)) >= SB_WIDTH_MINIMUM) |
194 | if (thickness && (i = atoi (thickness)) >= SB_WIDTH_MINIMUM) |
195 | width = min (i, SB_WIDTH_MAXIMUM); |
195 | width = min (i, SB_WIDTH_MAXIMUM); |
196 | |
196 | |
|
|
197 | # ifdef RXVT_SCROLLBAR |
|
|
198 | if (! term->option (Opt_scrollBar_floating) && style == R_SB_RXVT) |
|
|
199 | shadow = SHADOW_WIDTH; |
|
|
200 | # endif |
|
|
201 | |
197 | this->style = style; |
202 | this->style = style; |
198 | this->width = width; |
203 | this->width = width; |
199 | |
204 | |
200 | /* align = R_SB_ALIGN_CENTRE; */ |
205 | /* align = R_SB_ALIGN_CENTRE; */ |
201 | if (scrollalign) |
206 | if (scrollalign) |
… | |
… | |
203 | if (strncasecmp (scrollalign, "top", 3) == 0) |
208 | if (strncasecmp (scrollalign, "top", 3) == 0) |
204 | align = R_SB_ALIGN_TOP; |
209 | align = R_SB_ALIGN_TOP; |
205 | else if (strncasecmp (scrollalign, "bottom", 6) == 0) |
210 | else if (strncasecmp (scrollalign, "bottom", 6) == 0) |
206 | align = R_SB_ALIGN_BOTTOM; |
211 | align = R_SB_ALIGN_BOTTOM; |
207 | } |
212 | } |
208 | last_bot = last_state = -1; |
213 | last_state = 0; |
209 | /* cursor scrollBar: Black-on-White */ |
214 | /* cursor scrollBar: Black-on-White */ |
210 | leftptr_cursor = XCreateFontCursor (term->dpy, XC_left_ptr); |
215 | leftptr_cursor = XCreateFontCursor (term->dpy, XC_left_ptr); |
211 | } |
216 | } |
212 | |
217 | |
213 | void |
218 | void |