X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Flabel.hh;h=9c32e544936ea0ebc414633814572690eec585e4;hb=027e974efd2602bf1513ebac736b61f172ac6bf3;hp=e52c34f473c0a521ce392836377ac1dcbe15dbac;hpb=9b6e5f9cf49df78be25720f9c4b33a733b856c9b;p=chaz%2Fopenbox diff --git a/otk/label.hh b/otk/label.hh index e52c34f4..9c32e544 100644 --- a/otk/label.hh +++ b/otk/label.hh @@ -16,13 +16,22 @@ public: inline const ustring &getText(void) const { return _text; } void setText(const ustring &text) { _text = text; _dirty = true; } - void update(void); + virtual void renderForeground(void); - virtual void setStyle(Style *style); + virtual void update(); + + void fitString(const std::string &str); + void fitSize(int w, int h); + + virtual void setStyle(RenderStyle *style); private: - //! Text displayed in the label + //! Text to be displayed in the label ustring _text; + //! The actual text being shown, may be a subset of _text + ustring _drawtext; + //! The drawing offset for the text + int _drawx; }; }