2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
10 # This software is governed by the CeCILL-B license under French law and
11 # abiding by the rules of distribution of free software. You can use,
12 # modify and/ or redistribute the software under the terms of the CeCILL-B
13 # license as circulated by CEA, CNRS and INRIA at the following URL
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 # or in the file LICENSE.txt.
17 # As a counterpart to the access to the source code and rights to copy,
18 # modify and redistribute granted by the license, users are provided only
19 # with a limited warranty and the software's author, the holder of the
20 # economic rights, and the successive licensors have only limited
23 # The fact that you are presently reading this means that you have had
24 # knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------
30 * wxCDMLibraryHelpDialog.cpp
32 * Created on: 11/1/2013
33 * Author: Daniel Felipe Gonzalez Obando
36 #include "wxCDMLibraryHelpDialog.h"
38 #include "creaDevManagerIds.h"
40 BEGIN_EVENT_TABLE(wxCDMLibraryHelpDialog, wxDialog)
41 EVT_BUTTON(ID_BUTTON_CANCEL, wxCDMLibraryHelpDialog::OnFinish)
42 EVT_BUTTON(ID_BUTTON_OPENPROJECT, wxCDMLibraryHelpDialog::OnCMakeLists)
43 EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMLibraryHelpDialog::OnCMakeLists)
44 EVT_CHECKBOX(ID_CHECKBOX_DISABLE_HELP, wxCDMLibraryHelpDialog::OnDisableHelp)
47 wxCDMLibraryHelpDialog::wxCDMLibraryHelpDialog(
49 modelCDMLibrary* library,
51 const wxString& caption,
52 const wxPoint& position,
57 wxCDMLibraryHelpDialog::Create(parent, id, caption, position, size, style);
58 this->library = library;
61 wxCDMLibraryHelpDialog::~wxCDMLibraryHelpDialog()
65 bool wxCDMLibraryHelpDialog::Create(
68 const wxString& caption,
69 const wxPoint& position,
74 wxDialog::Create(parent, id, caption, position, size, style);
76 this->CreateControls();
81 void wxCDMLibraryHelpDialog::CreateControls()
84 wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
87 wxStaticText* title = new wxStaticText(this, wxID_ANY, wxT("Working with Libraries"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);//new wxRichTextCtrl(this,wxID_ANY, wxString("Create a new project"), wxDefaultPosition, wxDefaultSize, wxRE_READONLY);
88 v_sizer1->Add(title, 0, wxALIGN_LEFT | wxALL | wxALIGN_CENTER_VERTICAL, 5);
90 wxStaticText* instruction = new wxStaticText(
94 "Libraries are made to expose the projects' main functionalities to the applications and black boxes of the project. "
95 "The functions and classes available in the libraries are the core of any project, thus they should implement important "
96 "tasks such as image processing algorithms or point cloud processing algorithms."
97 "Libraries are stored in the project's lib folder and each library has its own dedicated folder. Inside these folders "
98 "each library has its classes.\n"
100 "To start developing a library, go ahead and create a new class with the button \"Create Class\" and implement the main "
101 "functionalities of your project inside the created files.\n"
102 "If you need to separate classes in folders you can do it by creating a folder with the \"Create Folder\" button.\n"
103 "Then, in order to include your libraries in the project correctly you must include them in the lib's folder "
104 "\"CMakeLists.txt\" file. Also, if you create additional folders in your library you should include them in the library's "
105 "\"CMakeLists.txt\" file.\n"
107 "You can easily edit the CMakeLists files previously mentioned by clicking on the following buttons."),
112 v_sizer1->Add(instruction, 0,wxEXPAND | wxALL, 5);
114 wxButton* editCMakePKGBtn = new wxButton(this, ID_BUTTON_EDIT_CMAKELISTSFILE, wxT("Open Library's directory CMakeLists file"));
115 wxButton* editCMakePRJBtn= new wxButton(this, ID_BUTTON_OPENPROJECT, wxT("Open Lib's directory CMakeLists file"));
117 v_sizer1->Add(editCMakePKGBtn, 0, wxEXPAND | wxLEFT | wxRIGHT, 15);
118 v_sizer1->Add(editCMakePRJBtn, 0, wxEXPAND | wxLEFT | wxRIGHT, 15);
120 v_sizer1->Add(new wxCheckBox(this, ID_CHECKBOX_DISABLE_HELP, wxT("&Disable help")), 0, wxALIGN_RIGHT | wxRIGHT, 10);
122 v_sizer1->Add(new wxButton(this, ID_BUTTON_CANCEL, wxT("Close")), 0, wxALIGN_RIGHT | wxRIGHT | wxBOTTOM | wxALIGN_CENTER_VERTICAL, 30);
125 //v_sizer1->RecalcSizes();
128 void wxCDMLibraryHelpDialog::OnFinish(wxCommandEvent& event)
130 this->EndDialog(wxID_CANCEL);
133 void wxCDMLibraryHelpDialog::OnCMakeLists(wxCommandEvent& event)
135 //TODO: implement method
136 std::cout << "OnCMakeLists not implemented yet." << std::endl;
140 void wxCDMLibraryHelpDialog::OnCMakeListsEnter(wxMouseEvent& event)
142 //TODO: implement method
143 std::cout << "OnCMakeListsEnter not implemented yet." << std::endl;
147 void wxCDMLibraryHelpDialog::OnCMakeListsExit(wxMouseEvent& event)
149 //TODO: implement method
150 std::cout << "OnCMakeListsExit not implemented yet." << std::endl;
154 void wxCDMLibraryHelpDialog::OnDisableHelp(wxCommandEvent& event)
156 wxPostEvent(this->GetParent(), event);