public:
/**
- * @param node Root node of branch used to control canvasses
- * @param system_adapter Adapter for connecting between canvas and
- * application framework
+ * @param node Root node of branch used to control canvasses
+ */
+ CanvasMgr(SGPropertyNode_ptr node);
+
+ /**
+ * Create a new canvas
*
+ * @param name Name of the new canvas
*/
- CanvasMgr( SGPropertyNode_ptr node,
- SystemAdapterPtr system_adapter );
+ CanvasPtr createCanvas(const std::string& name = "");
/**
* Get ::Canvas by index
*/
CanvasPtr getCanvas(size_t index) const;
- protected:
+ /**
+ * Get ::Canvas by name
+ *
+ * @param name Value of child node "name" in
+ * /canvas/by-index/texture[i]/name
+ */
+ CanvasPtr getCanvas(const std::string& name) const;
- SystemAdapterPtr _system_adapter;
+ protected:
virtual void elementCreated(PropertyBasedElementPtr element);
};