Headers and library sources from all versions of Lightspeed C and THINK C
1
2/*
3 * ControlMgr.h
4 *
5 * Copyright (c) 1986 THINK Technologies, Inc.
6 * These interfaces are based on information published in
7 * "Inside Macintosh" by Apple Computer, Addison-Wesley,
8 * Reading (Mass.), 1985.
9 *
10 */
11
12#ifndef _ControlMgr_
13#define _ControlMgr_
14
15#ifndef _MacTypes_
16#include "MacTypes.h" /* needs Mactypes.h */
17#endif
18
19#ifndef _WindowMgr_
20#include "WindowMgr.h" /* needs WindowMgr.h */
21#endif
22
23/* control messages */
24enum {
25 drawCntl,
26 testCntl,
27 calcCRgns,
28 initCntl,
29 dispCntl,
30 posCntl,
31 thumbCntl,
32 dragCntl,
33 autoTrack
34};
35
36/* findcontrol result codes */
37enum {
38 inButton = 10,
39 inCheckBox = 11,
40 inUpButton = 20,
41 inDownButton = 21,
42 inPageUp = 22,
43 inPageDown = 23,
44 inThumb = 129
45};
46
47/* control def proc id's */
48enum {
49 pushButProc,
50 checkBoxProc,
51 radioButProc,
52 useWFont = 8,
53 scrollBarProc = 16
54};
55
56/* Axis constraints for drag control */
57/* #define noConstraint 0 defined in WindowMgr.h */
58/* #define hAxisOnly 1 defined in WindowMgr.h */
59/* #define vAxisOnly 2 defined in WindowMgr.h */
60
61
62typedef struct ControlRecord
63 {
64 struct ControlRecord ** nextControl ;
65 WindowPtr contrlOwner ;
66 Rect contrlRect ;
67 char contrlVis ;
68 char contrlHilite ;
69 int contrlValue ;
70 int contrlMin ;
71 int contrlMax ;
72 Handle contrlDefProc ;
73 Handle contrlData ;
74 ProcPtr contrlAction ;
75 long contrlRfCon ;
76 Str255 contrlTitle ;
77 } ControlRecord ;
78typedef ControlRecord * ControlPtr ;
79typedef ControlPtr * ControlHandle ;
80
81
82/* functions returning non-integral values */
83pascal ControlHandle NewControl();
84pascal ControlHandle GetNewControl();
85pascal ProcPtr GetCtlAction();
86
87#endif