-
Notifications
You must be signed in to change notification settings - Fork 74
/
UBWDialog.p
208 lines (149 loc) · 5.25 KB
/
UBWDialog.p
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
{Photoshop version 1.0.1, file: UBWDialog.p
Computer History Museum, www.computerhistory.org
This material is (C)Copyright 1990 Adobe Systems Inc.
It may not be distributed to third parties.
It is licensed for non-commercial use according to
www.computerhistory.org/softwarelicense/photoshop/ }
UNIT UBWDialog;
INTERFACE
USES
{$LOAD MacIntf.LOAD}
MemTypes, QuickDraw, OSIntf, ToolIntf, PackIntf,
{$LOAD UMacApp.LOAD}
UObject, UList, UMacApp,
{$LOAD UPhotoshop.LOAD}
PaletteMgr, UConstants, UVMemory, UPhotoshop,
{$LOAD}
UDialog, UGhost;
TYPE
TBWDialog = OBJECT (TDialogView)
fCancelItem: INTEGER;
PROCEDURE TBWDialog.IBWDialog (itsRsrcID: INTEGER;
itsHookItem: INTEGER;
itsDfltButton: INTEGER);
PROCEDURE TBWDialog.Free; OVERRIDE;
FUNCTION TBWDialog.DefineFixedText (itsItemNumber: INTEGER;
places: INTEGER;
blankOK: BOOLEAN;
trim: BOOLEAN;
minValue: LONGINT;
maxValue: LONGINT): TFixedText;
FUNCTION TBWDialog.DefinePopUpMenu (itsLabelNumber: INTEGER;
itsItemNumber: INTEGER;
menu: MenuHandle;
pick: INTEGER): TPopUpMenu;
FUNCTION TBWDialog.DefineUnitSelector (itsItemNumber: INTEGER;
editItemNumber: INTEGER;
editItemCount: INTEGER;
blankOK: BOOLEAN;
menuID: INTEGER;
pick: INTEGER): TUnitSelector;
FUNCTION TBWDialog.DefineResUnit (item: INTEGER;
scale: INTEGER;
pixels: INTEGER): TUnitSelector;
FUNCTION TBWDialog.DefinePrintResUnit (item: INTEGER;
scale: INTEGER): TUnitSelector;
FUNCTION TBWDialog.DefineFreqUnit (item: INTEGER;
count: INTEGER;
scale: INTEGER): TUnitSelector;
FUNCTION TBWDialog.DefineSizeUnit (item: INTEGER;
scale: INTEGER;
blankOK: BOOLEAN;
allowPixels: BOOLEAN;
allowColumns: BOOLEAN;
allowZero: BOOLEAN;
allowLarge: BOOLEAN): TUnitSelector;
PROCEDURE TBWDialog.DrawAmendments (theItem: INTEGER); OVERRIDE;
PROCEDURE TBWDialog.DoFilterEvent (VAR anEvent: EventRecord;
VAR itemHit: INTEGER;
VAR handledIt: BOOLEAN;
VAR doReturn: BOOLEAN); OVERRIDE;
FUNCTION TBWDialog.DoItemSelected
(anItem: INTEGER;
VAR handledIt: BOOLEAN;
VAR doneWithDialog: BOOLEAN): TCommand; OVERRIDE;
END;
TFixedText = OBJECT (TKeyHandler)
fPlaces: INTEGER;
fBlankOK: BOOLEAN;
fTrim: BOOLEAN;
fMinValue: LONGINT;
fMaxValue: LONGINT;
fBlank: BOOLEAN;
fNumber: BOOLEAN;
fValue: LONGINT;
PROCEDURE TFixedText.IFixedText (itsItemNumber: INTEGER;
itsParent: TDialogView;
places: INTEGER;
blankOK: BOOLEAN;
trim: BOOLEAN;
minValue: LONGINT;
maxValue: LONGINT);
PROCEDURE TFixedText.StuffValue (value: LONGINT);
FUNCTION TFixedText.ParseValue: BOOLEAN;
PROCEDURE TFixedText.Validate (VAR succeeded: BOOLEAN); OVERRIDE;
END;
TPopUpMenu = OBJECT (TDialogItem)
fMenu: MenuHandle;
fPick: INTEGER;
fLabelRect: Rect;
fMenuRect: Rect;
fPickAgain: BOOLEAN;
PROCEDURE TPopUpMenu.DrawPopUpText;
PROCEDURE TPopUpMenu.DrawPopUpMenu;
PROCEDURE TPopUpMenu.SetMenu (menu: MenuHandle; pick: INTEGER);
PROCEDURE TPopUpMenu.IPopUpMenu (itsLabelNumber: INTEGER;
itsItemNumber: INTEGER;
itsParent: TDialogView;
menu: MenuHandle;
pick: INTEGER);
FUNCTION TPopUpMenu.DoPopUpMenu (optionDown: BOOLEAN): BOOLEAN;
FUNCTION TPopUpMenu.ItemSelected
(anItem: INTEGER;
VAR handledIt: BOOLEAN;
VAR doneWithDialog: BOOLEAN): TCommand; OVERRIDE;
END;
TUnitSelector = OBJECT (TPopUpMenu)
fEditItemCount: INTEGER;
fEditItem: ARRAY [0..3] OF TFixedText;
fUnitCount: INTEGER;
fUnitInfo: ARRAY [1..6] OF
RECORD
fScale: EXTENDED;
fBase: EXTENDED;
fPlaces: INTEGER;
fLower: LONGINT;
fUpper: LONGINT
END;
PROCEDURE TUnitSelector.IUnitSelector (itsParent: TBWDialog;
itsItemNumber: INTEGER;
editItemNumber: INTEGER;
editItemCount: INTEGER;
blankOK: BOOLEAN;
menuID: INTEGER;
pick: INTEGER);
PROCEDURE TUnitSelector.UnitHasChanged;
PROCEDURE TUnitSelector.DefineUnit (scale: EXTENDED;
base: EXTENDED;
places: INTEGER;
lower: LONGINT;
upper: LONGINT);
FUNCTION TUnitSelector.ItemSelected
(anItem: INTEGER;
VAR handledIt: BOOLEAN;
VAR doneWithDialog: BOOLEAN): TCommand; OVERRIDE;
PROCEDURE TUnitSelector.StuffFixed (item: INTEGER; value: Fixed);
PROCEDURE TUnitSelector.StuffFloat (item: INTEGER; value: EXTENDED);
FUNCTION TUnitSelector.GetFixed (item: INTEGER): Fixed;
FUNCTION TUnitSelector.GetFloat (item: INTEGER): EXTENDED;
END;
PROCEDURE ComputeCentered (VAR where: Point; width, height: INTEGER;
titled: BOOLEAN);
PROCEDURE CenterWindow (wp: WindowPtr; titled: BOOLEAN);
FUNCTION BWAlert (itsRsrcID: INTEGER; error: INTEGER; beep: BOOLEAN): INTEGER;
PROCEDURE BWNotice (itsRsrcID: INTEGER; beep: BOOLEAN);
PROCEDURE ConvertFixed (value: LONGINT; places: INTEGER;
trim: BOOLEAN; VAR s: Str255);
IMPLEMENTATION
{$I UBWDialog.inc1.p}
END.