Mercurial > projects > dynamin
comparison 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 |
comparison
equal
deleted
inserted
replaced
54:3738a2d0bac3 | 55:c138461bf845 |
---|---|
26 module dynamin.gui.events; | 26 module dynamin.gui.events; |
27 | 27 |
28 import dynamin.all_core; | 28 import dynamin.all_core; |
29 import dynamin.all_painting; | 29 import dynamin.all_painting; |
30 import dynamin.all_gui; | 30 import dynamin.all_gui; |
31 import dynamin.gui.control; | |
32 import dynamin.gui.container; | |
31 | 33 |
32 /// | 34 /// |
33 enum MouseButton { | 35 enum MouseButton { |
34 None, /// | 36 None, /// |
35 Left, /// | 37 Left, /// |
160 * the keys that do not represent characters. | 162 * the keys that do not represent characters. |
161 */ | 163 */ |
162 dchar character() { return _ch; } | 164 dchar character() { return _ch; } |
163 } | 165 } |
164 | 166 |
167 /// | |
168 class HierarchyEventArgs : EventArgs { | |
169 int _levels = 0; | |
170 Control _control; | |
171 public: | |
172 this(Control c) { | |
173 _control = c; | |
174 } | |
175 /** | |
176 * An immediate child would be a level of 0. | |
177 */ | |
178 int levels() { return _levels; } | |
179 /// ditto | |
180 void levels(int l) { _levels = l; } | |
181 /** | |
182 * | |
183 */ | |
184 Control descendant() { return _control; } | |
185 /** | |
186 * | |
187 */ | |
188 Container ancestor() { return cast(Container)_control; } | |
189 } | |
190 |