Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-10-06 18:22:32 +0000
committerStijn Buys <ingar@osirion.org>2008-10-06 18:22:32 +0000
commita14d80f83aebe75241bf63b4f3ffca3a5d952577 (patch)
treefea36faedd17a0aa620f6d7e781a352327d6065d /src/ui/label.h
parent343b0b4298e2d084d5544d3d40a8b7dcb586ce8e (diff)
libui updates, support menu .ini files
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: