"Libraries contain the core classes of your project, these libraries should be used by black boxes and applications "
"from this project to perform the main functions of the project. Functions implementing important tasks such as image "
"processing algorithms or point cloud processing algorithms should be developed in the libraries of the project, while "
- "the black boxes and applications serve as interfaces between the user or other platforms and the libraries functions.\n"
+ "the black boxes and applications serve as interfaces between the user or other platforms and the libraries' functions.\n"
"\n"
"In the library manager you can view a list of the available libraries in the current project, as well as create "
- "new libraries. Remember that any library you make must be included in the lib's folder CMakeLists file. You can do that "
- "by clicking on the \"Edit Lib's CMakeLists File\" button bellow or in the Library Manager the \"Edit CMakeLists file\" "
- "button and include the desired libraries at the end of the file."),
+ "new libraries. Remember that any library you create must be included in the lib's folder CMakeLists file by using the "
+ "\"ADD_SUBDIRECTORY([libraryName])\" command. You can open this file by clicking on the \"Edit Lib's CMakeLists File\" "
+ "button below or in the Library Manager the \"Edit CMakeLists file\" button and include the desired libraries at the end "
+ "of the file."),
wxDefaultPosition,
wxDefaultSize,
wxALIGN_LEFT
);
v_sizer1->Add(instruction, 0,wxEXPAND | wxALL, 5);
+ wxButton* editCMakeLibBtn = new wxButton(this, ID_BUTTON_EDIT_CMAKELISTSFILE, wxT("Edit Lib's CMakeLists File"));
+ editCMakeLibBtn->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMLibHelpDialog::OnEditCMakeMouseEnter,NULL,this);
+ editCMakeLibBtn->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMLibHelpDialog::OnEditCMakeMouseExit,NULL,this);
+ v_sizer1->Add(editCMakeLibBtn, 0, wxEXPAND | wxLEFT | wxRIGHT, 15);
+
v_sizer1->Add(new wxCheckBox(this, ID_CHECKBOX_DISABLE_HELP, wxT("&Disable help")), 0, wxALIGN_RIGHT | wxRIGHT, 10);
v_sizer1->Add(new wxButton(this, ID_BUTTON_CANCEL, wxT("Close")), 0, wxALIGN_RIGHT | wxRIGHT | wxBOTTOM | wxALIGN_CENTER_VERTICAL, 30);
void wxCDMLibHelpDialog::OnEditCMake(wxCommandEvent& event)
{
- //TODO: implement method
- std::cout << "OnEditCMake not implemented yet." << std::endl;
- event.Skip();
+ std::string* result;
+ if(!this->lib->OpenCMakeListsFile(result))
+ wxMessageBox(crea::std2wx(*result),_T("Open CMakeLists File - Error!"),wxOK | wxICON_ERROR);
+
+ wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
+
+ if(this->lib->GetCMakeLists() != NULL)
+ {
+ newEvent->SetClientData(this->lib->GetCMakeLists());
+ newEvent->SetId(0);
+ wxPostEvent(this->GetParent(), *newEvent);
+ }
}
void wxCDMLibHelpDialog::OnEditCMakeMouseEnter(wxMouseEvent& event)
{
- //TODO: implement method
- std::cout << "OnEditCMakeEnter not implemented yet." << std::endl;
+ wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
+
+ if(this->lib->GetCMakeLists() != NULL)
+ {
+ newEvent->SetClientData(this->lib->GetCMakeLists());
+ newEvent->SetId(0);
+ wxPostEvent(this->GetParent(), *newEvent);
+ }
event.Skip();
}
void wxCDMLibHelpDialog::OnEditCMakeMouseExit(wxMouseEvent& event)
{
- //TODO: implement method
- std::cout << "OnEditCMakeExit not implemented yet." << std::endl;
+ wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
+
+ if(this->lib->GetCMakeLists() != NULL)
+ {
+ newEvent->SetClientData(this->lib->GetCMakeLists());
+ newEvent->SetId(0);
+ wxPostEvent(this->GetParent(), *newEvent);
+ }
event.Skip();
}