]> Dogcows Code - chaz/openbox/blobdiff - src/labelwidget.hh
use otk objects in the ob scripts by importing otk
[chaz/openbox] / src / labelwidget.hh
index def81fefe5de801a10ecae291a26d11dd9b779e1..81d350c67627de9fc6f7a5310eae0382edb2a67c 100644 (file)
@@ -2,22 +2,39 @@
 #ifndef   __oblabelwidget_hh
 #define   __oblabelwidget_hh
 
-#include "otk/focuslabel.hh"
-#include "widget.hh"
+#include "widgetbase.hh"
+#include "otk/widget.hh"
+#include "otk/font.hh"
+#include "otk/renderstyle.hh"
+#include "otk/ustring.hh"
 
 namespace ob {
 
-class OBLabelWidget : public otk::OtkFocusLabel, public OBWidget
+class LabelWidget : public otk::Widget, public WidgetBase
 {
 private:
+  void setTextures();
+  const otk::Font *_font;
+  otk::RenderColor *_text_color;
+  int _sidemargin;
+  otk::RenderStyle::TextJustify _justify;
+  otk::ustring _text;
   
 public:
-  OBLabelWidget(otk::OtkWidget *parent, OBWidget::WidgetType type);
-  virtual ~OBLabelWidget();
+  LabelWidget(otk::Widget *parent, WidgetBase::WidgetType type);
+  virtual ~LabelWidget();
 
-  virtual void setStyle(otk::Style *style);
+  virtual void setStyle(otk::RenderStyle *style);
 
   virtual void adjust();
+
+  virtual void focus();
+  virtual void unfocus();
+
+  virtual void renderForeground();
+
+  inline const otk::ustring &text() const { return _text; }
+  void setText(const otk::ustring &text);
 };
 
 }
This page took 0.021009 seconds and 4 git commands to generate.