GlistEngine
Loading...
Searching...
No Matches
gGUIRadioButton.h
Go to the documentation of this file.
1
/****************************************************************************
2
* Copyright (c) 2014 Nitra Games Ltd., Istanbul, Turkey *
3
* *
4
* Permission is hereby granted, free of charge, to any person obtaining a *
5
* copy of this software and associated documentation files (the *
6
* "Software"), to deal in the Software without restriction, including *
7
* without limitation the rights to use, copy, modify, merge, publish, *
8
* distribute, distribute with modifications, sublicense, and/or sell *
9
* copies of the Software, and to permit persons to whom the Software is *
10
* furnished to do so, subject to the following conditions: *
11
* *
12
* The above copyright notice and this permission notice should not be *
13
* deleted from the source form of the Software. *
14
* *
15
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
16
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
17
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
18
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
19
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
20
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
21
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
22
* *
23
* Except as contained in this notice, the name(s) of the above copyright *
24
* holders shall not be used in advertising or otherwise to promote the *
25
* sale, use or other dealings in this Software without prior written *
26
* authorization. *
27
****************************************************************************/
28
29
/****************************************************************************
30
* Author: Utku Sarưalan, 2022-on *
31
****************************************************************************/
32
33
/*
34
* gGUIRadioButton.h
35
*
36
* Created on: 19 Tem 2022
37
* Author: Utku Sarưalan
38
*/
39
40
#ifndef UI_GGUIRADIOBUTTON_H_
41
#define UI_GGUIRADIOBUTTON_H_
42
43
#include "
gGUIControl.h
"
44
45
class
gGUIRadioButton
:
public
gGUIControl
{
46
public
:
47
gGUIRadioButton
();
48
virtual
~gGUIRadioButton
();
49
55
void
setTitle
(std::string
title
);
56
62
std::string
getTitle
();
63
71
void
showTitle
(
bool
command);
72
81
void
setSelectedButton
(
int
index);
82
88
int
getSelectedButton
();
89
96
void
setButtonRadius
(
float
radius);
97
103
int
getButtonRadius
();
104
114
void
setButtonCount
(
int
buttoncount);
115
121
int
getButtonCount
();
122
133
void
setRadioTitle
(
int
index, std::string
title
);
134
144
std::string
getRadioTitle
(
int
index);
145
152
void
setHorizontalDistance
(
int
distance);
153
159
int
getHorizontalDistance
();
160
166
void
setVerticalDistance
(
int
distance);
167
173
int
getVerticalDistance
();
174
180
void
setSelectedButtonColor
(
gColor
selectedcolor);
181
187
gColor
*
getSelectedButtonColor
();
188
196
void
setColumnCount
(
int
columncount);
197
203
int
getColumnCount
();
204
205
bool
isTextVisible
();
206
bool
isDisabled
();
207
void
setDisabled
(
bool
command);
208
209
void
update
();
210
void
draw
();
211
void
updateHeightLimit
();
212
213
void
mousePressed
(
int
x,
int
y,
int
button);
214
void
mouseReleased
(
int
x,
int
y,
int
button);
215
216
private
:
217
bool
istextvisible;
218
bool
istitlevisible;
219
bool
isdisabled;
220
221
float
buttonradius;
222
int
titlew, titleh;
223
int
buttoncount;
224
int
lineheightlimit;
225
int
selectedbutton;
226
int
linemidpoint;
227
int
textmargin;
228
int
buttonmargin;
229
int
maxradiowidth;
230
int
horizontaldistance;
231
int
verticaldistance;
232
int
columncount;
233
int
inity;
234
235
std::string *titles;
236
237
gColor
titlecolor, selectedcolor;
238
};
239
240
#endif
/* UI_GGUIRADIOBUTTON_H_ */
gBaseGUIObject::title
std::string title
Definition
gBaseGUIObject.h:145
gColor
Definition
gColor.h:17
gGUIControl
Definition
gGUIControl.h:29
gGUIRadioButton
Definition
gGUIRadioButton.h:45
gGUIRadioButton::getSelectedButtonColor
gColor * getSelectedButtonColor()
gGUIRadioButton::setDisabled
void setDisabled(bool command)
gGUIRadioButton::getRadioTitle
std::string getRadioTitle(int index)
gGUIRadioButton::mousePressed
void mousePressed(int x, int y, int button)
gGUIRadioButton::isTextVisible
bool isTextVisible()
gGUIRadioButton::updateHeightLimit
void updateHeightLimit()
gGUIRadioButton::getHorizontalDistance
int getHorizontalDistance()
gGUIRadioButton::showTitle
void showTitle(bool command)
gGUIRadioButton::mouseReleased
void mouseReleased(int x, int y, int button)
gGUIRadioButton::getVerticalDistance
int getVerticalDistance()
gGUIRadioButton::setTitle
void setTitle(std::string title)
gGUIRadioButton::setSelectedButtonColor
void setSelectedButtonColor(gColor selectedcolor)
gGUIRadioButton::setColumnCount
void setColumnCount(int columncount)
gGUIRadioButton::draw
void draw()
gGUIRadioButton::setVerticalDistance
void setVerticalDistance(int distance)
gGUIRadioButton::getTitle
std::string getTitle()
gGUIRadioButton::getColumnCount
int getColumnCount()
gGUIRadioButton::getSelectedButton
int getSelectedButton()
gGUIRadioButton::setButtonRadius
void setButtonRadius(float radius)
gGUIRadioButton::~gGUIRadioButton
virtual ~gGUIRadioButton()
gGUIRadioButton::gGUIRadioButton
gGUIRadioButton()
gGUIRadioButton::getButtonRadius
int getButtonRadius()
gGUIRadioButton::setRadioTitle
void setRadioTitle(int index, std::string title)
gGUIRadioButton::setSelectedButton
void setSelectedButton(int index)
gGUIRadioButton::update
void update()
gGUIRadioButton::setButtonCount
void setButtonCount(int buttoncount)
gGUIRadioButton::getButtonCount
int getButtonCount()
gGUIRadioButton::isDisabled
bool isDisabled()
gGUIRadioButton::setHorizontalDistance
void setHorizontalDistance(int distance)
gGUIControl.h
engine
ui
gGUIRadioButton.h
Generated by
1.9.8