1996-09-27 06:29:02 -04:00
|
|
|
|
/*
|
|
|
|
|
* tkScrollbar.c --
|
|
|
|
|
*
|
|
|
|
|
* This module implements a scrollbar widgets for the Tk
|
|
|
|
|
* toolkit. A scrollbar displays a slider and two arrows;
|
|
|
|
|
* mouse clicks on features within the scrollbar cause
|
|
|
|
|
* scrolling commands to be invoked.
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 1990-1994 The Regents of the University of California.
|
1998-04-10 06:59:06 -04:00
|
|
|
|
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
|
1996-09-27 06:29:02 -04:00
|
|
|
|
*
|
|
|
|
|
* See the file "license.terms" for information on usage and redistribution
|
|
|
|
|
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
|
|
|
*
|
1998-04-10 06:59:06 -04:00
|
|
|
|
* SCCS: @(#) tkScrollbar.c 1.94 97/07/31 09:12:44
|
1996-09-27 06:29:02 -04:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "tkPort.h"
|
1998-04-10 06:59:06 -04:00
|
|
|
|
#include "tkScrollbar.h"
|
1996-09-27 06:29:02 -04:00
|
|
|
|
#include "default.h"
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Information used for argv parsing.
|
|
|
|
|
*/
|
|
|
|
|
|
1998-04-10 06:59:06 -04:00
|
|
|
|
Tk_ConfigSpec tkpScrollbarConfigSpecs[] = {
|
1996-09-27 06:29:02 -04:00
|
|
|
|
{TK_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_ACTIVE_BG_COLOR, Tk_Offset(TkScrollbar, activeBorder),
|
1996-09-27 06:29:02 -04:00
|
|
|
|
TK_CONFIG_COLOR_ONLY},
|
|
|
|
|
{TK_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_ACTIVE_BG_MONO, Tk_Offset(TkScrollbar, activeBorder),
|
1996-09-27 06:29:02 -04:00
|
|
|
|
TK_CONFIG_MONO_ONLY},
|
|
|
|
|
{TK_CONFIG_RELIEF, "-activerelief", "activeRelief", "Relief",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_ACTIVE_RELIEF, Tk_Offset(TkScrollbar, activeRelief), 0},
|
1996-09-27 06:29:02 -04:00
|
|
|
|
{TK_CONFIG_BORDER, "-background", "background", "Background",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_BG_COLOR, Tk_Offset(TkScrollbar, bgBorder),
|
1996-09-27 06:29:02 -04:00
|
|
|
|
TK_CONFIG_COLOR_ONLY},
|
|
|
|
|
{TK_CONFIG_BORDER, "-background", "background", "Background",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_BG_MONO, Tk_Offset(TkScrollbar, bgBorder),
|
1996-09-27 06:29:02 -04:00
|
|
|
|
TK_CONFIG_MONO_ONLY},
|
|
|
|
|
{TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL,
|
|
|
|
|
(char *) NULL, 0, 0},
|
|
|
|
|
{TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL,
|
|
|
|
|
(char *) NULL, 0, 0},
|
|
|
|
|
{TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_BORDER_WIDTH, Tk_Offset(TkScrollbar, borderWidth), 0},
|
1996-09-27 06:29:02 -04:00
|
|
|
|
#ifdef STk_CODE
|
|
|
|
|
{TK_CONFIG_CLOSURE, "-command", "command", "Command",
|
|
|
|
|
#else
|
|
|
|
|
{TK_CONFIG_STRING, "-command", "command", "Command",
|
|
|
|
|
#endif
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_COMMAND, Tk_Offset(TkScrollbar, command),
|
1996-09-27 06:29:02 -04:00
|
|
|
|
TK_CONFIG_NULL_OK},
|
|
|
|
|
{TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_CURSOR, Tk_Offset(TkScrollbar, cursor), TK_CONFIG_NULL_OK},
|
1996-09-27 06:29:02 -04:00
|
|
|
|
{TK_CONFIG_PIXELS, "-elementborderwidth", "elementBorderWidth",
|
|
|
|
|
"BorderWidth", DEF_SCROLLBAR_EL_BORDER_WIDTH,
|
1998-04-10 06:59:06 -04:00
|
|
|
|
Tk_Offset(TkScrollbar, elementBorderWidth), 0},
|
1996-09-27 06:29:02 -04:00
|
|
|
|
{TK_CONFIG_COLOR, "-highlightbackground", "highlightBackground",
|
|
|
|
|
"HighlightBackground", DEF_SCROLLBAR_HIGHLIGHT_BG,
|
1998-04-10 06:59:06 -04:00
|
|
|
|
Tk_Offset(TkScrollbar, highlightBgColorPtr), 0},
|
1996-09-27 06:29:02 -04:00
|
|
|
|
{TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
|
|
|
|
|
DEF_SCROLLBAR_HIGHLIGHT,
|
1998-04-10 06:59:06 -04:00
|
|
|
|
Tk_Offset(TkScrollbar, highlightColorPtr), 0},
|
1996-09-27 06:29:02 -04:00
|
|
|
|
{TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness",
|
|
|
|
|
"HighlightThickness",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_HIGHLIGHT_WIDTH, Tk_Offset(TkScrollbar, highlightWidth), 0},
|
1996-09-27 06:29:02 -04:00
|
|
|
|
{TK_CONFIG_BOOLEAN, "-jump", "jump", "Jump",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_JUMP, Tk_Offset(TkScrollbar, jump), 0},
|
1996-09-27 06:29:02 -04:00
|
|
|
|
{TK_CONFIG_UID, "-orient", "orient", "Orient",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_ORIENT, Tk_Offset(TkScrollbar, orientUid), 0},
|
1996-09-27 06:29:02 -04:00
|
|
|
|
{TK_CONFIG_RELIEF, "-relief", "relief", "Relief",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_RELIEF, Tk_Offset(TkScrollbar, relief), 0},
|
1996-09-27 06:29:02 -04:00
|
|
|
|
{TK_CONFIG_INT, "-repeatdelay", "repeatDelay", "RepeatDelay",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_REPEAT_DELAY, Tk_Offset(TkScrollbar, repeatDelay), 0},
|
1996-09-27 06:29:02 -04:00
|
|
|
|
{TK_CONFIG_INT, "-repeatinterval", "repeatInterval", "RepeatInterval",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_REPEAT_INTERVAL, Tk_Offset(TkScrollbar, repeatInterval), 0},
|
1996-09-27 06:29:02 -04:00
|
|
|
|
#ifdef STk_CODE
|
|
|
|
|
{TK_CONFIG_CLOSURE, "-takefocus", "takeFocus", "TakeFocus",
|
|
|
|
|
#else
|
|
|
|
|
{TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
|
|
|
|
|
#endif
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_TAKE_FOCUS, Tk_Offset(TkScrollbar, takeFocus),
|
1996-09-27 06:29:02 -04:00
|
|
|
|
TK_CONFIG_NULL_OK},
|
|
|
|
|
{TK_CONFIG_COLOR, "-troughcolor", "troughColor", "Background",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_TROUGH_COLOR, Tk_Offset(TkScrollbar, troughColorPtr),
|
1996-09-27 06:29:02 -04:00
|
|
|
|
TK_CONFIG_COLOR_ONLY},
|
|
|
|
|
{TK_CONFIG_COLOR, "-troughcolor", "troughColor", "Background",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_TROUGH_MONO, Tk_Offset(TkScrollbar, troughColorPtr),
|
1996-09-27 06:29:02 -04:00
|
|
|
|
TK_CONFIG_MONO_ONLY},
|
|
|
|
|
{TK_CONFIG_PIXELS, "-width", "width", "Width",
|
1998-04-10 06:59:06 -04:00
|
|
|
|
DEF_SCROLLBAR_WIDTH, Tk_Offset(TkScrollbar, width), 0},
|
1996-09-27 06:29:02 -04:00
|
|
|
|
{TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
|
|
|
|
|
(char *) NULL, 0, 0}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Forward declarations for procedures defined later in this file:
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
static int ConfigureScrollbar _ANSI_ARGS_((Tcl_Interp *interp,
|
1998-04-10 06:59:06 -04:00
|
|
|
|
TkScrollbar *scrollPtr, int argc, char **argv,
|
1996-09-27 06:29:02 -04:00
|
|
|
|
int flags));
|
|
|
|
|
static void ScrollbarCmdDeletedProc _ANSI_ARGS_((
|
|
|
|
|
ClientData clientData));
|
|
|
|
|
static int ScrollbarWidgetCmd _ANSI_ARGS_((ClientData clientData,
|
|
|
|
|
Tcl_Interp *, int argc, char **argv));
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
|
*
|
|
|
|
|
* Tk_ScrollbarCmd --
|
|
|
|
|
*
|
|
|
|
|
* This procedure is invoked to process the "scrollbar" Tcl
|
|
|
|
|
* command. See the user documentation for details on what
|
|
|
|
|
* it does.
|
|
|
|
|
*
|
|
|
|
|
* Results:
|
|
|
|
|
* A standard Tcl result.
|
|
|
|
|
*
|
|
|
|
|
* Side effects:
|
|
|
|
|
* See the user documentation.
|
|
|
|
|
*
|
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
Tk_ScrollbarCmd(clientData, interp, argc, argv)
|
|
|
|
|
ClientData clientData; /* Main window associated with
|
|
|
|
|
* interpreter. */
|
|
|
|
|
Tcl_Interp *interp; /* Current interpreter. */
|
|
|
|
|
int argc; /* Number of arguments. */
|
|
|
|
|
char **argv; /* Argument strings. */
|
|
|
|
|
{
|
|
|
|
|
Tk_Window tkwin = (Tk_Window) clientData;
|
1998-04-10 06:59:06 -04:00
|
|
|
|
register TkScrollbar *scrollPtr;
|
1996-09-27 06:29:02 -04:00
|
|
|
|
Tk_Window new;
|
|
|
|
|
|
|
|
|
|
if (argc < 2) {
|
|
|
|
|
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
|
|
|
|
argv[0], " pathName ?options?\"", (char *) NULL);
|
|
|
|
|
return TCL_ERROR;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
new = Tk_CreateWindowFromPath(interp, tkwin, argv[1], (char *) NULL);
|
|
|
|
|
if (new == NULL) {
|
|
|
|
|
return TCL_ERROR;
|
|
|
|
|
}
|
|
|
|
|
|
1998-04-10 06:59:06 -04:00
|
|
|
|
Tk_SetClass(new, "Scrollbar");
|
|
|
|
|
scrollPtr = TkpCreateScrollbar(new);
|
|
|
|
|
|
|
|
|
|
TkSetClassProcs(new, &tkpScrollbarProcs, (ClientData) scrollPtr);
|
|
|
|
|
|
1996-09-27 06:29:02 -04:00
|
|
|
|
/*
|
|
|
|
|
* Initialize fields that won't be initialized by ConfigureScrollbar,
|
|
|
|
|
* or which ConfigureScrollbar expects to have reasonable values
|
|
|
|
|
* (e.g. resource pointers).
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
scrollPtr->tkwin = new;
|
|
|
|
|
scrollPtr->display = Tk_Display(new);
|
|
|
|
|
scrollPtr->interp = interp;
|
|
|
|
|
scrollPtr->widgetCmd = Tcl_CreateCommand(interp,
|
|
|
|
|
Tk_PathName(scrollPtr->tkwin), ScrollbarWidgetCmd,
|
|
|
|
|
(ClientData) scrollPtr, ScrollbarCmdDeletedProc);
|
|
|
|
|
scrollPtr->orientUid = NULL;
|
|
|
|
|
scrollPtr->vertical = 0;
|
|
|
|
|
scrollPtr->width = 0;
|
|
|
|
|
scrollPtr->command = NULL;
|
|
|
|
|
scrollPtr->commandSize = 0;
|
|
|
|
|
scrollPtr->repeatDelay = 0;
|
|
|
|
|
scrollPtr->repeatInterval = 0;
|
|
|
|
|
scrollPtr->borderWidth = 0;
|
|
|
|
|
scrollPtr->bgBorder = NULL;
|
|
|
|
|
scrollPtr->activeBorder = NULL;
|
|
|
|
|
scrollPtr->troughColorPtr = NULL;
|
|
|
|
|
scrollPtr->relief = TK_RELIEF_FLAT;
|
|
|
|
|
scrollPtr->highlightWidth = 0;
|
|
|
|
|
scrollPtr->highlightBgColorPtr = NULL;
|
|
|
|
|
scrollPtr->highlightColorPtr = NULL;
|
|
|
|
|
scrollPtr->inset = 0;
|
|
|
|
|
scrollPtr->elementBorderWidth = -1;
|
|
|
|
|
scrollPtr->arrowLength = 0;
|
|
|
|
|
scrollPtr->sliderFirst = 0;
|
|
|
|
|
scrollPtr->sliderLast = 0;
|
|
|
|
|
scrollPtr->activeField = 0;
|
|
|
|
|
scrollPtr->activeRelief = TK_RELIEF_RAISED;
|
|
|
|
|
scrollPtr->totalUnits = 0;
|
|
|
|
|
scrollPtr->windowUnits = 0;
|
|
|
|
|
scrollPtr->firstUnit = 0;
|
|
|
|
|
scrollPtr->lastUnit = 0;
|
|
|
|
|
scrollPtr->firstFraction = 0.0;
|
|
|
|
|
scrollPtr->lastFraction = 0.0;
|
|
|
|
|
scrollPtr->cursor = None;
|
|
|
|
|
scrollPtr->takeFocus = NULL;
|
|
|
|
|
scrollPtr->flags = 0;
|
|
|
|
|
|
|
|
|
|
if (ConfigureScrollbar(interp, scrollPtr, argc-2, argv+2, 0) != TCL_OK) {
|
1998-04-10 06:59:06 -04:00
|
|
|
|
Tk_DestroyWindow(scrollPtr->tkwin);
|
|
|
|
|
return TCL_ERROR;
|
1996-09-27 06:29:02 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef STk_CODE
|
|
|
|
|
STk_sharp_dot_result(interp, Tk_PathName(scrollPtr->tkwin));
|
|
|
|
|
#else
|
|
|
|
|
interp->result = Tk_PathName(scrollPtr->tkwin);
|
|
|
|
|
#endif
|
|
|
|
|
return TCL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
|
*
|
|
|
|
|
* ScrollbarWidgetCmd --
|
|
|
|
|
*
|
|
|
|
|
* This procedure is invoked to process the Tcl command
|
|
|
|
|
* that corresponds to a widget managed by this module.
|
|
|
|
|
* See the user documentation for details on what it does.
|
|
|
|
|
*
|
|
|
|
|
* Results:
|
|
|
|
|
* A standard Tcl result.
|
|
|
|
|
*
|
|
|
|
|
* Side effects:
|
|
|
|
|
* See the user documentation.
|
|
|
|
|
*
|
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
ScrollbarWidgetCmd(clientData, interp, argc, argv)
|
|
|
|
|
ClientData clientData; /* Information about scrollbar
|
|
|
|
|
* widget. */
|
|
|
|
|
Tcl_Interp *interp; /* Current interpreter. */
|
|
|
|
|
int argc; /* Number of arguments. */
|
|
|
|
|
char **argv; /* Argument strings. */
|
|
|
|
|
{
|
1998-04-10 06:59:06 -04:00
|
|
|
|
register TkScrollbar *scrollPtr = (TkScrollbar *) clientData;
|
1996-09-27 06:29:02 -04:00
|
|
|
|
int result = TCL_OK;
|
|
|
|
|
size_t length;
|
|
|
|
|
int c;
|
|
|
|
|
|
|
|
|
|
if (argc < 2) {
|
|
|
|
|
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
|
|
|
|
argv[0], " option ?arg arg ...?\"", (char *) NULL);
|
|
|
|
|
return TCL_ERROR;
|
|
|
|
|
}
|
|
|
|
|
Tcl_Preserve((ClientData) scrollPtr);
|
|
|
|
|
c = argv[1][0];
|
|
|
|
|
length = strlen(argv[1]);
|
|
|
|
|
if ((c == 'a') && (strncmp(argv[1], "activate", length) == 0)) {
|
1998-04-10 06:59:06 -04:00
|
|
|
|
int oldActiveField;
|
1996-09-27 06:29:02 -04:00
|
|
|
|
if (argc == 2) {
|
|
|
|
|
switch (scrollPtr->activeField) {
|
|
|
|
|
#ifdef STk_CODE
|
|
|
|
|
case TOP_ARROW: interp->result = "\"arrow1\""; break;
|
|
|
|
|
case SLIDER: interp->result = "\"slider\""; break;
|
|
|
|
|
case BOTTOM_ARROW: interp->result = "\"arrow2\""; break;
|
|
|
|
|
default: interp->result = "#f";
|
|
|
|
|
#else
|
|
|
|
|
case TOP_ARROW: interp->result = "arrow1"; break;
|
|
|
|
|
case SLIDER: interp->result = "slider"; break;
|
|
|
|
|
case BOTTOM_ARROW: interp->result = "arrow2"; break;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
goto done;
|
|
|
|
|
}
|
|
|
|
|
if (argc != 3) {
|
|
|
|
|
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
|
|
|
|
argv[0], " activate element\"", (char *) NULL);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
c = argv[2][0];
|
|
|
|
|
length = strlen(argv[2]);
|
1998-04-10 06:59:06 -04:00
|
|
|
|
oldActiveField = scrollPtr->activeField;
|
1996-09-27 06:29:02 -04:00
|
|
|
|
if ((c == 'a') && (strcmp(argv[2], "arrow1") == 0)) {
|
|
|
|
|
scrollPtr->activeField = TOP_ARROW;
|
|
|
|
|
} else if ((c == 'a') && (strcmp(argv[2], "arrow2") == 0)) {
|
|
|
|
|
scrollPtr->activeField = BOTTOM_ARROW;
|
|
|
|
|
} else if ((c == 's') && (strncmp(argv[2], "slider", length) == 0)) {
|
|
|
|
|
scrollPtr->activeField = SLIDER;
|
|
|
|
|
} else {
|
|
|
|
|
scrollPtr->activeField = OUTSIDE;
|
|
|
|
|
}
|
1998-04-10 06:59:06 -04:00
|
|
|
|
if (oldActiveField != scrollPtr->activeField) {
|
|
|
|
|
TkScrollbarEventuallyRedraw(scrollPtr);
|
|
|
|
|
}
|
1996-09-27 06:29:02 -04:00
|
|
|
|
} else if ((c == 'c') && (strncmp(argv[1], "cget", length) == 0)
|
|
|
|
|
&& (length >= 2)) {
|
|
|
|
|
if (argc != 3) {
|
|
|
|
|
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
|
|
|
|
argv[0], " cget option\"",
|
|
|
|
|
(char *) NULL);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
1998-04-10 06:59:06 -04:00
|
|
|
|
result = Tk_ConfigureValue(interp, scrollPtr->tkwin,
|
|
|
|
|
tkpScrollbarConfigSpecs, (char *) scrollPtr, argv[2], 0);
|
1996-09-27 06:29:02 -04:00
|
|
|
|
} else if ((c == 'c') && (strncmp(argv[1], "configure", length) == 0)
|
|
|
|
|
&& (length >= 2)) {
|
|
|
|
|
if (argc == 2) {
|
1998-04-10 06:59:06 -04:00
|
|
|
|
result = Tk_ConfigureInfo(interp, scrollPtr->tkwin,
|
|
|
|
|
tkpScrollbarConfigSpecs, (char *) scrollPtr,
|
|
|
|
|
(char *) NULL, 0);
|
1996-09-27 06:29:02 -04:00
|
|
|
|
} else if (argc == 3) {
|
1998-04-10 06:59:06 -04:00
|
|
|
|
result = Tk_ConfigureInfo(interp, scrollPtr->tkwin,
|
|
|
|
|
tkpScrollbarConfigSpecs, (char *) scrollPtr, argv[2], 0);
|
1996-09-27 06:29:02 -04:00
|
|
|
|
} else {
|
|
|
|
|
result = ConfigureScrollbar(interp, scrollPtr, argc-2, argv+2,
|
|
|
|
|
TK_CONFIG_ARGV_ONLY);
|
|
|
|
|
}
|
|
|
|
|
} else if ((c == 'd') && (strncmp(argv[1], "delta", length) == 0)) {
|
|
|
|
|
int xDelta, yDelta, pixels, length;
|
|
|
|
|
double fraction;
|
|
|
|
|
|
|
|
|
|
if (argc != 4) {
|
|
|
|
|
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
|
|
|
|
argv[0], " delta xDelta yDelta\"", (char *) NULL);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
if ((Tcl_GetInt(interp, argv[2], &xDelta) != TCL_OK)
|
|
|
|
|
|| (Tcl_GetInt(interp, argv[3], &yDelta) != TCL_OK)) {
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
if (scrollPtr->vertical) {
|
|
|
|
|
pixels = yDelta;
|
|
|
|
|
length = Tk_Height(scrollPtr->tkwin) - 1
|
|
|
|
|
- 2*(scrollPtr->arrowLength + scrollPtr->inset);
|
|
|
|
|
} else {
|
|
|
|
|
pixels = xDelta;
|
|
|
|
|
length = Tk_Width(scrollPtr->tkwin) - 1
|
|
|
|
|
- 2*(scrollPtr->arrowLength + scrollPtr->inset);
|
|
|
|
|
}
|
|
|
|
|
if (length == 0) {
|
|
|
|
|
fraction = 0.0;
|
|
|
|
|
} else {
|
|
|
|
|
fraction = ((double) pixels / (double) length);
|
|
|
|
|
}
|
|
|
|
|
sprintf(interp->result, "%g", fraction);
|
|
|
|
|
} else if ((c == 'f') && (strncmp(argv[1], "fraction", length) == 0)) {
|
|
|
|
|
int x, y, pos, length;
|
|
|
|
|
double fraction;
|
|
|
|
|
|
|
|
|
|
if (argc != 4) {
|
|
|
|
|
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
|
|
|
|
argv[0], " fraction x y\"", (char *) NULL);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
if ((Tcl_GetInt(interp, argv[2], &x) != TCL_OK)
|
|
|
|
|
|| (Tcl_GetInt(interp, argv[3], &y) != TCL_OK)) {
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
if (scrollPtr->vertical) {
|
|
|
|
|
pos = y - (scrollPtr->arrowLength + scrollPtr->inset);
|
|
|
|
|
length = Tk_Height(scrollPtr->tkwin) - 1
|
|
|
|
|
- 2*(scrollPtr->arrowLength + scrollPtr->inset);
|
|
|
|
|
} else {
|
|
|
|
|
pos = x - (scrollPtr->arrowLength + scrollPtr->inset);
|
|
|
|
|
length = Tk_Width(scrollPtr->tkwin) - 1
|
|
|
|
|
- 2*(scrollPtr->arrowLength + scrollPtr->inset);
|
|
|
|
|
}
|
|
|
|
|
if (length == 0) {
|
|
|
|
|
fraction = 0.0;
|
|
|
|
|
} else {
|
|
|
|
|
fraction = ((double) pos / (double) length);
|
|
|
|
|
}
|
|
|
|
|
if (fraction < 0) {
|
|
|
|
|
fraction = 0;
|
|
|
|
|
} else if (fraction > 1.0) {
|
|
|
|
|
fraction = 1.0;
|
|
|
|
|
}
|
|
|
|
|
sprintf(interp->result, "%g", fraction);
|
|
|
|
|
} else if ((c == 'g') && (strncmp(argv[1], "get", length) == 0)) {
|
|
|
|
|
if (argc != 2) {
|
|
|
|
|
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
|
|
|
|
argv[0], " get\"", (char *) NULL);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
if (scrollPtr->flags & NEW_STYLE_COMMANDS) {
|
|
|
|
|
char first[TCL_DOUBLE_SPACE], last[TCL_DOUBLE_SPACE];
|
|
|
|
|
|
|
|
|
|
Tcl_PrintDouble(interp, scrollPtr->firstFraction, first);
|
|
|
|
|
Tcl_PrintDouble(interp, scrollPtr->lastFraction, last);
|
|
|
|
|
Tcl_AppendResult(interp, first, " ", last, (char *) NULL);
|
|
|
|
|
} else {
|
|
|
|
|
sprintf(interp->result, "%d %d %d %d", scrollPtr->totalUnits,
|
|
|
|
|
scrollPtr->windowUnits, scrollPtr->firstUnit,
|
|
|
|
|
scrollPtr->lastUnit);
|
|
|
|
|
}
|
|
|
|
|
} else if ((c == 'i') && (strncmp(argv[1], "identify", length) == 0)) {
|
|
|
|
|
int x, y, thing;
|
|
|
|
|
|
|
|
|
|
if (argc != 4) {
|
|
|
|
|
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
|
|
|
|
argv[0], " identify x y\"", (char *) NULL);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
if ((Tcl_GetInt(interp, argv[2], &x) != TCL_OK)
|
|
|
|
|
|| (Tcl_GetInt(interp, argv[3], &y) != TCL_OK)) {
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
1998-04-10 06:59:06 -04:00
|
|
|
|
thing = TkpScrollbarPosition(scrollPtr, x,y);
|
|
|
|
|
|
1996-09-27 06:29:02 -04:00
|
|
|
|
switch (thing) {
|
1998-04-10 06:59:06 -04:00
|
|
|
|
#ifdef STk_CODE
|
1996-09-27 06:29:02 -04:00
|
|
|
|
case TOP_ARROW: interp->result = "\"arrow1\""; break;
|
|
|
|
|
case TOP_GAP: interp->result = "\"trough1\""; break;
|
|
|
|
|
case SLIDER: interp->result = "\"slider\""; break;
|
|
|
|
|
case BOTTOM_GAP: interp->result = "\"trough2\""; break;
|
|
|
|
|
case BOTTOM_ARROW: interp->result = "\"arrow2\""; break;
|
|
|
|
|
#else
|
|
|
|
|
case TOP_ARROW: interp->result = "arrow1"; break;
|
|
|
|
|
case TOP_GAP: interp->result = "trough1"; break;
|
|
|
|
|
case SLIDER: interp->result = "slider"; break;
|
|
|
|
|
case BOTTOM_GAP: interp->result = "trough2"; break;
|
|
|
|
|
case BOTTOM_ARROW: interp->result = "arrow2"; break;
|
|
|
|
|
#endif
|
1998-04-10 06:59:06 -04:00
|
|
|
|
}
|
1996-09-27 06:29:02 -04:00
|
|
|
|
} else if ((c == 's') && (strncmp(argv[1], "set", length) == 0)) {
|
|
|
|
|
int totalUnits, windowUnits, firstUnit, lastUnit;
|
|
|
|
|
|
|
|
|
|
if (argc == 4) {
|
|
|
|
|
double first, last;
|
|
|
|
|
|
|
|
|
|
if (Tcl_GetDouble(interp, argv[2], &first) != TCL_OK) {
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
if (Tcl_GetDouble(interp, argv[3], &last) != TCL_OK) {
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
if (first < 0) {
|
|
|
|
|
scrollPtr->firstFraction = 0;
|
|
|
|
|
} else if (first > 1.0) {
|
|
|
|
|
scrollPtr->firstFraction = 1.0;
|
|
|
|
|
} else {
|
|
|
|
|
scrollPtr->firstFraction = first;
|
|
|
|
|
}
|
|
|
|
|
if (last < scrollPtr->firstFraction) {
|
|
|
|
|
scrollPtr->lastFraction = scrollPtr->firstFraction;
|
|
|
|
|
} else if (last > 1.0) {
|
|
|
|
|
scrollPtr->lastFraction = 1.0;
|
|
|
|
|
} else {
|
|
|
|
|
scrollPtr->lastFraction = last;
|
|
|
|
|
}
|
|
|
|
|
scrollPtr->flags |= NEW_STYLE_COMMANDS;
|
|
|
|
|
} else if (argc == 6) {
|
|
|
|
|
if (Tcl_GetInt(interp, argv[2], &totalUnits) != TCL_OK) {
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
if (totalUnits < 0) {
|
|
|
|
|
totalUnits = 0;
|
|
|
|
|
}
|
|
|
|
|
if (Tcl_GetInt(interp, argv[3], &windowUnits) != TCL_OK) {
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
if (windowUnits < 0) {
|
|
|
|
|
windowUnits = 0;
|
|
|
|
|
}
|
|
|
|
|
if (Tcl_GetInt(interp, argv[4], &firstUnit) != TCL_OK) {
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
if (Tcl_GetInt(interp, argv[5], &lastUnit) != TCL_OK) {
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
if (totalUnits > 0) {
|
|
|
|
|
if (lastUnit < firstUnit) {
|
|
|
|
|
lastUnit = firstUnit;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
firstUnit = lastUnit = 0;
|
|
|
|
|
}
|
|
|
|
|
scrollPtr->totalUnits = totalUnits;
|
|
|
|
|
scrollPtr->windowUnits = windowUnits;
|
|
|
|
|
scrollPtr->firstUnit = firstUnit;
|
|
|
|
|
scrollPtr->lastUnit = lastUnit;
|
|
|
|
|
if (scrollPtr->totalUnits == 0) {
|
|
|
|
|
scrollPtr->firstFraction = 0.0;
|
|
|
|
|
scrollPtr->lastFraction = 1.0;
|
|
|
|
|
} else {
|
|
|
|
|
scrollPtr->firstFraction = ((double) firstUnit)/totalUnits;
|
|
|
|
|
scrollPtr->lastFraction = ((double) (lastUnit+1))/totalUnits;
|
|
|
|
|
}
|
|
|
|
|
scrollPtr->flags &= ~NEW_STYLE_COMMANDS;
|
|
|
|
|
} else {
|
|
|
|
|
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
|
|
|
|
argv[0], " set firstFraction lastFraction\" or \"",
|
|
|
|
|
argv[0],
|
|
|
|
|
" set totalUnits windowUnits firstUnit lastUnit\"",
|
|
|
|
|
(char *) NULL);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
1998-04-10 06:59:06 -04:00
|
|
|
|
TkpComputeScrollbarGeometry(scrollPtr);
|
|
|
|
|
TkScrollbarEventuallyRedraw(scrollPtr);
|
1996-09-27 06:29:02 -04:00
|
|
|
|
} else {
|
|
|
|
|
Tcl_AppendResult(interp, "bad option \"", argv[1],
|
|
|
|
|
"\": must be activate, cget, configure, delta, fraction, ",
|
|
|
|
|
"get, identify, or set", (char *) NULL);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
done:
|
|
|
|
|
Tcl_Release((ClientData) scrollPtr);
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
|
error:
|
|
|
|
|
Tcl_Release((ClientData) scrollPtr);
|
|
|
|
|
return TCL_ERROR;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
*----------------------------------------------------------------------
|
|
|
|
|
*
|
|
|
|
|
* ConfigureScrollbar --
|
|
|
|
|
*
|
|
|
|
|
* This procedure is called to process an argv/argc list, plus
|
|
|
|
|
* the Tk option database, in order to configure (or
|
|
|
|
|
* reconfigure) a scrollbar widget.
|
|
|
|
|
*
|
|
|
|
|
* Results:
|
|
|
|
|
* The return value is a standard Tcl result. If TCL_ERROR is
|
|
|
|
|
* returned, then interp->result contains an error message.
|
|
|
|
|
*
|
|
|
|
|
* Side effects:
|
|
|
|
|
* Configuration information, such as colors, border width,
|
|
|
|
|
* etc. get set for scrollPtr; old resources get freed,
|
|
|
|
|
* if there were any.
|
|
|
|
|
*
|
|
|
|
|
*----------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
ConfigureScrollbar(interp, scrollPtr, argc, argv, flags)
|
|
|
|
|
Tcl_Interp *interp; /* Used for error reporting. */
|
1998-04-10 06:59:06 -04:00
|
|
|
|
register TkScrollbar *scrollPtr; /* Information about widget; may or
|
1996-09-27 06:29:02 -04:00
|
|
|
|
* may not already have values for
|
|
|
|
|
* some fields. */
|
|
|
|
|
int argc; /* Number of valid entries in argv. */
|
|
|
|
|
char **argv; /* Arguments. */
|
|
|
|
|
int flags; /* Flags to pass to
|
|
|
|
|
* Tk_ConfigureWidget. */
|
|
|
|
|
{
|
|
|
|
|
size_t length;
|
|
|
|
|
|
1998-04-10 06:59:06 -04:00
|
|
|
|
if (Tk_ConfigureWidget(interp, scrollPtr->tkwin, tkpScrollbarConfigSpecs,
|
1996-09-27 06:29:02 -04:00
|
|
|
|
argc, argv, (char *) scrollPtr, flags) != TCL_OK) {
|
|
|
|
|
return TCL_ERROR;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* A few options need special processing, such as parsing the
|
|
|
|
|
* orientation or setting the background from a 3-D border.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
length = strlen(scrollPtr->orientUid);
|
|
|
|
|
if (strncmp(scrollPtr->orientUid, "vertical", length) == 0) {
|
|
|
|
|
scrollPtr->vertical = 1;
|
|
|
|
|
} else if (strncmp(scrollPtr->orientUid, "horizontal", length) == 0) {
|
|
|
|
|
scrollPtr->vertical = 0;
|
|
|
|
|
} else {
|
|
|
|
|
Tcl_AppendResult(interp, "bad orientation \"", scrollPtr->orientUid,
|
|
|
|
|
"\": must be vertical or horizontal", (char *) NULL);
|
|
|
|
|
return TCL_ERROR;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (scrollPtr->command != NULL) {
|
|
|
|
|
scrollPtr->commandSize = strlen(scrollPtr->command);
|
|
|
|
|
} else {
|
|
|
|
|
scrollPtr->commandSize = 0;
|
|
|
|
|
}
|
|
|
|
|
|
1998-04-10 06:59:06 -04:00
|
|
|
|
/*
|
|
|
|
|
* Configure platform specific options.
|
|
|
|
|
*/
|
1996-09-27 06:29:02 -04:00
|
|
|
|
|
1998-04-10 06:59:06 -04:00
|
|
|
|
TkpConfigureScrollbar(scrollPtr);
|
1996-09-27 06:29:02 -04:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Register the desired geometry for the window (leave enough space
|
|
|
|
|
* for the two arrows plus a minimum-size slider, plus border around
|
|
|
|
|
* the whole window, if any). Then arrange for the window to be
|
|
|
|
|
* redisplayed.
|
|
|
|
|
*/
|
|
|
|
|
|
1998-04-10 06:59:06 -04:00
|
|
|
|
TkpComputeScrollbarGeometry(scrollPtr);
|
|
|
|
|
TkScrollbarEventuallyRedraw(scrollPtr);
|
1996-09-27 06:29:02 -04:00
|
|
|
|
return TCL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
|
*
|
1998-04-10 06:59:06 -04:00
|
|
|
|
* TkScrollbarEventProc --
|
1996-09-27 06:29:02 -04:00
|
|
|
|
*
|
|
|
|
|
* This procedure is invoked by the Tk dispatcher for various
|
|
|
|
|
* events on scrollbars.
|
|
|
|
|
*
|
|
|
|
|
* Results:
|
|
|
|
|
* None.
|
|
|
|
|
*
|
|
|
|
|
* Side effects:
|
|
|
|
|
* When the window gets deleted, internal structures get
|
|
|
|
|
* cleaned up. When it gets exposed, it is redisplayed.
|
|
|
|
|
*
|
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
1998-04-10 06:59:06 -04:00
|
|
|
|
void
|
|
|
|
|
TkScrollbarEventProc(clientData, eventPtr)
|
1996-09-27 06:29:02 -04:00
|
|
|
|
ClientData clientData; /* Information about window. */
|
|
|
|
|
XEvent *eventPtr; /* Information about event. */
|
|
|
|
|
{
|
1998-04-10 06:59:06 -04:00
|
|
|
|
TkScrollbar *scrollPtr = (TkScrollbar *) clientData;
|
1996-09-27 06:29:02 -04:00
|
|
|
|
|
|
|
|
|
if ((eventPtr->type == Expose) && (eventPtr->xexpose.count == 0)) {
|
1998-04-10 06:59:06 -04:00
|
|
|
|
TkScrollbarEventuallyRedraw(scrollPtr);
|
1996-09-27 06:29:02 -04:00
|
|
|
|
} else if (eventPtr->type == DestroyNotify) {
|
1998-04-10 06:59:06 -04:00
|
|
|
|
TkpDestroyScrollbar(scrollPtr);
|
1996-09-27 06:29:02 -04:00
|
|
|
|
if (scrollPtr->tkwin != NULL) {
|
|
|
|
|
scrollPtr->tkwin = NULL;
|
1998-04-10 06:59:06 -04:00
|
|
|
|
Tcl_DeleteCommandFromToken(scrollPtr->interp,
|
|
|
|
|
scrollPtr->widgetCmd);
|
1996-09-27 06:29:02 -04:00
|
|
|
|
}
|
|
|
|
|
if (scrollPtr->flags & REDRAW_PENDING) {
|
1998-04-10 06:59:06 -04:00
|
|
|
|
Tcl_CancelIdleCall(TkpDisplayScrollbar, (ClientData) scrollPtr);
|
1996-09-27 06:29:02 -04:00
|
|
|
|
}
|
1998-04-10 06:59:06 -04:00
|
|
|
|
/*
|
|
|
|
|
* Free up all the stuff that requires special handling, then
|
|
|
|
|
* let Tk_FreeOptions handle all the standard option-related
|
|
|
|
|
* stuff.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
Tk_FreeOptions(tkpScrollbarConfigSpecs, (char *) scrollPtr,
|
|
|
|
|
scrollPtr->display, 0);
|
|
|
|
|
Tcl_EventuallyFree((ClientData) scrollPtr, TCL_DYNAMIC);
|
1996-09-27 06:29:02 -04:00
|
|
|
|
} else if (eventPtr->type == ConfigureNotify) {
|
1998-04-10 06:59:06 -04:00
|
|
|
|
TkpComputeScrollbarGeometry(scrollPtr);
|
|
|
|
|
TkScrollbarEventuallyRedraw(scrollPtr);
|
1996-09-27 06:29:02 -04:00
|
|
|
|
} else if (eventPtr->type == FocusIn) {
|
|
|
|
|
if (eventPtr->xfocus.detail != NotifyInferior) {
|
|
|
|
|
scrollPtr->flags |= GOT_FOCUS;
|
|
|
|
|
if (scrollPtr->highlightWidth > 0) {
|
1998-04-10 06:59:06 -04:00
|
|
|
|
TkScrollbarEventuallyRedraw(scrollPtr);
|
1996-09-27 06:29:02 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if (eventPtr->type == FocusOut) {
|
|
|
|
|
if (eventPtr->xfocus.detail != NotifyInferior) {
|
|
|
|
|
scrollPtr->flags &= ~GOT_FOCUS;
|
|
|
|
|
if (scrollPtr->highlightWidth > 0) {
|
1998-04-10 06:59:06 -04:00
|
|
|
|
TkScrollbarEventuallyRedraw(scrollPtr);
|
1996-09-27 06:29:02 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
*----------------------------------------------------------------------
|
|
|
|
|
*
|
|
|
|
|
* ScrollbarCmdDeletedProc --
|
|
|
|
|
*
|
|
|
|
|
* This procedure is invoked when a widget command is deleted. If
|
|
|
|
|
* the widget isn't already in the process of being destroyed,
|
|
|
|
|
* this command destroys it.
|
|
|
|
|
*
|
|
|
|
|
* Results:
|
|
|
|
|
* None.
|
|
|
|
|
*
|
|
|
|
|
* Side effects:
|
|
|
|
|
* The widget is destroyed.
|
|
|
|
|
*
|
|
|
|
|
*----------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
ScrollbarCmdDeletedProc(clientData)
|
|
|
|
|
ClientData clientData; /* Pointer to widget record for widget. */
|
|
|
|
|
{
|
1998-04-10 06:59:06 -04:00
|
|
|
|
TkScrollbar *scrollPtr = (TkScrollbar *) clientData;
|
1996-09-27 06:29:02 -04:00
|
|
|
|
Tk_Window tkwin = scrollPtr->tkwin;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* This procedure could be invoked either because the window was
|
|
|
|
|
* destroyed and the command was then deleted (in which case tkwin
|
|
|
|
|
* is NULL) or because the command was deleted, and then this procedure
|
|
|
|
|
* destroys the widget.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
if (tkwin != NULL) {
|
|
|
|
|
scrollPtr->tkwin = NULL;
|
|
|
|
|
Tk_DestroyWindow(tkwin);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
|
*
|
1998-04-10 06:59:06 -04:00
|
|
|
|
* TkScrollbarEventuallyRedraw --
|
1996-09-27 06:29:02 -04:00
|
|
|
|
*
|
|
|
|
|
* Arrange for one or more of the fields of a scrollbar
|
|
|
|
|
* to be redrawn.
|
|
|
|
|
*
|
|
|
|
|
* Results:
|
|
|
|
|
* None.
|
|
|
|
|
*
|
|
|
|
|
* Side effects:
|
|
|
|
|
* None.
|
|
|
|
|
*
|
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
1998-04-10 06:59:06 -04:00
|
|
|
|
void
|
|
|
|
|
TkScrollbarEventuallyRedraw(scrollPtr)
|
|
|
|
|
register TkScrollbar *scrollPtr; /* Information about widget. */
|
1996-09-27 06:29:02 -04:00
|
|
|
|
{
|
|
|
|
|
if ((scrollPtr->tkwin == NULL) || (!Tk_IsMapped(scrollPtr->tkwin))) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ((scrollPtr->flags & REDRAW_PENDING) == 0) {
|
1998-04-10 06:59:06 -04:00
|
|
|
|
Tcl_DoWhenIdle(TkpDisplayScrollbar, (ClientData) scrollPtr);
|
1996-09-27 06:29:02 -04:00
|
|
|
|
scrollPtr->flags |= REDRAW_PENDING;
|
|
|
|
|
}
|
|
|
|
|
}
|