]> Dogcows Code - chaz/openbox/blobdiff - otk/focuswidget.cc
split up widget and basewidget
[chaz/openbox] / otk / focuswidget.cc
index 22dd8757d5b6927e0b3f3bc7d04d97bed61e3585..e956561e2224fc94a78eb38f5754e23b86dbfe78 100644 (file)
@@ -1,3 +1,9 @@
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
+
+#ifdef HAVE_CONFIG_H
+# include "../config.h"
+#endif
+
 #include "focuswidget.hh"
 
 namespace otk {
@@ -8,10 +14,7 @@ OtkFocusWidget::OtkFocusWidget(OtkWidget *parent, Direction direction)
   _focus_texture = parent->getTexture();
 }
 
-OtkFocusWidget::OtkFocusWidget(Style *style, Direction direction,
-                               Cursor cursor, int bevel_width)
-  : OtkWidget(style, direction, cursor, bevel_width),
-    _unfocus_texture(0), _focused(true)
+OtkFocusWidget::~OtkFocusWidget()
 {
 }
 
@@ -20,15 +23,13 @@ void OtkFocusWidget::focus(void)
   if (_focused)
     return;
 
+  // XXX: what about OtkWidget::focus()
+
   assert(_focus_texture);
   OtkWidget::setTexture(_focus_texture);
   OtkWidget::update();
 
-  OtkWidget::OtkWidgetList children = OtkWidget::getChildren();
-
-  OtkWidget::OtkWidgetList::iterator it = children.begin(),
-    end = children.end();
-
+  OtkBaseWidgetList::iterator it = _children.begin(), end = _children.end();
   OtkFocusWidget *tmp = 0;
   for (; it != end; ++it) {
     tmp = dynamic_cast<OtkFocusWidget*>(*it);
@@ -45,11 +46,7 @@ void OtkFocusWidget::unfocus(void)
   OtkWidget::setTexture(_unfocus_texture);
   OtkWidget::update();
 
-  OtkWidget::OtkWidgetList children = OtkWidget::getChildren();
-
-  OtkWidget::OtkWidgetList::iterator it = children.begin(),
-    end = children.end();
-
+  OtkBaseWidgetList::iterator it = _children.begin(), end = _children.end();
   OtkFocusWidget *tmp = 0;
   for (; it != end; ++it) {
     tmp = dynamic_cast<OtkFocusWidget*>(*it);
This page took 0.02092 seconds and 4 git commands to generate.