wxGEditorTabPanel.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00038
00039
00040
00041
00042
00043
00044 #ifndef __wxGEditorTabPanel_h__
00045 #define __wxGEditorTabPanel_h__
00046
00047
00048 #include "wxVtkSceneManager.h"
00049 #include "wxTabPanelsManager.h"
00050
00051
00052 #include <wx/panel.h>
00053 #include <wx/aui/aui.h>
00054 #include <wx/dnd.h>
00055
00056
00057 #include <wxVtk3DBaseView.h>
00058
00059
00060 #include <fstream>
00061
00062 namespace bbtk
00063 {
00064
00065 class tmpClasswxTextDropTarget : public wxTextDropTarget
00066 {
00067 public:
00068 virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& data) { return false;}
00069 };
00070
00071
00072
00073
00074 class wxVtkSceneManager;
00075 class wxTabPanelsManager;
00076
00077
00078 class wxGEditorTabPanel : public wxPanel, public wxTextDropTarget
00079 {
00080 public:
00081 wxGEditorTabPanel();
00082 wxGEditorTabPanel(wxWindow *parent, int id);
00083 ~wxGEditorTabPanel();
00084
00085 void initWxVtkCanvas();
00086
00087
00088 void setPanelsManager(wxTabPanelsManager* panelsManager);
00089
00090
00091 std::string getDiagramBBS(bool wln=false);
00092
00093
00094
00095 std::string saveComplexBoxBBS();
00096
00097
00098 void editBlackBox(GBlackBoxModel *bbmodel);
00099
00100
00101 void saveDiagram(std::string &content, const std::string &path);
00102
00103
00104 void saveTempDiagram(const std::string &);
00105
00106
00107 void saveTempandUpdate(const std::string &);
00108
00109
00110 void loadDiagram(ifstream &inputStream, const std::string &path);
00111
00112 void saveStringAction(const std::string &action);
00113
00114
00115 void loadTempDiagram(unsigned short un);
00116
00117
00118 unsigned short getUndoState(std::string &);
00119
00120
00121 unsigned short getRedoState(std::string &);
00122
00123
00124 void addComplexInputPort(std::string portName);
00125
00126
00127 void addComplexOutputPort(std::string portName);
00128
00129
00130 void deleteAllBoxes();
00131
00132
00133 void centerView();
00134
00135
00136 void displayBlackBoxInfo(std::string packageName, std::string boxName);
00137 void updateStatusBar(std::string textStatus);
00138
00139 int getPanelId();
00140 bool isComplexBox();
00141 void setComplexBox(bool val);
00142
00143
00144 std::map<int,GObjectController*> getSelectedObjects();
00145
00146 void addObjects(std::map<int,GObjectController*> objectsMap);
00147 int getNumSelectedObjects();
00148
00149
00150 virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& data);
00151
00152 wxVtkSceneManager* getSceneManager();
00153
00154 void SetFullPath( const std::string& );
00155 void SetFileName( const std::string& );
00156 void SetCbName(std::string cbName);
00157 void SetCbPackageName(std::string packagename);
00158 void SetAuthor(std::string author);
00159 void SetCategory(std::string category);
00160 void SetDescription(std::string description);
00161
00162 std::string GetFullPath( );
00163 std::string GetFileName( );
00164
00165 std::string GetCbName();
00166 std::string GetCbPackageName();
00167 std::string GetAuthor();
00168 std::string GetDescription();
00169 std::string GetCategory();
00170
00171
00172
00173
00174
00175 private:
00176 std::vector<std::string> states;
00177 std::vector<std::string>::iterator _actualdo;
00178 std::vector<std::string> sstates;
00179 std::vector<std::string>::iterator _sactualdo;
00180
00181 int _id;
00182 wxAuiManager *_panelAUIMgr;
00183 wxVtkSceneManager *_sceneManager;
00184 wxTabPanelsManager *_panelsManager;
00185 std::string _fullPath;
00186 std::string _fileName;
00187
00188 protected:
00189
00190 };
00191
00192
00193 }
00194
00195 #endif
00196