1 /*------------------------------------------------------------\
2 |                                                             |
3 | This file is part of the Alliance CAD System Copyright      |
4 | (C) Laboratoire LIP6 - D�partement ASIM Universite P&M Curie|
5 |                                                             |
6 | Home page      : http://www-asim.lip6.fr/alliance/          |
7 | E-mail         : mailto:alliance-users@asim.lip6.fr       |
8 |                                                             |
9 | This progam is  free software; you can redistribute it      |
10 | and/or modify it under the  terms of the GNU General Public |
11 | License as  published by the Free Software Foundation;      |
12 | either version 2 of the License, or (at your option) any    |
13 | later version.                                              |
14 |                                                             |
15 | Alliance VLSI  CAD System  is distributed  in the hope that |
16 | it  will be useful, but WITHOUT  ANY WARRANTY;              |
17 | without even the  implied warranty of MERCHANTABILITY or    |
18 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General       |
19 | Public License for more details.                            |
20 |                                                             |
21 | You should have received a copy  of the GNU General Public  |
22 | License along with the GNU C Library; see the file COPYING. |
23 | If not, write to the Free Software Foundation, Inc.,        |
24 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                     |
25 |                                                             |
26 \------------------------------------------------------------*/
27 
28 /*------------------------------------------------------------\
29 |                                                             |
30 | Tool    :                   GRAAL                           |
31 |                                                             |
32 | File    :                   gtb101.h                        |
33 |                                                             |
34 | Author  :                Jacomme Ludovic                    |
35 |                                                             |
36 | Date    :                  28.03.95                         |
37 |                                                             |
38 \------------------------------------------------------------*/
39 /*------------------------------------------------------------\
40 |                                                             |
41 |                         Include Files                       |
42 |                                                             |
43 \------------------------------------------------------------*/
44 /*------------------------------------------------------------\
45 |                                                             |
46 |                           Constants                         |
47 |                                                             |
48 \------------------------------------------------------------*/
49 
50 # ifndef GRAAL_GTB
51 # define GRAAL_GTB
52 
53 /*------------------------------------------------------------\
54 |                                                             |
55 |                        MouseCursors                         |
56 |                                                             |
57 \------------------------------------------------------------*/
58 
59 # define GRAAL_NORMAL_CURSOR     0
60 # define GRAAL_WATCH_CURSOR      1
61 # define GRAAL_PIRATE_CURSOR     2
62 # define GRAAL_CROSS_CURSOR      3
63 # define GRAAL_NO_CURSOR         4
64 
65 # define GRAAL_MAX_CURSOR        5
66 
67 /*------------------------------------------------------------\
68 |                                                             |
69 |                        DialogBoxType                        |
70 |                                                             |
71 \------------------------------------------------------------*/
72 
73 # define GRAAL_DIALOG_MESSAGE   0
74 # define GRAAL_DIALOG_ERROR     1
75 # define GRAAL_DIALOG_INFO      2
76 # define GRAAL_DIALOG_QUESTION  3
77 # define GRAAL_DIALOG_WARNING   4
78 # define GRAAL_DIALOG_WORKING   5
79 # define GRAAL_DIALOG_FILE      6
80 # define GRAAL_DIALOG_PROMPT    7
81 
82 /*------------------------------------------------------------\
83 |                                                             |
84 |                            Types                            |
85 |                                                             |
86 \------------------------------------------------------------*/
87 /*------------------------------------------------------------\
88 |                                                             |
89 |                         GraalDialogBox                      |
90 |                                                             |
91 \------------------------------------------------------------*/
92 
93   typedef struct GraalDialogItem
94 
95   {
96     char       *LABEL;
97     char        TYPE;
98     Widget      WIDGET;
99     void        (*CALLBACK_OK)();
100     XtPointer   CALLDATA_OK;
101     void        (*CALLBACK_CANCEL)();
102     XtPointer   CALLDATA_CANCEL;
103 
104   } GraalDialogItem;
105 
106 
107 /*------------------------------------------------------------\
108 |                                                             |
109 |                         GraalMenuItem                       |
110 |                                                             |
111 \------------------------------------------------------------*/
112 
113   typedef struct GraalMenuItem
114 
115   {
116     char                 *LABEL;
117     char                  MNEMONIC;
118     char                 *SHORT_KEY;
119     char                 *SHORT_KEY_TEXT;
120     WidgetClass          *CLASS;
121     Boolean               SEPARATOR;
122     Boolean               TITLE;
123     Boolean               HELP;
124     void                  (*CALLBACK)();
125     XtPointer             CALLDATA;
126     Widget                BUTTON;
127     Widget                MENU;
128     struct GraalMenuItem *NEXT;
129 
130   } GraalMenuItem;
131 
132 /*------------------------------------------------------------\
133 |                                                             |
134 |                      GraalPanelButtonItem                   |
135 |                                                             |
136 \------------------------------------------------------------*/
137 
138   typedef struct GraalPanelButtonItem
139 
140   {
141     char                        *LABEL;
142     char                        *TEXT;
143     char                        *BITMAP;
144     int                          WIDTH;
145     int                          HEIGHT;
146     char                        *FOREGROUND;
147     char                        *BACKGROUND;
148     unsigned char                X;
149     unsigned char                Y;
150     unsigned char                DX;
151     unsigned char                DY;
152     void                         (*CALLBACK)();
153     XtPointer                    CALLDATA;
154     Widget                       BUTTON;
155 
156   } GraalPanelButtonItem;
157 
158 /*------------------------------------------------------------\
159 |                                                             |
160 |                          GraalPanelItem                     |
161 |                                                             |
162 \------------------------------------------------------------*/
163 
164   typedef struct GraalPanelItem
165 
166   {
167     char                  *TITLE;
168     char                   COMPUTE;
169     char                   MANAGED;
170     int                    X;
171     int                    Y;
172     int                    WIDTH;
173     int                    HEIGHT;
174     unsigned char          COLUMN;
175     unsigned char          ROW;
176     Widget                 PANEL;
177     Widget                 PANEL_FORM;
178     Widget                 FRAME;
179     Widget                 FORM;
180     unsigned char          LIST_NUMBER;
181     GraalPanelButtonItem  *LIST;
182 
183   } GraalPanelItem;
184 
185 /*------------------------------------------------------------\
186 |                                                             |
187 |                          Variables                          |
188 |                                                             |
189 \------------------------------------------------------------*/
190 /*------------------------------------------------------------\
191 |                                                             |
192 |                          Functions                          |
193 |                                                             |
194 \------------------------------------------------------------*/
195 
196   extern void   GraalDestroyDialogCallback();
197   extern void   GraalExitDialogCallback();
198 
199   extern void   GraalSetMouseCursor();
200   extern Pixmap GraalCreatePixmap();
201   extern void   GraalSetIcon();
202   extern void   GraalBuildMenus();
203   extern void   GraalBuildPanel();
204   extern void   GraalEnterPanel();
205   extern void   GraalExitPanel();
206   extern void   GraalBuildDialog();
207   extern void   GraalEnterDialog();
208   extern void   GraalReEnterDialog();
209   extern void   GraalExitDialog();
210   extern void   GraalWarningMessage();
211   extern void   GraalErrorMessage();
212 
213 # endif
214