]> Dogcows Code - chaz/openbox/blob - src/labelwidget.hh
use otk objects in the ob scripts by importing otk
[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/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
This page took 0.032596 seconds and 4 git commands to generate.