comparison dwt/internal/cocoa/NSView.d @ 0:380af2bdd8e5

Upload of whole dwt tree
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Sat, 09 Aug 2008 17:00:02 +0200
parents
children 8b48be5454ce
comparison
equal deleted inserted replaced
-1:000000000000 0:380af2bdd8e5
1 /*******************************************************************************
2 * Copyright (c) 2007 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *
11 * Port to the D Programming language:
12 * Jacob Carlborg <jacob.carlborg@gmail.com>
13 *******************************************************************************/
14 module dwt.internal.cocoa.NSView;
15
16 import dwt.internal.cocoa.id;
17 import dwt.internal.cocoa.NSArray;
18 import dwt.internal.cocoa.NSAttributedString;
19 import dwt.internal.cocoa.NSBitmapImageRep;
20 import dwt.internal.cocoa.NSClipView;
21 import dwt.internal.cocoa.NSComparisonResult;
22 import dwt.internal.cocoa.NSCursor;
23 import dwt.internal.cocoa.NSData;
24 import dwt.internal.cocoa.NSDictionary;
25 import dwt.internal.cocoa.NSEvent;
26 import dwt.internal.cocoa.NSFocusRingType;
27 import dwt.internal.cocoa.NSGraphicsContext;
28 import dwt.internal.cocoa.NSImage;
29 import dwt.internal.cocoa.NSInteger;
30 import dwt.internal.cocoa.NSMenu;
31 import dwt.internal.cocoa.NSMenuItem;
32 import dwt.internal.cocoa.NSPasteboard;
33 import dwt.internal.cocoa.NSPoint;
34 import dwt.internal.cocoa.NSRange : NSRangePointer;
35 import dwt.internal.cocoa.NSRect;
36 import dwt.internal.cocoa.NSResponder;
37 import dwt.internal.cocoa.NSRulerMarker;
38 import dwt.internal.cocoa.NSRulerView;
39 import dwt.internal.cocoa.NSScreen;
40 import dwt.internal.cocoa.NSScrollView;
41 import dwt.internal.cocoa.NSShadow;
42 import dwt.internal.cocoa.NSSize;
43 import dwt.internal.cocoa.NSString;
44 import dwt.internal.cocoa.NSTrackingArea;
45 import dwt.internal.cocoa.NSWindow;
46 import dwt.internal.cocoa.OS;
47 import objc = dwt.internal.objc.runtime;
48
49 alias NSInteger NSToolTipTag;
50 alias NSInteger NSTrackingRectTag;
51
52
53
54 enum NSBorderType
55 {
56 NSNoBorder = 0,
57 NSLineBorder = 1,
58 NSBezelBorder = 2,
59 NSGrooveBorder = 3
60 }
61
62 alias NSBorderType.NSNoBorder NSNoBorder;
63 alias NSBorderType.NSLineBorder NSLineBorder;
64 alias NSBorderType.NSBezelBorder NSBezelBorder;
65 alias NSBorderType.NSGrooveBorder NSGrooveBorder;
66
67
68
69 public class NSView : NSResponder
70 {
71
72 public this ()
73 {
74 super();
75 }
76
77 public this (objc.id id)
78 {
79 super(id);
80 }
81
82 public bool acceptsFirstMouse (NSEvent theEvent)
83 {
84 return OS.objc_msgSend(this.id, OS.sel_acceptsFirstMouse_1, theEvent !is null ? theEvent.id : null) !is null;
85 }
86
87 public void addCursorRect (NSRect aRect, NSCursor anObj)
88 {
89 OS.objc_msgSend(this.id, OS.sel_addCursorRect_1cursor_1, aRect, anObj !is null ? anObj.id : null);
90 }
91
92 public void addSubview_ (NSView aView)
93 {
94 OS.objc_msgSend(this.id, OS.sel_addSubview_1, aView !is null ? aView.id : null);
95 }
96
97 public void addSubview_positioned_relativeTo_ (NSView aView, NSWindowOrderingMode place, NSView otherView)
98 {
99 OS.objc_msgSend(this.id, OS.sel_addSubview_1positioned_1relativeTo_1, aView !is null ? aView.id : null, place,
100 otherView !is null ? otherView.id : null);
101 }
102
103 public NSToolTipTag addToolTipRect (NSRect aRect, id anObject, void* data)
104 {
105 return cast(NSToolTipTag) OS.objc_msgSend(this.id, OS.sel_addToolTipRect_1owner_1userData_1, aRect, anObject !is null ? anObject.id : null, data);
106 }
107
108 public void addTrackingArea (NSTrackingArea trackingArea)
109 {
110 OS.objc_msgSend(this.id, OS.sel_addTrackingArea_1, trackingArea !is null ? trackingArea.id : null);
111 }
112
113 public NSTrackingRectTag addTrackingRect (NSRect aRect, id anObject, void* data, bool flag)
114 {
115 return cast(NSTrackingRectTag) OS.objc_msgSend(this.id, OS.sel_addTrackingRect_1owner_1userData_1assumeInside_1, aRect, anObject !is null ? anObject.id : null, data,
116 flag);
117 }
118
119 public void adjustPageHeightNew (CGFloat* newBottom, CGFloat oldTop, CGFloat oldBottom, CGFloat bottomLimit)
120 {
121 OS.objc_msgSend(this.id, OS.sel_adjustPageHeightNew_1top_1bottom_1limit_1, newBottom, oldTop, oldBottom, bottomLimit);
122 }
123
124 public void adjustPageWidthNew (CGFloat* newRight, CGFloat oldLeft, CGFloat oldRight, CGFloat rightLimit)
125 {
126 OS.objc_msgSend(this.id, OS.sel_adjustPageWidthNew_1left_1right_1limit_1, newRight, oldLeft, oldRight, rightLimit);
127 }
128
129 public NSRect adjustScroll (NSRect newVisible)
130 {
131 NSRect result;
132 OS.objc_msgSend_stret(result, this.id, OS.sel_adjustScroll_1, newVisible);
133 return result;
134 }
135
136 public void allocateGState ()
137 {
138 OS.objc_msgSend(this.id, OS.sel_allocateGState);
139 }
140
141 public CGFloat alphaValue ()
142 {
143 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_alphaValue);
144 }
145
146 public NSView ancestorSharedWithView (NSView aView)
147 {
148 objc.id result = OS.objc_msgSend(this.id, OS.sel_ancestorSharedWithView_1, aView !is null ? aView.id : null);
149 return result is this.id ? this : (result !is null ? new NSView(result) : null);
150 }
151
152 public bool autoresizesSubviews ()
153 {
154 return OS.objc_msgSend(this.id, OS.sel_autoresizesSubviews) !is null;
155 }
156
157 public NSUInteger autoresizingMask ()
158 {
159 return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_autoresizingMask);
160 }
161
162 public bool autoscroll (NSEvent theEvent)
163 {
164 return OS.objc_msgSend(this.id, OS.sel_autoscroll_1, theEvent !is null ? theEvent.id : null) !is null;
165 }
166
167 public NSArray backgroundFilters ()
168 {
169 objc.id result = OS.objc_msgSend(this.id, OS.sel_backgroundFilters);
170 return result !is null ? new NSArray(result) : null;
171 }
172
173 public void beginDocument ()
174 {
175 OS.objc_msgSend(this.id, OS.sel_beginDocument);
176 }
177
178 public void beginPageInRect (NSRect aRect, NSPoint location)
179 {
180 OS.objc_msgSend(this.id, OS.sel_beginPageInRect_1atPlacement_1, aRect, location);
181 }
182
183 public NSBitmapImageRep bitmapImageRepForCachingDisplayInRect (NSRect rect)
184 {
185 objc.id result = OS.objc_msgSend(this.id, OS.sel_bitmapImageRepForCachingDisplayInRect_1, rect);
186 return result !is null ? new NSBitmapImageRep(result) : null;
187 }
188
189 public NSRect bounds ()
190 {
191 NSRect result;
192 OS.objc_msgSend_stret(result, this.id, OS.sel_bounds);
193 return result;
194 }
195
196 public CGFloat boundsRotation ()
197 {
198 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_boundsRotation);
199 }
200
201 public void cacheDisplayInRect (NSRect rect, NSBitmapImageRep bitmapImageRep)
202 {
203 OS.objc_msgSend(this.id, OS.sel_cacheDisplayInRect_1toBitmapImageRep_1, rect, bitmapImageRep !is null ? bitmapImageRep.id : null);
204 }
205
206 public bool canBecomeKeyView ()
207 {
208 return OS.objc_msgSend(this.id, OS.sel_canBecomeKeyView) !is null;
209 }
210
211 public bool canDraw ()
212 {
213 return OS.objc_msgSend(this.id, OS.sel_canDraw) !is null;
214 }
215
216 public NSRect centerScanRect (NSRect aRect)
217 {
218 NSRect result;
219 OS.objc_msgSend_stret(result, this.id, OS.sel_centerScanRect_1, aRect);
220 return result;
221 }
222
223 //public CIFilter compositingFilter() {
224 // objc.id result = OS.objc_msgSend(this.id, OS.sel_compositingFilter);
225 // return result !is null ? new CIFilter(result) : null;
226 //}
227
228 public NSArray contentFilters ()
229 {
230 objc.id result = OS.objc_msgSend(this.id, OS.sel_contentFilters);
231 return result !is null ? new NSArray(result) : null;
232 }
233
234 public NSPoint convertPoint_fromView_ (NSPoint aPoint, NSView aView)
235 {
236 NSPoint result;
237 OS.objc_msgSend_struct(result, this.id, OS.sel_convertPoint_1fromView_1, aPoint, aView !is null ? aView.id : null);
238 return result;
239 }
240
241 public NSPoint convertPoint_toView_ (NSPoint aPoint, NSView aView)
242 {
243 NSPoint result;
244 OS.objc_msgSend_struct(result, this.id, OS.sel_convertPoint_1toView_1, aPoint, aView !is null ? aView.id : null);
245 return result;
246 }
247
248 public NSPoint convertPointFromBase (NSPoint aPoint)
249 {
250 NSPoint result;
251 OS.objc_msgSend_stret(result, this.id, OS.sel_convertPointFromBase_1, aPoint);
252 return result;
253 }
254
255 public NSPoint convertPointToBase (NSPoint aPoint)
256 {
257 NSPoint result;
258 OS.objc_msgSend_stret(result, this.id, OS.sel_convertPointToBase_1, aPoint);
259 return result;
260 }
261
262 public NSRect convertRect_fromView_ (NSRect aRect, NSView aView)
263 {
264 NSRect result;
265 OS.objc_msgSend_stret(result, this.id, OS.sel_convertRect_1fromView_1, aRect, aView !is null ? aView.id : null);
266 return result;
267 }
268
269 public NSRect convertRect_toView_ (NSRect aRect, NSView aView)
270 {
271 NSRect result;
272 OS.objc_msgSend_stret(result, this.id, OS.sel_convertRect_1toView_1, aRect, aView !is null ? aView.id : null);
273 return result;
274 }
275
276 public NSRect convertRectFromBase (NSRect aRect)
277 {
278 NSRect result;
279 OS.objc_msgSend_stret(result, this.id, OS.sel_convertRectFromBase_1, aRect);
280 return result;
281 }
282
283 public NSRect convertRectToBase (NSRect aRect)
284 {
285 NSRect result;
286 OS.objc_msgSend_stret(result, this.id, OS.sel_convertRectToBase_1, aRect);
287 return result;
288 }
289
290 public NSSize convertSize_fromView_ (NSSize aSize, NSView aView)
291 {
292 NSSize result;
293 OS.objc_msgSend_stret(result, this.id, OS.sel_convertSize_1fromView_1, aSize, aView !is null ? aView.id : null);
294 return result;
295 }
296
297 public NSSize convertSize_toView_ (NSSize aSize, NSView aView)
298 {
299 NSSize result;
300 OS.objc_msgSend_stret(result, this.id, OS.sel_convertSize_1toView_1, aSize, aView !is null ? aView.id : null);
301 return result;
302 }
303
304 public NSSize convertSizeFromBase (NSSize aSize)
305 {
306 NSSize result;
307 OS.objc_msgSend_stret(result, this.id, OS.sel_convertSizeFromBase_1, aSize);
308 return result;
309 }
310
311 public NSSize convertSizeToBase (NSSize aSize)
312 {
313 NSSize result;
314 OS.objc_msgSend_stret(result, this.id, OS.sel_convertSizeToBase_1, aSize);
315 return result;
316 }
317
318 public NSData dataWithEPSInsideRect (NSRect rect)
319 {
320 objc.id result = OS.objc_msgSend(this.id, OS.sel_dataWithEPSInsideRect_1, rect);
321 return result !is null ? new NSData(result) : null;
322 }
323
324 public NSData dataWithPDFInsideRect (NSRect rect)
325 {
326 objc.id result = OS.objc_msgSend(this.id, OS.sel_dataWithPDFInsideRect_1, rect);
327 return result !is null ? new NSData(result) : null;
328 }
329
330 public static NSFocusRingType defaultFocusRingType ()
331 {
332 return cast(NSFocusRingType) OS.objc_msgSend(OS.class_NSView, OS.sel_defaultFocusRingType);
333 }
334
335 public static NSMenu defaultMenu ()
336 {
337 objc.id result = OS.objc_msgSend(OS.class_NSView, OS.sel_defaultMenu);
338 return result !is null ? new NSMenu(result) : null;
339 }
340
341 public void didAddSubview (NSView subview)
342 {
343 OS.objc_msgSend(this.id, OS.sel_didAddSubview_1, subview !is null ? subview.id : null);
344 }
345
346 public void discardCursorRects ()
347 {
348 OS.objc_msgSend(this.id, OS.sel_discardCursorRects);
349 }
350
351 public void display ()
352 {
353 OS.objc_msgSend(this.id, OS.sel_display);
354 }
355
356 public void displayIfNeeded ()
357 {
358 OS.objc_msgSend(this.id, OS.sel_displayIfNeeded);
359 }
360
361 public void displayIfNeededIgnoringOpacity ()
362 {
363 OS.objc_msgSend(this.id, OS.sel_displayIfNeededIgnoringOpacity);
364 }
365
366 public void displayIfNeededInRect (NSRect rect)
367 {
368 OS.objc_msgSend(this.id, OS.sel_displayIfNeededInRect_1, rect);
369 }
370
371 public void displayIfNeededInRectIgnoringOpacity (NSRect rect)
372 {
373 OS.objc_msgSend(this.id, OS.sel_displayIfNeededInRectIgnoringOpacity_1, rect);
374 }
375
376 public void displayRect (NSRect rect)
377 {
378 OS.objc_msgSend(this.id, OS.sel_displayRect_1, rect);
379 }
380
381 public void displayRectIgnoringOpacity_ (NSRect rect)
382 {
383 OS.objc_msgSend(this.id, OS.sel_displayRectIgnoringOpacity_1, rect);
384 }
385
386 public void displayRectIgnoringOpacity_inContext_ (NSRect aRect, NSGraphicsContext context)
387 {
388 OS.objc_msgSend(this.id, OS.sel_displayRectIgnoringOpacity_1inContext_1, aRect, context !is null ? context.id : null);
389 }
390
391 public bool dragFile (NSString filename, NSRect rect, bool aFlag, NSEvent event)
392 {
393 return OS.objc_msgSend(this.id, OS.sel_dragFile_1fromRect_1slideBack_1event_1, filename !is null ? filename.id : null, rect, aFlag,
394 event !is null ? event.id : null) !is null;
395 }
396
397 public void dragImage (NSImage anImage, NSPoint viewLocation, NSSize initialOffset, NSEvent event, NSPasteboard pboard, id sourceObj,
398 bool slideFlag)
399 {
400 OS.objc_msgSend(this.id, OS.sel_dragImage_1at_1offset_1event_1pasteboard_1source_1slideBack_1, anImage !is null ? anImage.id : null,
401 viewLocation, initialOffset, event !is null ? event.id : null, pboard !is null ? pboard.id : null,
402 sourceObj !is null ? sourceObj.id : null, slideFlag);
403 }
404
405 public bool dragPromisedFilesOfTypes (NSArray typeArray, NSRect rect, id sourceObject, bool aFlag, NSEvent event)
406 {
407 return OS.objc_msgSend(this.id, OS.sel_dragPromisedFilesOfTypes_1fromRect_1source_1slideBack_1event_1,
408 typeArray !is null ? typeArray.id : null, rect, sourceObject !is null ? sourceObject.id : null, aFlag,
409 event !is null ? event.id : null) !is null;
410 }
411
412 public void drawPageBorderWithSize (NSSize borderSize)
413 {
414 OS.objc_msgSend(this.id, OS.sel_drawPageBorderWithSize_1, borderSize);
415 }
416
417 public void drawRect (NSRect rect)
418 {
419 OS.objc_msgSend(this.id, OS.sel_drawRect_1, rect);
420 }
421
422 public void drawSheetBorderWithSize (NSSize borderSize)
423 {
424 OS.objc_msgSend(this.id, OS.sel_drawSheetBorderWithSize_1, borderSize);
425 }
426
427 public NSMenuItem enclosingMenuItem ()
428 {
429 objc.id result = OS.objc_msgSend(this.id, OS.sel_enclosingMenuItem);
430 return result !is null ? new NSMenuItem(result) : null;
431 }
432
433 public NSScrollView enclosingScrollView ()
434 {
435 objc.id result = OS.objc_msgSend(this.id, OS.sel_enclosingScrollView);
436 return result !is null ? new NSScrollView(result) : null;
437 }
438
439 public void endDocument ()
440 {
441 OS.objc_msgSend(this.id, OS.sel_endDocument);
442 }
443
444 public void endPage ()
445 {
446 OS.objc_msgSend(this.id, OS.sel_endPage);
447 }
448
449 public bool enterFullScreenMode (NSScreen screen, NSDictionary options)
450 {
451 return OS.objc_msgSend(this.id, OS.sel_enterFullScreenMode_1withOptions_1, screen !is null ? screen.id : null,
452 options !is null ? options.id : null) !is null;
453 }
454
455 public void exitFullScreenModeWithOptions (NSDictionary options)
456 {
457 OS.objc_msgSend(this.id, OS.sel_exitFullScreenModeWithOptions_1, options !is null ? options.id : null);
458 }
459
460 public NSFocusRingType focusRingType ()
461 {
462 return cast(NSFocusRingType) OS.objc_msgSend(this.id, OS.sel_focusRingType);
463 }
464
465 public static NSView focusView ()
466 {
467 objc.id result = OS.objc_msgSend(OS.class_NSView, OS.sel_focusView);
468 return result !is null ? new NSView(result) : null;
469 }
470
471 public NSRect frame ()
472 {
473 NSRect result;
474 OS.objc_msgSend_stret(result, this.id, OS.sel_frame);
475 return result;
476 }
477
478 public CGFloat frameCenterRotation ()
479 {
480 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_frameCenterRotation);
481 }
482
483 public CGFloat frameRotation ()
484 {
485 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_frameRotation);
486 }
487
488 public NSInteger gState ()
489 {
490 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_gState);
491 }
492
493 public void getRectsBeingDrawn (/*const NSRect** */objc.id** rects, NSInteger* count)
494 {
495 OS.objc_msgSend(this.id, OS.sel_getRectsBeingDrawn_1count_1, rects, count);
496 }
497
498 public void getRectsExposedDuringLiveResize (/*NSRect[4]*/NSRect* exposedRects, NSInteger* count)
499 {
500 OS.objc_msgSend(this.id, OS.sel_getRectsExposedDuringLiveResize_1count_1, exposedRects, count);
501 }
502
503 public CGFloat heightAdjustLimit ()
504 {
505 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_heightAdjustLimit);
506 }
507
508 public NSView hitTest (NSPoint aPoint)
509 {
510 objc.id result = OS.objc_msgSend(this.id, OS.sel_hitTest_1, aPoint);
511 return result is this.id ? this : (result !is null ? new NSView(result) : null);
512 }
513
514 public bool inLiveResize ()
515 {
516 return OS.objc_msgSend(this.id, OS.sel_inLiveResize) !is null;
517 }
518
519 public NSView initWithFrame (NSRect frameRect)
520 {
521 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithFrame_1, frameRect);
522 return result !is null ? this : null;
523 }
524
525 public bool isDescendantOf (NSView aView)
526 {
527 return OS.objc_msgSend(this.id, OS.sel_isDescendantOf_1, aView !is null ? aView.id : null) !is null;
528 }
529
530 public bool isFlipped ()
531 {
532 return OS.objc_msgSend(this.id, OS.sel_isFlipped) !is null;
533 }
534
535 public bool isHidden ()
536 {
537 return OS.objc_msgSend(this.id, OS.sel_isHidden) !is null;
538 }
539
540 public bool isHiddenOrHasHiddenAncestor ()
541 {
542 return OS.objc_msgSend(this.id, OS.sel_isHiddenOrHasHiddenAncestor) !is null;
543 }
544
545 public bool isInFullScreenMode ()
546 {
547 return OS.objc_msgSend(this.id, OS.sel_isInFullScreenMode) !is null;
548 }
549
550 public bool isOpaque ()
551 {
552 return OS.objc_msgSend(this.id, OS.sel_isOpaque) !is null;
553 }
554
555 public bool isRotatedFromBase ()
556 {
557 return OS.objc_msgSend(this.id, OS.sel_isRotatedFromBase) !is null;
558 }
559
560 public bool isRotatedOrScaledFromBase ()
561 {
562 return OS.objc_msgSend(this.id, OS.sel_isRotatedOrScaledFromBase) !is null;
563 }
564
565 public bool knowsPageRange (NSRangePointer range)
566 {
567 return OS.objc_msgSend(this.id, OS.sel_knowsPageRange_1, range) !is null;
568 }
569
570 //public CALayer layer() {
571 // objc.id result = OS.objc_msgSend(this.id, OS.sel_layer);
572 // return result !is null ? new CALayer(result) : null;
573 //}
574
575 public NSPoint locationOfPrintRect (NSRect aRect)
576 {
577 NSPoint result;
578 OS.objc_msgSend_stret(result, this.id, OS.sel_locationOfPrintRect_1, aRect);
579 return result;
580 }
581
582 public void lockFocus ()
583 {
584 OS.objc_msgSend(this.id, OS.sel_lockFocus);
585 }
586
587 public bool lockFocusIfCanDraw ()
588 {
589 return OS.objc_msgSend(this.id, OS.sel_lockFocusIfCanDraw) !is null;
590 }
591
592 public bool lockFocusIfCanDrawInContext (NSGraphicsContext context)
593 {
594 return OS.objc_msgSend(this.id, OS.sel_lockFocusIfCanDrawInContext_1, context !is null ? context.id : null) !is null;
595 }
596
597 public NSMenu menuForEvent (NSEvent event)
598 {
599 objc.id result = OS.objc_msgSend(this.id, OS.sel_menuForEvent_1, event !is null ? event.id : null);
600 return result !is null ? new NSMenu(result) : null;
601 }
602
603 public bool mouse (NSPoint aPoint, NSRect aRect)
604 {
605 return OS.objc_msgSend(this.id, OS.sel_mouse_1inRect_1, aPoint, aRect) !is null;
606 }
607
608 public bool mouseDownCanMoveWindow ()
609 {
610 return OS.objc_msgSend(this.id, OS.sel_mouseDownCanMoveWindow) !is null;
611 }
612
613 public bool needsDisplay ()
614 {
615 return OS.objc_msgSend(this.id, OS.sel_needsDisplay) !is null;
616 }
617
618 public bool needsPanelToBecomeKey ()
619 {
620 return OS.objc_msgSend(this.id, OS.sel_needsPanelToBecomeKey) !is null;
621 }
622
623 public bool needsToDrawRect (NSRect aRect)
624 {
625 return OS.objc_msgSend(this.id, OS.sel_needsToDrawRect_1, aRect) !is null;
626 }
627
628 public NSView nextKeyView ()
629 {
630 objc.id result = OS.objc_msgSend(this.id, OS.sel_nextKeyView);
631 return result is this.id ? this : (result !is null ? new NSView(result) : null);
632 }
633
634 public NSView nextValidKeyView ()
635 {
636 objc.id result = OS.objc_msgSend(this.id, OS.sel_nextValidKeyView);
637 return result is this.id ? this : (result !is null ? new NSView(result) : null);
638 }
639
640 public NSView opaqueAncestor ()
641 {
642 objc.id result = OS.objc_msgSend(this.id, OS.sel_opaqueAncestor);
643 return result is this.id ? this : (result !is null ? new NSView(result) : null);
644 }
645
646 public NSAttributedString pageFooter ()
647 {
648 objc.id result = OS.objc_msgSend(this.id, OS.sel_pageFooter);
649 return result !is null ? new NSAttributedString(result) : null;
650 }
651
652 public NSAttributedString pageHeader ()
653 {
654 objc.id result = OS.objc_msgSend(this.id, OS.sel_pageHeader);
655 return result !is null ? new NSAttributedString(result) : null;
656 }
657
658 public bool performKeyEquivalent (NSEvent theEvent)
659 {
660 return OS.objc_msgSend(this.id, OS.sel_performKeyEquivalent_1, theEvent !is null ? theEvent.id : null) !is null;
661 }
662
663 public bool performMnemonic (NSString theString)
664 {
665 return OS.objc_msgSend(this.id, OS.sel_performMnemonic_1, theString !is null ? theString.id : null) !is null;
666 }
667
668 public bool postsBoundsChangedNotifications ()
669 {
670 return OS.objc_msgSend(this.id, OS.sel_postsBoundsChangedNotifications) !is null;
671 }
672
673 public bool postsFrameChangedNotifications ()
674 {
675 return OS.objc_msgSend(this.id, OS.sel_postsFrameChangedNotifications) !is null;
676 }
677
678 public bool preservesContentDuringLiveResize ()
679 {
680 return OS.objc_msgSend(this.id, OS.sel_preservesContentDuringLiveResize) !is null;
681 }
682
683 public NSView previousKeyView ()
684 {
685 objc.id result = OS.objc_msgSend(this.id, OS.sel_previousKeyView);
686 return result is this.id ? this : (result !is null ? new NSView(result) : null);
687 }
688
689 public NSView previousValidKeyView ()
690 {
691 objc.id result = OS.objc_msgSend(this.id, OS.sel_previousValidKeyView);
692 return result is this.id ? this : (result !is null ? new NSView(result) : null);
693 }
694
695 public void print (id sender)
696 {
697 OS.objc_msgSend(this.id, OS.sel_print_1, sender !is null ? sender.id : null);
698 }
699
700 public NSString printJobTitle ()
701 {
702 objc.id result = OS.objc_msgSend(this.id, OS.sel_printJobTitle);
703 return result !is null ? new NSString(result) : null;
704 }
705
706 public NSRect rectForPage (NSInteger page)
707 {
708 NSRect result;
709 OS.objc_msgSend_stret(result, this.id, OS.sel_rectForPage_1, page);
710 return result;
711 }
712
713 public NSRect rectPreservedDuringLiveResize ()
714 {
715 NSRect result;
716 OS.objc_msgSend_stret(result, this.id, OS.sel_rectPreservedDuringLiveResize);
717 return result;
718 }
719
720 public void reflectScrolledClipView (NSClipView aClipView)
721 {
722 OS.objc_msgSend(this.id, OS.sel_reflectScrolledClipView_1, aClipView !is null ? aClipView.id : null);
723 }
724
725 public void registerForDraggedTypes (NSArray newTypes)
726 {
727 OS.objc_msgSend(this.id, OS.sel_registerForDraggedTypes_1, newTypes !is null ? newTypes.id : null);
728 }
729
730 public NSArray registeredDraggedTypes ()
731 {
732 objc.id result = OS.objc_msgSend(this.id, OS.sel_registeredDraggedTypes);
733 return result !is null ? new NSArray(result) : null;
734 }
735
736 public void releaseGState ()
737 {
738 OS.objc_msgSend(this.id, OS.sel_releaseGState);
739 }
740
741 public void removeAllToolTips ()
742 {
743 OS.objc_msgSend(this.id, OS.sel_removeAllToolTips);
744 }
745
746 public void removeCursorRect (NSRect aRect, NSCursor anObj)
747 {
748 OS.objc_msgSend(this.id, OS.sel_removeCursorRect_1cursor_1, aRect, anObj !is null ? anObj.id : null);
749 }
750
751 public void removeFromSuperview ()
752 {
753 OS.objc_msgSend(this.id, OS.sel_removeFromSuperview);
754 }
755
756 public void removeFromSuperviewWithoutNeedingDisplay ()
757 {
758 OS.objc_msgSend(this.id, OS.sel_removeFromSuperviewWithoutNeedingDisplay);
759 }
760
761 public void removeToolTip (NSToolTipTag tag)
762 {
763 OS.objc_msgSend(this.id, OS.sel_removeToolTip_1, tag);
764 }
765
766 public void removeTrackingArea (NSTrackingArea trackingArea)
767 {
768 OS.objc_msgSend(this.id, OS.sel_removeTrackingArea_1, trackingArea !is null ? trackingArea.id : null);
769 }
770
771 public void removeTrackingRect (NSTrackingRectTag tag)
772 {
773 OS.objc_msgSend(this.id, OS.sel_removeTrackingRect_1, tag);
774 }
775
776 public void renewGState ()
777 {
778 OS.objc_msgSend(this.id, OS.sel_renewGState);
779 }
780
781 public void replaceSubview (NSView oldView, NSView newView)
782 {
783 OS.objc_msgSend(this.id, OS.sel_replaceSubview_1with_1, oldView !is null ? oldView.id : null, newView !is null ? newView.id : null);
784 }
785
786 public void resetCursorRects ()
787 {
788 OS.objc_msgSend(this.id, OS.sel_resetCursorRects);
789 }
790
791 public void resizeSubviewsWithOldSize (NSSize oldSize)
792 {
793 OS.objc_msgSend(this.id, OS.sel_resizeSubviewsWithOldSize_1, oldSize);
794 }
795
796 public void resizeWithOldSuperviewSize (NSSize oldSize)
797 {
798 OS.objc_msgSend(this.id, OS.sel_resizeWithOldSuperviewSize_1, oldSize);
799 }
800
801 public void rotateByAngle (CGFloat angle)
802 {
803 OS.objc_msgSend(this.id, OS.sel_rotateByAngle_1, angle);
804 }
805
806 public void rulerView_didAddMarker_ (NSRulerView ruler, NSRulerMarker marker)
807 {
808 OS.objc_msgSend(this.id, OS.sel_rulerView_1didAddMarker_1, ruler !is null ? ruler.id : null, marker !is null ? marker.id : null);
809 }
810
811 public void rulerView_didMoveMarker_ (NSRulerView ruler, NSRulerMarker marker)
812 {
813 OS.objc_msgSend(this.id, OS.sel_rulerView_1didMoveMarker_1, ruler !is null ? ruler.id : null, marker !is null ? marker.id : null);
814 }
815
816 public void rulerView_didRemoveMarker_ (NSRulerView ruler, NSRulerMarker marker)
817 {
818 OS.objc_msgSend(this.id, OS.sel_rulerView_1didRemoveMarker_1, ruler !is null ? ruler.id : null, marker !is null ? marker.id : null);
819 }
820
821 public void rulerView_handleMouseDown_ (NSRulerView ruler, NSEvent event)
822 {
823 OS.objc_msgSend(this.id, OS.sel_rulerView_1handleMouseDown_1, ruler !is null ? ruler.id : null, event !is null ? event.id : null);
824 }
825
826 public bool rulerView_shouldAddMarker_ (NSRulerView ruler, NSRulerMarker marker)
827 {
828 return OS.objc_msgSend(this.id, OS.sel_rulerView_1shouldAddMarker_1, ruler !is null ? ruler.id : null, marker !is null ? marker.id : null) !is null;
829 }
830
831 public bool rulerView_shouldMoveMarker_ (NSRulerView ruler, NSRulerMarker marker)
832 {
833 return OS.objc_msgSend(this.id, OS.sel_rulerView_1shouldMoveMarker_1, ruler !is null ? ruler.id : null, marker !is null ? marker.id : null) !is null;
834 }
835
836 public bool rulerView_shouldRemoveMarker_ (NSRulerView ruler, NSRulerMarker marker)
837 {
838 return OS.objc_msgSend(this.id, OS.sel_rulerView_1shouldRemoveMarker_1, ruler !is null ? ruler.id : null, marker !is null ? marker.id : null) !is null;
839 }
840
841 public CGFloat rulerView_willAddMarker_atLocation_ (NSRulerView ruler, NSRulerMarker marker, CGFloat location)
842 {
843 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_rulerView_1willAddMarker_1atLocation_1, ruler !is null ? ruler.id : null,
844 marker !is null ? marker.id : null, location);
845 }
846
847 public CGFloat rulerView_willMoveMarker_toLocation_ (NSRulerView ruler, NSRulerMarker marker, CGFloat location)
848 {
849 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_rulerView_1willMoveMarker_1toLocation_1, ruler !is null ? ruler.id : null,
850 marker !is null ? marker.id : null, location);
851 }
852
853 public void rulerView_willSetClientView_ (NSRulerView ruler, NSView newClient)
854 {
855 OS.objc_msgSend(this.id, OS.sel_rulerView_1willSetClientView_1, ruler !is null ? ruler.id : null, newClient !is null ? newClient.id : null);
856 }
857
858 public void scaleUnitSquareToSize (NSSize newUnitSize)
859 {
860 OS.objc_msgSend(this.id, OS.sel_scaleUnitSquareToSize_1, newUnitSize);
861 }
862
863 public void scrollClipView (NSClipView aClipView, NSPoint aPoint)
864 {
865 OS.objc_msgSend(this.id, OS.sel_scrollClipView_1toPoint_1, aClipView !is null ? aClipView.id : null, aPoint);
866 }
867
868 public void scrollPoint (NSPoint aPoint)
869 {
870 OS.objc_msgSend(this.id, OS.sel_scrollPoint_1, aPoint);
871 }
872
873 public void scrollRect (NSRect aRect, NSSize delta)
874 {
875 OS.objc_msgSend(this.id, OS.sel_scrollRect_1by_1, aRect, delta);
876 }
877
878 public bool scrollRectToVisible (NSRect aRect)
879 {
880 return OS.objc_msgSend(this.id, OS.sel_scrollRectToVisible_1, aRect) !is null;
881 }
882
883 public void setAlphaValue (CGFloat viewAlpha)
884 {
885 OS.objc_msgSend(this.id, OS.sel_setAlphaValue_1, viewAlpha);
886 }
887
888 public void setAutoresizesSubviews (bool flag)
889 {
890 OS.objc_msgSend(this.id, OS.sel_setAutoresizesSubviews_1, flag);
891 }
892
893 public void setAutoresizingMask (NSUInteger mask)
894 {
895 OS.objc_msgSend(this.id, OS.sel_setAutoresizingMask_1, mask);
896 }
897
898 public void setBackgroundFilters (NSArray filters)
899 {
900 OS.objc_msgSend(this.id, OS.sel_setBackgroundFilters_1, filters !is null ? filters.id : null);
901 }
902
903 public void setBounds (NSRect aRect)
904 {
905 OS.objc_msgSend(this.id, OS.sel_setBounds_1, aRect);
906 }
907
908 public void setBoundsOrigin (NSPoint newOrigin)
909 {
910 OS.objc_msgSend(this.id, OS.sel_setBoundsOrigin_1, newOrigin);
911 }
912
913 public void setBoundsRotation (CGFloat angle)
914 {
915 OS.objc_msgSend(this.id, OS.sel_setBoundsRotation_1, angle);
916 }
917
918 public void setBoundsSize (NSSize newSize)
919 {
920 OS.objc_msgSend(this.id, OS.sel_setBoundsSize_1, newSize);
921 }
922
923 //public void setCompositingFilter(CIFilter filter) {
924 // OS.objc_msgSend(this.id, OS.sel_setCompositingFilter_1, filter !is null ? filter.id : null);
925 //}
926
927 public void setContentFilters (NSArray filters)
928 {
929 OS.objc_msgSend(this.id, OS.sel_setContentFilters_1, filters !is null ? filters.id : null);
930 }
931
932 public void setFocusRingType (NSFocusRingType focusRingType)
933 {
934 OS.objc_msgSend(this.id, OS.sel_setFocusRingType_1, focusRingType);
935 }
936
937 public void setFrame (NSRect frameRect)
938 {
939 OS.objc_msgSend(this.id, OS.sel_setFrame_1, frameRect);
940 }
941
942 public void setFrameCenterRotation (CGFloat angle)
943 {
944 OS.objc_msgSend(this.id, OS.sel_setFrameCenterRotation_1, angle);
945 }
946
947 public void setFrameOrigin (NSPoint newOrigin)
948 {
949 OS.objc_msgSend(this.id, OS.sel_setFrameOrigin_1, newOrigin);
950 }
951
952 public void setFrameRotation (CGFloat angle)
953 {
954 OS.objc_msgSend(this.id, OS.sel_setFrameRotation_1, angle);
955 }
956
957 public void setFrameSize (NSSize newSize)
958 {
959 OS.objc_msgSend(this.id, OS.sel_setFrameSize_1, newSize);
960 }
961
962 public void setHidden (bool flag)
963 {
964 OS.objc_msgSend(this.id, OS.sel_setHidden_1, flag);
965 }
966
967 public void setKeyboardFocusRingNeedsDisplayInRect (NSRect rect)
968 {
969 OS.objc_msgSend(this.id, OS.sel_setKeyboardFocusRingNeedsDisplayInRect_1, rect);
970 }
971
972 //public void setLayer(CALayer newLayer) {
973 // OS.objc_msgSend(this.id, OS.sel_setLayer_1, newLayer !is null ? newLayer.id : null);
974 //}
975
976 public void setNeedsDisplay (bool flag)
977 {
978 OS.objc_msgSend(this.id, OS.sel_setNeedsDisplay_1, flag);
979 }
980
981 public void setNeedsDisplayInRect (NSRect invalidRect)
982 {
983 OS.objc_msgSend(this.id, OS.sel_setNeedsDisplayInRect_1, invalidRect);
984 }
985
986 public void setNextKeyView (NSView next)
987 {
988 OS.objc_msgSend(this.id, OS.sel_setNextKeyView_1, next !is null ? next.id : null);
989 }
990
991 public void setPostsBoundsChangedNotifications (bool flag)
992 {
993 OS.objc_msgSend(this.id, OS.sel_setPostsBoundsChangedNotifications_1, flag);
994 }
995
996 public void setPostsFrameChangedNotifications (bool flag)
997 {
998 OS.objc_msgSend(this.id, OS.sel_setPostsFrameChangedNotifications_1, flag);
999 }
1000
1001 public void setShadow (NSShadow shadow)
1002 {
1003 OS.objc_msgSend(this.id, OS.sel_setShadow_1, shadow !is null ? shadow.id : null);
1004 }
1005
1006 public void setSubviews (NSArray newSubviews)
1007 {
1008 OS.objc_msgSend(this.id, OS.sel_setSubviews_1, newSubviews !is null ? newSubviews.id : null);
1009 }
1010
1011 public void setToolTip (NSString string)
1012 {
1013 OS.objc_msgSend(this.id, OS.sel_setToolTip_1, string !is null ? string.id : null);
1014 }
1015
1016 public void setUpGState ()
1017 {
1018 OS.objc_msgSend(this.id, OS.sel_setUpGState);
1019 }
1020
1021 public void setWantsLayer (bool flag)
1022 {
1023 OS.objc_msgSend(this.id, OS.sel_setWantsLayer_1, flag);
1024 }
1025
1026 public NSShadow shadow ()
1027 {
1028 objc.id result = OS.objc_msgSend(this.id, OS.sel_shadow);
1029 return result !is null ? new NSShadow(result) : null;
1030 }
1031
1032 public bool shouldDelayWindowOrderingForEvent (NSEvent theEvent)
1033 {
1034 return OS.objc_msgSend(this.id, OS.sel_shouldDelayWindowOrderingForEvent_1, theEvent !is null ? theEvent.id : null) !is null;
1035 }
1036
1037 public bool shouldDrawColor ()
1038 {
1039 return OS.objc_msgSend(this.id, OS.sel_shouldDrawColor) !is null;
1040 }
1041
1042 public void sortSubviewsUsingFunction (/*NSComparisonResult (*)(id, id, void *) */NSComparisonResult function(objc.id, objc.id, void*) compare, void* context)
1043 {
1044 OS.objc_msgSend(this.id, OS.sel_sortSubviewsUsingFunction_1context_1, compare, context);
1045 }
1046
1047 public NSArray subviews ()
1048 {
1049 objc.id result = OS.objc_msgSend(this.id, OS.sel_subviews);
1050 return result !is null ? new NSArray(result) : null;
1051 }
1052
1053 public NSView superview ()
1054 {
1055 objc.id result = OS.objc_msgSend(this.id, OS.sel_superview);
1056 return result is this.id ? this : (result !is null ? new NSView(result) : null);
1057 }
1058
1059 public NSInteger tag ()
1060 {
1061 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_tag);
1062 }
1063
1064 public NSString toolTip ()
1065 {
1066 objc.id result = OS.objc_msgSend(this.id, OS.sel_toolTip);
1067 return result !is null ? new NSString(result) : null;
1068 }
1069
1070 public NSArray trackingAreas ()
1071 {
1072 objc.id result = OS.objc_msgSend(this.id, OS.sel_trackingAreas);
1073 return result !is null ? new NSArray(result) : null;
1074 }
1075
1076 public void translateOriginToPoint (NSPoint translation)
1077 {
1078 OS.objc_msgSend(this.id, OS.sel_translateOriginToPoint_1, translation);
1079 }
1080
1081 public void translateRectsNeedingDisplayInRect (NSRect clipRect, NSSize delta)
1082 {
1083 OS.objc_msgSend(this.id, OS.sel_translateRectsNeedingDisplayInRect_1by_1, clipRect, delta);
1084 }
1085
1086 public void unlockFocus ()
1087 {
1088 OS.objc_msgSend(this.id, OS.sel_unlockFocus);
1089 }
1090
1091 public void unregisterDraggedTypes ()
1092 {
1093 OS.objc_msgSend(this.id, OS.sel_unregisterDraggedTypes);
1094 }
1095
1096 public void updateTrackingAreas ()
1097 {
1098 OS.objc_msgSend(this.id, OS.sel_updateTrackingAreas);
1099 }
1100
1101 public void viewDidEndLiveResize ()
1102 {
1103 OS.objc_msgSend(this.id, OS.sel_viewDidEndLiveResize);
1104 }
1105
1106 public void viewDidHide ()
1107 {
1108 OS.objc_msgSend(this.id, OS.sel_viewDidHide);
1109 }
1110
1111 public void viewDidMoveToSuperview ()
1112 {
1113 OS.objc_msgSend(this.id, OS.sel_viewDidMoveToSuperview);
1114 }
1115
1116 public void viewDidMoveToWindow ()
1117 {
1118 OS.objc_msgSend(this.id, OS.sel_viewDidMoveToWindow);
1119 }
1120
1121 public void viewDidUnhide ()
1122 {
1123 OS.objc_msgSend(this.id, OS.sel_viewDidUnhide);
1124 }
1125
1126 public void viewWillDraw ()
1127 {
1128 OS.objc_msgSend(this.id, OS.sel_viewWillDraw);
1129 }
1130
1131 public void viewWillMoveToSuperview (NSView newSuperview)
1132 {
1133 OS.objc_msgSend(this.id, OS.sel_viewWillMoveToSuperview_1, newSuperview !is null ? newSuperview.id : null);
1134 }
1135
1136 public void viewWillMoveToWindow (NSWindow newWindow)
1137 {
1138 OS.objc_msgSend(this.id, OS.sel_viewWillMoveToWindow_1, newWindow !is null ? newWindow.id : null);
1139 }
1140
1141 public void viewWillStartLiveResize ()
1142 {
1143 OS.objc_msgSend(this.id, OS.sel_viewWillStartLiveResize);
1144 }
1145
1146 public id viewWithTag (NSInteger aTag)
1147 {
1148 objc.id result = OS.objc_msgSend(this.id, OS.sel_viewWithTag_1, aTag);
1149 return result !is null ? new id(result) : null;
1150 }
1151
1152 public NSRect visibleRect ()
1153 {
1154 NSRect result;
1155 OS.objc_msgSend_stret(result, this.id, OS.sel_visibleRect);
1156 return result;
1157 }
1158
1159 public bool wantsDefaultClipping ()
1160 {
1161 return OS.objc_msgSend(this.id, OS.sel_wantsDefaultClipping) !is null;
1162 }
1163
1164 public bool wantsLayer ()
1165 {
1166 return OS.objc_msgSend(this.id, OS.sel_wantsLayer) !is null;
1167 }
1168
1169 public CGFloat widthAdjustLimit ()
1170 {
1171 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_widthAdjustLimit);
1172 }
1173
1174 public void willRemoveSubview (NSView subview)
1175 {
1176 OS.objc_msgSend(this.id, OS.sel_willRemoveSubview_1, subview !is null ? subview.id : null);
1177 }
1178
1179 public NSWindow window ()
1180 {
1181 objc.id result = OS.objc_msgSend(this.id, OS.sel_window);
1182 return result !is null ? new NSWindow(result) : null;
1183 }
1184
1185 public void writeEPSInsideRect (NSRect rect, NSPasteboard pasteboard)
1186 {
1187 OS.objc_msgSend(this.id, OS.sel_writeEPSInsideRect_1toPasteboard_1, rect, pasteboard !is null ? pasteboard.id : null);
1188 }
1189
1190 public void writePDFInsideRect (NSRect rect, NSPasteboard pasteboard)
1191 {
1192 OS.objc_msgSend(this.id, OS.sel_writePDFInsideRect_1toPasteboard_1, rect, pasteboard !is null ? pasteboard.id : null);
1193 }
1194
1195 }