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.15 by pcg, Thu Apr 8 20:31:45 2004 UTC vs.
Revision 1.19 by root, Sun Aug 15 22:09:24 2004 UTC

23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 *----------------------------------------------------------------------*/ 24 *----------------------------------------------------------------------*/
25 25
26#include "../config.h" /* NECESSARY */ 26#include "../config.h" /* NECESSARY */
27#include "rxvt.h" /* NECESSARY */ 27#include "rxvt.h" /* NECESSARY */
28#include "scrollbar.intpro" /* PROTOS for internal routines */
29 28
30/*----------------------------------------------------------------------*/ 29/*----------------------------------------------------------------------*/
31 30
32/* 31/*
33 * Map or unmap a scrollbar. Returns non-zero upon change of state 32 * Map or unmap a scrollbar. Returns non-zero upon change of state
114 TermWin.parent[0], 113 TermWin.parent[0],
115 window_sb_x, 0, 114 window_sb_x, 0,
116 scrollbar_TotalWidth (), 115 scrollbar_TotalWidth (),
117 szHint.height, 116 szHint.height,
118 0, 117 0,
119 PixColors[Color_fg], 118 pix_colors[Color_fg],
120 PixColors[Color_bg]); 119 pix_colors[Color_bg]);
121#ifdef DEBUG_X 120#ifdef DEBUG_X
122 XStoreName (display->display, scrollBar.win, "scrollbar"); 121 XStoreName (display->display, scrollBar.win, "scrollbar");
123#endif 122#endif
124 XDefineCursor (display->display, scrollBar.win, leftptr_cursor); 123 XDefineCursor (display->display, scrollBar.win, leftptr_cursor);
125 124
201 200
202# if (defined(NEXT_SCROLLBAR) || defined(XTERM_SCROLLBAR) || defined(PLAIN_SCROLLBAR)) 201# if (defined(NEXT_SCROLLBAR) || defined(XTERM_SCROLLBAR) || defined(PLAIN_SCROLLBAR))
203 if (scrollstyle) 202 if (scrollstyle)
204 { 203 {
205# ifdef NEXT_SCROLLBAR 204# ifdef NEXT_SCROLLBAR
206 if (STRNCASECMP (scrollstyle, "next", 4) == 0) 205 if (strncasecmp (scrollstyle, "next", 4) == 0)
207 style = R_SB_NEXT; 206 style = R_SB_NEXT;
208# endif 207# endif
209# ifdef XTERM_SCROLLBAR 208# ifdef XTERM_SCROLLBAR
210 if (STRNCASECMP (scrollstyle, "xterm", 5) == 0) 209 if (strncasecmp (scrollstyle, "xterm", 5) == 0)
211 style = R_SB_XTERM; 210 style = R_SB_XTERM;
212# endif 211# endif
213# ifdef PLAIN_SCROLLBAR 212# ifdef PLAIN_SCROLLBAR
214 if (STRNCASECMP (scrollstyle, "plain", 5) == 0) 213 if (strncasecmp (scrollstyle, "plain", 5) == 0)
215 style = R_SB_PLAIN; 214 style = R_SB_PLAIN;
216# endif 215# endif
217 216
218 } 217 }
219# endif 218# endif
229 if (style != R_SB_NEXT) /* dishonour request - for now */ 228 if (style != R_SB_NEXT) /* dishonour request - for now */
230 if (thickness && (i = atoi (thickness)) >= SB_WIDTH_MINIMUM) 229 if (thickness && (i = atoi (thickness)) >= SB_WIDTH_MINIMUM)
231 width = min (i, SB_WIDTH_MAXIMUM); 230 width = min (i, SB_WIDTH_MAXIMUM);
232 231
233# if defined(RXVT_SCROLLBAR) 232# if defined(RXVT_SCROLLBAR)
234 if (! (Options & Opt_scrollBar_floating) && style == R_SB_RXVT) 233 if (! (options & Opt_scrollBar_floating) && style == R_SB_RXVT)
235 sb_shadow = SHADOW; 234 sb_shadow = SHADOW;
236# endif 235# endif
237 236
238 scrollBar.style = style; 237 scrollBar.style = style;
239 scrollBar.width = width; 238 scrollBar.width = width;
240 239
241 /* scrollbar_align = R_SB_ALIGN_CENTRE; */ 240 /* scrollbar_align = R_SB_ALIGN_CENTRE; */
242 if (scrollalign) 241 if (scrollalign)
243 { 242 {
244 if (STRNCASECMP (scrollalign, "top", 3) == 0) 243 if (strncasecmp (scrollalign, "top", 3) == 0)
245 scrollbar_align = R_SB_ALIGN_TOP; 244 scrollbar_align = R_SB_ALIGN_TOP;
246 else if (STRNCASECMP (scrollalign, "bottom", 6) == 0) 245 else if (strncasecmp (scrollalign, "bottom", 6) == 0)
247 scrollbar_align = R_SB_ALIGN_BOTTOM; 246 scrollbar_align = R_SB_ALIGN_BOTTOM;
248 } 247 }
249#endif 248#endif
250} 249}
251 250

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines