Mercurial > projects > dynamin
diff dynamin/gui/list_box.d @ 10:ccc108b25a0a
Convert to using a struct for events. Fix some comments too.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Wed, 15 Jul 2009 21:22:20 -0500 |
parents | b621b528823d |
children | c138461bf845 |
line wrap: on
line diff
--- a/dynamin/gui/list_box.d Wed Jul 15 14:07:36 2009 -0500 +++ b/dynamin/gui/list_box.d Wed Jul 15 21:22:20 2009 -0500 @@ -78,10 +78,10 @@ } public: - /// Override this method in a subclass to handle the SelectionChanged event. + /// Override this method in a subclass to handle the selectionChanged event. protected void whenSelectionChanged(EventArgs e) { } /// This event occurs after the selection has changed. - Event!() selectionChanged; + Event!(whenSelectionChanged) selectionChanged; void listItemsChanged() { super.layout(); @@ -90,7 +90,7 @@ /// this() { - selectionChanged = new Event!()(&whenSelectionChanged); + selectionChanged.mainHandler = &whenSelectionChanged; _items = new List!(string)(&listItemsChanged); super();