blob: fca158ce13951b7ac200e684b1d0fef36e512c0b (
plain)
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
{ Parsed from Appkit.framework NSButtonCell.h }
{$ifdef TYPES}
{$ifndef NSBUTTONCELL_PAS_T}
{$define NSBUTTONCELL_PAS_T}
{ Constants }
const
NSMomentaryLightButton = 0;
NSPushOnPushOffButton = 1;
NSToggleButton = 2;
NSSwitchButton = 3;
NSRadioButton = 4;
NSMomentaryChangeButton = 5;
NSOnOffButton = 6;
NSMomentaryPushInButton = 7;
NSMomentaryPushButton = 0;
NSMomentaryLight = 7;
const
NSRoundedBezelStyle = 1;
NSRegularSquareBezelStyle = 2;
NSThickSquareBezelStyle = 3;
NSThickerSquareBezelStyle = 4;
NSDisclosureBezelStyle = 5;
NSShadowlessSquareBezelStyle = 6;
NSCircularBezelStyle = 7;
NSTexturedSquareBezelStyle = 8;
NSHelpButtonBezelStyle = 9;
NSSmallSquareBezelStyle = 10;
NSTexturedRoundedBezelStyle = 11;
NSRoundRectBezelStyle = 12;
NSRecessedBezelStyle = 13;
NSRoundedDisclosureBezelStyle = 14;
NSSmallIconButtonBezelStyle = 2;
const
NSGradientNone = 0;
NSGradientConcaveWeak = 1;
NSGradientConcaveStrong = 2;
NSGradientConvexWeak = 3;
NSGradientConvexStrong = 4;
{ Types }
type
NSButtonType = NSUInteger;
NSButtonTypePtr = ^NSButtonType;
NSBezelStyle = NSUInteger;
NSBezelStylePtr = ^NSBezelStyle;
NSGradientType = NSUInteger;
NSGradientTypePtr = ^NSGradientType;
{$endif}
{$endif}
{$ifdef RECORDS}
{$ifndef NSBUTTONCELL_PAS_R}
{$define NSBUTTONCELL_PAS_R}
{ Records }
type
__BCFlags = record
case byte of
0: (_anonbitfield_NSButtonCell0: cuint);
1: (data: bitpacked record
{$ifdef fpc_big_endian}
pushIn: 0..1;
changeContents: 0..1;
changeBackground: 0..1;
changeGray: 0..1;
lightByContents: 0..1;
lightByBackground: 0..1;
lightByGray: 0..1;
drawing: 0..1;
bordered: 0..1;
imageOverlaps: 0..1;
horizontal: 0..1;
bottomOrLeft: 0..1;
imageAndText: 0..1;
imageSizeDiff: 0..1;
hasKeyEquivalentInsteadOfImage: 0..1;
lastState: 0..1;
transparent: 0..1;
inset: 0..((1 shl 2)-1);
doesNotDimImage: 0..1;
suppressAXValueChangeNote: 0..1;
reserved: 0..((1 shl 2)-1);
useButtonImageSource: 0..1;
alternateMnemonicLocation: 0..((1 shl 8)-1);
{$else}
alternateMnemonicLocation: 0..((1 shl 8)-1);
useButtonImageSource: 0..1;
reserved: 0..((1 shl 2)-1);
suppressAXValueChangeNote: 0..1;
doesNotDimImage: 0..1;
inset: 0..((1 shl 2)-1);
transparent: 0..1;
lastState: 0..1;
hasKeyEquivalentInsteadOfImage: 0..1;
imageSizeDiff: 0..1;
imageAndText: 0..1;
bottomOrLeft: 0..1;
horizontal: 0..1;
imageOverlaps: 0..1;
bordered: 0..1;
drawing: 0..1;
lightByGray: 0..1;
lightByBackground: 0..1;
lightByContents: 0..1;
changeGray: 0..1;
changeBackground: 0..1;
changeContents: 0..1;
pushIn: 0..1;
{$endif}
end;
);
end;
_BCFlags = __BCFlags;
__BCFlagsPtr = ^__BCFlags;
type
__BCFlags2 = record
case byte of
0: (_anonbitfield_NSButtonCell1: cuint);
1: (data: bitpacked record
{$ifdef fpc_big_endian}
keyEquivalentModifierMask: 0..((1 shl 24)-1);
imageScaling: 0..((1 shl 2)-1);
bezelStyle2: 0..1;
mouseInside: 0..1;
showsBorderOnlyWhileMouseInside: 0..1;
bezelStyle: 0..((1 shl 3)-1);
{$else}
bezelStyle: 0..((1 shl 3)-1);
showsBorderOnlyWhileMouseInside: 0..1;
mouseInside: 0..1;
bezelStyle2: 0..1;
imageScaling: 0..((1 shl 2)-1);
keyEquivalentModifierMask: 0..((1 shl 24)-1);
{$endif}
end;
);
end;
_BCFlags2 = __BCFlags2;
__BCFlags2Ptr = ^__BCFlags2;
{$endif}
{$endif}
{$ifdef FUNCTIONS}
{$ifndef NSBUTTONCELL_PAS_F}
{$define NSBUTTONCELL_PAS_F}
{$endif}
{$endif}
{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSBUTTONCELL_PAS_S}
{$define NSBUTTONCELL_PAS_S}
{$endif}
{$endif}
{$ifdef FORWARD}
NSButtonCell = objcclass;
NSButtonCellPointer = ^NSButtonCell;
NSButtonCellPtr = NSButtonCellPointer;
{$endif}
{$ifdef CLASSES}
{$ifndef NSBUTTONCELL_PAS_C}
{$define NSBUTTONCELL_PAS_C}
{ NSButtonCell }
NSButtonCell = objcclass external (NSActionCell)
private
_altContents: NSString;
_sound: id;
_keyEquivalent: NSString;
_bcFlags2: _BCFlags2;
_periodicDelay: cushort;
_periodicInterval: cushort;
_bcFlags: _BCFlags;
_normalImage: NSImage;
_alternateImageOrKeyEquivalentFont: id;
public
function title: NSString; message 'title';
procedure setTitle(aString: NSString); message 'setTitle:';
function alternateTitle: NSString; message 'alternateTitle';
procedure setAlternateTitle(aString: NSString); message 'setAlternateTitle:';
function alternateImage: NSImage; message 'alternateImage';
procedure setAlternateImage(image_: NSImage); message 'setAlternateImage:';
function imagePosition: NSCellImagePosition; message 'imagePosition';
procedure setImagePosition(aPosition: NSCellImagePosition); message 'setImagePosition:';
function imageScaling: NSImageScaling; message 'imageScaling';
procedure setImageScaling(scaling: NSImageScaling); message 'setImageScaling:';
function highlightsBy: NSInteger; message 'highlightsBy';
procedure setHighlightsBy(aType: NSInteger); message 'setHighlightsBy:';
function showsStateBy: NSInteger; message 'showsStateBy';
procedure setShowsStateBy(aType: NSInteger); message 'setShowsStateBy:';
procedure setButtonType(aType: NSButtonType); message 'setButtonType:';
function isOpaque: Boolean; message 'isOpaque';
procedure setFont(fontObj: NSFont); message 'setFont:';
function isTransparent: Boolean; message 'isTransparent';
procedure setTransparent(flag: Boolean); message 'setTransparent:';
procedure setPeriodicDelay_interval(delay: single; interval: single); message 'setPeriodicDelay:interval:';
procedure getPeriodicDelay_interval(delay: psingle; interval: psingle); message 'getPeriodicDelay:interval:';
function keyEquivalent: NSString; message 'keyEquivalent';
procedure setKeyEquivalent(aKeyEquivalent: NSString); message 'setKeyEquivalent:';
function keyEquivalentModifierMask: NSUInteger; message 'keyEquivalentModifierMask';
procedure setKeyEquivalentModifierMask(mask: NSUInteger); message 'setKeyEquivalentModifierMask:';
function keyEquivalentFont: NSFont; message 'keyEquivalentFont';
procedure setKeyEquivalentFont(fontObj: NSFont); message 'setKeyEquivalentFont:';
procedure setKeyEquivalentFont_size(fontName: NSString; fontSize: CGFloat); message 'setKeyEquivalentFont:size:';
procedure performClick(sender: id); message 'performClick:';
procedure drawImage_withFrame_inView(image_: NSImage; frame: NSRect; controlView_: NSView); message 'drawImage:withFrame:inView:';
function drawTitle_withFrame_inView(title_: NSAttributedString; frame: NSRect; controlView_: NSView): NSRect; message 'drawTitle:withFrame:inView:';
procedure drawBezelWithFrame_inView(frame: NSRect; controlView_: NSView); message 'drawBezelWithFrame:inView:';
end;
{ NSKeyboardUI_NSButtonCellCategory }
NSKeyboardUI_NSButtonCellCategory = objccategory external name 'NSKeyboardUI' (NSButtonCell)
procedure setTitleWithMnemonic(stringWithAmpersand: NSString); message 'setTitleWithMnemonic:';
procedure setAlternateTitleWithMnemonic(stringWithAmpersand: NSString); message 'setAlternateTitleWithMnemonic:';
procedure setAlternateMnemonicLocation(location: NSUInteger); message 'setAlternateMnemonicLocation:';
function alternateMnemonicLocation: NSUInteger; message 'alternateMnemonicLocation';
function alternateMnemonic: NSString; message 'alternateMnemonic';
end;
{ NSButtonCellExtensionsCategory }
NSButtonCellExtensionsCategory = objccategory external (NSButtonCell)
function gradientType: NSGradientType; message 'gradientType';
procedure setGradientType(type__: NSGradientType); message 'setGradientType:';
procedure setImageDimsWhenDisabled(flag: Boolean); message 'setImageDimsWhenDisabled:';
function imageDimsWhenDisabled: Boolean; message 'imageDimsWhenDisabled';
procedure setShowsBorderOnlyWhileMouseInside(show: Boolean); message 'setShowsBorderOnlyWhileMouseInside:';
function showsBorderOnlyWhileMouseInside: Boolean; message 'showsBorderOnlyWhileMouseInside';
procedure mouseEntered(event: NSEvent); message 'mouseEntered:';
procedure mouseExited(event: NSEvent); message 'mouseExited:';
function backgroundColor: NSColor; message 'backgroundColor';
procedure setBackgroundColor(color: NSColor); message 'setBackgroundColor:';
end;
{ NSButtonCellAttributedStringMethodsCategory }
NSButtonCellAttributedStringMethodsCategory = objccategory external (NSButtonCell)
function attributedTitle: NSAttributedString; message 'attributedTitle';
procedure setAttributedTitle(obj: NSAttributedString); message 'setAttributedTitle:';
function attributedAlternateTitle: NSAttributedString; message 'attributedAlternateTitle';
procedure setAttributedAlternateTitle(obj: NSAttributedString); message 'setAttributedAlternateTitle:';
end;
{ NSButtonCellBezelStylesCategory }
NSButtonCellBezelStylesCategory = objccategory external (NSButtonCell)
procedure setBezelStyle(bezelStyle_: NSBezelStyle); message 'setBezelStyle:';
function bezelStyle: NSBezelStyle; message 'bezelStyle';
end;
{ NSButtonCellSoundExtensionsCategory }
NSButtonCellSoundExtensionsCategory = objccategory external (NSButtonCell)
procedure setSound(aSound: NSSound); message 'setSound:';
function sound: NSSound; message 'sound';
end;
{$endif}
{$endif}
|