Mercurial > projects > dynamin
comparison dynamin/gui/check_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 | d5823ccfddc6 |
comparison
equal
deleted
inserted
replaced
9:682fa50ab831 | 10:ccc108b25a0a |
---|---|
56 override void whenPainting(PaintingEventArgs e) { | 56 override void whenPainting(PaintingEventArgs e) { |
57 Theme.current.CheckBox_paint(this, e.graphics); | 57 Theme.current.CheckBox_paint(this, e.graphics); |
58 } | 58 } |
59 | 59 |
60 public: | 60 public: |
61 /// Override this method in a subclass to handle the SelectedChanged event. | 61 /// Override this method in a subclass to handle the checkedChanged event. |
62 protected void whenCheckedChanged(EventArgs e) { } | 62 protected void whenCheckedChanged(EventArgs e) { } |
63 /// This event occurs after . | 63 /// This event occurs after . |
64 Event!() checkedChanged; | 64 Event!(whenCheckedChanged) checkedChanged; |
65 this() { | 65 this() { |
66 checkedChanged = new Event!()(&whenCheckedChanged); | 66 checkedChanged.mainHandler = &whenCheckedChanged; |
67 _focusable = true; | 67 _focusable = true; |
68 } | 68 } |
69 this(string text) { | 69 this(string text) { |
70 this(); | 70 this(); |
71 this.text = text; | 71 this.text = text; |