make setStyle() recursive
This commit is contained in:
parent
772ff27864
commit
7dc834cc93
2 changed files with 12 additions and 1 deletions
|
@ -420,6 +420,17 @@ void OtkWidget::removeChild(OtkWidget *child)
|
||||||
_children.erase(it);
|
_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)
|
void OtkWidget::setEventDispatcher(OtkEventDispatcher *disp)
|
||||||
{
|
{
|
||||||
if (_event_dispatcher)
|
if (_event_dispatcher)
|
||||||
|
|
|
@ -101,7 +101,7 @@ public:
|
||||||
void setDirection(Direction dir) { _direction = dir; }
|
void setDirection(Direction dir) { _direction = dir; }
|
||||||
|
|
||||||
inline Style *getStyle(void) const { return _style; }
|
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)
|
inline OtkEventDispatcher *getEventDispatcher(void)
|
||||||
{ return _event_dispatcher; }
|
{ return _event_dispatcher; }
|
||||||
|
|
Loading…
Reference in a new issue