1 /*=========================================================================
7 =========================================================================*/
9 /* ---------------------------------------------------------------------
11 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
12 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
14 * This software is governed by the CeCILL-B license under French law and
15 * abiding by the rules of distribution of free software. You can use,
16 * modify and/ or redistribute the software under the terms of the CeCILL-B
17 * license as circulated by CEA, CNRS and INRIA at the following URL
18 * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
19 * or in the file LICENSE.txt.
21 * As a counterpart to the access to the source code and rights to copy,
22 * modify and redistribute granted by the license, users are provided only
23 * with a limited warranty and the software's author, the holder of the
24 * economic rights, and the successive licensors have only limited
27 * The fact that you are presently reading this means that you have had
28 * knowledge of the CeCILL-B license and that you accept its terms.
29 * ------------------------------------------------------------------------ */
35 * \brief Class bbtk::BlackBox : abstract black-box interface.
39 * Design and Developpement of BBTK GEditor
40 * Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
44 #ifndef __wxTabPanelsManager_h__
45 #define __wxTabPanelsManager_h__
47 #include <wx/aui/auibook.h>
49 #include <wx/string.h>
54 #include "wxGEditorTabPanel.h"
55 #include "wxVtkSceneManager.h"
56 #include "bbtkwxGUIEditorGraphicBBS.h"
64 class wxVtkSceneManager;
65 class wxGEditorTabPanel;
66 class wxGUIEditorGraphicBBS;
68 class wxTabPanelsManager : public wxEvtHandler
73 wxTabPanelsManager(wxGUIEditorGraphicBBS *parent);
74 ~wxTabPanelsManager();
76 void addNewTab(wxString tabName=_T("<void>"));
77 wxAuiNotebook* getAuiNotebook();
78 wxGEditorTabPanel* getActualTabPanel();
80 void displayBlackBoxInfo(std::string packageName, std::string boxName);
81 void updateStatusBar(std::string textStatus);
83 std::string getActualDiagramBBS(bool wln=false);
84 std::string getActualComplexBoxBBS();
86 void editBlackBox(GBlackBoxModel *bbmodel);
87 void deleteAllBoxesActualDiagram();
88 void centerViewActualDiagram();
89 void saveActualDiagram(std::string &content, const std::string &path); //DFCH
90 void loadDiagram(ifstream &inputStream, const std::string &path); //DFCH
92 void saveTempActualDiagram(); //FCY
93 void loadTempDiagram(unsigned short un); //FCY
94 unsigned short getUndoState();
95 unsigned short getRedoState();
96 bool isActualDiagramComplexBox();
97 void setActualDiagramComplexBox(bool val);
98 void addActualDiagramComplexInputPort(std::string portName);
99 void addActualDiagramComplexOutputPort(std::string portName);
100 void copySelectedBBoxesToComplexDiagram();
101 int getNumActualSelectedObjects();
103 void OnTabChanged(wxAuiNotebookEvent& event);
104 void VerifyLastTabPanel();
106 void SetCbName(std::string cbName);
107 void SetCbPackageName(std::string packagename);
108 void SetAuthor(std::string author);
109 void SetCategory(std::string category);
110 void SetDescription(std::string description);
111 std::string GetCbName();
112 std::string GetCbPackageName();
113 std::string GetAuthor();
114 std::string GetDescription();
115 std::string GetCategory();
117 void SetNameTabPanel(wxString tabpanelname);
118 std::string GetNameTabPanel();
119 std::string GetCurrentTabPanelPath( ); //DFCH
125 // Private Attributes
126 wxGUIEditorGraphicBBS *_parent;
127 map<int, wxGEditorTabPanel*> _panels;
128 wxGEditorTabPanel *_actual;
129 wxAuiNotebook *_notebook;