2003-01-11 19:17:13 +00:00
|
|
|
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
|
2003-01-27 23:47:17 +00:00
|
|
|
#ifndef __focuslabel_hh
|
|
|
|
#define __focuslabel_hh
|
2002-11-16 13:02:29 +00:00
|
|
|
|
|
|
|
#include "focuswidget.hh"
|
|
|
|
|
|
|
|
namespace otk {
|
|
|
|
|
2003-01-11 19:17:13 +00:00
|
|
|
class FocusLabel : public FocusWidget {
|
2002-11-16 13:02:29 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2003-01-11 19:17:13 +00:00
|
|
|
FocusLabel(Widget *parent);
|
|
|
|
~FocusLabel();
|
2002-11-16 13:02:29 +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:02:29 +00:00
|
|
|
|
2003-01-27 19:11:09 +00:00
|
|
|
virtual void renderForeground();
|
2002-11-16 13:02:29 +00:00
|
|
|
|
2003-01-30 21:11:04 +00:00
|
|
|
virtual void update();
|
|
|
|
|
|
|
|
void fitString(const std::string &str);
|
|
|
|
void fitSize(int w, int h);
|
|
|
|
|
2003-01-22 22:46:16 +00:00
|
|
|
virtual void setStyle(RenderStyle *style);
|
2002-12-03 19:10:03 +00:00
|
|
|
|
2002-11-16 13:02:29 +00:00
|
|
|
private:
|
2002-12-03 08:54:51 +00:00
|
|
|
//! Text displayed in the label
|
2003-01-13 04:46:50 +00:00
|
|
|
ustring _text;
|
2002-11-16 13:02:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-01-27 23:47:17 +00:00
|
|
|
#endif // __focuslabel_hh
|