/[dtapublic]/projs/ets/trunk/src/c_tk_base_7_5_w_mods/tkscrollbar.h
ViewVC logotype

Diff of /projs/ets/trunk/src/c_tk_base_7_5_w_mods/tkscrollbar.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

to_be_filed/sf_code/esrgpcpj/shared/tk_base/tkscrollbar.h revision 29 by dashley, Sat Oct 8 07:08:47 2016 UTC projs/dtats/trunk/shared_source/c_tk_base_7_5_w_mods/tkscrollbar.h revision 98 by dashley, Sun Dec 18 00:57:31 2016 UTC
# Line 1  Line 1 
 /* $Header: /cvsroot/esrg/sfesrg/esrgpcpj/shared/tk_base/tkscrollbar.h,v 1.1.1.1 2001/06/13 05:07:54 dtashley Exp $ */  
   
 /*  
  * tkScrollbar.h --  
  *  
  *      Declarations of types and functions used to implement  
  *      the scrollbar widget.  
  *  
  * Copyright (c) 1996 by Sun Microsystems, Inc.  
  *  
  * See the file "license.terms" for information on usage and redistribution  
  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.  
  *  
  * RCS: @(#) $Id: tkscrollbar.h,v 1.1.1.1 2001/06/13 05:07:54 dtashley Exp $  
  */  
   
 #ifndef _TKSCROLLBAR  
 #define _TKSCROLLBAR  
   
 #ifndef _TKINT  
 #include "tkInt.h"  
 #endif  
   
 #ifdef BUILD_tk  
 # undef TCL_STORAGE_CLASS  
 # define TCL_STORAGE_CLASS DLLEXPORT  
 #endif  
   
 /*  
  * A data structure of the following type is kept for each scrollbar  
  * widget.  
  */  
   
 typedef struct TkScrollbar {  
     Tk_Window tkwin;            /* Window that embodies the scrollbar.  NULL  
                                  * means that the window has been destroyed  
                                  * but the data structures haven't yet been  
                                  * cleaned up.*/  
     Display *display;           /* Display containing widget.  Used, among  
                                  * other things, so that resources can be  
                                  * freed even after tkwin has gone away. */  
     Tcl_Interp *interp;         /* Interpreter associated with scrollbar. */  
     Tcl_Command widgetCmd;      /* Token for scrollbar's widget command. */  
     int vertical;               /* Non-zero means vertical orientation  
                                  * requested, zero means horizontal. */  
     int width;                  /* Desired narrow dimension of scrollbar,  
                                  * in pixels. */  
     char *command;              /* Command prefix to use when invoking  
                                  * scrolling commands.  NULL means don't  
                                  * invoke commands.  Malloc'ed. */  
     int commandSize;            /* Number of non-NULL bytes in command. */  
     int repeatDelay;            /* How long to wait before auto-repeating  
                                  * on scrolling actions (in ms). */  
     int repeatInterval;         /* Interval between autorepeats (in ms). */  
     int jump;                   /* Value of -jump option. */  
   
     /*  
      * Information used when displaying widget:  
      */  
   
     int borderWidth;            /* Width of 3-D borders. */  
     Tk_3DBorder bgBorder;       /* Used for drawing background (all flat  
                                  * surfaces except for trough). */  
     Tk_3DBorder activeBorder;   /* For drawing backgrounds when active (i.e.  
                                  * when mouse is positioned over element). */  
     XColor *troughColorPtr;     /* Color for drawing trough. */  
     int relief;                 /* Indicates whether window as a whole is  
                                  * raised, sunken, or flat. */  
     int highlightWidth;         /* Width in pixels of highlight to draw  
                                  * around widget when it has the focus.  
                                  * <= 0 means don't draw a highlight. */  
     XColor *highlightBgColorPtr;  
                                 /* Color for drawing traversal highlight  
                                  * area when highlight is off. */  
     XColor *highlightColorPtr;  /* Color for drawing traversal highlight. */  
     int inset;                  /* Total width of all borders, including  
                                  * traversal highlight and 3-D border.  
                                  * Indicates how much interior stuff must  
                                  * be offset from outside edges to leave  
                                  * room for borders. */  
     int elementBorderWidth;     /* Width of border to draw around elements  
                                  * inside scrollbar (arrows and slider).  
                                  * -1 means use borderWidth. */  
     int arrowLength;            /* Length of arrows along long dimension of  
                                  * scrollbar, including space for a small gap  
                                  * between the arrow and the slider.  
                                  * Recomputed on window size changes. */  
     int sliderFirst;            /* Pixel coordinate of top or left edge  
                                  * of slider area, including border. */  
     int sliderLast;             /* Coordinate of pixel just after bottom  
                                  * or right edge of slider area, including  
                                  * border. */  
     int activeField;            /* Names field to be displayed in active  
                                  * colors, such as TOP_ARROW, or 0 for  
                                  * no field. */  
     int activeRelief;           /* Value of -activeRelief option: relief  
                                  * to use for active element. */  
   
     /*  
      * Information describing the application related to the scrollbar.  
      * This information is provided by the application by invoking the  
      * "set" widget command.  This information can now be provided in  
      * two ways:  the "old" form (totalUnits, windowUnits, firstUnit,  
      * and lastUnit), or the "new" form (firstFraction and lastFraction).  
      * FirstFraction and lastFraction will always be valid, but  
      * the old-style information is only valid if the NEW_STYLE_COMMANDS  
      * flag is 0.  
      */  
   
     int totalUnits;             /* Total dimension of application, in  
                                  * units.  Valid only if the NEW_STYLE_COMMANDS  
                                  * flag isn't set. */  
     int windowUnits;            /* Maximum number of units that can be  
                                  * displayed in the window at once.  Valid  
                                  * only if the NEW_STYLE_COMMANDS flag isn't  
                                  * set. */  
     int firstUnit;              /* Number of last unit visible in  
                                  * application's window.  Valid only if the  
                                  * NEW_STYLE_COMMANDS flag isn't set. */  
     int lastUnit;               /* Index of last unit visible in window.  
                                  * Valid only if the NEW_STYLE_COMMANDS  
                                  * flag isn't set. */  
     double firstFraction;       /* Position of first visible thing in window,  
                                  * specified as a fraction between 0 and  
                                  * 1.0. */  
     double lastFraction;        /* Position of last visible thing in window,  
                                  * specified as a fraction between 0 and  
                                  * 1.0. */  
   
     /*  
      * Miscellaneous information:  
      */  
   
     Tk_Cursor cursor;           /* Current cursor for window, or None. */  
     char *takeFocus;            /* Value of -takefocus option;  not used in  
                                  * the C code, but used by keyboard traversal  
                                  * scripts.  Malloc'ed, but may be NULL. */  
     int flags;                  /* Various flags;  see below for  
                                  * definitions. */  
 } TkScrollbar;  
   
 /*  
  * Legal values for "activeField" field of Scrollbar structures.  These  
  * are also the return values from the ScrollbarPosition procedure.  
  */  
   
 #define OUTSIDE         0  
 #define TOP_ARROW       1  
 #define TOP_GAP         2  
 #define SLIDER          3  
 #define BOTTOM_GAP      4  
 #define BOTTOM_ARROW    5  
   
 /*  
  * Flag bits for scrollbars:  
  *  
  * REDRAW_PENDING:              Non-zero means a DoWhenIdle handler  
  *                              has already been queued to redraw  
  *                              this window.  
  * NEW_STYLE_COMMANDS:          Non-zero means the new style of commands  
  *                              should be used to communicate with the  
  *                              widget:  ".t yview scroll 2 lines", instead  
  *                              of ".t yview 40", for example.  
  * GOT_FOCUS:                   Non-zero means this window has the input  
  *                              focus.  
  */  
   
 #define REDRAW_PENDING          1  
 #define NEW_STYLE_COMMANDS      2  
 #define GOT_FOCUS               4  
   
 /*  
  * Declaration of scrollbar class procedures structure.  
  */  
   
 extern TkClassProcs tkpScrollbarProcs;  
   
 /*  
  * Declaration of scrollbar configuration options.  
  */  
   
 extern Tk_ConfigSpec tkpScrollbarConfigSpecs[];  
   
 /*  
  * Declaration of procedures used in the implementation of the scrollbar  
  * widget.  
  */  
   
 extern void             TkScrollbarEventProc _ANSI_ARGS_((  
                             ClientData clientData, XEvent *eventPtr));  
 extern void             TkScrollbarEventuallyRedraw _ANSI_ARGS_((  
                             TkScrollbar *scrollPtr));  
 extern void             TkpComputeScrollbarGeometry _ANSI_ARGS_((  
                             TkScrollbar *scrollPtr));  
 extern TkScrollbar *    TkpCreateScrollbar _ANSI_ARGS_((Tk_Window tkwin));  
 extern void             TkpDestroyScrollbar _ANSI_ARGS_((  
                             TkScrollbar *scrollPtr));  
 extern void             TkpDisplayScrollbar _ANSI_ARGS_((  
                             ClientData clientData));  
 extern void             TkpConfigureScrollbar _ANSI_ARGS_((  
                             TkScrollbar *scrollPtr));  
 extern int              TkpScrollbarPosition _ANSI_ARGS_((  
                             TkScrollbar *scrollPtr, int x, int y));  
   
 # undef TCL_STORAGE_CLASS  
 # define TCL_STORAGE_CLASS DLLIMPORT  
   
 #endif /* _TKSCROLLBAR */  
   
   
 /* $History: tkScrollbar.h $  
  *  
  * *****************  Version 1  *****************  
  * User: Dtashley     Date: 1/02/01    Time: 3:02a  
  * Created in $/IjuScripter, IjuConsole/Source/Tk Base  
  * Initial check-in.  
  */  
   
 /* End of TKSCROLLBAR.H */  
