]> Creatis software - bbtkGEditor.git/blob - lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h
9d710cdc5020cebb099fa0c441e950a7200a6878
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsWxGUIEditorGraphic / wxTabPanelsManager.h
1 /*=========================================================================
2 Program:   bbtk
3 Module:    $RCSfile$
4 Language:  C++
5 Date:      $Date$
6 Version:   $Revision$
7 =========================================================================*/
8
9 /* ---------------------------------------------------------------------
10
11 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
12 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
13 *
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.
20 *
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
25 *  liability.
26 *
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 * ------------------------------------------------------------------------ */
30
31
32
33 /**
34 *  \file
35 *  \brief Class bbtk::BlackBox : abstract black-box interface.
36 */
37
38 /****
39 * Design and Developpement of BBTK GEditor
40 * Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
41 * RaC - 2010
42 ****/
43
44 #ifndef __wxTabPanelsManager_h__
45 #define __wxTabPanelsManager_h__
46
47 #include <wx/aui/auibook.h>
48 #include <wx/panel.h>
49 #include <wx/string.h>
50 #include <map>
51 #include <iostream>
52
53 #include "wxGEditorTabPanel.h"
54 #include "wxVtkSceneManager.h"
55 #include "bbtkwxGUIEditorGraphicBBS.h"
56
57 using namespace std;
58
59 namespace bbtk
60 {
61
62         class wxVtkSceneManager;
63         class wxGEditorTabPanel;
64         class wxGUIEditorGraphicBBS;
65
66         class wxTabPanelsManager : public wxEvtHandler
67         {
68
69         public:
70
71                 wxTabPanelsManager(wxGUIEditorGraphicBBS *parent);
72                 ~wxTabPanelsManager();
73
74                 void addNewTab(wxString tabName=_T("<void>"));
75                 wxAuiNotebook* getAuiNotebook();
76                 wxGEditorTabPanel* getActualTabPanel();
77
78                 void displayBlackBoxInfo(std::string packageName, std::string boxName);
79                 void updateStatusBar(std::string textStatus);
80
81                 std::string getActualDiagramBBS(bool wln=false);
82                 std::string getActualComplexBoxBBS();
83
84                 void editBlackBox(GBlackBoxModel *bbmodel);
85                 void deleteAllBoxesActualDiagram();
86                 void centerViewActualDiagram();
87                 void saveActualDiagram(std::string &content);
88                 void loadDiagram(ifstream &inputStream);
89                 bool isActualDiagramComplexBox();
90                 void setActualDiagramComplexBox(bool val);
91                 void addActualDiagramComplexInputPort(std::string portName);
92                 void addActualDiagramComplexOutputPort(std::string portName);
93                 void copySelectedBBoxesToComplexDiagram();
94                 int getNumActualSelectedObjects();
95
96                 void OnTabChanged(wxAuiNotebookEvent& event);
97         void VerifyLastTabPanel();
98
99         void SetCbName(std::string cbName);
100         void SetCbPackageName(std::string packagename);
101         void SetAuthor(std::string author);
102         void SetCategory(std::string category);
103         void SetDescription(std::string description);
104         std::string GetCbName();
105         std::string GetCbPackageName();
106         std::string GetAuthor();
107         std::string GetDescription();
108         std::string GetCategory();
109
110             void SetNameTabPanel(wxString tabpanelname);
111             std::string GetCurrentTabPanelPath( ); //DFCH
112
113
114
115         private:
116
117         // Private Attributes
118                 wxGUIEditorGraphicBBS           *_parent;
119                 map<int, wxGEditorTabPanel*>    _panels;
120                 wxGEditorTabPanel               *_actual;
121                 wxAuiNotebook                   *_notebook;
122                 int                             _lastId;
123
124         protected:
125
126         };
127
128
129 }
130 // namespace bbtk
131 #endif
132