]> Dogcows Code - chaz/openbox/commitdiff
make setStyle() recursive
authorDana Jansens <danakj@orodu.net>
Wed, 4 Dec 2002 11:25:43 +0000 (11:25 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 4 Dec 2002 11:25:43 +0000 (11:25 +0000)
otk/widget.cc
otk/widget.hh

index e95848a6577e4e6cb4b9b2771a2851994229f83b..6423a7af1197afa961b1ad05fb5a47beb84cd9f9 100644 (file)
@@ -420,6 +420,17 @@ void OtkWidget::removeChild(OtkWidget *child)
     _children.erase(it);
 }
 
+void OtkWidget::setStyle(Style *style)
+{
+  assert(style);
+  _style = style;
+  _dirty = true;
+  OtkWidgetList::iterator it, end = _children.end();
+  for (it = _children.begin(); it != end; ++it)
+    (*it)->setStyle(style);
+}
+
+
 void OtkWidget::setEventDispatcher(OtkEventDispatcher *disp)
 {
   if (_event_dispatcher)
index 57973e9b35594b553908e0d534630f9326545608..249a4e281262d1c7c0b56038436e4f8447807509 100644 (file)
@@ -101,7 +101,7 @@ public:
   void setDirection(Direction dir) { _direction = dir; }
 
   inline Style *getStyle(void) const { return _style; }
-  virtual void setStyle(Style *style) { assert(style); _style = style; }
+  virtual void setStyle(Style *style);
 
   inline OtkEventDispatcher *getEventDispatcher(void)
   { return _event_dispatcher; }
This page took 0.02398 seconds and 4 git commands to generate.