X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsKernelEditorGraphic%2FwxVtkSceneManager.h;h=5079fdc643307eea8b63b620d23987292a53999d;hb=a6d479881eeb637cd06afa3b2177e430fa05571e;hp=e1dccfcfd45f8b357bc143f9e564cc084ddcc409;hpb=8fa663b7b47e797e6e23722d1fef41c40419a6d6;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.h b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.h index e1dccfc..5079fdc 100644 --- a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.h +++ b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.h @@ -48,6 +48,12 @@ Version: $Revision$ #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 @@ -66,8 +72,6 @@ Version: $Revision$ #include #include -#include -#include //Includes std #include @@ -76,37 +80,67 @@ 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 createGBlackBox(int x, int y,std::string packageName, std::string boxType); + void 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 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); - virtual void update(int command); 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 _objects; - std::vector _selectedObjects; + int _worldState; + + std::map _controllers; + + //Saves the id's of the selected objects in the controllers map + std::vector _selectedObjects; protected: