]> Creatis software - bbtkGEditor.git/commitdiff
Documentation of the wxLibrary and kernelLibrary
authorcorredor <>
Tue, 22 Jun 2010 13:11:53 +0000 (13:11 +0000)
committercorredor <>
Tue, 22 Jun 2010 13:11:53 +0000 (13:11 +0000)
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/GObjectsMVCFactory.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxBlackBoxEditionDialog.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxBlackBoxEditionDialog.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h

index 3364bb4253cdc1c6cedc9b287d9ead448e859bdd..b7459ddac502efa02c2b89247898742886e7ea14 100644 (file)
@@ -35,10 +35,11 @@ Version:   $Revision$
 *  \brief Class bbtk::GObjectsMVCFactory : abstract black-box interface. 
 */
 
-/**
-* \class bbtk::GObjectsMVCFactory
-* \brief 
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
 
 #ifndef __GObjectsMVCFactory_h__
 #define __GObjectsMVCFactory_h__
@@ -63,7 +64,6 @@ Version:   $Revision$
 #include "GComplexBoxPortModel.h"
 
 
-
 //Includes creaMaracasVisu
 
 //Includes std
@@ -87,11 +87,15 @@ namespace bbtk
                ~GObjectsMVCFactory();
                
                //Public methods
+
+               // Singleton to access to the Factory
                static GObjectsMVCFactory* getInstance();
                static void destroyInstance();
 
+               // Access to the BBTK library to get the descriptor of a box with the package and box names
                BlackBoxDescriptor::Pointer getBlackBoxDescriptor(std::string packageName, std::string boxName);
 
+               // Creates the MVC of the graphical objects depending on the object type
                vtkGObjectView* createGObjectView(int type);
                GObjectController* createGObjectController(int type);
                GObjectModel* createGObjectModel(int type);
index cb3231b87cd2bae070306cc4821441059f8ef675..0b97c8d07c933d3dcc6740989f4615531f33fc4c 100644 (file)
@@ -328,14 +328,6 @@ namespace bbtk
 
        //=========================================================================
 
-       void wxGUIEditorGraphicBBS::editDiagramParameters(wxVtkSceneManager* scene)
-       {
-               wxBlackBoxEditionDialog* dialog = new wxBlackBoxEditionDialog(this,scene);
-               dialog->Show();
-       }
-
-       //=========================================================================
-
        void wxGUIEditorGraphicBBS::updateStatusBar(std::string textStatus)
        {
                SetStatusText(crea::std2wx(textStatus));
@@ -448,8 +440,8 @@ namespace bbtk
                }               
 
                if(!cbName.empty())
-               {       
-                       wxFileDialog * saveFileDialog = new wxFileDialog( this , _T("Save Complex Box BBS") ,_T(""), wxString( cbName.c_str(), wxConvUTF8),_T(""), wxSAVE | wxOVERWRITE_PROMPT);
+               {                               
+                       wxFileDialog * saveFileDialog = new wxFileDialog(this ,wxT("Save Complex Box BBS") ,wxEmptyString, wxString( cbName.c_str(), wxConvUTF8),wxT("*.bbs"), wxSAVE | wxOVERWRITE_PROMPT);
                        if (saveFileDialog->ShowModal() == wxID_OK)
                        {
                                wxString fileName = saveFileDialog->GetPath();
index 48c42433b62ece908310b2b8537df3de4da44418..b5f17a07d0b3a4e020405432deb36a6ca0f9eee6 100644 (file)
  *  \brief Class bbtk::BlackBox : abstract black-box interface. 
  */
 
-/**
- * \class bbtk::WxGUIEditorGraphicBBS
- * \brief 
- */
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
  
 #ifndef __WxGUIEditorGraphicBBS_h__
 #define __WxGUIEditorGraphicBBS_h__
@@ -105,17 +106,26 @@ namespace bbtk
                        void initHelpHTMLBrowser();
 
                        wxAuiNotebook* getAuiNotebook();
+
+                       // Display the info of the black box highlighted in the PackageBrowser
                        void displayBlackBoxInfo(std::string packageName, std::string boxName);
+
+                       // Shows the textStatus in the wxFrame status bar
                        void updateStatusBar(std::string textStatus);
+
+                       // Executes the BBS script in parameter
                        void executeScript(std::string script);
 
+                       // Shows the dialog to change the parameters and values of the black box
                        void editBlackBox(GBlackBoxModel *bbmodel);
-                       void editDiagramParameters(wxVtkSceneManager* scene);
 
+                       // Method that can be used to refresh the help and package browser
+                       // RaC TOFIX!!!
                        void RegenerateAll();
                        void DoRegeneratePackageDoc(const std::string& pack);   
                        void DoRegenerateBoxesLists();
 
