Mercurial > projects > dwt-mac
diff dwt/internal/cocoa/NSTabView.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/NSTabView.d Sat Aug 09 17:00:02 2008 +0200 +++ b/dwt/internal/cocoa/NSTabView.d Tue Aug 19 17:35:17 2008 +0200 @@ -26,7 +26,7 @@ import dwt.internal.cocoa.OS; import objc = dwt.internal.objc.runtime; -enum NSTabViewType +enum NSTabViewType : NSUInteger { NSTopTabsBezelBorder = 0, NSLeftTabsBezelBorder = 1, @@ -60,182 +60,182 @@ public void addTabViewItem (NSTabViewItem tabViewItem) { - OS.objc_msgSend(this.id, OS.sel_addTabViewItem_1, tabViewItem !is null ? tabViewItem.id : null); + OS.objc_msgSend(this.id_, OS.sel_addTabViewItem_1, tabViewItem !is null ? tabViewItem.id_ : null); } public bool allowsTruncatedLabels () { - return OS.objc_msgSend(this.id, OS.sel_allowsTruncatedLabels) !is null; + return OS.objc_msgSend(this.id_, OS.sel_allowsTruncatedLabels) !is null; } public NSRect contentRect () { NSRect result; - OS.objc_msgSend_stret(result, this.id, OS.sel_contentRect); + OS.objc_msgSend_stret(&result, this.id_, OS.sel_contentRect); return result; } public NSControlSize controlSize () { - return cast(NSControlSize) OS.objc_msgSend(this.id, OS.sel_controlSize); + return cast(NSControlSize) OS.objc_msgSend(this.id_, OS.sel_controlSize); } public NSControlTint controlTint () { - return OS.objc_msgSend(this.id, OS.sel_controlTint); + return cast(NSControlTint) OS.objc_msgSend(this.id_, OS.sel_controlTint); } public id delegatee () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate); return result !is null ? new id(result) : null; } public bool drawsBackground () { - return OS.objc_msgSend(this.id, OS.sel_drawsBackground) !is null; + return OS.objc_msgSend(this.id_, OS.sel_drawsBackground) !is null; } public NSFont font () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_font); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_font); return result !is null ? new NSFont(result) : null; } public NSInteger indexOfTabViewItem (NSTabViewItem tabViewItem) { - return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_indexOfTabViewItem_1, tabViewItem !is null ? tabViewItem.id : null); + return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfTabViewItem_1, tabViewItem !is null ? tabViewItem.id_ : null); } public NSInteger indexOfTabViewItemWithIdentifier (id identifier) { - return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_indexOfTabViewItemWithIdentifier_1, identifier !is null ? identifier.id : null); + return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfTabViewItemWithIdentifier_1, identifier !is null ? identifier.id_ : null); } public void insertTabViewItem (NSTabViewItem tabViewItem, NSInteger index) { - OS.objc_msgSend(this.id, OS.sel_insertTabViewItem_1atIndex_1, tabViewItem !is null ? tabViewItem.id : null, index); + OS.objc_msgSend(this.id_, OS.sel_insertTabViewItem_1atIndex_1, tabViewItem !is null ? tabViewItem.id_ : null, index); } public NSSize minimumSize () { NSSize result; - OS.objc_msgSend_struct(result, this.id, OS.sel_minimumSize); + OS.objc_msgSend_struct(&result, this.id_, OS.sel_minimumSize); return result; } public NSInteger numberOfTabViewItems () { - return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_numberOfTabViewItems); + return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfTabViewItems); } public void removeTabViewItem (NSTabViewItem tabViewItem) { - OS.objc_msgSend(this.id, OS.sel_removeTabViewItem_1, tabViewItem !is null ? tabViewItem.id : null); + OS.objc_msgSend(this.id_, OS.sel_removeTabViewItem_1, tabViewItem !is null ? tabViewItem.id_ : null); } public void selectFirstTabViewItem (id sender) { - OS.objc_msgSend(this.id, OS.sel_selectFirstTabViewItem_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_selectFirstTabViewItem_1, sender !is null ? sender.id_ : null); } public void selectLastTabViewItem (id sender) { - OS.objc_msgSend(this.id, OS.sel_selectLastTabViewItem_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_selectLastTabViewItem_1, sender !is null ? sender.id_ : null); } public void selectNextTabViewItem (id sender) { - OS.objc_msgSend(this.id, OS.sel_selectNextTabViewItem_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_selectNextTabViewItem_1, sender !is null ? sender.id_ : null); } public void selectPreviousTabViewItem (id sender) { - OS.objc_msgSend(this.id, OS.sel_selectPreviousTabViewItem_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_selectPreviousTabViewItem_1, sender !is null ? sender.id_ : null); } public void selectTabViewItem (NSTabViewItem tabViewItem) { - OS.objc_msgSend(this.id, OS.sel_selectTabViewItem_1, tabViewItem !is null ? tabViewItem.id : null); + OS.objc_msgSend(this.id_, OS.sel_selectTabViewItem_1, tabViewItem !is null ? tabViewItem.id_ : null); } public void selectTabViewItemAtIndex (NSInteger index) { - OS.objc_msgSend(this.id, OS.sel_selectTabViewItemAtIndex_1, index); + OS.objc_msgSend(this.id_, OS.sel_selectTabViewItemAtIndex_1, index); } public void selectTabViewItemWithIdentifier (id identifier) { - OS.objc_msgSend(this.id, OS.sel_selectTabViewItemWithIdentifier_1, identifier !is null ? identifier.id : null); + OS.objc_msgSend(this.id_, OS.sel_selectTabViewItemWithIdentifier_1, identifier !is null ? identifier.id_ : null); } public NSTabViewItem selectedTabViewItem () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_selectedTabViewItem); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedTabViewItem); return result !is null ? new NSTabViewItem(result) : null; } public void setAllowsTruncatedLabels (bool allowTruncatedLabels) { - OS.objc_msgSend(this.id, OS.sel_setAllowsTruncatedLabels_1, allowTruncatedLabels); + OS.objc_msgSend(this.id_, OS.sel_setAllowsTruncatedLabels_1, allowTruncatedLabels); } public void setControlSize (NSControlSize controlSize) { - OS.objc_msgSend(this.id, OS.sel_setControlSize_1, controlSize); + OS.objc_msgSend(this.id_, OS.sel_setControlSize_1, controlSize); } public void setControlTint (NSControlTint controlTint) { - OS.objc_msgSend(this.id, OS.sel_setControlTint_1, controlTint); + OS.objc_msgSend(this.id_, OS.sel_setControlTint_1, controlTint); } public void setDelegate (id anObject) { - OS.objc_msgSend(this.id, OS.sel_setDelegate_1, anObject !is null ? anObject.id : null); + OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null); } public void setDrawsBackground (bool flag) { - OS.objc_msgSend(this.id, OS.sel_setDrawsBackground_1, flag); + OS.objc_msgSend(this.id_, OS.sel_setDrawsBackground_1, flag); } public void setFont (NSFont font) { - OS.objc_msgSend(this.id, OS.sel_setFont_1, font !is null ? font.id : null); + OS.objc_msgSend(this.id_, OS.sel_setFont_1, font !is null ? font.id_ : null); } public void setTabViewType (NSTabViewType tabViewType) { - OS.objc_msgSend(this.id, OS.sel_setTabViewType_1, tabViewType); + OS.objc_msgSend(this.id_, OS.sel_setTabViewType_1, tabViewType); } public NSTabViewItem tabViewItemAtIndex (NSInteger index) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_tabViewItemAtIndex_1, index); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_tabViewItemAtIndex_1, index); return result !is null ? new NSTabViewItem(result) : null; } public NSTabViewItem tabViewItemAtPoint (NSPoint point) { - objc.id result = OS.objc_msgSend(this.id, OS.sel_tabViewItemAtPoint_1, point); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_tabViewItemAtPoint_1, point); return result !is null ? new NSTabViewItem(result) : null; } public NSArray tabViewItems () { - objc.id result = OS.objc_msgSend(this.id, OS.sel_tabViewItems); + objc.id result = OS.objc_msgSend(this.id_, OS.sel_tabViewItems); return result !is null ? new NSArray(result) : null; } public NSTabViewType tabViewType () { - return cast(NSTabViewType) OS.objc_msgSend(this.id, OS.sel_tabViewType); + return cast(NSTabViewType) OS.objc_msgSend(this.id_, OS.sel_tabViewType); } public void takeSelectedTabViewItemFromSender (id sender) { - OS.objc_msgSend(this.id, OS.sel_takeSelectedTabViewItemFromSender_1, sender !is null ? sender.id : null); + OS.objc_msgSend(this.id_, OS.sel_takeSelectedTabViewItemFromSender_1, sender !is null ? sender.id_ : null); } }