]> icculus.org git repositories - mikachu/openbox.git/blob - src/labelwidget.hh
add comments for rming masks from the events
[mikachu/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 "otk/widget.hh"
6 #include "otk/font.hh"
7 #include "otk/style.hh"
8 #include "widget.hh"
9
10 namespace ob {
11
12 class OBLabelWidget : public otk::OtkWidget, public OBWidget
13 {
14 private:
15   void setTextures();
16   const otk::BFont *_font;
17   otk::BColor *_text_color;
18   int _sidemargin;
19   otk::Style::TextJustify _justify;
20   std::string _text;
21   //! Object used by Xft to render to the drawable
22   XftDraw *_xftdraw;
23   
24 public:
25   OBLabelWidget(otk::OtkWidget *parent, OBWidget::WidgetType type);
26   virtual ~OBLabelWidget();
27
28   virtual void setStyle(otk::Style *style);
29
30   virtual void adjust();
31
32   virtual void focus();
33   virtual void unfocus();
34
35   virtual void update();
36
37   inline const std::string &text() const { return _text; }
38   void setText(const std::string &text);
39 };
40
41 }
42
43 #endif // __oblabelwidget_hh