2013-03-15 13:11:33 +00:00
|
|
|
namespace phoenix {
|
|
|
|
|
|
|
|
Size pLabel::minimumSize() {
|
|
|
|
Size size = pFont::size(widget.state.font, label.state.text);
|
|
|
|
return {size.width, size.height};
|
2011-03-22 12:56:49 +00:00
|
|
|
}
|
|
|
|
|
2013-05-02 11:25:45 +00:00
|
|
|
void pLabel::setText(const string& text) {
|
2011-02-24 09:27:21 +00:00
|
|
|
gtk_label_set_text(GTK_LABEL(gtkWidget), text);
|
|
|
|
}
|
|
|
|
|
|
|
|
void pLabel::constructor() {
|
|
|
|
gtkWidget = gtk_label_new("");
|
|
|
|
gtk_misc_set_alignment(GTK_MISC(gtkWidget), 0.0, 0.5);
|
2011-09-05 03:48:23 +00:00
|
|
|
|
|
|
|
setText(label.state.text);
|
|
|
|
}
|
|
|
|
|
|
|
|
void pLabel::destructor() {
|
|
|
|
gtk_widget_destroy(gtkWidget);
|
|
|
|
}
|
|
|
|
|
|
|
|
void pLabel::orphan() {
|
|
|
|
destructor();
|
|
|
|
constructor();
|
2011-02-24 09:27:21 +00:00
|
|
|
}
|
2013-03-15 13:11:33 +00:00
|
|
|
|
|
|
|
}
|