summaryrefslogtreecommitdiff
path: root/src/labelwidget.hh
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-12-25 22:02:34 +0000
committerDana Jansens <danakj@orodu.net>2002-12-25 22:02:34 +0000
commit2ae2b257d39ea62640c2590f794e4275c6db1cd4 (patch)
treef26abe4a0601d263fbc460eddc012c1d674c868b /src/labelwidget.hh
parent3c61812e588fb3c34d0713d7f82ccbf21091f032 (diff)
might not compile... ob uses its own widgets now, which subclass only the base otk widget. working on compressing focus events and handling them etc.
Diffstat (limited to 'src/labelwidget.hh')
-rw-r--r--src/labelwidget.hh22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/labelwidget.hh b/src/labelwidget.hh
index def81fef..01662f85 100644
--- a/src/labelwidget.hh
+++ b/src/labelwidget.hh
@@ -2,14 +2,24 @@
#ifndef __oblabelwidget_hh
#define __oblabelwidget_hh
-#include "otk/focuslabel.hh"
+#include "otk/widget.hh"
+#include "otk/font.hh"
+#include "otk/style.hh"
#include "widget.hh"
namespace ob {
-class OBLabelWidget : public otk::OtkFocusLabel, public OBWidget
+class OBLabelWidget : public otk::OtkWidget, public OBWidget
{
private:
+ void setTextures();
+ const otk::BFont *_font;
+ otk::BColor *_text_color;
+ int _sidemargin;
+ otk::Style::TextJustify _justify;
+ std::string _text;
+ //! Object used by Xft to render to the drawable
+ XftDraw *_xftdraw;
public:
OBLabelWidget(otk::OtkWidget *parent, OBWidget::WidgetType type);
@@ -18,6 +28,14 @@ public:
virtual void setStyle(otk::Style *style);
virtual void adjust();
+
+ virtual void focus();
+ virtual void unfocus();
+
+ virtual void update();
+
+ inline const std::string &text() const { return _text; }
+ void setText(const std::string &text);
};
}