- return boost::dynamic_pointer_cast<Group>
- (
- _root_group->createChild("group", name)
- );
+ return _root_group->createChild<Group>(name);
+ }
+
+ //----------------------------------------------------------------------------
+ GroupPtr Canvas::getGroup(const std::string& name)
+ {
+ return _root_group->getChild<Group>(name);
+ }
+
+ //----------------------------------------------------------------------------
+ GroupPtr Canvas::getOrCreateGroup(const std::string& name)
+ {
+ return _root_group->getOrCreateChild<Group>(name);
+ }
+
+ //----------------------------------------------------------------------------
+ GroupPtr Canvas::getRootGroup()
+ {
+ return _root_group;
+ }
+
+ //----------------------------------------------------------------------------
+ void Canvas::setLayout(const LayoutRef& layout)
+ {
+ _layout = layout;
+ _layout->setCanvas(this);
+ _status |= LAYOUT_DIRTY;