14 OptionExtendModifier
= 3
31 #define thePort qd.thePort
32 #define arrow qd.arrow
34 #define RETURNCHAR '\r'
37 #define RETURNCHAR '\n'
40 #define RETURNCHAR '\r'
41 #endif /* __MWERKS__ */
52 int left
, right
, width
, height
;
55 #endif /* MACINTOSH */
58 #define IVIEW_WINDOW WindowPtr
59 #define IVIEW_MENU MenuHandle
61 #define InitialTop (20 + GetMBarHeight())
62 #define InitialLeft 10
63 #define MOUSE_TOLERANCE 0
66 # define black qd.black
67 # define thePort qd.thePort
68 # define screenBits qd.screenBits
69 # define arrow qd.arrow
72 VOID PtoCstr
_((StringPtr s
));
73 VOID CtoPstr
_((char * s
));
77 LVAL Object
; /* elements of window_data */
78 int idleOn
, frontOnly
; /* elements of window_data */
79 int mouse_x
, mouse_y
; /* elements of window_data */
81 void (*FreeMem
) _((IVIEW_WINDOW
));
82 ColorCode backColor
, drawColor
;
83 int canvasWidth
, canvasHeight
;
84 int lineType
, drawMode
, lineWidth
;
87 int hasHscroll
, hasVscroll
, view_h
, view_v
;
88 int v_scroll_inc
[2], h_scroll_inc
[2];
89 ControlHandle hscroll
, vscroll
;
97 extern Rect
scroll_bar_bounds();
99 #define GetWRefCon(w) (((WindowPeek)(w))->refCon)
102 #define GLASS_RES 1801
104 #define BRUSH_RES 1803
105 #define HAND_RES 1804
106 #define FINGER_RES 1805
107 #endif /* MACINTOSH */
113 #define StGWWinInfo VOID
114 #define StGWWinInfo VOID
116 #define IVIEW_WINDOW Window
117 #define IVIEW_MENU Menu
122 long Object
; /* elements of window_data */
123 int idleOn
, frontOnly
; /* elements of window_data */
124 int mouse_x
, mouse_y
; /* elements of window_data */
128 int (*MenuAction
)(), (*MenuShow
)(), (*MenuUpdate
)();
129 ColorCode backColor
, drawColor
;
130 int canvasWidth
, canvasHeight
;
131 int lineType
, drawMode
, lineWidth
;
132 Canvas content_canvas
;
135 int hasHscroll
, hasVscroll
, view_h
, view_v
;
136 int v_scroll_inc
[2], h_scroll_inc
[2];
137 /* ControlHandle hscroll, vscroll; +++ */
148 LVAL Object
; /* elements of window_data */
149 int idleOn
, frontOnly
; /* elements of window_data */
150 int mouse_x
, mouse_y
; /* elements of window_data */
151 Window window
, panel
;
152 VOID (*FreeMem
) _((IVIEW_WINDOW
));
153 ColorCode backColor
, drawColor
;
154 int canvasWidth
, canvasHeight
;
155 int lineType
, drawMode
, lineWidth
;
158 int hasHscroll
, hasVscroll
, view_h
, view_v
;
159 int v_scroll_inc
[2], h_scroll_inc
[2];
160 Window hscroll
, vscroll
;
164 int clip_left
, clip_top
, clip_width
, clip_height
;
166 int frame_width
, frame_height
;
167 GC gc
, erase_gc
, xor_gc
;
168 int go_away
, has_menu_button
;
170 #endif /* X11WINDOWS */
173 #define IVIEW_WINDOW HWND
174 #define IVIEW_MENU HMENU
177 LVAL Object
; /* elements of window_data */
178 int idleOn
; /* elements of window_data */
179 int mouse_x
, mouse_y
; /* elements of window_data */
181 void (*FreeMem
)(HWND
);
182 ColorCode backColor
, drawColor
;
183 int canvasWidth
, canvasHeight
;
184 int lineType
, drawMode
, lineWidth
;
187 int hasHscroll
, hasVscroll
, view_h
, view_v
;
188 int v_scroll_inc
[2], h_scroll_inc
[2];
197 int cxPrintPos
, cyPrintPos
;
201 #define SETWINOBJECT(w, d) SetWindowLong((HWND) (w), 0, (LONG) (d))
202 #define GETWINOBJECT(w) ((LVAL) GetWindowLong((HWND) (w), 0))
203 #define SETGWINFO(w, d) SetWindowLong((HWND) (w), 4, (LONG) (d))
204 #define GETGWINFO(w) ((StGWWinInfo *) GetWindowLong((HWND) (w), 4))
207 #define GET_DC(w) (currentDC ? currentDC : GetDC((HWND) (w)))
208 #define RELEASE_DC(w, d) if (!currentDC) ReleaseDC((HWND) (w), (HDC) (d))
209 #define GET_DRAW_PEN(g) ((g)->drawPen)
210 #define RELEASE_PEN(p) DeleteObject(p);
211 #define SET_PEN(h,g) SelectObject(h, CreatePenIndirect(&GET_DRAW_PEN(g)))
212 #define RESTORE_PEN(h,p) RELEASE_PEN(SelectObject(h,p))
213 #define GET_DRAW_BRUSH(g) CreateSolidBrush(get_color((g)->drawColor))
214 #define GET_ERASE_BRUSH(g) CreateSolidBrush(get_color((g)->backColor))
215 #define SET_DRAW_BRUSH(h,g) SelectObject(h, GET_DRAW_BRUSH(g))
216 #define SET_ERASE_BRUSH(h,g) SelectObject(h, GET_ERASE_BRUSH(g))
217 #define RELEASE_BRUSH(b) DeleteObject(b)
218 #define RESTORE_BRUSH(h,b) RELEASE_BRUSH(SelectObject(h,b))
219 #endif /* _Windows */
221 extern StGWWinInfo
*StGWObWinInfo
_((LVAL object
));
222 extern long StGWGetRefCon
_((StGWWinInfo
*));
223 extern long StGWGetColRefCon
_((unsigned int index
));
224 extern long StGWGetCursRefCon
_((unsigned int index
));
225 extern long StGWGetSymRefCon
_((unsigned int index
));
227 extern IVIEW_WINDOW IViewWindowNew
_((LVAL object
, int is_GW
));
228 extern ColorCode StGWDrawColor
_((StGWWinInfo
*));
229 extern ColorCode StGWBackColor
_((StGWWinInfo
*));
230 extern LVAL IViewWindowGetObject
_((IVIEW_WINDOW w
));
231 StGWWinInfo
*IViewWindowWinInfo
_((IVIEW_WINDOW w
));
233 extern IVIEW_WINDOW IViewNew
_((LVAL object
));
234 extern IVIEW_WINDOW IViewSpinNew
_((LVAL object
));
235 extern IVIEW_WINDOW IViewScatmatNew
_((LVAL object
));
236 extern IVIEW_WINDOW IViewListNew
_((LVAL object
));
237 extern IVIEW_WINDOW IViewHistNew
_((LVAL object
));
239 #define ARROW_CURSOR 0
240 #define WATCH_CURSOR 1
241 #define CROSS_CURSOR 2
242 #define BRUSH_CURSOR 3
243 #define HAND_CURSOR 4
244 #define FINGER_CURSOR 5
245 #define HOUR_GLASS_CURSOR 6
246 #define TRASH_BAG_CURSOR 7
247 #define TRASH_CAN_CURSOR 8
249 typedef char *IViewReallocData
;
253 #define FixRound FixRound_
254 #endif /* MACINTOSH */
258 typedef struct basic_points
{
259 int num_points
, num_variables
;
260 double *scale
, *location
, **transformation
;
261 IViewReallocData
*data
, *screen_data
;
262 int recalculateScreenPoints
, fixed
;
266 typedef unsigned char color_index
;
268 typedef struct point_symbol
{
269 int normal
, highlighted
;
272 typedef struct point_info
{
273 PointState state
, screen_state
;
280 typedef struct line_info
{
287 typedef struct string_info
{
289 char masked
, up
, h
, v
;
292 #endif /* USESTRINGS */
294 typedef struct iview_data
{
296 IViewBasicPoints points
, lines
, strings
;
297 IViewReallocData pointInfo
, lineInfo
, stringInfo
;
299 IViewBasicPoints points
, lines
;
300 IViewReallocData pointInfo
, lineInfo
;
301 #endif /* USESTRINGS */
302 double *mins
, *maxes
, *scale
, *location
;
303 int *screen_mins
, *screen_maxes
;
304 char **variableLabels
;
305 int recalculateScreenPoints
, transformed
;
306 double **transformation
;
309 #define IVIEW_WINDOW_NULL(w) (w == (IVIEW_WINDOW) 0)