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"));
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
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);
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"));
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
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"));
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
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
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);
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
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
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"));
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
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())
{
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
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"));
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);
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);
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);
# 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.
# ------------------------------------------------------------------------
-*/
+ */
/*
{
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"));
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);
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"));
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
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"));
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
#include "wxCDMProjectActionsPanel.h"
+#include <wx/progdlg.h>
+
#include "creaDevManagerIds.h"
BEGIN_EVENT_TABLE(wxCDMProjectActionsPanel, wxPanel)
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."));
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"));
}
{
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
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
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);
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();
}
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();
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
);