X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Flabelwidget.hh;h=81d350c67627de9fc6f7a5310eae0382edb2a67c;hb=b45a68cc30121ad2c5cd3b795a6b5e8572425316;hp=92c35c3c56d5c93388e7616b191bc15860311f97;hpb=77ab46d1e35d48e73c201e6de88b26f48bb06425;p=chaz%2Fopenbox diff --git a/src/labelwidget.hh b/src/labelwidget.hh index 92c35c3c..81d350c6 100644 --- a/src/labelwidget.hh +++ b/src/labelwidget.hh @@ -5,7 +5,8 @@ #include "widgetbase.hh" #include "otk/widget.hh" #include "otk/font.hh" -#include "otk/style.hh" +#include "otk/renderstyle.hh" +#include "otk/ustring.hh" namespace ob { @@ -14,28 +15,26 @@ class LabelWidget : public otk::Widget, public WidgetBase private: void setTextures(); const otk::Font *_font; - otk::Color *_text_color; + otk::RenderColor *_text_color; int _sidemargin; - otk::Style::TextJustify _justify; - std::string _text; - //! Object used by Xft to render to the drawable - XftDraw *_xftdraw; + otk::RenderStyle::TextJustify _justify; + otk::ustring _text; public: LabelWidget(otk::Widget *parent, WidgetBase::WidgetType type); virtual ~LabelWidget(); - virtual void setStyle(otk::Style *style); + virtual void setStyle(otk::RenderStyle *style); virtual void adjust(); virtual void focus(); virtual void unfocus(); - virtual void update(); + virtual void renderForeground(); - inline const std::string &text() const { return _text; } - void setText(const std::string &text); + inline const otk::ustring &text() const { return _text; } + void setText(const otk::ustring &text); }; }