]> Dogcows Code - chaz/openbox/blob - otk/label.hh
watch for bad actions and contexts
[chaz/openbox] / otk / label.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __label_hh
3 #define __label_hh
4
5 #include "widget.hh"
6
7 namespace otk {
8
9 class Label : public Widget {
10
11 public:
12
13 Label(Widget *parent);
14 ~Label();
15
16 inline const ustring &getText(void) const { return _text; }
17 void setText(const ustring &text) { _text = text; _dirty = true; }
18
19 virtual void renderForeground(void);
20
21 virtual void update();
22
23 void fitString(const std::string &str);
24 void fitSize(int w, int h);
25
26 virtual void setStyle(RenderStyle *style);
27
28 private:
29 //! Text to be displayed in the label
30 ustring _text;
31 //! The actual text being shown, may be a subset of _text
32 ustring _drawtext;
33 //! The drawing offset for the text
34 int _drawx;
35 };
36
37 }
38
39 #endif
This page took 0.035125 seconds and 4 git commands to generate.