2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
10 # This software is governed by the CeCILL-B license under French law and
11 # abiding by the rules of distribution of free software. You can use,
12 # modify and/ or redistribute the software under the terms of the CeCILL-B
13 # license as circulated by CEA, CNRS and INRIA at the following URL
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 # or in the file LICENSE.txt.
17 # As a counterpart to the access to the source code and rights to copy,
18 # modify and redistribute granted by the license, users are provided only
19 # with a limited warranty and the software's author, the holder of the
20 # economic rights, and the successive licensors have only limited
23 # The fact that you are presently reading this means that you have had
24 # knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------
29 #include "wxCDMMainFrame.h"
34 #include "wx/treectrl.h"
35 #include "wx/treebase.h"
36 #include "CDMUtilities.h"
38 #include "creaDevManagerIds.h"
39 #include "wxCDMMainDescriptionPanel.h"
40 #include "wxCDMProjectDescriptionPanel.h"
41 #include "wxCDMAppliDescriptionPanel.h"
42 #include "wxCDMApplicationDescriptionPanel.h"
43 #include "wxCDMLibDescriptionPanel.h"
44 #include "wxCDMLibraryDescriptionPanel.h"
45 #include "wxCDMPackageDescriptionPanel.h"
46 #include "wxCDMBlackBoxDescriptionPanel.h"
47 #include "wxCDMCMakeListsDescriptionPanel.h"
48 #include "wxCDMFolderDescriptionPanel.h"
49 #include "wxCDMFileDescriptionPanel.h"
51 #include "wxCDMProjectActionsPanel.h"
52 #include "wxCDMNewProjectDialog.h"
55 BEGIN_EVENT_TABLE(wxCDMMainFrame, wxFrame)
56 EVT_MENU(ID_MENU_NEW_PROJECT, wxCDMMainFrame::OnMenuNewProject)
57 EVT_MENU(ID_MENU_OPEN_PROJECT, wxCDMMainFrame::OnMenuOpenProject)
58 EVT_MENU(ID_MENU_OPEN_RECENT, wxCDMMainFrame::OnMenuOpenRecent)
59 EVT_MENU(ID_MENU_CLOSE_PROJECT, wxCDMMainFrame::OnMenuCloseProject)
60 EVT_MENU(ID_MENU_CLOSE_ALL_PROJECTS, wxCDMMainFrame::OnMenuCloseAllProjects)
61 EVT_MENU(ID_MENU_EXPORT_HIERARCHY, wxCDMMainFrame::OnMenuExportHierarchy)
62 EVT_MENU(ID_MENU_EXIT, wxCDMMainFrame::OnMenuExit)
63 EVT_MENU(ID_MENU_REFRESH_PROJECT, wxCDMMainFrame::OnMenuRefreshProject)
64 EVT_MENU(ID_MENU_CUT, wxCDMMainFrame::OnMenuMenuCut)
65 EVT_MENU(ID_MENU_COPY, wxCDMMainFrame::OnMenuMenuCopy)
66 EVT_MENU(ID_MENU_PASTE, wxCDMMainFrame::OnMenuMenuPaste)
67 EVT_MENU(ID_MENU_DELETE, wxCDMMainFrame::OnMenuMenuDelete)
68 EVT_MENU(ID_MENU_SELECT_ALL, wxCDMMainFrame::OnMenuSelectAll)
69 EVT_MENU(ID_MENU_SELECT_NONE, wxCDMMainFrame::OnMenuSelectNone)
70 EVT_MENU(ID_MENU_EVENT_LOG, wxCDMMainFrame::OnMenuEventLog)
71 EVT_MENU(ID_MENU_BBTK_GRAPHICAL_EDITOR, wxCDMMainFrame::OnMenuBBTKGraphicalEditor)
72 EVT_MENU(ID_MENU_MINITOOLS, wxCDMMainFrame::OnMenuMiniTools)
73 EVT_MENU(ID_MENU_CODE_EDITOR, wxCDMMainFrame::OnMenuCodeEditor)
74 EVT_MENU(ID_MENU_COMMAND_LINE, wxCDMMainFrame::OnMenuCommandLine)
75 EVT_MENU(ID_MENU_HELP, wxCDMMainFrame::OnMenuHelp)
76 EVT_MENU(ID_MENU_REPORT_BUG, wxCDMMainFrame::OnMenuReportBug)
77 EVT_MENU(ID_MENU_ABOUT_CREADEVMANAGER, wxCDMMainFrame::OnMenuAboutCreaDevManager)
78 EVT_MENU(ID_MENU_ABOUT_CREATIS, wxCDMMainFrame::OnMenuAboutCreatis)
79 EVT_BUTTON(ID_BUTTON_NEWPROJECT, wxCDMMainFrame::OnMenuNewProject)
80 EVT_BUTTON(ID_BUTTON_OPENPROJECT, wxCDMMainFrame::OnMenuOpenProject)
81 EVT_TREE_SEL_CHANGED(ID_TREE_PROJECTS, wxCDMMainFrame::OnTreeSelectionChanged)
82 EVT_COMMAND(wxID_ANY, wxEVT_DISPLAY_CHANGED, wxCDMMainFrame::OnCreationComplete)
85 wxCDMMainFrame::wxCDMMainFrame(
88 const wxString& caption,
94 Create(parent, id, caption, pos, size, style);
97 wxCDMMainFrame::~wxCDMMainFrame()
102 bool wxCDMMainFrame::Create(
105 const wxString& caption,
111 wxFrame::Create(parent, id, caption, pos, size, style);
112 this->model = new modelCDMMain();
118 void wxCDMMainFrame::RefreshProject()
121 std::cout << "refreshing project" << std::endl;
122 this->model->RefreshProject(result);
123 std::cout << "rebuilding project tree" << std::endl;
124 this->tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
127 void wxCDMMainFrame::CreateMenus()
129 wxMenuBar* menuBar = new wxMenuBar;
132 menu_File = new wxMenu();
133 menu_File->Append(ID_MENU_NEW_PROJECT, wxT("&New Project..."));
134 menu_File->Append(ID_MENU_OPEN_PROJECT, wxT("&Open Project..."));
135 menu_File->Append(ID_MENU_OPEN_RECENT, wxT("Open &Recent"));
136 menu_File->AppendSeparator();
137 menu_File->Append(ID_MENU_CLOSE_PROJECT, wxT("&Close Project"));
138 menu_File->Append(ID_MENU_CLOSE_ALL_PROJECTS, wxT("C&lose All Projects"));
139 menu_File->AppendSeparator();
140 menu_File->Append(ID_MENU_EXPORT_HIERARCHY, wxT("&Export Project Hierarchy..."));
141 menu_File->AppendSeparator();
142 menu_File->Append(ID_MENU_EXIT, wxT("E&xit"));
144 menuBar->Append(menu_File, wxT("&File"));
147 menu_Edit = new wxMenu();
148 menu_Edit->Append(ID_MENU_REFRESH_PROJECT, wxT("&Refresh Project"));
149 menu_Edit->AppendSeparator();
150 menu_Edit->Append(ID_MENU_CUT, wxT("Cu&t"));
151 menu_Edit->Append(ID_MENU_COPY, wxT("&Copy"));
152 menu_Edit->Append(ID_MENU_PASTE, wxT("&Paste"));
153 menu_Edit->AppendSeparator();
154 menu_Edit->Append(ID_MENU_DELETE, wxT("&Delete"));
155 menu_Edit->Append(ID_MENU_SELECT_ALL, wxT("Select &All"));
156 menu_Edit->Append(ID_MENU_SELECT_NONE, wxT("Ca&ncel Selection"));
158 menuBar->Append(menu_Edit, wxT("&Edit"));
161 menu_Tools = new wxMenu();
162 menu_Tools->Append(ID_MENU_EVENT_LOG, wxT("Event &Log"));
163 menu_Tools->Append(ID_MENU_BBTK_GRAPHICAL_EDITOR, wxT("BBTK &Graphical Editor"));
164 menu_Tools->Append(ID_MENU_MINITOOLS, wxT("&MiniTools"));
165 menu_Tools->Append(ID_MENU_CODE_EDITOR, wxT("&Code Editor"));
166 menu_Tools->Append(ID_MENU_COMMAND_LINE, wxT("&Command Line"));
168 menuBar->Append(menu_Tools, wxT("&Tools"));
171 menu_Help = new wxMenu();
172 menu_Help->Append(ID_MENU_HELP, wxT("&Help"));
173 menu_Help->Append(ID_MENU_REPORT_BUG, wxT("Report &Bug"));
174 menu_Help->Append(ID_MENU_ABOUT_CREADEVMANAGER, wxT("&About CreaDevManager"));
175 menu_Help->Append(ID_MENU_ABOUT_CREATIS, wxT("A&bout CREATIS"));
177 menuBar->Append(menu_Help, wxT("&Help"));
182 wxStatusBar* statusBar = new wxStatusBar(this, ID_STATUS_BAR, wxST_SIZEGRIP);
183 statusBar->SetFieldsCount(1);
184 SetStatusBar(statusBar);
188 void wxCDMMainFrame::CreateControls()
191 auiManager.SetManagedWindow(this);
194 tree_Projects = new wxCDMProjectsTreeCtrl(
199 wxTR_HAS_BUTTONS | wxTR_AQUA_BUTTONS
202 panel_Properties = new wxCDMMainDescriptionPanel(
204 ID_WINDOW_PROPERTIES,
205 wxT("Description Panel"),
217 auiManager.AddPane(panel_Properties, wxAuiPaneInfo().BestSize(600,400).CenterPane().Name(wxT("panel_Properties")).Caption(wxT("Properties")));
218 auiManager.AddPane(tree_Projects, wxAuiPaneInfo().Left().MinSize(300,300).BestSize(300,400).CloseButton(false).Name(wxT("tree_Projects")).Caption(wxT("Projects Tree")));
220 wxString pers = auiManager.SavePerspective();
223 auiManager.LoadPerspective(pers,true);
228 void wxCDMMainFrame::OnMenuNewProject(wxCommandEvent& event)
232 wxCDMNewProjectDialog* dialog = new wxCDMNewProjectDialog(this);
234 userResponse = dialog->ShowModal();
236 if(userResponse == wxID_FORWARD)
239 if(this->model->GetProject() != NULL)
241 if(!this->model->CloseProject(result))
243 std::cout << "error closing project: " << *result << std::endl;
244 wxMessageBox(crea::std2wx(*result),_T("New Project - Error!"),wxOK | wxICON_ERROR);
250 if(!this->model->CreateProject(
251 crea::wx2std(dialog->GetProjectName()),
252 crea::wx2std(dialog->GetProjectLocation()),
254 crea::wx2std(dialog->GetPackageAuthor()),
255 crea::wx2std(dialog->GetPackageDescription())
258 std::cout << "error opening project: " << *result << std::endl;
259 wxMessageBox(crea::std2wx(*result),_T("New Project - Error!"),wxOK | wxICON_ERROR);
264 //populate tree control
265 tree_Projects->BuildTree(this->model->GetModelElements(),this->model->GetProject());
266 tree_Projects->SelectItem(this->model->GetProject()->GetId());
268 //change description panel
269 if(this->panel_Properties != NULL)
271 auiManager.DetachPane(this->panel_Properties);
272 this->panel_Properties->Destroy();
275 this->panel_Properties = new wxCDMProjectDescriptionPanel(
277 this->model->GetProject(),
278 ID_WINDOW_PROPERTIES,
279 wxT("Description Panel"),
283 //show projectactions panel
284 if(this->panel_ProjectActions != NULL)
286 auiManager.DetachPane(this->panel_Properties);
287 this->panel_ProjectActions->Destroy();
290 panel_ProjectActions = new wxCDMProjectActionsPanel(
292 ID_WINDOW_PROJ_ACTIONS,
293 wxT("Project Actions Panel"),
298 panel_ProjectActions->SetMinSize(wxSize(500, 100));
301 auiManager.AddPane(panel_Properties, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("Properties")).BestSize(600,400));
302 auiManager.AddPane(panel_ProjectActions, wxAuiPaneInfo().Bottom().MinSize(800,50).Name(wxT("panel_ProjectActions")).Caption(wxT("Project Actions")).BestSize(800,70).CloseButton(false));
306 wxMessageBox(_T("New Project created!"),_T("New Project - Success!"), wxOK | wxICON_INFORMATION);
311 void wxCDMMainFrame::OnMenuOpenProject(wxCommandEvent& event)
315 long style = wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST;
316 wxDirDialog* FD = new wxDirDialog(this, wxT("Select the project directory"), wxT(""), style);
317 long userResponse = FD->ShowModal();
318 if(userResponse == wxID_OK)
320 std::string path = crea::wx2std (FD->GetPath());
324 std::cout << "Selection to open: " << path << std::endl;
328 if(this->model->GetProject() != NULL)
330 std::cout << "Project not null, closing it" << std::endl;
331 if(!this->model->CloseProject(result))
333 std::cout << "error closing project: " << *result << std::endl;
334 wxMessageBox(crea::std2wx(result->c_str()),_T("New Project - Error!"),wxOK | wxICON_ERROR);
340 if (!this->model->OpenProject(path, result))
342 std::cout << "error opening project: " << *result << std::endl;
343 wxMessageBox( crea::std2wx(result->c_str()), wxT("Open Project - Error"), wxICON_ERROR);
348 std::cout << "building ui" << std::endl;
351 //populate tree control
352 tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
353 tree_Projects->SelectItem(this->model->GetProject()->GetId());
355 //change description panel
356 if(this->panel_Properties != NULL)
358 auiManager.DetachPane(this->panel_Properties);
359 this->panel_Properties->Destroy();
362 this->panel_Properties = new wxCDMProjectDescriptionPanel(
364 this->model->GetProject(),
365 ID_WINDOW_PROPERTIES,
366 wxT("Description Panel"),
372 //change project's actions panel
373 if(this->panel_ProjectActions!= NULL)
375 auiManager.DetachPane(this->panel_ProjectActions);
376 this->panel_ProjectActions->Destroy();
378 panel_ProjectActions = new wxCDMProjectActionsPanel(
380 ID_WINDOW_PROJ_ACTIONS,
381 wxT("Project Actions Panel"),
386 panel_ProjectActions->SetMinSize(wxSize(500, 100));
389 auiManager.AddPane(panel_Properties, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("Properties")).BestSize(600,400));
390 auiManager.AddPane(panel_ProjectActions, wxAuiPaneInfo().Bottom().MinSize(800,50).Name(wxT("panel_ProjectActions")).Caption(wxT("Project Actions")).BestSize(800,70).CloseButton(false));
397 void wxCDMMainFrame::OnMenuOpenRecent(wxCommandEvent& event)
399 std::cerr << "Event OnMenuOpenRecent not implemented" << std::endl;
402 void wxCDMMainFrame::OnMenuCloseProject(wxCommandEvent& event)
404 std::cout << "closing project" << std::endl;
406 if(!this->model->CloseProject(result))
408 std::cout << "error closing project: " << *result << std::endl;
409 wxMessageBox( crea::std2wx(result->c_str()), wxT("Close Project - Error"), wxICON_ERROR);
412 tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
414 if(this->panel_Properties != NULL)
416 auiManager.DetachPane(this->panel_Properties);
417 this->panel_Properties->Destroy();
419 if(this->panel_ProjectActions != NULL)
421 auiManager.DetachPane(this->panel_ProjectActions);
422 this->panel_ProjectActions->Destroy();
425 this->panel_Properties = new wxCDMMainDescriptionPanel(
427 ID_WINDOW_PROPERTIES,
428 wxT("Description Panel"),
434 auiManager.AddPane(panel_Properties, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("Properties")).BestSize(600,400));
439 void wxCDMMainFrame::OnMenuCloseAllProjects(wxCommandEvent& event)
441 std::cerr << "Event OnMenuCloseAllProjects closing only one project" << std::endl;
443 if(!this->model->CloseProject(result))
445 std::cout << "error closing project: " << *result << std::endl;
446 wxMessageBox( crea::std2wx(result->c_str()), wxT("Close Project - Error"), wxICON_ERROR);
448 tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
450 if(this->panel_Properties != NULL)
452 auiManager.DetachPane(this->panel_Properties);
453 this->panel_Properties->Destroy();
455 if(this->panel_ProjectActions != NULL)
457 auiManager.DetachPane(this->panel_ProjectActions);
458 this->panel_ProjectActions->Destroy();
461 this->panel_Properties = new wxCDMMainDescriptionPanel(
463 ID_WINDOW_PROPERTIES,
464 wxT("Description Panel"),
470 auiManager.AddPane(panel_Properties, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("Properties")).BestSize(600,400));
475 void wxCDMMainFrame::OnMenuExportHierarchy(wxCommandEvent& event)
477 std::cerr << "Event OnMenuExportHierarchy not implemented" << std::endl;
480 void wxCDMMainFrame::OnMenuExit(wxCommandEvent& event)
482 std::cout << "Closing CreaDevManager..." << std::endl;
484 if(!this->model->CloseProject(result))
486 std::cout << "error closing project: " << *result << std::endl;
487 wxMessageBox( crea::std2wx(result->c_str()), wxT("Close Project - Error"), wxICON_ERROR);
489 tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
491 if(this->panel_Properties != NULL)
493 auiManager.DetachPane(this->panel_Properties);
494 this->panel_Properties->Destroy();
496 if(this->panel_ProjectActions != NULL)
498 auiManager.DetachPane(this->panel_ProjectActions);
499 this->panel_ProjectActions->Destroy();
502 this->panel_Properties = new wxCDMMainDescriptionPanel(
504 ID_WINDOW_PROPERTIES,
505 wxT("Description Panel"),
515 void wxCDMMainFrame::OnMenuRefreshProject(wxCommandEvent& event)
518 if(!model->RefreshProject(result))
520 wxMessageBox( crea::std2wx(result->c_str()), wxT("Refresh Project - Error"), wxICON_ERROR);
522 this->tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
523 this->auiManager.Update();
524 //TODO: Show possible problems in CMakeLists files
527 void wxCDMMainFrame::OnMenuMenuCut(wxCommandEvent& event)
529 std::cerr << "Event OnMenuMenuCut not implemented" << std::endl;
532 void wxCDMMainFrame::OnMenuMenuCopy(wxCommandEvent& event)
534 std::cerr << "Event OnMenuMenuCopy not implemented" << std::endl;
537 void wxCDMMainFrame::OnMenuMenuPaste(wxCommandEvent& event)
539 std::cerr << "Event OnMenuMenuPaste not implemented" << std::endl;
542 void wxCDMMainFrame::OnMenuMenuDelete(wxCommandEvent& event)
544 std::cerr << "Event OnMenuMenuDelete not implemented" << std::endl;
547 void wxCDMMainFrame::OnMenuSelectAll(wxCommandEvent& event)
549 std::cerr << "Event OnMenuSelectAll not implemented" << std::endl;
552 void wxCDMMainFrame::OnMenuSelectNone(wxCommandEvent& event)
554 std::cerr << "Event OnMenuSelectNone not implemented" << std::endl;
559 void wxCDMMainFrame::OnMenuEventLog(wxCommandEvent& event)
561 std::cerr << "Event OnMenuEventLog not implemented" << std::endl;
564 void wxCDMMainFrame::OnMenuBBTKGraphicalEditor(wxCommandEvent& event)
566 std::cerr << "Event OnMenuBBTKGraphicalEditor not implemented" << std::endl;
569 void wxCDMMainFrame::OnMenuMiniTools(wxCommandEvent& event)
571 std::cerr << "Event OnMenuMiniTools not implemented" << std::endl;
574 void wxCDMMainFrame::OnMenuCodeEditor(wxCommandEvent& event)
576 std::cerr << "Event OnMenuCodeEditor not implemented" << std::endl;
579 void wxCDMMainFrame::OnMenuCommandLine(wxCommandEvent& event)
581 std::cerr << "Event OnMenuCommandLine not implemented" << std::endl;
586 void wxCDMMainFrame::OnMenuHelp(wxCommandEvent& event)
588 std::cerr << "Event OnMenuHelp not implemented" << std::endl;
591 void wxCDMMainFrame::OnMenuReportBug(wxCommandEvent& event)
593 std::cerr << "Event OnMenuReportBug not implemented" << std::endl;
596 void wxCDMMainFrame::OnMenuAboutCreaDevManager(wxCommandEvent& event)
598 std::cerr << "Event OnMenuAboutCreaDevManager not implemented" << std::endl;
601 void wxCDMMainFrame::OnMenuAboutCreatis(wxCommandEvent& event)
603 std::cerr << "Event OnMenuAboutCreatis not implemented" << std::endl;
607 void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
609 std::cout << "New Tree Selection" << std::endl;
610 //get selected element
611 wxTreeItemId elementId = event.GetItem();
613 //get element from model
614 modelCDMIProjectTreeNode* element = this->model->GetModelElements()[elementId];
615 std::cout << "Tree Selection: " << element->GetName() << std::endl;
617 //TODO get element type
619 modelCDMProject* elementProject = dynamic_cast<modelCDMProject*>(element);
620 wxPanel* description;
621 if(elementProject != NULL)
623 //create element description
624 description = new wxCDMProjectDescriptionPanel(
627 ID_WINDOW_PROPERTIES,
628 wxT("Description Panel"),
638 modelCDMAppli* elementAppli = dynamic_cast<modelCDMAppli*>(element);
639 if(elementAppli != NULL)
641 //create element description
642 description = new wxCDMAppliDescriptionPanel(
645 ID_WINDOW_PROPERTIES,
646 wxT("Description Panel"),
655 modelCDMApplication* elementApplication = dynamic_cast<modelCDMApplication*>(element);
656 if(elementApplication != NULL)
658 //create element description
659 description = new wxCDMApplicationDescriptionPanel(
662 ID_WINDOW_PROPERTIES,
663 wxT("Description Panel"),
672 modelCDMLib* elementLib = dynamic_cast<modelCDMLib*>(element);
673 if(elementLib != NULL)
675 //create element description
676 description = new wxCDMLibDescriptionPanel(
679 ID_WINDOW_PROPERTIES,
680 wxT("Description Panel"),
689 modelCDMLibrary* elementLibrary = dynamic_cast<modelCDMLibrary*>(element);
690 if(elementLibrary != NULL)
692 //create element description
693 description = new wxCDMLibraryDescriptionPanel(
696 ID_WINDOW_PROPERTIES,
697 wxT("Description Panel"),
706 modelCDMPackage* elementPackage = dynamic_cast<modelCDMPackage*>(element);
707 if(elementPackage != NULL)
709 //create element description
710 description = new wxCDMPackageDescriptionPanel(
713 ID_WINDOW_PROPERTIES,
714 wxT("Description Panel"),
723 modelCDMBlackBox* elementBlackBox = dynamic_cast<modelCDMBlackBox*>(element);
724 if(elementBlackBox != NULL)
726 //create element description
727 description = new wxCDMBlackBoxDescriptionPanel(
730 ID_WINDOW_PROPERTIES,
731 wxT("Description Panel"),
740 modelCDMCMakeListsFile* elementCMakeLists = dynamic_cast<modelCDMCMakeListsFile*>(element);
741 if(elementCMakeLists != NULL)
743 //create element description
744 description = new wxCDMCMakeListsDescriptionPanel(
747 ID_WINDOW_PROPERTIES,
748 wxT("Description Panel"),
757 modelCDMFolder* elementFolder = dynamic_cast<modelCDMFolder*>(element);
758 if(elementFolder != NULL)
760 //create element description
761 description = new wxCDMFolderDescriptionPanel(
764 ID_WINDOW_PROPERTIES,
765 wxT("Description Panel"),
774 modelCDMFile* elementFile = dynamic_cast<modelCDMFile*>(element);
775 if(elementFile != NULL)
777 //create element description
778 description = new wxCDMFileDescriptionPanel(
781 ID_WINDOW_PROPERTIES,
782 wxT("Description Panel"),
792 //create element description
793 description = new wxCDMMainDescriptionPanel(
795 ID_WINDOW_PROPERTIES,
796 wxT("Description Panel"),
813 if(this->panel_Properties!= NULL)
815 this->panel_Properties->Hide();
816 this->panel_Properties->Destroy();
817 auiManager.DetachPane(this->panel_Properties);
822 this->panel_Properties = description;
823 auiManager.AddPane(panel_Properties, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("Properties")).BestSize(600,400));
825 this->panel_Properties->Show(true);
831 void wxCDMMainFrame::OnCreationComplete(wxCommandEvent& event)
833 std::cout << "inMainFrame " << event.GetInt() << std::endl;
834 this->tree_Projects->SelectItem(event.GetInt());