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 this->package = package;
92 wxPanel::Create(parent, id, pos, size, style);
94 // this part makes the scrollbars show up
95 this->FitInside(); // ask the sizer about the needed size
96 this->SetScrollRate(5, 5);
100 void wxCDMPackageDescriptionPanel::CreateControls()
102 wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
105 wxBoxSizer *linksSizer = new wxBoxSizer(wxHORIZONTAL);
106 std::vector<modelCDMIProjectTreeNode*> parents = this->package->GetParents();
107 for (int i = 0; i < (int)(parents.size()); i++)
109 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);
110 returnLnk->SetWindowStyle(wxNO_BORDER);
111 returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
112 linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
113 linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0);
116 linksSizer->Add(new wxStaticText(this, wxID_ANY, crea::std2wx(this->package->GetName())), 0, wxALIGN_CENTER, 0);
118 sizer->Add(linksSizer, 0, wxALIGN_CENTER | wxALL, 5);
121 wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL);
124 headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(PkIcon64)),0, wxALIGN_CENTER, 0);
125 wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL);
127 textSizer->Add(new wxStaticText(this, -1, _("Package")),0, wxALIGN_LEFT, 0);
129 textSizer->Add(new wxStaticText(this, -1, crea::std2wx(this->package->GetNamePackage())),0, wxALIGN_LEFT, 0);
130 headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
132 sizer->Add(headerSizer, 0, wxALIGN_CENTER);
135 wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Properties"));
136 wxPanel* propertiesPanel = new wxPanel(this);
137 wxBoxSizer* propertiesPanelSizer = new wxBoxSizer(wxVERTICAL);
138 wxFlexGridSizer* propertiesGridSizer = new wxFlexGridSizer(4, 2, 9, 15);
140 wxStaticText *pAuthor = new wxStaticText(propertiesPanel, -1, wxT("Author"));
141 wxStaticText *pVersion = new wxStaticText(propertiesPanel, -1, wxT("Version"));
142 wxStaticText *pDescription = new wxStaticText(propertiesPanel, -1, wxT("Description"));
145 wxBoxSizer* pAuthorsz = new wxBoxSizer(wxHORIZONTAL);
146 this->authortc = new wxStaticText(propertiesPanel, wxID_ANY, crea::std2wx(this->package->GetAuthors()));
147 wxButton* pAuthorbt = new wxButton(propertiesPanel, ID_BUTTON_SET_AUTHOR, wxT("Change"));
148 pAuthorbt->SetToolTip(wxT("Update the author/s of the package."));
149 pAuthorsz->Add(this->authortc, 1, wxALIGN_CENTER_VERTICAL);
150 pAuthorsz->Add(pAuthorbt, 0, wxALIGN_CENTER | wxLEFT, 10);
153 wxBoxSizer* pVersionsz = new wxBoxSizer(wxHORIZONTAL);
154 this->versiontc = new wxStaticText(propertiesPanel, wxID_ANY, crea::std2wx(this->package->GetVersion()));
155 wxButton* pVersionbt = new wxButton(propertiesPanel, ID_BUTTON_SET_VERSION, wxT("Set"));
156 pVersionbt->SetToolTip(wxT("Update the version of the package."));
157 pVersionsz->Add(this->versiontc, 1, wxALIGN_CENTER_VERTICAL);
158 pVersionsz->Add(pVersionbt, 0, wxALIGN_CENTER | wxLEFT, 10);
161 wxBoxSizer* pDescriptionsz = new wxBoxSizer(wxHORIZONTAL);
162 this->descriptiontc = new wxStaticText(propertiesPanel, wxID_ANY, crea::std2wx(this->package->GetDescription()));
163 wxButton* pDescriptionbt = new wxButton(propertiesPanel, ID_BUTTON_SET_DESCRIPTION, wxT("Change"));
164 pDescriptionbt->SetToolTip(wxT("Update the description of the project."));
165 pDescriptionsz->Add(this->descriptiontc, 1, wxALIGN_CENTER_VERTICAL);
166 pDescriptionsz->Add(pDescriptionbt, 0, wxALIGN_CENTER | wxLEFT, 10);
168 propertiesGridSizer->Add(pAuthor, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
169 propertiesGridSizer->Add(pAuthorsz, 1, wxEXPAND);
170 propertiesGridSizer->Add(pVersion, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
171 propertiesGridSizer->Add(pVersionsz, 1, wxEXPAND);
172 propertiesGridSizer->Add(pDescription, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
173 propertiesGridSizer->Add(pDescriptionsz, 1, wxEXPAND);
175 propertiesGridSizer->AddGrowableCol(1,1);
177 propertiesPanelSizer -> Add(propertiesGridSizer, 1, wxEXPAND);
178 propertiesPanel->SetSizer(propertiesPanelSizer);
179 propertiesPanelSizer->Fit(propertiesPanel);
180 propertiesBox->Add(propertiesPanel, 0, wxEXPAND | wxALL, 5);
182 sizer->Add(propertiesBox, 0, wxEXPAND | wxALL, 10);
185 wxStaticBoxSizer* BBBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("A&vailable Black Boxes"));
186 BBBox->GetStaticBox()->SetToolTip(wxT("Select any of the available black boxes to see its details or modify them."));
187 wxPanel* BBPanel = new wxPanel(this);
188 wxBoxSizer* BBPanelSizer = new wxBoxSizer(wxVERTICAL);
191 std::vector<modelCDMBlackBox*> blackBoxes = this->package->GetSrc()->GetBlackBoxes();
192 for (int i = 0; i < (int)(blackBoxes.size()); i++)
195 if(blackBoxes[i] != NULL)
198 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);
199 pBBlk->SetWindowStyle(wxALIGN_LEFT | wxNO_BORDER);
200 std::string tt = "Author: " + blackBoxes[i]->GetAuthors() + "\nDescription: " + blackBoxes[i]->GetDescription() + "\nCategories: " + blackBoxes[i]->GetCategories();
201 pBBlk->SetToolTip(crea::std2wx(tt));
202 pBBlk->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnMouseEnter,NULL,this);
203 pBBlk->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnMouseExit,NULL,this);
204 BBPanelSizer -> Add(pBBlk, 0, wxEXPAND | wxALL, 5);
208 BBPanel->SetSizer(BBPanelSizer);
209 BBPanelSizer->Fit(BBPanel);
210 BBBox->Add(BBPanel, 1, wxEXPAND | wxALL, 5);
211 sizer -> Add(BBBox, 0, wxEXPAND | wxALL, 10);
214 wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("&Actions"));
215 wxPanel* actionsPanel = new wxPanel(this);
216 wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL);
218 wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(2, 2, 9, 15);
220 wxButton* createBBbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_BLACKBOX, _T("A. Create Black Box"));
221 createBBbt->SetToolTip(wxT("Create a new black box for the active project inside this package."));
222 actionsGridSizer->Add(createBBbt, 1, wxALL | wxEXPAND, 5);
223 wxButton* editConfbt = new wxButton(actionsPanel, ID_BUTTON_CHOOSE, _T("B. Configure Package"));
224 editConfbt->SetToolTip(wxT("Select the libraries your package is going to use. This procedure changes the package's CMakeLists file."));
225 actionsGridSizer->Add(editConfbt, 1, wxALL | wxEXPAND, 5);
226 wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File"));
227 editCMakebt->SetToolTip(wxT("Open the system default text editor to edit the package's CMakeLists.txt file."));
228 editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnCMakeMouseEnter,NULL,this);
229 editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnCMakeMouseExit,NULL,this);
230 actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5);
231 wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Package Folder"));
232 openFolderbt->SetToolTip(wxT("Open the package folder in the file explorer."));
233 actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5);
235 actionsGridSizer->AddGrowableCol(0,1);
236 actionsGridSizer->AddGrowableCol(1,1);
238 actionsPanelSizer->Add(actionsGridSizer, 1, wxEXPAND, 0);
239 actionsPanel->SetSizer(actionsPanelSizer);
240 actionsPanelSizer->Fit(actionsPanel);
241 actionsBox->Add(actionsPanel, 1, wxEXPAND);
242 sizer -> Add(actionsBox, 0, wxEXPAND | wxALL, 10);
246 sizer->SetSizeHints(this);
248 if (((wxCDMMainFrame*)this->GetParent())->isHelp())
250 wxCDMPackageHelpDialog* helpDialog = new wxCDMPackageHelpDialog(this->GetParent(), this->package, wxID_ANY);
251 helpDialog->Show(true);
255 void wxCDMPackageDescriptionPanel::OnBtnReturn(wxHyperlinkEvent& event)
257 std::vector<modelCDMIProjectTreeNode*> parents = this->package->GetParents();
258 std::string parentURL = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
259 //std::cout << parentURL << std::endl;
260 for (int i = 0; i < (int)(parents.size()); i++)
262 if (parents[i]->GetPath() == parentURL)
264 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
265 newEvent->SetClientData(parents[i]);
267 wxPostEvent(this->GetParent(), *newEvent);
272 void wxCDMPackageDescriptionPanel::OnBtnSetAuthor(wxCommandEvent& event)
274 //get author from user
275 wxTextEntryDialog* authDlg = new wxTextEntryDialog(
277 wxT("Enter the new authors name. Separate each author with a '/'."),
278 wxT("Change Package Author - creaDevManager"),
279 crea::std2wx(this->package->GetAuthors()),
280 wxTE_MULTILINE | wxOK | wxCANCEL
283 if (authDlg->ShowModal() == wxID_OK)
285 std::string authorsStr = crea::wx2std(authDlg->GetValue());
287 if(authorsStr.size() > 0)
290 if(!this->package->SetAuthors(authorsStr, result))
291 wxMessageBox(crea::std2wx(*result),_T("Change Package Author - Error!"),wxOK | wxICON_ERROR);
293 this->authortc->SetLabel(crea::std2wx(this->package->GetAuthors()));
294 this->authortc->GetParent()->GetSizer()->RecalcSizes();
299 void wxCDMPackageDescriptionPanel::OnBtnSetVersion(wxCommandEvent& event)
302 wxString versionWx = wxGetTextFromUser(
303 wxT("Enter the new version name"),
304 wxT("Change Package Version - creaDevManager"),
305 crea::std2wx(this->package->GetVersion())
308 std::vector<std::string> parts;
309 CDMUtilities::splitter::split(parts, crea::wx2std(versionWx), " .", CDMUtilities::splitter::no_empties);
310 if(parts.size() == 3)
313 if(!this->package->SetVersion(crea::wx2std(versionWx), result))
314 wxMessageBox(crea::std2wx(*result),_T("Change Package Version - Error!"),wxOK | wxICON_ERROR);
318 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);
320 this->versiontc->SetLabel(crea::std2wx(this->package->GetVersion()));
323 void wxCDMPackageDescriptionPanel::OnBtnSetDescription(wxCommandEvent& event)
325 //get description from user
326 wxTextEntryDialog* descDlg = new wxTextEntryDialog(
328 wxT("Edit the package description."),
329 wxT("Change Package Description - creaDevManager"),
330 crea::std2wx(this->package->GetDescription()),
331 wxTE_MULTILINE | wxOK | wxCANCEL
334 if (descDlg->ShowModal() == wxID_OK)
336 std::string descriptionStr = crea::wx2std(descDlg->GetValue());
338 if(descriptionStr.size() > 0)
341 if(!this->package->SetDescription(descriptionStr, result))
342 wxMessageBox(crea::std2wx(*result),_T("Change Package Description - Error!"),wxOK | wxICON_ERROR);
344 this->descriptiontc->SetLabel(crea::std2wx(this->package->GetDescription()));
345 this->descriptiontc->GetParent()->GetSizer()->RecalcSizes();
349 void wxCDMPackageDescriptionPanel::OnLnkBlackBoxSelect(wxHyperlinkEvent& event)
351 modelCDMBlackBox* bb;
352 std::vector<modelCDMBlackBox*> bbs = this->package->GetSrc()->GetBlackBoxes();
353 for (int i = 0; i < (int)(bbs.size()); i++)
355 if(bbs[i]->GetName() == crea::wx2std(event.GetURL()))
362 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
363 newEvent->SetClientData(bb);
365 newEvent->SetString(wxT("blackbox"));
366 wxPostEvent(this->GetParent(), *newEvent);
368 wxCommandEvent* newEvent1 = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
369 newEvent1->SetClientData(bb->GetHeaderFile());
371 wxPostEvent(this->GetParent(), *newEvent1);
375 void wxCDMPackageDescriptionPanel::OnBtnCreateBlackBox(wxCommandEvent& event)
378 wxCDMNewBlackBoxDialog* dialog = new wxCDMNewBlackBoxDialog(this);
380 userResponse = dialog->ShowModal();
382 if(userResponse == wxID_FORWARD)
386 modelCDMIProjectTreeNode* blackBox = this->package->CreateBlackBox(
388 crea::wx2std(dialog->GetBlackBoxName()),
389 crea::wx2std(dialog->GetBlackBoxType()),
390 crea::wx2std(dialog->GetBlackBoxFormat()),
391 crea::wx2std(dialog->GetBlackBoxCategories()),
392 crea::wx2std(dialog->GetBlackBoxAuthor()),
393 crea::wx2std(dialog->GetBlackBoxAuthorEmail()),
394 crea::wx2std(dialog->GetBlackBoxDescription())
396 //check black box created
399 wxMessageBox(crea::std2wx(*result),_T("New Black Box - Error!"),wxOK | wxICON_ERROR);
402 wxMessageBox(crea::std2wx("Black box successfully created."),_T("New Black Box - Success!"),wxOK | wxICON_INFORMATION);
404 //refreshing tree and description
405 //send event instead of calling parent to avoid crashing
407 ((wxCDMMainFrame*)this->GetParent())->RefreshProject();
409 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
411 newEvent->SetClientData(blackBox);
412 newEvent->SetString(wxT("blackbox"));
413 newEvent->SetClientData(blackBox);
414 wxPostEvent(this->GetParent(), *newEvent);
419 wxCDMPackageDescriptionPanel::OnBtnConfigurePackage(wxCommandEvent& event)
421 wxCDMPackageConfigurationDialog* dialog = new wxCDMPackageConfigurationDialog(this,this->package);
423 userResponse = dialog->ShowModal();
426 void wxCDMPackageDescriptionPanel::OnBtnEditCMakeLists(wxCommandEvent& event)
429 if(!this->package->OpenCMakeListsFile(result))
430 wxMessageBox(crea::std2wx(*result),_T("Open CMakeLists File - Error!"),wxOK | wxICON_ERROR);
432 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
434 if(this->package->GetCMakeLists() != NULL)
436 newEvent->SetClientData(this->package->GetCMakeLists());
438 wxPostEvent(this->GetParent(), *newEvent);
444 void wxCDMPackageDescriptionPanel::OnBtnOpenFolder(wxCommandEvent& event)
447 if(!this->package->OpenInFileExplorer(result))
448 wxMessageBox(crea::std2wx(*result),_T("Open Folder - Error!"),wxOK | wxICON_ERROR);
451 void wxCDMPackageDescriptionPanel::OnMouseEnter(wxMouseEvent& event)
453 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
454 std::string BBName = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
456 modelCDMFile* bbHeader = NULL;
457 std::vector<modelCDMBlackBox*> boxes = this->package->GetSrc()->GetBlackBoxes();
458 for (int i = 0; i < (int)(boxes.size()); i++)
460 if(boxes[i]->GetName() == BBName)
462 bbHeader = boxes[i]->GetHeaderFile();
466 newEvent->SetClientData(bbHeader);
468 wxPostEvent(this->GetParent(), *newEvent);
472 void wxCDMPackageDescriptionPanel::OnMouseExit(wxMouseEvent& event)
474 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
475 std::string BBName = crea::wx2std(((wxHyperlinkCtrl*)event.GetEventObject())->GetURL());
476 modelCDMFile* bbHeader = NULL;
477 std::vector<modelCDMBlackBox*> boxes = this->package->GetSrc()->GetBlackBoxes();
478 for (int i = 0; i < (int)(boxes.size()); i++)
480 if(boxes[i]->GetName() == BBName)
482 bbHeader = boxes[i]->GetHeaderFile();
486 newEvent->SetClientData(bbHeader);
488 wxPostEvent(this->GetParent(), *newEvent);
492 void wxCDMPackageDescriptionPanel::OnCMakeMouseEnter(wxMouseEvent& event)
494 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
496 if(this->package->GetCMakeLists() != NULL)
498 newEvent->SetClientData(this->package->GetCMakeLists());
500 wxPostEvent(this->GetParent(), *newEvent);
505 void wxCDMPackageDescriptionPanel::OnCMakeMouseExit(wxMouseEvent& event)
507 wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
509 if(this->package->GetCMakeLists() != NULL)
511 newEvent->SetClientData(this->package->GetCMakeLists());
513 wxPostEvent(this->GetParent(), *newEvent);