Mercurial > projects > dwt-mac
comparison dwt/widgets/TabFolder.d @ 123:63a09873578e
Fixed compile errors
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Thu, 15 Jan 2009 23:08:54 +0100 |
parents | c7f7f4d7091a |
children |
comparison
equal
deleted
inserted
replaced
122:2e671fa40eec | 123:63a09873578e |
---|---|
13 *******************************************************************************/ | 13 *******************************************************************************/ |
14 module dwt.widgets.TabFolder; | 14 module dwt.widgets.TabFolder; |
15 | 15 |
16 import dwt.dwthelper.utils; | 16 import dwt.dwthelper.utils; |
17 | 17 |
18 | 18 |
19 import dwt.DWT; | 19 import dwt.DWT; |
20 import dwt.DWTException; | 20 import dwt.DWTException; |
21 import dwt.events.SelectionEvent; | 21 import dwt.events.SelectionEvent; |
22 import dwt.events.SelectionListener; | 22 import dwt.events.SelectionListener; |
23 import dwt.graphics.Point; | 23 import dwt.graphics.Point; |
138 } | 138 } |
139 | 139 |
140 static int checkStyle (int style) { | 140 static int checkStyle (int style) { |
141 style = checkBits (style, DWT.TOP, DWT.BOTTOM, 0, 0, 0, 0); | 141 style = checkBits (style, DWT.TOP, DWT.BOTTOM, 0, 0, 0, 0); |
142 /* | 142 /* |
143 * Even though it is legal to create this widget | 143 * Even though it is legal to create this widget |
144 * with scroll bars, they serve no useful purpose | 144 * with scroll bars, they serve no useful purpose |
145 * because they do not automatically scroll the | 145 * because they do not automatically scroll the |
146 * widget's client area. The fix is to clear | 146 * widget's client area. The fix is to clear |
147 * the DWT style. | 147 * the DWT style. |
148 */ | 148 */ |
149 return style & ~(DWT.H_SCROLL | DWT.V_SCROLL); | 149 return style & ~(DWT.H_SCROLL | DWT.V_SCROLL); |
150 } | 150 } |
151 | 151 |
152 protected void checkSubclass () { | 152 protected void checkSubclass () { |
153 if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); | 153 if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); |
621 void tabView_didSelectTabViewItem(objc.id id, objc.SEL sel, objc.id tabView, objc.id tabViewItem) { | 621 void tabView_didSelectTabViewItem(objc.id id, objc.SEL sel, objc.id tabView, objc.id tabViewItem) { |
622 if (tabViewItem is null) return; | 622 if (tabViewItem is null) return; |
623 for (int i = 0; i < itemCount; i++) { | 623 for (int i = 0; i < itemCount; i++) { |
624 TabItem item = items [i]; | 624 TabItem item = items [i]; |
625 /* | 625 /* |
626 * Feature in Cocoa. For some reason the control on a tab being | 626 * Feature in Cocoa. For some reason the control on a tab being |
627 * deselected has its parent removed natively. The fix is to | 627 * deselected has its parent removed natively. The fix is to |
628 * re-set the control's parent. | 628 * re-set the control's parent. |
629 */ | 629 */ |
630 Control control = item.control; | 630 Control control = item.control; |
631 if (control !is null) { | 631 if (control !is null) { |
632 NSView topView = control.topView (); | 632 NSView topView = control.topView (); |
633 if (topView.superview () is null) { | 633 if (topView.superview () is null) { |
634 contentView ().addSubview (topView, OS.NSWindowBelow, null); | 634 contentView ().addSubview (topView, OS.NSWindowBelow, null); |