From 7a33a157d7372e4d507cd4a8ec0ae9a1f92d986e Mon Sep 17 00:00:00 2001 From: Daniel Gonzalez Date: Mon, 14 Jan 2013 12:21:50 +0100 Subject: [PATCH] Feature #1711 CreaDevManager application implementation -Deleted "Change library name" button (commented) -Deleted "Change application name" button (commented) -Changed Header layout -Black Box Properties fixed --- .../wxCDMAppliDescriptionPanel.cpp | 38 +++++++---- .../wxCDMApplicationDescriptionPanel.cpp | 51 ++++++++------ .../wxCDMBlackBoxDescriptionPanel.cpp | 49 +++++++------ .../wxCDMCMakeListsDescriptionPanel.cpp | 34 ++++++---- .../wxCDMFileDescriptionPanel.cpp | 33 ++++++--- .../wxCDMFolderDescriptionPanel.cpp | 39 +++++++---- .../wxCDMLibDescriptionPanel.cpp | 37 ++++++---- .../wxCDMLibraryDescriptionPanel.cpp | 53 +++++++++------ .../wxCDMMainDescriptionPanel.cpp | 29 ++++---- .../wxCDMPackageDescriptionPanel.cpp | 41 +++++++---- .../wxCDMPackageManagerPanel.cpp | 34 +++++++--- .../wxCDMProjectActionsPanel.cpp | 8 ++- .../wxCDMProjectDescriptionPanel.cpp | 68 ++++++++++++------- .../wxCDMProjectHelpDialog.h | 4 +- 14 files changed, 332 insertions(+), 186 deletions(-) diff --git a/lib/creaDevManagerLib/wxCDMAppliDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMAppliDescriptionPanel.cpp index 9fb749d..e99bc13 100644 --- a/lib/creaDevManagerLib/wxCDMAppliDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMAppliDescriptionPanel.cpp @@ -92,12 +92,18 @@ void wxCDMAppliDescriptionPanel::CreateControls() wxButton* returnbt = new wxButton(this, ID_BUTTON_PREV, wxT("Return to project")); returnbt->SetToolTip(wxT("Return to the active project description.")); sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5); - - //Title - sizer->Add(new wxStaticText(this, -1, _("Application Management")),0, wxALIGN_CENTER, 0); - - //Image - sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(ApIcon64)),0, wxALIGN_CENTER, 0); + //Header + wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL); + { + //Image + headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(ApIcon64)),0, wxALIGN_CENTER, 0); + wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL); + //Title + textSizer->Add(new wxStaticText(this, -1, _("Application Management")),0, wxALIGN_LEFT, 0); + + headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + } + sizer->Add(headerSizer, 0, wxALIGN_CENTER); //Applications wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("A&vailable Applications")); @@ -127,22 +133,28 @@ void wxCDMAppliDescriptionPanel::CreateControls() actionsBox->GetStaticBox()->SetToolTip(wxT("Create a new application or make any change to the appli's CMakeLists.txt file by selecting the desired action.")); wxPanel* actionsPanel = new wxPanel(this); wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL); + //actionsGrid Sizer + wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(2, 2, 9, 15); - wxButton* createApplicationbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_APPLICATION, _T("Create Application")); + wxButton* createApplicationbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_APPLICATION, _T("A. Create Application")); createApplicationbt->SetToolTip(wxT("Create a new application for this project.")); - actionsPanelSizer->Add(createApplicationbt, 0, wxALL, 5); - wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File")); + actionsGridSizer->Add(createApplicationbt, 1, wxALL | wxEXPAND, 5); + wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("B. Edit CMakeLists File")); editCMakebt->SetToolTip(wxT("Open the system default text editor to edit the CMakeLists.txt file.")); editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMAppliDescriptionPanel::OnCMakeMouseEnter,NULL,this); editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMAppliDescriptionPanel::OnCMakeMouseExit,NULL,this); - actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5); - wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Applications Folder")); + actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5); + wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("C. Open Applications Folder")); openFolderbt->SetToolTip(wxT("Open the appli folder in the file explorer.")); - actionsPanelSizer->Add(openFolderbt, 0, wxALL, 5); + actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5); + + actionsGridSizer->AddGrowableCol(0,1); + actionsGridSizer->AddGrowableCol(1,1); + actionsPanelSizer->Add(actionsGridSizer, 1, wxEXPAND, 0); actionsPanel->SetSizer(actionsPanelSizer); actionsPanelSizer->Fit(actionsPanel); - actionsBox->Add(actionsPanel, 0, wxALL, 5); + actionsBox->Add(actionsPanel, 0, wxALL | wxEXPAND, 5); sizer -> Add(actionsBox, 0, wxEXPAND | wxALL, 10); //Assign sizer diff --git a/lib/creaDevManagerLib/wxCDMApplicationDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMApplicationDescriptionPanel.cpp index 2180eb7..d791376 100644 --- a/lib/creaDevManagerLib/wxCDMApplicationDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMApplicationDescriptionPanel.cpp @@ -93,16 +93,21 @@ void wxCDMApplicationDescriptionPanel::CreateControls() returnbt->SetToolTip(wxT("Return to the active project description.")); sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5); - //Title - sizer->Add(new wxStaticText(this, -1, _("Application")),0, wxALIGN_CENTER, 0); - - //Image - sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(AIcon64)),0, wxALIGN_CENTER, 0); - - //Application Name - sizer->Add(new wxStaticText(this, -1, crea::std2wx(this->application->GetName())),0, wxALIGN_CENTER, 0); - - //Properties + //Header + wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL); + { + //Image + headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(AIcon64)),0, wxALIGN_CENTER, 0); + wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL); + //Title + textSizer->Add(new wxStaticText(this, -1, _("Application")),0, wxALIGN_LEFT, 0); + //Application Name + textSizer->Add(new wxStaticText(this, -1, crea::std2wx(this->application->GetName())),0, wxALIGN_LEFT, 0); + headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + } + sizer->Add(headerSizer, 0, wxALIGN_CENTER); + + /* //Properties wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Properties")); wxPanel* propertiesPanel = new wxPanel(this); wxBoxSizer* propertiesPanelSizer = new wxBoxSizer(wxVERTICAL); @@ -127,7 +132,7 @@ void wxCDMApplicationDescriptionPanel::CreateControls() propertiesPanelSizer->Fit(propertiesPanel); propertiesBox->Add(propertiesPanel, 0, wxEXPAND); sizer->Add(propertiesBox, 0, wxEXPAND | wxALL, 10); - + */ //Actions //actions StaticBoxSizer wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Actions")); @@ -136,28 +141,34 @@ void wxCDMApplicationDescriptionPanel::CreateControls() wxPanel* actionsPanel = new wxPanel(this); //actions Sizer wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL); + //actionsGrid Sizer + wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(2, 2, 9, 15); - wxButton* createClassbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_CLASS, _T("Create Class")); + wxButton* createClassbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_CLASS, _T("A. Create Class")); createClassbt->SetToolTip(wxT("Create a new Class (.h and .cxx files).")); - wxButton* createFolderbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_FOLDER, _T("Create Folder")); + wxButton* createFolderbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_FOLDER, _T("Create Folder (Optional)")); createFolderbt->SetToolTip(wxT("Create a new Folder inside the application folder.")); - wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File")); + wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("B. Edit CMakeLists File")); editCMakebt->SetToolTip(wxT("Edit the CMakeLists.txt file inside this application.")); editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMApplicationDescriptionPanel::OnCMakeMouseEnter,NULL,this); editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMApplicationDescriptionPanel::OnCMakeMouseExit,NULL,this); - wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Application Folder")); + wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("C. Open Application Folder")); openFolderbt->SetToolTip(wxT("Open the application folder in the file explorer.")); - actionsPanelSizer->Add(createClassbt, 0, wxALL, 5); - actionsPanelSizer->Add(createFolderbt, 0, wxALL, 5); - actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5); - actionsPanelSizer->Add(openFolderbt, 0, wxALL, 5); + actionsGridSizer->Add(createClassbt, 1, wxALL | wxEXPAND, 5); + actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5); + actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5); + actionsGridSizer->Add(createFolderbt, 1, wxALL | wxEXPAND, 5); //SetPanel sizer and box + actionsGridSizer->AddGrowableCol(0,1); + actionsGridSizer->AddGrowableCol(1,1); + + actionsPanelSizer->Add(actionsGridSizer, 1, wxEXPAND, 0); actionsPanel->SetSizer(actionsPanelSizer); actionsPanelSizer->Fit(actionsPanel); - actionsBox->Add(actionsPanel, 0, wxALL, 5); + actionsBox->Add(actionsPanel, 1, wxALL | wxEXPAND, 5); sizer->Add(actionsBox, 0, wxEXPAND | wxALL, 10); //Assign sizer diff --git a/lib/creaDevManagerLib/wxCDMBlackBoxDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMBlackBoxDescriptionPanel.cpp index eb0ed5a..065eb8f 100644 --- a/lib/creaDevManagerLib/wxCDMBlackBoxDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMBlackBoxDescriptionPanel.cpp @@ -93,14 +93,19 @@ void wxCDMBlackBoxDescriptionPanel::CreateControls() returnbt->SetToolTip(wxT("Return to the active project description.")); sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5); - //Welcome - sizer->Add(new wxStaticText(this, -1, _("Black Box")),0, wxALIGN_CENTER, 0); - - //Image - sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(BBIcon64)),0, wxALIGN_CENTER, 0); - - //BlackBox Name - sizer->Add(new wxStaticText(this, -1, crea::std2wx(this->blackBox->GetNameBlackBox())),0, wxALIGN_CENTER, 0); + //Header + wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL); + { + //Image + headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(BBIcon64)),0, wxALIGN_CENTER, 0); + wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL); + //Title + textSizer->Add(new wxStaticText(this, -1, _("Black Box")),0, wxALIGN_LEFT, 0); + //Black Box Name + textSizer->Add(new wxStaticText(this, -1, crea::std2wx(this->blackBox->GetNameBlackBox())),0, wxALIGN_LEFT, 0); + headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + } + sizer->Add(headerSizer, 0, wxALIGN_CENTER); //BlackBox Properties wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Properties")); @@ -117,7 +122,7 @@ void wxCDMBlackBoxDescriptionPanel::CreateControls() this->authortc = new wxStaticText(propertiesPanel, wxID_ANY, crea::std2wx(this->blackBox->GetAuthors())); wxButton* pAuthorbt = new wxButton(propertiesPanel, ID_BUTTON_SET_AUTHOR, wxT("Change")); pAuthorbt->SetToolTip(wxT("Update the author/s of the package.")); - pAuthorsz->Add(this->authortc, 0, wxALIGN_CENTER_VERTICAL, 0); + pAuthorsz->Add(this->authortc, 1, wxALIGN_CENTER_VERTICAL, 0); pAuthorsz->Add(pAuthorbt, 0, wxALIGN_CENTER | wxLEFT, 10); // description @@ -125,7 +130,7 @@ void wxCDMBlackBoxDescriptionPanel::CreateControls() this->descriptiontc = new wxStaticText(propertiesPanel, wxID_ANY, crea::std2wx(this->blackBox->GetDescription())); wxButton* pDescriptionbt = new wxButton(propertiesPanel, ID_BUTTON_SET_DESCRIPTION, wxT("Change")); pDescriptionbt->SetToolTip(wxT("Update the description of the project.")); - pDescriptionsz->Add(this->descriptiontc, 0, wxALIGN_CENTER_VERTICAL, 0); + pDescriptionsz->Add(this->descriptiontc, 1, wxALIGN_CENTER_VERTICAL, 0); pDescriptionsz->Add(pDescriptionbt, 0, wxALIGN_CENTER | wxLEFT, 10); // categories @@ -133,7 +138,7 @@ void wxCDMBlackBoxDescriptionPanel::CreateControls() this->categoriestc = new wxStaticText(propertiesPanel, wxID_ANY, crea::std2wx(this->blackBox->GetCategories())); wxButton* pCategoriesbt = new wxButton(propertiesPanel, ID_BUTTON_SET_CATEGORY, wxT("Change")); pCategoriesbt->SetToolTip(wxT("Update the categories of the project.")); - pCategoriessz->Add(this->categoriestc, 0, wxALIGN_CENTER_VERTICAL, 0); + pCategoriessz->Add(this->categoriestc, 1, wxALIGN_CENTER_VERTICAL, 0); pCategoriessz->Add(pCategoriesbt, 0, wxALIGN_CENTER | wxLEFT, 10); propertiesGridSizer->Add(pAuthor, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); @@ -157,20 +162,26 @@ void wxCDMBlackBoxDescriptionPanel::CreateControls() wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("&Actions")); wxPanel* actionsPanel = new wxPanel(this); wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL); + //actionsGrid Sizer + wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(2, 2, 9, 15); - wxButton* openCxxbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_CXX, _T("Open .cxx")); - openCxxbt->SetToolTip(wxT("Open the .cxx file in the default text editor.")); - actionsPanelSizer->Add(openCxxbt, 0, wxALL, 5); - wxButton* openHxxbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_HXX, _T("Open .h")); + wxButton* openHxxbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_HXX, _T("A. Open .h")); openHxxbt->SetToolTip(wxT("Open the .h file in the default text editor.")); - actionsPanelSizer->Add(openHxxbt, 0, wxALL, 5); - wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Source Folder")); + actionsGridSizer->Add(openHxxbt, 1, wxALL | wxEXPAND, 5); + wxButton* openCxxbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_CXX, _T("B. Open .cxx")); + openCxxbt->SetToolTip(wxT("Open the .cxx file in the default text editor.")); + actionsGridSizer->Add(openCxxbt, 1, wxALL | wxEXPAND, 5); + wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("C. Open Source Folder")); openFolderbt->SetToolTip(wxT("Open the source folder in the file explorer.")); - actionsPanelSizer->Add(openFolderbt, 0, wxALL, 5); + actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5); + + actionsGridSizer->AddGrowableCol(0,1); + actionsGridSizer->AddGrowableCol(1,1); + actionsPanelSizer->Add(actionsGridSizer, 1, wxEXPAND, 0); actionsPanel->SetSizer(actionsPanelSizer); actionsPanelSizer->Fit(actionsPanel); - actionsBox->Add(actionsPanel, 0, wxEXPAND); + actionsBox->Add(actionsPanel, 1, wxEXPAND); sizer -> Add(actionsBox, 0, wxEXPAND | wxALL, 10); //Assign sizer diff --git a/lib/creaDevManagerLib/wxCDMCMakeListsDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMCMakeListsDescriptionPanel.cpp index ac7172d..565a861 100644 --- a/lib/creaDevManagerLib/wxCDMCMakeListsDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMCMakeListsDescriptionPanel.cpp @@ -86,31 +86,41 @@ void wxCDMCMakeListsDescriptionPanel::CreateControls() wxButton* returnbt = new wxButton(this, ID_BUTTON_PREV, wxT("Return to project")); returnbt->SetToolTip(wxT("Return to the active project description.")); sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5); - - //Title - sizer->Add(new wxStaticText(this, -1, _("CMakeLists.txt File")),0, wxALIGN_CENTER, 0); - - //Image - sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(CMIcon64)),0, wxALIGN_CENTER, 0); - - //File Name - sizer->Add(new wxStaticText(this, -1, crea::std2wx("CMake Configuration File")), 0, wxALIGN_CENTER, 0); + //Header + wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL); + { + //Image + headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(CMIcon64)),0, wxALIGN_CENTER, 0); + wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL); + //Title + textSizer->Add(new wxStaticText(this, -1, _("CMake Configuration File")),0, wxALIGN_LEFT, 0); + //File Name + textSizer->Add(new wxStaticText(this, -1, crea::std2wx("CMakeLists.txt")),0, wxALIGN_LEFT, 0); + headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + } + sizer->Add(headerSizer, 0, wxALIGN_CENTER); //Actions wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("&Actions")); wxPanel* actionsPanel = new wxPanel(this); wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL); + //actionsGrid Sizer + wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(1, 2, 9, 15); wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Open File")); editCMakebt->SetToolTip(wxT("Open the CMakeLists file in the default text editor.")); - actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5); + actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5); wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Containing Folder")); openFolderbt->SetToolTip(wxT("Open the folder where the CMakeLists file is located in the file explorer.")); - actionsPanelSizer->Add(openFolderbt, 0, wxALL, 5); + actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5); + + actionsGridSizer->AddGrowableCol(0,1); + actionsGridSizer->AddGrowableCol(1,1); + actionsPanelSizer->Add(actionsGridSizer, 1, wxEXPAND, 0); actionsPanel->SetSizer(actionsPanelSizer); actionsPanelSizer->Fit(actionsPanel); - actionsBox->Add(actionsPanel, 0, wxEXPAND); + actionsBox->Add(actionsPanel, 1, wxEXPAND); sizer -> Add(actionsBox, 0, wxEXPAND | wxALL, 10); //Assign sizer diff --git a/lib/creaDevManagerLib/wxCDMFileDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMFileDescriptionPanel.cpp index 001bb2a..efbc396 100644 --- a/lib/creaDevManagerLib/wxCDMFileDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMFileDescriptionPanel.cpp @@ -89,14 +89,19 @@ void wxCDMFileDescriptionPanel::CreateControls() returnbt->SetToolTip(wxT("Return to the active project description.")); sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5); - //Title - sizer->Add(new wxStaticText(this, -1, _("File")),0, wxALIGN_CENTER, 0); - - //Image - sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(FlIcon64)),0, wxALIGN_CENTER, 0); - - //File Name - sizer->Add(new wxStaticText(this, -1, crea::std2wx(this->file->GetName())),0, wxALIGN_CENTER, 0); + //Header + wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL); + { + //Image + headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(FlIcon64)),0, wxALIGN_CENTER, 0); + wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL); + //Title + textSizer->Add(new wxStaticText(this, -1, _("File")),0, wxALIGN_LEFT, 0); + //File Name + textSizer->Add(new wxStaticText(this, -1, crea::std2wx(this->file->GetName())),0, wxALIGN_LEFT, 0); + headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + } + sizer->Add(headerSizer, 0, wxALIGN_CENTER); //File Properties wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Properties")); @@ -134,17 +139,23 @@ void wxCDMFileDescriptionPanel::CreateControls() wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("&Actions")); wxPanel* actionsPanel = new wxPanel(this); wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL); + //actionsGrid Sizer + wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(1, 2, 9, 15); wxButton* openCommandbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_COMMAND, _T("Open with Command")); openCommandbt->SetToolTip(wxT("Open this file executing a command in a terminal/command line.")); - actionsPanelSizer->Add(openCommandbt, 0, wxALL, 5); + actionsGridSizer->Add(openCommandbt, 1, wxALL | wxEXPAND, 5); wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Containing Folder")); openFolderbt->SetToolTip(wxT("Open the folder where this file is located in the file explorer.")); - actionsPanelSizer->Add(openFolderbt, 0, wxALL, 5); + actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5); + + actionsGridSizer->AddGrowableCol(0,1); + actionsGridSizer->AddGrowableCol(1,1); + actionsPanelSizer->Add(actionsGridSizer, 1, wxEXPAND, 0); actionsPanel->SetSizer(actionsPanelSizer); actionsPanelSizer->Fit(actionsPanel); - actionsBox->Add(actionsPanel, 0, wxEXPAND); + actionsBox->Add(actionsPanel, 1, wxEXPAND); sizer -> Add(actionsBox, 0, wxEXPAND | wxALL, 10); //Assign sizer diff --git a/lib/creaDevManagerLib/wxCDMFolderDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMFolderDescriptionPanel.cpp index 9db89c4..d3ca77b 100644 --- a/lib/creaDevManagerLib/wxCDMFolderDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMFolderDescriptionPanel.cpp @@ -89,23 +89,30 @@ void wxCDMFolderDescriptionPanel::CreateControls() returnbt->SetToolTip(wxT("Return to the active project description.")); sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5); - //Title - sizer->Add(new wxStaticText(this, -1, _("Folder")),0, wxALIGN_CENTER, 0); - - //Image - sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(FdIcon64)),0, wxALIGN_CENTER, 0); - - //Folder Name - sizer->Add(new wxStaticText(this, -1, crea::std2wx(this->folder->GetName())),0, wxALIGN_CENTER, 0); + //Header + wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL); + { + //Image + headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(FdIcon64)),0, wxALIGN_CENTER, 0); + wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL); + //Title + textSizer->Add(new wxStaticText(this, -1, _("Folder")),0, wxALIGN_LEFT, 0); + //Folder Name + textSizer->Add(new wxStaticText(this, -1, crea::std2wx(this->folder->GetName())),0, wxALIGN_LEFT, 0); + headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + } + sizer->Add(headerSizer, 0, wxALIGN_CENTER); //Actions wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("&Actions")); wxPanel* actionsPanel = new wxPanel(this); wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL); + //actionsGrid Sizer + wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(2, 2, 9, 15); wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open in File Explorer")); openFolderbt->SetToolTip(wxT("Open this folder in the file explorer.")); - actionsPanelSizer->Add(openFolderbt, 0, wxALL, 5); + actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5); if(this->folder->HasCMakeLists()) { @@ -113,16 +120,24 @@ void wxCDMFolderDescriptionPanel::CreateControls() editCMakebt->SetToolTip(wxT("Open the CMakeLists.txt file in this folder with the default text editor.")); editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMFolderDescriptionPanel::OnCMakeMouseEnter,NULL,this); editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMFolderDescriptionPanel::OnCMakeMouseExit,NULL,this); - actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5); + actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5); } + wxButton* createClassbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_CLASS, _T("Create Class")); + createClassbt->SetToolTip(wxT("Create a new class (.h and .cpp) inside this folder.")); + actionsGridSizer->Add(createClassbt, 1, wxALL | wxEXPAND, 5); + wxButton* createFolderbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_FOLDER, _T("Create Folder")); createFolderbt->SetToolTip(wxT("Create a new folder inside this folder.")); - actionsPanelSizer->Add(createFolderbt, 0, wxALL, 5); + actionsGridSizer->Add(createFolderbt, 1, wxALL | wxEXPAND, 5); + + actionsGridSizer->AddGrowableCol(0,1); + actionsGridSizer->AddGrowableCol(1,1); + actionsPanelSizer->Add(actionsGridSizer, 1, wxEXPAND, 0); actionsPanel->SetSizer(actionsPanelSizer); actionsPanelSizer->Fit(actionsPanel); - actionsBox->Add(actionsPanel, 0, wxEXPAND); + actionsBox->Add(actionsPanel, 1, wxEXPAND); sizer -> Add(actionsBox, 0, wxEXPAND | wxALL, 10); //Assign sizer diff --git a/lib/creaDevManagerLib/wxCDMLibDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMLibDescriptionPanel.cpp index 4edb01f..7928739 100644 --- a/lib/creaDevManagerLib/wxCDMLibDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMLibDescriptionPanel.cpp @@ -90,12 +90,17 @@ void wxCDMLibDescriptionPanel::CreateControls() wxButton* returnbt = new wxButton(this, ID_BUTTON_PREV, wxT("Return to project")); returnbt->SetToolTip(wxT("Return to the active project description.")); sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5); - - //Title - sizer->Add(new wxStaticText(this, -1, _("Library Management")),0, wxALIGN_CENTER, 0); - - //Image - sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(LbIcon64)),0, wxALIGN_CENTER, 0); + //Header + wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL); + { + //Image + headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(LbIcon64)),0, wxALIGN_CENTER, 0); + wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL); + //Title + textSizer->Add(new wxStaticText(this, -1, _("Library Management")),0, wxALIGN_LEFT, 0); + headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + } + sizer->Add(headerSizer, 0, wxALIGN_CENTER); //Libraries wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("A&vailable Libraries")); @@ -126,17 +131,25 @@ void wxCDMLibDescriptionPanel::CreateControls() wxPanel* actionsPanel = new wxPanel(this); wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL); - wxButton* createLibrarybt = new wxButton(actionsPanel, ID_BUTTON_CREATE_LIBRARY, _T("Create Library")); + //actionsGrid Sizer + wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(2, 2, 9, 15); + + wxButton* createLibrarybt = new wxButton(actionsPanel, ID_BUTTON_CREATE_LIBRARY, _T("A. Create Library")); createLibrarybt->SetToolTip(wxT("Create a new library for this project.")); - actionsPanelSizer->Add(createLibrarybt, 0, wxALL, 5); - wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File")); + actionsGridSizer->Add(createLibrarybt, 1, wxALL | wxEXPAND, 5); + wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("B. Edit CMakeLists File")); editCMakebt->SetToolTip(wxT("Open the system default text editor to edit the Lib's CMakeLists.txt file.")); editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMLibDescriptionPanel::OnCMakeMouseEnter,NULL,this); editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMLibDescriptionPanel::OnCMakeMouseExit,NULL,this); - actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5); - wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Libraries Folder")); + actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5); + wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("C. Open Libraries Folder")); openFolderbt->SetToolTip(wxT("Open the lib folder in the file explorer.")); - actionsPanelSizer->Add(openFolderbt, 0, wxALL, 5); + actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5); + + actionsGridSizer->AddGrowableCol(0,1); + actionsGridSizer->AddGrowableCol(1,1); + + actionsPanelSizer->Add(actionsGridSizer, 1, wxEXPAND, 0); actionsPanel->SetSizer(actionsPanelSizer); actionsPanelSizer->Fit(actionsPanel); diff --git a/lib/creaDevManagerLib/wxCDMLibraryDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMLibraryDescriptionPanel.cpp index fd207a5..62b5b93 100644 --- a/lib/creaDevManagerLib/wxCDMLibraryDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMLibraryDescriptionPanel.cpp @@ -92,17 +92,21 @@ void wxCDMLibraryDescriptionPanel::CreateControls() wxButton* returnbt = new wxButton(this, ID_BUTTON_PREV, wxT("Return to project")); returnbt->SetToolTip(wxT("Return to the active project description.")); sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5); - - //Title - sizer->Add(new wxStaticText(this, -1, _("Library")),0, wxALIGN_CENTER, 0); - - //Image - sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(LIcon64)),0, wxALIGN_CENTER, 0); - - //Application Name - sizer->Add(new wxStaticText(this, -1, crea::std2wx(this->library->GetName())),0, wxALIGN_CENTER, 0); - - //Properties + //Header + wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL); + { + //Image + headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(LIcon64)),0, wxALIGN_CENTER, 0); + wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL); + //Title + textSizer->Add(new wxStaticText(this, -1, _("Library")),0, wxALIGN_LEFT, 0); + //Library Name + textSizer->Add(new wxStaticText(this, -1, crea::std2wx(this->library->GetName())),0, wxALIGN_LEFT, 0); + headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + } + sizer->Add(headerSizer, 0, wxALIGN_CENTER); + + /*//Properties wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Properties")); wxPanel* propertiesPanel = new wxPanel(this); wxBoxSizer* propertiesPanelSizer = new wxBoxSizer(wxVERTICAL); @@ -127,27 +131,34 @@ void wxCDMLibraryDescriptionPanel::CreateControls() propertiesPanelSizer->Fit(propertiesPanel); propertiesBox->Add(propertiesPanel, 0, wxEXPAND); sizer->Add(propertiesBox, 0, wxEXPAND | wxALL, 10); - + */ //Actions wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("&Actions")); wxPanel* actionsPanel = new wxPanel(this); wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL); - wxButton* createClassbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_CLASS, _T("Create Class")); + //actionsGrid Sizer + wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(2, 2, 9, 15); + + wxButton* createClassbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_CLASS, _T("A. Create Class")); createClassbt->SetToolTip(wxT("Create a new class for this library.")); - actionsPanelSizer->Add(createClassbt, 0, wxALL, 5); - wxButton* createFolderbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_FOLDER, _T("Create Folder")); - createFolderbt->SetToolTip(wxT("Create a new folder for this library.")); - actionsPanelSizer->Add(createFolderbt, 0, wxALL, 5); - wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File")); + actionsGridSizer->Add(createClassbt, 1, wxALL | wxEXPAND, 5); + wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("B. Edit CMakeLists File")); editCMakebt->SetToolTip(wxT("Edit the CMakeLists.txt of this library in the default text editor.")); editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMLibraryDescriptionPanel::OnCMakeMouseEnter,NULL,this); editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMLibraryDescriptionPanel::OnCMakeMouseExit,NULL,this); - actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5); - wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Library Folder")); + actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5); + wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("C. Open Library Folder")); openFolderbt->SetToolTip(wxT("Open the library folder in the file explorer.")); - actionsPanelSizer->Add(openFolderbt, 0, wxALL, 5); + actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5); + wxButton* createFolderbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_FOLDER, _T("Create Folder (Optional)")); + createFolderbt->SetToolTip(wxT("Create a new folder for this library.")); + actionsGridSizer->Add(createFolderbt, 1, wxALL | wxEXPAND, 5); + + actionsGridSizer->AddGrowableCol(0,1); + actionsGridSizer->AddGrowableCol(1,1); + actionsPanelSizer->Add(actionsGridSizer, 1, wxEXPAND, 0); actionsPanel->SetSizer(actionsPanelSizer); actionsPanelSizer->Fit(actionsPanel); actionsBox->Add(actionsPanel, 1, wxEXPAND); diff --git a/lib/creaDevManagerLib/wxCDMMainDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMMainDescriptionPanel.cpp index 73cda49..d7f10ae 100644 --- a/lib/creaDevManagerLib/wxCDMMainDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMMainDescriptionPanel.cpp @@ -23,7 +23,7 @@ # The fact that you are presently reading this means that you have had # knowledge of the CeCILL-B license and that you accept its terms. # ------------------------------------------------------------------------ -*/ + */ /* @@ -82,14 +82,19 @@ void wxCDMMainDescriptionPanel::CreateControls() { wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL); - //Welcome - sizer->Add(new wxStaticText(this, -1, _("Welcome")),0, wxALIGN_CENTER, 0); - - //Image - sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(CIcon64)),0, wxALIGN_CENTER, 0); - - //Crea Development Manager - sizer->Add(new wxStaticText(this, -1, _("Crea Development Manager")),0, wxALIGN_CENTER, 0); + //Header + wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL); + { + //Image + headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(CIcon64)),0, wxALIGN_CENTER, 0); + wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL); + //Title + textSizer->Add(new wxStaticText(this, -1, _("Welcome")),0, wxALIGN_LEFT, 0); + //Application Name + textSizer->Add(new wxStaticText(this, -1, crea::std2wx("Crea Development Manager")),0, wxALIGN_LEFT, 0); + headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + } + sizer->Add(headerSizer, 0, wxALIGN_CENTER | wxUP, 10); //Actions wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Actions")); @@ -98,10 +103,10 @@ void wxCDMMainDescriptionPanel::CreateControls() wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL); wxButton* newProjectbt = new wxButton(actionsPanel, ID_BUTTON_NEWPROJECT, _T("New Project")); - newProjectbt->SetToolTip(wxT("Create a new crea project")); + newProjectbt->SetToolTip(wxT("Create a new crea project.")); actionsPanelSizer->Add(newProjectbt, 0, wxRIGHT | wxLEFT, 20); - wxButton* openProjectbt = new wxButton(actionsPanel, ID_BUTTON_OPENPROJECT, _T("Open Project")); - openProjectbt->SetToolTip(wxT("Open an existing crea project")); + wxButton* openProjectbt = new wxButton(actionsPanel, ID_BUTTON_OPENPROJECT, _T("Open Project (source/binaries)")); + openProjectbt->SetToolTip(wxT("Open an existing crea project from its binaries or its sources.")); actionsPanelSizer->Add(openProjectbt, 0, wxRIGHT | wxLEFT, 20); actionsPanel->SetSizer(actionsPanelSizer); diff --git a/lib/creaDevManagerLib/wxCDMPackageDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMPackageDescriptionPanel.cpp index e6f70b2..e332a56 100644 --- a/lib/creaDevManagerLib/wxCDMPackageDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMPackageDescriptionPanel.cpp @@ -101,14 +101,19 @@ void wxCDMPackageDescriptionPanel::CreateControls() returnbt->SetToolTip(wxT("Return to the active project description.")); sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5); - //Title - sizer->Add(new wxStaticText(this, -1, _("Package")),0, wxALIGN_CENTER, 0); - - //Image - sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(PkIcon64)),0, wxALIGN_CENTER, 0); - - //Package Name - sizer->Add(new wxStaticText(this, -1, crea::std2wx(this->package->GetNamePackage())),0, wxALIGN_CENTER, 0); + //Header + wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL); + { + //Image + headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(PkIcon64)),0, wxALIGN_CENTER, 0); + wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL); + //Title + textSizer->Add(new wxStaticText(this, -1, _("Package")),0, wxALIGN_LEFT, 0); + //Package Name + textSizer->Add(new wxStaticText(this, -1, crea::std2wx(this->package->GetNamePackage())),0, wxALIGN_LEFT, 0); + headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + } + sizer->Add(headerSizer, 0, wxALIGN_CENTER); //Package Properties wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Properties")); @@ -193,22 +198,28 @@ void wxCDMPackageDescriptionPanel::CreateControls() wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("&Actions")); wxPanel* actionsPanel = new wxPanel(this); wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL); + //actionsGrid Sizer + wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(2, 2, 9, 15); - wxButton* createBBbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_BLACKBOX, _T("Create Black Box")); + 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.")); - actionsPanelSizer->Add(createBBbt, 0, wxALL, 5); - wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File")); + actionsGridSizer->Add(createBBbt, 1, wxALL | wxEXPAND, 5); + wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("B. 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); - actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5); - wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Package Folder")); + actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5); + wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("C. Open Package Folder")); openFolderbt->SetToolTip(wxT("Open the package folder in the file explorer.")); - actionsPanelSizer->Add(openFolderbt, 0, wxALL, 5); + actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5); + + actionsGridSizer->AddGrowableCol(0,1); + actionsGridSizer->AddGrowableCol(1,1); + actionsPanelSizer->Add(actionsGridSizer, 1, wxEXPAND, 0); actionsPanel->SetSizer(actionsPanelSizer); actionsPanelSizer->Fit(actionsPanel); - actionsBox->Add(actionsPanel, 0, wxEXPAND); + actionsBox->Add(actionsPanel, 1, wxEXPAND); sizer -> Add(actionsBox, 0, wxEXPAND | wxALL, 10); //Assign sizer diff --git a/lib/creaDevManagerLib/wxCDMPackageManagerPanel.cpp b/lib/creaDevManagerLib/wxCDMPackageManagerPanel.cpp index d114727..3cd317b 100644 --- a/lib/creaDevManagerLib/wxCDMPackageManagerPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMPackageManagerPanel.cpp @@ -93,11 +93,18 @@ void wxCDMPackageManagerPanel::CreateControls() returnbt->SetToolTip(wxT("Return to the active project description.")); sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5); - //Title - sizer->Add(new wxStaticText(this, -1, _("Package Management")),0, wxALIGN_CENTER, 0); - - //Image - sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(PkIcon64)),0, wxALIGN_CENTER, 0); + //Header + wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL); + { + //Image + headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(PkIcon64)),0, wxALIGN_CENTER, 0); + wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL); + //Title + textSizer->Add(new wxStaticText(this, -1, _("Package Management")),0, wxALIGN_LEFT, 0); + + headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + } + sizer->Add(headerSizer, 0, wxALIGN_CENTER); //Packages wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("A&vailable Packages")); @@ -127,18 +134,25 @@ void wxCDMPackageManagerPanel::CreateControls() wxPanel* actionsPanel = new wxPanel(this); wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL); - wxButton* createPkgbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_PACKAGE, _T("Create Package")); + //actionsGrid Sizer + wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(1, 2, 9, 15); + + wxButton* createPkgbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_PACKAGE, _T("A. Create Package")); createPkgbt->SetToolTip(wxT("Create a new package for this project.")); - actionsPanelSizer->Add(createPkgbt, 0, wxALL, 5); - wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File")); + actionsGridSizer->Add(createPkgbt, 1, wxALL | wxEXPAND, 5); + wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("B. Edit CMakeLists File")); editCMakebt->SetToolTip(wxT("Edit the CMakeLists.txt file of this project.")); editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageManagerPanel::OnCMakeMouseEnter,NULL,this); editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageManagerPanel::OnCMakeMouseExit,NULL,this); - actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5); + actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5); + + actionsGridSizer->AddGrowableCol(0,1); + actionsGridSizer->AddGrowableCol(1,1); + actionsPanelSizer->Add(actionsGridSizer, 1, wxEXPAND, 0); actionsPanel->SetSizer(actionsPanelSizer); actionsPanelSizer->Fit(actionsPanel); - actionsBox->Add(actionsPanel, 0, wxEXPAND); + actionsBox->Add(actionsPanel, 1, wxEXPAND); sizer -> Add(actionsBox, 0, wxEXPAND | wxALL, 10); //Assign sizer diff --git a/lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp b/lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp index 5c92a79..5b5cc09 100755 --- a/lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp @@ -33,6 +33,8 @@ #include "wxCDMProjectActionsPanel.h" +#include + #include "creaDevManagerIds.h" BEGIN_EVENT_TABLE(wxCDMProjectActionsPanel, wxPanel) @@ -79,7 +81,7 @@ bool wxCDMProjectActionsPanel::Create( void wxCDMProjectActionsPanel::CreateControls() { - wxButton* configurebt = new wxButton(this, ID_BUTTON_CONFIGURE_BUILD, _T("1. Configure Project")); + wxButton* configurebt = new wxButton(this, ID_BUTTON_CONFIGURE_BUILD, _T("1. Configure Project (CMake)")); configurebt->SetToolTip(wxT("This is the first step in order to execute the project. Make sure you have selected the desired Build location.")); wxButton* compilebt = new wxButton(this, ID_BUTTON_BUILD_PROJECT, _T("2. Compile Project")); compilebt->SetToolTip(wxT("This step should be done after configuring the project. This will create the executables.")); @@ -106,11 +108,15 @@ void wxCDMProjectActionsPanel::OnBtnConfigureBuild(wxCommandEvent& event) void wxCDMProjectActionsPanel::OnBtnBuildProject(wxCommandEvent& event) { std::string* result; + //wxProgressDialog* loadBar = new wxProgressDialog(wxT("Compiling"), wxT("Please wait while the compilation is executing..."), 100, this); + //loadBar->Pulse(); if(!this->project->Build(result)) { + //loadBar->Destroy(); wxMessageBox(crea::std2wx(result->c_str()), wxT("Project Compilation - Error!")); return; } + //loadBar->Destroy(); wxMessageBox(crea::std2wx("The compilation was executed successfully. Please check the \"building.log\" file located in the build folder to check the compilation result."), wxT("Project Compilation")); } diff --git a/lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.cpp index d809700..b40e84f 100644 --- a/lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.cpp @@ -90,14 +90,22 @@ void wxCDMProjectDescriptionPanel::CreateControls() { wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL); - //Welcome - sizer->Add(new wxStaticText(this, -1, _("Project")),0, wxALIGN_CENTER, 0); + //Header + wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL); + { + //Image + headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(PrIcon64)),0, wxALIGN_CENTER, 0); + wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL); + //Title + textSizer->Add(new wxStaticText(this, -1, _("Project")),0, wxALIGN_LEFT, 0); + //Project Name + textSizer->Add(new wxStaticText(this, -1, crea::std2wx(this->project->GetName())),0, wxALIGN_LEFT, 0); + headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + } + sizer->Add(headerSizer, 0, wxALIGN_CENTER); + - //Image - sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(PrIcon64)),0, wxALIGN_CENTER, 0); - //Project Name - sizer->Add(new wxStaticText(this, -1, crea::std2wx(this->project->GetName())),0, wxALIGN_CENTER, 0); //----------------------------------Project Properties----------------------------------- //properties StaticBoxSizer @@ -158,7 +166,7 @@ void wxCDMProjectDescriptionPanel::CreateControls() propertiesPanel->SetSizer(propertiesPanelSizer); propertiesPanelSizer->Fit(propertiesPanel); propertiesBox->Add(propertiesPanel, 1, wxEXPAND); - sizer->Add(propertiesBox, 0, wxEXPAND | wxALL, 10); + sizer->Add(propertiesBox, 0, wxEXPAND | wxLEFT | wxRIGHT, 10); //----------------------------------Project Actions-------------------------------------- //actions StaticBoxSizer @@ -168,38 +176,46 @@ void wxCDMProjectDescriptionPanel::CreateControls() wxPanel* actionsPanel = new wxPanel(this); //actions Sizer wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL); + + //actionsGrid Sizer + wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(2, 2, 9, 15); //buttons - // package manager - wxButton* packageMgrbt = new wxButton(actionsPanel, ID_BUTTON_GOTO_PACKAGE_MANAGER, _T("Package Manager")); - packageMgrbt->SetToolTip(wxT("Find the current available packages into this project. You can also create new Packages in this section.")); - actionsPanelSizer->Add(packageMgrbt, 1, wxALL, 5); // lib manager - // show only if there is a lib folder + // show only if there is a lib folder if(this->project->GetLib() != NULL) { - wxButton* libMgrbt = new wxButton(actionsPanel, ID_BUTTON_GOTO_LIB_MANAGER, _T("Library Manager")); + wxButton* libMgrbt = new wxButton(actionsPanel, ID_BUTTON_GOTO_LIB_MANAGER, _T("A. Library Manager")); libMgrbt->SetToolTip(wxT("Find the current available libraries into this project. You can also create new Libraries in this section as well as edit the lib folder's CMakeLists.txt file.")); libMgrbt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectDescriptionPanel::OnLibMouseEnter,NULL,this); libMgrbt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectDescriptionPanel::OnLibMouseExit,NULL,this); - actionsPanelSizer->Add(libMgrbt, 1, wxALL, 5); + actionsGridSizer->Add(libMgrbt, 1, wxALL | wxEXPAND, 5); } + // package manager + wxButton* packageMgrbt = new wxButton(actionsPanel, ID_BUTTON_GOTO_PACKAGE_MANAGER, _T("B. Package Manager")); + packageMgrbt->SetToolTip(wxT("Find the current available packages into this project. You can also create new Packages in this section.")); + actionsGridSizer->Add(packageMgrbt, 1, wxALL | wxEXPAND, 5); + // appli manager - // show only if there is a appli folder + // show only if there is a appli folder if(this->project->GetAppli() != NULL) { - wxButton* appliMgrbt = new wxButton(actionsPanel, ID_BUTTON_GOTO_APPLI_MANAGER, _T("Application Manager")); + wxButton* appliMgrbt = new wxButton(actionsPanel, ID_BUTTON_GOTO_APPLI_MANAGER, _T("C. Application Manager")); appliMgrbt->SetToolTip(wxT("Find the current available applications into this project. You can also create new Applications in this section as well as edit the appli folder's CMakeLists.txt file.")); appliMgrbt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectDescriptionPanel::OnAppliMouseEnter,NULL,this); appliMgrbt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectDescriptionPanel::OnAppliMouseExit,NULL,this); - actionsPanelSizer->Add(appliMgrbt, 1, wxALL, 5); + actionsGridSizer->Add(appliMgrbt, 1, wxALL | wxEXPAND, 5); } // edit CMakeLists file - wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File")); + wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("D. Edit CMakeLists File")); editCMakebt->SetToolTip(wxT("Edit the CMakeLists.txt file of this project.")); editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectDescriptionPanel::OnCMakeMouseEnter,NULL,this); editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectDescriptionPanel::OnCMakeMouseExit,NULL,this); - actionsPanelSizer->Add(editCMakebt, 1, wxALL, 5); + actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5); + actionsGridSizer->AddGrowableCol(0,1); + actionsGridSizer->AddGrowableCol(1,1); + + actionsPanelSizer->Add(actionsGridSizer, 1, wxEXPAND, 0); //SetPanel sizer and box actionsPanel->SetSizer(actionsPanelSizer); actionsPanelSizer->Fit(actionsPanel); @@ -262,13 +278,13 @@ void wxCDMProjectDescriptionPanel::OnBtnManageApplications(wxCommandEvent& event wxCommandEvent* newEvent1 = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED); - if(this->project->GetAppli() != NULL) - { - int CMId = this->project->GetAppli()->GetId(); - newEvent1->SetInt(CMId); - newEvent1->SetId(0); - wxPostEvent(this->GetParent(), *newEvent1); - } + if(this->project->GetAppli() != NULL) + { + int CMId = this->project->GetAppli()->GetId(); + newEvent1->SetInt(CMId); + newEvent1->SetId(0); + wxPostEvent(this->GetParent(), *newEvent1); + } event.Skip(); } diff --git a/lib/creaDevManagerLib/wxCDMProjectHelpDialog.h b/lib/creaDevManagerLib/wxCDMProjectHelpDialog.h index 789d812..b9631a7 100644 --- a/lib/creaDevManagerLib/wxCDMProjectHelpDialog.h +++ b/lib/creaDevManagerLib/wxCDMProjectHelpDialog.h @@ -51,7 +51,7 @@ public: wxWindowID id = wxID_ANY, const wxString& caption = wxT("Project Ready"), const wxPoint& position = wxDefaultPosition, - const wxSize& size = wxSize(350,550), + const wxSize& size = wxSize(350,700), long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ); ~wxCDMProjectHelpDialog(); @@ -60,7 +60,7 @@ public: wxWindowID id = wxID_ANY, const wxString& caption = wxT("Project Ready"), const wxPoint& position = wxDefaultPosition, - const wxSize& size = wxSize(350,550), + const wxSize& size = wxSize(350,700), long style = wxDEFAULT_DIALOG_STYLE ); -- 2.46.2