Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/label.h')
-rw-r--r--src/ui/label.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/ui/label.h b/src/ui/label.h
index f88f808..460ac8a 100644
--- a/src/ui/label.h
+++ b/src/ui/label.h
@@ -12,14 +12,29 @@
namespace ui {
+/// a widget displaying centered text
class Label : public Widget {
public:
- Label(Widget *parent, char const *text=0);
+ Label(Widget *parent, const char *text=0);
~Label();
+ /// set the text displayed by the label
+ void set_text(std::string const &text);
+
+ /// set the text displayed by the label
+ void set_text(const char *text);
+
+ /// return the text displayed by the label
+ inline std::string const &text() const { return label_text; }
+
+ /// print label description
+ virtual void print(size_t indent);
+
protected:
+ /// draw the label
virtual void draw();
+ /// draw the label text
virtual void draw_text();
private: