summaryrefslogtreecommitdiffstats
path: root/generic/tkScale.h
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkScale.h')
-rw-r--r--generic/tkScale.h60
1 files changed, 39 insertions, 21 deletions
diff --git a/generic/tkScale.h b/generic/tkScale.h
index 7200fb2..af0ca43 100644
--- a/generic/tkScale.h
+++ b/generic/tkScale.h
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkScale.h,v 1.4 1998/09/14 18:23:17 stanton Exp $
+ * RCS: @(#) $Id: tkScale.h,v 1.5 1999/04/16 01:51:21 stanton Exp $
*/
#ifndef _TKSCALE
@@ -25,6 +25,22 @@
#endif
/*
+ * Legal values for the "orient" field of TkScale records.
+ */
+
+enum orient {
+ ORIENT_HORIZONTAL, ORIENT_VERTICAL
+};
+
+/*
+ * Legal values for the "state" field of TkScale records.
+ */
+
+enum state {
+ STATE_ACTIVE, STATE_DISABLED, STATE_NORMAL
+};
+
+/*
* A data structure of the following type is kept for each scale
* widget managed by this file:
*/
@@ -39,16 +55,16 @@ typedef struct TkScale {
* freed even after tkwin has gone away. */
Tcl_Interp *interp; /* Interpreter associated with scale. */
Tcl_Command widgetCmd; /* Token for scale's widget command. */
- Tk_Uid orientUid; /* Orientation for window ("vertical" or
- * "horizontal"). */
- int vertical; /* Non-zero means vertical orientation,
- * zero means horizontal. */
+ Tk_OptionTable optionTable; /* Table that defines configuration options
+ * available for this widget. */
+ enum orient orient; /* Orientation for window (vertical or
+ * horizontal). */
int width; /* Desired narrow dimension of scale,
* in pixels. */
int length; /* Desired long dimension of scale,
* in pixels. */
- double value; /* Current value of scale. */
- char *varName; /* Name of variable (malloc'ed) or NULL.
+ double value; /* Current value of scale. */
+ Tcl_Obj *varNamePtr; /* Name of variable or NULL.
* If non-NULL, scale's value tracks
* the contents of this variable and
* vice versa. */
@@ -68,19 +84,19 @@ typedef struct TkScale {
* digits and other information. */
double bigIncrement; /* Amount to use for large increments to
* scale value. (0 means we pick a value). */
- char *command; /* Command prefix to use when invoking Tcl
+ Tcl_Obj *commandPtr; /* Command prefix to use when invoking Tcl
* commands because the scale value changed.
- * NULL means don't invoke commands.
- * Malloc'ed. */
+ * NULL means don't invoke commands. */
int repeatDelay; /* How long to wait before auto-repeating
* on scrolling actions (in ms). */
int repeatInterval; /* Interval between autorepeats (in ms). */
- char *label; /* Label to display above or to right of
+ Tcl_Obj *labelPtr; /* Label to display above or to right of
* scale; NULL means don't display a
- * label. Malloc'ed. */
+ * label. */
int labelLength; /* Number of non-NULL chars. in label. */
- Tk_Uid state; /* Normal or disabled. Value cannot be
- * changed when scale is disabled. */
+ enum state state; /* Values are active, normal, or disabled.
+ * Value of scale cannot be changed when
+ * disabled. */
/*
* Information used when displaying widget:
@@ -90,7 +106,8 @@ typedef struct TkScale {
Tk_3DBorder bgBorder; /* Used for drawing slider and other
* background areas. */
Tk_3DBorder activeBorder; /* For drawing the slider when active. */
- int sliderRelief; /* Is slider to be drawn raised, sunken, etc. */
+ int sliderRelief; /* Is slider to be drawn raised, sunken,
+ * etc. */
XColor *troughColorPtr; /* Color for drawing trough. */
GC troughGC; /* For drawing trough. */
GC copyGC; /* Used for copying from pixmap onto screen. */
@@ -102,9 +119,10 @@ typedef struct TkScale {
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. */
+ Tk_3DBorder highlightBorder;/* Value of -highlightbackground option:
+ * specifies background with which to draw 3-D
+ * default ring and focus 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.
@@ -141,9 +159,9 @@ typedef struct TkScale {
*/
Tk_Cursor cursor; /* Current cursor for window, or None. */
- char *takeFocus; /* Value of -takefocus option; not used in
+ Tcl_Obj *takeFocusPtr; /* Value of -takefocus option; not used in
* the C code, but used by keyboard traversal
- * scripts. Malloc'ed, but may be NULL. */
+ * scripts. May be NULL. */
int flags; /* Various flags; see below for
* definitions. */
} TkScale;
@@ -207,7 +225,7 @@ typedef struct TkScale {
#define PRINT_CHARS 150
/*
- * Declaration of procedures used in the implementation of the scrollbar
+ * Declaration of procedures used in the implementation of the scale
* widget.
*/