comparison dynamin/gui/control.d @ 67:419e38206522

Move visible from Control to Window
author Jordan Miner <jminer7@gmail.com>
date Mon, 10 Aug 2009 02:46:42 -0500
parents aa7eafe2865d
children 6580fabb7dce
comparison
equal deleted inserted replaced
66:4c095424a9ab 67:419e38206522
78 * Otherwise, anything handlers painted would likely be painted over when the 78 * Otherwise, anything handlers painted would likely be painted over when the
79 * control painted. 79 * control painted.
80 */ 80 */
81 class Control { 81 class Control {
82 protected: 82 protected:
83 bool _visible;
84 bool _focusable; 83 bool _focusable;
85 bool _focused; 84 bool _focused;
86 int _tabIndex; 85 int _tabIndex;
87 package Point _location; 86 package Point _location;
88 package Size _size; 87 package Size _size;
270 _size = Size(100, 100); 269 _size = Size(100, 100);
271 _text = ""; 270 _text = "";
272 _focusable = false; 271 _focusable = false;
273 _focused = false; 272 _focused = false;
274 _tabIndex = 0; 273 _tabIndex = 0;
275 _visible = true;
276 _cursor = Cursor.Arrow; 274 _cursor = Cursor.Arrow;
277 _elasticX = false; 275 _elasticX = false;
278 _elasticY = false; 276 _elasticY = false;
279 277
280 // TODO: remove these when themes mature 278 // TODO: remove these when themes mature
478 return anc; 476 return anc;
479 anc = anc.parent; 477 anc = anc.parent;
480 } 478 }
481 return null; 479 return null;
482 } 480 }
483
484 /**
485 * Gets or sets whether is control is visible. The default is true, except
486 * on top-level windows.
487 */
488 //void visible(bool b) { visible = b; }
489 bool visible() { return _visible; }
490 481
491 /** 482 /**
492 * Gets or sets the location of this control in its parent's content 483 * Gets or sets the location of this control in its parent's content
493 * coordinates. 484 * coordinates.
494 * Examples: 485 * Examples: