Mercurial > projects > dstep
view dstep/appkit/NSClipView.d @ 16:19885b43130e
Huge update, the bridge actually works now
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 03 Jan 2010 22:06:11 +0100 |
parents | |
children | b9de51448c6b |
line wrap: on
line source
/** * Copyright: Copyright (c) 2009 Jacob Carlborg. * Authors: Jacob Carlborg * Version: Initial created: Sep 24, 2009 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) */ module dstep.appkit.NSClipView; import dstep.appkit.NSColor; import dstep.appkit.NSCursor; import dstep.appkit.NSEvent; import dstep.appkit.NSView; import dstep.foundation.NSGeometry; import dstep.foundation.NSNotification; import dstep.objc.bridge.Bridge; import dstep.objc.objc; class NSClipView : NSView { mixin (ObjcWrap); void setBackgroundColor (NSColor color) { return invokeObjcSelf!(void, "setBackgroundColor:", NSColor)(color); } NSColor backgroundColor () { return invokeObjcSelf!(NSColor, "backgroundColor"); } void setDrawsBackground (bool flag) { return invokeObjcSelf!(void, "setDrawsBackground:", bool)(flag); } bool drawsBackground () { return invokeObjcSelf!(bool, "drawsBackground"); } void setDocumentView (NSView aView) { return invokeObjcSelf!(void, "setDocumentView:", NSView)(aView); } Object documentView () { return invokeObjcSelf!(Object, "documentView"); } NSRect documentRect () { return invokeObjcSelf!(NSRect, "documentRect"); } void setDocumentCursor (NSCursor anObj) { return invokeObjcSelf!(void, "setDocumentCursor:", NSCursor)(anObj); } NSCursor documentCursor () { return invokeObjcSelf!(NSCursor, "documentCursor"); } NSRect documentVisibleRect () { return invokeObjcSelf!(NSRect, "documentVisibleRect"); } void viewFrameChanged (NSNotification notification) { return invokeObjcSelf!(void, "viewFrameChanged:", NSNotification)(notification); } void viewBoundsChanged (NSNotification notification) { return invokeObjcSelf!(void, "viewBoundsChanged:", NSNotification)(notification); } void setCopiesOnScroll (bool flag) { return invokeObjcSelf!(void, "setCopiesOnScroll:", bool)(flag); } bool copiesOnScroll () { return invokeObjcSelf!(bool, "copiesOnScroll"); } bool autoscroll (NSEvent theEvent) { return invokeObjcSelf!(bool, "autoscroll:", NSEvent)(theEvent); } NSPoint constrainScrollPoint (NSPoint newOrigin) { return invokeObjcSelf!(NSPoint, "constrainScrollPoint:", NSPoint)(newOrigin); } void scrollToPoint (NSPoint newOrigin) { return invokeObjcSelf!(void, "scrollToPoint:", NSPoint)(newOrigin); } } const TNSClipViewSuperview = ` void reflectScrolledClipView (NSClipView aClipView) { return invokeObjcSelf!(void, "reflectScrolledClipView:", NSClipView)(aClipView); } void scrollClipView (NSClipView aClipView, NSPoint aPoint) { return invokeObjcSelf!(void, "scrollClipView:toPoint:", NSClipView, NSPoint)(aClipView, aPoint); } //mixin ObjcBindMethod!(reflectScrolledClipView, "reflectScrolledClipView:"); //mixin ObjcBindMethod!(scrollClipView, "scrollClipView:toPoint:"); `;