X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsKernelEditorGraphic%2FwxVtkSceneManager.h;h=a189fffddfc65168558cefd96736ed8a32a644c7;hb=624aa5ad040ac84abdb4ab19c52e11019c6180c5;hp=92f4a60aec3b0d8f34e9be398e39f315a46e318d;hpb=64fc9f949ff91d6e9d448ca0567e6205ee4d5be4;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.h b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.h index 92f4a60..a189fff 100644 --- a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.h +++ b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.h @@ -45,10 +45,26 @@ Version: $Revision$ //Includes same project #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 +#include //Includes creaMaracasVisu #include #include +#include +#include +#include //Includes vtk #include @@ -56,33 +72,77 @@ Version: $Revision$ #include #include + //Includes std #include +#include + namespace bbtk { + class wxGEditorTabPanel; - class wxVtkSceneManager : public InteractorStyleMaracas + 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 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); + void registerController(InteractorStyleMaracas *param); + void unregisterController(InteractorStyleMaracas *param); vtkRenderWindow* getRenderWindow(); vtkRenderer* getRenderer(); + void disconnectDrop(); + + virtual bool OnChar(); + virtual bool OnMouseMove(); + virtual bool OnLeftButtonDown(); + virtual bool OnLeftButtonUp(); + virtual bool OnRightButtonUp(); + virtual bool OnLeftDClick(); + + virtual void update(int idController,int command); + + void displayBlackBoxInfo(std::string packageName, std::string boxName); + void updateStatusBar(std::string textStatus); + std::string getDiagramScript(); + void removeObject(int id); 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; - void refreshRenderWindow(); + int _worldState; + + std::map _controllers; + + //Saves the id's of the selected objects in the controllers map + std::vector _selectedObjects; + protected: };