]> Dogcows Code - chaz/openbox/blob - src/labelwidget.hh
new authors. this is how we dooo iiiit...
[chaz/openbox] / 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/style.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::Color *_text_color;
19 int _sidemargin;
20 otk::Style::TextJustify _justify;
21 otk::ustring _text;
22 //! Object used by Xft to render to the drawable
23 XftDraw *_xftdraw;
24
25 public:
26 LabelWidget(otk::Widget *parent, WidgetBase::WidgetType type);
27 virtual ~LabelWidget();
28
29 virtual void setStyle(otk::Style *style);
30
31 virtual void adjust();
32
33 virtual void focus();
34 virtual void unfocus();
35
36 virtual void update();
37
38 inline const otk::ustring &text() const { return _text; }
39 void setText(const otk::ustring &text);
40 };
41
42 }
43
44 #endif // __oblabelwidget_hh
This page took 0.036908 seconds and 4 git commands to generate.