-/*=========================================================================
+/*=========================================================================
Program: bbtk
Module: $RCSfile$
Language: C++
* Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
* Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
*
-* This software is governed by the CeCILL-B license under French law and
-* abiding by the rules of distribution of free software. You can use,
-* modify and/ or redistribute the software under the terms of the CeCILL-B
-* license as circulated by CEA, CNRS and INRIA at the following URL
-* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+* This software is governed by the CeCILL-B license under French law and
+* abiding by the rules of distribution of free software. You can use,
+* modify and/ or redistribute the software under the terms of the CeCILL-B
+* license as circulated by CEA, CNRS and INRIA at the following URL
+* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
* or in the file LICENSE.txt.
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited
-* liability.
+* liability.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-B license and that you accept its terms.
-* ------------------------------------------------------------------------ */
+* ------------------------------------------------------------------------ */
/**
-* \file
-* \brief Class bbtk::BlackBox : abstract black-box interface.
+* \file
+* \brief Class bbtk::BlackBox : abstract black-box interface.
*/
/****
class wxVtkSceneManager : public InteractorStyleMaracas , public Observer
{
- public:
+ public:
wxVtkSceneManager(wxGEditorTabPanel *parent, wxVtk3DBaseView *baseView, int idManager);
~wxVtkSceneManager();
virtual bool OnChar();
virtual bool OnMouseMove();
- virtual bool OnLeftButtonDown();
+ virtual bool OnLeftButtonDown();
virtual bool OnLeftButtonUp();
virtual bool OnRightButtonUp();
virtual bool OnLeftDClick();
int createGConnector(GPortModel* startPort);
void configGBlackBox(int idBox, double xIn, double yIn, double zIn, std::string name, bool boxExecutable,double xEn,double yEn,double zEn);
- void configGConnetion( std::string nameStartBox, std::string nameStartPort, std::string
+ int configGConnetion( std::string nameStartBox, std::string nameStartPort, std::string
nameEndBox, std::string nameEndPort);
void configGComBoxInputOutputPort(bool inputoutput, std::string inputPortName, double xIn, double yIn,double zIn);
GBoxModel* findGBox(std::string boxname);
-
-
+
+
vtkRenderWindow* getRenderWindow();
- vtkRenderer* getRenderer();
+ vtkRenderer* getRenderer();
virtual void update(int idController,int command);
//-------
//Returns a string with the BBS script of the current diagram.
- std::string getDiagramBBS();
+ std::string getDiagramBBS(bool wln=false);
//Returns a string with the BBS script of the complex box.
std::string saveComplexBoxBBS(std::string cbName,std::string cbAuthor="",std::string cbCategory="",std::string cbDescription="");
//Delete the object in the list of controllers with the id given by parameter.
void deleteObject(int id);
-
+
void AddControlerToBeRemove(std::vector<int> *controllersToRemove, int id);
//Clear list of controllers and refresh
//Save the diagram in the BBG format, in the string given by param.
void saveDiagram(std::string &content);
- //Load the diagram
+ //Load the diagram
void loadDiagram(ifstream &inputStream);
//Center the view of the camera in the initial position
//Saves the id's of the selected objects in the controllers map
std::vector<int> _selectedObjects;
- //Is the diagram in state complex box
+ //Is the diagram in state complex box
bool _isComplexBox;
int _idConnectionInCreation;
int _contLastId;
-
+
vtkTextActor3D *_textActor;
vtkPoints *_pts;
vtkActor *_fillObjectActor;
vtkDataSetMapper *_aPolygonMapper;
+ std::string LineNumber(bool withLineNumber, int &value);
+ int GetIndexInSelected(int idControler);
+ void UnSelectBlackBoxes();
+ GObjectController *GetGBlackBoxControlerPointedByMouse();
+ void CancelConnection();
+
protected:
};