00001 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- 00002 #ifndef __focuslabel_hh 00003 #define __focuslabel_hh 00004 00005 #include "focuswidget.hh" 00006 00007 namespace otk { 00008 00009 class FocusLabel : public FocusWidget { 00010 00011 public: 00012 00013 FocusLabel(Widget *parent); 00014 ~FocusLabel(); 00015 00016 inline const ustring &getText(void) const { return _text; } 00017 void setText(const ustring &text) { _text = text; _dirty = true; } 00018 00019 virtual void renderForeground(); 00020 00021 virtual void update(); 00022 00023 void fitString(const std::string &str); 00024 void fitSize(int w, int h); 00025 00026 virtual void setStyle(RenderStyle *style); 00027 00028 private: 00029 //! Text displayed in the label 00030 ustring _text; 00031 }; 00032 00033 } 00034 00035 #endif // __focuslabel_hh