]> Creatis software - bbtkGEditor.git/blob - lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h
Actual Version : It is possible to define, to create and to save a complex box ....
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsWxGUIEditorGraphic / bbtkwxGUIEditorGraphicBBS.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  * \class bbtk::WxGUIEditorGraphicBBS
40  * \brief 
41  */
42  
43 #ifndef __WxGUIEditorGraphicBBS_h__
44 #define __WxGUIEditorGraphicBBS_h__
45
46 //Includes same project
47 #include "wxTabPanelsManager.h"
48 #include "wxBlackBoxEditionDialog.h"
49 #include "wxVtkSceneManager.h"
50 #include "GlobalConstants.h"
51
52 //#include "C:\RaC\CREATIS\bbtkGEditor\data\icons\wxart_new.xpm" // JPR
53 #include "wxart_new.xpm" // JPR
54 #include "wxart_open.xpm"
55 #include "wxart_save.xpm"
56 #include "wxart_run.xpm"
57 #include "wxart_delete.xpm"
58 #include "wxart_centerview.xpm"
59 #include "wxart_complexbox.xpm"
60 #include "wxart_complexinputport.xpm"
61 #include "wxart_complexoutputport.xpm"
62
63 //Includes creaMaracasVisu
64
65 //Includes bbtk
66 #include <bbtkWxGUIPackageBrowser2.h>
67 #include <bbtkWxGUIHtmlBrowser.h>
68 #include <bbtkBlackBoxDescriptor.h>
69 #include <bbtkConfigurationFile.h>
70
71 //Includes vtk
72
73 //Includes wxWidgets
74 #include <wx/frame.h>
75 #include <wx/aui/aui.h>
76 #include <wx/aui/auibook.h>
77 #include <wx/panel.h>
78 #include <wx/toolbar.h>
79 #include <wx/bitmap.h>
80 #include <wx/menu.h>
81 #include <wx/dnd.h>
82 #include <wx/grid.h>
83
84 //Includes std
85 #include <iostream>
86 #include <fstream>
87
88 namespace bbtk
89 {
90         class wxTabPanelsManager;
91
92         class wxVtkSceneManager;
93   
94         class  wxGUIEditorGraphicBBS : public wxFrame
95   {
96   public: 
97           wxGUIEditorGraphicBBS(wxFrame *parent );
98           ~wxGUIEditorGraphicBBS();
99
100                 void initToolbar(); 
101                 void initMenu();
102                 void initTabPanelsManager();
103                 void initPackageBrowser();
104                 void initHelpHTMLBrowser();
105
106                 wxAuiNotebook* getAuiNotebook();
107                 void displayBlackBoxInfo(std::string packageName, std::string boxName);
108                 void updateStatusBar(std::string textStatus);
109                 void executeScript(std::string script);
110
111                 void editBlackBox(GBlackBoxModel *bbmodel);
112                 void editDiagramParameters(wxVtkSceneManager* scene);
113
114                 void RegenerateAll();
115                 void DoRegeneratePackageDoc(const std::string& pack);   
116                 void DoRegenerateBoxesLists();
117
118                 void refreshGUIControls();
119
120                 void OnCreateNewTab(wxCommandEvent& event);
121                 void OnOpenDiagram(wxCommandEvent& event);
122                 void OnSaveActualDiagram(wxCommandEvent& event);
123                 void OnSaveActualBBS(wxCommandEvent& event);
124                 void OnSaveActualComplexBox(wxCommandEvent& event);
125                 void OnExecuteActualDiagram(wxCommandEvent& event);
126                 void OnDeleteAllBoxesActualDiagram(wxCommandEvent& event);
127                 void OnCenterViewActualDiagram(wxCommandEvent& event);
128                 void OnClickBtnComplexBox(wxCommandEvent& event);
129                 void OnAddComplexBoxInput(wxCommandEvent& event);
130                 void OnAddComplexBoxOutput(wxCommandEvent& event);
131                 void OnExit(wxCommandEvent& event);
132
133
134         private:
135                 wxAuiManager                                            *_frameAUIMgr;
136                 wxTabPanelsManager                                      *_tabsMgr;
137                 wxAuiNotebook                                           *_notebook;
138                 WxGUIPackageBrowser2                            *_pkgBrowser;
139                 WxGUIHtmlBrowser                                        *_helpHtmlBrowser;
140
141                 std::string _dataDir;
142
143                 std::string _actualPkgBrowserBoxName;
144
145                 std::string _actualPkgBrowserPkgName;
146
147         protected:
148
149           
150  };
151
152
153 }
154 // namespace bbtk
155 #endif
156