void Container::add(Widget &wdg)
{
wdg.set_parent(this);
- children.push_back(create_child(&wdg));
+ children.push_back(new Child(*this, &wdg));
if(wdg.get_animation_interval())
check_animation_interval();
children_rebuild_needed = true;
on_child_removed(wdg);
}
-Container::Child *Container::create_child(Widget *wdg)
-{
- return new Child(*this, wdg);
-}
-
Geometry Container::determine_child_geometry(const Widget &child, const Part &part) const
{
Geometry pgeom = part.get_geometry();
void add(Widget &);
void remove(Widget &);
protected:
- virtual Child *create_child(Widget *);
Geometry determine_child_geometry(const Widget &, const Part &) const;
void autosize_child(const Widget &, const Part &, Geometry &) const;
void reposition_child(Widget &, const Part &) const;
{
if(part.get_name()=="children")
{
- for(const Container::Child *c: children)
+ for(const Child *c: children)
if(c->widget->is_visible())
c->widget->render(renderer);
}