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
46public:
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
89
96 void setButtonRadius(float radius);
97
104
114 void setButtonCount(int buttoncount);
115
122
133 void setRadioTitle(int index, std::string title);
134
144 std::string getRadioTitle(int index);
145
152 void setHorizontalDistance(int distance);
153
160
166 void setVerticalDistance(int distance);
167
174
180 void setSelectedButtonColor(gColor selectedcolor);
181
188
196 void setColumnCount(int columncount);
197
204
207 void setDisabled(bool command);
208
209 void update();
210 void draw();
212
213 void mousePressed(int x, int y, int button);
214 void mouseReleased(int x, int y, int button);
215
216private:
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_ */
std::string title
Definition gBaseGUIObject.h:145
Definition gColor.h:17
Definition gGUIControl.h:29
Definition gGUIRadioButton.h:45
gColor * getSelectedButtonColor()
void setDisabled(bool command)
std::string getRadioTitle(int index)
void mousePressed(int x, int y, int button)
bool isTextVisible()
void updateHeightLimit()
int getHorizontalDistance()
void showTitle(bool command)
void mouseReleased(int x, int y, int button)
int getVerticalDistance()
void setTitle(std::string title)
void setSelectedButtonColor(gColor selectedcolor)
void setColumnCount(int columncount)
void setVerticalDistance(int distance)
std::string getTitle()
int getSelectedButton()
void setButtonRadius(float radius)
virtual ~gGUIRadioButton()
void setRadioTitle(int index, std::string title)
void setSelectedButton(int index)
void setButtonCount(int buttoncount)
void setHorizontalDistance(int distance)