Mercurial > fife-parpg
diff engine/core/gui/widgets/widgets.i @ 154:d29593182f40
- modified clicklabel to provide a mouse listener for hover events
- modified clicklabel.i to make new methods available for python
- added LabelListener to pychan wrapper, as well as two new methods to Label class to set enter / exit callbacks
NOTE:
author | chewie@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 11 Oct 2008 14:13:56 +0000 |
parents | 68534083e1a1 |
children | bb9902910067 |
line wrap: on
line diff
--- a/engine/core/gui/widgets/widgets.i Sat Oct 11 14:03:01 2008 +0000 +++ b/engine/core/gui/widgets/widgets.i Sat Oct 11 14:13:56 2008 +0000 @@ -379,6 +379,15 @@ virtual void resizeToContent(); }; + class ClickLabel; + %feature("director") ClickLabelListener; + class ClickLabelListener { + public: + virtual ~ClickLabelListener(); + virtual void mouseEntered(ClickLabel& btn) = 0; + virtual void mouseExited(ClickLabel& btn) = 0; + }; + %feature("notabstract") ClickLabel; %rename(Label) ClickLabel; class ClickLabel: public Widget { @@ -392,6 +401,9 @@ void setTextWrapping(bool); virtual void setWidth(int width); virtual void adjustSize(); + + void setListener(ClickLabelListener* listener); + ClickLabelListener* getListener(); }; %feature("notabstract") Icon2;