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

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

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

projs/trunk/shared_source/c_tk_base_7_5_w_mods/tkcanvas.h revision 44 by dashley, Fri Oct 14 02:09:58 2016 UTC projs/dtats/trunk/shared_source/c_tk_base_7_5_w_mods/tkcanvas.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/tkcanvas.h,v 1.1.1.1 2001/06/13 04:56:06 dtashley Exp $ */  
   
 /*  
  * tkCanvas.h --  
  *  
  *      Declarations shared among all the files that implement  
  *      canvas widgets.  
  *  
  * Copyright (c) 1991-1994 The Regents of the University of California.  
  * Copyright (c) 1994-1995 Sun Microsystems, Inc.  
  * Copyright (c) 1998 by Scriptics Corporation.  
  *  
  * See the file "license.terms" for information on usage and redistribution  
  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.  
  *  
  * RCS: @(#) $Id: tkcanvas.h,v 1.1.1.1 2001/06/13 04:56:06 dtashley Exp $  
  */  
   
 #ifndef _TKCANVAS  
 #define _TKCANVAS  
   
 #ifndef _TK  
 #include "tk.h"  
 #endif  
   
 #ifndef USE_OLD_TAG_SEARCH  
 typedef struct TagSearchExpr_s TagSearchExpr;  
   
 struct TagSearchExpr_s {  
     TagSearchExpr *next;        /* for linked lists of expressions - used in bindings */  
     Tk_Uid uid;                 /* the uid of the whole expression */  
     Tk_Uid *uids;               /* expresion compiled to an array of uids */  
     int allocated;              /* available space for array of uids */  
     int length;                 /* length of expression */  
     int index;                  /* current position in expression evaluation */  
     int match;                  /* this expression matches event's item's tags*/  
 };  
 #endif /* not USE_OLD_TAG_SEARCH */  
   
 /*  
  * The record below describes a canvas widget.  It is made available  
  * to the item procedures so they can access certain shared fields such  
  * as the overall displacement and scale factor for the canvas.  
  */  
   
 typedef struct TkCanvas {  
     Tk_Window tkwin;            /* Window that embodies the canvas.  NULL  
                                  * means that the window has been destroyed  
                                  * but the data structures haven't yet been  
                                  * cleaned up.*/  
     Display *display;           /* Display containing widget;  needed, among  
                                  * other things, to release resources after  
                                  * tkwin has already gone away. */  
     Tcl_Interp *interp;         /* Interpreter associated with canvas. */  
     Tcl_Command widgetCmd;      /* Token for canvas's widget command. */  
     Tk_Item *firstItemPtr;      /* First in list of all items in canvas,  
                                  * or NULL if canvas empty. */  
     Tk_Item *lastItemPtr;       /* Last in list of all items in canvas,  
                                  * or NULL if canvas empty. */  
   
     /*  
      * Information used when displaying widget:  
      */  
   
     int borderWidth;            /* Width of 3-D border around window. */  
     Tk_3DBorder bgBorder;       /* Used for canvas background. */  
     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. */  
     GC pixmapGC;                /* Used to copy bits from a pixmap to the  
                                  * screen and also to clear the pixmap. */  
     int width, height;          /* Dimensions to request for canvas window,  
                                  * specified in pixels. */  
     int redrawX1, redrawY1;     /* Upper left corner of area to redraw,  
                                  * in pixel coordinates.  Border pixels  
                                  * are included.  Only valid if  
                                  * REDRAW_PENDING flag is set. */  
     int redrawX2, redrawY2;     /* Lower right corner of area to redraw,  
                                  * in integer canvas coordinates.  Border  
                                  * pixels will *not* be redrawn. */  
     int confine;                /* Non-zero means constrain view to keep  
                                  * as much of canvas visible as possible. */  
   
     /*  
      * Information used to manage the selection and insertion cursor:  
      */  
   
     Tk_CanvasTextInfo textInfo; /* Contains lots of fields;  see tk.h for  
                                  * details.  This structure is shared with  
                                  * the code that implements individual items. */  
     int insertOnTime;           /* Number of milliseconds cursor should spend  
                                  * in "on" state for each blink. */  
     int insertOffTime;          /* Number of milliseconds cursor should spend  
                                  * in "off" state for each blink. */  
     Tcl_TimerToken insertBlinkHandler;  
                                 /* Timer handler used to blink cursor on and  
                                  * off. */  
   
     /*  
      * Transformation applied to canvas as a whole:  to compute screen  
      * coordinates (X,Y) from canvas coordinates (x,y), do the following:  
      *  
      * X = x - xOrigin;  
      * Y = y - yOrigin;  
      */  
   
     int xOrigin, yOrigin;       /* Canvas coordinates corresponding to  
                                  * upper-left corner of window, given in  
                                  * canvas pixel units. */  
     int drawableXOrigin, drawableYOrigin;  
                                 /* During redisplay, these fields give the  
                                  * canvas coordinates corresponding to  
                                  * the upper-left corner of the drawable  
                                  * where items are actually being drawn  
                                  * (typically a pixmap smaller than the  
                                  * whole window). */  
   
     /*  
      * Information used for event bindings associated with items.  
      */  
   
     Tk_BindingTable bindingTable;  
                                 /* Table of all bindings currently defined  
                                  * for this canvas.  NULL means that no  
                                  * bindings exist, so the table hasn't been  
                                  * created.  Each "object" used for this  
                                  * table is either a Tk_Uid for a tag or  
                                  * the address of an item named by id. */  
     Tk_Item *currentItemPtr;    /* The item currently containing the mouse  
                                  * pointer, or NULL if none. */  
     Tk_Item *newCurrentPtr;     /* The item that is about to become the  
                                  * current one, or NULL.  This field is  
                                  * used to detect deletions  of the new  
                                  * current item pointer that occur during  
                                  * Leave processing of the previous current  
                                  * item.  */  
     double closeEnough;         /* The mouse is assumed to be inside an  
                                  * item if it is this close to it. */  
     XEvent pickEvent;           /* The event upon which the current choice  
                                  * of currentItem is based.  Must be saved  
                                  * so that if the currentItem is deleted,  
                                  * can pick another. */  
     int state;                  /* Last known modifier state.  Used to  
                                  * defer picking a new current object  
                                  * while buttons are down. */  
   
     /*  
      * Information used for managing scrollbars:  
      */  
   
     char *xScrollCmd;           /* Command prefix for communicating with  
                                  * horizontal scrollbar.  NULL means no  
                                  * horizontal scrollbar.  Malloc'ed*/  
     char *yScrollCmd;           /* Command prefix for communicating with  
                                  * vertical scrollbar.  NULL means no  
                                  * vertical scrollbar.  Malloc'ed*/  
     int scrollX1, scrollY1, scrollX2, scrollY2;  
                                 /* These four coordinates define the region  
                                  * that is the 100% area for scrolling (i.e.  
                                  * these numbers determine the size and  
                                  * location of the sliders on scrollbars).  
                                  * Units are pixels in canvas coords. */  
     char *regionString;         /* The option string from which scrollX1  
                                  * etc. are derived.  Malloc'ed. */  
     int xScrollIncrement;       /* If >0, defines a grid for horizontal  
                                  * scrolling.  This is the size of the "unit",  
                                  * and the left edge of the screen will always  
                                  * lie on an even unit boundary. */  
     int yScrollIncrement;       /* If >0, defines a grid for horizontal  
                                  * scrolling.  This is the size of the "unit",  
                                  * and the left edge of the screen will always  
                                  * lie on an even unit boundary. */  
   
     /*  
      * Information used for scanning:  
      */  
   
     int scanX;                  /* X-position at which scan started (e.g.  
                                  * button was pressed here). */  
     int scanXOrigin;            /* Value of xOrigin field when scan started. */  
     int scanY;                  /* Y-position at which scan started (e.g.  
                                  * button was pressed here). */  
     int scanYOrigin;            /* Value of yOrigin field when scan started. */  
   
     /*  
      * Information used to speed up searches by remembering the last item  
      * created or found with an item id search.  
      */  
   
     Tk_Item *hotPtr;            /* Pointer to "hot" item (one that's been  
                                  * recently used.  NULL means there's no  
                                  * hot item. */  
     Tk_Item *hotPrevPtr;        /* Pointer to predecessor to hotPtr (NULL  
                                  * means item is first in list).  This is  
                                  * only a hint and may not really be hotPtr's  
                                  * predecessor. */  
   
     /*  
      * 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. */  
     double pixelsPerMM;         /* Scale factor between MM and pixels;  
                                  * used when converting coordinates. */  
     int flags;                  /* Various flags;  see below for  
                                  * definitions. */  
     int nextId;                 /* Number to use as id for next item  
                                  * created in widget. */  
     Tk_PostscriptInfo psInfo;  
                                 /* Pointer to information used for generating  
                                  * Postscript for the canvas.  NULL means  
                                  * no Postscript is currently being  
                                  * generated. */  
     Tcl_HashTable idTable;      /* Table of integer indices. */  
     /*  
      * Additional information, added by the 'dash'-patch  
      */  
     VOID *reserved1;  
     Tk_State canvas_state;      /* state of canvas */  
     VOID *reserved2;  
     VOID *reserved3;  
     Tk_TSOffset tsoffset;  
 #ifndef USE_OLD_TAG_SEARCH  
     TagSearchExpr *bindTagExprs; /* linked list of tag expressions used in bindings */  
 #endif  
 } TkCanvas;  
   
 /*  
  * Flag bits for canvases:  
  *  
  * REDRAW_PENDING -             1 means a DoWhenIdle handler has already  
  *                              been created to redraw some or all of the  
  *                              canvas.  
  * REDRAW_BORDERS -             1 means that the borders need to be redrawn  
  *                              during the next redisplay operation.  
  * REPICK_NEEDED -              1 means DisplayCanvas should pick a new  
  *                              current item before redrawing the canvas.  
  * GOT_FOCUS -                  1 means the focus is currently in this  
  *                              widget, so should draw the insertion cursor  
  *                              and traversal highlight.  
  * CURSOR_ON -                  1 means the insertion cursor is in the "on"  
  *                              phase of its blink cycle.  0 means either  
  *                              we don't have the focus or the cursor is in  
  *                              the "off" phase of its cycle.  
  * UPDATE_SCROLLBARS -          1 means the scrollbars should get updated  
  *                              as part of the next display operation.  
  * LEFT_GRABBED_ITEM -          1 means that the mouse left the current  
  *                              item while a grab was in effect, so we  
  *                              didn't change canvasPtr->currentItemPtr.  
  * REPICK_IN_PROGRESS -         1 means PickCurrentItem is currently  
  *                              executing.  If it should be called recursively,  
  *                              it should simply return immediately.  
  * BBOX_NOT_EMPTY -             1 means that the bounding box of the area  
  *                              that should be redrawn is not empty.  
  */  
   
 #define REDRAW_PENDING          1  
 #define REDRAW_BORDERS          2  
 #define REPICK_NEEDED           4  
 #define GOT_FOCUS               8  
 #define CURSOR_ON               0x10  
 #define UPDATE_SCROLLBARS       0x20  
 #define LEFT_GRABBED_ITEM       0x40  
 #define REPICK_IN_PROGRESS      0x100  
 #define BBOX_NOT_EMPTY          0x200  
   
 /*  
  * Flag bits for canvas items (redraw_flags):  
  *  
  * FORCE_REDRAW -               1 means that the new coordinates of some  
  *                              item are not yet registered using  
  *                              Tk_CanvasEventuallyRedraw(). It should still  
  *                              be done by the general canvas code.  
  */  
   
 #define FORCE_REDRAW            8  
   
 /*  
  * Canvas-related procedures that are shared among Tk modules but not  
  * exported to the outside world:  
  */  
   
 extern int              TkCanvPostscriptCmd _ANSI_ARGS_((TkCanvas *canvasPtr,  
                             Tcl_Interp *interp, int argc, char **argv));  
   
 /*  
  * The following definition is shared between tkCanvPs.c and tkCanvImg.c,  
  * and is used in generating postscript for images and windows.  
  */  
   
 typedef struct TkColormapData { /* Hold color information for a window */  
     int separated;              /* Whether to use separate color bands */  
     int color;                  /* Whether window is color or black/white */  
     int ncolors;                /* Number of color values stored */  
     XColor *colors;             /* Pixel value -> RGB mappings */  
     int red_mask, green_mask, blue_mask;        /* Masks and shifts for each */  
     int red_shift, green_shift, blue_shift;     /* color band */  
 } TkColormapData;  
   
 #endif /* _TKCANVAS */  
   
   
 /* $History: tkCanvas.h $  
  *  
  * *****************  Version 1  *****************  
  * User: Dtashley     Date: 1/02/01    Time: 2:36a  
  * Created in $/IjuScripter, IjuConsole/Source/Tk Base  
  * Initial check-in.  
  */  
   
 /* End of TKCANVAS.H */  
