comparison dwt/internal/cocoa/NSSavePanel.d @ 1:8b48be5454ce

The internal cocoa classes compile now
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Tue, 19 Aug 2008 17:35:17 +0200
parents 380af2bdd8e5
children f565d3a95c0a
comparison
equal deleted inserted replaced
0:380af2bdd8e5 1:8b48be5454ce
11 * Port to the D Programming language: 11 * Port to the D Programming language:
12 * Jacob Carlborg <jacob.carlborg@gmail.com> 12 * Jacob Carlborg <jacob.carlborg@gmail.com>
13 *******************************************************************************/ 13 *******************************************************************************/
14 module dwt.internal.cocoa.NSSavePanel; 14 module dwt.internal.cocoa.NSSavePanel;
15 15
16 import dwt.internal.cocoa.id;
16 import dwt.internal.cocoa.NSArray; 17 import dwt.internal.cocoa.NSArray;
17 import dwt.internal.cocoa.NSInteger; 18 import dwt.internal.cocoa.NSInteger;
18 import dwt.internal.cocoa.NSPanel; 19 import dwt.internal.cocoa.NSPanel;
19 import dwt.internal.cocoa.NSString; 20 import dwt.internal.cocoa.NSString;
20 import dwt.internal.cocoa.NSURL; 21 import dwt.internal.cocoa.NSURL;
36 super(id); 37 super(id);
37 } 38 }
38 39
39 public NSURL URL () 40 public NSURL URL ()
40 { 41 {
41 objc.id result = OS.objc_msgSend(this.id, OS.sel_URL); 42 objc.id result = OS.objc_msgSend(this.id_, OS.sel_URL);
42 return result !is null ? new NSURL(result) : null; 43 return result !is null ? new NSURL(result) : null;
43 } 44 }
44 45
45 public NSView accessoryView () 46 public NSView accessoryView ()
46 { 47 {
47 objc.id result = OS.objc_msgSend(this.id, OS.sel_accessoryView); 48 objc.id result = OS.objc_msgSend(this.id_, OS.sel_accessoryView);
48 return result !is null ? new NSView(result) : null; 49 return result !is null ? new NSView(result) : null;
49 } 50 }
50 51
51 public NSArray allowedFileTypes () 52 public NSArray allowedFileTypes ()
52 { 53 {
53 objc.id result = OS.objc_msgSend(this.id, OS.sel_allowedFileTypes); 54 objc.id result = OS.objc_msgSend(this.id_, OS.sel_allowedFileTypes);
54 return result !is null ? new NSArray(result) : null; 55 return result !is null ? new NSArray(result) : null;
55 } 56 }
56 57
57 public bool allowsOtherFileTypes () 58 public bool allowsOtherFileTypes ()
58 { 59 {
59 return OS.objc_msgSend(this.id, OS.sel_allowsOtherFileTypes) !is null; 60 return OS.objc_msgSend(this.id_, OS.sel_allowsOtherFileTypes) !is null;
60 } 61 }
61 62
62 public void beginSheetForDirectory (NSString path, NSString name, NSWindow docWindow, id delegatee, objc.SEL didEndSelector, void* contextInfo) 63 public void beginSheetForDirectory (NSString path, NSString name, NSWindow docWindow, id delegatee, objc.SEL didEndSelector, void* contextInfo)
63 { 64 {
64 OS.objc_msgSend(this.id, OS.sel_beginSheetForDirectory_1file_1modalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1, 65 OS.objc_msgSend(this.id_, OS.sel_beginSheetForDirectory_1file_1modalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1,
65 path !is null ? path.id : null, name !is null ? name.id : null, docWindow !is null ? docWindow.id : null, 66 path !is null ? path.id_ : null, name !is null ? name.id_ : null, docWindow !is null ? docWindow.id_ : null,
66 delegatee !is null ? delegatee.id : null, didEndSelector, contextInfo); 67 delegatee !is null ? delegatee.id_ : null, didEndSelector, contextInfo);
67 } 68 }
68 69
69 public bool canCreateDirectories () 70 public bool canCreateDirectories ()
70 { 71 {
71 return OS.objc_msgSend(this.id, OS.sel_canCreateDirectories) !is null; 72 return OS.objc_msgSend(this.id_, OS.sel_canCreateDirectories) !is null;
72 } 73 }
73 74
74 public bool canSelectHiddenExtension () 75 public bool canSelectHiddenExtension ()
75 { 76 {
76 return OS.objc_msgSend(this.id, OS.sel_canSelectHiddenExtension) !is null; 77 return OS.objc_msgSend(this.id_, OS.sel_canSelectHiddenExtension) !is null;
77 } 78 }
78 79
79 public void cancel (id sender) 80 public void cancel (id sender)
80 { 81 {
81 OS.objc_msgSend(this.id, OS.sel_cancel_1, sender !is null ? sender.id : null); 82 OS.objc_msgSend(this.id_, OS.sel_cancel_1, sender !is null ? sender.id_ : null);
82 } 83 }
83 84
84 public id delegatee () 85 public id delegatee ()
85 { 86 {
86 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); 87 objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
87 return result !is null ? new id(result) : null; 88 return result !is null ? new id(result) : null;
88 } 89 }
89 90
90 public NSString directory () 91 public NSString directory ()
91 { 92 {
92 objc.id result = OS.objc_msgSend(this.id, OS.sel_directory); 93 objc.id result = OS.objc_msgSend(this.id_, OS.sel_directory);
93 return result !is null ? new NSString(result) : null; 94 return result !is null ? new NSString(result) : null;
94 } 95 }
95 96
96 public NSString filename () 97 public NSString filename ()
97 { 98 {
98 objc.id result = OS.objc_msgSend(this.id, OS.sel_filename); 99 objc.id result = OS.objc_msgSend(this.id_, OS.sel_filename);
99 return result !is null ? new NSString(result) : null; 100 return result !is null ? new NSString(result) : null;
100 } 101 }
101 102
102 public bool isExpanded () 103 public bool isExpanded ()
103 { 104 {
104 return OS.objc_msgSend(this.id, OS.sel_isExpanded) !is null; 105 return OS.objc_msgSend(this.id_, OS.sel_isExpanded) !is null;
105 } 106 }
106 107
107 public bool isExtensionHidden () 108 public bool isExtensionHidden ()
108 { 109 {
109 return OS.objc_msgSend(this.id, OS.sel_isExtensionHidden) !is null; 110 return OS.objc_msgSend(this.id_, OS.sel_isExtensionHidden) !is null;
110 } 111 }
111 112
112 public NSString message () 113 public NSString message ()
113 { 114 {
114 objc.id result = OS.objc_msgSend(this.id, OS.sel_message); 115 objc.id result = OS.objc_msgSend(this.id_, OS.sel_message);
115 return result !is null ? new NSString(result) : null; 116 return result !is null ? new NSString(result) : null;
116 } 117 }
117 118
118 public NSString nameFieldLabel () 119 public NSString nameFieldLabel ()
119 { 120 {
120 objc.id result = OS.objc_msgSend(this.id, OS.sel_nameFieldLabel); 121 objc.id result = OS.objc_msgSend(this.id_, OS.sel_nameFieldLabel);
121 return result !is null ? new NSString(result) : null; 122 return result !is null ? new NSString(result) : null;
122 } 123 }
123 124
124 public void ok (id sender) 125 public void ok (id sender)
125 { 126 {
126 OS.objc_msgSend(this.id, OS.sel_ok_1, sender !is null ? sender.id : null); 127 OS.objc_msgSend(this.id_, OS.sel_ok_1, sender !is null ? sender.id_ : null);
127 } 128 }
128 129
129 public NSString prompt () 130 public NSString prompt ()
130 { 131 {
131 objc.id result = OS.objc_msgSend(this.id, OS.sel_prompt); 132 objc.id result = OS.objc_msgSend(this.id_, OS.sel_prompt);
132 return result !is null ? new NSString(result) : null; 133 return result !is null ? new NSString(result) : null;
133 } 134 }
134 135
135 public NSString requiredFileType () 136 public NSString requiredFileType ()
136 { 137 {
137 objc.id result = OS.objc_msgSend(this.id, OS.sel_requiredFileType); 138 objc.id result = OS.objc_msgSend(this.id_, OS.sel_requiredFileType);
138 return result !is null ? new NSString(result) : null; 139 return result !is null ? new NSString(result) : null;
139 } 140 }
140 141
141 public NSInteger runModal () 142 public NSInteger runModal ()
142 { 143 {
143 return OS.objc_msgSend(this.id, OS.sel_runModal); 144 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_runModal);
144 } 145 }
145 146
146 public NSInteger runModalForDirectory (NSString path, NSString name) 147 public NSInteger runModalForDirectory (NSString path, NSString name)
147 { 148 {
148 return OS.objc_msgSend(this.id, OS.sel_runModalForDirectory_1file_1, path !is null ? path.id : null, name !is null ? name.id : null); 149 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_runModalForDirectory_1file_1, path !is null ? path.id_ : null, name !is null ? name.id_ : null);
149 } 150 }
150 151
151 public static NSSavePanel savePanel () 152 public static NSSavePanel savePanel ()
152 { 153 {
153 objc.id result = OS.objc_msgSend(OS.class_NSSavePanel, OS.sel_savePanel); 154 objc.id result = OS.objc_msgSend(OS.class_NSSavePanel, OS.sel_savePanel);
154 return result !is null ? new NSSavePanel(result) : null; 155 return result !is null ? new NSSavePanel(result) : null;
155 } 156 }
156 157
157 public void selectText (id sender) 158 public void selectText (id sender)
158 { 159 {
159 OS.objc_msgSend(this.id, OS.sel_selectText_1, sender !is null ? sender.id : null); 160 OS.objc_msgSend(this.id_, OS.sel_selectText_1, sender !is null ? sender.id_ : null);
160 } 161 }
161 162
162 public void setAccessoryView (NSView view) 163 public void setAccessoryView (NSView view)
163 { 164 {
164 OS.objc_msgSend(this.id, OS.sel_setAccessoryView_1, view !is null ? view.id : null); 165 OS.objc_msgSend(this.id_, OS.sel_setAccessoryView_1, view !is null ? view.id_ : null);
165 } 166 }
166 167
167 public void setAllowedFileTypes (NSArray types) 168 public void setAllowedFileTypes (NSArray types)
168 { 169 {
169 OS.objc_msgSend(this.id, OS.sel_setAllowedFileTypes_1, types !is null ? types.id : null); 170 OS.objc_msgSend(this.id_, OS.sel_setAllowedFileTypes_1, types !is null ? types.id_ : null);
170 } 171 }
171 172
172 public void setAllowsOtherFileTypes (bool flag) 173 public void setAllowsOtherFileTypes (bool flag)
173 { 174 {
174 OS.objc_msgSend(this.id, OS.sel_setAllowsOtherFileTypes_1, flag); 175 OS.objc_msgSend(this.id_, OS.sel_setAllowsOtherFileTypes_1, flag);
175 } 176 }
176 177
177 public void setCanCreateDirectories (bool flag) 178 public void setCanCreateDirectories (bool flag)
178 { 179 {
179 OS.objc_msgSend(this.id, OS.sel_setCanCreateDirectories_1, flag); 180 OS.objc_msgSend(this.id_, OS.sel_setCanCreateDirectories_1, flag);
180 } 181 }
181 182
182 public void setCanSelectHiddenExtension (bool flag) 183 public void setCanSelectHiddenExtension (bool flag)
183 { 184 {
184 OS.objc_msgSend(this.id, OS.sel_setCanSelectHiddenExtension_1, flag); 185 OS.objc_msgSend(this.id_, OS.sel_setCanSelectHiddenExtension_1, flag);
185 } 186 }
186 187
187 public void setDelegate (id delegatee) 188 public void setDelegate (id delegatee)
188 { 189 {
189 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id : null); 190 OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
190 } 191 }
191 192
192 public void setDirectory (NSString path) 193 public void setDirectory (NSString path)
193 { 194 {
194 OS.objc_msgSend(this.id, OS.sel_setDirectory_1, path !is null ? path.id : null); 195 OS.objc_msgSend(this.id_, OS.sel_setDirectory_1, path !is null ? path.id_ : null);
195 } 196 }
196 197
197 public void setExtensionHidden (bool flag) 198 public void setExtensionHidden (bool flag)
198 { 199 {
199 OS.objc_msgSend(this.id, OS.sel_setExtensionHidden_1, flag); 200 OS.objc_msgSend(this.id_, OS.sel_setExtensionHidden_1, flag);
200 } 201 }
201 202
202 public void setMessage (NSString message) 203 public void setMessage (NSString message)
203 { 204 {
204 OS.objc_msgSend(this.id, OS.sel_setMessage_1, message !is null ? message.id : null); 205 OS.objc_msgSend(this.id_, OS.sel_setMessage_1, message !is null ? message.id_ : null);
205 } 206 }
206 207
207 public void setNameFieldLabel (NSString label) 208 public void setNameFieldLabel (NSString label)
208 { 209 {
209 OS.objc_msgSend(this.id, OS.sel_setNameFieldLabel_1, label !is null ? label.id : null); 210 OS.objc_msgSend(this.id_, OS.sel_setNameFieldLabel_1, label !is null ? label.id_ : null);
210 } 211 }
211 212
212 public void setPrompt (NSString prompt) 213 public void setPrompt (NSString prompt)
213 { 214 {
214 OS.objc_msgSend(this.id, OS.sel_setPrompt_1, prompt !is null ? prompt.id : null); 215 OS.objc_msgSend(this.id_, OS.sel_setPrompt_1, prompt !is null ? prompt.id_ : null);
215 } 216 }
216 217
217 public void setRequiredFileType (NSString type) 218 public void setRequiredFileType (NSString type)
218 { 219 {
219 OS.objc_msgSend(this.id, OS.sel_setRequiredFileType_1, type !is null ? type.id : null); 220 OS.objc_msgSend(this.id_, OS.sel_setRequiredFileType_1, type !is null ? type.id_ : null);
220 } 221 }
221 222
222 public void setTitle (NSString title) 223 public void setTitle (NSString title)
223 { 224 {
224 OS.objc_msgSend(this.id, OS.sel_setTitle_1, title !is null ? title.id : null); 225 OS.objc_msgSend(this.id_, OS.sel_setTitle_1, title !is null ? title.id_ : null);
225 } 226 }
226 227
227 public void setTreatsFilePackagesAsDirectories (bool flag) 228 public void setTreatsFilePackagesAsDirectories (bool flag)
228 { 229 {
229 OS.objc_msgSend(this.id, OS.sel_setTreatsFilePackagesAsDirectories_1, flag); 230 OS.objc_msgSend(this.id_, OS.sel_setTreatsFilePackagesAsDirectories_1, flag);
230 } 231 }
231 232
232 public NSString title () 233 public NSString title ()
233 { 234 {
234 objc.id result = OS.objc_msgSend(this.id, OS.sel_title); 235 objc.id result = OS.objc_msgSend(this.id_, OS.sel_title);
235 return result !is null ? new NSString(result) : null; 236 return result !is null ? new NSString(result) : null;
236 } 237 }
237 238
238 public bool treatsFilePackagesAsDirectories () 239 public bool treatsFilePackagesAsDirectories ()
239 { 240 {
240 return OS.objc_msgSend(this.id, OS.sel_treatsFilePackagesAsDirectories) !is null; 241 return OS.objc_msgSend(this.id_, OS.sel_treatsFilePackagesAsDirectories) !is null;
241 } 242 }
242 243
243 public void validateVisibleColumns () 244 public void validateVisibleColumns ()
244 { 245 {
245 OS.objc_msgSend(this.id, OS.sel_validateVisibleColumns); 246 OS.objc_msgSend(this.id_, OS.sel_validateVisibleColumns);
246 } 247 }
247 248
248 } 249 }