2
* Electric(tm) VLSI Design System
5
* User interface tool: header file
6
* Written by: Steven M. Rubin, Static Free Software
8
* Copyright (c) 2000 Static Free Software.
10
* Electric(tm) is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
15
* Electric(tm) is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with Electric(tm); see the file COPYING. If not, write to
22
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
23
* Boston, Mass 02111-1307, USA.
25
* Static Free Software
27
* Portola Valley, California 94028
28
* info@staticfreesoft.com
31
#if defined(__cplusplus) && !defined(ALLCPLUSPLUS)
36
/******************** CONSTANTS ********************/
38
/* the meaning of NODEINST->userbits: (other bit (037400177) used globally) */
39
#define KILLN 0200 /* if on, this nodeinst is marked for death */
40
#define REWANTN 0400 /* nodeinst re-drawing is scheduled */
41
#define RELOCLN 01000 /* only local nodeinst re-drawing desired */
42
#define RETDONN 02000 /* transparent nodeinst re-draw is done */
43
#define REODONN 04000 /* opaque nodeinst re-draw is done */
44
#define NODEFLAGBIT 010000 /* general flag used in spreading and highlighting */
45
#define WANTEXP 020000 /* if on, nodeinst wants to be (un)expanded */
46
#define TEMPFLG 040000 /* temporary flag for nodeinst display */
47
#define HARDSELECTN 0100000 /* set if hard to select */
48
#define NVISIBLEINSIDE 040000000 /* set if node only visible inside facet */
50
/* the meaning of ARCINST->userbits: (bits 0-1, 4-24 (0177777763) used globally) */
51
#define KILLA 0200000000 /* if on, this arcinst is marked for death */
52
#define REWANTA 0400000000 /* arcinst re-drawing is scheduled */
53
#define RELOCLA 01000000000 /* only local arcinst re-drawing desired */
54
#define RETDONA 02000000000 /* transparent arcinst re-draw is done */
55
#define REODONA 04000000000 /* opaque arcinst re-draw is done */
56
#define ARCFLAGBIT 010000000000 /* general flag used in spreading and highlighting */
57
#define HARDSELECTA 020000000000 /* set if hard to select */
59
/* the meaning of NODEPROTO->userbits: (bits 0-23 (077777777) used globally) */
60
#define NHASOPA 0100000000 /* set if prototype has opaque graphics */
61
#define NFIRSTOPA 017600000000 /* index of first opaque layer (if any) */
62
#define NFIRSTOPASH 25 /* right shift of NFIRSTOPA */
63
#define NINVISIBLE 020000000000 /* set if primitive is invisible */
65
/* the meaning of ARCPROTO->userbits: (bits 0-22,31 (020037777777) used globally) */
66
#define CANCONNECT 040000000 /* temporary for finding port connections */
67
#define AHASOPA 0100000000 /* set if prototype has opaque graphics */
68
#define AFIRSTOPA 07600000000 /* index of first opaque layer (if any) */
69
#define AINVISIBLE 010000000000 /* set if arc is invisible */
70
#define AFIRSTOPASH 25 /* right shift of AFIRSTOPA */
72
/* the meaning of PORTPROTO->userbits: (bits 0-31 used globally) */
74
/* the meaning of "us_tool->toolstate" (bits 0-6 (0177) used globally) */
75
#define NOKEYLOCK 0200000 /* set to ignore key lockout after errors */
76
#define JUSTTHEFACTS 0400000 /* set to print only informative messages */
77
#define NODETAILS 01000000 /* set to make no mention of specific commands */
78
#define USEDIALOGS 02000000 /* set to use dialogs where appropriate */
79
#define ONESHOTMENU 04000000 /* set to have fixed menus highlight in one-shot mode */
80
#define INTERACTIVE 010000000 /* set if cursor commands drag */
81
#define INTEGRAL 020000000 /* set if windows must be integral pixels */
82
#define ECHOBIND 040000000 /* set to echo bound commands in full */
83
#define MENUON 0100000000 /* set if menu is on */
84
#define SHOWXY 0200000000 /* set to display cursor rather than TECH/LAMBDA */
85
#define TTYAUDIT 0400000000 /* set to log messages window */
86
#define TERMBEEP 01000000000 /* set to enable terminal beep */
87
#define TERMNOINTERRUPT 02000000000 /* set to disable interrupts */
89
/* the meaning of "tool:user.USER_optionflags" */
90
#define NOTEXTSELECT 01 /* set to disable selection of ALL text unless "special" option used */
91
#define DRAWTINYFACETS 02 /* clear to "hash-out" tiny facets */
92
#define CHECKDATE 04 /* set to check facet dates */
94
#define NOPRIMCHANGES 020 /* set to lock lockable primitives */
95
#define PORTLABELS 0700 /* bits for port labels */
96
#define PORTLABELSSH 6 /* right shift for port labels */
97
#define PORTSFULL 0 /* ports as complete text */
98
#define PORTSCROSS 0100 /* ports drawn as crosses */
99
#define PORTSSHORT 0300 /* ports drawn as shortened text */
101
#define NOINSTANCESELECT 02000 /* set to disable selection of instances unless "special" option used */
102
#define NOMOVEAFTERDUP 04000 /* set to disable moving of objects after duplication */
103
#define DUPCOPIESPORTS 010000 /* set to have duplication/array/extract copy ports */
104
#define NO3DPERSPECTIVE 020000 /* set to turn off perspective in 3D view */
106
#define CENTEREDPRIMITIVES 0100000 /* set to place primitives by centers */
107
#define AUTOSWITCHTECHNOLOGY 0200000 /* set to switch technology when facet changes */
108
#define EXPORTLABELS 01400000 /* bits for export labels */
109
#define EXPORTLABELSSH 17 /* right shift for export labels */
110
#define EXPORTSFULL 0 /* exports drawn as complete text */
111
#define EXPORTSCROSS 0400000 /* exports drawn as crosses */
112
#define EXPORTSSHORT 01400000 /* exports drawn as shortened text */
114
#define NODATEORVERSION 04000000 /* set to supress date/version in output files */
115
#define BEEPAFTERLONGJOB 010000000 /* set to beep after a long job */
116
#define FACETCENTERALWAYS 020000000 /* set to place facet-center in new facets */
117
#define MUSTENCLOSEALL 040000000 /* set to force area-selection to completely enclose objects */
118
#define HIDETXTNODE 0100000000 /* set to supress node text */
119
#define HIDETXTARC 0200000000 /* set to supress arc text */
120
#define HIDETXTPORT 0400000000 /* set to supress port text */
121
#define HIDETXTEXPORT 01000000000 /* set to supress export text */
122
#define HIDETXTNONLAY 02000000000 /* set to supress nonlayout text */
123
#define HIDETXTINSTNAME 04000000000 /* set to supress instance name text */
124
#define HIDETXTFACET 010000000000 /* set to supress facet text */
126
/* the meaning of "JAVA_flags" on the user tool object */
127
#define JAVANOCOMPILER 1 /* disable compiler */
128
#define JAVANOEVALUATE 2 /* do not evaluate code */
131
#define CTRLCKEY 03 /* the Control-C key */
132
#define CTRLDKEY 04 /* the Control-D key */
133
#define BACKSPACEKEY 010 /* the BACKSPACE key */
134
#define TABKEY 011 /* the TAB key */
135
#define ESCKEY 033 /* the Escape key */
136
#define DELETEKEY 0177 /* the DELETE key */
138
/* the O/S capabilities */
139
#define CANLOGINPUT 01 /* can log input for playback */
140
#define CANUSEFRAMES 02 /* can display multiple window frames */
141
#define CANSHOWPOPUP 04 /* can display popup menus */
142
#define CANRUNPROCESS 010 /* can run subprocesses (fork and exec) */
143
#define CANHAVENOWINDOWS 020 /* can exist with no edit windows */
144
#define CANSTATUSPERFRAME 040 /* can put separate status info in each frame */
145
#define CANCHOOSEFACES 0100 /* can choose alternate type faces */
146
#define CANMODIFYFONTS 0200 /* can modify fonts with italic, bold, etc. */
147
#define CANSCALEFONTS 0400 /* can scale fonts smoothly */
149
/* the icon styles (in tool:user.USER_icon_style) */
150
#define ICONSTYLESIDEIN 03 /* side number for input ports ( */
151
#define ICONSTYLESIDEINSH 0 /* shift for ICONSTYLESIDEIN */
152
#define ICONSTYLESIDEOUT 014 /* side number for input ports 0=left */
153
#define ICONSTYLESIDEOUTSH 2 /* shift for ICONSTYLESIDEOUT */
154
#define ICONSTYLESIDEBIDIR 060 /* side number for input ports 1=right */
155
#define ICONSTYLESIDEBIDIRSH 4 /* shift for ICONSTYLESIDEBIDIR */
156
#define ICONSTYLESIDEPOWER 0300 /* side number for input ports 2=top */
157
#define ICONSTYLESIDEPOWERSH 6 /* shift for ICONSTYLESIDEPOWER */
158
#define ICONSTYLESIDEGROUND 01400 /* side number for input ports 3=bottom */
159
#define ICONSTYLESIDEGROUNDSH 8 /* shift for ICONSTYLESIDEGROUND */
160
#define ICONSTYLESIDECLOCK 06000 /* side number for input ports ) */
161
#define ICONSTYLESIDECLOCKSH 10 /* shift for ICONSTYLESIDECLOCK */
162
#define ICONSTYLEPORTLOC 0140000 /* location of ports */
163
#define ICONSTYLEPORTLOCSH 14 /* shift for ICONSTYLEPORTLOC */
164
#define ICONSTYLEPORTSTYLE 0600000 /* style of port text */
165
#define ICONSTYLEPORTSTYLESH 16 /* shift for ICONSTYLEPORTSTYLE */
166
#define ICONSTYLEDRAWNOLEADS 01000000 /* nonzero to remove leads */
167
#define ICONSTYLEDRAWNOBODY 02000000 /* nonzero to remove body */
168
#define ICONSTYLETECH 014000000 /* technology of ports 0=generic, 1=schematic */
169
#define ICONSTYLETECHSH 20 /* shift for ICONSTYLETECH */
170
#define ICONINSTLOC 060000000 /* instance location */
171
#define ICONINSTLOCSH 22 /* shift for ICONINSTLOC */
172
#define ICONSTYLEREVEXPORT 0100000000 /* nonzero to reverse export order */
174
#define ICONSTYLEDEFAULT (0<<ICONSTYLESIDEINSH) | (1<<ICONSTYLESIDEOUTSH) | \
175
(2<<ICONSTYLESIDEBIDIRSH) | (3<<ICONSTYLESIDEPOWERSH) | \
176
(3<<ICONSTYLESIDEGROUNDSH) | (0<<ICONSTYLESIDECLOCKSH) | \
177
(1<<ICONSTYLEPORTLOCSH) | (0<<ICONSTYLEPORTSTYLESH) | \
179
#define ICONLEADDEFLEN 2
180
#define ICONLEADDEFSEP 2
182
/* the "style" parameter to "us_getcolormap()" */
183
#define COLORSEXISTING 0 /* reload existing colors */
184
#define COLORSDEFAULT 1 /* load default colors (gray background) */
185
#define COLORSBLACK 2 /* load black background colors */
186
#define COLORSWHITE 3 /* load white background colors */
188
/* editor defaults in the user interface */
189
#define DEFAULTBUTTONHANDLER us_buttonhandler
190
#define DEFAULTCHARHANDLER us_charhandler
191
#define DEFAULTCHANGEHANDLER 0
192
#define DEFAULTTERMHANDLER 0
193
#define DEFAULTREDISPHANDLER us_redisplay
195
/* the values in call to "us_gethighlighted()" */
196
#define WANTNODEINST 1 /* want nodes */
197
#define WANTARCINST 2 /* want arcs */
199
/* the meaning of "us_state" */
200
#define COMMANDFAILED 01 /* set if current command has error */
201
#define SKIPKEYS 02 /* set to ignore further single-key commands */
202
#define GOTXY 04 /* set if X/Y co-ordinates are known */
203
#define LANGLOOP 010 /* set if interpreting language code */
204
#define HIGHLIGHTSET 020 /* set if highlighting turned on in broadcast */
205
#define DIDINPUT 040 /* set if just did input but haven't executed yet */
206
#define MACROTERMINATED 0100 /* set if macro has terminated early */
207
#define SNAPMODE 03600 /* snapping mode bits */
208
#define SNAPMODENONE 0 /* snapping mode: none */
209
#define SNAPMODECENTER 0200 /* snapping mode: center (circles, arcs) */
210
#define SNAPMODEMIDPOINT 0400 /* snapping mode: midpoint (lines) */
211
#define SNAPMODEENDPOINT 0600 /* snapping mode: endpoint (lines, arcs) */
212
#define SNAPMODETANGENT 01000 /* snapping mode: tangent (circles, arcs) */
213
#define SNAPMODEPERP 01200 /* snapping mode: perpendicular (lines, arcs, circles) */
214
#define SNAPMODEQUAD 01400 /* snapping mode: quadrant (circles, arcs) */
215
#define SNAPMODEINTER 01600 /* snapping mode: any intersection */
216
#define NONOVERLAPPABLEDISPLAY 04000 /* set to disallow overlappable layers in display */
217
#define NONPERSISTENTCURNODE 010000 /* clear to have current node be persistent */
218
#define CURFACETCHANGED 020000 /* set if current facet changed */
219
#define MEASURINGDISTANCE 040000 /* set if measuring distance */
220
#define MEASURINGDISTANCEINI 0100000 /* set if measurement initializing */
222
/* cursor definitions */
223
#define NORMALCURSOR 0 /* a normal arrow cursor */
224
#define WANTTTYCURSOR 1 /* a "use the TTY" cursor */
225
#define PENCURSOR 2 /* a "pen" cursor */
226
#define NULLCURSOR 3 /* a null cursor */
227
#define MENUCURSOR 4 /* a menu selection cursor */
228
#define HANDCURSOR 5 /* a hand cursor (for dragging) */
229
#define TECHCURSOR 6 /* the technology edit cursor ("T") */
230
#define IBEAMCURSOR 7 /* the text edit cursor ("I") */
231
#define WAITCURSOR 8 /* the hourglass cursor */
232
#define LRCURSOR 9 /* a left/right pointing cursor */
233
#define UDCURSOR 10 /* an up/down pointing cursor */
235
#define MESSAGESWIDTH 80 /* width of messages window */
236
#define DEFAULTEXPLORERTEXTSIZE 12 /* default size of text in explorer window */
238
#define DISPLAYSMALLSHIFT 20 /* fraction of screen that shifts when arrows are clicked */
239
#define DISPLAYLARGESHIFT 2 /* fraction of screen that shifts when scrollbar is clicked */
241
/******************** VARIABLES ********************/
243
/* static display information */
244
extern INTBIG us_longcount; /* number of long commands */
245
extern void (*us_displayroutine)(POLYGON*, WINDOWPART*); /* routine for graphics display */
246
extern INTBIG us_cursorstate; /* see defines above */
247
extern INTBIG us_normalcursor; /* default cursor to use */
248
extern BOOLEAN us_optionschanged; /* true if options changed */
249
extern INTBIG us_layer_letters_key; /* variable key for "USER_layer_letters" */
250
extern INTBIG us_highlightedkey; /* variable key for "USER_highlighted" */
251
extern INTBIG us_highlightstackkey; /* variable key for "USER_highlightstack" */
252
extern INTBIG us_descent_path_key; /* variable key for "USER_descent_path" */
253
extern INTBIG us_descent_view_key; /* variable key for "USER_descent_view" */
254
extern INTBIG us_binding_keys_key; /* variable key for "USER_binding_keys" */
255
extern INTBIG us_binding_buttons_key; /* variable key for "USER_binding_buttons" */
256
extern INTBIG us_binding_menu_key; /* variable key for "USER_binding_menu" */
257
extern INTBIG us_current_node_key; /* variable key for "USER_current_node" */
258
extern INTBIG us_current_arc_key; /* variable key for "USER_current_arc" */
259
extern INTBIG us_placement_angle_key; /* variable key for "USER_placement_angle" */
260
extern INTBIG us_alignment_ratio_key; /* variable key for "USER_alignment_ratio" */
261
extern INTBIG us_alignment_edge_ratio_key;/* variable key for "USER_alignment_edge_ratio" */
262
extern INTBIG us_arcstylekey; /* variable key for "USER_arc_style" */
263
extern INTBIG us_current_technology_key; /* variable key for "USER_current_technology" */
264
extern INTBIG us_current_window_key; /* variable key for "USER_current_window" */
265
extern INTBIG us_current_constraint_key; /* variable key for "USER_current_constraint" */
266
extern INTBIG us_colormap_red_key; /* variable key for "USER_colormap_red" */
267
extern INTBIG us_colormap_green_key; /* variable key for "USER_colormap_green" */
268
extern INTBIG us_colormap_blue_key; /* variable key for "USER_colormap_blue" */
269
extern INTBIG us_menu_position_key; /* variable key for "USER_colormap_position" */
270
extern INTBIG us_menu_x_key; /* variable key for "USER_colormap_x" */
271
extern INTBIG us_menu_y_key; /* variable key for "USER_colormap_y" */
272
extern INTBIG us_macrorunningkey; /* variable key for "USER_macrorunning" */
273
extern INTBIG us_macrobuildingkey; /* variable key for "USER_macrobuilding" */
274
extern INTBIG us_text_editorkey; /* variable key for "USER_text_editor" */
275
extern INTBIG us_optionflagskey; /* variable key for "USER_optionflags" */
276
extern INTBIG us_gridfloatskey; /* variable key for "USER_grid_floats" */
277
extern INTBIG us_gridboldspacingkey; /* variable key for "USER_grid_bold_spacing" */
278
extern INTBIG us_quickkeyskey; /* variable key for "USER_quick_keys" */
279
extern INTBIG us_interactiveanglekey; /* variable key for "USER_interactive_angle" */
280
extern INTBIG us_tinylambdaperpixelkey; /* variable key for "USER_tiny_lambda_per_pixel" */
281
extern INTBIG us_ignoreoptionchangeskey; /* variable key for "USER_ignore_option_changes" */
282
extern INTBIG us_displayunitskey; /* variable key for "USER_display_units" */
283
extern INTBIG us_java_flags_key; /* variable key for "JAVA_flags" */
285
extern INTBIG us_javaflags; /* mirror for "JAVA_flags" */
286
extern INTBIG us_useroptions; /* mirror for "USER_optionflags" */
287
extern INTBIG us_tinyratio; /* mirror for "USER_tiny_lambda_per_pixel" */
288
extern INTBIG us_separatechar; /* separating character in port names */
290
/* file type descriptors */
291
extern INTBIG us_filetypecolormap; /* Color map */
292
extern INTBIG us_filetypehelp; /* Help */
293
extern INTBIG us_filetypelog; /* Log */
294
extern INTBIG us_filetypemacro; /* Macro */
295
extern INTBIG us_filetypenews; /* News */
298
extern INTBIG us_state; /* miscellaneous state of user interface */
300
/* user interface state */
301
extern NODEPROTO *us_curnodeproto; /* current nodeproto */
302
extern ARCPROTO *us_curarcproto; /* current arcproto */
303
extern INTBIG us_alignment_ratio; /* current alignment in fractional units */
304
extern INTBIG us_edgealignment_ratio; /* current edge alignment in fractional units */
305
extern BOOLEAN us_dupdistset; /* true if duplication distance is valid */
306
extern NODEINST *us_dupnode; /* a node that was duplicated */
307
extern NODEPROTO *us_clipboardfacet; /* facet with cut/copy/paste objects */
308
extern INTBIG us_dupx, us_dupy; /* amount to move duplicated objects */
309
extern WINDOWFRAME *us_menuframe; /* window frame on which menu resides */
310
extern INTSML us_erasech, us_killch; /* the erase and kill characters */
311
extern INTBIG us_menux, us_menuy; /* number of menu elements on the screen */
312
extern INTBIG us_menupos; /* position: 0:top 1:bottom 2:left 3:right */
313
extern INTBIG us_menuxsz,us_menuysz; /* size of menu elements */
314
extern INTBIG us_menuhnx,us_menuhny; /* highlighted nodeinst menu entry */
315
extern INTBIG us_menuhax,us_menuhay; /* highlighted arcinst menu entry */
316
extern INTBIG us_menulx,us_menuhx; /* X: low and high of menu area */
317
extern INTBIG us_menuly,us_menuhy; /* Y: low and high of menu area */
318
extern INTBIG us_lastmeasurex, us_lastmeasurey; /* last measured distance */
319
extern BOOLEAN us_validmesaure; /* true if a measure was done */
320
extern FILE *us_logrecord; /* logging record file */
321
extern FILE *us_logplay; /* logging playback file */
322
extern FILE *us_termaudit; /* messages window auditing file */
323
extern FILE *us_tracefile; /* trace file */
324
extern INTBIG us_logflushfreq; /* session logging flush frequency */
325
extern INTBIG us_quickkeyfactcount; /* number of quick keys in "factory" setup */
326
extern char **us_quickkeyfactlist; /* quick keys in "factory" setup */
328
/******************** HIGHLIGHT MODULES ********************/
331
* Highlight modules contain the following:
333
* status fromgeom fromport frompoint fromvar facet what is selected
334
* ======== ======== ========= ========= ======== ========= ============================
335
* HIGHFROM nodeinst --------- --------- -------- nodeproto node
336
* HIGHFROM arcinst --------- --------- -------- nodeproto arc
337
* HIGHFROM nodeinst portproto --------- -------- nodeproto node and port
338
* HIGHFROM nodeinst --------- integer -------- nodeproto node and outline point
339
* HIGHTEXT nodeinst --------- --------- variable nodeproto displayable variable on node
340
* HIGHTEXT arcinst --------- --------- variable nodeproto displayable variable on arc
341
* HIGHTEXT nodeinst portproto --------- variable nodeproto displayable variable on port
342
* HIGHTEXT -------- --------- --------- variable nodeproto displayable variable on facet
343
* HIGHTEXT nodeinst portproto --------- -------- nodeproto port name
344
* HIGHTEXT nodeinst --------- --------- -------- nodeproto node name
345
* HIGHBBOX -------- --------- --------- -------- nodeproto bounding box
346
* HIGHLINE -------- --------- --------- -------- nodeproto line
349
#define NOHIGHLIGHT ((HIGHLIGHT *)-1)
350
#define HIGHFROM 01 /* set to display "from" object */
351
#define HIGHBBOX 04 /* set to display bounding box */
352
#define HIGHLINE 010 /* set to display a line */
353
#define HIGHTEXT 020 /* set to display text */
354
#define HIGHTYPE 037 /* the above highlight types */
355
#define HIGHEXTRA 040 /* set to display extra information */
356
#define HIGHSNAP 0100 /* set if snap point selected */
357
#define HIGHSNAPTAN 0200 /* set if tangent snap point selected */
358
#define HIGHSNAPPERP 0400 /* set if perpendicular snap point selected */
359
#define HIGHNOBOX 01000 /* set to disable basic selection box */
361
typedef struct Ihighlight
363
struct Ihighlight *nexthighlight; /* next in linked list */
364
INTBIG status; /* nature of this highlighting (see above) */
365
NODEPROTO *facet; /* the facet containing this highlight */
366
GEOM *fromgeom; /* "from" object: geometry module */
367
PORTPROTO *fromport; /* "from" object: port on node */
368
INTBIG frompoint; /* "from" object: polygon vertex */
369
VARIABLE *fromvar; /* "from" object: variable with text */
370
VARIABLE *fromvarnoeval; /* "from" object: unevaluated variable with text */
371
INTBIG snapx, snapy; /* HIGHSNAP: coordinate of snap point */
372
INTBIG stalx,staly; /* HIGHBBOX: lower corner HIGHLINE: point 1 */
373
INTBIG stahx,stahy; /* HIGHBBOX: upper corner HIGHLINE: point 2 */
376
/******************** MACRO PACKAGE MODULES ********************/
378
#define NOMACROPACK ((MACROPACK *)-1)
380
typedef struct Imacropack
382
char *packname; /* name of this macro package */
383
INTBIG total; /* number of macros in this package */
384
struct Imacropack *nextmacropack; /* next in list of macros */
387
extern MACROPACK *us_macropacktop; /* top of list of defined macro packages */
388
extern MACROPACK *us_curmacropack; /* current macro package */
390
/******************** USER COMMAND MODULES ********************/
392
#define NOUSERCOM ((USERCOM *)-1)
393
#define NUMKEYS 256 /* maximum keys on keyboard */
394
#define NUMBUTS 45 /* maximum buttons on tablet/mouse */
396
typedef struct Iusercom
398
INTBIG active; /* command index (-1 if none) */
399
char *comname; /* name of this command */
400
struct Ipopupmenu *menu; /* pop-up menu to execute (if command is one) */
401
char *message; /* message to place in menu */
402
NODEPROTO *nodeglyph; /* nodeproto glyph to display in menu */
403
ARCPROTO *arcglyph; /* arcproto glyph to display in menu */
404
INTBIG count; /* number of valid parameters */
405
char *word[MAXPARS]; /* parameter from user */
406
struct Iusercom *nextcom; /* next in list */
409
extern USERCOM *us_usercomfree; /* list of free user commands */
410
extern USERCOM *us_lastcom; /* last command and arguments */
412
/******************** POP-UP MENU MODULES ********************/
414
#define NOPOPUPMENUITEM ((POPUPMENUITEM *)-1)
418
char *attribute; /* attribute name */
419
char *value; /* value of the attribute (0 for none) */
420
COMCOMP *valueparse; /* command completion for "value" field */
421
INTBIG maxlen; /* length of value field (-1 to preserve) */
422
USERCOM *response; /* command in this menu entry */
423
BOOLEAN changed; /* true if value is changed */
426
#define NOPOPUPMENU ((POPUPMENU *)-1)
428
typedef struct Ipopupmenu
430
char *name; /* pop-up menu name */
431
POPUPMENUITEM *list; /* array of pop-up menu items */
432
INTBIG total; /* number of items */
433
char *header; /* header information for the menu */
434
struct Ipopupmenu *nextpopupmenu; /* next in linked list */
437
extern POPUPMENU *us_firstpopupmenu; /* list of existing pop-up menus */
439
/******************** PULLDOWN MENUS ********************/
441
#define MENUBARHEIGHT 25 /* size in pixels */
443
extern INTBIG us_menubarsize; /* actual size (0 if no menu bar) */
444
extern INTBIG us_pulldownmenucount; /* number of pulldown menus */
445
extern INTBIG *us_pulldownmenupos; /* position of pulldown menus */
446
extern POPUPMENU **us_pulldowns; /* the current pulldown menus */
448
/******************** BINDINGS ********************/
452
NODEPROTO *nodeglyph; /* node to be drawn in the menu */
453
ARCPROTO *arcglyph; /* arc to be drawn in the menu */
454
INTBIG backgroundcolor; /* background color of the menu */
455
INTBIG menumessagesize; /* size of text to be drawn in the menu */
456
char *menumessage; /* text to be drawn in the menu */
457
POPUPMENU *popup; /* popup menu that goes here */
458
BOOLEAN inputpopup; /* true if the popup is input type */
459
char *command; /* command to execute */
462
/******************** HOOKS TO DIALOGS IN OTHER TOOLS ********************/
464
#define NODIALOGHOOK ((DIALOGHOOK *)-1)
466
typedef struct IDialogHook
468
char *terminputkeyword;
469
COMCOMP *getlinecomp;
470
void (*routine)(void);
471
struct IDialogHook *nextdialoghook;
474
/******************** STATUS BAR ********************/
478
INTBIG line; /* line in status area where field resides */
479
INTBIG startper, endper; /* percentage of status line used by field */
480
char *label; /* field label */
483
extern STATUSFIELD *us_statusalign; /* current node alignment */
484
extern STATUSFIELD *us_statusangle; /* current placement angle */
485
extern STATUSFIELD *us_statusarc; /* current arc prototype */
486
extern STATUSFIELD *us_statusfacet; /* current facet */
487
extern STATUSFIELD *us_statusfacetsize; /* current facet size */
488
extern STATUSFIELD *us_statusgridsize; /* current grid size */
489
extern STATUSFIELD *us_statuslambda; /* current lambda */
490
extern STATUSFIELD *us_statusnetwork; /* current network */
491
extern STATUSFIELD *us_statusnode; /* current node prototype */
492
extern STATUSFIELD *us_statustechnology; /* current technology */
493
extern STATUSFIELD *us_statusxpos; /* current x position */
494
extern STATUSFIELD *us_statusypos; /* current y position */
495
extern STATUSFIELD *us_statusproject; /* current project */
496
extern STATUSFIELD *us_statusroot; /* current root */
497
extern STATUSFIELD *us_statuspart; /* current part */
498
extern STATUSFIELD *us_statuspackage; /* current package */
499
extern STATUSFIELD *us_statusselection; /* current selection */
501
/******************** EDITOR TABLE ********************/
505
char *editorname; /* name of this editor */
506
WINDOWPART *(*makeeditor)(WINDOWPART*, char*, INTBIG*, INTBIG*);/* create new editor in window */
507
void (*terminate)(EDITOR*); /* terminate editor */
508
INTBIG (*totallines)(WINDOWPART*); /* report number of lines in editor buffer */
509
char *(*getline)(WINDOWPART*, INTBIG); /* get line from editor buffer */
510
void (*addline)(WINDOWPART*, INTBIG, char*); /* add line to editor buffer */
511
void (*replaceline)(WINDOWPART*, INTBIG, char*); /* replace line in editor */
512
void (*deleteline)(WINDOWPART*, INTBIG); /* delete line in editor */
513
void (*highlightline)(WINDOWPART*, INTBIG, INTBIG); /* highlight line in editor */
514
void (*suspendgraphics)(WINDOWPART*); /* suspend display changes in editor */
515
void (*resumegraphics)(WINDOWPART*); /* resume display changes in editor */
516
void (*writetextfile)(WINDOWPART*, char*); /* write editer buffer to file */
517
void (*readtextfile)(WINDOWPART*, char*); /* read file into editor */
518
void (*editorterm)(WINDOWPART*); /* editor termination routine */
519
void (*shipchanges)(WINDOWPART*); /* routine to force any changes out */
520
BOOLEAN (*gotchar)(WINDOWPART*, INTSML, INTBIG); /* character input routine */
521
void (*cut)(WINDOWPART*); /* text cut routine */
522
void (*copy)(WINDOWPART*); /* text copy routine */
523
void (*paste)(WINDOWPART*); /* text paste routine */
524
void (*undo)(WINDOWPART*); /* text undo routine */
525
void (*search)(WINDOWPART*, char*, char*, INTBIG); /* text search/replace routine */
526
void (*pan)(WINDOWPART*, INTBIG, INTBIG); /* pan window in direction */
529
extern EDITORTABLE us_editortable[];
530
extern INTBIG us_currenteditor;
532
/******************** PARSING MODULES ********************/
534
/* the main command table (with additional information) */
537
char *name; /* name of this command */
538
void (*routine)(INTBIG, char*[]); /* routine to execute this command */
539
INTBIG params; /* number of parameters to command */
540
COMCOMP *par[TEMPLATEPARS]; /* parameter types */
543
/* defined in "usercom.c" */
544
extern struct commandinfo us_lcommand[];
546
#define MAXKEYWORD 100 /* maximum keywords on input */
548
extern KEYWORD *us_pathiskey; /* the current keyword list */
550
/******************** PROTOTYPES ********************/
552
/* prototypes for tool interface */
553
void us_init(INTBIG*, char*[], TOOL*);
555
void us_set(INTBIG, char*[]);
556
INTBIG us_request(char*, va_list);
557
void us_examinenodeproto(NODEPROTO*);
559
void us_startbatch(TOOL*, BOOLEAN);
560
void us_endbatch(void);
561
void us_startobjectchange(INTBIG, INTBIG);
562
void us_endobjectchange(INTBIG, INTBIG);
563
void us_modifynodeinst(NODEINST*,INTBIG,INTBIG,INTBIG,INTBIG,INTBIG,INTBIG);
564
void us_modifynodeproto(NODEPROTO*);
565
void us_modifydescript(INTBIG, INTBIG, INTBIG, UINTBIG*);
566
void us_newobject(INTBIG, INTBIG);
567
void us_killobject(INTBIG, INTBIG);
568
void us_newvariable(INTBIG, INTBIG, INTBIG, INTBIG);
569
void us_killvariable(INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, UINTBIG*);
570
void us_modifyvariable(INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG);
571
void us_readlibrary(LIBRARY*);
572
void us_eraselibrary(LIBRARY*);
573
void us_writelibrary(LIBRARY*, BOOLEAN);
575
/* prototypes for user commands */
576
void us_arc(INTBIG, char*[]);
577
void us_array(INTBIG, char*[]);
578
void us_bind(INTBIG, char*[]);
579
void us_color(INTBIG, char*[]);
580
void us_commandfile(INTBIG, char*[]);
581
void us_constraint(INTBIG, char*[]);
582
void us_copyfacet(INTBIG, char*[]);
583
void us_create(INTBIG, char*[]);
584
void us_debug(INTBIG, char*[]);
585
void us_defarc(INTBIG, char*[]);
586
void us_defnode(INTBIG, char*[]);
587
void us_duplicate(INTBIG, char*[]);
588
void us_echo(INTBIG, char*[]);
589
void us_editfacet(INTBIG, char*[]);
590
void us_erase(INTBIG, char*[]);
591
void us_find(INTBIG, char*[]);
592
void us_getproto(INTBIG, char*[]);
593
void us_grid(INTBIG, char*[]);
594
void us_help(INTBIG, char*[]);
595
void us_if(INTBIG, char*[]);
596
void us_interpret(INTBIG, char*[]);
597
void us_iterate(INTBIG, char*[]);
598
void us_killfacet(INTBIG, char*[]);
599
void us_lambda(INTBIG, char*[]);
600
void us_library(INTBIG, char*[]);
601
void us_macbegin(INTBIG, char*[]);
602
void us_macdone(INTBIG, char*[]);
603
void us_macend(INTBIG, char*[]);
604
void us_menu(INTBIG, char*[]);
605
void us_mirror(INTBIG, char*[]);
606
void us_move(INTBIG, char*[]);
607
void us_node(INTBIG, char*[]);
608
void us_offtool(INTBIG, char*[]);
609
void us_ontool(INTBIG, char*[]);
610
void us_outhier(INTBIG, char*[]);
611
void us_package(INTBIG, char*[]);
612
void us_port(INTBIG, char*[]);
613
void us_quit(INTBIG, char*[]);
614
void us_redraw(INTBIG, char*[]);
615
void us_rename(INTBIG, char*[]);
616
void us_replace(INTBIG, char*[]);
617
void us_rotate(INTBIG, char*[]);
618
void us_show(INTBIG, char*[]);
619
void us_size(INTBIG, char*[]);
620
void us_spread(INTBIG, char*[]);
621
void us_system(INTBIG, char*[]);
622
void us_technology(INTBIG, char*[]);
623
void us_telltool(INTBIG, char*[]);
624
void us_terminal(INTBIG, char*[]);
625
void us_text(INTBIG, char*[]);
626
void us_undo(INTBIG, char*[]);
627
void us_var(INTBIG, char*[]);
628
void us_view(INTBIG, char*[]);
629
void us_visiblelayers(INTBIG, char*[]);
630
void us_window(INTBIG, char*[]);
631
void us_yanknode(INTBIG, char*[]);
633
/* prototypes for text editing */
634
void us_describeeditor(char**);
635
WINDOWPART *us_makeeditor(WINDOWPART*, char*, INTBIG*, INTBIG*);
636
INTBIG us_totallines(WINDOWPART*);
637
char *us_getline(WINDOWPART*, INTBIG);
638
void us_addline(WINDOWPART*, INTBIG, char*);
639
void us_replaceline(WINDOWPART*, INTBIG, char*);
640
void us_deleteline(WINDOWPART*, INTBIG);
641
void us_highlightline(WINDOWPART*, INTBIG, INTBIG);
642
void us_suspendgraphics(WINDOWPART*);
643
void us_resumegraphics(WINDOWPART*);
644
void us_writetextfile(WINDOWPART*, char*);
645
void us_readtextfile(WINDOWPART*, char*);
646
void us_editorterm(WINDOWPART*);
647
void us_shipchanges(WINDOWPART*);
648
BOOLEAN us_gotchar(WINDOWPART*, INTSML, INTBIG);
649
void us_cuttext(WINDOWPART*);
650
void us_copytext(WINDOWPART*);
651
void us_pastetext(WINDOWPART*);
652
void us_undotext(WINDOWPART*);
653
void us_searchtext(WINDOWPART*, char*, char*, INTBIG);
654
void us_pantext(WINDOWPART*, INTBIG, INTBIG);
656
/* prototypes for intratool interface */
657
void us_3dbuttonhandler(WINDOWPART *w, INTBIG but, INTBIG x, INTBIG y);
658
void us_3denddrawing(void);
659
void us_3dfillview(WINDOWPART *win);
660
void us_3dpanview(WINDOWPART *win, INTBIG x, INTBIG y);
661
void us_3dsetinteraction(INTBIG interaction);
662
void us_3dsetupviewing(WINDOWPART*);
663
void us_3dshowpoly(POLYGON*, WINDOWPART*);
664
void us_3dstartdrawing(WINDOWPART*);
665
void us_3dzoomview(WINDOWPART *win, float z);
666
void us_abortcommand(char*, ...);
667
void us_abortedmsg(void);
668
void us_addfacetcenter(NODEINST *ni);
669
void us_addhighlight(HIGHLIGHT*);
670
void us_addparameter(NODEINST *ni, INTBIG key, INTBIG addr, INTBIG type, UINTBIG *descript);
671
void us_addpossiblearcconnections(void);
672
void us_adjustdisplayabletext(NODEINST*);
673
void us_adjustperpendicularsnappoints(HIGHLIGHT*, HIGHLIGHT*);
674
void us_adjustquickkeys(VARIABLE *var, BOOLEAN warnofchanges);
675
void us_adjusttangentsnappoints(HIGHLIGHT*, HIGHLIGHT*);
676
INTBIG us_alignvalue(INTBIG, INTBIG, INTBIG*);
677
EDITOR *us_alloceditor(void);
678
USERCOM *us_allocusercom(void);
679
BOOLEAN us_appendargs(USERCOM*);
680
void us_arrayfromfile(char *file);
681
void us_beginchanges(void);
682
char *us_bettervariablename(char *name);
683
INTBIG us_bottomrecurse(NODEINST*, PORTPROTO*);
684
USERCOM *us_buildcommand(INTBIG, char*[]);
685
void us_buildquickkeylist(void);
686
void us_buildtexthighpoly(INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, POLYGON*);
687
void us_buttonhandler(WINDOWPART*, INTBIG, INTBIG, INTBIG);
688
BOOLEAN us_cantedit(NODEPROTO*, NODEPROTO*, BOOLEAN);
689
BOOLEAN us_charhandler(WINDOWPART*, INTSML, INTBIG);
690
void us_chatportproto(NODEINST*, PORTPROTO*);
691
void us_check_facet_date(NODEPROTO*, UINTBIG);
692
void us_checkdatabase(BOOLEAN);
693
void us_cleanupfacet(NODEPROTO*, BOOLEAN);
694
void us_clearhighlightcount(void);
695
void us_clearwindow(WINDOWPART*);
696
char *us_commandvarname(INTSML);
697
void us_computearcfartextbit(ARCINST *ai);
698
void us_computenodefartextbit(NODEINST *ni);
699
UINTBIG us_computewipestate(NODEINST *ni);
700
NODEPROTO *us_convertfacet(NODEPROTO*, TECHNOLOGY*);
701
char *us_convertmactoworld(char *buf);
702
char *us_convertworldtomac(char *buf);
703
void us_copylisttofacet(GEOM**, NODEPROTO*, NODEPROTO*, BOOLEAN, BOOLEAN);
704
void us_copyobjects(WINDOWPART*);
705
NODEPROTO *us_copyrecursively(NODEPROTO*, char*, LIBRARY*, VIEW*, BOOLEAN, BOOLEAN, char*, BOOLEAN, BOOLEAN);
706
BOOLEAN us_copyvars(INTBIG fromaddr, INTBIG fromtype, INTBIG toaddr, INTBIG totype);
707
void us_coverimplant(void);
708
void us_createexplorerstruct(void);
709
void us_createqueuedexports(void);
710
NODEPROTO *us_currentexplorernode(void);
711
BOOLEAN us_cursoroverhigh(HIGHLIGHT*, INTBIG, INTBIG, WINDOWPART*);
712
INTBIG us_curvearcaboutpoint(ARCINST *ai, INTBIG xcur, INTBIG ycur);
713
INTBIG us_curvearcthroughpoint(ARCINST *ai, INTBIG xcur, INTBIG ycur);
714
void us_cutobjects(WINDOWPART*);
715
void us_delfacetmessage(NODEPROTO*);
716
void us_delhighlight(HIGHLIGHT*);
717
void us_delnodeprotocenter(NODEPROTO*);
718
BOOLEAN us_demandxy(INTBIG*, INTBIG*);
719
char *us_describeboundkey(INTSML key, INTBIG special, INTBIG readable);
720
void us_describecontents(NODEPROTO*);
721
char *us_describefont(INTBIG);
722
char *us_describemenunode(COMMANDBINDING *commandbinding);
723
char *us_describenodeinsttype(NODEPROTO *np, INTBIG bits);
724
char *us_describestyle(INTBIG);
725
char *us_describetextdescript(UINTBIG*);
726
void us_dialogeditor(void);
727
char *us_displayedportname(PORTPROTO *pp, INTBIG dispstyle);
728
void us_docommands(FILE*, BOOLEAN, char*);
729
void us_doexpand(NODEINST*, INTBIG, INTBIG);
730
void us_dofillet(void);
731
void us_dokillfacet(NODEPROTO *np);
732
void us_dopeek(INTBIG, INTBIG, INTBIG, INTBIG, NODEPROTO*, WINDOWPART*);
733
void us_doubchanges(void);
734
void us_dounexpand(NODEINST*);
735
INTBIG us_drawarcinst(ARCINST*, INTBIG, XARRAY, INTBIG, WINDOWPART*);
736
void us_drawdispwindowsliders(WINDOWPART *w);
737
INTBIG us_drawfacet(NODEINST*, INTBIG, XARRAY, INTBIG, WINDOWPART*);
738
void us_drawfacetvariable(VARIABLE *var, NODEPROTO *np);
739
void us_drawhorizontalslider(WINDOWPART*, INTBIG, INTBIG, INTBIG);
740
void us_drawhorizontalsliderthumb(WINDOWPART*, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG);
741
void us_drawmenu(INTBIG, WINDOWFRAME*);
742
void us_drawmenuentry(INTBIG, INTBIG, char*);
743
INTBIG us_drawnodeinst(NODEINST*, INTBIG, XARRAY, INTBIG, WINDOWPART*);
744
void us_drawnodeprotovariables(NODEPROTO *np, XARRAY trans, WINDOWPART *w, BOOLEAN ignoreinherit);
745
void us_drawportprotovariables(PORTPROTO *pp, INTBIG on, XARRAY trans, WINDOWPART *w, BOOLEAN ignoreinherit);
746
void us_drawslidercorner(WINDOWPART *win, INTBIG lx, INTBIG hx, INTBIG ly, INTBIG hy);
747
void us_drawverticalslider(WINDOWPART*, INTBIG, INTBIG, INTBIG, BOOLEAN);
748
void us_drawverticalsliderthumb(WINDOWPART*, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG);
749
void us_drawwindow(WINDOWPART*, INTBIG);
750
void us_dumppulldownmenus(void);
751
void us_editvariabletext(VARIABLE*, INTBIG, INTBIG, char*);
752
void us_endchanges(WINDOWPART*);
753
void us_ensurepropertechnology(NODEPROTO *facet, char *forcedtechnology, BOOLEAN always);
754
void us_ensurewindow(NODEPROTO*);
755
void us_erasegeometry(NODEPROTO*);
756
void us_erasenodeinst(NODEINST*);
757
void us_eraseobjectsinlist(NODEPROTO *np, GEOM **list);
758
INTBIG us_erasepassthru(NODEINST*, BOOLEAN, ARCINST**);
759
void us_erasescreen(WINDOWFRAME*);
760
void us_erasewindow(WINDOWPART*);
761
BOOLEAN us_evaluatevariable(char*, INTBIG*, INTBIG*, char**);
762
void us_execute(USERCOM*, BOOLEAN, BOOLEAN, BOOLEAN);
763
BOOLEAN us_expandaddrtypearray(INTBIG*, INTBIG**, INTBIG**, INTBIG);
764
void us_explorebuttonhandler(WINDOWPART*, INTBIG, INTBIG, INTBIG);
765
BOOLEAN us_explorecharhandler(WINDOWPART*, INTSML, INTBIG);
766
void us_explorepan(WINDOWPART*, INTBIG);
767
void us_exploreredisphandler(WINDOWPART*);
768
int us_exportnameindexascending(const void *e1, const void *e2);
769
int us_exportnametypeascending(const void *e1, const void *e2);
770
BOOLEAN us_facetedithandler(WINDOWPART*, INTSML, INTBIG);
771
BOOLEAN us_facetfromtech(NODEPROTO *facet, TECHNOLOGY *tech);
772
BOOLEAN us_figuredrawpath(GEOM *fromgeom, PORTPROTO *fromport, GEOM *togeom, PORTPROTO *toport,
773
INTBIG *xcur, INTBIG *ycur);
774
void us_figuregrabpoint(UINTBIG*, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG);
775
void us_figuretechopaque(TECHNOLOGY*);
776
void us_figuretechselectability(void);
777
void us_figurevariableplace(UINTBIG*, INTBIG, char*[]);
778
INTBIG us_fillcomcomp(USERCOM*, COMCOMP*[]);
779
INTBIG us_findboundkey(INTSML key, INTBIG special, char **binding);
780
void us_findlowerport(NODEINST**, PORTPROTO**);
781
void us_findobject(INTBIG, INTBIG, WINDOWPART*, HIGHLIGHT*, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG);
782
void us_forceeditchanges(void);
783
void us_freebindingparse(COMMANDBINDING *commandbinding);
784
void us_freecomekmemory(void);
785
void us_freecomtvmemory(void);
786
void us_freediacommemory(void);
787
void us_freeedemacsmemory(void);
788
void us_freeeditor(EDITOR*);
789
void us_freeedpacmemory(void);
790
void us_freeedtecpmemory(void);
791
void us_freehighmemory(void);
792
void us_freemiscmemory(void);
793
void us_freenetmemory(void);
794
void us_freeparsememory(void);
795
void us_freewindowmemory(void);
796
void us_freestatusmemory(void);
797
void us_freetranslatememory(void);
798
void us_freeusercom(USERCOM*);
799
void us_fullview(NODEPROTO*, INTBIG*, INTBIG*, INTBIG*, INTBIG*);
800
BOOLEAN us_geominrect(GEOM *geom, INTBIG slx, INTBIG shx, INTBIG sly, INTBIG shy);
801
INTBIG *us_getallhighlighted(void);
802
void us_getarcbounds(ARCINST *ai, INTBIG *nlx, INTBIG *nhx, INTBIG *nly, INTBIG *nhy);
803
NODEPROTO *us_getareabounds(INTBIG*, INTBIG*, INTBIG*, INTBIG*);
804
char *us_getboundkey(char *binding, INTSML *boundkey, INTBIG *boundspecial);
805
GEOM *us_getclosest(INTBIG, INTBIG, INTBIG, NODEPROTO*);
806
void us_getcolormap(TECHNOLOGY*, INTBIG, BOOLEAN);
807
INTBIG us_getcolormapentry(char*, BOOLEAN);
808
COMCOMP *us_getcomcompfromkeyword(char *keyword);
809
void us_gethighaddrtype(HIGHLIGHT *high, INTBIG *addr, INTBIG *type);
810
void us_gethighdescript(HIGHLIGHT *high, UINTBIG *descript);
811
GEOM **us_gethighlighted(INTBIG type, INTBIG *textcount, char ***textinfo);
812
char *us_gethighstring(HIGHLIGHT *high);
813
void us_gethightextcenter(HIGHLIGHT *high, INTBIG*, INTBIG*, INTBIG*);
814
void us_gethightextsize(HIGHLIGHT *high, INTBIG *xw, INTBIG *yw, WINDOWPART *w);
815
void us_getlenwidoffset(NODEINST *ni, UINTBIG *descript, INTBIG *xoff, INTBIG *yoff);
816
void us_getlowleft(NODEINST*, INTBIG*, INTBIG*);
817
VARIABLE *us_getmacro(char*);
818
MACROPACK *us_getmacropack(char*);
819
void us_getnewparameterpos(INTBIG addr, INTBIG type, INTBIG *xoff, INTBIG *yoff);
820
void us_getnodebounds(NODEINST *ni, INTBIG *nlx, INTBIG *nhx, INTBIG *nly, INTBIG *nhy);
821
void us_getnodedisplayposition(NODEINST *ni, INTBIG *xpos, INTBIG *ypos);
822
NODEINST *us_getnodeonarcinst(GEOM**, PORTPROTO**, GEOM*, PORTPROTO*, INTBIG, INTBIG, INTBIG);
823
UINTBIG us_getobject(INTBIG, BOOLEAN);
824
TECHNOLOGY *us_getobjectinfo(INTBIG addr, INTBIG type, INTBIG *lx, INTBIG *hx, INTBIG *ly, INTBIG *hy);
825
HIGHLIGHT *us_getonehighlight(void);
826
BOOLEAN us_getonesnappoint(INTBIG *x, INTBIG *y);
827
INTBIG us_getplacementangle(NODEPROTO *np);
828
POPUPMENU *us_getpopupmenu(char*);
829
void us_getquickkeylist(INTBIG *quickkeycount, char ***quickkeylist);
830
void us_getslide(INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG*, INTBIG*);
831
void us_getsnappoint(HIGHLIGHT*, INTBIG*, INTBIG*);
832
INTBIG us_gettextposition(char*);
833
void us_gettextscreensize(char *str, UINTBIG *descript, WINDOWPART *w,
834
TECHNOLOGY *tech, GEOM *geom, INTBIG *xw, INTBIG *yw);
835
INTBIG us_gettextsize(char*, INTBIG);
836
void us_gettruewindowbounds(WINDOWPART *w, INTBIG *lx, INTBIG *hx, INTBIG *ly, INTBIG *hy);
837
BOOLEAN us_gettwoobjects(GEOM**, PORTPROTO**, GEOM**, PORTPROTO**);
838
BOOLEAN us_getvar(char*, INTBIG*, INTBIG*, char**, BOOLEAN*, INTBIG*);
839
void us_graphfacets(NODEPROTO *top);
840
void us_gridset(WINDOWPART*, INTBIG);
841
BOOLEAN us_hasotherwindowpart(INTBIG x, INTBIG y, WINDOWPART *ow);
842
void us_highlighteverywhere(GEOM*, PORTPROTO*, INTBIG, BOOLEAN, INTBIG, BOOLEAN);
843
void us_highlightmenu(INTBIG, INTBIG, INTBIG);
844
void us_highlightwindow(WINDOWPART*, BOOLEAN);
845
TECHNOLOGY *us_hightech(HIGHLIGHT *high);
846
void us_hsvtorgb(float, float, float, INTBIG*, INTBIG*, INTBIG*);
847
void us_identifyports(INTBIG, NODEINST**, NODEPROTO*, INTBIG, BOOLEAN);
848
void us_illustratecommandset(void);
849
void us_inheritattributes(NODEINST *ni);
850
BOOLEAN us_initialbinding(void);
851
void us_initlayerletters(void);
852
void us_initpulldownmenu(POPUPMENU*);
853
void us_initqueuedexports(void);
854
void us_initsearchcircuittext(WINDOWPART *win);
855
void us_initstatus(void);
856
char *us_invisiblepintextname(VARIABLE *var);
857
BOOLEAN us_islasteval(INTSML, INTBIG);
858
void us_killcurrentwindow(BOOLEAN);
859
void us_killwindowpickanother(WINDOWPART*);
860
char *us_layerletters(TECHNOLOGY*, INTBIG);
861
void us_layouttext(char *layer, INTBIG tsize, INTBIG scale, INTBIG font,
862
INTBIG italic, INTBIG bold, INTBIG underline, INTBIG separation, char *msg);
863
int us_librarytemp1ascending(const void *e1, const void *e2);
864
INTBIG us_makearcuserbits(ARCPROTO*);
865
USERCOM *us_makecommand(char*);
866
ARCINST *us_makeconnection(NODEINST*, PORTPROTO*, ARCPROTO*, NODEINST*, PORTPROTO*,
867
ARCPROTO*, NODEPROTO*, INTBIG, INTBIG,
868
ARCINST**, ARCINST**, NODEINST**, NODEINST**,
869
INTBIG, BOOLEAN, INTBIG*);
870
char *us_makefacetline(NODEPROTO*, INTBIG);
871
BOOLEAN us_makehighlight(char*, HIGHLIGHT*);
872
char *us_makehighlightstring(HIGHLIGHT*);
873
NODEPROTO *us_makeiconfacet(PORTPROTO*, char*, char*, LIBRARY*);
874
void us_makenewportproto(NODEPROTO*, NODEINST*, PORTPROTO*, char*, INTBIG, INTBIG, UINTBIG*);
875
BOOLEAN us_makescreen(INTBIG*, INTBIG*, INTBIG*, INTBIG*, WINDOWPART*);
876
void us_maketextpoly(char*, WINDOWPART*, INTBIG, INTBIG, NODEINST*, TECHNOLOGY*, UINTBIG*, POLYGON*);
877
void us_manymove(GEOM**, NODEINST**, INTBIG, INTBIG, INTBIG);
878
INTBIG us_modarcbits(INTBIG, BOOLEAN, char*, GEOM**);
879
void us_modifytextdescript(HIGHLIGHT*, UINTBIG*);
880
void us_moveselectedtext(INTBIG numtexts, char **textlist, INTBIG odx, INTBIG ody);
881
NODEPROTO *us_needfacet(void);
882
BOOLEAN us_needwindow(void);
883
void us_nettravel(NODEINST*, INTBIG);
884
MACROPACK *us_newmacropack(char*);
885
NODEPROTO *us_newnodeproto(char *name, LIBRARY *lib);
886
char *us_nextvars(void);
887
BOOLEAN us_nodemoveswithtext(HIGHLIGHT *high);
888
NODEPROTO *us_nodetocreate(BOOLEAN getcontents, NODEPROTO *facet);
889
void us_nulldisplayroutine(POLYGON*, WINDOWPART*);
890
void us_parsebinding(char*, COMMANDBINDING*);
891
INTBIG us_parsecommand(char*, char*[]);
892
void us_pasteobjects(WINDOWPART*);
893
NODEINST *us_pickhigherinstance(NODEPROTO *inp);
894
void us_pophighlight(BOOLEAN);
895
POPUPMENUITEM *us_popupmenu(POPUPMENU**, BOOLEAN*, BOOLEAN, INTBIG, INTBIG, INTBIG);
896
PORTPROTO *us_portdetails(PORTPROTO*, INTBIG, char*[], NODEINST*, INTBIG*, INTBIG*, BOOLEAN, char*);
897
void us_portposition(NODEINST *ni, PORTPROTO *pp, INTBIG *x, INTBIG *y);
898
void us_portsynchronize(LIBRARY*);
899
BOOLEAN us_preventloss(LIBRARY*, INTBIG, BOOLEAN);
900
void us_printarctoolinfo(ARCINST*);
901
void us_printcolorvalue(INTBIG);
902
void us_printmacro(VARIABLE*);
903
void us_printmacros(void);
904
void us_printnodetoolinfo(NODEINST*);
905
void us_printtechnology(TECHNOLOGY*);
906
void us_pushhighlight(void);
907
char *us_putintoinfstr(char *str);
908
BOOLEAN us_queuenewexport(NODEINST *ni, PORTPROTO *pp, PORTPROTO *origpp);
909
void us_queueopaque(GEOM*, BOOLEAN);
910
void us_queueredraw(GEOM*, BOOLEAN);
911
void us_redisplay(WINDOWPART*);
912
void us_redisplaynow(WINDOWPART*, BOOLEAN);
913
void us_redoexplorerwindow(void);
914
void us_redostatus(WINDOWFRAME*);
915
BOOLEAN us_reexportport(PORTPROTO*, NODEINST*);
916
void us_regridfacet(void);
917
char *us_removeampersand(char *name);
918
void us_removeubchange(NODEPROTO*);
919
void us_renameport(PORTPROTO*, char*);
920
void us_replaceallarcs(GEOM **list, ARCPROTO *ap, BOOLEAN connected, BOOLEAN thisfacet);
921
void us_replacecircuittext(WINDOWPART *win, char *replace);
922
void us_replacelibraryreferences(LIBRARY *oldlib, LIBRARY *newlib);
923
NODEINST *us_replacenodeinst(NODEINST *oldni, NODEPROTO *newnp, BOOLEAN ignoreportnames, BOOLEAN allowdeletedports);
924
void us_rgbtohsv(INTBIG, INTBIG, INTBIG, float*, float*, float*);
925
void us_rotatedescript(GEOM*, UINTBIG*);
926
void us_rotatedescriptI(GEOM*, UINTBIG*);
927
ARCINST *us_runarcinst(NODEINST*, PORTPROTO*, INTBIG, INTBIG, NODEINST*, PORTPROTO*, INTBIG, INTBIG, ARCPROTO*, INTBIG);
928
BOOLEAN us_samecontents(NODEPROTO *np1, NODEPROTO *np2, INTBIG explain);
929
BOOLEAN us_samekey(INTSML key1, INTBIG special1, INTSML key2, INTBIG special2);
930
BOOLEAN us_saveoptdlog(void);
931
void us_saveoptions(void);
932
void us_scaletowindow(INTBIG*, INTBIG*, WINDOWPART*);
933
void us_scaletraceinfo(NODEINST*, INTBIG, INTBIG, INTBIG, INTBIG);
934
void us_scanforkeyequiv(POPUPMENU*);
935
void us_searchcircuittext(WINDOWPART *win, char *search, char *replaceall, INTBIG bits);
936
INTBIG us_selectarea(NODEPROTO *np, INTBIG slx, INTBIG shx, INTBIG sly, INTBIG shy,
937
INTBIG special, INTBIG selport, INTBIG nobbox, char ***highlist);
938
void us_selectsnap(HIGHLIGHT*, INTBIG, INTBIG);
939
void us_settool(INTBIG, char*[], INTBIG);
940
void us_setalignment(WINDOWFRAME*);
941
void us_setarcname(ARCINST*, char*);
942
void us_setarcproto(ARCPROTO*, BOOLEAN);
943
void us_setcolorentry(INTBIG, INTBIG, INTBIG, INTBIG, INTBIG, BOOLEAN);
944
void us_setcursorpos(WINDOWFRAME*, INTBIG, INTBIG);
945
void us_setdescriptoffset(UINTBIG*, INTBIG, INTBIG);
946
void us_setfacetname(WINDOWPART*);
947
void us_setfacetsize(WINDOWPART*);
948
void us_setfind(HIGHLIGHT*, INTBIG, INTBIG, INTBIG, INTBIG);
949
void us_setgridsize(WINDOWPART*);
950
void us_sethighlight(HIGHLIGHT*, INTBIG);
951
void us_setkeybinding(char *binding, INTSML key, INTBIG special, BOOLEAN quietly);
952
void us_setkeyequiv(POPUPMENU*, INTBIG);
953
void us_setlambda(WINDOWFRAME*);
954
void us_setmenunodearcs(void);
955
void us_setmenusize(INTBIG, INTBIG, INTBIG, BOOLEAN);
956
void us_setmultiplehighlight(char*, BOOLEAN);
957
void us_setnodeangle(WINDOWFRAME*);
958
void us_setnodeproto(NODEPROTO*);
959
void us_setnodeprotocenter(INTBIG, INTBIG, NODEPROTO*);
960
NODEPROTO *us_setscrolltocurrentfacet(INTBIG scrollitem, BOOLEAN curinstance,
961
BOOLEAN forcecurlib, BOOLEAN justcells);
962
void us_settechname(WINDOWFRAME*);
963
void us_settrace(NODEINST*, INTBIG*, INTBIG);
964
INTBIG us_setunexpand(NODEINST*, INTBIG);
965
void us_setvariablevalue(NODEINST *ni, INTBIG key, char *newvalue, INTBIG oldtype, UINTBIG *descript);
966
void us_setwindowsimulation(WINDOWPART*, BOOLEAN);
967
BOOLEAN us_setxy(INTBIG, INTBIG);
968
void us_shadowarcproto(WINDOWFRAME*, ARCPROTO*);
969
void us_shadownodeproto(WINDOWFRAME*, NODEPROTO*);
970
void us_showallhighlight(void);
971
void us_showcurrentarcproto(void);
972
void us_showcurrentnodeproto(void);
973
void us_shownetworkname(WINDOWFRAME*);
974
void us_showpoly(POLYGON*, WINDOWPART*);
975
NODEPROTO *us_skeletonize(NODEPROTO *np, char *newname, LIBRARY *newlib, BOOLEAN quiet);
976
void us_slideleft(INTBIG);
977
void us_slideup(INTBIG);
978
int us_sortarcsbyname(const void *e1, const void *e2);
979
NODEPROTO **us_sortlib(LIBRARY*, char*, BOOLEAN);
980
int us_sortnodesbyname(const void *e1, const void *e2);
981
int us_sortpopupmenuascending(const void *e1, const void *e2);
982
WINDOWPART *us_splitcurrentwindow(INTBIG, BOOLEAN, WINDOWPART**);
983
INTBIG us_spreadaround(NODEINST *ni, INTBIG amount, char *direction);
984
void us_spreadrotateconnection(NODEINST *theni);
985
void us_squarescreen(WINDOWPART*, WINDOWPART*, BOOLEAN, INTBIG*, INTBIG*, INTBIG*, INTBIG*, INTBIG);
986
INTBIG us_stretchtonodes(ARCPROTO *typ, INTBIG wid, NODEINST *ni1, PORTPROTO *pp1, INTBIG otherx, INTBIG othery);
987
char *us_stripampersand(char*);
988
WINDOWPART *us_subwindow(INTBIG, INTBIG, INTBIG, INTBIG, WINDOWPART*);
989
void us_switchtofacet(NODEPROTO*, INTBIG, INTBIG, INTBIG, INTBIG, NODEINST*, PORTPROTO*, BOOLEAN, INTBIG);
990
void us_switchtolibrary(LIBRARY*);
991
void us_tecedaddfunstring(INTBIG);
992
void us_tecedentry(INTBIG, char*[]);
993
INTBIG us_tecedgetoption(NODEINST*);
994
char *us_techname(NODEPROTO *np);
995
char *us_tempoptionslibraryname(void);
996
void us_termpulldownmenu(POPUPMENU*);
997
void us_textfacetchanges(WINDOWPART*, INTBIG, char*, char*, INTBIG);
998
BOOLEAN us_topofallthings(char**);
999
BOOLEAN us_topofarcnodes(char**);
1000
BOOLEAN us_topofcellfacets(char**);
1001
BOOLEAN us_topofcommands(char**);
1002
BOOLEAN us_topofconstraints(char**);
1003
BOOLEAN us_topofcports(char**);
1004
BOOLEAN us_topofedtecarc(char**);
1005
BOOLEAN us_topofedteclay(char**);
1006
BOOLEAN us_topofedtecnode(char**);
1007
BOOLEAN us_topofexpports(char**);
1008
BOOLEAN us_topofhighlight(char**);
1009
BOOLEAN us_topoflayers(char**);
1010
BOOLEAN us_topofmacros(char**);
1011
BOOLEAN us_topofmbuttons(char**);
1012
BOOLEAN us_topofnodes(char**);
1013
BOOLEAN us_topofpopupmenu(char**);
1014
BOOLEAN us_topofports(char**);
1015
BOOLEAN us_topofprims(char**);
1016
BOOLEAN us_topofvars(char**);
1017
BOOLEAN us_topofwindows(char**);
1018
void us_translationdlog(void);
1019
char *us_trueattributename(VARIABLE *var);
1020
void us_undisplayobject(GEOM*);
1021
void us_undoportproto(NODEINST*, PORTPROTO*);
1022
void us_undrawfacetvariable(VARIABLE *var, NODEPROTO *np);
1023
char *us_uniqueobjectname(char *name, NODEPROTO *facet, INTBIG type, void *exclude);
1024
char *us_uniqueportname(char*, NODEPROTO*);
1025
void us_unknowncommand(void);
1026
void us_unqueueredraw(LIBRARY *lib);
1027
void us_validatemenu(POPUPMENU *pm);
1028
BOOLEAN us_validname(char *name, INTBIG type);
1029
void us_varchanges(WINDOWPART*, INTBIG, char*, char*, INTBIG);
1030
char *us_variableattributes(VARIABLE*, INTBIG);
1031
char *us_variabletypename(INTBIG);
1032
INTBIG us_variabletypevalue(char*);
1033
WINDOWPART *us_wantnewwindow(INTBIG orientation);
1034
void us_wanttodraw(INTBIG, INTBIG, INTBIG, INTBIG, WINDOWPART*, GRAPHICS*, INTBIG);
1035
void us_wanttoread(char*);
1036
INTBIG us_widestarcinst(ARCPROTO*, NODEINST*, PORTPROTO*);
1037
BOOLEAN us_windowcansplit(WINDOWPART*, WINDOWPART*, WINDOWPART*);
1038
void us_windowfit(WINDOWFRAME*, BOOLEAN, INTBIG);
1039
void us_writeprotoname(PORTPROTO*, INTBIG, XARRAY, INTBIG, INTBIG, WINDOWPART*, INTBIG, INTBIG, INTBIG, INTBIG, INTBIG);
1040
void us_yankonenode(NODEINST*);
1042
/* terminal interface */
1043
void us_ttyprint(BOOLEAN, char*, va_list);
1045
/* the status bar */
1046
STATUSFIELD *ttydeclarestatusfield(INTBIG line, INTBIG startper, INTBIG endper, char *label);
1047
void ttyfreestatusfield(STATUSFIELD *field);
1048
void ttysetstatusfield(WINDOWFRAME *frame, STATUSFIELD *field, char *message, BOOLEAN cancrop);
1049
INTBIG ttynumstatuslines(void);
1051
/* popup and pulldown menus */
1052
BOOLEAN nativemenuload(INTBIG, char*[]);
1053
void nativemenurename(POPUPMENU*, INTBIG);
1054
INTBIG nativepopupmenu(POPUPMENU **menu, BOOLEAN header, INTBIG left, INTBIG top);
1056
#if defined(__cplusplus) && !defined(ALLCPLUSPLUS)