]> git.mxchange.org Git - simgear.git/blobdiff - simgear/canvas/CanvasMgr.hxx
Fix #1783: repeated error message on console
[simgear.git] / simgear / canvas / CanvasMgr.hxx
index 5e51d2dfaee86509100eea2c0043ab95f09ac87f..51ffa576bc2cbfb9cec246e9d3f40d0f8b3cb8cc 100644 (file)
@@ -33,13 +33,16 @@ namespace canvas
     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
@@ -48,9 +51,15 @@ namespace canvas
        */
       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);
   };