From 3ce8b540aae127c773c57fcf7094e11319d3c6a3 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 16 Nov 2002 13:08:10 +0000 Subject: add a Label class that doesnt change with focus --- otk/label.hh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 otk/label.hh (limited to 'otk/label.hh') diff --git a/otk/label.hh b/otk/label.hh new file mode 100644 index 00000000..3bf397a6 --- /dev/null +++ b/otk/label.hh @@ -0,0 +1,30 @@ +#ifndef __label_hh +#define __label_hh + +#include "widget.hh" + +namespace otk { + +class OtkLabel : public OtkWidget { + +public: + + OtkLabel(OtkWidget *parent); + ~OtkLabel(); + + inline const std::string &getText(void) const { return _text; } + void setText(const std::string &text) { _text = text; _dirty = true; } + + void update(void); + int exposeHandler(const XExposeEvent &e); + int configureHandler(const XConfigureEvent &e); + +private: + + std::string _text; + bool _dirty; +}; + +} + +#endif -- cgit v1.2.3