Mercurial > projects > dynamin
diff dynamin/gui/events.d @ 55:c138461bf845
Add focusing and other changes that are related
like descendantAdded/Removed events, Window.activated event, and updating List.
Window.state was also added, even though focusing does not depend on it.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Sat, 08 Aug 2009 15:42:27 -0500 |
parents | 2a194d52fdb5 |
children | 8dac206ea523 |
line wrap: on
line diff
--- a/dynamin/gui/events.d Sat Aug 08 15:31:24 2009 -0500 +++ b/dynamin/gui/events.d Sat Aug 08 15:42:27 2009 -0500 @@ -28,6 +28,8 @@ import dynamin.all_core; import dynamin.all_painting; import dynamin.all_gui; +import dynamin.gui.control; +import dynamin.gui.container; /// enum MouseButton { @@ -162,3 +164,27 @@ dchar character() { return _ch; } } +/// +class HierarchyEventArgs : EventArgs { + int _levels = 0; + Control _control; +public: + this(Control c) { + _control = c; + } + /** + * An immediate child would be a level of 0. + */ + int levels() { return _levels; } + /// ditto + void levels(int l) { _levels = l; } + /** + * + */ + Control descendant() { return _control; } + /** + * + */ + Container ancestor() { return cast(Container)_control; } +} +