#include "wxCDMAppliDescriptionPanel.h"
-#include "creaDevManagerIds.h"
+
#include "wxCDMMainFrame.h"
+
+#include "wxCDMAppliHelpDialog.h"
+
+#include "creaDevManagerIds.h"
#include "images/ApIcon64.xpm"
BEGIN_EVENT_TABLE(wxCDMAppliDescriptionPanel, wxPanel)
//Assign sizer
SetSizer(sizer);
sizer->SetSizeHints(this);
+
+ if (((wxCDMMainFrame*)this->GetParent())->isHelp())
+ {
+ wxCDMAppliHelpDialog* helpDialog = new wxCDMAppliHelpDialog(this->GetParent(), this->appli, wxID_ANY);
+ helpDialog->Show(true);
+ }
}
void wxCDMAppliDescriptionPanel::OnBtnCreateApplication(wxCommandEvent& event)
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# 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.
+# ------------------------------------------------------------------------
+ */
+
+
+/*
+ * wxCDMAppliHelpDialog.cpp
+ *
+ * Created on: 11/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#include "wxCDMAppliHelpDialog.h"
+
+#include "creaDevManagerIds.h"
+
+BEGIN_EVENT_TABLE(wxCDMAppliHelpDialog, wxDialog)
+EVT_BUTTON(ID_BUTTON_CANCEL, wxCDMAppliHelpDialog::OnFinish)
+EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMAppliHelpDialog::OnEditCMake)
+EVT_CHECKBOX(ID_CHECKBOX_DISABLE_HELP, wxCDMAppliHelpDialog::OnDisableHelp)
+END_EVENT_TABLE()
+
+wxCDMAppliHelpDialog::wxCDMAppliHelpDialog(
+ wxWindow* parent,
+ modelCDMAppli* appli,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& position,
+ const wxSize& size,
+ long style
+)
+{
+ wxCDMAppliHelpDialog::Create(parent, id, caption, position, size, style);
+ this->appli = appli;
+}
+
+wxCDMAppliHelpDialog::~wxCDMAppliHelpDialog()
+{
+}
+
+bool wxCDMAppliHelpDialog::Create(
+ wxWindow* parent,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& position,
+ const wxSize& size,
+ long int style
+)
+{
+ wxDialog::Create(parent, id, caption, position, size, style);
+
+ this->CreateControls();
+
+ return TRUE;
+}
+
+void wxCDMAppliHelpDialog::CreateControls()
+{
+ wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
+
+
+ wxStaticText* title = new wxStaticText(this, wxID_ANY, wxT("Managing your applications"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);//new wxRichTextCtrl(this,wxID_ANY, wxString("Create a new project"), wxDefaultPosition, wxDefaultSize, wxRE_READONLY);
+ v_sizer1->Add(title, 0, wxALIGN_LEFT | wxALL | wxALIGN_CENTER_VERTICAL, 5);
+
+ wxStaticText* instruction = new wxStaticText(
+ this,
+ wxID_ANY,
+ crea::std2wx(
+ "Applications are stand alone programs that use the projects' core functionality (libraries' functions). These "
+ "applications are useful when showing the projects' \"out of the box\" functionalities.\n"
+ "\n"
+ "In the application manager you can view a list of the available applications in the current project, as well as create "
+ "new applications. Remember that any application you make must be included in the appli's folder CMakeLists file. You can do that "
+ "by clicking on the \"Edit Appli's CMakeLists File\" button bellow or in the Application Manager the \"Edit CMakeLists file\" "
+ "button and include the desired applications at the end of the file.\n"
+ "For a better understanding of how to use the applications please check the \"myFierceAppli\" application (which is shipped by "
+ "default in every new project) and take a look at how it's included in the project."),
+ wxDefaultPosition,
+ wxDefaultSize,
+ wxALIGN_LEFT
+ );
+ v_sizer1->Add(instruction, 0,wxEXPAND | wxALL, 5);
+
+ 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);
+
+ SetSizer(v_sizer1);
+
+}
+
+void wxCDMAppliHelpDialog::OnFinish(wxCommandEvent& event)
+{
+ this->EndDialog(wxID_CANCEL);
+}
+
+void wxCDMAppliHelpDialog::OnEditCMake(wxCommandEvent& event)
+{
+ //TODO: implement method
+ std::cout << "OnEditCMake not implemented yet." << std::endl;
+ event.Skip();
+}
+
+
+void wxCDMAppliHelpDialog::OnEditCMakeMouseEnter(wxMouseEvent& event)
+{
+ //TODO: implement method
+ std::cout << "OnEditCMakeEnter not implemented yet." << std::endl;
+ event.Skip();
+}
+
+void wxCDMAppliHelpDialog::OnEditCMakeMouseExit(wxMouseEvent& event)
+{
+ //TODO: implement method
+ std::cout << "OnEditCMakeExit not implemented yet." << std::endl;
+ event.Skip();
+}
+
+
+void wxCDMAppliHelpDialog::OnDisableHelp(wxCommandEvent& event)
+{
+ wxPostEvent(this->GetParent(), event);
+}
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# 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.
+# ------------------------------------------------------------------------
+*/
+
+
+/*
+ * wxCDMAppliHelpDialog.h
+ *
+ * Created on: 11/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#ifndef WXCDMAPPLIHELPDIALOG_H_
+#define WXCDMAPPLIHELPDIALOG_H_
+
+#include <creaWx.h>
+#include <wx/dialog.h>
+
+#include "modelCDMAppli.h"
+
+class wxCDMAppliHelpDialog : public wxDialog
+{
+ DECLARE_EVENT_TABLE()
+public:
+ wxCDMAppliHelpDialog(
+ wxWindow* parent,
+ modelCDMAppli* appli,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Managing Packages"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(350,600),
+ long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
+ );
+ ~wxCDMAppliHelpDialog();
+ bool Create(
+ wxWindow* parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Managing Packages"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(350,600),
+ long style = wxDEFAULT_DIALOG_STYLE
+ );
+
+protected:
+ void CreateControls();
+
+//attributes
+private:
+ modelCDMAppli* appli;
+
+//handlers
+protected:
+ void OnFinish(wxCommandEvent& event);
+
+ void OnEditCMake(wxCommandEvent& event);
+
+ void OnEditCMakeMouseEnter(wxMouseEvent& event);
+ void OnEditCMakeMouseExit(wxMouseEvent& event);
+
+ void OnDisableHelp(wxCommandEvent& event);
+};
+
+#endif /* WXCDMAPPLIHELPDIALOG_H_ */
#include "CDMUtilities.h"
#include "wxCDMMainFrame.h"
+#include "wxCDMApplicationHelpDialog.h"
+
#include "creaDevManagerIds.h"
#include "images/AIcon64.xpm"
//Assign sizer
SetSizer(sizer);
sizer->SetSizeHints(this);
+
+ if (((wxCDMMainFrame*)this->GetParent())->isHelp())
+ {
+ wxCDMApplicationHelpDialog* helpDialog = new wxCDMApplicationHelpDialog(this->GetParent(), this->application, wxID_ANY);
+ helpDialog->Show(true);
+ }
}
void wxCDMApplicationDescriptionPanel::OnBtnReturn(wxCommandEvent& event)
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# 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.
+# ------------------------------------------------------------------------
+ */
+
+
+/*
+ * wxCDMApplicationHelpDialog.cpp
+ *
+ * Created on: 11/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#include "wxCDMApplicationHelpDialog.h"
+
+#include "creaDevManagerIds.h"
+
+BEGIN_EVENT_TABLE(wxCDMApplicationHelpDialog, wxDialog)
+EVT_BUTTON(ID_BUTTON_CANCEL, wxCDMApplicationHelpDialog::OnFinish)
+EVT_BUTTON(ID_BUTTON_OPENPROJECT, wxCDMApplicationHelpDialog::OnCMakeLists)
+EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMApplicationHelpDialog::OnCMakeLists)
+EVT_CHECKBOX(ID_CHECKBOX_DISABLE_HELP, wxCDMApplicationHelpDialog::OnDisableHelp)
+END_EVENT_TABLE()
+
+wxCDMApplicationHelpDialog::wxCDMApplicationHelpDialog(
+ wxWindow* parent,
+ modelCDMApplication* application,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& position,
+ const wxSize& size,
+ long style
+)
+{
+ wxCDMApplicationHelpDialog::Create(parent, id, caption, position, size, style);
+ this->application = application;
+}
+
+wxCDMApplicationHelpDialog::~wxCDMApplicationHelpDialog()
+{
+}
+
+bool wxCDMApplicationHelpDialog::Create(
+ wxWindow* parent,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& position,
+ const wxSize& size,
+ long int style
+)
+{
+ wxDialog::Create(parent, id, caption, position, size, style);
+
+ this->CreateControls();
+
+ return TRUE;
+}
+
+void wxCDMApplicationHelpDialog::CreateControls()
+{
+
+ wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
+
+
+ wxStaticText* title = new wxStaticText(this, wxID_ANY, wxT("Working with Applications"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);//new wxRichTextCtrl(this,wxID_ANY, wxString("Create a new project"), wxDefaultPosition, wxDefaultSize, wxRE_READONLY);
+ v_sizer1->Add(title, 0, wxALIGN_LEFT | wxALL | wxALIGN_CENTER_VERTICAL, 5);
+
+ wxStaticText* instruction = new wxStaticText(
+ this,
+ wxID_ANY,
+ crea::std2wx(
+ "Applications are stand alone programs that use the projects' core functionality (libraries' functions). These "
+ "applications are useful when showing the projects' \"out of the box\" functionalities.\n"
+ "Applications are stored in the project's appli folder and each application has its own dedicated folder. Inside "
+ "these folders each application has its main file.\n"
+ "\n"
+ "To start developing an application, go ahead and open the application main file with the button \"Open Main File\" "
+ "and implement the application's functionality.\n"
+ "If you need to create separate classes in the application folder, or inside an specific folders you can do it by "
+ "creating a new class with the \"Create Class\" button or by creating a folder with the \"Create Folder\" button.\n"
+ "Then, in order to include your applications in the project correctly you must include them in the appli's folder "
+ "\"CMakeLists.txt\" file. Also, if you create additional folders in your library you should include them in the application's "
+ "\"CMakeLists.txt\" file.\n"
+ "\n"
+ "You can easily edit the CMakeLists files previously mentioned by clicking on the following buttons."),
+ wxDefaultPosition,
+ wxDefaultSize,
+ wxALIGN_LEFT
+ );
+ v_sizer1->Add(instruction, 0,wxEXPAND | wxALL, 5);
+
+ wxButton* editCMakePKGBtn = new wxButton(this, ID_BUTTON_EDIT_CMAKELISTSFILE, wxT("Open Application's directory CMakeLists file"));
+ wxButton* editCMakePRJBtn= new wxButton(this, ID_BUTTON_OPENPROJECT, wxT("Open Appli's directory CMakeLists file"));
+
+ v_sizer1->Add(editCMakePKGBtn, 0, wxEXPAND | wxLEFT | wxRIGHT, 15);
+ v_sizer1->Add(editCMakePRJBtn, 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);
+
+ SetSizer(v_sizer1);
+ //v_sizer1->RecalcSizes();
+}
+
+void wxCDMApplicationHelpDialog::OnFinish(wxCommandEvent& event)
+{
+ this->EndDialog(wxID_CANCEL);
+}
+
+void wxCDMApplicationHelpDialog::OnCMakeLists(wxCommandEvent& event)
+{
+ //TODO: implement method
+ std::cout << "OnCMakeLists not implemented yet." << std::endl;
+ event.Skip();
+}
+
+void wxCDMApplicationHelpDialog::OnCMakeListsEnter(wxMouseEvent& event)
+{
+ //TODO: implement method
+ std::cout << "OnCMakeListsEnter not implemented yet." << std::endl;
+ event.Skip();
+}
+
+void wxCDMApplicationHelpDialog::OnCMakeListsExit(wxMouseEvent& event)
+{
+ //TODO: implement method
+ std::cout << "OnCMakeListsExit not implemented yet." << std::endl;
+ event.Skip();
+}
+
+void wxCDMApplicationHelpDialog::OnDisableHelp(wxCommandEvent& event)
+{
+ wxPostEvent(this->GetParent(), event);
+}
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# 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.
+# ------------------------------------------------------------------------
+*/
+
+
+/*
+ * wxCDMApplicationHelpDialog.h
+ *
+ * Created on: 11/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#ifndef WXCDMAPPLICATIONHELPDIALOG_H_
+#define WXCDMAPPLICATIONHELPDIALOG_H_
+
+#include <creaWx.h>
+#include <wx/dialog.h>
+
+#include "modelCDMApplication.h"
+
+#include <vector>
+
+class wxCDMApplicationHelpDialog : public wxDialog
+{
+ DECLARE_EVENT_TABLE()
+public:
+ wxCDMApplicationHelpDialog(
+ wxWindow* parent,
+ modelCDMApplication* application,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Working With Applications"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(410,670),
+ long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
+ );
+ ~wxCDMApplicationHelpDialog();
+ bool Create(
+ wxWindow* parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Working With Applications"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(410,670),
+ long style = wxDEFAULT_DIALOG_STYLE
+ );
+
+protected:
+ void CreateControls();
+
+private:
+ modelCDMApplication* application;
+
+//handlers
+protected:
+ void OnFinish(wxCommandEvent& event);
+
+ void OnCMakeLists(wxCommandEvent& event);
+
+ void OnCMakeListsEnter(wxMouseEvent& event);
+ void OnCMakeListsExit(wxMouseEvent& event);
+
+ void OnDisableHelp(wxCommandEvent& event);
+};
+
+#endif /* WXCDMAPPLICATIONHELPDIALOG_H_ */
#include "wxCDMMainFrame.h"
+#include "wxCDMBlackBoxHelpDialog.h"
+
#include "creaDevManagerIds.h"
#include "images/BBIcon64.xpm"
//Assign sizer
SetSizer(sizer);
sizer->SetSizeHints(this);
+
+ if (((wxCDMMainFrame*)this->GetParent())->isHelp())
+ {
+ wxCDMBlackBoxHelpDialog* helpDialog = new wxCDMBlackBoxHelpDialog(this->GetParent(), this->blackBox, wxID_ANY);
+ helpDialog->Show(true);
+ }
}
void wxCDMBlackBoxDescriptionPanel::OnBtnReturn(wxCommandEvent& event)
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# 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.
+# ------------------------------------------------------------------------
+ */
+
+
+/*
+ * wxCDMBlackBoxHelpDialog.cpp
+ *
+ * Created on: 11/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#include "wxCDMBlackBoxHelpDialog.h"
+
+#include "creaDevManagerIds.h"
+
+BEGIN_EVENT_TABLE(wxCDMBlackBoxHelpDialog, wxDialog)
+EVT_BUTTON(ID_BUTTON_CANCEL, wxCDMBlackBoxHelpDialog::OnFinish)
+EVT_BUTTON(ID_BUTTON_OPENPROJECT, wxCDMBlackBoxHelpDialog::OnCMakeLists)
+EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMBlackBoxHelpDialog::OnCMakeLists)
+EVT_CHECKBOX(ID_CHECKBOX_DISABLE_HELP, wxCDMBlackBoxHelpDialog::OnDisableHelp)
+END_EVENT_TABLE()
+
+wxCDMBlackBoxHelpDialog::wxCDMBlackBoxHelpDialog(
+ wxWindow* parent,
+ modelCDMBlackBox* blackBox,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& position,
+ const wxSize& size,
+ long style
+)
+{
+ wxCDMBlackBoxHelpDialog::Create(parent, id, caption, position, size, style);
+ this->blackBox = blackBox;
+}
+
+wxCDMBlackBoxHelpDialog::~wxCDMBlackBoxHelpDialog()
+{
+}
+
+bool wxCDMBlackBoxHelpDialog::Create(
+ wxWindow* parent,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& position,
+ const wxSize& size,
+ long int style
+)
+{
+ wxDialog::Create(parent, id, caption, position, size, style);
+
+ this->CreateControls();
+
+ return TRUE;
+}
+
+void wxCDMBlackBoxHelpDialog::CreateControls()
+{
+
+ wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
+
+
+ wxStaticText* title = new wxStaticText(this, wxID_ANY, wxT("Working with BlackBoxes"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);//new wxRichTextCtrl(this,wxID_ANY, wxString("Create a new project"), wxDefaultPosition, wxDefaultSize, wxRE_READONLY);
+ v_sizer1->Add(title, 0, wxALIGN_LEFT | wxALL | wxALIGN_CENTER_VERTICAL, 5);
+
+ wxStaticText* instruction = new wxStaticText(
+ this,
+ wxID_ANY,
+ crea::std2wx(
+ "Black boxes are made to work in a modular fashion. They have programmer defined inputs and outputs. Their "
+ "purpose is to use the functions available in the libraries and expose them to be used as boxes in the crea "
+ "environment.\n"
+ "Black boxes are stored in the src folder of a package and they are composed of two files, the header(.h) "
+ "and the implementation(.cxx) files.\n"
+ "To start developing black boxes, go ahead and open the header file with the button \"Open .h\" and define "
+ "the inputs and outputs of the black box. Then, you will be able to use them in the implementation file, which "
+ "you can open using the \"Open .cxx\" button.\n"
+ "If you don't understand how this inputs and outputs are used, try looking at the sample black boxes available "
+ "in the sample package, which is shipped with every new project.\n"
+ "Also, don't forget to include the libraries your boxes use in the header and implementation files. They should "
+ "also be pointed and included in the package's directory CMakeLists.txt file and the project's directory "
+ "CMakeLists.txt file. Again, please take a look at the sample package and its boxes to see how to include libraries "
+ "in order to use them in the boxes.\n"
+ "\n"
+ "You can easily edit the CMakeLists files previously mentioned by clicking on the following buttons."),
+ wxDefaultPosition,
+ wxDefaultSize,
+ wxALIGN_LEFT
+ );
+ v_sizer1->Add(instruction, 0,wxEXPAND | wxALL, 5);
+
+ wxButton* editCMakePKGBtn = new wxButton(this, ID_BUTTON_EDIT_CMAKELISTSFILE, wxT("Open Package's directory CMakeLists file"));
+ wxButton* editCMakePRJBtn= new wxButton(this, ID_BUTTON_OPENPROJECT, wxT("Open Project's directory CMakeLists file"));
+
+ v_sizer1->Add(editCMakePKGBtn, 0, wxEXPAND | wxLEFT | wxRIGHT, 15);
+ v_sizer1->Add(editCMakePRJBtn, 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);
+
+ SetSizer(v_sizer1);
+ //v_sizer1->RecalcSizes();
+}
+
+void wxCDMBlackBoxHelpDialog::OnFinish(wxCommandEvent& event)
+{
+ this->EndDialog(wxID_CANCEL);
+}
+
+void wxCDMBlackBoxHelpDialog::OnCMakeLists(wxCommandEvent& event)
+{
+ //TODO: implement method
+ std::cout << "OnCMakeLists not implemented yet." << std::endl;
+ event.Skip();
+}
+
+void wxCDMBlackBoxHelpDialog::OnCMakeListsEnter(wxMouseEvent& event)
+{
+ //TODO: implement method
+ std::cout << "OnCMakeListsEnter not implemented yet." << std::endl;
+ event.Skip();
+}
+
+void wxCDMBlackBoxHelpDialog::OnCMakeListsExit(wxMouseEvent& event)
+{
+ //TODO: implement method
+ std::cout << "OnCMakeListsExit not implemented yet." << std::endl;
+ event.Skip();
+}
+
+void wxCDMBlackBoxHelpDialog::OnDisableHelp(wxCommandEvent& event)
+{
+ wxPostEvent(this->GetParent(), event);
+}
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# 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.
+# ------------------------------------------------------------------------
+*/
+
+
+/*
+ * wxCDMBlackBoxHelpDialog.h
+ *
+ * Created on: 11/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#ifndef WXCDMBLACKBOXHELPDIALOG_H_
+#define WXCDMBLACKBOXHELPDIALOG_H_
+
+#include <creaWx.h>
+#include <wx/dialog.h>
+
+#include "modelCDMBlackBox.h"
+
+#include <vector>
+
+class wxCDMBlackBoxHelpDialog : public wxDialog
+{
+ DECLARE_EVENT_TABLE()
+public:
+ wxCDMBlackBoxHelpDialog(
+ wxWindow* parent,
+ modelCDMBlackBox* blackBox,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Working With Black Boxes"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(410,700),
+ long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
+ );
+ ~wxCDMBlackBoxHelpDialog();
+ bool Create(
+ wxWindow* parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Working With Black Boxes"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(410,700),
+ long style = wxDEFAULT_DIALOG_STYLE
+ );
+
+protected:
+ void CreateControls();
+
+private:
+ modelCDMBlackBox* blackBox;
+
+//handlers
+protected:
+ void OnFinish(wxCommandEvent& event);
+
+ void OnCMakeLists(wxCommandEvent& event);
+
+ void OnCMakeListsEnter(wxMouseEvent& event);
+ void OnCMakeListsExit(wxMouseEvent& event);
+
+ void OnDisableHelp(wxCommandEvent& event);
+};
+
+#endif /* WXCDMBLACKBOXHELPDIALOG_H_ */
#include "wxCDMMainFrame.h"
+#include "wxCDMLibHelpDialog.h"
+
#include "creaDevManagerIds.h"
#include "images/LbIcon64.xpm"
//Assign sizer
SetSizer(sizer);
sizer->SetSizeHints(this);
+
+ if (((wxCDMMainFrame*)this->GetParent())->isHelp())
+ {
+ wxCDMLibHelpDialog* helpDialog = new wxCDMLibHelpDialog(this->GetParent(), this->lib, wxID_ANY);
+ helpDialog->Show(true);
+ }
}
void wxCDMLibDescriptionPanel::OnBtnCreateLibrary(wxCommandEvent& event)
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# 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.
+# ------------------------------------------------------------------------
+ */
+
+
+/*
+ * wxCDMLibHelpDialog.cpp
+ *
+ * Created on: 11/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#include "wxCDMLibHelpDialog.h"
+
+#include "creaDevManagerIds.h"
+
+BEGIN_EVENT_TABLE(wxCDMLibHelpDialog, wxDialog)
+EVT_BUTTON(ID_BUTTON_CANCEL, wxCDMLibHelpDialog::OnFinish)
+EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMLibHelpDialog::OnEditCMake)
+EVT_CHECKBOX(ID_CHECKBOX_DISABLE_HELP, wxCDMLibHelpDialog::OnDisableHelp)
+END_EVENT_TABLE()
+
+wxCDMLibHelpDialog::wxCDMLibHelpDialog(
+ wxWindow* parent,
+ modelCDMLib* lib,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& position,
+ const wxSize& size,
+ long style
+)
+{
+ wxCDMLibHelpDialog::Create(parent, id, caption, position, size, style);
+ this->lib = lib;
+}
+
+wxCDMLibHelpDialog::~wxCDMLibHelpDialog()
+{
+}
+
+bool wxCDMLibHelpDialog::Create(
+ wxWindow* parent,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& position,
+ const wxSize& size,
+ long int style
+)
+{
+ wxDialog::Create(parent, id, caption, position, size, style);
+
+ this->CreateControls();
+
+ return TRUE;
+}
+
+void wxCDMLibHelpDialog::CreateControls()
+{
+ wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
+
+
+ wxStaticText* title = new wxStaticText(this, wxID_ANY, wxT("Managing your libraries"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);//new wxRichTextCtrl(this,wxID_ANY, wxString("Create a new project"), wxDefaultPosition, wxDefaultSize, wxRE_READONLY);
+ v_sizer1->Add(title, 0, wxALIGN_LEFT | wxALL | wxALIGN_CENTER_VERTICAL, 5);
+
+ wxStaticText* instruction = new wxStaticText(
+ this,
+ wxID_ANY,
+ crea::std2wx(
+ "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"
+ "\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."),
+ wxDefaultPosition,
+ wxDefaultSize,
+ wxALIGN_LEFT
+ );
+ v_sizer1->Add(instruction, 0,wxEXPAND | wxALL, 5);
+
+ 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);
+
+ SetSizer(v_sizer1);
+
+}
+
+void wxCDMLibHelpDialog::OnFinish(wxCommandEvent& event)
+{
+ this->EndDialog(wxID_CANCEL);
+}
+
+void wxCDMLibHelpDialog::OnEditCMake(wxCommandEvent& event)
+{
+ //TODO: implement method
+ std::cout << "OnEditCMake not implemented yet." << std::endl;
+ event.Skip();
+}
+
+
+void wxCDMLibHelpDialog::OnEditCMakeMouseEnter(wxMouseEvent& event)
+{
+ //TODO: implement method
+ std::cout << "OnEditCMakeEnter not implemented yet." << std::endl;
+ event.Skip();
+}
+
+void wxCDMLibHelpDialog::OnEditCMakeMouseExit(wxMouseEvent& event)
+{
+ //TODO: implement method
+ std::cout << "OnEditCMakeExit not implemented yet." << std::endl;
+ event.Skip();
+}
+
+
+void wxCDMLibHelpDialog::OnDisableHelp(wxCommandEvent& event)
+{
+ wxPostEvent(this->GetParent(), event);
+}
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# 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.
+# ------------------------------------------------------------------------
+*/
+
+
+/*
+ * wxCDMLibHelpDialog.h
+ *
+ * Created on: 11/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#ifndef WXCDMLIBHELPDIALOG_H_
+#define WXCDMLIBHELPDIALOG_H_
+
+#include <creaWx.h>
+#include <wx/dialog.h>
+
+#include "modelCDMLib.h"
+
+class wxCDMLibHelpDialog : public wxDialog
+{
+ DECLARE_EVENT_TABLE()
+public:
+ wxCDMLibHelpDialog(
+ wxWindow* parent,
+ modelCDMLib* lib,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Managing Libraries"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(350,600),
+ long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
+ );
+ ~wxCDMLibHelpDialog();
+ bool Create(
+ wxWindow* parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Managing Libraries"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(350,600),
+ long style = wxDEFAULT_DIALOG_STYLE
+ );
+
+protected:
+ void CreateControls();
+
+//attributes
+private:
+ modelCDMLib* lib;
+
+//handlers
+protected:
+ void OnFinish(wxCommandEvent& event);
+
+ void OnEditCMake(wxCommandEvent& event);
+
+ void OnEditCMakeMouseEnter(wxMouseEvent& event);
+ void OnEditCMakeMouseExit(wxMouseEvent& event);
+
+ void OnDisableHelp(wxCommandEvent& event);
+};
+
+#endif /* WXCDMLIBHELPDIALOG_H_ */
#include "CDMUtilities.h"
#include "wxCDMMainFrame.h"
+#include "wxCDMLibraryHelpDialog.h"
+
#include "creaDevManagerIds.h"
#include "images/LIcon64.xpm"
//Assign sizer
SetSizer(sizer);
sizer->SetSizeHints(this);
+
+ if (((wxCDMMainFrame*)this->GetParent())->isHelp())
+ {
+ wxCDMLibraryHelpDialog* helpDialog = new wxCDMLibraryHelpDialog(this->GetParent(), this->library, wxID_ANY);
+ helpDialog->Show(true);
+ }
}
void wxCDMLibraryDescriptionPanel::OnBtnReturn(wxCommandEvent& event)
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# 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.
+# ------------------------------------------------------------------------
+ */
+
+
+/*
+ * wxCDMLibraryHelpDialog.cpp
+ *
+ * Created on: 11/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#include "wxCDMLibraryHelpDialog.h"
+
+#include "creaDevManagerIds.h"
+
+BEGIN_EVENT_TABLE(wxCDMLibraryHelpDialog, wxDialog)
+EVT_BUTTON(ID_BUTTON_CANCEL, wxCDMLibraryHelpDialog::OnFinish)
+EVT_BUTTON(ID_BUTTON_OPENPROJECT, wxCDMLibraryHelpDialog::OnCMakeLists)
+EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMLibraryHelpDialog::OnCMakeLists)
+EVT_CHECKBOX(ID_CHECKBOX_DISABLE_HELP, wxCDMLibraryHelpDialog::OnDisableHelp)
+END_EVENT_TABLE()
+
+wxCDMLibraryHelpDialog::wxCDMLibraryHelpDialog(
+ wxWindow* parent,
+ modelCDMLibrary* library,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& position,
+ const wxSize& size,
+ long style
+)
+{
+ wxCDMLibraryHelpDialog::Create(parent, id, caption, position, size, style);
+ this->library = library;
+}
+
+wxCDMLibraryHelpDialog::~wxCDMLibraryHelpDialog()
+{
+}
+
+bool wxCDMLibraryHelpDialog::Create(
+ wxWindow* parent,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& position,
+ const wxSize& size,
+ long int style
+)
+{
+ wxDialog::Create(parent, id, caption, position, size, style);
+
+ this->CreateControls();
+
+ return TRUE;
+}
+
+void wxCDMLibraryHelpDialog::CreateControls()
+{
+
+ wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
+
+
+ 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);
+ v_sizer1->Add(title, 0, wxALIGN_LEFT | wxALL | wxALIGN_CENTER_VERTICAL, 5);
+
+ wxStaticText* instruction = new wxStaticText(
+ this,
+ wxID_ANY,
+ crea::std2wx(
+ "Libraries are made to expose the projects' main functionalities to the applications and black boxes of the project. "
+ "The functions and classes available in the libraries are the core of any project, thus they should implement important "
+ "tasks such as image processing algorithms or point cloud processing algorithms."
+ "Libraries are stored in the project's lib folder and each library has its own dedicated folder. Inside these folders "
+ "each library has its classes.\n"
+ "\n"
+ "To start developing a library, go ahead and create a new class with the button \"Create Class\" and implement the main "
+ "functionalities of your project inside the created files.\n"
+ "If you need to separate classes in folders you can do it by creating a folder with the \"Create Folder\" button.\n"
+ "Then, in order to include your libraries in the project correctly you must include them in the lib's folder "
+ "\"CMakeLists.txt\" file. Also, if you create additional folders in your library you should include them in the library's "
+ "\"CMakeLists.txt\" file.\n"
+ "\n"
+ "You can easily edit the CMakeLists files previously mentioned by clicking on the following buttons."),
+ wxDefaultPosition,
+ wxDefaultSize,
+ wxALIGN_LEFT
+ );
+ v_sizer1->Add(instruction, 0,wxEXPAND | wxALL, 5);
+
+ wxButton* editCMakePKGBtn = new wxButton(this, ID_BUTTON_EDIT_CMAKELISTSFILE, wxT("Open Library's directory CMakeLists file"));
+ wxButton* editCMakePRJBtn= new wxButton(this, ID_BUTTON_OPENPROJECT, wxT("Open Lib's directory CMakeLists file"));
+
+ v_sizer1->Add(editCMakePKGBtn, 0, wxEXPAND | wxLEFT | wxRIGHT, 15);
+ v_sizer1->Add(editCMakePRJBtn, 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);
+
+ SetSizer(v_sizer1);
+ //v_sizer1->RecalcSizes();
+}
+
+void wxCDMLibraryHelpDialog::OnFinish(wxCommandEvent& event)
+{
+ this->EndDialog(wxID_CANCEL);
+}
+
+void wxCDMLibraryHelpDialog::OnCMakeLists(wxCommandEvent& event)
+{
+ //TODO: implement method
+ std::cout << "OnCMakeLists not implemented yet." << std::endl;
+ event.Skip();
+}
+
+void wxCDMLibraryHelpDialog::OnCMakeListsEnter(wxMouseEvent& event)
+{
+ //TODO: implement method
+ std::cout << "OnCMakeListsEnter not implemented yet." << std::endl;
+ event.Skip();
+}
+
+void wxCDMLibraryHelpDialog::OnCMakeListsExit(wxMouseEvent& event)
+{
+ //TODO: implement method
+ std::cout << "OnCMakeListsExit not implemented yet." << std::endl;
+ event.Skip();
+}
+
+void wxCDMLibraryHelpDialog::OnDisableHelp(wxCommandEvent& event)
+{
+ wxPostEvent(this->GetParent(), event);
+}
--- /dev/null
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# 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.
+# ------------------------------------------------------------------------
+*/
+
+
+/*
+ * wxCDMLibraryHelpDialog.h
+ *
+ * Created on: 11/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#ifndef WXCDMLIBRARYHELPDIALOG_H_
+#define WXCDMLIRBARYHELPDIALOG_H_
+
+#include <creaWx.h>
+#include <wx/dialog.h>
+
+#include "modelCDMLibrary.h"
+
+#include <vector>
+
+class wxCDMLibraryHelpDialog : public wxDialog
+{
+ DECLARE_EVENT_TABLE()
+public:
+ wxCDMLibraryHelpDialog(
+ wxWindow* parent,
+ modelCDMLibrary* library,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Working With Libraries"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(410,650),
+ long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
+ );
+ ~wxCDMLibraryHelpDialog();
+ bool Create(
+ wxWindow* parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Working With Libraries"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(410,650),
+ long style = wxDEFAULT_DIALOG_STYLE
+ );
+
+protected:
+ void CreateControls();
+
+private:
+ modelCDMLibrary* library;
+
+//handlers
+protected:
+ void OnFinish(wxCommandEvent& event);
+
+ void OnCMakeLists(wxCommandEvent& event);
+
+ void OnCMakeListsEnter(wxMouseEvent& event);
+ void OnCMakeListsExit(wxMouseEvent& event);
+
+ void OnDisableHelp(wxCommandEvent& event);
+};
+
+#endif /* WXCDMLIRBARYHELPDIALOG_H_ */
if (((wxCDMMainFrame*)this->GetParent())->isHelp())
{
- std::vector<modelCDMCMakeListsFile*> files;
- wxCDMPackageHelpDialog* helpDialog = new wxCDMPackageHelpDialog(this->GetParent(), files, wxID_ANY);
+ wxCDMPackageHelpDialog* helpDialog = new wxCDMPackageHelpDialog(this->GetParent(), this->package, wxID_ANY);
helpDialog->Show(true);
}
}
wxCDMPackageHelpDialog::wxCDMPackageHelpDialog(
wxWindow* parent,
- std::vector<modelCDMCMakeListsFile*>& files,
+ modelCDMPackage* package,
wxWindowID id,
const wxString& caption,
const wxPoint& position,
)
{
wxCDMPackageHelpDialog::Create(parent, id, caption, position, size, style);
- this->cmakefiles = files;
+ this->package = package;
}
wxCDMPackageHelpDialog::~wxCDMPackageHelpDialog()
#include <creaWx.h>
#include <wx/dialog.h>
-#include "modelCDMCMakeListsFile.h"
+#include "modelCDMPackage.h"
#include <vector>
public:
wxCDMPackageHelpDialog(
wxWindow* parent,
- std::vector<modelCDMCMakeListsFile*> & files,
+ modelCDMPackage* package,
wxWindowID id = wxID_ANY,
const wxString& caption = wxT("Working With Packages"),
const wxPoint& position = wxDefaultPosition,
void CreateControls();
private:
- std::vector<modelCDMCMakeListsFile*> cmakefiles;
+ modelCDMPackage* package;
//handlers
protected:
if(((wxCDMMainFrame*)this->GetParent())->isHelp())
{
- wxCDMProjectHelpDialog* helpDialog = new wxCDMProjectHelpDialog(this->GetParent(), this, wxID_ANY);
+ wxCDMProjectHelpDialog* helpDialog = new wxCDMProjectHelpDialog(this->GetParent(), this->project, wxID_ANY);
helpDialog->Show(true);
}
}
BEGIN_EVENT_TABLE(wxCDMProjectHelpDialog, wxDialog)
EVT_BUTTON(ID_BUTTON_CANCEL, wxCDMProjectHelpDialog::OnFinish)
-EVT_BUTTON(ID_BUTTON_GOTO_PACKAGE_MANAGER, wxCDMProjectHelpDialog::OnManagePackages)
-EVT_BUTTON(ID_BUTTON_GOTO_LIB_MANAGER, wxCDMProjectHelpDialog::OnManageLibraries)
-EVT_BUTTON(ID_BUTTON_GOTO_APPLI_MANAGER, wxCDMProjectHelpDialog::OnManageApplications)
EVT_CHECKBOX(ID_CHECKBOX_DISABLE_HELP, wxCDMProjectHelpDialog::OnDisableHelp)
END_EVENT_TABLE()
wxCDMProjectHelpDialog::wxCDMProjectHelpDialog(
wxWindow* parent,
- wxCDMProjectDescriptionPanel* projectDescription,
+ modelCDMProject* project,
wxWindowID id,
const wxString& caption,
const wxPoint& position,
)
{
wxCDMProjectHelpDialog::Create(parent, id, caption, position, size, style);
- this->projectDescription = projectDescription;
+ this->project = project;
}
wxCDMProjectHelpDialog::~wxCDMProjectHelpDialog()
"- Applications: Stand alone programs that use the functions available on your libraries.\n"
"- Configuration file: Contains the information of what should or shouldn't be compiled from this project.\n"
"\n"
- "To the right of the project you will find a tree with the project structure and it's actual content.\n"
+ "To the right of the description panel you will find a tree with the project structure and it's actual content.\n"
+ "Bellow the description panel you will find a panel with the project's main actions when you're ready to compile "
+ "the project. you can hover on this buttons to see more information about what they do.\n"
"When you create a project it comes with a default package. If you need to work on it or if you want to create more "
"packages you can do it by clicking the \"Package Manager\" button bellow. You can also work with Libraries and "
"Applications. Just click in the \"Library Manager\" button or \"Application manager\" button to start working "
this->EndDialog(wxID_CANCEL);
}
-void wxCDMProjectHelpDialog::OnManagePackages(wxCommandEvent& event)
-{
- wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
- newEvent->SetId(1);
- newEvent->SetString(wxT("manage_packages"));
- newEvent->SetInt(this->projectDescription->GetProject()->GetId());
- wxPostEvent(this->GetParent(), *newEvent);
- event.Skip();
-
- this->EndDialog(wxID_OK);
-}
-
-void wxCDMProjectHelpDialog::OnManageLibraries(wxCommandEvent& event)
-{
- wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
- newEvent->SetId(1);
- newEvent->SetString(wxT("manage_libraries"));
- wxPostEvent(this->GetParent(), *newEvent);
-
- wxCommandEvent* newEvent1 = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
-
- if(this->projectDescription->GetProject()->GetLib() != NULL)
- {
- int CMId = this->projectDescription->GetProject()->GetLib()->GetId();
- newEvent1->SetInt(CMId);
- newEvent1->SetId(0);
- wxPostEvent(this->GetParent(), *newEvent1);
- }
-
- event.Skip();
-
- this->EndDialog(wxID_OK);
-}
-
-void wxCDMProjectHelpDialog::OnManageApplications(wxCommandEvent& event)
-{
- wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
- newEvent->SetId(1);
- newEvent->SetString(wxT("manage_applications"));
- wxPostEvent(this->GetParent(), *newEvent);
-
- wxCommandEvent* newEvent1 = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
-
- if(this->projectDescription->GetProject()->GetAppli() != NULL)
- {
- int CMId = this->projectDescription->GetProject()->GetAppli()->GetId();
- newEvent1->SetInt(CMId);
- newEvent1->SetId(0);
- wxPostEvent(this->GetParent(), *newEvent1);
- }
-
- event.Skip();
-
- this->EndDialog(wxID_OK);
-}
-
-void wxCDMProjectHelpDialog::OnAppliMouseEnter(wxMouseEvent& event)
-{
- wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED);
-
- if(this->projectDescription->GetProject()->GetAppli() != NULL)
- {
- int AppId = this->projectDescription->GetProject()->GetAppli()->GetId();
- newEvent->SetInt(AppId);
- newEvent->SetId(0);
- wxPostEvent(this->GetParent(), *newEvent);
- }
- event.Skip();
-}
-
-void wxCDMProjectHelpDialog::OnAppliMouseExit(wxMouseEvent& event)
-{
- wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
-
- if(this->projectDescription->GetProject()->GetAppli() != NULL)
- {
- int AppId = this->projectDescription->GetProject()->GetAppli()->GetId();
- newEvent->SetInt(AppId);
- newEvent->SetId(0);
- wxPostEvent(this->GetParent(), *newEvent);
- }
- event.Skip();
-}
-
-void wxCDMProjectHelpDialog::OnLibMouseEnter(wxMouseEvent& event)
-{
- wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED);
-
- if(this->projectDescription->GetProject()->GetLib() != NULL)
- {
- int LbId = this->projectDescription->GetProject()->GetLib()->GetId();
- newEvent->SetInt(LbId);
- newEvent->SetId(0);
- wxPostEvent(this->GetParent(), *newEvent);
- }
- event.Skip();
-}
-
-void wxCDMProjectHelpDialog::OnLibMouseExit(wxMouseEvent& event)
-{
- wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
-
- if(this->projectDescription->GetProject()->GetLib() != NULL)
- {
- int LbId = this->projectDescription->GetProject()->GetLib()->GetId();
- newEvent->SetInt(LbId);
- newEvent->SetId(0);
- wxPostEvent(this->GetParent(), *newEvent);
- }
- event.Skip();
-}
-
void wxCDMProjectHelpDialog::OnDisableHelp(wxCommandEvent& event)
{
wxPostEvent(this->GetParent(), event);
public:
wxCDMProjectHelpDialog(
wxWindow* parent,
- wxCDMProjectDescriptionPanel* projectDescription,
+ modelCDMProject* project,
wxWindowID id = wxID_ANY,
const wxString& caption = wxT("Project Ready"),
const wxPoint& position = wxDefaultPosition,
//attributes
private:
- wxCDMProjectDescriptionPanel* projectDescription;
+ modelCDMProject* project;
//handlers
protected:
void OnFinish(wxCommandEvent& event);
- void OnManagePackages(wxCommandEvent& event);
- void OnManageLibraries(wxCommandEvent& event);
- void OnManageApplications(wxCommandEvent& event);
-
- void OnAppliMouseEnter(wxMouseEvent& event);
- void OnAppliMouseExit(wxMouseEvent& event);
- void OnLibMouseEnter(wxMouseEvent& event);
- void OnLibMouseExit(wxMouseEvent& event);
-
void OnDisableHelp(wxCommandEvent& event);
};