+                       // Refresh the state of buttons and menus when changing for example the mode to edit complex box
                        void refreshGUIControls();
 
                        // File menu and toolbar events
index db284eb191063058806388bfdfa65e37b8d63033..e2618fa3d2e6341f0b92ff6ac3f2782da106565e 100644 (file)
@@ -56,13 +56,7 @@ namespace bbtk
 
        //=========================================================================
 
-       wxBlackBoxEditionDialog::wxBlackBoxEditionDialog(wxGUIEditorGraphicBBS *parent,wxVtkSceneManager* scene):wxDialog(parent, wxID_ANY, _T(""), wxDefaultPosition, wxSize(300, 300))
-       {
-               
-       }
-
-       //=========================================================================
-
+       
        wxBlackBoxEditionDialog::~wxBlackBoxEditionDialog()
        {
 
index b4e79f936791efbb144d57791e99cb3af373b5df..8f3021f002f010a09a2f59d5412069f036192711 100644 (file)
@@ -35,10 +35,11 @@ Version:   $Revision$
 *  \brief Class bbtk::wxBlackBoxEditionDialog : abstract black-box interface. 
 */
 
-/**
-* \class bbtk::wxBlackBoxEditionDialog
-* \brief 
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
 
 #ifndef __wxBlackBoxEditionDialog_h__
 #define __wxBlackBoxEditionDialog_h__
@@ -63,27 +64,30 @@ Version:   $Revision$
 namespace bbtk
 {
 
+       //RaC: It is important if it exists a double relation 
+       //e.g. wxBlackBoxEditionDialog includes wxGUIEditorGraphicBBS, and wxGUIEditorGraphicBBS includes wxBlackBoxEditionDialog
        class wxGUIEditorGraphicBBS;
-
        class wxVtkSceneManager;
 
        class wxBlackBoxEditionDialog :  public wxDialog
        {
        public: 
-               wxBlackBoxEditionDialog(wxGUIEditorGraphicBBS *parent,wxVtkSceneManager* scene);
                wxBlackBoxEditionDialog(wxGUIEditorGraphicBBS *parent,GBlackBoxModel *model);
                ~wxBlackBoxEditionDialog();
 
                void constructBlackBoxEditionDialog();
+
                void onClickOk(wxCommandEvent& event);
                void onClickClose(wxCommandEvent& event);
                
        private:
                wxAuiManager *_dialogAUIMgr;
                wxPanel *_panel;
+
                std::vector<wxTextCtrl*> _lstValues;
                std::vector<wxStaticText*> _lstTypes;
                std::vector<wxStaticText*> _lstNames;
+
                GBlackBoxModel *_model;
        
        protected:
index 25eccdf1136519911d20d2be65c6aa2b9859ac0a..bf67893b2b439232c248e0baa639a71baba26800 100644 (file)
@@ -143,13 +143,6 @@ printf ("EED %p ~wxGEditorTabPanel()\n" , this );
                _panelsManager->editBlackBox(bbmodel);
        }
 
-       //=========================================================================
-       
-       void wxGEditorTabPanel::editDiagramParameters(wxVtkSceneManager* scene)
-       {
-               _panelsManager->editDiagramParameters(scene);
-       }
-
        //=========================================================================
 
        void wxGEditorTabPanel::deleteAllBoxes()
index 336552366fddcd5604a0a54990b4bf8a6a887c21..3e75838111ff8b8ef7e456bb599fb73d24436508 100644 (file)
@@ -35,10 +35,11 @@ Version:   $Revision$
 *  \brief Class bbtk::BlackBox : abstract black-box interface. 
 */
 
-/**
-* \class bbtk::wxGEditorTabPanel
-* \brief 
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
 
 #ifndef __wxGEditorTabPanel_h__
 #define __wxGEditorTabPanel_h__
@@ -71,11 +72,12 @@ namespace bbtk
        };
 
 
-
+       //RaC: It is important if it exists a double relation 
+       //e.g. wxGEditorTabPanel includes wxVtkSceneManager, and wxVtkSceneManager includes wxGEditorTabPanel
        class wxVtkSceneManager;
-
        class wxTabPanelsManager;
 
+       // RaC Be careful with the double heritance
        class wxGEditorTabPanel :  public wxPanel, public wxTextDropTarget
        {
        public: 
@@ -84,28 +86,55 @@ namespace bbtk
                ~wxGEditorTabPanel();
 
                void initWxVtkCanvas();
-               virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& data);
+               
+               // Sets the parent manager
                void setPanelsManager(wxTabPanelsManager* panelsManager);
 
-               void displayBlackBoxInfo(std::string packageName, std::string boxName);
-               void updateStatusBar(std::string textStatus);
+               // Get the BBS script of the pipeline diagram included in the panel
                std::string getDiagramBBS();
+
+               // Saves the actual BBS as complex box
+               // RaC TOFIX It must be included the package of the complex box
                std::string saveComplexBoxBBS(std::string cbName,std::string cbAuthor="",std::string cbCategory="",std::string cbDescription="");
+
+               // Shows the dialog to edit black box parameters
                void editBlackBox(GBlackBoxModel *bbmodel);
-               void editDiagramParameters(wxVtkSceneManager* scene);
-               void deleteAllBoxes();
-               void centerView();
+
+               // Save diagram as BBG
                void saveDiagram(std::string &content);
+               
+               // Load BBG diagram
                void loadDiagram(ifstream &inputStream);
+
+               // Add a new complex input object to the scene
+               void addComplexInputPort(std::string portName);
+
+               // Add a new complex output object to the scene
+               void addComplexOutputPort(std::string portName);
+
+               // Delete all boxes in the diagram
+               void deleteAllBoxes();
+
+               // Center the camera in the initial position
+               void centerView();
+
+               // Display feedback info in the GUI
+               void displayBlackBoxInfo(std::string packageName, std::string boxName);
+               void updateStatusBar(std::string textStatus);
+
                int getPanelId();
                bool isComplexBox();
                void setComplexBox(bool val);
-               void addComplexInputPort(std::string portName);
-               void addComplexOutputPort(std::string portName);
+
+               // Returns a map with the id,controller of all the objects selected             
                std::map<int,GObjectController*> getSelectedObjects();
+
                void addObjects(std::map<int,GObjectController*> objectsMap);
                int getNumSelectedObjects();
 
+               // Receives the string from a drag and drop source as for example the BBTK Package Browser
+               virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& data);
+
        //=========================================================================
                
        private:
index 42b6312389b0c25507edaeb1805ffb8d8207bfe4..86750fc35833f4ee646b04e3a0d14805fe7a97fc 100644 (file)
@@ -118,13 +118,6 @@ namespace bbtk
 
        //=========================================================================
 
-       void wxTabPanelsManager::editDiagramParameters(wxVtkSceneManager* scene)
-       {
-               _parent->editDiagramParameters(scene);
-       }
-
-       //=========================================================================
-
        void wxTabPanelsManager::deleteAllBoxesActualDiagram()
        {
                _actual->deleteAllBoxes();
index 126141a7131f897716423c3526e4ed6a529b37df..f9ff803f5a1ddeb20f918598ac269acbc528ca25 100644 (file)
@@ -35,10 +35,11 @@ Version:   $Revision$
 *  \brief Class bbtk::BlackBox : abstract black-box interface. 
 */
 
-/**
-* \class bbtk::wxTabPanelsManager
-* \brief 
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
 
 #ifndef __wxTabPanelsManager_h__
 #define __wxTabPanelsManager_h__
@@ -64,20 +65,23 @@ namespace bbtk
 
        class wxTabPanelsManager : public wxEvtHandler
        {
+
        public: 
+
                wxTabPanelsManager(wxGUIEditorGraphicBBS *parent);
                ~wxTabPanelsManager();
                
-               virtual void addNewTab();
+               void addNewTab();
                wxAuiNotebook* getAuiNotebook();
                wxGEditorTabPanel* getActualTabPanel();
 
                void displayBlackBoxInfo(std::string packageName, std::string boxName);
                void updateStatusBar(std::string textStatus);
+
                std::string getActualDiagramBBS();
                std::string getActualComplexBoxBBS(std::string cbName,std::string cbAuthor="",std::string cbCategory="",std::string cbDescription="");
+
                void editBlackBox(GBlackBoxModel *bbmodel);
-               void editDiagramParameters(wxVtkSceneManager* scene);
                void deleteAllBoxesActualDiagram();
                void centerViewActualDiagram();
                void saveActualDiagram(std::string &content);
@@ -93,9 +97,7 @@ namespace bbtk
 
        private:
 
-       /**
-       ** The map 
-       */
+       // Private Attributes
                wxGUIEditorGraphicBBS *_parent;
                map<int, wxGEditorTabPanel*> _panels;
                wxGEditorTabPanel* _actual;
index 362c677785a72ff27951672eeb086a14be508ea0..47b4e113ef5349a637dfd63e41f7c6009d520ecd 100644 (file)
@@ -35,10 +35,11 @@ Version:   $Revision$
 *  \brief Class bbtk::BlackBox : abstract black-box interface. 
 */
 
-/**
-* \class bbtk::wxVtkSceneManager
-* \brief 
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
 
 #ifndef __wxVtkSceneManager_h__
 #define __wxVtkSceneManager_h__