1    /* $Header$ */
2    
3    /*
4     * tkScrollbar.h --
5     *
6     *      Declarations of types and functions used to implement
7     *      the scrollbar widget.
8     *
9     * Copyright (c) 1996 by Sun Microsystems, Inc.
10     *
11     * See the file "license.terms" for information on usage and redistribution
12     * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13     *
14     * RCS: @(#) $Id: tkscrollbar.h,v 1.1.1.1 2001/06/13 05:07:54 dtashley Exp $
15     */
16    
17    #ifndef _TKSCROLLBAR
18    #define _TKSCROLLBAR
19    
20    #ifndef _TKINT
21    #include "tkInt.h"
22    #endif
23    
24    #ifdef BUILD_tk
25    # undef TCL_STORAGE_CLASS
26    # define TCL_STORAGE_CLASS DLLEXPORT
27    #endif
28    
29    /*
30     * A data structure of the following type is kept for each scrollbar
31     * widget.
32     */
33    
34    typedef struct TkScrollbar {
35        Tk_Window tkwin;            /* Window that embodies the scrollbar.  NULL
36                                     * means that the window has been destroyed
37                                     * but the data structures haven't yet been
38                                     * cleaned up.*/
39        Display *display;           /* Display containing widget.  Used, among
40                                     * other things, so that resources can be
41                                     * freed even after tkwin has gone away. */
42        Tcl_Interp *interp;         /* Interpreter associated with scrollbar. */
43        Tcl_Command widgetCmd;      /* Token for scrollbar's widget command. */
44        int vertical;               /* Non-zero means vertical orientation
45                                     * requested, zero means horizontal. */
46        int width;                  /* Desired narrow dimension of scrollbar,
47                                     * in pixels. */
48        char *command;              /* Command prefix to use when invoking
49                                     * scrolling commands.  NULL means don't
50                                     * invoke commands.  Malloc'ed. */
51        int commandSize;            /* Number of non-NULL bytes in command. */
52        int repeatDelay;            /* How long to wait before auto-repeating
53                                     * on scrolling actions (in ms). */
54        int repeatInterval;         /* Interval between autorepeats (in ms). */
55        int jump;                   /* Value of -jump option. */
56    
57        /*
58         * Information used when displaying widget:
59         */
60    
61        int borderWidth;            /* Width of 3-D borders. */
62        Tk_3DBorder bgBorder;       /* Used for drawing background (all flat
63                                     * surfaces except for trough). */
64        Tk_3DBorder activeBorder;   /* For drawing backgrounds when active (i.e.
65                                     * when mouse is positioned over element). */
66        XColor *troughColorPtr;     /* Color for drawing trough. */
67        int relief;                 /* Indicates whether window as a whole is
68                                     * raised, sunken, or flat. */
69        int highlightWidth;         /* Width in pixels of highlight to draw
70                                     * around widget when it has the focus.
71                                     * <= 0 means don't draw a highlight. */
72        XColor *highlightBgColorPtr;
73                                    /* Color for drawing traversal highlight
74                                     * area when highlight is off. */
75        XColor *highlightColorPtr;  /* Color for drawing traversal highlight. */
76        int inset;                  /* Total width of all borders, including
77                                     * traversal highlight and 3-D border.
78                                     * Indicates how much interior stuff must
79                                     * be offset from outside edges to leave
80                                     * room for borders. */
81        int elementBorderWidth;     /* Width of border to draw around elements
82                                     * inside scrollbar (arrows and slider).
83                                     * -1 means use borderWidth. */
84        int arrowLength;            /* Length of arrows along long dimension of
85                                     * scrollbar, including space for a small gap
86                                     * between the arrow and the slider.
87                                     * Recomputed on window size changes. */
88        int sliderFirst;            /* Pixel coordinate of top or left edge
89                                     * of slider area, including border. */
90        int sliderLast;             /* Coordinate of pixel just after bottom
91                                     * or right edge of slider area, including
92                                     * border. */
93        int activeField;            /* Names field to be displayed in active
94                                     * colors, such as TOP_ARROW, or 0 for
95                                     * no field. */
96        int activeRelief;           /* Value of -activeRelief option: relief
97                                     * to use for active element. */
98    
99        /*
100         * Information describing the application related to the scrollbar.
101         * This information is provided by the application by invoking the
102         * "set" widget command.  This information can now be provided in
103         * two ways:  the "old" form (totalUnits, windowUnits, firstUnit,
104         * and lastUnit), or the "new" form (firstFraction and lastFraction).
105         * FirstFraction and lastFraction will always be valid, but
106         * the old-style information is only valid if the NEW_STYLE_COMMANDS
107         * flag is 0.
108         */
109    
110        int totalUnits;             /* Total dimension of application, in
111                                     * units.  Valid only if the NEW_STYLE_COMMANDS
112                                     * flag isn't set. */
113        int windowUnits;            /* Maximum number of units that can be
114                                     * displayed in the window at once.  Valid
115                                     * only if the NEW_STYLE_COMMANDS flag isn't
116                                     * set. */
117        int firstUnit;              /* Number of last unit visible in
118                                     * application's window.  Valid only if the
119                                     * NEW_STYLE_COMMANDS flag isn't set. */
120        int lastUnit;               /* Index of last unit visible in window.
121                                     * Valid only if the NEW_STYLE_COMMANDS
122                                     * flag isn't set. */
123        double firstFraction;       /* Position of first visible thing in window,
124                                     * specified as a fraction between 0 and
125                                     * 1.0. */
126        double lastFraction;        /* Position of last visible thing in window,
127                                     * specified as a fraction between 0 and
128                                     * 1.0. */
129    
130        /*
131         * Miscellaneous information:
132         */
133    
134        Tk_Cursor cursor;           /* Current cursor for window, or None. */
135        char *takeFocus;            /* Value of -takefocus option;  not used in
136                                     * the C code, but used by keyboard traversal
137                                     * scripts.  Malloc'ed, but may be NULL. */
138        int flags;                  /* Various flags;  see below for
139                                     * definitions. */
140    } TkScrollbar;
141    
142    /*
143     * Legal values for "activeField" field of Scrollbar structures.  These
144     * are also the return values from the ScrollbarPosition procedure.
145     */
146    
147    #define OUTSIDE         0
148    #define TOP_ARROW       1
149    #define TOP_GAP         2
150    #define SLIDER          3
151    #define BOTTOM_GAP      4
152    #define BOTTOM_ARROW    5
153    
154    /*
155     * Flag bits for scrollbars:
156     *
157     * REDRAW_PENDING:              Non-zero means a DoWhenIdle handler
158     *                              has already been queued to redraw
159     *                              this window.
160     * NEW_STYLE_COMMANDS:          Non-zero means the new style of commands
161     *                              should be used to communicate with the
162     *                              widget:  ".t yview scroll 2 lines", instead
163     *                              of ".t yview 40", for example.
164     * GOT_FOCUS:                   Non-zero means this window has the input
165     *                              focus.
166     */
167    
168    #define REDRAW_PENDING          1
169    #define NEW_STYLE_COMMANDS      2
170    #define GOT_FOCUS               4
171    
172    /*
173     * Declaration of scrollbar class procedures structure.
174     */
175    
176    extern TkClassProcs tkpScrollbarProcs;
177    
178    /*
179     * Declaration of scrollbar configuration options.
180     */
181    
182    extern Tk_ConfigSpec tkpScrollbarConfigSpecs[];
183    
184    /*
185     * Declaration of procedures used in the implementation of the scrollbar
186     * widget.
187     */
188    
189    extern void             TkScrollbarEventProc _ANSI_ARGS_((
190                                ClientData clientData, XEvent *eventPtr));
191    extern void             TkScrollbarEventuallyRedraw _ANSI_ARGS_((
192                                TkScrollbar *scrollPtr));
193    extern void             TkpComputeScrollbarGeometry _ANSI_ARGS_((
194                                TkScrollbar *scrollPtr));
195    extern TkScrollbar *    TkpCreateScrollbar _ANSI_ARGS_((Tk_Window tkwin));
196    extern void             TkpDestroyScrollbar _ANSI_ARGS_((
197                                TkScrollbar *scrollPtr));
198    extern void             TkpDisplayScrollbar _ANSI_ARGS_((
199                                ClientData clientData));
200    extern void             TkpConfigureScrollbar _ANSI_ARGS_((
201                                TkScrollbar *scrollPtr));
202    extern int              TkpScrollbarPosition _ANSI_ARGS_((
203                                TkScrollbar *scrollPtr, int x, int y));
204    
205    # undef TCL_STORAGE_CLASS
206    # define TCL_STORAGE_CLASS DLLIMPORT
207    
208    #endif /* _TKSCROLLBAR */
209    
210    /* End of tkscrollbar.h */

Legend:
Removed from v.29  
changed lines
  Added in v.98

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25