void wxCDMMainHelpDialog::CreateControls()
{
+
wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
crea::std2wx(
"This application was made to help you in the creation process of Crea projects. This help dialogs will explain what "
"each part of the program does and will give you tips to get your project up and running in no time. You can disable "
- "them by checking the \"Disable Help\" option, you can also enable it at any time checking the \"Help Dialogs\" "
- "option in the Help menu.\n To begin working on your projects you can either create a new project or open an already "
- "existing project.\n"
- "\n"
- "Select an action or click Close to continue working on the project."),
+ "them by checking the \"Disable Help\" option, or you can also enable or disable them at any time checking the \"Help "
+ "Dialogs\" option in the Help menu.\n To begin working on your projects you can either create a new project or open an "
+ "already existing project.\n"),
wxDefaultPosition,
wxDefaultSize,
wxALIGN_LEFT
);
v_sizer1->Add(instruction, 0,wxEXPAND | wxALL, 5);
- wxFlexGridSizer* formItems = new wxFlexGridSizer(1,2,9,15);
-
- wxButton* createPackageBtn = new wxButton(this, ID_BUTTON_NEWPROJECT, wxT("New Project"));
- wxButton* editCMakeBtn= new wxButton(this, ID_BUTTON_OPENPROJECT, wxT("Open Project"));
-
- formItems->Add(createPackageBtn, 1, wxALIGN_CENTER);
- formItems->Add(editCMakeBtn, 1, wxALIGN_CENTER);
-
- formItems->AddGrowableCol(0,1);
- formItems->AddGrowableCol(1,1);
-
- v_sizer1->Add(formItems, 1, wxEXPAND | wxALL, 15);
+// wxFlexGridSizer* formItems = new wxFlexGridSizer(1,2,9,15);
+//
+// wxButton* createPackageBtn = new wxButton(this, ID_BUTTON_NEWPROJECT, wxT("New Project"));
+// wxButton* editCMakeBtn= new wxButton(this, ID_BUTTON_OPENPROJECT, wxT("Open Project"));
+//
+// formItems->Add(createPackageBtn, 1, wxALIGN_CENTER);
+// formItems->Add(editCMakeBtn, 1, wxALIGN_CENTER);
+//
+// formItems->AddGrowableCol(0,1);
+// formItems->AddGrowableCol(1,1);
+//
+// v_sizer1->Add(formItems, 1, wxEXPAND | wxALL, 15);
v_sizer1->Add(new wxCheckBox(this, ID_CHECKBOX_DISABLE_HELP, wxT("&Disable help")), 0, wxALIGN_RIGHT | wxRIGHT, 10);
wxWindowID id = wxID_ANY,
const wxString& caption = wxT("Welcome"),
const wxPoint& position = wxDefaultPosition,
- const wxSize& size = wxSize(350,450),
+ const wxSize& size = wxSize(350,370),
long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
);
~wxCDMMainHelpDialog();
wxWindowID id = wxID_ANY,
const wxString& caption = wxT("Welcome"),
const wxPoint& position = wxDefaultPosition,
- const wxSize& size = wxSize(350,450),
+ const wxSize& size = wxSize(350,370),
long style = wxDEFAULT_DIALOG_STYLE
);
void OnDisableHelp(wxCommandEvent& event);
};
-#endif /* WXCDMPACKAGEMANAGERHELPDIALOG_H_ */
+#endif /* WXCDMMAINHELPDIALOG_H_ */
#include <wx/textdlg.h>
#include "CDMUtilities.h"
+#include <vector>
+#include "modelCDMCMakeListsFile.h"
+#include "wxCDMPackageHelpDialog.h"
+
+
BEGIN_EVENT_TABLE(wxCDMPackageDescriptionPanel, wxPanel)
EVT_BUTTON(ID_BUTTON_PREV, wxCDMPackageDescriptionPanel::OnBtnReturn)
EVT_BUTTON(ID_BUTTON_SET_AUTHOR, wxCDMPackageDescriptionPanel::OnBtnSetAuthor)
//Assign sizer
SetSizer(sizer);
sizer->SetSizeHints(this);
+
+ if (((wxCDMMainFrame*)this->GetParent())->isHelp())
+ {
+ std::vector<modelCDMCMakeListsFile*> files;
+ wxCDMPackageHelpDialog* helpDialog = new wxCDMPackageHelpDialog(this->GetParent(), files, wxID_ANY);
+ helpDialog->Show(true);
+ }
}
void wxCDMPackageDescriptionPanel::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.
+# ------------------------------------------------------------------------
+ */
+
+
+/*
+ * wxCDMPackageHelpDialog.cpp
+ *
+ * Created on: 9/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#include "wxCDMPackageHelpDialog.h"
+
+#include "creaDevManagerIds.h"
+
+BEGIN_EVENT_TABLE(wxCDMPackageHelpDialog, wxDialog)
+EVT_BUTTON(ID_BUTTON_CANCEL, wxCDMPackageHelpDialog::OnFinish)
+EVT_CHECKBOX(ID_CHECKBOX_DISABLE_HELP, wxCDMPackageHelpDialog::OnDisableHelp)
+END_EVENT_TABLE()
+
+wxCDMPackageHelpDialog::wxCDMPackageHelpDialog(
+ wxWindow* parent,
+ std::vector<modelCDMCMakeListsFile*>& files,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& position,
+ const wxSize& size,
+ long style
+)
+{
+ wxCDMPackageHelpDialog::Create(parent, id, caption, position, size, style);
+ this->cmakefiles = files;
+}
+
+wxCDMPackageHelpDialog::~wxCDMPackageHelpDialog()
+{
+}
+
+bool wxCDMPackageHelpDialog::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 wxCDMPackageHelpDialog::CreateControls()
+{
+
+ wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
+
+
+ wxStaticText* title = new wxStaticText(this, wxID_ANY, wxT("Working with Packages"), 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(
+ "Packages contain black boxes, which allow to work modularly with other boxes. This boxes can use the functions "
+ "present in your libraries and expose them to work in a BBTK-fashion.\n"
+ "\n"
+ "To create a black box click on the \"Create Black Box\" button.\n"
+ "If you want to check the files in the file explorer click the \"Open Package Folder\" "
+ "button.\n"
+ "\n"
+ "Don't forget to include the libraries your black boxes use in the Package directory CMakeLists.txt file\n"
+ "Also, make sure you include this package in the Project directory CMakeLists.txt file\n"
+ "You can open these files with 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 wxCDMPackageHelpDialog::OnFinish(wxCommandEvent& event)
+{
+ this->EndDialog(wxID_CANCEL);
+}
+
+void wxCDMPackageHelpDialog::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.
+# ------------------------------------------------------------------------
+*/
+
+
+/*
+ * wxCDMPackageHelpDialog.h
+ *
+ * Created on: 9/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#ifndef WXCDMPACKAGEHELPDIALOG_H_
+#define WXCDMPACKAGEHELPDIALOG_H_
+
+#include <creaWx.h>
+#include <wx/dialog.h>
+
+#include "modelCDMCMakeListsFile.h"
+
+#include <vector>
+
+class wxCDMPackageHelpDialog : public wxDialog
+{
+ DECLARE_EVENT_TABLE()
+public:
+ wxCDMPackageHelpDialog(
+ wxWindow* parent,
+ std::vector<modelCDMCMakeListsFile*> & files,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Working With Packages"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(350,570),
+ long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
+ );
+ ~wxCDMPackageHelpDialog();
+ bool Create(
+ wxWindow* parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Working With Packages"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(350,570),
+ long style = wxDEFAULT_DIALOG_STYLE
+ );
+
+protected:
+ void CreateControls();
+
+private:
+ std::vector<modelCDMCMakeListsFile*> cmakefiles;
+
+//handlers
+protected:
+ void OnFinish(wxCommandEvent& event);
+
+ void OnCMakeLists(wxCommandEvent& event);
+
+ void OnCMakeListsEnter(wxMouseEvent& event);
+ void OnCMakeListsExit(wxMouseEvent& event);
+
+ void OnDisableHelp(wxCommandEvent& event);
+};
+
+#endif /* WXCDMPACKAGEHELPDIALOG_H_ */
this,
wxID_ANY,
crea::std2wx(
+ "Packages contain black boxes, which allow to work modularly with other boxes. This boxes can use the functions "
+ "present in your libraries and expose them to work in a BBTK-fashion.\n"
+ "\n"
"In the package manager you can view a list of the available packages in the current project, as well as create "
"new packages. Remember that any package you make must be included in the CMakeLists file. You can do that by "
- "clicking on the \"Edit CMakeLists File\" button and include the desired packages at the end of the file. You "
- "should also include the libraries you are using on your black boxes in this file.\n"
- "\n"
- "Select an action or click Close to continue working on the project."),
+ "clicking on the \"Edit CMakeLists File\" button in the package manager section and include the desired packages "
+ "at the end of the file. You should also include in this file those libraries your black boxes located in this "
+ "package use."),
wxDefaultPosition,
wxDefaultSize,
wxALIGN_LEFT
);
v_sizer1->Add(instruction, 0,wxEXPAND | wxALL, 5);
- wxFlexGridSizer* formItems = new wxFlexGridSizer(1,2,9,15);
-
- wxButton* createPackageBtn = new wxButton(this, ID_BUTTON_CREATE_PACKAGE, wxT("Create a Package"));
- wxButton* editCMakeBtn= new wxButton(this, ID_BUTTON_EDIT_CMAKELISTSFILE, wxT("Edit the CMakeLists File"));
- editCMakeBtn->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageManagerHelpDialog::OnEditCMakeMouseEnter,NULL,this);
- editCMakeBtn->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageManagerHelpDialog::OnEditCMakeMouseExit,NULL,this);
-
- formItems->Add(createPackageBtn, 1, wxALIGN_CENTER);
- formItems->Add(editCMakeBtn, 1, wxALIGN_CENTER);
-
- formItems->AddGrowableCol(0,1);
- formItems->AddGrowableCol(1,1);
-
- v_sizer1->Add(formItems, 1, wxEXPAND | wxALL, 15);
+// wxFlexGridSizer* formItems = new wxFlexGridSizer(1,2,9,15);
+//
+// wxButton* createPackageBtn = new wxButton(this, ID_BUTTON_CREATE_PACKAGE, wxT("Create a Package"));
+// wxButton* editCMakeBtn= new wxButton(this, ID_BUTTON_EDIT_CMAKELISTSFILE, wxT("Edit the CMakeLists File"));
+// editCMakeBtn->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageManagerHelpDialog::OnEditCMakeMouseEnter,NULL,this);
+// editCMakeBtn->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageManagerHelpDialog::OnEditCMakeMouseExit,NULL,this);
+//
+// formItems->Add(createPackageBtn, 1, wxALIGN_CENTER);
+// formItems->Add(editCMakeBtn, 1, wxALIGN_CENTER);
+//
+// formItems->AddGrowableCol(0,1);
+// formItems->AddGrowableCol(1,1);
+//
+// v_sizer1->Add(formItems, 1, wxEXPAND | wxALL, 15);
v_sizer1->Add(new wxCheckBox(this, ID_CHECKBOX_DISABLE_HELP, wxT("&Disable help")), 0, wxALIGN_RIGHT | wxRIGHT, 10);
void wxCDMProjectHelpDialog::CreateControls()
{
+
wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
wxStaticText* instruction = new wxStaticText(
this,
wxID_ANY,
- crea::std2wx("When you create a project it comes with a default package. If you need to work in it or you want to create more "
- "packages you can do it by clicking the \"Manage Packages\" button bellow. You can also work with Libraries and "
- "Applications, just click in the \"Manage Libraries\" button or \"Manage Applications\" button to start working "
- "with them.\n"
+ crea::std2wx(
+ "A project has four main elements:\n"
+ "- Packages: Host the black boxes you make.\n"
+ "- Libraries: Contain the core functions of your programs, they are called by the black boxes and applications you make.\n"
+ "- 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"
- "Select an action or click Close to continue working on the project."),
+ "To the right of the project you will find a tree with the project structure and it's actual content.\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 "
+ "with them.\n"),
wxDefaultPosition,
wxDefaultSize,
wxALIGN_LEFT
);
v_sizer1->Add(instruction, 0,wxEXPAND | wxALL, 5);
- wxFlexGridSizer* formItems = new wxFlexGridSizer(2,2,9,15);
-
- wxButton* managePackagesBtn = new wxButton(this, ID_BUTTON_GOTO_PACKAGE_MANAGER, wxT("Manage Packages"));
- wxButton* manageLibrariesBtn = new wxButton(this, ID_BUTTON_GOTO_LIB_MANAGER, wxT("Manage Libraries"));
- manageLibrariesBtn->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectHelpDialog::OnLibMouseEnter,NULL,this);
- manageLibrariesBtn->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectHelpDialog::OnLibMouseExit,NULL,this);
- wxButton* manageApplicationsBtn = new wxButton(this, ID_BUTTON_GOTO_APPLI_MANAGER, wxT("Manage Applications"));
- manageApplicationsBtn->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectHelpDialog::OnAppliMouseEnter,NULL,this);
- manageApplicationsBtn->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectHelpDialog::OnAppliMouseExit,NULL,this);
-
- formItems->Add(managePackagesBtn, 1, wxALIGN_CENTER_VERTICAL);
- formItems->Add(manageLibrariesBtn, 1, wxALIGN_CENTER_VERTICAL);
- formItems->Add(manageApplicationsBtn, 1, wxALIGN_CENTER_VERTICAL);
-
- formItems->AddGrowableCol(0,1);
- formItems->AddGrowableCol(1,1);
-
- v_sizer1->Add(formItems, 1, wxEXPAND | wxALL, 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);
wxWindowID id = wxID_ANY,
const wxString& caption = wxT("Project Ready"),
const wxPoint& position = wxDefaultPosition,
- const wxSize& size = wxSize(350,450),
+ const wxSize& size = wxSize(350,550),
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,450),
+ const wxSize& size = wxSize(350,550),
long style = wxDEFAULT_DIALOG_STYLE
);