Mercurial > projects > dwt-mac
comparison dwt/widgets/Scrollable.d @ 48:34237ae5156a
Updated Scrollable to 3.514
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 07 Dec 2008 20:16:52 +0100 |
parents | 8615c76f10e4 |
children | c74ba20de292 |
comparison
equal
deleted
inserted
replaced
47:8615c76f10e4 | 48:34237ae5156a |
---|---|
126 checkWidget(); | 126 checkWidget(); |
127 if (scrollView !is null) { | 127 if (scrollView !is null) { |
128 NSSize size = NSSize(); | 128 NSSize size = NSSize(); |
129 size.width = width; | 129 size.width = width; |
130 size.height = height; | 130 size.height = height; |
131 NSBorderType border = hasBorder() ? NSBezelBorder : NSNoBorder; | 131 NSBorderType border = hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder; |
132 size = NSScrollView.frameSizeForContentSize(size, (style & DWT.H_SCROLL) !is 0, (style & DWT.V_SCROLL) !is 0, border); | 132 size = NSScrollView.frameSizeForContentSize(size, (style & DWT.H_SCROLL) !is 0, (style & DWT.V_SCROLL) !is 0, border); |
133 width = cast(int)size.width; | 133 width = cast(int)size.width; |
134 height = cast(int)size.height; | 134 height = cast(int)size.height; |
135 NSRect frame = scrollView.contentView().frame(); | 135 NSRect frame = scrollView.contentView().frame(); |
136 x -= frame.x; | 136 x -= frame.x; |
144 ScrollBar bar = new ScrollBar (); | 144 ScrollBar bar = new ScrollBar (); |
145 bar.parent = this; | 145 bar.parent = this; |
146 bar.style = style; | 146 bar.style = style; |
147 bar.display = display; | 147 bar.display = display; |
148 NSScroller scroller; | 148 NSScroller scroller; |
149 String actionSelector; | 149 objc.SEL actionSelector; |
150 NSRect rect = NSRect(); | 150 NSRect rect = NSRect(); |
151 if ((style & DWT.H_SCROLL) !is 0) { | 151 if ((style & DWT.H_SCROLL) !is 0) { |
152 rect.width = 1; | 152 rect.width = 1; |
153 } else { | 153 } else { |
154 rect.height = 1; | 154 rect.height = 1; |
155 } | 155 } |
156 scroller = (NSScroller)new SWTScroller().alloc(); | 156 scroller = cast(NSScroller)(new SWTScroller()).alloc(); |
157 scroller.initWithFrame(rect); | 157 scroller.initWithFrame(rect); |
158 if ((style & DWT.H_SCROLL) !is 0) { | 158 if ((style & DWT.H_SCROLL) !is 0) { |
159 scrollView.setHorizontalScroller(scroller); | 159 scrollView.setHorizontalScroller(scroller); |
160 actionSelector = OS.sel_sendHorizontalSelection; | 160 actionSelector = OS.sel_sendHorizontalSelection; |
161 } else { | 161 } else { |