]>
Commit | Line | Data |
---|---|---|
31d80f31 UJ |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: aga.h | |
3 | // Purpose: Gray Controls implementation | |
4 | // Author: AUTHOR | |
5 | // Modified by: | |
6 | // Created: ??/??/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) AUTHOR | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _UMA_AGA_H | |
13 | #define _UMA_AGA_H | |
14 | ||
15 | ControlHandle AGANewControl(WindowPtr owningWindow, | |
16 | const Rect * boundsRect, | |
17 | ConstStr255Param controlTitle, | |
18 | Boolean initiallyVisible, | |
19 | SInt16 initialValue, | |
20 | SInt16 minimumValue, | |
21 | SInt16 maximumValue, | |
22 | SInt16 procID, | |
23 | SInt32 controlReference) ; | |
24 | ||
25 | OSErr AGASetControlFontStyle (ControlHandle inControl, | |
26 | const ControlFontStyleRec * inStyle) ; | |
27 | ||
28 | OSErr AGAGetControlDataSize (ControlHandle inControl, | |
29 | ControlPartCode inPart, | |
30 | ResType inTagName, | |
31 | Size * outMaxSize) ; | |
32 | ||
33 | ||
34 | OSErr AGASetControlData (ControlHandle inControl, | |
35 | ControlPartCode inPart, | |
36 | ResType inTagName, | |
37 | Size inSize, | |
38 | Ptr inData) ; | |
39 | ||
40 | OSErr AGAGetControlData (ControlHandle inControl, | |
41 | ControlPartCode inPart, | |
42 | ResType inTagName, | |
43 | Size inBufferSize, | |
44 | Ptr outBuffer, | |
45 | Size * outActualSize) ; | |
46 | ||
47 | OSErr AGAGetBestControlRect (ControlHandle inControl, | |
48 | Rect * outRect, | |
49 | SInt16 * outBaseLineOffset) ; | |
50 | ||
51 | SInt16 AGAHandleControlKey (ControlHandle inControl, | |
52 | SInt16 inKeyCode, | |
53 | SInt16 inCharCode, | |
54 | SInt16 inModifiers) ; | |
55 | ||
56 | ControlPartCode AGAHandleControlClick (ControlHandle inControl, | |
57 | Point inWhere, | |
58 | SInt16 inModifiers, | |
59 | ControlActionUPP inAction) ; | |
60 | ||
61 | void AGAIdleControls (WindowPtr inWindow) ; | |
62 | ||
63 | void AGADrawControl( ControlHandle inControl ) ; | |
64 | void AGADeactivateControl( ControlHandle inControl ) ; | |
65 | void AGAActivateControl( ControlHandle inControl ) ; | |
66 | OSErr AGASetKeyboardFocus (WindowPtr inWindow, | |
67 | ControlHandle inControl, | |
68 | ControlFocusPart inPart) ; | |
69 | ||
70 | OSErr AGACreateRootControl (WindowPtr inWindow, | |
71 | ControlHandle * outControl) ; | |
72 | OSErr AGAEmbedControl (ControlHandle inControl, | |
73 | ControlHandle inContainer) ; | |
74 | ||
75 | void AGAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ; | |
76 | OSErr AGAGetRootControl( WindowPtr inWindow , ControlHandle *outControl ) ; | |
77 | void AGASetThemeWindowBackground (WindowRef inWindow, | |
78 | ThemeBrush inBrush, | |
79 | Boolean inUpdate) ; | |
05adb9d2 SC |
80 | void AGAApplyThemeBackground (ThemeBackgroundKind inKind, |
81 | const Rect * bounds, | |
82 | ThemeDrawState inState, | |
83 | SInt16 inDepth, | |
84 | Boolean inColorDev) ; | |
31d80f31 UJ |
85 | void AGAMoveControl( ControlHandle inControl , short x , short y ) ; |
86 | void AGASizeControl( ControlHandle inControl , short x , short y ) ; | |
87 | ||
05adb9d2 SC |
88 | class AGAPortHelper |
89 | { | |
90 | public : | |
91 | AGAPortHelper( GrafPtr newport) ; | |
92 | AGAPortHelper() ; | |
246c9206 SC |
93 | ~AGAPortHelper() ; |
94 | ||
05adb9d2 SC |
95 | void Setup( GrafPtr newport ) ; |
96 | void Clear() ; | |
246c9206 SC |
97 | bool IsCleared() { return m_clip == NULL ; } |
98 | GrafPtr GetCurrentPort() { return m_currentPort ; } | |
05adb9d2 SC |
99 | |
100 | private : | |
246c9206 SC |
101 | GrafPtr m_currentPort ; |
102 | GrafPtr m_oldPort ; | |
103 | RgnHandle m_clip ; | |
104 | ThemeDrawingState m_drawingState ; | |
105 | short m_textFont ; | |
106 | short m_textSize ; | |
107 | short m_textStyle ; | |
108 | short m_textMode ; | |
05adb9d2 SC |
109 | } ; |
110 | ||
31d80f31 UJ |
111 | |
112 | #endif |