Mercurial > projects > dwt-mac
diff dwt/internal/cocoa/NSBox.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 |
line wrap: on
line diff
--- a/dwt/internal/cocoa/NSBox.d Sat Aug 09 17:00:02 2008 +0200 +++ b/dwt/internal/cocoa/NSBox.d Tue Aug 19 17:35:17 2008 +0200 @@ -17,6 +17,7 @@ import dwt.internal.cocoa.NSCell; import dwt.internal.cocoa.NSColor; import dwt.internal.cocoa.NSFont; +import dwt.internal.cocoa.NSInteger; import dwt.internal.cocoa.NSRect; import dwt.internal.cocoa.NSSize; import dwt.internal.cocoa.NSString; @@ -60,163 +61,163 @@ public NSColor borderColor () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_borderColor); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_borderColor); return result !is null ? new NSColor(result) : null; } public NSRect borderRect () { NSRect result; - OS.objc_msgSend_stret(result, this.id, OS.sel_borderRect); + OS.objc_msgSend_stret(&result, this.id_, OS.sel_borderRect); return result; } public NSBorderType borderType () { - return OS.objc_msgSend(this.id, OS.sel_borderType); + return cast(NSBorderType) OS.objc_msgSend(this.id_, OS.sel_borderType); } public CGFloat borderWidth () { - return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_borderWidth); + return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_borderWidth); } public NSBoxType boxType () { - return OS.objc_msgSend(this.id, OS.sel_boxType); + return cast(NSBoxType) OS.objc_msgSend(this.id_, OS.sel_boxType); } public NSView contentView () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_contentView); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_contentView); return result !is null ? new NSView(result) : null; } public NSSize contentViewMargins () { NSSize result; - OS.objc_msgSend_stret(result, this.id, OS.sel_contentViewMargins); + OS.objc_msgSend_stret(&result, this.id_, OS.sel_contentViewMargins); return result; } public CGFloat cornerRadius () { - return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_cornerRadius); + return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_cornerRadius); } public NSColor fillColor () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_fillColor); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_fillColor); return result !is null ? new NSColor(result) : null; } public bool isTransparent () { - return OS.objc_msgSend(this.id, OS.sel_isTransparent) !is null; + return OS.objc_msgSend(this.id_, OS.sel_isTransparent) !is null; } public void setBorderColor (NSColor borderColor) { - OS.objc_msgSend(this.id, OS.sel_setBorderColor_1, borderColor !is null ? borderColor.id : null); + OS.objc_msgSend(this.id_, OS.sel_setBorderColor_1, borderColor !is null ? borderColor.id_ : null); } public void setBorderType (NSBorderType aType) { - OS.objc_msgSend(this.id, OS.sel_setBorderType_1, aType); + OS.objc_msgSend(this.id_, OS.sel_setBorderType_1, aType); } public void setBorderWidth (CGFloat borderWidth) { - OS.objc_msgSend(this.id, OS.sel_setBorderWidth_1, borderWidth); + OS.objc_msgSend(this.id_, OS.sel_setBorderWidth_1, borderWidth); } public void setBoxType (NSBoxType boxType) { - OS.objc_msgSend(this.id, OS.sel_setBoxType_1, boxType); + OS.objc_msgSend(this.id_, OS.sel_setBoxType_1, boxType); } public void setContentView (NSView aView) { - OS.objc_msgSend(this.id, OS.sel_setContentView_1, aView !is null ? aView.id : null); + OS.objc_msgSend(this.id_, OS.sel_setContentView_1, aView !is null ? aView.id_ : null); } public void setContentViewMargins (NSSize offsetSize) { - OS.objc_msgSend(this.id, OS.sel_setContentViewMargins_1, offsetSize); + OS.objc_msgSend(this.id_, OS.sel_setContentViewMargins_1, offsetSize); } public void setCornerRadius (CGFloat cornerRadius) { - OS.objc_msgSend(this.id, OS.sel_setCornerRadius_1, cornerRadius); + OS.objc_msgSend(this.id_, OS.sel_setCornerRadius_1, cornerRadius); } public void setFillColor (NSColor fillColor) { - OS.objc_msgSend(this.id, OS.sel_setFillColor_1, fillColor !is null ? fillColor.id : null); + OS.objc_msgSend(this.id_, OS.sel_setFillColor_1, fillColor !is null ? fillColor.id_ : null); } public void setFrameFromContentFrame (NSRect contentFrame) { - OS.objc_msgSend(this.id, OS.sel_setFrameFromContentFrame_1, contentFrame); + OS.objc_msgSend(this.id_, OS.sel_setFrameFromContentFrame_1, contentFrame); } public void setTitle (NSString aString) { - OS.objc_msgSend(this.id, OS.sel_setTitle_1, aString !is null ? aString.id : null); + OS.objc_msgSend(this.id_, OS.sel_setTitle_1, aString !is null ? aString.id_ : null); } public void setTitleFont (NSFont fontObj) { - OS.objc_msgSend(this.id, OS.sel_setTitleFont_1, fontObj !is null ? fontObj.id : null); + OS.objc_msgSend(this.id_, OS.sel_setTitleFont_1, fontObj !is null ? fontObj.id_ : null); } public void setTitlePosition (NSTitlePosition aPosition) { - OS.objc_msgSend(this.id, OS.sel_setTitlePosition_1, aPosition); + OS.objc_msgSend(this.id_, OS.sel_setTitlePosition_1, aPosition); } public void setTitleWithMnemonic (NSString StringWithAmpersand) { - OS.objc_msgSend(this.id, OS.sel_setTitleWithMnemonic_1, StringWithAmpersand !is null ? StringWithAmpersand.id : null); + OS.objc_msgSend(this.id_, OS.sel_setTitleWithMnemonic_1, StringWithAmpersand !is null ? StringWithAmpersand.id_ : null); } public void setTransparent (bool flag) { - OS.objc_msgSend(this.id, OS.sel_setTransparent_1, flag); + OS.objc_msgSend(this.id_, OS.sel_setTransparent_1, flag); } public void sizeToFit () { - OS.objc_msgSend(this.id, OS.sel_sizeToFit); + OS.objc_msgSend(this.id_, OS.sel_sizeToFit); } public NSString title () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_title); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_title); return result !is null ? new NSString(result) : null; } public NSCell titleCell () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_titleCell); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleCell); return result !is null ? new NSCell(result) : null; } public NSFont titleFont () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_titleFont); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleFont); return result !is null ? new NSFont(result) : null; } public NSTitlePosition titlePosition () { - return OS.objc_msgSend(this.id, OS.sel_titlePosition); + return cast(NSTitlePosition) OS.objc_msgSend(this.id_, OS.sel_titlePosition); } public NSRect titleRect () { NSRect result; - OS.objc_msgSend_stret(result, this.id, OS.sel_titleRect); + OS.objc_msgSend_stret(&result, this.id_, OS.sel_titleRect); return result; } }