summaryrefslogtreecommitdiff
path: root/src/gui/widgets/radiobutton.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/radiobutton.h')
-rw-r--r--src/gui/widgets/radiobutton.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h
index eebbae8bd..d33634546 100644
--- a/src/gui/widgets/radiobutton.h
+++ b/src/gui/widgets/radiobutton.h
@@ -68,6 +68,9 @@
#include "listeners/keylistener.h"
#include "listeners/mouselistener.h"
+#include "listeners/widgetlistener.h"
+
+#include "gui/fonts/textchunk.h"
#include "gui/widgets/widget.h"
@@ -80,7 +83,8 @@ class Skin;
*/
class RadioButton final : public Widget,
public MouseListener,
- public KeyListener
+ public KeyListener,
+ public WidgetListener
{
public:
@@ -161,8 +165,7 @@ class RadioButton final : public Widget,
* @param caption The caption of the radio button.
* @see getCaption, adjustSize
*/
- void setCaption(const std::string &caption)
- { mCaption = caption; }
+ void setCaption(const std::string &caption);
void mouseClicked(MouseEvent& event) override final;
@@ -187,6 +190,10 @@ class RadioButton final : public Widget,
const std::string &getGroup() const
{ return mGroup; }
+ void setParent(Widget *widget) override final;
+
+ void widgetHidden(const Event &event) override final;
+
private:
static int instances;
static Skin *mSkin;
@@ -207,6 +214,8 @@ class RadioButton final : public Widget,
*/
std::string mGroup;
+ TextChunk mTextChunk;
+
/**
* Typdef.
*/
@@ -226,7 +235,9 @@ class RadioButton final : public Widget,
int mImagePadding;
int mImageSize;
int mSpacing;
+ int mTextX;
bool mHasMouse;
+ bool mTextChanged;
};
#endif // GUI_WIDGETS_RADIOBUTTON_H