1    /* $Header$ */
2    
3    /*
4     * tkCanvas.h --
5     *
6     *      Declarations shared among all the files that implement
7     *      canvas widgets.
8     *
9     * Copyright (c) 1991-1994 The Regents of the University of California.
10     * Copyright (c) 1994-1995 Sun Microsystems, Inc.
11     * Copyright (c) 1998 by Scriptics Corporation.
12     *
13     * See the file "license.terms" for information on usage and redistribution
14     * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
15     *
16     * RCS: @(#) $Id: tkcanvas.h,v 1.1.1.1 2001/06/13 04:56:06 dtashley Exp $
17     */
18    
19    #ifndef _TKCANVAS
20    #define _TKCANVAS
21    
22    #ifndef _TK
23    #include "tk.h"
24    #endif
25    
26    #ifndef USE_OLD_TAG_SEARCH
27    typedef struct TagSearchExpr_s TagSearchExpr;
28    
29    struct TagSearchExpr_s {
30        TagSearchExpr *next;        /* for linked lists of expressions - used in bindings */
31        Tk_Uid uid;                 /* the uid of the whole expression */
32        Tk_Uid *uids;               /* expresion compiled to an array of uids */
33        int allocated;              /* available space for array of uids */
34        int length;                 /* length of expression */
35        int index;                  /* current position in expression evaluation */
36        int match;                  /* this expression matches event's item's tags*/
37    };
38    #endif /* not USE_OLD_TAG_SEARCH */
39    
40    /*
41     * The record below describes a canvas widget.  It is made available
42     * to the item procedures so they can access certain shared fields such
43     * as the overall displacement and scale factor for the canvas.
44     */
45    
46    typedef struct TkCanvas {
47        Tk_Window tkwin;            /* Window that embodies the canvas.  NULL
48                                     * means that the window has been destroyed
49                                     * but the data structures haven't yet been
50                                     * cleaned up.*/
51        Display *display;           /* Display containing widget;  needed, among
52                                     * other things, to release resources after
53                                     * tkwin has already gone away. */
54        Tcl_Interp *interp;         /* Interpreter associated with canvas. */
55        Tcl_Command widgetCmd;      /* Token for canvas's widget command. */
56        Tk_Item *firstItemPtr;      /* First in list of all items in canvas,
57                                     * or NULL if canvas empty. */
58        Tk_Item *lastItemPtr;       /* Last in list of all items in canvas,
59                                     * or NULL if canvas empty. */
60    
61        /*
62         * Information used when displaying widget:
63         */
64    
65        int borderWidth;            /* Width of 3-D border around window. */
66        Tk_3DBorder bgBorder;       /* Used for canvas background. */
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        GC pixmapGC;                /* Used to copy bits from a pixmap to the
82                                     * screen and also to clear the pixmap. */
83        int width, height;          /* Dimensions to request for canvas window,
84                                     * specified in pixels. */
85        int redrawX1, redrawY1;     /* Upper left corner of area to redraw,
86                                     * in pixel coordinates.  Border pixels
87                                     * are included.  Only valid if
88                                     * REDRAW_PENDING flag is set. */
89        int redrawX2, redrawY2;     /* Lower right corner of area to redraw,
90                                     * in integer canvas coordinates.  Border
91                                     * pixels will *not* be redrawn. */
92        int confine;                /* Non-zero means constrain view to keep
93                                     * as much of canvas visible as possible. */
94    
95        /*
96         * Information used to manage the selection and insertion cursor:
97         */
98    
99        Tk_CanvasTextInfo textInfo; /* Contains lots of fields;  see tk.h for
100                                     * details.  This structure is shared with
101                                     * the code that implements individual items. */
102        int insertOnTime;           /* Number of milliseconds cursor should spend
103                                     * in "on" state for each blink. */
104        int insertOffTime;          /* Number of milliseconds cursor should spend
105                                     * in "off" state for each blink. */
106        Tcl_TimerToken insertBlinkHandler;
107                                    /* Timer handler used to blink cursor on and
108                                     * off. */
109    
110        /*
111         * Transformation applied to canvas as a whole:  to compute screen
112         * coordinates (X,Y) from canvas coordinates (x,y), do the following:
113         *
114         * X = x - xOrigin;
115         * Y = y - yOrigin;
116         */
117    
118        int xOrigin, yOrigin;       /* Canvas coordinates corresponding to
119                                     * upper-left corner of window, given in
120                                     * canvas pixel units. */
121        int drawableXOrigin, drawableYOrigin;
122                                    /* During redisplay, these fields give the
123                                     * canvas coordinates corresponding to
124                                     * the upper-left corner of the drawable
125                                     * where items are actually being drawn
126                                     * (typically a pixmap smaller than the
127                                     * whole window). */
128    
129        /*
130         * Information used for event bindings associated with items.
131         */
132    
133        Tk_BindingTable bindingTable;
134                                    /* Table of all bindings currently defined
135                                     * for this canvas.  NULL means that no
136                                     * bindings exist, so the table hasn't been
137                                     * created.  Each "object" used for this
138                                     * table is either a Tk_Uid for a tag or
139                                     * the address of an item named by id. */
140        Tk_Item *currentItemPtr;    /* The item currently containing the mouse
141                                     * pointer, or NULL if none. */
142        Tk_Item *newCurrentPtr;     /* The item that is about to become the
143                                     * current one, or NULL.  This field is
144                                     * used to detect deletions  of the new
145                                     * current item pointer that occur during
146                                     * Leave processing of the previous current
147                                     * item.  */
148        double closeEnough;         /* The mouse is assumed to be inside an
149                                     * item if it is this close to it. */
150        XEvent pickEvent;           /* The event upon which the current choice
151                                     * of currentItem is based.  Must be saved
152                                     * so that if the currentItem is deleted,
153                                     * can pick another. */
154        int state;                  /* Last known modifier state.  Used to
155                                     * defer picking a new current object
156                                     * while buttons are down. */
157    
158        /*
159         * Information used for managing scrollbars:
160         */
161    
162        char *xScrollCmd;           /* Command prefix for communicating with
163                                     * horizontal scrollbar.  NULL means no
164                                     * horizontal scrollbar.  Malloc'ed*/
165        char *yScrollCmd;           /* Command prefix for communicating with
166                                     * vertical scrollbar.  NULL means no
167                                     * vertical scrollbar.  Malloc'ed*/
168        int scrollX1, scrollY1, scrollX2, scrollY2;
169                                    /* These four coordinates define the region
170                                     * that is the 100% area for scrolling (i.e.
171                                     * these numbers determine the size and
172                                     * location of the sliders on scrollbars).
173                                     * Units are pixels in canvas coords. */
174        char *regionString;         /* The option string from which scrollX1
175                                     * etc. are derived.  Malloc'ed. */
176        int xScrollIncrement;       /* If >0, defines a grid for horizontal
177                                     * scrolling.  This is the size of the "unit",
178                                     * and the left edge of the screen will always
179                                     * lie on an even unit boundary. */
180        int yScrollIncrement;       /* If >0, defines a grid for horizontal
181                                     * scrolling.  This is the size of the "unit",
182                                     * and the left edge of the screen will always
183                                     * lie on an even unit boundary. */
184    
185        /*
186         * Information used for scanning:
187         */
188    
189        int scanX;                  /* X-position at which scan started (e.g.
190                                     * button was pressed here). */
191        int scanXOrigin;            /* Value of xOrigin field when scan started. */
192        int scanY;                  /* Y-position at which scan started (e.g.
193                                     * button was pressed here). */
194        int scanYOrigin;            /* Value of yOrigin field when scan started. */
195    
196        /*
197         * Information used to speed up searches by remembering the last item
198         * created or found with an item id search.
199         */
200    
201        Tk_Item *hotPtr;            /* Pointer to "hot" item (one that's been
202                                     * recently used.  NULL means there's no
203                                     * hot item. */
204        Tk_Item *hotPrevPtr;        /* Pointer to predecessor to hotPtr (NULL
205                                     * means item is first in list).  This is
206                                     * only a hint and may not really be hotPtr's
207                                     * predecessor. */
208    
209        /*
210         * Miscellaneous information:
211         */
212    
213        Tk_Cursor cursor;           /* Current cursor for window, or None. */
214        char *takeFocus;            /* Value of -takefocus option;  not used in
215                                     * the C code, but used by keyboard traversal
216                                     * scripts.  Malloc'ed, but may be NULL. */
217        double pixelsPerMM;         /* Scale factor between MM and pixels;
218                                     * used when converting coordinates. */
219        int flags;                  /* Various flags;  see below for
220                                     * definitions. */
221        int nextId;                 /* Number to use as id for next item
222                                     * created in widget. */
223        Tk_PostscriptInfo psInfo;
224                                    /* Pointer to information used for generating
225                                     * Postscript for the canvas.  NULL means
226                                     * no Postscript is currently being
227                                     * generated. */
228        Tcl_HashTable idTable;      /* Table of integer indices. */
229        /*
230         * Additional information, added by the 'dash'-patch
231         */
232        VOID *reserved1;
233        Tk_State canvas_state;      /* state of canvas */
234        VOID *reserved2;
235        VOID *reserved3;
236        Tk_TSOffset tsoffset;
237    #ifndef USE_OLD_TAG_SEARCH
238        TagSearchExpr *bindTagExprs; /* linked list of tag expressions used in bindings */
239    #endif
240    } TkCanvas;
241    
242    /*
243     * Flag bits for canvases:
244     *
245     * REDRAW_PENDING -             1 means a DoWhenIdle handler has already
246     *                              been created to redraw some or all of the
247     *                              canvas.
248     * REDRAW_BORDERS -             1 means that the borders need to be redrawn
249     *                              during the next redisplay operation.
250     * REPICK_NEEDED -              1 means DisplayCanvas should pick a new
251     *                              current item before redrawing the canvas.
252     * GOT_FOCUS -                  1 means the focus is currently in this
253     *                              widget, so should draw the insertion cursor
254     *                              and traversal highlight.
255     * CURSOR_ON -                  1 means the insertion cursor is in the "on"
256     *                              phase of its blink cycle.  0 means either
257     *                              we don't have the focus or the cursor is in
258     *                              the "off" phase of its cycle.
259     * UPDATE_SCROLLBARS -          1 means the scrollbars should get updated
260     *                              as part of the next display operation.
261     * LEFT_GRABBED_ITEM -          1 means that the mouse left the current
262     *                              item while a grab was in effect, so we
263     *                              didn't change canvasPtr->currentItemPtr.
264     * REPICK_IN_PROGRESS -         1 means PickCurrentItem is currently
265     *                              executing.  If it should be called recursively,
266     *                              it should simply return immediately.
267     * BBOX_NOT_EMPTY -             1 means that the bounding box of the area
268     *                              that should be redrawn is not empty.
269     */
270    
271    #define REDRAW_PENDING          1
272    #define REDRAW_BORDERS          2
273    #define REPICK_NEEDED           4
274    #define GOT_FOCUS               8
275    #define CURSOR_ON               0x10
276    #define UPDATE_SCROLLBARS       0x20
277    #define LEFT_GRABBED_ITEM       0x40
278    #define REPICK_IN_PROGRESS      0x100
279    #define BBOX_NOT_EMPTY          0x200
280    
281    /*
282     * Flag bits for canvas items (redraw_flags):
283     *
284     * FORCE_REDRAW -               1 means that the new coordinates of some
285     *                              item are not yet registered using
286     *                              Tk_CanvasEventuallyRedraw(). It should still
287     *                              be done by the general canvas code.
288     */
289    
290    #define FORCE_REDRAW            8
291    
292    /*
293     * Canvas-related procedures that are shared among Tk modules but not
294     * exported to the outside world:
295     */
296    
297    extern int              TkCanvPostscriptCmd _ANSI_ARGS_((TkCanvas *canvasPtr,
298                                Tcl_Interp *interp, int argc, char **argv));
299    
300    /*
301     * The following definition is shared between tkCanvPs.c and tkCanvImg.c,
302     * and is used in generating postscript for images and windows.
303     */
304    
305    typedef struct TkColormapData { /* Hold color information for a window */
306        int separated;              /* Whether to use separate color bands */
307        int color;                  /* Whether window is color or black/white */
308        int ncolors;                /* Number of color values stored */
309        XColor *colors;             /* Pixel value -> RGB mappings */
310        int red_mask, green_mask, blue_mask;        /* Masks and shifts for each */
311        int red_shift, green_shift, blue_shift;     /* color band */
312    } TkColormapData;
313    
314    #endif /* _TKCANVAS */
315    
316    /* End of tkcanvas.h */

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

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25