Mercurial > projects > dynamin
comparison dynamin/gui/scrollable.d @ 5:4029d5af7542
Add blank lines and rewrap some comments.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Sat, 20 Jun 2009 12:26:40 -0500 |
parents | aa4efef0f0b1 |
children | e6e201c3a439 |
comparison
equal
deleted
inserted
replaced
4:fc2420d39e3c | 5:4029d5af7542 |
---|---|
229 _hScrollBar.location = [_visibleRect.x, _visibleRect.bottom]; | 229 _hScrollBar.location = [_visibleRect.x, _visibleRect.bottom]; |
230 _hScrollBar.size = [_visibleRect.width, _sbSize]; | 230 _hScrollBar.size = [_visibleRect.width, _sbSize]; |
231 | 231 |
232 whenValueChanged(null); | 232 whenValueChanged(null); |
233 } | 233 } |
234 | |
234 /** | 235 /** |
235 * Gets or sets which scroll bars are shown. The default is Each. | 236 * Gets or sets which scroll bars are shown. The default is Each. |
236 */ | 237 */ |
237 VisibleScrollBars visibleScrollBars() { return _scrollBars; } | 238 VisibleScrollBars visibleScrollBars() { return _scrollBars; } |
238 /// ditto | 239 /// ditto |
239 void visibleScrollBars(VisibleScrollBars bars) { // TODO: rename? SBPolicy? | 240 void visibleScrollBars(VisibleScrollBars bars) { // TODO: rename? SBPolicy? |
240 _scrollBars = bars; | 241 _scrollBars = bars; |
241 } | 242 } |
243 | |
242 /** | 244 /** |
243 * Gets whether the horizontal scroll bar is currently shown. | 245 * Gets whether the horizontal scroll bar is currently shown. |
244 */ | 246 */ |
245 bool HScrollBarVisible() { | 247 bool HScrollBarVisible() { |
246 switch(_scrollBars) { | 248 switch(_scrollBars) { |
279 case VisibleScrollBars.Both: | 281 case VisibleScrollBars.Both: |
280 return _content.bestSize.height > _availableRect.height || | 282 return _content.bestSize.height > _availableRect.height || |
281 _content.bestSize.width > _availableRect.width; | 283 _content.bestSize.width > _availableRect.width; |
282 } | 284 } |
283 } | 285 } |
286 | |
284 /** | 287 /** |
285 * Gets the combined width of all the controls docked on the left side of | 288 * Gets the combined width of all the controls docked on the left side of |
286 * this scrollable. | 289 * this scrollable. |
287 */ | 290 */ |
288 real leftControlsWidth() { | 291 real leftControlsWidth() { |
298 | 301 |
299 /// Returns the area inside the border, scroll bars, and any controls on the side. | 302 /// Returns the area inside the border, scroll bars, and any controls on the side. |
300 Rect contentVisibleRect() { | 303 Rect contentVisibleRect() { |
301 return _visibleRect; | 304 return _visibleRect; |
302 } | 305 } |
306 | |
303 Panel content() { return _content; } | 307 Panel content() { return _content; } |
308 | |
304 BorderSize borderSize() { | 309 BorderSize borderSize() { |
305 return Theme.current.Scrollable_borderSize(this); | 310 return Theme.current.Scrollable_borderSize(this); |
306 } | 311 } |
307 } | 312 } |
308 | 313 |