2003-01-11 19:17:13 +00:00
|
|
|
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
|
2002-11-16 13:08:10 +00:00
|
|
|
#ifndef __label_hh
|
|
|
|
#define __label_hh
|
|
|
|
|
|
|
|
#include "widget.hh"
|
|
|
|
|
|
|
|
namespace otk {
|
|
|
|
|
2003-01-11 19:17:13 +00:00
|
|
|
class Label : public Widget {
|
2002-11-16 13:08:10 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2003-01-11 19:17:13 +00:00
|
|
|
Label(Widget *parent);
|
|
|
|
~Label();
|
2002-11-16 13:08:10 +00:00
|
|
|
|
2003-01-13 04:46:50 +00:00
|
|
|
inline const ustring &getText(void) const { return _text; }
|
|
|
|
void setText(const ustring &text) { _text = text; _dirty = true; }
|
2002-11-16 13:08:10 +00:00
|
|
|
|
2003-01-20 06:11:12 +00:00
|
|
|
virtual void renderForeground(void);
|
2002-11-16 13:08:10 +00:00
|
|
|
|
2002-12-03 19:10:03 +00:00
|
|
|
virtual void setStyle(Style *style);
|
2002-12-18 02:28:44 +00:00
|
|
|
|
2002-11-16 13:08:10 +00:00
|
|
|
private:
|
2003-01-20 06:11:12 +00:00
|
|
|
//! Text to be displayed in the label
|
2003-01-13 04:46:50 +00:00
|
|
|
ustring _text;
|
2003-01-20 06:11:12 +00:00
|
|
|
//! The actual text being shown, may be a subset of _text
|
|
|
|
ustring _drawtext;
|
|
|
|
//! The drawing offset for the text
|
|
|
|
int _drawx;
|
2002-11-16 13:08:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|