]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.h
The actual version works with complex box automatic generated from selected boxes...
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsKernelEditorGraphic / wxVtkSceneManager.h
index 1cee565cc6e8f518b6968e8ed1b39f2156389707..86f24fdfab050a282ee3d0191117a56fd71c92da 100644 (file)
@@ -46,8 +46,10 @@ Version:   $Revision$
 //Includes same project
 #include "GObjectsMVCFactory.h"
 #include "Observer.h"
+#include "GBoxModel.h"
+#include "GComplexBoxPortModel.h"
 #include "GPortModel.h"
-#include "GConnectorView.h"
+#include "vtkGConnectorView.h"
 #include "GConnectorModel.h"
 #include "GConnectorController.h"
 #include "vtkGPortView.h"
@@ -89,11 +91,13 @@ namespace bbtk
                ~wxVtkSceneManager();
 
                void configureBaseView();
-               void createGBlackBox(int x, int y,std::string packageName, std::string boxType);
-               GPortController* createGPort(int portType, std::string bbtkName, std::string bbtkType, int posinBox,GBlackBoxModel *blackBox);
-               void createGInputPort(int portType, int posinBox,GBlackBoxModel *blackBox, BlackBoxInputDescriptor *desc);
-               void createGOutputPort(int portType, int posinBox,GBlackBoxModel *blackBox, BlackBoxOutputDescriptor *desc);
-               void createGConnector(GPortModel* startPort);
+               int createGBlackBox(int x, int y,std::string packageName, std::string boxType);
+               int createGComplexBoxInputPort(std::string inputName);
+               int createGComplexBoxOutputPort(std::string outputName);
+               GPortController* createGPort(int portType, std::string bbtkName, std::string bbtkType, int posinBox,GBoxModel *blackBox);
+               int createGInputPort(int portType, int posinBox,GBoxModel *blackBox, BlackBoxInputDescriptor *desc);
+               int createGOutputPort(int portType, int posinBox,GBoxModel *blackBox, BlackBoxOutputDescriptor *desc);
+               int createGConnector(GPortModel* startPort);
 
                void registerController(InteractorStyleMaracas *param);
                void unregisterController(InteractorStyleMaracas *param);
@@ -114,15 +118,28 @@ namespace bbtk
 
                void displayBlackBoxInfo(std::string packageName, std::string boxName);
                void updateStatusBar(std::string textStatus);
-               std::string getDiagramScript();
+               std::string getDiagramBBS();
+               std::string saveComplexBoxBBS(std::string cbName,std::string cbAuthor="",std::string cbCategory="",std::string cbDescription="");
                void deleteObject(int id);
                void deleteAllBoxes();
                void saveDiagram(std::string &content);
+               void loadDiagram(ifstream &inputStream);
                void centerView();
 
                void refreshScene();
-               std::vector<int> getBoxes();
+               std::vector<int> getBlackBoxes();
                std::vector<int> getConnections();
+               std::vector<int> getComplexInputPorts();
+               std::vector<int> getComplexOutputPorts();
+
+               std::map<int,GObjectController*> getSelectedObjects();
+               int getNumSelectedObjects();
+
+               bool isComplexBox();
+               void setComplexBox(bool val);
+
+               int addObjectController(GObjectController* objController);
+               void addObjects(std::map<int,GObjectController*> objectsMap);
 
                
        private:
@@ -147,6 +164,8 @@ namespace bbtk
                //Saves the id's of the selected objects in the controllers map
                std::vector<int> _selectedObjects;
 
+               bool _isComplexBox;
+
        protected:
 
        };