]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h
Bug #1688 RaC 2012 Bug to avoid opening twice the same diagram. Corrected and tested.
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsWxGUIEditorGraphic / wxTabPanelsManager.h
index 35618a7cec9c0fe0b79654d3ae27c95e9bc5cbd8..432e215906d14582c6ecc08a6006fb268ccdf08e 100644 (file)
@@ -49,6 +49,7 @@ Version:   $Revision$
 #include <wx/string.h>
 #include <map>
 #include <iostream>
+#include <creaWx.h>
 
 #include "wxGEditorTabPanel.h"
 #include "wxVtkSceneManager.h"
@@ -56,6 +57,7 @@ Version:   $Revision$
 
 using namespace std;
 
+
 namespace bbtk
 {
 
@@ -71,7 +73,7 @@ namespace bbtk
                wxTabPanelsManager(wxGUIEditorGraphicBBS *parent);
                ~wxTabPanelsManager();
 
-               void addNewTab(wxString tabName=_T("<void>"));
+               void addNewTab(wxString tabName=_T("new_tab"));
                wxAuiNotebook* getAuiNotebook();
                wxGEditorTabPanel* getActualTabPanel();
 
@@ -86,6 +88,12 @@ namespace bbtk
                void centerViewActualDiagram();
                void saveActualDiagram(std::string &content, const std::string &path); //DFCH
                void loadDiagram(ifstream &inputStream, const std::string &path); //DFCH
+
+               void saveTempActualDiagram(const std::string &); //FCY
+               void saveTempandUpdate(const std::string &);
+               void loadTempDiagram(unsigned short un); //FCY
+               unsigned short getUndoState(std::string &);
+               unsigned short getRedoState(std::string &);
                bool isActualDiagramComplexBox();
                void setActualDiagramComplexBox(bool val);
                void addActualDiagramComplexInputPort(std::string portName);
@@ -94,8 +102,13 @@ namespace bbtk
                int getNumActualSelectedObjects();
 
                void OnTabChanged(wxAuiNotebookEvent& event);
+
+               // Event handler. Runs in the moment of closing but not closed yet (for that exists the CLOSED event, but not working at all)
+               void OnTabClose(wxAuiNotebookEvent& event);
+
         void VerifyLastTabPanel();
 
+        // Getters and Setters of current diagram
         void SetCbName(std::string cbName);
         void SetCbPackageName(std::string packagename);
         void SetAuthor(std::string author);
@@ -108,7 +121,9 @@ namespace bbtk
         std::string GetCategory();
 
            void SetNameTabPanel(wxString tabpanelname);
+               std::string GetNameTabPanel();
            std::string GetCurrentTabPanelPath( ); //DFCH
+           int  FindTab(std::string filename);