]> icculus.org git repositories - dana/openbox.git/blob - src/labelwidget.hh
let the client be moved to a position specified for the *frame*
[dana/openbox.git] / src / labelwidget.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef   __oblabelwidget_hh
3 #define   __oblabelwidget_hh
4
5 #include "widgetbase.hh"
6 #include "otk/widget.hh"
7 #include "otk/font.hh"
8 #include "otk/renderstyle.hh"
9 #include "otk/ustring.hh"
10
11 namespace ob {
12
13 class LabelWidget : public otk::Widget, public WidgetBase
14 {
15 private:
16   void setTextures();
17   const otk::Font *_font;
18   otk::RenderColor *_text_color;
19   int _sidemargin;
20   otk::RenderStyle::TextJustify _justify;
21   otk::ustring _text;
22   
23 public:
24   LabelWidget(otk::Widget *parent, WidgetBase::WidgetType type);
25   virtual ~LabelWidget();
26
27   virtual void setStyle(otk::RenderStyle *style);
28
29   virtual void adjust();
30
31   virtual void focus();
32   virtual void unfocus();
33
34   virtual void renderForeground();
35
36   inline const otk::ustring &text() const { return _text; }
37   void setText(const otk::ustring &text);
38 };
39
40 }
41
42 #endif // __oblabelwidget_hh