Pioneer
src
gui
GuiRadioButton.h
Go to the documentation of this file.
1
// Copyright © 2008-2021 Pioneer Developers. See AUTHORS.txt for details
2
// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3
4
#ifndef _GUIRADIOBUTTON_H
5
#define _GUIRADIOBUTTON_H
6
7
#include "
GuiButton.h
"
8
#include "
GuiISelectable.h
"
9
#include "
GuiWidget.h
"
10
#include <string>
11
12
namespace
Gui
{
13
class
RadioGroup;
14
15
class
RadioButton
:
public
Button
,
public
ISelectable
{
16
public
:
17
RadioButton
(
RadioGroup
*);
18
virtual
~RadioButton
();
19
virtual
void
Draw
();
20
virtual
void
GetSizeRequested
(
float
size[2]);
21
virtual
bool
OnMouseDown
(
MouseButtonEvent
*e);
22
virtual
void
OnActivate
();
23
virtual
void
SetSelected
(
bool
state) {
m_pressed
= state; }
24
bool
GetSelected
() {
return
m_pressed
; }
25
26
protected
:
27
bool
m_pressed
;
28
};
29
30
}
// namespace Gui
31
32
#endif
/* _GUIRADIOBUTTON_H */
GuiButton.h
GuiISelectable.h
GuiWidget.h
Gui::Button
Definition:
GuiButton.h:13
Gui::ISelectable
Definition:
GuiISelectable.h:10
Gui::RadioButton
Definition:
GuiRadioButton.h:15
Gui::RadioButton::GetSizeRequested
virtual void GetSizeRequested(float size[2])
Definition:
GuiRadioButton.cpp:34
Gui::RadioButton::Draw
virtual void Draw()
Definition:
GuiRadioButton.cpp:40
Gui::RadioButton::~RadioButton
virtual ~RadioButton()
Definition:
GuiRadioButton.cpp:16
Gui::RadioButton::OnMouseDown
virtual bool OnMouseDown(MouseButtonEvent *e)
Definition:
GuiRadioButton.cpp:19
Gui::RadioButton::OnActivate
virtual void OnActivate()
Definition:
GuiRadioButton.cpp:28
Gui::RadioButton::SetSelected
virtual void SetSelected(bool state)
Definition:
GuiRadioButton.h:23
Gui::RadioButton::m_pressed
bool m_pressed
Definition:
GuiRadioButton.h:27
Gui::RadioButton::RadioButton
RadioButton(RadioGroup *)
Definition:
GuiRadioButton.cpp:10
Gui::RadioButton::GetSelected
bool GetSelected()
Definition:
GuiRadioButton.h:24
Gui::RadioGroup
Definition:
GuiRadioGroup.h:11
Gui
Definition:
Gui.cpp:10
Gui::MouseButtonEvent
Definition:
GuiEvents.h:8
Generated by
1.9.1