Mercurial > projects > dstep
comparison dstep/appkit/NSView.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 | f8a3b67adfcb |
comparison
equal
deleted
inserted
replaced
15:7ff919f595d5 | 16:19885b43130e |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Sep 24, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.appkit.NSView; | |
8 | |
9 import dstep.appkit.AppKitDefines; | |
10 import dstep.appkit.NSAnimation; | |
11 import dstep.appkit.NSAttributedString; | |
12 import dstep.appkit.NSBitmapImageRep; | |
13 import dstep.appkit.NSClipView; | |
14 import dstep.appkit.NSCursor; | |
15 import dstep.appkit.NSEvent; | |
16 import dstep.appkit.NSGraphics; | |
17 import dstep.appkit.NSGraphicsContext; | |
18 import dstep.appkit.NSImage; | |
19 import dstep.appkit.NSMenu; | |
20 import dstep.appkit.NSMenuItem; | |
21 import dstep.appkit.NSPasteboard; | |
22 import dstep.appkit.NSResponder; | |
23 import dstep.appkit.NSRulerMarker; | |
24 import dstep.appkit.NSRulerView; | |
25 import dstep.appkit.NSScreen; | |
26 import dstep.appkit.NSScrollView; | |
27 import dstep.appkit.NSShadow; | |
28 import dstep.appkit.NSTrackingArea; | |
29 import dstep.appkit.NSWindow; | |
30 import dstep.applicationservices.coregraphics.CGBase; | |
31 import dstep.foundation.NSArray; | |
32 import dstep.foundation.NSAttributedString; | |
33 import dstep.foundation.NSData; | |
34 import dstep.foundation.NSDictionary; | |
35 import dstep.foundation.NSGeometry; | |
36 import dstep.foundation.NSObjCRuntime; | |
37 import dstep.foundation.NSRange; | |
38 import dstep.foundation.NSString; | |
39 import dstep.objc.bridge.Bridge; | |
40 import dstep.objc.objc; | |
41 import dstep.quartzcore.CALayer; | |
42 import dstep.quartzcore.CIFilter; | |
43 | |
44 import bindings = dstep.appkit.NSView_bindings; | |
45 | |
46 typedef NSUInteger NSBorderType; | |
47 typedef NSInteger NSTrackingRectTag; | |
48 typedef NSInteger NSToolTipTag; | |
49 | |
50 alias extern (C) NSComparisonResult function (id, id, void*) Compare; | |
51 | |
52 private | |
53 { | |
54 NSString NSFullScreenModeAllScreens_; | |
55 NSString NSFullScreenModeSetting_; | |
56 NSString NSFullScreenModeWindowLevel_; | |
57 NSString NSViewFrameDidChangeNotification_; | |
58 NSString NSViewFocusDidChangeNotification_; | |
59 NSString NSViewBoundsDidChangeNotification_; | |
60 NSString NSViewGlobalFrameDidChangeNotification_; | |
61 NSString NSViewDidUpdateTrackingAreasNotification_; | |
62 } | |
63 | |
64 NSString NSFullScreenModeAllScreens () | |
65 { | |
66 if (NSFullScreenModeAllScreens_) | |
67 return NSFullScreenModeAllScreens_; | |
68 | |
69 return NSFullScreenModeAllScreens_ = new NSString(bindings.NSFullScreenModeAllScreens); | |
70 } | |
71 | |
72 NSString NSFullScreenModeSetting () | |
73 { | |
74 if (NSFullScreenModeSetting_) | |
75 return NSFullScreenModeSetting_; | |
76 | |
77 return NSFullScreenModeSetting_ = new NSString(bindings.NSFullScreenModeSetting); | |
78 } | |
79 | |
80 NSString NSFullScreenModeWindowLevel () | |
81 { | |
82 if (NSFullScreenModeWindowLevel_) | |
83 return NSFullScreenModeWindowLevel_; | |
84 | |
85 return NSFullScreenModeWindowLevel_ = new NSString(bindings.NSFullScreenModeWindowLevel); | |
86 } | |
87 | |
88 NSString NSViewFrameDidChangeNotification () | |
89 { | |
90 if (NSViewFrameDidChangeNotification_) | |
91 return NSViewFrameDidChangeNotification_; | |
92 | |
93 return NSViewFrameDidChangeNotification_ = new NSString(bindings.NSViewFrameDidChangeNotification); | |
94 } | |
95 | |
96 NSString NSViewFocusDidChangeNotification () | |
97 { | |
98 if (NSViewFocusDidChangeNotification_) | |
99 return NSViewFocusDidChangeNotification_; | |
100 | |
101 return NSViewFocusDidChangeNotification_ = new NSString(bindings.NSViewFocusDidChangeNotification); | |
102 } | |
103 | |
104 NSString NSViewBoundsDidChangeNotification () | |
105 { | |
106 if (NSViewBoundsDidChangeNotification_) | |
107 return NSViewBoundsDidChangeNotification_; | |
108 | |
109 return NSViewBoundsDidChangeNotification_ = new NSString(bindings.NSViewBoundsDidChangeNotification); | |
110 } | |
111 | |
112 NSString NSViewGlobalFrameDidChangeNotification () | |
113 { | |
114 if (NSViewGlobalFrameDidChangeNotification_) | |
115 return NSViewGlobalFrameDidChangeNotification_; | |
116 | |
117 return NSViewGlobalFrameDidChangeNotification_ = new NSString(bindings.NSViewGlobalFrameDidChangeNotification); | |
118 } | |
119 | |
120 NSString NSViewDidUpdateTrackingAreasNotification () | |
121 { | |
122 if (NSViewDidUpdateTrackingAreasNotification_) | |
123 return NSViewDidUpdateTrackingAreasNotification_; | |
124 | |
125 return NSViewDidUpdateTrackingAreasNotification_ = new NSString(bindings.NSViewDidUpdateTrackingAreasNotification); | |
126 } | |
127 | |
128 enum | |
129 { | |
130 NSViewNotSizable = 0, | |
131 NSViewMinXMargin = 1, | |
132 NSViewWidthSizable = 2, | |
133 NSViewMaxXMargin = 4, | |
134 NSViewMinYMargin = 8, | |
135 NSViewHeightSizable = 16, | |
136 NSViewMaxYMargin = 32 | |
137 } | |
138 | |
139 enum : NSUInteger | |
140 { | |
141 NSNoBorder = 0, | |
142 NSLineBorder = 1, | |
143 NSBezelBorder = 2, | |
144 NSGrooveBorder = 3 | |
145 } | |
146 | |
147 struct _VFlags | |
148 { | |
149 uint aboutToResize; | |
150 uint retainCountOverMax; | |
151 uint retainCount; | |
152 uint interfaceStyle1; | |
153 uint specialArchiving; | |
154 uint needsDisplayForBounds; | |
155 uint interfaceStyle0; | |
156 uint removingWithoutInvalidation; | |
157 uint needsBoundsChangeNote; | |
158 uint boundsChangeNotesSuspended; | |
159 uint focusChangeNotesSuspended; | |
160 uint needsFrameChangeNote; | |
161 uint frameChangeNotesSuspended; | |
162 uint noVerticalAutosizing; | |
163 uint newGState; | |
164 uint validGState; | |
165 uint needsDisplay; | |
166 uint wantsGState; | |
167 uint autoresizeSubviews; | |
168 uint autosizing; | |
169 uint rotatedOrScaledFromBase; | |
170 uint rotatedFromBase; | |
171 } | |
172 | |
173 const TNSDrag = ` | |
174 | |
175 void dragImage (NSImage anImage, NSPoint viewLocation, NSSize initialOffset, NSEvent event, NSPasteboard pboard, Object sourceObj, bool slideFlag) | |
176 { | |
177 return invokeObjcSelf!(void, "dragImage:at:offset:event:pasteboard:source:slideBack:", NSImage, NSPoint, NSSize, NSEvent, NSPasteboard, Object, bool)(anImage, viewLocation, initialOffset, event, pboard, sourceObj, slideFlag); | |
178 } | |
179 | |
180 NSArray registeredDraggedTypes () | |
181 { | |
182 return invokeObjcSelf!(NSArray, "registeredDraggedTypes"); | |
183 } | |
184 | |
185 void registerForDraggedTypes (NSArray newTypes) | |
186 { | |
187 return invokeObjcSelf!(void, "registerForDraggedTypes:", NSArray)(newTypes); | |
188 } | |
189 | |
190 void unregisterDraggedTypes () | |
191 { | |
192 return invokeObjcSelf!(void, "unregisterDraggedTypes"); | |
193 } | |
194 | |
195 bool dragFile (NSString filename, NSRect rect, bool aFlag, NSEvent event) | |
196 { | |
197 return invokeObjcSelf!(bool, "dragFile:fromRect:slideBack:event:", NSString, NSRect, bool, NSEvent)(filename, rect, aFlag, event); | |
198 } | |
199 | |
200 bool dragPromisedFilesOfTypes (NSArray typeArray, NSRect rect, Object sourceObject, bool aFlag, NSEvent event) | |
201 { | |
202 return invokeObjcSelf!(bool, "dragPromisedFilesOfTypes:fromRect:source:slideBack:event:", NSArray, NSRect, Object, bool, NSEvent)(typeArray, rect, sourceObject, aFlag, event); | |
203 } | |
204 | |
205 //mixin ObjcBindMethod!(dragImage, "dragImage:at:offset:event:pasteboard:source:slideBack:"); | |
206 //mixin ObjcBindMethod!(registeredDraggedTypes, "registeredDraggedTypes"); | |
207 //mixin ObjcBindMethod!(registerForDraggedTypes, "registerForDraggedTypes:"); | |
208 //mixin ObjcBindMethod!(unregisterDraggedTypes, "unregisterDraggedTypes"); | |
209 //mixin ObjcBindMethod!(dragFile, "dragFile:fromRect:slideBack:event:"); | |
210 //mixin ObjcBindMethod!(dragPromisedFilesOfTypes, "dragPromisedFilesOfTypes:fromRect:source:slideBack:event:"); | |
211 | |
212 `; | |
213 | |
214 const TNSFullScreenMode = ` | |
215 | |
216 bool enterFullScreenMode (NSScreen screen, NSDictionary options) | |
217 { | |
218 return invokeObjcSelf!(bool, "enterFullScreenMode:withOptions:", NSScreen, NSDictionary)(screen, options); | |
219 } | |
220 | |
221 void exitFullScreenModeWithOptions (NSDictionary options) | |
222 { | |
223 return invokeObjcSelf!(void, "exitFullScreenModeWithOptions:", NSDictionary)(options); | |
224 } | |
225 | |
226 bool isInFullScreenMode () | |
227 { | |
228 return invokeObjcSelf!(bool, "isInFullScreenMode"); | |
229 } | |
230 | |
231 //mixin ObjcBindMethod!(enterFullScreenMode, "enterFullScreenMode:withOptions:"); | |
232 //mixin ObjcBindMethod!(exitFullScreenModeWithOptions, "exitFullScreenModeWithOptions:"); | |
233 //mixin ObjcBindMethod!(isInFullScreenMode, "isInFullScreenMode"); | |
234 | |
235 `; | |
236 | |
237 const TNSToolTipOwner = ` | |
238 | |
239 NSString view (NSView view, int tag, NSPoint point, void* data) | |
240 { | |
241 return invokeObjcSelf!(NSString, "view:stringForToolTip:point:userData:", NSView, int, NSPoint, void*)(view, tag, point, data); | |
242 } | |
243 | |
244 //mixin ObjcBindMethod!(view, "view:stringForToolTip:point:userData:"); | |
245 | |
246 `; | |
247 | |
248 const TNSPrinting = ` | |
249 | |
250 void writeEPSInsideRect (NSRect rect, NSPasteboard pasteboard) | |
251 { | |
252 return invokeObjcSelf!(void, "writeEPSInsideRect:toPasteboard:", NSRect, NSPasteboard)(rect, pasteboard); | |
253 } | |
254 | |
255 NSData dataWithEPSInsideRect (NSRect rect) | |
256 { | |
257 return invokeObjcSelf!(NSData, "dataWithEPSInsideRect:", NSRect)(rect); | |
258 } | |
259 | |
260 void writePDFInsideRect (NSRect rect, NSPasteboard pasteboard) | |
261 { | |
262 return invokeObjcSelf!(void, "writePDFInsideRect:toPasteboard:", NSRect, NSPasteboard)(rect, pasteboard); | |
263 } | |
264 | |
265 NSData dataWithPDFInsideRect (NSRect rect) | |
266 { | |
267 return invokeObjcSelf!(NSData, "dataWithPDFInsideRect:", NSRect)(rect); | |
268 } | |
269 | |
270 void print (Object sender) | |
271 { | |
272 return invokeObjcSelf!(void, "print:", Object)(sender); | |
273 } | |
274 | |
275 bool knowsPageRange (NSRangePointer range) | |
276 { | |
277 return invokeObjcSelf!(bool, "knowsPageRange:", NSRangePointer)(range); | |
278 } | |
279 | |
280 CGFloat heightAdjustLimit () | |
281 { | |
282 return invokeObjcSelf!(CGFloat, "heightAdjustLimit"); | |
283 } | |
284 | |
285 CGFloat widthAdjustLimit () | |
286 { | |
287 return invokeObjcSelf!(CGFloat, "widthAdjustLimit"); | |
288 } | |
289 | |
290 void adjustPageWidthNew (CGFloat* newRight, CGFloat oldLeft, CGFloat oldRight, CGFloat rightLimit) | |
291 { | |
292 return invokeObjcSelf!(void, "adjustPageWidthNew:left:right:limit:", CGFloat*, CGFloat, CGFloat, CGFloat)(newRight, oldLeft, oldRight, rightLimit); | |
293 } | |
294 | |
295 void adjustPageHeightNew (CGFloat* newBottom, CGFloat oldTop, CGFloat oldBottom, CGFloat bottomLimit) | |
296 { | |
297 return invokeObjcSelf!(void, "adjustPageHeightNew:top:bottom:limit:", CGFloat*, CGFloat, CGFloat, CGFloat)(newBottom, oldTop, oldBottom, bottomLimit); | |
298 } | |
299 | |
300 NSRect rectForPage (NSInteger page) | |
301 { | |
302 return invokeObjcSelf!(NSRect, "rectForPage:", NSInteger)(page); | |
303 } | |
304 | |
305 NSPoint locationOfPrintRect (NSRect aRect) | |
306 { | |
307 return invokeObjcSelf!(NSPoint, "locationOfPrintRect:", NSRect)(aRect); | |
308 } | |
309 | |
310 void drawPageBorderWithSize (NSSize borderSize) | |
311 { | |
312 return invokeObjcSelf!(void, "drawPageBorderWithSize:", NSSize)(borderSize); | |
313 } | |
314 | |
315 NSAttributedString pageHeader () | |
316 { | |
317 return invokeObjcSelf!(NSAttributedString, "pageHeader"); | |
318 } | |
319 | |
320 NSAttributedString pageFooter () | |
321 { | |
322 return invokeObjcSelf!(NSAttributedString, "pageFooter"); | |
323 } | |
324 | |
325 void drawSheetBorderWithSize (NSSize borderSize) | |
326 { | |
327 return invokeObjcSelf!(void, "drawSheetBorderWithSize:", NSSize)(borderSize); | |
328 } | |
329 | |
330 NSString printJobTitle () | |
331 { | |
332 return invokeObjcSelf!(NSString, "printJobTitle"); | |
333 } | |
334 | |
335 void beginDocument () | |
336 { | |
337 return invokeObjcSelf!(void, "beginDocument"); | |
338 } | |
339 | |
340 void endDocument () | |
341 { | |
342 return invokeObjcSelf!(void, "endDocument"); | |
343 } | |
344 | |
345 void beginPageInRect (NSRect aRect, NSPoint location) | |
346 { | |
347 return invokeObjcSelf!(void, "beginPageInRect:atPlacement:", NSRect, NSPoint)(aRect, location); | |
348 } | |
349 | |
350 void endPage () | |
351 { | |
352 return invokeObjcSelf!(void, "endPage"); | |
353 } | |
354 | |
355 //mixin ObjcBindMethod!(writeEPSInsideRect, "writeEPSInsideRect:toPasteboard:"); | |
356 //mixin ObjcBindMethod!(dataWithEPSInsideRect, "dataWithEPSInsideRect:"); | |
357 //mixin ObjcBindMethod!(writePDFInsideRect, "writePDFInsideRect:toPasteboard:"); | |
358 //mixin ObjcBindMethod!(dataWithPDFInsideRect, "dataWithPDFInsideRect:"); | |
359 //mixin ObjcBindMethod!(print, "print:"); | |
360 //mixin ObjcBindMethod!(knowsPageRange, "knowsPageRange:"); | |
361 //mixin ObjcBindMethod!(heightAdjustLimit, "heightAdjustLimit"); | |
362 //mixin ObjcBindMethod!(widthAdjustLimit, "widthAdjustLimit"); | |
363 //mixin ObjcBindMethod!(adjustPageWidthNew, "adjustPageWidthNew:left:right:limit:"); | |
364 //mixin ObjcBindMethod!(adjustPageHeightNew, "adjustPageHeightNew:top:bottom:limit:"); | |
365 //mixin ObjcBindMethod!(rectForPage, "rectForPage:"); | |
366 //mixin ObjcBindMethod!(locationOfPrintRect, "locationOfPrintRect:"); | |
367 //mixin ObjcBindMethod!(drawPageBorderWithSize, "drawPageBorderWithSize:"); | |
368 //mixin ObjcBindMethod!(pageHeader, "pageHeader"); | |
369 //mixin ObjcBindMethod!(pageFooter, "pageFooter"); | |
370 //mixin ObjcBindMethod!(drawSheetBorderWithSize, "drawSheetBorderWithSize:"); | |
371 //mixin ObjcBindMethod!(printJobTitle, "printJobTitle"); | |
372 //mixin ObjcBindMethod!(beginDocument, "beginDocument"); | |
373 //mixin ObjcBindMethod!(endDocument, "endDocument"); | |
374 //mixin ObjcBindMethod!(beginPageInRect, "beginPageInRect:atPlacement:"); | |
375 //mixin ObjcBindMethod!(endPage, "endPage"); | |
376 | |
377 `; | |
378 | |
379 class NSView : NSResponder | |
380 { | |
381 mixin (ObjcWrap); | |
382 | |
383 NSView initWithFrame (NSRect frameRect) | |
384 { | |
385 id result = invokeObjcSelf!(id, "initWithFrame:", NSRect)(frameRect); | |
386 return result is this.objcObject ? this : (result !is null ? new NSView(result) : null); | |
387 } | |
388 | |
389 this (NSRect frameRect) | |
390 { | |
391 super(NSView.alloc.initWithFrame(frameRect).objcObject); | |
392 } | |
393 | |
394 NSWindow window () | |
395 { | |
396 return invokeObjcSelf!(NSWindow, "window"); | |
397 } | |
398 | |
399 NSView superview () | |
400 { | |
401 id result = invokeObjcSelf!(id, "superview"); | |
402 return result is this.objcObject ? this : (result !is null ? new NSView(result) : null); | |
403 } | |
404 | |
405 NSArray subviews () | |
406 { | |
407 return invokeObjcSelf!(NSArray, "subviews"); | |
408 } | |
409 | |
410 bool isDescendantOf (NSView aView) | |
411 { | |
412 return invokeObjcSelf!(bool, "isDescendantOf:", NSView)(aView); | |
413 } | |
414 | |
415 NSView ancestorSharedWithView (NSView aView) | |
416 { | |
417 id result = invokeObjcSelf!(id, "ancestorSharedWithView:", NSView)(aView); | |
418 return result is this.objcObject ? this : (result !is null ? new NSView(result) : null); | |
419 } | |
420 | |
421 NSView opaqueAncestor () | |
422 { | |
423 id result = invokeObjcSelf!(id, "opaqueAncestor"); | |
424 return result is this.objcObject ? this : (result !is null ? new NSView(result) : null); | |
425 } | |
426 | |
427 void setHidden (bool flag) | |
428 { | |
429 return invokeObjcSelf!(void, "setHidden:", bool)(flag); | |
430 } | |
431 | |
432 bool isHidden () | |
433 { | |
434 return invokeObjcSelf!(bool, "isHidden"); | |
435 } | |
436 | |
437 bool isHiddenOrHasHiddenAncestor () | |
438 { | |
439 return invokeObjcSelf!(bool, "isHiddenOrHasHiddenAncestor"); | |
440 } | |
441 | |
442 void getRectsBeingDrawn (out NSRect* rects, out NSInteger count) | |
443 { | |
444 return invokeObjcSelf!(void, "getRectsBeingDrawn:count:", NSRect**, NSInteger*)(&rects, &count); | |
445 } | |
446 | |
447 bool needsToDrawRect (NSRect aRect) | |
448 { | |
449 return invokeObjcSelf!(bool, "needsToDrawRect:", NSRect)(aRect); | |
450 } | |
451 | |
452 bool wantsDefaultClipping () | |
453 { | |
454 return invokeObjcSelf!(bool, "wantsDefaultClipping"); | |
455 } | |
456 | |
457 void viewDidHide () | |
458 { | |
459 return invokeObjcSelf!(void, "viewDidHide"); | |
460 } | |
461 | |
462 void viewDidUnhide () | |
463 { | |
464 return invokeObjcSelf!(void, "viewDidUnhide"); | |
465 } | |
466 | |
467 void setSubviews (NSArray newSubviews) | |
468 { | |
469 return invokeObjcSelf!(void, "setSubviews:", NSArray)(newSubviews); | |
470 } | |
471 | |
472 void addSubview (NSView aView) | |
473 { | |
474 return invokeObjcSelf!(void, "addSubview:", NSView)(aView); | |
475 } | |
476 | |
477 void addSubview (NSView aView, int place, NSView otherView) | |
478 { | |
479 return invokeObjcSelf!(void, "addSubview:positioned:relativeTo:", NSView, int, NSView)(aView, place, otherView); | |
480 } | |
481 | |
482 void sortSubviewsUsingFunction (Compare compare, void* context) | |
483 { | |
484 return invokeObjcSelf!(void, "sortSubviewsUsingFunction:context:", Compare, void*)(compare, context); | |
485 } | |
486 | |
487 void viewWillMoveToWindow (NSWindow newWindow) | |
488 { | |
489 return invokeObjcSelf!(void, "viewWillMoveToWindow:", NSWindow)(newWindow); | |
490 } | |
491 | |
492 void viewDidMoveToWindow () | |
493 { | |
494 return invokeObjcSelf!(void, "viewDidMoveToWindow"); | |
495 } | |
496 | |
497 void viewWillMoveToSuperview (NSView newSuperview) | |
498 { | |
499 return invokeObjcSelf!(void, "viewWillMoveToSuperview:", NSView)(newSuperview); | |
500 } | |
501 | |
502 void viewDidMoveToSuperview () | |
503 { | |
504 return invokeObjcSelf!(void, "viewDidMoveToSuperview"); | |
505 } | |
506 | |
507 void didAddSubview (NSView subview) | |
508 { | |
509 return invokeObjcSelf!(void, "didAddSubview:", NSView)(subview); | |
510 } | |
511 | |
512 void willRemoveSubview (NSView subview) | |
513 { | |
514 return invokeObjcSelf!(void, "willRemoveSubview:", NSView)(subview); | |
515 } | |
516 | |
517 void removeFromSuperview () | |
518 { | |
519 return invokeObjcSelf!(void, "removeFromSuperview"); | |
520 } | |
521 | |
522 void replaceSubview (NSView oldView, NSView newView) | |
523 { | |
524 return invokeObjcSelf!(void, "replaceSubview:with:", NSView, NSView)(oldView, newView); | |
525 } | |
526 | |
527 void removeFromSuperviewWithoutNeedingDisplay () | |
528 { | |
529 return invokeObjcSelf!(void, "removeFromSuperviewWithoutNeedingDisplay"); | |
530 } | |
531 | |
532 void setPostsFrameChangedNotifications (bool flag) | |
533 { | |
534 return invokeObjcSelf!(void, "setPostsFrameChangedNotifications:", bool)(flag); | |
535 } | |
536 | |
537 bool postsFrameChangedNotifications () | |
538 { | |
539 return invokeObjcSelf!(bool, "postsFrameChangedNotifications"); | |
540 } | |
541 | |
542 void resizeSubviewsWithOldSize (NSSize oldSize) | |
543 { | |
544 return invokeObjcSelf!(void, "resizeSubviewsWithOldSize:", NSSize)(oldSize); | |
545 } | |
546 | |
547 void resizeWithOldSuperviewSize (NSSize oldSize) | |
548 { | |
549 return invokeObjcSelf!(void, "resizeWithOldSuperviewSize:", NSSize)(oldSize); | |
550 } | |
551 | |
552 void setAutoresizesSubviews (bool flag) | |
553 { | |
554 return invokeObjcSelf!(void, "setAutoresizesSubviews:", bool)(flag); | |
555 } | |
556 | |
557 bool autoresizesSubviews () | |
558 { | |
559 return invokeObjcSelf!(bool, "autoresizesSubviews"); | |
560 } | |
561 | |
562 void setAutoresizingMask (NSUInteger mask) | |
563 { | |
564 return invokeObjcSelf!(void, "setAutoresizingMask:", NSUInteger)(mask); | |
565 } | |
566 | |
567 NSUInteger autoresizingMask () | |
568 { | |
569 return invokeObjcSelf!(NSUInteger, "autoresizingMask"); | |
570 } | |
571 | |
572 void setFrameOrigin (NSPoint newOrigin) | |
573 { | |
574 return invokeObjcSelf!(void, "setFrameOrigin:", NSPoint)(newOrigin); | |
575 } | |
576 | |
577 void setFrameSize (NSSize newSize) | |
578 { | |
579 return invokeObjcSelf!(void, "setFrameSize:", NSSize)(newSize); | |
580 } | |
581 | |
582 void setFrame (NSRect frameRect) | |
583 { | |
584 return invokeObjcSelf!(void, "setFrame:", NSRect)(frameRect); | |
585 } | |
586 | |
587 NSRect frame () | |
588 { | |
589 return invokeObjcSelf!(NSRect, "frame"); | |
590 } | |
591 | |
592 void setFrameRotation (CGFloat angle) | |
593 { | |
594 return invokeObjcSelf!(void, "setFrameRotation:", CGFloat)(angle); | |
595 } | |
596 | |
597 CGFloat frameRotation () | |
598 { | |
599 return invokeObjcSelf!(CGFloat, "frameRotation"); | |
600 } | |
601 | |
602 void setFrameCenterRotation (CGFloat angle) | |
603 { | |
604 return invokeObjcSelf!(void, "setFrameCenterRotation:", CGFloat)(angle); | |
605 } | |
606 | |
607 CGFloat frameCenterRotation () | |
608 { | |
609 return invokeObjcSelf!(CGFloat, "frameCenterRotation"); | |
610 } | |
611 | |
612 void setBoundsOrigin (NSPoint newOrigin) | |
613 { | |
614 return invokeObjcSelf!(void, "setBoundsOrigin:", NSPoint)(newOrigin); | |
615 } | |
616 | |
617 void setBoundsSize (NSSize newSize) | |
618 { | |
619 return invokeObjcSelf!(void, "setBoundsSize:", NSSize)(newSize); | |
620 } | |
621 | |
622 void setBoundsRotation (CGFloat angle) | |
623 { | |
624 return invokeObjcSelf!(void, "setBoundsRotation:", CGFloat)(angle); | |
625 } | |
626 | |
627 CGFloat boundsRotation () | |
628 { | |
629 return invokeObjcSelf!(CGFloat, "boundsRotation"); | |
630 } | |
631 | |
632 void translateOriginToPoint (NSPoint translation) | |
633 { | |
634 return invokeObjcSelf!(void, "translateOriginToPoint:", NSPoint)(translation); | |
635 } | |
636 | |
637 void scaleUnitSquareToSize (NSSize newUnitSize) | |
638 { | |
639 return invokeObjcSelf!(void, "scaleUnitSquareToSize:", NSSize)(newUnitSize); | |
640 } | |
641 | |
642 void rotateByAngle (CGFloat angle) | |
643 { | |
644 return invokeObjcSelf!(void, "rotateByAngle:", CGFloat)(angle); | |
645 } | |
646 | |
647 void setBounds (NSRect aRect) | |
648 { | |
649 return invokeObjcSelf!(void, "setBounds:", NSRect)(aRect); | |
650 } | |
651 | |
652 NSRect bounds () | |
653 { | |
654 return invokeObjcSelf!(NSRect, "bounds"); | |
655 } | |
656 | |
657 bool isFlipped () | |
658 { | |
659 return invokeObjcSelf!(bool, "isFlipped"); | |
660 } | |
661 | |
662 bool isRotatedFromBase () | |
663 { | |
664 return invokeObjcSelf!(bool, "isRotatedFromBase"); | |
665 } | |
666 | |
667 bool isRotatedOrScaledFromBase () | |
668 { | |
669 return invokeObjcSelf!(bool, "isRotatedOrScaledFromBase"); | |
670 } | |
671 | |
672 bool isOpaque () | |
673 { | |
674 return invokeObjcSelf!(bool, "isOpaque"); | |
675 } | |
676 | |
677 NSPoint convertPoint (NSPoint aPoint, NSView aView) | |
678 { | |
679 return invokeObjcSelf!(NSPoint, "convertPoint:fromView:", NSPoint, NSView)(aPoint, aView); | |
680 } | |
681 | |
682 NSPoint convertPoint (NSPoint aPoint, NSView aView) | |
683 { | |
684 return invokeObjcSelf!(NSPoint, "convertPoint:toView:", NSPoint, NSView)(aPoint, aView); | |
685 } | |
686 | |
687 NSSize convertSize (NSSize aSize, NSView aView) | |
688 { | |
689 return invokeObjcSelf!(NSSize, "convertSize:fromView:", NSSize, NSView)(aSize, aView); | |
690 } | |
691 | |
692 NSSize convertSize (NSSize aSize, NSView aView) | |
693 { | |
694 return invokeObjcSelf!(NSSize, "convertSize:toView:", NSSize, NSView)(aSize, aView); | |
695 } | |
696 | |
697 NSRect convertRect (NSRect aRect, NSView aView) | |
698 { | |
699 return invokeObjcSelf!(NSRect, "convertRect:fromView:", NSRect, NSView)(aRect, aView); | |
700 } | |
701 | |
702 NSRect convertRect (NSRect aRect, NSView aView) | |
703 { | |
704 return invokeObjcSelf!(NSRect, "convertRect:toView:", NSRect, NSView)(aRect, aView); | |
705 } | |
706 | |
707 NSRect centerScanRect (NSRect aRect) | |
708 { | |
709 return invokeObjcSelf!(NSRect, "centerScanRect:", NSRect)(aRect); | |
710 } | |
711 | |
712 NSPoint convertPointToBase (NSPoint aPoint) | |
713 { | |
714 return invokeObjcSelf!(NSPoint, "convertPointToBase:", NSPoint)(aPoint); | |
715 } | |
716 | |
717 NSPoint convertPointFromBase (NSPoint aPoint) | |
718 { | |
719 return invokeObjcSelf!(NSPoint, "convertPointFromBase:", NSPoint)(aPoint); | |
720 } | |
721 | |
722 NSSize convertSizeToBase (NSSize aSize) | |
723 { | |
724 return invokeObjcSelf!(NSSize, "convertSizeToBase:", NSSize)(aSize); | |
725 } | |
726 | |
727 NSSize convertSizeFromBase (NSSize aSize) | |
728 { | |
729 return invokeObjcSelf!(NSSize, "convertSizeFromBase:", NSSize)(aSize); | |
730 } | |
731 | |
732 NSRect convertRectToBase (NSRect aRect) | |
733 { | |
734 return invokeObjcSelf!(NSRect, "convertRectToBase:", NSRect)(aRect); | |
735 } | |
736 | |
737 NSRect convertRectFromBase (NSRect aRect) | |
738 { | |
739 return invokeObjcSelf!(NSRect, "convertRectFromBase:", NSRect)(aRect); | |
740 } | |
741 | |
742 bool canDraw () | |
743 { | |
744 return invokeObjcSelf!(bool, "canDraw"); | |
745 } | |
746 | |
747 void setNeedsDisplay (bool flag) | |
748 { | |
749 return invokeObjcSelf!(void, "setNeedsDisplay:", bool)(flag); | |
750 } | |
751 | |
752 void setNeedsDisplayInRect (NSRect invalidRect) | |
753 { | |
754 return invokeObjcSelf!(void, "setNeedsDisplayInRect:", NSRect)(invalidRect); | |
755 } | |
756 | |
757 bool needsDisplay () | |
758 { | |
759 return invokeObjcSelf!(bool, "needsDisplay"); | |
760 } | |
761 | |
762 void lockFocus () | |
763 { | |
764 return invokeObjcSelf!(void, "lockFocus"); | |
765 } | |
766 | |
767 void unlockFocus () | |
768 { | |
769 return invokeObjcSelf!(void, "unlockFocus"); | |
770 } | |
771 | |
772 bool lockFocusIfCanDraw () | |
773 { | |
774 return invokeObjcSelf!(bool, "lockFocusIfCanDraw"); | |
775 } | |
776 | |
777 bool lockFocusIfCanDrawInContext (NSGraphicsContext context) | |
778 { | |
779 return invokeObjcSelf!(bool, "lockFocusIfCanDrawInContext:", NSGraphicsContext)(context); | |
780 } | |
781 | |
782 static NSView focusView () | |
783 { | |
784 return invokeObjcSelfClass!(NSView, "focusView"); | |
785 } | |
786 | |
787 NSRect visibleRect () | |
788 { | |
789 return invokeObjcSelf!(NSRect, "visibleRect"); | |
790 } | |
791 | |
792 void display () | |
793 { | |
794 return invokeObjcSelf!(void, "display"); | |
795 } | |
796 | |
797 void displayIfNeeded () | |
798 { | |
799 return invokeObjcSelf!(void, "displayIfNeeded"); | |
800 } | |
801 | |
802 void displayIfNeededIgnoringOpacity () | |
803 { | |
804 return invokeObjcSelf!(void, "displayIfNeededIgnoringOpacity"); | |
805 } | |
806 | |
807 void displayRect (NSRect rect) | |
808 { | |
809 return invokeObjcSelf!(void, "displayRect:", NSRect)(rect); | |
810 } | |
811 | |
812 void displayIfNeededInRect (NSRect rect) | |
813 { | |
814 return invokeObjcSelf!(void, "displayIfNeededInRect:", NSRect)(rect); | |
815 } | |
816 | |
817 void displayRectIgnoringOpacity (NSRect rect) | |
818 { | |
819 return invokeObjcSelf!(void, "displayRectIgnoringOpacity:", NSRect)(rect); | |
820 } | |
821 | |
822 void displayIfNeededInRectIgnoringOpacity (NSRect rect) | |
823 { | |
824 return invokeObjcSelf!(void, "displayIfNeededInRectIgnoringOpacity:", NSRect)(rect); | |
825 } | |
826 | |
827 void drawRect (NSRect rect) | |
828 { | |
829 return invokeObjcSelf!(void, "drawRect:", NSRect)(rect); | |
830 } | |
831 | |
832 void displayRectIgnoringOpacity (NSRect aRect, NSGraphicsContext context) | |
833 { | |
834 return invokeObjcSelf!(void, "displayRectIgnoringOpacity:inContext:", NSRect, NSGraphicsContext)(aRect, context); | |
835 } | |
836 | |
837 NSBitmapImageRep bitmapImageRepForCachingDisplayInRect (NSRect rect) | |
838 { | |
839 return invokeObjcSelf!(NSBitmapImageRep, "bitmapImageRepForCachingDisplayInRect:", NSRect)(rect); | |
840 } | |
841 | |
842 void cacheDisplayInRect (NSRect rect, NSBitmapImageRep bitmapImageRep) | |
843 { | |
844 return invokeObjcSelf!(void, "cacheDisplayInRect:toBitmapImageRep:", NSRect, NSBitmapImageRep)(rect, bitmapImageRep); | |
845 } | |
846 | |
847 void viewWillDraw () | |
848 { | |
849 return invokeObjcSelf!(void, "viewWillDraw"); | |
850 } | |
851 | |
852 NSInteger gState () | |
853 { | |
854 return invokeObjcSelf!(NSInteger, "gState"); | |
855 } | |
856 | |
857 void releaseGState () | |
858 { | |
859 return invokeObjcSelf!(void, "releaseGState"); | |
860 } | |
861 | |
862 void setUpGState () | |
863 { | |
864 return invokeObjcSelf!(void, "setUpGState"); | |
865 } | |
866 | |
867 void renewGState () | |
868 { | |
869 return invokeObjcSelf!(void, "renewGState"); | |
870 } | |
871 | |
872 void scrollPoint (NSPoint aPoint) | |
873 { | |
874 return invokeObjcSelf!(void, "scrollPoint:", NSPoint)(aPoint); | |
875 } | |
876 | |
877 bool scrollRectToVisible (NSRect aRect) | |
878 { | |
879 return invokeObjcSelf!(bool, "scrollRectToVisible:", NSRect)(aRect); | |
880 } | |
881 | |
882 bool autoscroll (NSEvent theEvent) | |
883 { | |
884 return invokeObjcSelf!(bool, "autoscroll:", NSEvent)(theEvent); | |
885 } | |
886 | |
887 NSRect adjustScroll (NSRect newVisible) | |
888 { | |
889 return invokeObjcSelf!(NSRect, "adjustScroll:", NSRect)(newVisible); | |
890 } | |
891 | |
892 void scrollRect (NSRect aRect, NSSize delta) | |
893 { | |
894 return invokeObjcSelf!(void, "scrollRect:by:", NSRect, NSSize)(aRect, delta); | |
895 } | |
896 | |
897 void translateRectsNeedingDisplayInRect (NSRect clipRect, NSSize delta) | |
898 { | |
899 return invokeObjcSelf!(void, "translateRectsNeedingDisplayInRect:by:", NSRect, NSSize)(clipRect, delta); | |
900 } | |
901 | |
902 NSView hitTest (NSPoint aPoint) | |
903 { | |
904 id result = invokeObjcSelf!(id, "hitTest:", NSPoint)(aPoint); | |
905 return result is this.objcObject ? this : (result !is null ? new NSView(result) : null); | |
906 } | |
907 | |
908 bool mouse (NSPoint aPoint, NSRect aRect) | |
909 { | |
910 return invokeObjcSelf!(bool, "mouse:inRect:", NSPoint, NSRect)(aPoint, aRect); | |
911 } | |
912 | |
913 Object viewWithTag (NSInteger aTag) | |
914 { | |
915 return invokeObjcSelf!(Object, "viewWithTag:", NSInteger)(aTag); | |
916 } | |
917 | |
918 NSInteger tag () | |
919 { | |
920 return invokeObjcSelf!(NSInteger, "tag"); | |
921 } | |
922 | |
923 bool performKeyEquivalent (NSEvent theEvent) | |
924 { | |
925 return invokeObjcSelf!(bool, "performKeyEquivalent:", NSEvent)(theEvent); | |
926 } | |
927 | |
928 bool acceptsFirstMouse (NSEvent theEvent) | |
929 { | |
930 return invokeObjcSelf!(bool, "acceptsFirstMouse:", NSEvent)(theEvent); | |
931 } | |
932 | |
933 bool shouldDelayWindowOrderingForEvent (NSEvent theEvent) | |
934 { | |
935 return invokeObjcSelf!(bool, "shouldDelayWindowOrderingForEvent:", NSEvent)(theEvent); | |
936 } | |
937 | |
938 bool needsPanelToBecomeKey () | |
939 { | |
940 return invokeObjcSelf!(bool, "needsPanelToBecomeKey"); | |
941 } | |
942 | |
943 bool mouseDownCanMoveWindow () | |
944 { | |
945 return invokeObjcSelf!(bool, "mouseDownCanMoveWindow"); | |
946 } | |
947 | |
948 void addCursorRect (NSRect aRect, NSCursor anObj) | |
949 { | |
950 return invokeObjcSelf!(void, "addCursorRect:cursor:", NSRect, NSCursor)(aRect, anObj); | |
951 } | |
952 | |
953 void removeCursorRect (NSRect aRect, NSCursor anObj) | |
954 { | |
955 return invokeObjcSelf!(void, "removeCursorRect:cursor:", NSRect, NSCursor)(aRect, anObj); | |
956 } | |
957 | |
958 void discardCursorRects () | |
959 { | |
960 return invokeObjcSelf!(void, "discardCursorRects"); | |
961 } | |
962 | |
963 void resetCursorRects () | |
964 { | |
965 return invokeObjcSelf!(void, "resetCursorRects"); | |
966 } | |
967 | |
968 int addTrackingRect (NSRect aRect, Object anObject, void* data, bool flag) | |
969 { | |
970 return invokeObjcSelf!(int, "addTrackingRect:owner:userData:assumeInside:", NSRect, Object, void*, bool)(aRect, anObject, data, flag); | |
971 } | |
972 | |
973 void removeTrackingRect (int tag) | |
974 { | |
975 return invokeObjcSelf!(void, "removeTrackingRect:", int)(tag); | |
976 } | |
977 | |
978 void setWantsLayer (bool flag) | |
979 { | |
980 return invokeObjcSelf!(void, "setWantsLayer:", bool)(flag); | |
981 } | |
982 | |
983 bool wantsLayer () | |
984 { | |
985 return invokeObjcSelf!(bool, "wantsLayer"); | |
986 } | |
987 | |
988 void setLayer (CALayer newLayer) | |
989 { | |
990 return invokeObjcSelf!(void, "setLayer:", CALayer)(newLayer); | |
991 } | |
992 | |
993 CALayer layer () | |
994 { | |
995 return invokeObjcSelf!(CALayer, "layer"); | |
996 } | |
997 | |
998 void setAlphaValue (CGFloat viewAlpha) | |
999 { | |
1000 return invokeObjcSelf!(void, "setAlphaValue:", CGFloat)(viewAlpha); | |
1001 } | |
1002 | |
1003 CGFloat alphaValue () | |
1004 { | |
1005 return invokeObjcSelf!(CGFloat, "alphaValue"); | |
1006 } | |
1007 | |
1008 void setBackgroundFilters (NSArray filters) | |
1009 { | |
1010 return invokeObjcSelf!(void, "setBackgroundFilters:", NSArray)(filters); | |
1011 } | |
1012 | |
1013 NSArray backgroundFilters () | |
1014 { | |
1015 return invokeObjcSelf!(NSArray, "backgroundFilters"); | |
1016 } | |
1017 | |
1018 void setCompositingFilter (CIFilter filter) | |
1019 { | |
1020 return invokeObjcSelf!(void, "setCompositingFilter:", CIFilter)(filter); | |
1021 } | |
1022 | |
1023 CIFilter compositingFilter () | |
1024 { | |
1025 return invokeObjcSelf!(CIFilter, "compositingFilter"); | |
1026 } | |
1027 | |
1028 void setContentFilters (NSArray filters) | |
1029 { | |
1030 return invokeObjcSelf!(void, "setContentFilters:", NSArray)(filters); | |
1031 } | |
1032 | |
1033 NSArray contentFilters () | |
1034 { | |
1035 return invokeObjcSelf!(NSArray, "contentFilters"); | |
1036 } | |
1037 | |
1038 void setShadow (NSShadow shadow) | |
1039 { | |
1040 return invokeObjcSelf!(void, "setShadow:", NSShadow)(shadow); | |
1041 } | |
1042 | |
1043 NSShadow shadow () | |
1044 { | |
1045 return invokeObjcSelf!(NSShadow, "shadow"); | |
1046 } | |
1047 | |
1048 void addTrackingArea (NSTrackingArea trackingArea) | |
1049 { | |
1050 return invokeObjcSelf!(void, "addTrackingArea:", NSTrackingArea)(trackingArea); | |
1051 } | |
1052 | |
1053 void removeTrackingArea (NSTrackingArea trackingArea) | |
1054 { | |
1055 return invokeObjcSelf!(void, "removeTrackingArea:", NSTrackingArea)(trackingArea); | |
1056 } | |
1057 | |
1058 NSArray trackingAreas () | |
1059 { | |
1060 return invokeObjcSelf!(NSArray, "trackingAreas"); | |
1061 } | |
1062 | |
1063 void updateTrackingAreas () | |
1064 { | |
1065 return invokeObjcSelf!(void, "updateTrackingAreas"); | |
1066 } | |
1067 | |
1068 bool shouldDrawColor () | |
1069 { | |
1070 return invokeObjcSelf!(bool, "shouldDrawColor"); | |
1071 } | |
1072 | |
1073 void setPostsBoundsChangedNotifications (bool flag) | |
1074 { | |
1075 return invokeObjcSelf!(void, "setPostsBoundsChangedNotifications:", bool)(flag); | |
1076 } | |
1077 | |
1078 bool postsBoundsChangedNotifications () | |
1079 { | |
1080 return invokeObjcSelf!(bool, "postsBoundsChangedNotifications"); | |
1081 } | |
1082 | |
1083 NSScrollView enclosingScrollView () | |
1084 { | |
1085 return invokeObjcSelf!(NSScrollView, "enclosingScrollView"); | |
1086 } | |
1087 | |
1088 NSMenu menuForEvent (NSEvent event) | |
1089 { | |
1090 return invokeObjcSelf!(NSMenu, "menuForEvent:", NSEvent)(event); | |
1091 } | |
1092 | |
1093 static NSMenu defaultMenu () | |
1094 { | |
1095 return invokeObjcSelfClass!(NSMenu, "defaultMenu"); | |
1096 } | |
1097 | |
1098 void setToolTip (NSString string) | |
1099 { | |
1100 return invokeObjcSelf!(void, "setToolTip:", NSString)(string); | |
1101 } | |
1102 | |
1103 NSString toolTip () | |
1104 { | |
1105 return invokeObjcSelf!(NSString, "toolTip"); | |
1106 } | |
1107 | |
1108 int addToolTipRect (NSRect aRect, Object anObject, void* data) | |
1109 { | |
1110 return invokeObjcSelf!(int, "addToolTipRect:owner:userData:", NSRect, Object, void*)(aRect, anObject, data); | |
1111 } | |
1112 | |
1113 void removeToolTip (int tag) | |
1114 { | |
1115 return invokeObjcSelf!(void, "removeToolTip:", int)(tag); | |
1116 } | |
1117 | |
1118 void removeAllToolTips () | |
1119 { | |
1120 return invokeObjcSelf!(void, "removeAllToolTips"); | |
1121 } | |
1122 | |
1123 void viewWillStartLiveResize () | |
1124 { | |
1125 return invokeObjcSelf!(void, "viewWillStartLiveResize"); | |
1126 } | |
1127 | |
1128 void viewDidEndLiveResize () | |
1129 { | |
1130 return invokeObjcSelf!(void, "viewDidEndLiveResize"); | |
1131 } | |
1132 | |
1133 bool inLiveResize () | |
1134 { | |
1135 return invokeObjcSelf!(bool, "inLiveResize"); | |
1136 } | |
1137 | |
1138 bool preservesContentDuringLiveResize () | |
1139 { | |
1140 return invokeObjcSelf!(bool, "preservesContentDuringLiveResize"); | |
1141 } | |
1142 | |
1143 NSRect rectPreservedDuringLiveResize () | |
1144 { | |
1145 return invokeObjcSelf!(NSRect, "rectPreservedDuringLiveResize"); | |
1146 } | |
1147 | |
1148 void getRectsExposedDuringLiveResize (NSRect* exposedRects, NSInteger* count) | |
1149 { | |
1150 return invokeObjcSelf!(void, "getRectsExposedDuringLiveResize:count:", NSRect*, NSInteger*)(exposedRects, count); | |
1151 } | |
1152 | |
1153 // NSDrag | |
1154 void dragImage (NSImage anImage, NSPoint viewLocation, NSSize initialOffset, NSEvent event, NSPasteboard pboard, Object sourceObj, bool slideFlag) | |
1155 { | |
1156 return invokeObjcSelf!(void, "dragImage:at:offset:event:pasteboard:source:slideBack:", NSImage, NSPoint, NSSize, NSEvent, NSPasteboard, Object, bool)(anImage, viewLocation, initialOffset, event, pboard, sourceObj, slideFlag); | |
1157 } | |
1158 | |
1159 NSArray registeredDraggedTypes () | |
1160 { | |
1161 return invokeObjcSelf!(NSArray, "registeredDraggedTypes"); | |
1162 } | |
1163 | |
1164 void registerForDraggedTypes (NSArray newTypes) | |
1165 { | |
1166 return invokeObjcSelf!(void, "registerForDraggedTypes:", NSArray)(newTypes); | |
1167 } | |
1168 | |
1169 void unregisterDraggedTypes () | |
1170 { | |
1171 return invokeObjcSelf!(void, "unregisterDraggedTypes"); | |
1172 } | |
1173 | |
1174 bool dragFile (NSString filename, NSRect rect, bool aFlag, NSEvent event) | |
1175 { | |
1176 return invokeObjcSelf!(bool, "dragFile:fromRect:slideBack:event:", NSString, NSRect, bool, NSEvent)(filename, rect, aFlag, event); | |
1177 } | |
1178 | |
1179 bool dragPromisedFilesOfTypes (NSArray typeArray, NSRect rect, Object sourceObject, bool aFlag, NSEvent event) | |
1180 { | |
1181 return invokeObjcSelf!(bool, "dragPromisedFilesOfTypes:fromRect:source:slideBack:event:", NSArray, NSRect, Object, bool, NSEvent)(typeArray, rect, sourceObject, aFlag, event); | |
1182 } | |
1183 | |
1184 // NSFullScreenMode | |
1185 bool enterFullScreenMode (NSScreen screen, NSDictionary options) | |
1186 { | |
1187 return invokeObjcSelf!(bool, "enterFullScreenMode:withOptions:", NSScreen, NSDictionary)(screen, options); | |
1188 } | |
1189 | |
1190 void exitFullScreenModeWithOptions (NSDictionary options) | |
1191 { | |
1192 return invokeObjcSelf!(void, "exitFullScreenModeWithOptions:", NSDictionary)(options); | |
1193 } | |
1194 | |
1195 bool isInFullScreenMode () | |
1196 { | |
1197 return invokeObjcSelf!(bool, "isInFullScreenMode"); | |
1198 } | |
1199 | |
1200 // NSPrinting | |
1201 void writeEPSInsideRect (NSRect rect, NSPasteboard pasteboard) | |
1202 { | |
1203 return invokeObjcSelf!(void, "writeEPSInsideRect:toPasteboard:", NSRect, NSPasteboard)(rect, pasteboard); | |
1204 } | |
1205 | |
1206 NSData dataWithEPSInsideRect (NSRect rect) | |
1207 { | |
1208 return invokeObjcSelf!(NSData, "dataWithEPSInsideRect:", NSRect)(rect); | |
1209 } | |
1210 | |
1211 void writePDFInsideRect (NSRect rect, NSPasteboard pasteboard) | |
1212 { | |
1213 return invokeObjcSelf!(void, "writePDFInsideRect:toPasteboard:", NSRect, NSPasteboard)(rect, pasteboard); | |
1214 } | |
1215 | |
1216 NSData dataWithPDFInsideRect (NSRect rect) | |
1217 { | |
1218 return invokeObjcSelf!(NSData, "dataWithPDFInsideRect:", NSRect)(rect); | |
1219 } | |
1220 | |
1221 void print (Object sender) | |
1222 { | |
1223 return invokeObjcSelf!(void, "print:", Object)(sender); | |
1224 } | |
1225 | |
1226 bool knowsPageRange (NSRangePointer range) | |
1227 { | |
1228 return invokeObjcSelf!(bool, "knowsPageRange:", NSRangePointer)(range); | |
1229 } | |
1230 | |
1231 CGFloat heightAdjustLimit () | |
1232 { | |
1233 return invokeObjcSelf!(CGFloat, "heightAdjustLimit"); | |
1234 } | |
1235 | |
1236 CGFloat widthAdjustLimit () | |
1237 { | |
1238 return invokeObjcSelf!(CGFloat, "widthAdjustLimit"); | |
1239 } | |
1240 | |
1241 void adjustPageWidthNew (CGFloat* newRight, CGFloat oldLeft, CGFloat oldRight, CGFloat rightLimit) | |
1242 { | |
1243 return invokeObjcSelf!(void, "adjustPageWidthNew:left:right:limit:", CGFloat*, CGFloat, CGFloat, CGFloat)(newRight, oldLeft, oldRight, rightLimit); | |
1244 } | |
1245 | |
1246 void adjustPageHeightNew (CGFloat* newBottom, CGFloat oldTop, CGFloat oldBottom, CGFloat bottomLimit) | |
1247 { | |
1248 return invokeObjcSelf!(void, "adjustPageHeightNew:top:bottom:limit:", CGFloat*, CGFloat, CGFloat, CGFloat)(newBottom, oldTop, oldBottom, bottomLimit); | |
1249 } | |
1250 | |
1251 NSRect rectForPage (NSInteger page) | |
1252 { | |
1253 return invokeObjcSelf!(NSRect, "rectForPage:", NSInteger)(page); | |
1254 } | |
1255 | |
1256 NSPoint locationOfPrintRect (NSRect aRect) | |
1257 { | |
1258 return invokeObjcSelf!(NSPoint, "locationOfPrintRect:", NSRect)(aRect); | |
1259 } | |
1260 | |
1261 void drawPageBorderWithSize (NSSize borderSize) | |
1262 { | |
1263 return invokeObjcSelf!(void, "drawPageBorderWithSize:", NSSize)(borderSize); | |
1264 } | |
1265 | |
1266 NSAttributedString pageHeader () | |
1267 { | |
1268 return invokeObjcSelf!(NSAttributedString, "pageHeader"); | |
1269 } | |
1270 | |
1271 NSAttributedString pageFooter () | |
1272 { | |
1273 return invokeObjcSelf!(NSAttributedString, "pageFooter"); | |
1274 } | |
1275 | |
1276 void drawSheetBorderWithSize (NSSize borderSize) | |
1277 { | |
1278 return invokeObjcSelf!(void, "drawSheetBorderWithSize:", NSSize)(borderSize); | |
1279 } | |
1280 | |
1281 NSString printJobTitle () | |
1282 { | |
1283 return invokeObjcSelf!(NSString, "printJobTitle"); | |
1284 } | |
1285 | |
1286 void beginDocument () | |
1287 { | |
1288 return invokeObjcSelf!(void, "beginDocument"); | |
1289 } | |
1290 | |
1291 void endDocument () | |
1292 { | |
1293 return invokeObjcSelf!(void, "endDocument"); | |
1294 } | |
1295 | |
1296 void beginPageInRect (NSRect aRect, NSPoint location) | |
1297 { | |
1298 return invokeObjcSelf!(void, "beginPageInRect:atPlacement:", NSRect, NSPoint)(aRect, location); | |
1299 } | |
1300 | |
1301 void endPage () | |
1302 { | |
1303 return invokeObjcSelf!(void, "endPage"); | |
1304 } | |
1305 | |
1306 // NSViewEnclosingMenuItem | |
1307 NSMenuItem enclosingMenuItem () | |
1308 { | |
1309 return invokeObjcSelf!(NSMenuItem, "enclosingMenuItem"); | |
1310 } | |
1311 | |
1312 // NSRulerMarkerClientViewDelegation | |
1313 bool rulerView_shouldMoveMarker (NSRulerView ruler, NSRulerMarker marker) | |
1314 { | |
1315 return invokeObjcSelf!(bool, "rulerView:shouldMoveMarker:", NSRulerView, NSRulerMarker)(ruler, marker); | |
1316 } | |
1317 | |
1318 CGFloat rulerView (NSRulerView ruler, NSRulerMarker marker, CGFloat location) | |
1319 { | |
1320 return invokeObjcSelf!(CGFloat, "rulerView:willMoveMarker:toLocation:", NSRulerView, NSRulerMarker, CGFloat)(ruler, marker, location); | |
1321 } | |
1322 | |
1323 void rulerView (NSRulerView ruler, NSRulerMarker marker) | |
1324 { | |
1325 return invokeObjcSelf!(void, "rulerView:didMoveMarker:", NSRulerView, NSRulerMarker)(ruler, marker); | |
1326 } | |
1327 | |
1328 void rulerView_shouldRemoveMarker (NSRulerView ruler, NSRulerMarker marker) | |
1329 { | |
1330 return invokeObjcSelf!(void, "rulerView:shouldRemoveMarker:", NSRulerView, NSRulerMarker)(ruler, marker); | |
1331 } | |
1332 | |
1333 void rulerView_didRemoveMarker (NSRulerView ruler, NSRulerMarker marker) | |
1334 { | |
1335 return invokeObjcSelf!(void, "rulerView:didRemoveMarker:", NSRulerView, NSRulerMarker)(ruler, marker); | |
1336 } | |
1337 | |
1338 bool rulerView_shouldAddMarker (NSRulerView ruler, NSRulerMarker marker) | |
1339 { | |
1340 return invokeObjcSelf!(bool, "rulerView:shouldAddMarker:", NSRulerView, NSRulerMarker)(ruler, marker); | |
1341 } | |
1342 | |
1343 CGFloat rulerView_willAddMarker_atLocation (NSRulerView ruler, NSRulerMarker marker, CGFloat location) | |
1344 { | |
1345 return invokeObjcSelf!(CGFloat, "rulerView:willAddMarker:atLocation:", NSRulerView, NSRulerMarker, CGFloat)(ruler, marker, location); | |
1346 } | |
1347 | |
1348 void rulerView_didAddMarker (NSRulerView ruler, NSRulerMarker marker) | |
1349 { | |
1350 return invokeObjcSelf!(void, "rulerView:didAddMarker:", NSRulerView, NSRulerMarker)(ruler, marker); | |
1351 } | |
1352 | |
1353 void rulerView (NSRulerView ruler, NSEvent event) | |
1354 { | |
1355 return invokeObjcSelf!(void, "rulerView:handleMouseDown:", NSRulerView, NSEvent)(ruler, event); | |
1356 } | |
1357 | |
1358 CGFloat rulerView (NSRulerView ruler, NSView newClient) | |
1359 { | |
1360 return invokeObjcSelf!(CGFloat, "rulerView:willSetClientView:", NSRulerView, NSView)(ruler, newClient); | |
1361 } | |
1362 | |
1363 // NSClipViewSuperview | |
1364 void reflectScrolledClipView (NSClipView aClipView) | |
1365 { | |
1366 return invokeObjcSelf!(void, "reflectScrolledClipView:", NSClipView)(aClipView); | |
1367 } | |
1368 | |
1369 void scrollClipView (NSClipView aClipView, NSPoint aPoint) | |
1370 { | |
1371 return invokeObjcSelf!(void, "scrollClipView:toPoint:", NSClipView, NSPoint)(aClipView, aPoint); | |
1372 } | |
1373 } |