X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Flabel.hh;h=cd9ef5a1276dad1d87fa61e3ab0fb6a794df3d4b;hb=1e47e17d08d72d181edc2bde598ad246055655ad;hp=1b31ae79a5b91703096c71f80e295f9241bbb095;hpb=99cd843fc6dc7a7f55b6c90fd1162f233853aad2;p=chaz%2Fopenbox diff --git a/otk/label.hh b/otk/label.hh index 1b31ae79..cd9ef5a1 100644 --- a/otk/label.hh +++ b/otk/label.hh @@ -14,12 +14,16 @@ namespace otk { class Label : public Widget { public: + Label(int screen, EventDispatcher *ed, int bevel = 3); Label(Widget *parent); virtual ~Label(); - inline const ustring& getText(void) const { return _text; } + inline const ustring& text(void) const { return _text; } void setText(const ustring &text); + virtual inline bool isHighlighted() const { return _highlight; } + virtual void setHighlighted(bool h); + RenderStyle::Justify horizontalJustify() const { return _justify_horz; } virtual void setHorizontalJustify(RenderStyle::Justify j); RenderStyle::Justify verticalJustify() const { return _justify_vert; } @@ -28,13 +32,13 @@ public: const Font *font() const { return _font; } virtual void setFont(const Font *f); - virtual void calcDefaultSizes(); - virtual void styleChanged(const RenderStyle &style); virtual void renderForeground(Surface &surface); protected: + virtual void calcDefaultSizes(); + //! The color the label will use for rendering its text RenderColor *_forecolor; @@ -53,6 +57,8 @@ private: RenderStyle::Justify _justify_vert; //! The drawing offset for the text int _drawx; + //! If the widget is highlighted or not + bool _highlight; }; }