wxTabPanelsManager.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 Program:   bbtk
00003 Module:    $RCSfile: wxTabPanelsManager.h,v $
00004 Language:  C++
00005 Date:      $Date: 2012/05/25 12:55:15 $
00006 Version:   $Revision: 1.28 $
00007 =========================================================================*/
00008 
00009 /* ---------------------------------------------------------------------
00010 
00011 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
00012 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
00013 *
00014 *  This software is governed by the CeCILL-B license under French law and
00015 *  abiding by the rules of distribution of free software. You can  use,
00016 *  modify and/ or redistribute the software under the terms of the CeCILL-B
00017 *  license as circulated by CEA, CNRS and INRIA at the following URL
00018 *  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
00019 *  or in the file LICENSE.txt.
00020 *
00021 *  As a counterpart to the access to the source code and  rights to copy,
00022 *  modify and redistribute granted by the license, users are provided only
00023 *  with a limited warranty  and the software's author,  the holder of the
00024 *  economic rights,  and the successive licensors  have only  limited
00025 *  liability.
00026 *
00027 *  The fact that you are presently reading this means that you have had
00028 *  knowledge of the CeCILL-B license and that you accept its terms.
00029 * ------------------------------------------------------------------------ */
00030 
00031 
00032 
00038 /****
00039 * Design and Developpement of BBTK GEditor
00040 * Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
00041 * RaC - 2010
00042 ****/
00043 
00044 #ifndef __wxTabPanelsManager_h__
00045 #define __wxTabPanelsManager_h__
00046 
00047 #include <wx/aui/auibook.h>
00048 #include <wx/panel.h>
00049 #include <wx/string.h>
00050 #include <map>
00051 #include <iostream>
00052 #include <creaWx.h>
00053 
00054 #include "wxGEditorTabPanel.h"
00055 #include "wxVtkSceneManager.h"
00056 #include "bbtkwxGUIEditorGraphicBBS.h"
00057 
00058 using namespace std;
00059 
00060 
00061 namespace bbtk
00062 {
00063 
00064         class wxVtkSceneManager;
00065         class wxGEditorTabPanel;
00066         class wxGUIEditorGraphicBBS;
00067 
00068         class wxTabPanelsManager : public wxEvtHandler
00069         {
00070 
00071         public:
00072 
00073                 wxTabPanelsManager(wxGUIEditorGraphicBBS *parent);
00074                 ~wxTabPanelsManager();
00075 
00076                 void addNewTab(wxString tabName=_T("<void>"));
00077                 wxAuiNotebook* getAuiNotebook();
00078                 wxGEditorTabPanel* getActualTabPanel();
00079 
00080                 void displayBlackBoxInfo(std::string packageName, std::string boxName);
00081                 void updateStatusBar(std::string textStatus);
00082 
00083                 std::string getActualDiagramBBS(bool wln=false);
00084                 std::string getActualComplexBoxBBS();
00085 
00086                 void editBlackBox(GBlackBoxModel *bbmodel);
00087                 void deleteAllBoxesActualDiagram();
00088                 void centerViewActualDiagram();
00089                 void saveActualDiagram(std::string &content, const std::string &path); //DFCH
00090                 void loadDiagram(ifstream &inputStream, const std::string &path); //DFCH
00091 
00092                 void saveTempActualDiagram(const std::string &); //FCY
00093                 void saveTempandUpdate(const std::string &);
00094                 void loadTempDiagram(unsigned short un); //FCY
00095                 unsigned short getUndoState(std::string &);
00096                 unsigned short getRedoState(std::string &);
00097                 bool isActualDiagramComplexBox();
00098                 void setActualDiagramComplexBox(bool val);
00099                 void addActualDiagramComplexInputPort(std::string portName);
00100                 void addActualDiagramComplexOutputPort(std::string portName);
00101                 void copySelectedBBoxesToComplexDiagram();
00102                 int getNumActualSelectedObjects();
00103 
00104                 void OnTabChanged(wxAuiNotebookEvent& event);
00105 
00106                 // Event handler. Runs in the moment of closing but not closed yet (for that exists the CLOSED event, but not working at all)
00107                 void OnTabClose(wxAuiNotebookEvent& event);
00108 
00109         void VerifyLastTabPanel();
00110 
00111         void SetCbName(std::string cbName);
00112         void SetCbPackageName(std::string packagename);
00113         void SetAuthor(std::string author);
00114         void SetCategory(std::string category);
00115         void SetDescription(std::string description);
00116         std::string GetCbName();
00117         std::string GetCbPackageName();
00118         std::string GetAuthor();
00119         std::string GetDescription();
00120         std::string GetCategory();
00121 
00122             void SetNameTabPanel(wxString tabpanelname);
00123                 std::string GetNameTabPanel();
00124             std::string GetCurrentTabPanelPath( ); //DFCH
00125 
00126 
00127 
00128         private:
00129 
00130         // Private Attributes
00131                 wxGUIEditorGraphicBBS           *_parent;
00132                 map<int, wxGEditorTabPanel*>    _panels;
00133                 wxGEditorTabPanel               *_actual;
00134                 wxAuiNotebook                   *_notebook;
00135                 int                             _lastId;
00136 
00137         protected:
00138 
00139         };
00140 
00141 
00142 }
00143 // namespace bbtk
00144 #endif
00145 

Generated on Thu May 31 15:12:19 2012 for bbtkGEditor by  doxygen 1.5.7.1