Jspice3
scedmacs.h
Go to the documentation of this file.
1 /***************************************************************************
2 SCED - Schematic Capture Editor
3 JSPICE3 adaptation of Spice3e2 - Copyright (c) Stephen R. Whiteley 1992
4 Copyright 1990 Regents of the University of California. All rights reserved.
5 Authors: 1981 Giles C. Billingsley (parts of KIC layout editor)
6  1992 Stephen R. Whiteley
7 ****************************************************************************/
8 
9 #include "plotdev.h"
10 
11 #define ERASE 'e'
12 #define DISPLAY 'd'
13 #define FILL 'f'
14 #define OUTLINE 'o'
15 #define ROW_COLUMN 'r'
16 #define PIXEL_COORDINATE 'p'
17 
18 #define MARK_CROSS 0
19 #define MARK_ARROW 1
20 #define MARK_GP1 2
21 #define MARK_GP2 3
22 #define MARK_GP3 4
23 #define MARK_GP4 5
24 #define MARK_GP5 6
25 #define MARK_GP6 7
26 #define MARK_GP7 8
27 #define MARK_GP8 9
28 #define MARK_NONE 0
29 #define MARK_DN 1
30 #define MARK_RT 2
31 #define MARK_UP 3
32 #define MARK_LT 4
33 
34 #ifdef MSDOS
35 #define ARROW_RT 333
36 #define ARROW_LT 331
37 #define ARROW_UP 328
38 #define ARROW_DN 336
39 #else
40 /* X assumed here */
41 #define ARROW_RT 0xff53
42 #define ARROW_LT 0xff51
43 #define ARROW_UP 0xff52
44 #define ARROW_DN 0xff54
45 #endif
46 
47 /* max intensity value used for color specs */
48 #define FBMAXINTENSITY 255
49 
50 /* from cp */
51 extern FILE* cp_in;
52 extern FILE* cp_out;
53 
54 extern GRAPH *currentgraph;
55 
56 #define gi_fntwidth (currentgraph->fontwidth)
57 #define gi_fntheight (currentgraph->fontheight)
58 #define gi_maxx (currentgraph->absolute.width-1)
59 #define gi_maxy (currentgraph->absolute.height-1)
60 #define gi_numtextrows (currentgraph->absolute.height/currentgraph->fontheight)
61 #define gi_numtextcols (currentgraph->absolute.width/currentgraph->fontwidth)
62 
63 #define Matching(string) !strcmp(Parameters.kpCommand,string)
64 
65 #define FBEraseBox(L,B,R,T) { \
66  DevSetColor(BackgroundColor); \
67  DevBox((int)(L),(int)(B),(int)(R),(int)(T)); \
68  } \
69 
70 #define FBEmptyBox(Pixel,DisplayOrErase,StyleId,L,B,R,T) { \
71  DevSetColor(Pixel); \
72  DevLine((int)(L),(int)(B),(int)(R),(int)(B)); \
73  DevLine((int)(R),(int)(B),(int)(R),(int)(T)); \
74  DevLine((int)(R),(int)(T),(int)(L),(int)(T)); \
75  DevLine((int)(L),(int)(T),(int)(L),(int)(B)); \
76  } \
77 
78 #define FBBox(Pixel,DisplayOrErase,Type,L,B,R,T) { \
79  DevSetColor(Pixel); \
80  if(Type == OUTLINE){ \
81  DevLine((int)(L),(int)(B),(int)(R),(int)(B)); \
82  DevLine((int)(R),(int)(B),(int)(R),(int)(T)); \
83  DevLine((int)(R),(int)(T),(int)(L),(int)(T)); \
84  DevLine((int)(L),(int)(T),(int)(L),(int)(B)); \
85  } \
86  else { \
87  DevBox((int)(L),(int)(B),(int)(R),(int)(T)); \
88  } \
89  }
90 
91 #ifdef __STDC__
92 extern void RedisplaySCED(GRAPH*);
93 extern void ResizeSCED(GRAPH*);
94 #else
95 extern void RedisplaySCED();
96 extern void ResizeSCED();
97 #endif
FILE * cp_in
Definition: help.c:101
FILE * cp_out
Definition: help.c:101
Definition: ftegraph.h:29
void RedisplaySCED()
GRAPH * currentgraph
Definition: graphdb.c:21
void ResizeSCED()