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 * wxCDMPackageDescriptionPanel.cpp
31 * Created on: Nov 27, 2012
32 * Author: Daniel Felipe Gonzalez Obando
35 #include "wxCDMPackageDescriptionPanel.h"
37 #include "wxCDMMainFrame.h"
39 #include "creaDevManagerIds.h"
40 #include "images/PkIcon64.xpm"
42 #include "wxCDMNewBlackBoxDialog.h"
43 #include "wxCDMPackageConfigurationDialog.h"
44 #include <wx/textdlg.h>
45 #include "CDMUtilities.h"
48 #include "modelCDMCMakeListsFile.h"
49 #include "wxCDMPackageHelpDialog.h"
52 BEGIN_EVENT_TABLE(wxCDMPackageDescriptionPanel, wxPanel)
53 EVT_HYPERLINK(ID_BUTTON_PREV, wxCDMPackageDescriptionPanel::OnBtnReturn)
54 EVT_BUTTON(ID_BUTTON_SET_AUTHOR, wxCDMPackageDescriptionPanel::OnBtnSetAuthor)
55 EVT_BUTTON(ID_BUTTON_SET_VERSION, wxCDMPackageDescriptionPanel::OnBtnSetVersion)
56 EVT_BUTTON(ID_BUTTON_SET_DESCRIPTION, wxCDMPackageDescriptionPanel::OnBtnSetDescription)
57 EVT_HYPERLINK(ID_LINK_SELECT_BLACKBOX, wxCDMPackageDescriptionPanel::OnLnkBlackBoxSelect)
58 EVT_BUTTON(ID_BUTTON_CREATE_BLACKBOX, wxCDMPackageDescriptionPanel::OnBtnCreateBlackBox)
59 EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMPackageDescriptionPanel::OnBtnEditCMakeLists)
60 EVT_BUTTON(ID_BUTTON_OPEN_FOLDER, wxCDMPackageDescriptionPanel::OnBtnOpenFolder)
61 EVT_BUTTON(ID_BUTTON_CHOOSE, wxCDMPackageDescriptionPanel::OnBtnConfigurePackage)
64 wxCDMPackageDescriptionPanel::wxCDMPackageDescriptionPanel(
66 modelCDMPackage* package,
68 const wxString& caption,
74 wxCDMPackageDescriptionPanel::Create(parent, package, id, caption, pos, size, style);
77 wxCDMPackageDescriptionPanel::~wxCDMPackageDescriptionPanel()
81 bool wxCDMPackageDescriptionPanel::Create(
83 modelCDMPackage* package,
85 const wxString& caption,
91 wxPanel::Create(parent, id, pos, size, style);
92 // this part makes the scrollbars show up
93 this->FitInside(); // ask the sizer about the needed size
94 this->SetScrollRate(5, 5);
96 this->package = package;
101 void wxCDMPackageDescriptionPanel::CreateControls()
103 wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
106 wxBoxSizer *linksSizer = new wxBoxSizer(wxHORIZONTAL);
107 std::vector<modelCDMIProjectTreeNode*> parents = this->package->GetParents();
108 for (int i = 0; i < (int)(parents.size()); i++)
110 wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
111 returnLnk->SetWindowStyle(wxNO_BORDER);
112 returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
113 linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
114 linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
117 linksSizer->Add(new wxStaticText(this, wxID_ANY, crea::std2wx(this->package->GetName())), 0, wxALIGN_CENTER, 0);
119 sizer->Add(linksSizer, 0, wxALIGN_CENTER | wxALL, 5);
122 wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL);
125 headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(PkIcon64)),0, wxALIGN_CENTER, 0);
126 wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL);
128 textSizer->Add(new wxStaticText(this, -1, _("Package")),0, wxALIGN_LEFT, 0);
130 textSizer->Add(new wxStaticText(this, -1, crea::std2wx(this->package->GetNamePackage())),0, wxALIGN_LEFT, 0);
131 headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
133 sizer->Add(headerSizer, 0, wxALIGN_CENTER);
136 wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Properties"));
137 wxPanel* propertiesPanel = new wxPanel(this);
138 wxBoxSizer* propertiesPanelSizer = new wxBoxSizer(wxVERTICAL);
139 wxFlexGridSizer* propertiesGridSizer = new wxFlexGridSizer(4, 2, 9, 15);
141 wxStaticText *pAuthor = new wxStaticText(propertiesPanel, -1, wxT("Author"));
142 wxStaticText *pVersion = new wxStaticText(propertiesPanel, -1, wxT("Version"));
143 wxStaticText *pDescription = new wxStaticText(propertiesPanel, -1, wxT("Description"));
146 wxBoxSizer* pAuthorsz = new wxBoxSizer(wxHORIZONTAL);
147 this->authortc = new wxStaticText(propertiesPanel, wxID_ANY, crea::std2wx(this->package->GetAuthors()));
148 wxButton* pAuthorbt = new wxButton(propertiesPanel, ID_BUTTON_SET_AUTHOR, wxT("Change"));
149 pAuthorbt->SetToolTip(wxT("Update the author/s of the package."));
150 pAuthorsz->Add(this->authortc, 1, wxALIGN_CENTER_VERTICAL);
151 pAuthorsz->Add(pAuthorbt, 0, wxALIGN_CENTER | wxLEFT, 10);
154 wxBoxSizer* pVersionsz = new wxBoxSizer(wxHORIZONTAL);
155 this->versiontc = new wxStaticText(propertiesPanel, wxID_ANY, crea::std2wx(this->package->GetVersion()));
156 wxButton* pVersionbt = new wxButton(propertiesPanel, ID_BUTTON_SET_VERSION, wxT("Set"));
157 pVersionbt->SetToolTip(wxT("Update the version of the package."));
158 pVersionsz->Add(this->versiontc, 1, wxALIGN_CENTER_VERTICAL);
159 pVersionsz->Add(pVersionbt, 0, wxALIGN_CENTER | wxLEFT, 10);
162 wxBoxSizer* pDescriptionsz = new wxBoxSizer(wxHORIZONTAL);
163 this->descriptiontc = new wxStaticText(propertiesPanel, wxID_ANY, crea::std2wx(this->package->GetDescription()));
164 wxButton* pDescriptionbt = new wxButton(propertiesPanel, ID_BUTTON_SET_DESCRIPTION, wxT("Change"));
165 pDescriptionbt->SetToolTip(wxT("Update the description of the project."));
166 pDescriptionsz->Add(this->descriptiontc, 1, wxALIGN_CENTER_VERTICAL);
167 pDescriptionsz->Add(pDescriptionbt, 0, wxALIGN_CENTER | wxLEFT, 10);
169 propertiesGridSizer->Add(pAuthor, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
170 propertiesGridSizer->Add(pAuthorsz, 1, wxEXPAND);
171 propertiesGridSizer->Add(pVersion, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
172 propertiesGridSizer->Add(pVersionsz, 1, wxEXPAND);
173 propertiesGridSizer->Add(pDescription, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
174 propertiesGridSizer->Add(pDescriptionsz, 1, wxEXPAND);
176 propertiesGridSizer->AddGrowableCol(1,1);
178 propertiesPanelSizer -> Add(propertiesGridSizer, 1, wxEXPAND);
179 propertiesPanel->SetSizer(propertiesPanelSizer);
180 propertiesPanelSizer->Fit(propertiesPanel);
181 propertiesBox->Add(propertiesPanel, 0, wxEXPAND | wxALL, 5);
183 sizer->Add(propertiesBox, 0, wxEXPAND | wxALL, 10);
186 wxStaticBoxSizer* BBBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("A&vailable Black Boxes"));
187 BBBox->GetStaticBox()->SetToolTip(wxT("Select any of the available black boxes to see its details or modify them."));
188 wxPanel* BBPanel = new wxPanel(this);
189 wxBoxSizer* BBPanelSizer = new wxBoxSizer(wxVERTICAL);
192 std::vector<modelCDMBlackBox*> blackBoxes = this->package->GetSrc()->GetBlackBoxes();
193 for (int i = 0; i < (int)(blackBoxes.size()); i++)
196 if(blackBoxes[i] != NULL)
199 wxHyperlinkCtrl* pBBlk = new wxHyperlinkCtrl(BBPanel,ID_LINK_SELECT_BLACKBOX, crea::std2wx(blackBoxes[i]->GetName().c_str()), crea::std2wx(blackBoxes[i]->GetName().c_str()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
200 pBBlk->SetWindowStyle(wxALIGN_LEFT | wxNO_BORDER);
201 std::string tt = "Author: " + blackBoxes[i]->GetAuthors() + "\nDescription: " + blackBoxes[i]->GetDescription() + "\nCategories: " + blackBoxes[i]->GetCategories();
202 pBBlk->SetToolTip(crea::std2wx(tt));
203 pBBlk->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnMouseEnter,NULL,this);
204 pBBlk->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnMouseExit,NULL,this);
205 BBPanelSizer -> Add(pBBlk, 0, wxEXPAND | wxALL, 5);
209 BBPanel->SetSizer(BBPanelSizer);
210 BBPanelSizer->Fit(BBPanel);
211 BBBox->Add(BBPanel, 1, wxEXPAND | wxALL, 5);
212 sizer -> Add(BBBox, 0, wxEXPAND | wxALL, 10);
215 wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("&Actions"));
216 wxPanel* actionsPanel = new wxPanel(this);
217 wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL);
219 wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(2, 2, 9, 15);
221 wxButton* createBBbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_BLACKBOX, _T("A. Create Black Box"));
222 createBBbt->SetToolTip(wxT("Create a new black box for the active project inside this package."));
223 actionsGridSizer->Add(createBBbt, 1, wxALL | wxEXPAND, 5);
224 wxButton* editConfbt = new wxButton(actionsPanel, ID_BUTTON_CHOOSE, _T("B. Configure Package"));
225 editConfbt->SetToolTip(wxT("Select the libraries your package is going to use. This procedure changes the package's CMakeLists file."));
226 actionsGridSizer->Add(editConfbt, 1, wxALL | wxEXPAND, 5);
227 wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File"));
228 editCMakebt->SetToolTip(wxT("Open the system default text editor to edit the package's CMakeLists.txt file."));
229 editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnCMakeMouseEnter,NULL,this);
230 editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnCMakeMouseExit,NULL,this);
231 actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5);
232 wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Package Folder"));
233 openFolderbt->SetToolTip(wxT("Open the package folder in the file explorer."));
234 actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5);
236 actionsGridSizer->AddGrowableCol(0,1);
237 actionsGridSizer->AddGrowableCol(1,1);
239 actionsPanelSizer->Add(actionsGridSizer, 1, wxEXPAND, 0);
240 actionsPanel->SetSizer(actionsPanelSizer);
241 actionsPanelSizer->Fit(actionsPanel);
242 actionsBox->Add(actionsPanel, 1, wxEXPAND);
243 sizer -> Add(actionsBox, 0, wxEXPAND | wxALL, 10);
247 sizer->SetSizeHints(this);
249 if (((wxCDMMainFrame*)this->GetParent())->isHelp())
251 wxCDMPackageHelpDialog* helpDialog = new wxCDMPackageHelpDialog(this->GetParent(), this->package, wxID_ANY);
252 helpDialog->Show(true);
256 void wxCDMPackageDescriptionPanel::OnBtnReturn(wxHyperlinkEvent& event)
258 std::vector<modelCDMIProjectTreeNode*> parents = this->package->GetParents();
259 std::string parentURL = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
260 //std::cout << parentURL << std::endl;
261 for (int i = 0; i < (int)(parents.size()); i++)
263 if (parents[i]->GetPath() == parentURL)
265 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
266 newEvent->SetClientData(parents[i]);
268 wxPostEvent(this->GetParent(), *newEvent);
273 void wxCDMPackageDescriptionPanel::OnBtnSetAuthor(wxCommandEvent& event)
275 //get author from user
276 wxTextEntryDialog* authDlg = new wxTextEntryDialog(
278 wxT("Enter the new authors name. Separate each author with a '/'."),
279 wxT("Change Package Author - creaDevManager"),
280 crea::std2wx(this->package->GetAuthors()),
281 wxTE_MULTILINE | wxOK | wxCANCEL
284 if (authDlg->ShowModal() == wxID_OK)
286 std::string authorsStr = crea::wx2std(authDlg->GetValue());
288 if(authorsStr.size() > 0)
291 if(!this->package->SetAuthors(authorsStr, result))
292 wxMessageBox(crea::std2wx(*result),_T("Change Package Author - Error!"),wxOK | wxICON_ERROR);
294 this->authortc->SetLabel(crea::std2wx(this->package->GetAuthors()));
295 this->authortc->GetParent()->GetSizer()->RecalcSizes();
300 void wxCDMPackageDescriptionPanel::OnBtnSetVersion(wxCommandEvent& event)
303 wxString versionWx = wxGetTextFromUser(
304 wxT("Enter the new version name"),
305 wxT("Change Package Version - creaDevManager"),
306 crea::std2wx(this->package->GetVersion())
309 std::vector<std::string> parts;
310 CDMUtilities::splitter::split(parts, crea::wx2std(versionWx), " .", CDMUtilities::splitter::no_empties);
311 if(parts.size() == 3)
314 if(!this->package->SetVersion(crea::wx2std(versionWx), result))
315 wxMessageBox(crea::std2wx(*result),_T("Change Package Version - Error!"),wxOK | wxICON_ERROR);
319 wxMessageBox(crea::std2wx("The version format is incorrect, please follow the following format:\nX.Y.Z\nX: Major Version\nY: Minor Version\nZ: Build Version"),_T("Set Project Version - Error!"),wxOK | wxICON_ERROR);
321 this->versiontc->SetLabel(crea::std2wx(this->package->GetVersion()));
324 void wxCDMPackageDescriptionPanel::OnBtnSetDescription(wxCommandEvent& event)
326 //get description from user
327 wxTextEntryDialog* descDlg = new wxTextEntryDialog(
329 wxT("Edit the package description."),
330 wxT("Change Package Description - creaDevManager"),
331 crea::std2wx(this->package->GetDescription()),
332 wxTE_MULTILINE | wxOK | wxCANCEL
335 if (descDlg->ShowModal() == wxID_OK)
337 std::string descriptionStr = crea::wx2std(descDlg->GetValue());
339 if(descriptionStr.size() > 0)
342 if(!this->package->SetDescription(descriptionStr, result))
343 wxMessageBox(crea::std2wx(*result),_T("Change Package Description - Error!"),wxOK | wxICON_ERROR);
345 this->descriptiontc->SetLabel(crea::std2wx(this->package->GetDescription()));
346 this->descriptiontc->GetParent()->GetSizer()->RecalcSizes();
350 void wxCDMPackageDescriptionPanel::OnLnkBlackBoxSelect(wxHyperlinkEvent& event)
352 modelCDMBlackBox* bb;
353 std::vector<modelCDMBlackBox*> bbs = this->package->GetSrc()->GetBlackBoxes();
354 for (int i = 0; i < (int)(bbs.size()); i++)
356 if(bbs[i]->GetName() == crea::wx2std(event.GetURL()))
363 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
364 newEvent->SetClientData(bb);
366 newEvent->SetString(wxT("blackbox"));
367 wxPostEvent(this->GetParent(), *newEvent);
369 wxCommandEvent* newEvent1 = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
370 newEvent1->SetClientData(bb->GetHeaderFile());
372 wxPostEvent(this->GetParent(), *newEvent1);
376 void wxCDMPackageDescriptionPanel::OnBtnCreateBlackBox(wxCommandEvent& event)
379 wxCDMNewBlackBoxDialog* dialog = new wxCDMNewBlackBoxDialog(this);
381 userResponse = dialog->ShowModal();
383 if(userResponse == wxID_FORWARD)
387 modelCDMIProjectTreeNode* blackBox = this->package->CreateBlackBox(
389 crea::wx2std(dialog->GetBlackBoxName()),
390 crea::wx2std(dialog->GetBlackBoxType()),
391 crea::wx2std(dialog->GetBlackBoxFormat()),
392 crea::wx2std(dialog->GetBlackBoxCategories()),
393 crea::wx2std(dialog->GetBlackBoxAuthor()),
394 crea::wx2std(dialog->GetBlackBoxAuthorEmail()),
395 crea::wx2std(dialog->GetBlackBoxDescription())
397 //check black box created
400 wxMessageBox(crea::std2wx(*result),_T("New Black Box - Error!"),wxOK | wxICON_ERROR);
403 wxMessageBox(crea::std2wx("Black box successfully created."),_T("New Black Box - Success!"),wxOK | wxICON_INFORMATION);
405 //refreshing tree and description
406 //send event instead of calling parent to avoid crashing
408 ((wxCDMMainFrame*)this->GetParent())->RefreshProject();
410 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
412 newEvent->SetClientData(blackBox);
413 newEvent->SetString(wxT("blackbox"));
414 newEvent->SetClientData(blackBox);
415 wxPostEvent(this->GetParent(), *newEvent);
420 wxCDMPackageDescriptionPanel::OnBtnConfigurePackage(wxCommandEvent& event)
422 wxCDMPackageConfigurationDialog* dialog = new wxCDMPackageConfigurationDialog(this,this->package);
424 userResponse = dialog->ShowModal();
427 void wxCDMPackageDescriptionPanel::OnBtnEditCMakeLists(wxCommandEvent& event)
430 if(!this->package->OpenCMakeListsFile(result))
431 wxMessageBox(crea::std2wx(*result),_T("Open CMakeLists File - Error!"),wxOK | wxICON_ERROR);
433 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
435 if(this->package->GetCMakeLists() != NULL)
437 newEvent->SetClientData(this->package->GetCMakeLists());
439 wxPostEvent(this->GetParent(), *newEvent);
445 void wxCDMPackageDescriptionPanel::OnBtnOpenFolder(wxCommandEvent& event)
448 if(!this->package->OpenInFileExplorer(result))
449 wxMessageBox(crea::std2wx(*result),_T("Open Folder - Error!"),wxOK | wxICON_ERROR);
452 void wxCDMPackageDescriptionPanel::OnMouseEnter(wxMouseEvent& event)
454 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
455 std::string BBName = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
457 modelCDMFile* bbHeader = NULL;
458 std::vector<modelCDMBlackBox*> boxes = this->package->GetSrc()->GetBlackBoxes();
459 for (int i = 0; i < (int)(boxes.size()); i++)
461 if(boxes[i]->GetName() == BBName)
463 bbHeader = boxes[i]->GetHeaderFile();
467 newEvent->SetClientData(bbHeader);
469 wxPostEvent(this->GetParent(), *newEvent);
473 void wxCDMPackageDescriptionPanel::OnMouseExit(wxMouseEvent& event)
475 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
476 std::string BBName = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
477 modelCDMFile* bbHeader = NULL;
478 std::vector<modelCDMBlackBox*> boxes = this->package->GetSrc()->GetBlackBoxes();
479 for (int i = 0; i < (int)(boxes.size()); i++)
481 if(boxes[i]->GetName() == BBName)
483 bbHeader = boxes[i]->GetHeaderFile();
487 newEvent->SetClientData(bbHeader);
489 wxPostEvent(this->GetParent(), *newEvent);
493 void wxCDMPackageDescriptionPanel::OnCMakeMouseEnter(wxMouseEvent& event)
495 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
497 if(this->package->GetCMakeLists() != NULL)
499 newEvent->SetClientData(this->package->GetCMakeLists());
501 wxPostEvent(this->GetParent(), *newEvent);
506 void wxCDMPackageDescriptionPanel::OnCMakeMouseExit(wxMouseEvent& event)
508 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
510 if(this->package->GetCMakeLists() != NULL)
512 newEvent->SetClientData(this->package->GetCMakeLists());
514 wxPostEvent(this->GetParent(), *newEvent);