annotate dstep/appkit/NSButton.d @ 16:19885b43130e

Huge update, the bridge actually works now
author Jacob Carlborg <doob@me.com>
date Sun, 03 Jan 2010 22:06:11 +0100
parents
children b9de51448c6b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
1 /**
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
3 * Authors: Jacob Carlborg
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
4 * Version: Initial created: Sep 24, 2009
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
6 */
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
7 module dstep.appkit.NSButton;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
8
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
9 import dstep.appkit.NSButtonCell;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
10 import dstep.appkit.NSControl;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
11 import dstep.appkit.NSEvent;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
12 import dstep.appkit.NSImage;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
13 import dstep.appkit.NSSound;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
14 import dstep.appkit.NSUserInterfaceValidation;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
15 import dstep.foundation.NSAttributedString;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
16 import dstep.foundation.NSObjCRuntime;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
17 import dstep.foundation.NSString;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
18 import dstep.objc.bridge.Bridge;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
19 import dstep.objc.objc;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
20
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
21 const TNSButtonMixedState = `
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
22
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
23 void setAllowsMixedState (bool flag)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
24 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
25 return invokeObjcSelf!(void, "setAllowsMixedState:", bool)(flag);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
26 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
27
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
28 bool allowsMixedState ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
29 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
30 return invokeObjcSelf!(bool, "allowsMixedState");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
31 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
32
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
33 void setNextState ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
34 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
35 return invokeObjcSelf!(void, "setNextState");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
36 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
37
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
38 //mixin ObjcBindMethod!(setAllowsMixedState, "setAllowsMixedState:");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
39 //mixin ObjcBindMethod!(allowsMixedState, "allowsMixedState");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
40 //mixin ObjcBindMethod!(setNextState, "setNextState");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
41
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
42 `;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
43
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
44 const TNSButtonAttributedStringMethods = `
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
45
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
46 NSAttributedString attributedTitle ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
47 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
48 return invokeObjcSelf!(NSAttributedString, "attributedTitle");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
49 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
50
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
51 void setAttributedTitle (NSAttributedString aString)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
52 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
53 return invokeObjcSelf!(void, "setAttributedTitle:", NSAttributedString)(aString);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
54 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
55
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
56 NSAttributedString attributedAlternateTitle ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
57 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
58 return invokeObjcSelf!(NSAttributedString, "attributedAlternateTitle");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
59 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
60
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
61 void setAttributedAlternateTitle (NSAttributedString obj)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
62 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
63 return invokeObjcSelf!(void, "setAttributedAlternateTitle:", NSAttributedString)(obj);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
64 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
65
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
66 //mixin ObjcBindMethod!(attributedTitle, "attributedTitle");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
67 //mixin ObjcBindMethod!(setAttributedTitle, "setAttributedTitle:");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
68 //mixin ObjcBindMethod!(attributedAlternateTitle, "attributedAlternateTitle");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
69 //mixin ObjcBindMethod!(setAttributedAlternateTitle, "setAttributedAlternateTitle:");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
70
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
71 `;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
72
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
73 const TNSButtonSoundExtensions = `
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
74
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
75 void setSound (NSSound aSound)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
76 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
77 return invokeObjcSelf!(void, "setSound:", NSSound)(aSound);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
78 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
79
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
80 NSSound sound ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
81 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
82 return invokeObjcSelf!(NSSound, "sound");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
83 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
84
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
85 //mixin ObjcBindMethod!(setSound, "setSound:");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
86 //mixin ObjcBindMethod!(sound, "sound");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
87
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
88 `;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
89
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
90 const TNSButtonBezelStyles = `
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
91
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
92 void setBezelStyle (uint bezelStyle)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
93 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
94 return invokeObjcSelf!(void, "setBezelStyle:", uint)(bezelStyle);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
95 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
96
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
97 uint bezelStyle ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
98 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
99 return invokeObjcSelf!(uint, "bezelStyle");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
100 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
101
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
102 //mixin ObjcBindMethod!(setBezelStyle, "setBezelStyle:");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
103 //mixin ObjcBindMethod!(bezelStyle, "bezelStyle");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
104
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
105 `;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
106
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
107 const TNSButtonBorder = `
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
108
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
109 void setShowsBorderOnlyWhileMouseInside (bool show)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
110 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
111 return invokeObjcSelf!(void, "setShowsBorderOnlyWhileMouseInside:", bool)(show);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
112 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
113
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
114 bool showsBorderOnlyWhileMouseInside ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
115 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
116 return invokeObjcSelf!(bool, "showsBorderOnlyWhileMouseInside");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
117 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
118
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
119 //mixin ObjcBindMethod!(setShowsBorderOnlyWhileMouseInside, "setShowsBorderOnlyWhileMouseInside:");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
120 //mixin ObjcBindMethod!(showsBorderOnlyWhileMouseInside, "showsBorderOnlyWhileMouseInside");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
121
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
122 `;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
123
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
124 class NSButton : NSControl, INSUserInterfaceValidations
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
125 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
126 mixin (ObjcWrap);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
127
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
128 NSString title ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
129 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
130 return invokeObjcSelf!(NSString, "title");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
131 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
132
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
133 void setTitle (NSString aString)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
134 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
135 return invokeObjcSelf!(void, "setTitle:", NSString)(aString);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
136 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
137
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
138 NSString alternateTitle ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
139 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
140 return invokeObjcSelf!(NSString, "alternateTitle");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
141 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
142
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
143 void setAlternateTitle (NSString aString)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
144 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
145 return invokeObjcSelf!(void, "setAlternateTitle:", NSString)(aString);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
146 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
147
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
148 NSImage image ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
149 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
150 return invokeObjcSelf!(NSImage, "image");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
151 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
152
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
153 void setImage (NSImage image)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
154 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
155 return invokeObjcSelf!(void, "setImage:", NSImage)(image);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
156 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
157
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
158 NSImage alternateImage ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
159 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
160 return invokeObjcSelf!(NSImage, "alternateImage");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
161 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
162
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
163 void setAlternateImage (NSImage image)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
164 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
165 return invokeObjcSelf!(void, "setAlternateImage:", NSImage)(image);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
166 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
167
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
168 uint imagePosition ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
169 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
170 return invokeObjcSelf!(uint, "imagePosition");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
171 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
172
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
173 void setImagePosition (uint aPosition)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
174 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
175 return invokeObjcSelf!(void, "setImagePosition:", uint)(aPosition);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
176 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
177
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
178 void setButtonType (uint aType)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
179 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
180 return invokeObjcSelf!(void, "setButtonType:", uint)(aType);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
181 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
182
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
183 NSInteger state ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
184 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
185 return invokeObjcSelf!(NSInteger, "state");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
186 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
187
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
188 void setState (NSInteger value)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
189 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
190 return invokeObjcSelf!(void, "setState:", NSInteger)(value);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
191 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
192
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
193 bool isBordered ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
194 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
195 return invokeObjcSelf!(bool, "isBordered");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
196 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
197
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
198 void setBordered (bool flag)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
199 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
200 return invokeObjcSelf!(void, "setBordered:", bool)(flag);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
201 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
202
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
203 bool isTransparent ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
204 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
205 return invokeObjcSelf!(bool, "isTransparent");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
206 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
207
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
208 void setTransparent (bool flag)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
209 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
210 return invokeObjcSelf!(void, "setTransparent:", bool)(flag);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
211 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
212
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
213 void setPeriodicDelay (float delay, float interval)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
214 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
215 return invokeObjcSelf!(void, "setPeriodicDelay:interval:", float, float)(delay, interval);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
216 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
217
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
218 void getPeriodicDelay (float* delay, float* interval)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
219 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
220 return invokeObjcSelf!(void, "getPeriodicDelay:interval:", float*, float*)(delay, interval);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
221 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
222
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
223 NSString keyEquivalent ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
224 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
225 return invokeObjcSelf!(NSString, "keyEquivalent");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
226 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
227
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
228 void setKeyEquivalent (NSString charCode)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
229 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
230 return invokeObjcSelf!(void, "setKeyEquivalent:", NSString)(charCode);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
231 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
232
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
233 NSUInteger keyEquivalentModifierMask ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
234 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
235 return invokeObjcSelf!(NSUInteger, "keyEquivalentModifierMask");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
236 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
237
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
238 void setKeyEquivalentModifierMask (NSUInteger mask)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
239 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
240 return invokeObjcSelf!(void, "setKeyEquivalentModifierMask:", NSUInteger)(mask);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
241 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
242
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
243 void highlight (bool flag)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
244 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
245 return invokeObjcSelf!(void, "highlight:", bool)(flag);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
246 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
247
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
248 bool performKeyEquivalent (NSEvent key)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
249 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
250 return invokeObjcSelf!(bool, "performKeyEquivalent:", NSEvent)(key);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
251 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
252
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
253 bool validateUserInterfaceItem (INSValidatedUserInterfaceItem anItem)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
254 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
255 return invokeObjcSelf!(bool, "validateUserInterfaceItem:", INSValidatedUserInterfaceItem)(anItem);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
256 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
257
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
258 // NSButtonMixedState
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
259 void setAllowsMixedState (bool flag)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
260 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
261 return invokeObjcSelf!(void, "setAllowsMixedState:", bool)(flag);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
262 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
263
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
264 bool allowsMixedState ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
265 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
266 return invokeObjcSelf!(bool, "allowsMixedState");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
267 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
268
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
269 void setNextState ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
270 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
271 return invokeObjcSelf!(void, "setNextState");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
272 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
273
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
274 // NSButtonAttributedStringMethods
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
275 NSAttributedString attributedTitle ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
276 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
277 return invokeObjcSelf!(NSAttributedString, "attributedTitle");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
278 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
279
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
280 void setAttributedTitle (NSAttributedString aString)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
281 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
282 return invokeObjcSelf!(void, "setAttributedTitle:", NSAttributedString)(aString);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
283 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
284
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
285 NSAttributedString attributedAlternateTitle ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
286 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
287 return invokeObjcSelf!(NSAttributedString, "attributedAlternateTitle");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
288 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
289
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
290 void setAttributedAlternateTitle (NSAttributedString obj)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
291 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
292 return invokeObjcSelf!(void, "setAttributedAlternateTitle:", NSAttributedString)(obj);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
293 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
294
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
295 // NSButtonSoundExtensions
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
296 void setSound (NSSound aSound)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
297 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
298 return invokeObjcSelf!(void, "setSound:", NSSound)(aSound);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
299 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
300
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
301 NSSound sound ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
302 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
303 return invokeObjcSelf!(NSSound, "sound");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
304 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
305
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
306 // NSButtonBezelStyles
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
307 void setBezelStyle (uint bezelStyle)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
308 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
309 return invokeObjcSelf!(void, "setBezelStyle:", uint)(bezelStyle);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
310 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
311
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
312 uint bezelStyle ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
313 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
314 return invokeObjcSelf!(uint, "bezelStyle");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
315 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
316
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
317 // NSButtonBorder
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
318 void setShowsBorderOnlyWhileMouseInside (bool show)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
319 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
320 return invokeObjcSelf!(void, "setShowsBorderOnlyWhileMouseInside:", bool)(show);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
321 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
322
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
323 bool showsBorderOnlyWhileMouseInside ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
324 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
325 return invokeObjcSelf!(bool, "showsBorderOnlyWhileMouseInside");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
326 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
327 }