From a14d80f83aebe75241bf63b4f3ffca3a5d952577 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 6 Oct 2008 18:22:32 +0000 Subject: libui updates, support menu .ini files --- src/ui/label.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/ui/label.h') 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: -- cgit v1.2.3