#include "GObjectsMVCFactory.h"
#include "Observer.h"
#include "GPortModel.h"
-#include "vtkGPortView.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>
#include <vtkRenderer.h>
#include <vtkInteractorStyleImage.h>
-#include <vtkVectorText.h>
-#include <vtkLinearExtrusionFilter.h>
//Includes std
#include <iostream>
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 createGPort(int portType, int posinBox,GBlackBoxModel *blackBox);
+ 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 disconnectDrop();
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);
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<GObjectController*> _objects;
+ int _worldState;
+
std::map<int,GObjectController*> _controllers;
+ //Saves the id's of the selected objects in the controllers map
+ std::vector<int> _selectedObjects;
+
protected:
};