Mercurial > fife-parpg
diff engine/core/gui/widgets/widgets.i @ 177:3fb17daa1b27
* Added ToggleButton widget
* Modified editor to use togglebuttons in toolbox
author | cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sun, 25 Jan 2009 20:17:41 +0000 |
parents | bb9902910067 |
children | 756b895e1dab |
line wrap: on
line diff
--- a/engine/core/gui/widgets/widgets.i Sun Jan 25 19:48:41 2009 +0000 +++ b/engine/core/gui/widgets/widgets.i Sun Jan 25 20:17:41 2009 +0000 @@ -22,7 +22,9 @@ %module fife %{ #include <guichan.hpp> +#include <guichan/mouseevent.hpp> #include "gui/widgets/twobutton.h" +#include "gui/widgets/togglebutton.h" #include "gui/widgets/clicklabel.h" #include "gui/widgets/icon2.hpp" %} @@ -193,6 +195,29 @@ void setDownOffset(int x, int y); int getDownXOffset(); int getDownYOffset(); + void setHelpText(const std::string& txt); + const std::string& getHelpText(); + }; + + %feature("notabstract") ToggleButton; + class ToggleButton: public Widget { + public: + ToggleButton(Image *up_image = 0, Image *down_image = 0, Image *hover_image = 0, const char * caption = "", const char * group = ""); + ~ToggleButton(); + virtual void setCaption(const std::string& caption); + virtual const std::string& getCaption() const; + virtual void setAlignment(Graphics::Alignment alignment); + virtual Graphics::Alignment getAlignment() const; + void setUpImage(Image* image); + void setDownImage(Image* image); + void setHoverImage(Image* image); + void setDownOffset(int x, int y); + int getDownXOffset() const; + int getDownYOffset() const; + bool isToggled() const; + void setToggled(bool toggled); + void setGroup(const std::string &group); + const std::string &getGroup() const; void setHelpText(const std::string& txt); const std::string& getHelpText();