Fix: Help in inclusions for Appli, Lib, Package Manager, Applications, Libraries, Packages. Now showing the code behind.
Feature: Now the build path can be opened.
Fix: Tree panel minimum size fixed to 250 px.
mainWindow = new wxCDMMainFrame(NULL);
SetTopWindow(mainWindow);
- mainWindow->SetSize(750, 700);
+ mainWindow->SetSize(850, 700);
wxToolTip::SetDelay(700);
mainWindow->Show(true);
std::cout << "Crea DevManager opened." << std::endl;
#define ID_BUTTON_OPEN_COMMAND 10317
#define ID_BUTTON_SET_VERSION 10318
#define ID_BUTTON_SET_BUILD_PATH 10319
-#define ID_BUTTON_SET_AUTHOR 10320
-#define ID_BUTTON_SET_DESCRIPTION 10321
-#define ID_BUTTON_SET_NAME 10322
-#define ID_BUTTON_SET_CATEGORY 10323
-
-
-#define ID_BUTTON_BUILD_PROJECT 10324
-#define ID_BUTTON_CONFIGURE_BUILD 10325
-#define ID_BUTTON_CONNECT_PROJECT 10326
-
-#define ID_BUTTON_GOTO_PACKAGE_MANAGER 10327
-#define ID_BUTTON_GOTO_APPLI_MANAGER 10328
-#define ID_BUTTON_GOTO_LIB_MANAGER 10329
-
-#define ID_LINK_SELECT_PACKAGE 10330
-#define ID_LINK_SELECT_LIBRARY 10331
-#define ID_LINK_SELECT_APPLICATION 10332
-#define ID_LINK_SELECT_BLACKBOX 10333
-
-#define ID_CHECK_INCLUDE_LIBRARY 10334
-#define ID_CHECK_INCLUDE_3RDLIBRARY 10335
-#define ID_CHECK_INCLUDE_PACKAGE 10336
-#define ID_CHECK_INCLUDE_APPLICATION 10337
-
-#define ID_CHECKBOX_ENABLE_HELP 10338
-#define ID_CHECKBOX_DISABLE_HELP 10339
-#define ID_CHECKBOX_TOGGLE_HELP 10340
-
-#define ID_BUTTON_CHECK_PROJECT 10341
-
-#define ID_MENU_OPEN_RECENT1 10342
-#define ID_MENU_OPEN_RECENT2 10343
-#define ID_MENU_OPEN_RECENT3 10344
-#define ID_MENU_OPEN_RECENT4 10345
-#define ID_MENU_OPEN_RECENT5 10346
+#define ID_BUTTON_OPEN_BUILD_PATH 10320
+#define ID_BUTTON_SET_AUTHOR 10321
+#define ID_BUTTON_SET_DESCRIPTION 10322
+#define ID_BUTTON_SET_NAME 10323
+#define ID_BUTTON_SET_CATEGORY 10324
+
+
+#define ID_BUTTON_BUILD_PROJECT 10325
+#define ID_BUTTON_CONFIGURE_BUILD 10326
+#define ID_BUTTON_CONNECT_PROJECT 10327
+
+#define ID_BUTTON_GOTO_PACKAGE_MANAGER 10328
+#define ID_BUTTON_GOTO_APPLI_MANAGER 10329
+#define ID_BUTTON_GOTO_LIB_MANAGER 10330
+
+#define ID_LINK_SELECT_PACKAGE 10331
+#define ID_LINK_SELECT_LIBRARY 10332
+#define ID_LINK_SELECT_APPLICATION 10333
+#define ID_LINK_SELECT_BLACKBOX 10334
+
+#define ID_CHECK_INCLUDE_LIBRARY 10335
+#define ID_CHECK_INCLUDE_3RDLIBRARY 10336
+#define ID_CHECK_INCLUDE_PACKAGE 10337
+#define ID_CHECK_INCLUDE_APPLICATION 10338
+
+#define ID_CHECKBOX_ENABLE_HELP 10339
+#define ID_CHECKBOX_DISABLE_HELP 10340
+#define ID_CHECKBOX_TOGGLE_HELP 10341
+
+#define ID_BUTTON_CHECK_PROJECT 10342
+
+#define ID_MENU_OPEN_RECENT1 10343
+#define ID_MENU_OPEN_RECENT2 10344
+#define ID_MENU_OPEN_RECENT3 10345
+#define ID_MENU_OPEN_RECENT4 10346
+#define ID_MENU_OPEN_RECENT5 10347
#endif /* CREADEVMANAGERIDS_H_ */
//help icon
wxButton* pApplicationHlp = new wxButton(propertiesPanel, wxID_ANY, wxT("?"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
+ pApplicationHlp->Enable(false);
+ tt = "When this application is included in the CMakeLists file, the\nfollowing line is included in the CMakeList.txt file in the\nappli folder:\n"
+ "ADD_SUBDIRECTORY(" + applications[i]->GetName() + ")";
+ pApplicationHlp->SetToolTip(crea::std2wx(tt));
+
propertiesGridSizer -> Add(pApplicationHlp, 0, wxEXPAND | wxALIGN_CENTER);
}
wxCheckBox* ChBIncl = new wxCheckBox(
includesPanel, ID_CHECK_INCLUDE_3RDLIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT
);
- ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " library is included in the project configuration for this application."));
+ ChBIncl->SetToolTip(crea::std2wx(
+ "When this box is checked the " + it->first + " library\n"
+ "is included in the project configuration for\n"
+ "this application including the following instruction\n"
+ "in the application's folder CMakeLists.txt file:\n"
+ "SET ( ${LIBRARY_NAME}_LINK_LIBRARIES\n"
+ " ${" + it->first+ "_LIBRARIES}\n"
+ ")"));
ChBIncl->SetName(crea::std2wx(it->first));
ChBIncl->SetValue(it->second);
includesGridSizer->Add(ChBIncl, 1, wxEXPAND);
wxCheckBox* ChBIncl = new wxCheckBox(
includesPanel, ID_CHECK_INCLUDE_LIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT
);
- ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " custom library is included in the project configuration for this application."));
+ ChBIncl->SetToolTip(crea::std2wx(
+ "When this box is checked the " + it->first + " custom\n"
+ "library is included in the project configuration for\n"
+ "this application including the following code in the\n"
+ "application's folder CMakeLists.txt file:\n"
+ "INCLUDE_DIRECTORIES (\n"
+ " ../../lib/"+ it->first + "\n"
+ ")\n"
+ "SET ( ${EXE_NAME}_LINK_LIBRARIES\n"
+ " " + it->first+ "\n"
+ ")"));
ChBIncl->SetName(crea::std2wx(it->first));
ChBIncl->SetValue(it->second);
includesLibGridSizer->Add(ChBIncl, 1, wxEXPAND);
//help icon
wxButton* pLibraryHlp = new wxButton(propertiesPanel, wxID_ANY, wxT("?"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
+ pLibraryHlp->Enable(false);
+ tt = "When this library is included in the CMakeLists file, the\nfollowing line is included in the CMakeList.txt file in the lib\nfolder:\n"
+ "ADD_SUBDIRECTORY(" + libraries[i]->GetName() + ")";
+ pLibraryHlp->SetToolTip(crea::std2wx(tt));
+
propertiesGridSizer -> Add(pLibraryHlp, 0, wxEXPAND | wxALIGN_CENTER);
}
wxCheckBox* ChBIncl = new wxCheckBox(
includesPanel, ID_CHECK_INCLUDE_3RDLIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT
);
- ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " library is included in the project configuration for this library."));
+ ChBIncl->SetToolTip(crea::std2wx(
+ "When this box is checked the " + it->first + " library\n"
+ "is included in the project configuration for\n"
+ "this library including the following instruction\n"
+ "in the library's folder CMakeLists.txt file:\n"
+ "SET ( ${LIBRARY_NAME}_LINK_LIBRARIES\n"
+ " ${" + it->first+ "_LIBRARIES}\n"
+ ")"));
ChBIncl->SetName(crea::std2wx(it->first));
ChBIncl->SetValue(it->second);
includesGridSizer->Add(ChBIncl, 1, wxEXPAND);
wxCheckBox* ChBIncl = new wxCheckBox(
includesPanel, ID_CHECK_INCLUDE_LIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT
);
- ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " custom library is included in the project configuration for this library."));
+ ChBIncl->SetToolTip(crea::std2wx(
+ "When this box is checked the " + it->first + " custom\n"
+ "library is included in the project configuration for\n"
+ "this library including the following code in the\n"
+ "library's CMakeLists.txt file:\n"
+ "INCLUDE_DIRECTORIES (\n"
+ " ../"+ it->first + "\n"
+ ")\n"
+ "SET ( ${LIBRARY_NAME}_LINK_LIBRARIES\n"
+ " " + it->first+ "\n"
+ ")"));
ChBIncl->SetName(crea::std2wx(it->first));
ChBIncl->SetValue(it->second);
includesLibGridSizer->Add(ChBIncl, 1, wxEXPAND);
);
auiManager.AddPane(panel_Properties, wxAuiPaneInfo().BestSize(600,400).CenterPane().Name(wxT("panel_Properties")).Caption(wxT("")).CloseButton(false));
- auiManager.AddPane(tree_Projects, wxAuiPaneInfo().Left().MinSize(300,300).BestSize(300,400).CloseButton(false).Name(wxT("tree_Projects")).Caption(wxT("Project Tree")).CloseButton(false));
+ auiManager.AddPane(tree_Projects, wxAuiPaneInfo().Left().MinSize(250,300).BestSize(250,400).CloseButton(false).Name(wxT("tree_Projects")).Caption(wxT("Project Tree")).CloseButton(false));
auiManager.Update();
//auiManager.LoadPerspective(pers,true);
wxToolTip::Enable(true);
wxCheckBox* ChBIncl = new wxCheckBox(
includesPanel, ID_CHECK_INCLUDE_3RDLIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT
);
- ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " library is included in the project configuration for this library."));
+ ChBIncl->SetToolTip(crea::std2wx(
+ "When this box is checked the " + it->first + " library\n"
+ "is included in the project configuration for\n"
+ "this package including the following instruction\n"
+ "in the package's folder CMakeLists.txt file:\n"
+ "SET(${BBTK_PACKAGE_NAME}_USE_" + it->first+ " ON)\n"
+ ));
ChBIncl->SetName(crea::std2wx(it->first));
ChBIncl->SetValue(it->second);
includesGridSizer->Add(ChBIncl, 1, wxEXPAND);
wxCheckBox* ChBIncl = new wxCheckBox(
includesPanel, ID_CHECK_INCLUDE_LIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT
);
- ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " custom library is included in the project configuration for this library."));
+ ChBIncl->SetToolTip(crea::std2wx(
+ "When this box is checked the " + it->first + " custom\n"
+ "library is included in the project configuration for\n"
+ "this packages including the following code in the\n"
+ "package's folder CMakeLists.txt file:\n"
+ "SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS\n"
+ " ../lib/"+ it->first + "\n"
+ ")\n"
+ "SET(${BBTK_PACKAGE_NAME}_LIBS\n"
+ " " + it->first+ "\n"
+ ")"));
ChBIncl->SetName(crea::std2wx(it->first));
ChBIncl->SetValue(it->second);
includesLibGridSizer->Add(ChBIncl, 1, wxEXPAND);
//help icon
wxButton* pPackageHlp = new wxButton(propertiesPanel, wxID_ANY, wxT("?"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
+ pPackageHlp->Enable(false);
+ tt = "When this package is included in the CMakeLists file, the\nfollowing line is included in the CMakeList.txt file in the\nproject folder:\n"
+ "ADD_SUBDIRECTORY(" + packages[i]->GetName() + ")";
+ pPackageHlp->SetToolTip(crea::std2wx(tt));
+
propertiesGridSizer -> Add(pPackageHlp, 0, wxEXPAND | wxALIGN_CENTER);
}
EVT_BUTTON(ID_BUTTON_GOTO_APPLI_MANAGER, wxCDMProjectDescriptionPanel::OnBtnManageApplications)
EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMProjectDescriptionPanel::OnBtnEditCMakeLists)
EVT_BUTTON(ID_BUTTON_SET_BUILD_PATH, wxCDMProjectDescriptionPanel::OnBtnSetBuildPath)
+EVT_BUTTON(ID_BUTTON_OPEN_BUILD_PATH, wxCDMProjectDescriptionPanel::OnBtnOpenBuild)
EVT_BUTTON(ID_BUTTON_OPEN_FOLDER, wxCDMProjectDescriptionPanel::OnBtnOpenFolder)
EVT_BUTTON(ID_BUTTON_SET_VERSION, wxCDMProjectDescriptionPanel::OnBtnSetVersion)
END_EVENT_TABLE()
wxBoxSizer* pBuildLocationsz = new wxBoxSizer(wxHORIZONTAL);
this->buildPathtc = new wxStaticText(propertiesPanel, -1, crea::std2wx(this->project->GetBuildPath()));
this->buildPathtc->SetMaxSize(wxSize(200,-1));
- wxButton* pBuildLocationbt = new wxButton(propertiesPanel, ID_BUTTON_SET_BUILD_PATH, wxT("Choose"));
+
+ wxButton* pBuildLocationbt = new wxButton(propertiesPanel, ID_BUTTON_SET_BUILD_PATH, wxT("Choose..."));
pBuildLocationbt->SetToolTip(wxT("Select a new location for compiling the project."));
+
+ wxButton* pBuildOpenbt = new wxButton(propertiesPanel, ID_BUTTON_OPEN_BUILD_PATH, wxT("Open"));
+ pBuildOpenbt->SetToolTip(wxT("Open the binaries folder in the file explorer."));
+
pBuildLocationsz->Add(this->buildPathtc, 1, wxALIGN_CENTER, 1);
pBuildLocationsz->Add(pBuildLocationbt, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 10);
+ pBuildLocationsz->Add(pBuildOpenbt, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 10);
propertiesGridSizer->Add(pVersion, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
propertiesGridSizer->Add(pVersionsz, 1, wxEXPAND);
}
}
-void
-wxCDMProjectDescriptionPanel::OnBtnSetBuildPath(wxCommandEvent& event)
+void wxCDMProjectDescriptionPanel::OnBtnSetBuildPath(wxCommandEvent& event)
{
wxDirDialog* dialog = new wxDirDialog(this, wxT("Choose the new build location for the project"));
if(dialog->ShowModal())
this->buildPathtc->SetLabel(crea::std2wx(this->project->GetBuildPath()));
}
-void
-wxCDMProjectDescriptionPanel::OnBtnOpenFolder(wxCommandEvent& event)
+void wxCDMProjectDescriptionPanel::OnBtnOpenBuild(wxCommandEvent& event)
+{
+ std::string* result;
+ if(CDMUtilities::openFileExplorer(this->project->GetBuildPath()))
+ wxMessageBox(crea::std2wx(*result),_T("Open Folder - Error!"),wxOK | wxICON_ERROR);
+}
+
+void wxCDMProjectDescriptionPanel::OnBtnOpenFolder(wxCommandEvent& event)
{
std::string* result;
if(!this->project->OpenInFileExplorer(result))
* Handles when the choose build path button is pressed.
*/
void OnBtnSetBuildPath(wxCommandEvent& event);
+ /**
+ * Handles when the open build folder button is pressed.
+ */
+ void OnBtnOpenBuild(wxCommandEvent& event);
/**
* Handles when the open containing folder button is pressed.
*/