X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Flabelwidget.hh;h=81d350c67627de9fc6f7a5310eae0382edb2a67c;hb=fc4885a3f4c2a023a6e64cce62fc5cde1667f2e9;hp=1ee104cd397322e63a82540388bb63df396e3e8f;hpb=c8e246f8de5af9963b22cc104d22ca10772028dd;p=chaz%2Fopenbox diff --git a/src/labelwidget.hh b/src/labelwidget.hh index 1ee104cd..81d350c6 100644 --- a/src/labelwidget.hh +++ b/src/labelwidget.hh @@ -5,37 +5,36 @@ #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 { -class OBLabelWidget : public otk::OtkWidget, public OBWidget +class LabelWidget : public otk::Widget, public WidgetBase { private: void setTextures(); - const otk::BFont *_font; - otk::BColor *_text_color; + const otk::Font *_font; + 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: - OBLabelWidget(otk::OtkWidget *parent, OBWidget::WidgetType type); - virtual ~OBLabelWidget(); + 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); }; }