Mercurial > projects > dynamin
comparison dynamin/gui/scrollable.d @ 106:acdbb30fee7e
Port to D2.
Most of the effort was dealing with immutable and const.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Mon, 17 Dec 2012 23:41:50 -0600 |
parents | 5c8c1c2e12c0 |
children |
comparison
equal
deleted
inserted
replaced
105:97997a544ac0 | 106:acdbb30fee7e |
---|---|
228 | 228 |
229 /** | 229 /** |
230 * Gets whether the horizontal scroll bar is currently shown. | 230 * Gets whether the horizontal scroll bar is currently shown. |
231 */ | 231 */ |
232 bool HScrollBarVisible() { | 232 bool HScrollBarVisible() { |
233 switch(_scrollBars) { | 233 final switch(_scrollBars) { |
234 case VisibleScrollBars.None: | 234 case VisibleScrollBars.None: |
235 case VisibleScrollBars.Vertical: | 235 case VisibleScrollBars.Vertical: |
236 return false; | 236 return false; |
237 case VisibleScrollBars.Horizontal: | 237 case VisibleScrollBars.Horizontal: |
238 return _content.bestSize.width > _availableRect.width; | 238 return _content.bestSize.width > _availableRect.width; |
249 } | 249 } |
250 /** | 250 /** |
251 * Gets whether the vertical scroll bar is currently shown. | 251 * Gets whether the vertical scroll bar is currently shown. |
252 */ | 252 */ |
253 bool VScrollBarVisible() { | 253 bool VScrollBarVisible() { |
254 switch(_scrollBars) { | 254 final switch(_scrollBars) { |
255 case VisibleScrollBars.None: | 255 case VisibleScrollBars.None: |
256 case VisibleScrollBars.Horizontal: | 256 case VisibleScrollBars.Horizontal: |
257 return false; | 257 return false; |
258 case VisibleScrollBars.Vertical: | 258 case VisibleScrollBars.Vertical: |
259 return _content.bestSize.height > _availableRect.height; | 259 return _content.bestSize.height > _availableRect.height; |