26
#include "AbstractButton.h"
31
class RadioButtonGroup;
34
class RadioButton: public AbstractButton
37
RadioButton(const TCHAR* Caption = 0, bool state = false);
40
virtual long ProcessEvent(IEvent &ievent, long TraverseInfo, long ProcessEventInfo);
42
virtual void Draw(GraphicsContext& GfxContext, bool force_draw);
43
virtual void DrawContent(GraphicsContext& GfxContext, bool force_draw);
44
virtual void PostDraw(GraphicsContext& GfxContext, bool force_draw);
46
void RecvMouseMove(int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags);
47
void RecvMouseEnter(int x, int y, unsigned long button_flags, unsigned long key_flags);
48
void RecvMouseLeave(int x, int y, unsigned long button_flags, unsigned long key_flags);
50
Signal emitted if a click happen. The state change and the check box need to redraw itself.
52
void RecvClick(int x, int y, unsigned long button_flags, unsigned long key_flags);
54
Signal emitted if the mouse is released. Whether a click happened or not,
55
the check box need to redraw itself.
57
void RecvMouseUp(int x, int y, unsigned long button_flags, unsigned long key_flags);
58
void RecvMouseDown(int x, int y, unsigned long button_flags, unsigned long key_flags);
60
sigc::signal<void, const weaksmptr(RadioButton)> sigStateToggled;
61
sigc::signal<void> sigToggled;
62
sigc::signal<void, bool> sigStateChanged;
64
void EmitStateChangedSignal();
66
//+++ Inherited from AbstractButton
67
virtual bool IsCheckable() const {return true;}
69
virtual void SetCaption(const TCHAR* Caption);
70
virtual const NString& GetCaption() const;
72
virtual void SetState(bool State);
73
virtual void SetState(bool State, bool EmitSignal);
74
virtual bool GetState() const;
78
void InitializeWidgets();
79
void InitializeLayout();
83
//! Intended for RadioButtonGroup only.
84
void SetStatePrivate(bool State);
85
//! Intended for RadioButtonGroup only.
86
void SetStatePrivate(bool State, bool EmitSignal);
89
smptr(HLayout) m_hlayout;
90
smptr(CoreArea) m_TextArea;
91
smptr(CoreArea) m_CheckArea;
94
RadioButtonGroup* m_Group;
98
friend class RadioButtonGroup;
103
#endif // RADIOBUTTON_H
26
#include "AbstractButton.h"
31
class RadioButtonGroup;
34
class RadioButton: public AbstractButton
37
RadioButton(const TCHAR* Caption = 0, bool state = false);
40
virtual long ProcessEvent(IEvent &ievent, long TraverseInfo, long ProcessEventInfo);
42
virtual void Draw(GraphicsContext& GfxContext, bool force_draw);
43
virtual void DrawContent(GraphicsContext& GfxContext, bool force_draw);
44
virtual void PostDraw(GraphicsContext& GfxContext, bool force_draw);
46
void RecvMouseMove(int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags);
47
void RecvMouseEnter(int x, int y, unsigned long button_flags, unsigned long key_flags);
48
void RecvMouseLeave(int x, int y, unsigned long button_flags, unsigned long key_flags);
50
Signal emitted if a click happen. The state change and the check box need to redraw itself.
52
void RecvClick(int x, int y, unsigned long button_flags, unsigned long key_flags);
54
Signal emitted if the mouse is released. Whether a click happened or not,
55
the check box need to redraw itself.
57
void RecvMouseUp(int x, int y, unsigned long button_flags, unsigned long key_flags);
58
void RecvMouseDown(int x, int y, unsigned long button_flags, unsigned long key_flags);
60
sigc::signal<void, const weaksmptr(RadioButton)> sigStateToggled;
61
sigc::signal<void> sigToggled;
62
sigc::signal<void, bool> sigStateChanged;
64
void EmitStateChangedSignal();
66
//+++ Inherited from AbstractButton
67
virtual bool IsCheckable() const {return true;}
69
virtual void SetCaption(const TCHAR* Caption);
70
virtual const NString& GetCaption() const;
72
virtual void SetState(bool State);
73
virtual void SetState(bool State, bool EmitSignal);
74
virtual bool GetState() const;
78
void InitializeWidgets();
79
void InitializeLayout();
83
//! Intended for RadioButtonGroup only.
84
void SetStatePrivate(bool State);
85
//! Intended for RadioButtonGroup only.
86
void SetStatePrivate(bool State, bool EmitSignal);
89
smptr(HLayout) m_hlayout;
90
smptr(CoreArea) m_TextArea;
91
smptr(CoreArea) m_CheckArea;
94
RadioButtonGroup* m_Group;
98
friend class RadioButtonGroup;
103
#endif // RADIOBUTTON_H