X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Flabelwidget.hh;h=1ee104cd397322e63a82540388bb63df396e3e8f;hb=8f8acc24933830d4f5784616b9b0c5896bde0b93;hp=def81fefe5de801a10ecae291a26d11dd9b779e1;hpb=83727b8e6404f7e00e7369c39da8779dfb85ae09;p=chaz%2Fopenbox diff --git a/src/labelwidget.hh b/src/labelwidget.hh index def81fef..1ee104cd 100644 --- a/src/labelwidget.hh +++ b/src/labelwidget.hh @@ -2,14 +2,24 @@ #ifndef __oblabelwidget_hh #define __oblabelwidget_hh -#include "otk/focuslabel.hh" -#include "widget.hh" +#include "widgetbase.hh" +#include "otk/widget.hh" +#include "otk/font.hh" +#include "otk/style.hh" namespace ob { -class OBLabelWidget : public otk::OtkFocusLabel, public OBWidget +class OBLabelWidget : public otk::OtkWidget, public OBWidget { private: + void setTextures(); + const otk::BFont *_font; + otk::BColor *_text_color; + int _sidemargin; + otk::Style::TextJustify _justify; + std::string _text; + //! Object used by Xft to render to the drawable + XftDraw *_xftdraw; public: OBLabelWidget(otk::OtkWidget *parent, OBWidget::WidgetType type); @@ -18,6 +28,14 @@ public: virtual void setStyle(otk::Style *style); virtual void adjust(); + + virtual void focus(); + virtual void unfocus(); + + virtual void update(); + + inline const std::string &text() const { return _text; } + void setText(const std::string &text); }; }