From: ctorres Date: Wed, 18 Jun 2014 13:29:29 +0000 (+0200) Subject: 2396 bbGEditor Feature New Normal Feature Show Tree 2014-06-18 15:29 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=5b4d222a83d861c34b2c08cb624c7569f3a9cc26;p=bbtkGEditor.git 2396 bbGEditor Feature New Normal Feature Show Tree 2014-06-18 15:29 --- diff --git a/data/icons/wxart_showTree.xpm b/data/icons/wxart_showTree.xpm new file mode 100644 index 0000000..b38738a --- /dev/null +++ b/data/icons/wxart_showTree.xpm @@ -0,0 +1,27 @@ +/* XPM */ +static char * showTree_xpm[] = { +"16 16 8 1", +" c None", +". c #0EE555", +"+ c #0DE454", +"@ c #0DE153", +"# c #0DE354", +"$ c #000000", +"% c #077E2E", +"& c #066726", +" . . ", +" .. . ... ", +" .. .. ... ", +" ... ...... ...", +" ............ ", +". ........... ", +".............. ", +".......+..... ", +" ..+@#.... ", +" $%& ...", +" $$$$ ", +" $$$$ ", +" $$$$ ", +" $$$$$ ", +" $$$$$$$$ ", +" $$$$$$$$ "}; diff --git a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GlobalConstants.h b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GlobalConstants.h index fc4838f..41fb867 100644 --- a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GlobalConstants.h +++ b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GlobalConstants.h @@ -226,6 +226,7 @@ namespace bbtk { const int ID_CHANGENAME = 1027; const int ID_EDITPROPERTIES = 1028; // RaC 2nd HackFest + const int ID_SHOWTREE = 1029; // CFT } // namespace bbtk #endif diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx index c764296..c53529c 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx @@ -141,6 +141,7 @@ void wxGUIEditorGraphicBBS::initToolbar() { wxBitmap bmp_undo(undo_xpm); wxBitmap bmp_redo(redo_xpm); wxBitmap bmp_editProperties(editProperties_xpm); + wxBitmap bmp_showTree(showTree_xpm); wxToolBar *toolbar = new wxToolBar(this, wxID_ANY); //Adds a tool btn to the toolbar @@ -192,6 +193,8 @@ void wxGUIEditorGraphicBBS::initToolbar() { toolbar->AddSeparator(); toolbar->AddTool(ID_EDITPROPERTIES, _T("Edit diagram properties"),bmp_editProperties, wxNullBitmap, wxITEM_NORMAL, _T("Edit diagram properties"), _T("Edit diagram properties")); toolbar->EnableTool(ID_EDITPROPERTIES, false); + + toolbar->AddTool(ID_SHOWTREE, _T("Show tree"),bmp_showTree, wxNullBitmap, wxITEM_NORMAL, _T("Show tree"), _T("Show tree")); toolbar->EnableTool(ID_UNDO, false); toolbar->EnableTool(ID_REDO, false); @@ -238,6 +241,7 @@ void wxGUIEditorGraphicBBS::initToolbar() { Connect(ID_REDO,wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(wxGUIEditorGraphicBBS::OnRedo)); Connect(ID_CHANGENAME, wxEVT_COMMAND_RIGHT_CLICK, wxCommandEventHandler(wxGUIEditorGraphicBBS::OnChangeName)); Connect(ID_EDITPROPERTIES,wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(wxGUIEditorGraphicBBS::OnEditDiagramProperties)); + Connect(ID_SHOWTREE,wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(wxGUIEditorGraphicBBS::OnShowTree)); } //========================================================================= @@ -453,6 +457,7 @@ void wxGUIEditorGraphicBBS::displayBlackBoxInfo(std::string packageName, std::st { if (_actualPkgBrowserPkgName != packageName || _actualPkgBrowserBoxName != boxName) { + _actualPkgBrowserPkgName = packageName; _actualPkgBrowserBoxName = boxName; @@ -463,30 +468,24 @@ void wxGUIEditorGraphicBBS::displayBlackBoxInfo(std::string packageName, std::st BlackBoxDescriptor::Pointer descriptor; std::map< std::string, BlackBoxDescriptor::Pointer> mapDesc; - k = _pkgBrowser->GetFactory()->GetPackage(packageName); + k = _pkgBrowser->GetFactory()->GetPackage(_actualPkgBrowserPkgName); mapDesc = k->GetDescriptorMap(); - descriptor = mapDesc[boxName]; - std::vector temp; - descriptor->GetBoxesInside(tree,temp,1); - - + descriptor = mapDesc[_actualPkgBrowserBoxName]; +/* + tree.treeTour(0); -/*CFT - for(int i = 0 ; i < temp.size() ; i++){ - std::cout<< " "<< temp[i] << std::endl; - } + tree.deleteTree(); + descriptor->GetBoxesInside(tree, 0); - if(temp.size()>=1){ - std::cout<< "CAJAS # " << (temp.size()- 3) << std::endl; - for(int i = 0 ; i < temp.size()-1 ; i++){ - if(i<3){std::cout<< " "<< temp[i] << std::endl;} - else{std::cout<< i+1 << " "<< temp[i] << " " < boxesDiagram = _sceneM->boxesDiagram; + //for(int i=0;i mapDesc; + k = _pkgBrowser->GetFactory()->GetPackage(_actualPkgBrowserPkgName); + mapDesc = k->GetDescriptorMap(); + descriptor = mapDesc[_actualPkgBrowserBoxName]; + + tree.treeTour(0); + + tree.deleteTree(); + + descriptor->GetBoxesInside(tree, 0); + + _actualPkgBrowserPkgName = ""; + _actualPkgBrowserBoxName = ""; + } +else + { + std::cout<<"Select a Box"<GetActualSelected(); if (bbDes != NULL) { std::string typeName = bbDes->GetTypeName(); @@ -1121,6 +1150,7 @@ void wxGUIEditorGraphicBBS::OnClickBtnExecutableBox(wxCommandEvent& event) //========================================================================= void wxGUIEditorGraphicBBS::OnClickBtnComplexBox(wxCommandEvent& event) { + std::cout<<"wxGUIEditorGraphicBBS::OnClickBtnComplexBox"<GetToolState(ID_BTNCOMPLEXBOX); if (temp) { @@ -1372,6 +1402,16 @@ void wxGUIEditorGraphicBBS::setCurrentDiagramCategory(std::string category) _tabsMgr->SetCategory(category); } +//========================================================================= +void wxGUIEditorGraphicBBS::setCurrentDiagramMessageKind(std::string kind){ + _tabsMgr->SetMessageKind(kind); +} + +//========================================================================= +void wxGUIEditorGraphicBBS::setCurrentDiagramMessageLevel(std::string level){ + _tabsMgr->SetMessageLevel(level); +} + //========================================================================= std::string wxGUIEditorGraphicBBS::getCurrentDiagramDescription() { @@ -1390,7 +1430,16 @@ std::string wxGUIEditorGraphicBBS::getCurrentDiagramCategory() return _tabsMgr->GetCategory(); } - +//========================================================================= +std::string wxGUIEditorGraphicBBS::getCurrentDiagramMessageKind(){ + return _tabsMgr->GetMessageKind(); +} + +//========================================================================= +std::string wxGUIEditorGraphicBBS::getCurrentDiagramMessageLevel(){ + return _tabsMgr->GetMessageLevel(); +} + //========================================================================= bool wxGUIEditorGraphicBBS::isCurrentDiagramComplexBox() { diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h index 0c070fa..ef9dc2f 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h @@ -91,6 +91,7 @@ #include "wxart_undo.xpm" #include "wxart_redo.xpm" #include "wxart_editProperties.xpm" +#include "wxart_showTree.xpm" //Includes creaMaracasVisu @@ -201,6 +202,7 @@ namespace bbtk void OnRedo(wxCommandEvent& event); void OnChangeName(wxCommandEvent& event); void OnEditDiagramProperties(wxCommandEvent& event); + void OnShowTree(wxCommandEvent& event); //CFT void OnEditComplexBoxScript(wxCommandEvent& event); @@ -232,11 +234,14 @@ namespace bbtk void setCurrentDiagramDescription(std::string description); void setCurrentDiagramAuthor(std::string author); void setCurrentDiagramCategory(std::string category); + void setCurrentDiagramMessageKind(std::string kind); + void setCurrentDiagramMessageLevel(std::string level); std::string getCurrentDiagramDescription(); std::string getCurrentDiagramAuthor(); std::string getCurrentDiagramCategory(); - + std::string getCurrentDiagramMessageKind(); + std::string getCurrentDiagramMessageLevel(); private: @@ -264,6 +269,7 @@ namespace bbtk std::string _currentBBGversion; NodeTreeC tree; + wxVtkSceneManager *_sceneM; protected: diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxDiagramPropertiesEditionDialog.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxDiagramPropertiesEditionDialog.cxx index 0e07133..282a48b 100755 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxDiagramPropertiesEditionDialog.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxDiagramPropertiesEditionDialog.cxx @@ -66,7 +66,7 @@ namespace bbtk { //========================================================================= - wxDiagramPropertiesEditionDialog::wxDiagramPropertiesEditionDialog(wxGUIEditorGraphicBBS *parent, NodeTreeC tree):wxDialog(parent,wxID_ANY,_T("Diagram Properties"), wxDefaultPosition, wxSize(450, 580),wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) + wxDiagramPropertiesEditionDialog::wxDiagramPropertiesEditionDialog(wxGUIEditorGraphicBBS *parent, NodeTreeC tree):wxDialog(parent,wxID_ANY,_T("Diagram Properties"), wxDefaultPosition, wxSize(500, 650),wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { _parent = parent; _tree = tree; @@ -118,10 +118,76 @@ namespace bbtk wxTreeItemId itemId = _treeBox->AddRoot(p, -1,-1,NULL); constructBoxTree(_tree, itemId); - _treeBox->ExpandAll(); - _tree.treeTour(); - //CFT end + _treeBox->ExpandAll(); + //_tree.treeTour(0); + //CFT END +//CFT +//COMBOBOX OF MESSAGE +/* +Kind Level Nature +Interpreter 0 Messages of the interpreter +all 0 Minimum level for all kind of messages +change 0 Box i/o changes related messages +code 0 If positive then codes of the messages are displayed +config 0 Configuration related messages +connection 0 Connections related messages +data 0 Data related messages +debug 0 Debug messages +echo 1 Level>0 : Prints the output of the 'print' commands of the user. + Level>1 : Prints the command being interpreted +error 0 Error messages +gui 0 Graphical user interface related messages +help 1 Help messages +kernel 0 Messages generated by the core classes of the lib +max 9 Maximum level for all kind of messages +object 0 object memory related messages +output 1 Output messages +package 0 Packages related messages +process 0 Messages related to box processing +qt 0 Qt related messages +warning 1 Warning messages +widget 0 Widgets related messages +wx +*/ + _diagramMessageKind = new wxComboBox(panel, -1, wxEmptyString, wxDefaultPosition, wxSize(100,-1) ); + _diagramMessageKind->Append (wxT("Interpreter")); + _diagramMessageKind->Append (wxT("all")); + _diagramMessageKind->Append (wxT("change")); + _diagramMessageKind->Append (wxT("code")); + _diagramMessageKind->Append (wxT("config")); + _diagramMessageKind->Append (wxT("connection")); + _diagramMessageKind->Append (wxT("data")); + _diagramMessageKind->Append (wxT("debug")); + _diagramMessageKind->Append (wxT("echo")); + _diagramMessageKind->Append (wxT("error")); + _diagramMessageKind->Append (wxT("help")); + _diagramMessageKind->Append (wxT("kernel")); + _diagramMessageKind->Append (wxT("max")); + _diagramMessageKind->Append (wxT("object")); + _diagramMessageKind->Append (wxT("output")); + _diagramMessageKind->Append (wxT("package")); + _diagramMessageKind->Append (wxT("process")); + _diagramMessageKind->Append (wxT("qt")); + _diagramMessageKind->Append (wxT("warning")); + _diagramMessageKind->Append (wxT("widget")); + _diagramMessageKind->Append (wxT("wx")); + _diagramMessageKind->SetEditable(false); + + _diagramMessageLevel = new wxComboBox(panel, -1, wxEmptyString, wxDefaultPosition, wxSize(100,-1) ); + _diagramMessageLevel->Append (wxT("0")); + _diagramMessageLevel->Append (wxT("1")); + _diagramMessageLevel->Append (wxT("2")); + _diagramMessageLevel->Append (wxT("3")); + _diagramMessageLevel->Append (wxT("4")); + _diagramMessageLevel->Append (wxT("5")); + _diagramMessageLevel->Append (wxT("6")); + _diagramMessageLevel->Append (wxT("7")); + _diagramMessageLevel->Append (wxT("8")); + _diagramMessageLevel->Append (wxT("9")); + _diagramMessageLevel->SetEditable(false); + +//CFT END // SELECTION CONSTANTS // 0 - Application @@ -137,11 +203,15 @@ namespace bbtk int currentType = (_parent->isCurrentDiagramComplexBox()==false)? 0 : 1; _diagramType->Select(currentType); + _diagramMessageKind->Select(currentType); + _diagramMessageLevel->Select(currentType); wxStaticText *type = new wxStaticText(panel, -1, wxT("Type")); wxStaticText *author = new wxStaticText(panel, -1, wxT("Author")); wxStaticText *category = new wxStaticText(panel, -1, wxT("Categories")); wxStaticText *description = new wxStaticText(panel, -1, wxT("Description")); + wxStaticText *messageKind = new wxStaticText(panel, -1, wxT("Message kind")); + wxStaticText *messageLevel = new wxStaticText(panel, -1, wxT("Message level")); _txtAuthor = new wxTextCtrl(panel, -1); _txtCategory = new wxTextCtrl(panel, -1); @@ -168,10 +238,14 @@ namespace bbtk fgsizer->Add(description, 1, wxEXPAND); fgsizer->Add(_txtDescription, 1, wxEXPAND); //cft + fgsizer->Add(messageKind); + fgsizer->Add(_diagramMessageKind, 1, wxEXPAND); + fgsizer->Add(messageLevel); + fgsizer->Add(_diagramMessageLevel, 1, wxEXPAND); fgsizer->Add(tree); fgsizer->Add(_treeBox, 1, wxEXPAND); //cft end - fgsizer->Add(okButton, 1, wxEXPAND); + fgsizer->Add(okButton, 1, wxEXPAND); fgsizer->Add(closeButton, 1, wxEXPAND); fgsizer->AddGrowableRow(3, 1); @@ -194,7 +268,7 @@ namespace bbtk void wxDiagramPropertiesEditionDialog::onClickOk(wxCommandEvent& event) { - + printf("RaC wxDiagramPropertiesEditionDialog::onClickOk\n"); std::string txtAuthor = wx2std(_txtAuthor->GetValue()); std::string txtCategory = wx2std(_txtCategory->GetValue()); std::string txtDescription = wx2std(_txtDescription->GetValue()); @@ -211,6 +285,12 @@ namespace bbtk else if (selection == 1) _parent->enableComplexBox(); + + //Message + std::string kindSelected = wx2std(_diagramMessageKind->GetStringSelection()); + std::string levelSelected = wx2std(_diagramMessageLevel->GetStringSelection()); + _parent->setCurrentDiagramMessageKind(kindSelected); + _parent->setCurrentDiagramMessageLevel(levelSelected); Close(true); } diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxDiagramPropertiesEditionDialog.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxDiagramPropertiesEditionDialog.h index ceebbf5..025c79f 100755 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxDiagramPropertiesEditionDialog.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxDiagramPropertiesEditionDialog.h @@ -115,6 +115,8 @@ namespace bbtk wxTextCtrl *_txtCategory; wxTextCtrl *_txtDescription; wxComboBox *_diagramType; + wxComboBox *_diagramMessageKind; + wxComboBox *_diagramMessageLevel; wxTreeCtrl *_treeBox; NodeTreeC _tree; protected: diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx index a941a94..42f0f58 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx @@ -521,6 +521,16 @@ namespace bbtk { return _sceneManager->GetCategory(); } + //========================================================================= + std::string wxGEditorTabPanel::GetMessageKind() + { + return _sceneManager->GetMessageKind(); + } + //========================================================================= + std::string wxGEditorTabPanel::GetMessageLevel() + { + return _sceneManager->GetMessageLevel(); + } //========================================================================= void wxGEditorTabPanel::SetCbName(std::string cbName) @@ -554,6 +564,18 @@ namespace bbtk { _sceneManager->SetDescription( description ); } + + //========================================================================= + void wxGEditorTabPanel::SetMessageKind(std::string kind) + { + _sceneManager->SetMessageKind( kind ); + } + + //========================================================================= + void wxGEditorTabPanel::SetMessageLevel(std::string level) + { + _sceneManager->SetMessageLevel( level ); + } //========================================================================= //DFCH void wxGEditorTabPanel::SetFullPath( const std::string& fullpath ) diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h index dc625a2..9415e26 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h @@ -183,6 +183,8 @@ namespace bbtk void SetAuthor(std::string author); void SetCategory(std::string category); void SetDescription(std::string description); + void SetMessageKind(std::string kind); + void SetMessageLevel(std::string level); //Getters std::string GetFullPath( ); std::string GetFileName( ); @@ -192,6 +194,8 @@ namespace bbtk std::string GetAuthor(); std::string GetDescription(); std::string GetCategory(); + std::string GetMessageKind(); + std::string GetMessageLevel(); //========================================================================= diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx index 12f9bb6..9e6fa15 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx @@ -375,6 +375,18 @@ printf("wxTabPanelsManager::VerifyActualTabPanel %d \n", this->_notebook->GetPa return _actual->GetCategory(); } + //========================================================================= + std::string wxTabPanelsManager::GetMessageKind() + { + return _actual->GetMessageKind(); + } + + //========================================================================= + std::string wxTabPanelsManager::GetMessageLevel() + { + return _actual->GetMessageLevel(); + } + //========================================================================= void wxTabPanelsManager::SetCbName(std::string cbName) { @@ -407,6 +419,18 @@ printf("wxTabPanelsManager::VerifyActualTabPanel %d \n", this->_notebook->GetPa _actual->SetDescription( description ); } + + //========================================================================= + void wxTabPanelsManager::SetMessageKind(std::string kind){ + _actual->SetMessageKind(kind); + } + + + //========================================================================= + void wxTabPanelsManager::SetMessageLevel(std::string level){ + _actual->SetMessageLevel(level); + } + //========================================================================= bool wxTabPanelsManager::TryToOpenScriptApplication(std::string packageName ,std::string boxType) { diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h index 976201a..5e4428d 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h @@ -141,11 +141,15 @@ namespace bbtk void SetAuthor(std::string author); void SetCategory(std::string category); void SetDescription(std::string description); + void SetMessageKind(std::string kind); + void SetMessageLevel(std::string level); std::string GetCbName(); std::string GetCbPackageName(); std::string GetAuthor(); std::string GetDescription(); std::string GetCategory(); + std::string GetMessageKind(); + std::string GetMessageLevel(); void SetNameTabPanel(wxString tabpanelname); std::string GetNameTabPanel(); diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx index 7c2ff2d..a421498 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx @@ -78,6 +78,8 @@ wxVtkSceneManager::wxVtkSceneManager(wxGEditorTabPanel *parent, wxVtk3DBaseView _Author = "Author ??"; _Category = ""; _Description = "Description ??"; + _MessageKind = " "; + _MessageLevel = " "; _bugTextActor_text = "void"; _bugTextActor_status = 0; @@ -1352,6 +1354,7 @@ bool wxVtkSceneManager::MakeBoxExecutable() { //========================================================================= std::string wxVtkSceneManager::getDiagramBBS(bool wln) { + std::cout << "wxVtkSceneManager::getDiagramBBS" << std::endl; bool existsExec = false; std::vector packages; @@ -1409,7 +1412,7 @@ std::string wxVtkSceneManager::getDiagramBBS(bool wln) { script += "\n"; //ups2 - + script += LineNumber(wln, lnNmbr); script += "author \""; script += _Author; @@ -1525,6 +1528,13 @@ std::string wxVtkSceneManager::getDiagramBBS(bool wln) { script += "# Complex input ports\n"; script += complexInputs; + script += LineNumber(wln, lnNmbr); + script += "message "; + script += _MessageKind; + script += " "; + script += _MessageLevel; + script += "\n"; + for (i = 0; i < (int) execBoxes.size(); i++) { script += LineNumber(wln, lnNmbr); script += "exec "; @@ -1544,6 +1554,7 @@ std::string wxVtkSceneManager::getDiagramBBS(bool wln) { //========================================================================= std::string wxVtkSceneManager::saveComplexBoxBBS() { + std::cout<<"wxVtkSceneManager::saveComplexBoxBBS"< packages; std::vector boxes; std::vector connections; @@ -1710,6 +1721,12 @@ std::string wxVtkSceneManager::saveComplexBoxBBS() { script += "\n"; + script += "message "; + script += _MessageKind; + script += " "; + script += _MessageLevel; + script += "\n"; + for (i = 0; i < (int) execBoxes.size(); i++) { script += "exec "; int id = execBoxes[i]; @@ -1849,10 +1866,17 @@ void wxVtkSceneManager::saveDiagram(std::string &content) { sprintf(buffer, "%d", bsize); content += buffer; content += "\n"; - + for (int i = 0; i < bsize; i++) { int id = boxes[i]; + std::cout<<"id "<getStatusText()<getModel()->getBBTKType()<getModel()->getBBTKType();//CFT + std::cout<<"nname: "<getModel()->getBBTKName()<getModel()->getGObjectType()<getModel()->save(content); } @@ -2933,6 +2957,31 @@ std::string wxVtkSceneManager::GetDescription() { //========================================================================= +void wxVtkSceneManager::SetMessageKind(std::string kind) { + _MessageKind = kind; + +} + +//========================================================================= + +std::string wxVtkSceneManager::GetMessageKind(){ + return _MessageKind; +} + +//========================================================================= + +void wxVtkSceneManager::SetMessageLevel(std::string Level){ + _MessageLevel = Level; +} + +//========================================================================= + +std::string wxVtkSceneManager::GetMessageLevel(){ + return _MessageLevel; +} + +//========================================================================= + std::vector< std::string> wxVtkSceneManager::GetExternalInputsNames() { diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h index 31c974d..4bad668 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h @@ -229,12 +229,16 @@ namespace bbtk void SetAuthor(std::string author); void SetCategory(std::string category); void SetDescription(std::string description); + void SetMessageKind(std::string kind); + void SetMessageLevel(std::string Level); std::string GetCbName(); std::string GetCbPackageName(); std::string GetAuthor(); std::string GetCategory(); std::string GetDescription(); + std::string GetMessageKind(); + std::string GetMessageLevel(); // RaC2012 2nd HackFest // External Inputs was the complex inputs in previous versions @@ -246,7 +250,8 @@ namespace bbtk void printAll( int com, int sta ); - + std::vector boxesDiagram;//CFT + private: std::string _cbName; @@ -254,6 +259,8 @@ namespace bbtk std::string _Author; std::string _Category; std::string _Description; + std::string _MessageKind; + std::string _MessageLevel; //wxPanel that uses the manager wxGEditorTabPanel *_parent;