]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.h
Updated Version with the moving of the objects updated and the background doesn't...
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsKernelEditorGraphic / wxVtkSceneManager.h
index 55343688793515d83555e59cd9af5b0a028a567c..c6f7a6b11468719bec613bf3d7e03722b71d654b 100644 (file)
@@ -47,6 +47,13 @@ Version:   $Revision$
 #include "GObjectsMVCFactory.h"
 #include "Observer.h"
 #include "GPortModel.h"
+#include "GConnectorView.h"
+#include "GConnectorModel.h"
+#include "GConnectorController.h"
+#include "vtkGPortView.h"
+#include "manualConnectorContourView.h"
+#include "manualConnectorContourController.h"
+#include "wxGEditorTabPanel.h"
 
 //Includes bbtk
 #include <bbtkBlackBoxInputDescriptor.h>
@@ -57,7 +64,6 @@ Version:   $Revision$
 #include <InteractorStyleMaracas.h>
 #include <vtkInteractorStyleBaseView2D.h>
 #include <manualContourControler.h>
-#include <manualViewContour.h>
 #include <manualContourModel.h>
 
 //Includes vtk
@@ -66,6 +72,7 @@ Version:   $Revision$
 #include <vtkRenderer.h>
 #include <vtkInteractorStyleImage.h>
 
+
 //Includes std
 #include <iostream>
 #include <map>
@@ -73,17 +80,19 @@ Version:   $Revision$
 
 namespace bbtk
 {
+       class wxGEditorTabPanel;
 
        class wxVtkSceneManager : public InteractorStyleMaracas , public Observer
        {
        public: 
-               wxVtkSceneManager(wxDropTarget *parent, wxVtk3DBaseView *baseView, int id);
+               wxVtkSceneManager(wxGEditorTabPanel *parent, wxVtk3DBaseView *baseView, int idManager);
                ~wxVtkSceneManager();
 
                void configureBaseView();
                void createGBlackBox(int x, int y,std::string packageName, std::string boxName);
-               void createGInputPort(BlackBoxInputDescriptor *desc,GBlackBoxModel *blackBox, int pos);
-               void createGOutputPort(BlackBoxOutputDescriptor *desc,GBlackBoxModel *blackBox, int pos);
+               void createGPort(int portType, 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);
 
                void registerController(InteractorStyleMaracas *param);
@@ -94,16 +103,38 @@ namespace bbtk
                void disconnectDrop();
                
                virtual bool OnMouseMove();
+               virtual bool  OnLeftButtonDown(); 
+               virtual bool  OnLeftButtonUp();
+               virtual bool OnRightButtonUp();
+
+               virtual void update(int idController,int command);
 
-               virtual void update(int command);
+               void displayBlackBoxInfo(std::string packageName, std::string boxName);
                
        private:
 
-               int _id;
+               wxGEditorTabPanel *_parent;
+
+               // Last controller created
+               int _idLastController;
+
+               // Id of the manager, the same of the panel
+               int _idManager;
+
+               // Boxes number in the scene
+               int _numBoxes;
+
+               // StartDragging
+               bool _startDragging;
+
                wxVtk3DBaseView *_baseView;
 
-               std::vector<GObjectModel*> _objects;
-               std::vector<GObjectModel*> _selectedObjects;
+               int _worldState;
+
+               std::map<int,GObjectController*> _controllers;
+
+               //Saves the id's of the selected objects in the controllers map
+               std::vector<int> _selectedObjects;
 
        protected: