X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FwxGEditorTabPanel.h;h=0f3b3bf3d1fbbdfc92089da6d0567a4626231fbd;hb=8c6d29c9d753d55b8bc04e9ff95d0617ded15f13;hp=f84d193f61823030c597f56cd3cc57a79e30a4a3;hpb=ac7e88cf5991d996435b15c7d731b67078f8b2c9;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h index f84d193..0f3b3bf 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h @@ -35,29 +35,50 @@ Version: $Revision$ * \brief Class bbtk::BlackBox : abstract black-box interface. */ -/** -* \class bbtk::wxGEditorTabPanel -* \brief -*/ +/**** +* Design and Developpement of BBTK GEditor +* Ricardo A Corredor J +* RaC - 2010 +****/ #ifndef __wxGEditorTabPanel_h__ #define __wxGEditorTabPanel_h__ +//Includes same project +#include "wxVtkSceneManager.h" +#include "wxTabPanelsManager.h" + +//Includes wxWidgets #include #include #include +//Includes creaMaracasVisu #include +//Includes std #include -#include "wxVtkSceneManager.h" -#include "VTKGObjectsFactory.h" + + namespace bbtk { - class wxGEditorTabPanel : public wxTextDropTarget, public wxPanel + class tmpClasswxTextDropTarget : public wxTextDropTarget + { + public: + virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& data) { return false;} + }; + + + //RaC: It is important if it exists a double relation + //e.g. wxGEditorTabPanel includes wxVtkSceneManager, and wxVtkSceneManager includes wxGEditorTabPanel + class wxVtkSceneManager; + class wxTabPanelsManager; + + // RaC Be careful with the double heritance + class wxGEditorTabPanel : public wxPanel, public wxTextDropTarget { public: wxGEditorTabPanel(); @@ -65,13 +86,65 @@ namespace bbtk ~wxGEditorTabPanel(); void initWxVtkCanvas(); + + // Sets the parent manager + void setPanelsManager(wxTabPanelsManager* panelsManager); + + // Get the BBS script of the pipeline diagram included in the panel + std::string getDiagramBBS(); + + // Saves the actual BBS as complex box + // RaC TOFIX It must be included the package of the complex box + std::string saveComplexBoxBBS(std::string cbName,std::string cbAuthor="",std::string cbCategory="",std::string cbDescription=""); + + // Shows the dialog to edit black box parameters + void editBlackBox(GBlackBoxModel *bbmodel); + + // Save diagram as BBG + void saveDiagram(std::string &content); + + // Load BBG diagram + void loadDiagram(ifstream &inputStream); + + // Add a new complex input object to the scene + void addComplexInputPort(std::string portName); + + // Add a new complex output object to the scene + void addComplexOutputPort(std::string portName); + + // Delete all boxes in the diagram + void deleteAllBoxes(); + + // Center the camera in the initial position + void centerView(); + + // Display feedback info in the GUI + void displayBlackBoxInfo(std::string packageName, std::string boxName); + void updateStatusBar(std::string textStatus); + + int getPanelId(); + bool isComplexBox(); + void setComplexBox(bool val); + + // Returns a map with the id,controller of all the objects selected + std::map getSelectedObjects(); + + void addObjects(std::map objectsMap); + int getNumSelectedObjects(); + + // Receives the string from a drag and drop source as for example the BBTK Package Browser virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& data); + + + wxVtkSceneManager* getSceneManager(); + //========================================================================= private: - int _id; - wxAuiManager *_panelAUIMgr; - wxVtkSceneManager *_sceneManager; + int _id; + wxAuiManager *_panelAUIMgr; + wxVtkSceneManager *_sceneManager; + wxTabPanelsManager * _panelsManager; protected: