X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FwxCDMPackageDescriptionPanel.cpp;fp=lib%2FcreaDevManagerLib%2FwxCDMPackageDescriptionPanel.cpp;h=5ac469193a929be3c6b55f486a63caffd56a7680;hb=71c071fbb1e2af618f6caa489351b966e1a54b1a;hp=e2e452c0ae82a126cf657d17c2bc697067d89ebe;hpb=11ddb2799cdae68c7220b71e6836b97498b6ce62;p=crea.git diff --git a/lib/creaDevManagerLib/wxCDMPackageDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMPackageDescriptionPanel.cpp index e2e452c..5ac4691 100644 --- a/lib/creaDevManagerLib/wxCDMPackageDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMPackageDescriptionPanel.cpp @@ -40,6 +40,7 @@ #include "images/PkIcon64.xpm" #include "wxCDMNewBlackBoxDialog.h" +#include "wxCDMPackageConfigurationDialog.h" #include #include "CDMUtilities.h" @@ -57,6 +58,7 @@ EVT_HYPERLINK(ID_LINK_SELECT_BLACKBOX, wxCDMPackageDescriptionPanel::OnLnkBlackB EVT_BUTTON(ID_BUTTON_CREATE_BLACKBOX, wxCDMPackageDescriptionPanel::OnBtnCreateBlackBox) EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMPackageDescriptionPanel::OnBtnEditCMakeLists) EVT_BUTTON(ID_BUTTON_OPEN_FOLDER, wxCDMPackageDescriptionPanel::OnBtnOpenFolder) +EVT_BUTTON(ID_BUTTON_CHOOSE, wxCDMPackageDescriptionPanel::OnBtnConfigurePackage) END_EVENT_TABLE() wxCDMPackageDescriptionPanel::wxCDMPackageDescriptionPanel( @@ -87,6 +89,10 @@ bool wxCDMPackageDescriptionPanel::Create( ) { wxPanel::Create(parent, id, pos, size, style); + // this part makes the scrollbars show up + this->FitInside(); // ask the sizer about the needed size + this->SetScrollRate(5, 5); + this->package = package; CreateControls(); return TRUE; @@ -215,12 +221,15 @@ void wxCDMPackageDescriptionPanel::CreateControls() wxButton* createBBbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_BLACKBOX, _T("A. Create Black Box")); createBBbt->SetToolTip(wxT("Create a new black box for the active project inside this package.")); actionsGridSizer->Add(createBBbt, 1, wxALL | wxEXPAND, 5); - wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("B. Edit CMakeLists File")); + wxButton* editConfbt = new wxButton(actionsPanel, ID_BUTTON_CHOOSE, _T("B. Configure Package")); + editConfbt->SetToolTip(wxT("Select the libraries your package is going to use. This procedure changes the package's CMakeLists file.")); + actionsGridSizer->Add(editConfbt, 1, wxALL | wxEXPAND, 5); + wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File")); editCMakebt->SetToolTip(wxT("Open the system default text editor to edit the package's CMakeLists.txt file.")); editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnCMakeMouseEnter,NULL,this); editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnCMakeMouseExit,NULL,this); actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5); - wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("C. Open Package Folder")); + wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Package Folder")); openFolderbt->SetToolTip(wxT("Open the package folder in the file explorer.")); actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5); @@ -407,6 +416,14 @@ void wxCDMPackageDescriptionPanel::OnBtnCreateBlackBox(wxCommandEvent& event) } } +void +wxCDMPackageDescriptionPanel::OnBtnConfigurePackage(wxCommandEvent& event) +{ + wxCDMPackageConfigurationDialog* dialog = new wxCDMPackageConfigurationDialog(this,this->package); + long userResponse; + userResponse = dialog->ShowModal(); +} + void wxCDMPackageDescriptionPanel::OnBtnEditCMakeLists(wxCommandEvent& event) { std::string* result;