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