26 |
Status: $State$ |
Status: $State$ |
27 |
*/ |
*/ |
28 |
|
|
|
#include <stdarg.h> |
|
29 |
#include "pgradiobutton.h" |
#include "pgradiobutton.h" |
30 |
|
#include "pgapplication.h" |
31 |
|
#include "pgtheme.h" |
32 |
|
#include "pgbutton.h" |
33 |
|
|
34 |
PG_RadioButton::PG_RadioButton(PG_Widget* parent, int id, const PG_Rect& r, const char* text, PG_RadioButton* firstOfGroup, const char* style) : PG_ThemeWidget(parent, r) { |
PG_RadioButton::PG_RadioButton(PG_Widget* parent, int id, const PG_Rect& r, const char* text, PG_RadioButton* firstOfGroup, const char* style) : PG_ThemeWidget(parent, r) { |
35 |
PG_Rect rectButton; |
PG_Rect rectButton; |
57 |
|
|
58 |
rectLabel.SetRect(rectButton.my_width, 0, r.my_width - rectButton.my_width, r.my_height); |
rectLabel.SetRect(rectButton.my_width, 0, r.my_width - rectButton.my_width, r.my_height); |
59 |
my_widgetLabel = new PG_Label(this, rectLabel, text, style); |
my_widgetLabel = new PG_Label(this, rectLabel, text, style); |
60 |
my_widgetLabel->SetAlignment(PG_TA_LEFT); |
my_widgetLabel->SetAlignment(PG_Label::LEFT); |
61 |
|
|
62 |
// load default first |
// load default first |
63 |
LoadThemeStyle("RadioButton"); |
LoadThemeStyle("RadioButton"); |
165 |
return my_widgetLabel->GetText(); |
return my_widgetLabel->GetText(); |
166 |
} |
} |
167 |
|
|
168 |
void PG_RadioButton::SetAlignment(int a) { |
void PG_RadioButton::SetAlignment(PG_Label::TextAlign a) { |
169 |
my_widgetLabel->SetAlignment(a); |
my_widgetLabel->SetAlignment(a); |
170 |
} |
} |
171 |
|
|