#define ID_CHECKBOX_ENABLE_HELP 10334
#define ID_CHECKBOX_DISABLE_HELP 10335
-#define ID_CHECKBOX_TOGGLE_HELP 10335
+#define ID_CHECKBOX_TOGGLE_HELP 10335
#endif /* CREADEVMANAGERIDS_H_ */
{
//parse name
std::vector<std::string> words;
- CDMUtilities::splitter::split(words, name, " \n\",/\\", CDMUtilities::splitter::no_empties);
+ CDMUtilities::splitter::split(words, name, " \n\",/\\'", CDMUtilities::splitter::no_empties);
std::string bbName;
for (int i = 0; i < words.size(); i++)
{
}
//parse categories
- CDMUtilities::splitter::split(words, categories, " \n\",/\\", CDMUtilities::splitter::no_empties);
+ CDMUtilities::splitter::split(words, categories, " \n\",/\\'", CDMUtilities::splitter::no_empties);
std::string bbCategories;
if(words.size() > 0)
{
bbCategories = "empty";
//parse authors
- CDMUtilities::splitter::split(words, authors, "\n\",/\\", CDMUtilities::splitter::no_empties);
+ CDMUtilities::splitter::split(words, authors, "\n\",/\\'", CDMUtilities::splitter::no_empties);
std::string bbAuthors;
if(words.size() > 0)
{
bbAuthors = "Unknown";
//parse description
- CDMUtilities::splitter::split(words, authorsEmail, " \n\"/\\", CDMUtilities::splitter::no_empties);
+ CDMUtilities::splitter::split(words, authorsEmail, " \n\"/\\'", CDMUtilities::splitter::no_empties);
std::string bbDescription;
if(words.size() > 0)
{
}
bbDescription += " - ";
}
- CDMUtilities::splitter::split(words, description, "\n\"/\\", CDMUtilities::splitter::no_empties);
+ CDMUtilities::splitter::split(words, description, "\n\"/\\'", CDMUtilities::splitter::no_empties);
if(words.size() > 0)
{
bbDescription += words[0];
#include "wxCDMMainDescriptionPanel.h"
+#include "wxCDMMainFrame.h"
+
+#include "wxCDMMainHelpDialog.h"
+
#include "creaDevManagerIds.h"
#include "images/CIcon64.xpm"
BEGIN_EVENT_TABLE(wxCDMMainDescriptionPanel, wxPanel)
EVT_MENU(ID_MENU_NEW_PROJECT, wxCDMMainDescriptionPanel::OnBtnNewProject)
EVT_MENU(ID_MENU_OPEN_PROJECT, wxCDMMainDescriptionPanel::OnBtnOpenProject)
+
END_EVENT_TABLE()
wxCDMMainDescriptionPanel::wxCDMMainDescriptionPanel(
//Asign sizer
sizer->SetSizeHints(this);
SetSizer(sizer);
+
+ if(((wxCDMMainFrame*)this->GetParent())->isHelp())
+ {
+ wxDialog* helpDialog = new wxCDMMainHelpDialog(this->GetParent(), this, wxID_ANY);
+ helpDialog->Show(true);
+ }
+
}
void wxCDMMainDescriptionPanel::OnBtnNewProject(wxCommandEvent& event)
#include "wxCDMProjectActionsPanel.h"
#include "wxCDMNewProjectDialog.h"
-#include "wxCDMProjectHelpDialog.h"
BEGIN_EVENT_TABLE(wxCDMMainFrame, wxFrame)
EVT_MENU(ID_MENU_REPORT_BUG, wxCDMMainFrame::OnMenuReportBug)
EVT_MENU(ID_MENU_ABOUT_CREADEVMANAGER, wxCDMMainFrame::OnMenuAboutCreaDevManager)
EVT_MENU(ID_MENU_ABOUT_CREATIS, wxCDMMainFrame::OnMenuAboutCreatis)
+
EVT_BUTTON(ID_BUTTON_NEWPROJECT, wxCDMMainFrame::OnMenuNewProject)
EVT_BUTTON(ID_BUTTON_OPENPROJECT, wxCDMMainFrame::OnMenuOpenProject)
+
EVT_TREE_SEL_CHANGED(ID_TREE_PROJECTS, wxCDMMainFrame::OnTreeSelectionChanged)
+
EVT_COMMAND(wxID_ANY, wxEVT_DISPLAY_CHANGED, wxCDMMainFrame::OnCreationComplete)
EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_LIST_ITEM_SELECTED, wxCDMMainFrame::OnElementSelected)
EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxCDMMainFrame::OnElementDeselected)
+
+
EVT_CHECKBOX(ID_CHECKBOX_DISABLE_HELP, wxCDMMainFrame::OnDisableHelp)
END_EVENT_TABLE()
return this->model;
}
+wxPanel* wxCDMMainFrame::GetPropertiesPanel() const
+{
+ return this->panel_Properties;
+}
+
+bool wxCDMMainFrame::isHelp() const
+{
+ return this->help;
+}
+
void wxCDMMainFrame::RefreshProject()
{
std::string* result;
//project
modelCDMProject* elementProject = dynamic_cast<modelCDMProject*>(element);
wxPanel* description;
- wxDialog* helpDialog = NULL;
if(elementProject != NULL)
{
//create element description
0
);
- if(this->help)
- {
- helpDialog = new wxCDMProjectHelpDialog(this, wxID_ANY);
- }
}
else
{
wxSize(600, 400),
0
);
+
}
else
{
//set new view
this->panel_Properties = description;
- if(this->help && helpDialog != NULL)
- {
- helpDialog->Show(true);
- }
+
//auiManager.AddPane(panel_Properties, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("Properties")).BestSize(600,400).CloseButton(false));
auiManager.Update();
event.Skip();
);
modelCDMMain* GetModel() const;
+ wxPanel* GetPropertiesPanel() const;
+ bool isHelp() const;
void RefreshProject();
--- /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.
+# ------------------------------------------------------------------------
+ */
+
+
+/*
+ * wxCDMMainHelpDialog.cpp
+ *
+ * Created on: 7/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#include "wxCDMMainHelpDialog.h"
+
+#include "creaDevManagerIds.h"
+
+BEGIN_EVENT_TABLE(wxCDMMainHelpDialog, wxDialog)
+EVT_BUTTON(ID_BUTTON_CANCEL, wxCDMMainHelpDialog::OnFinish)
+EVT_BUTTON(ID_BUTTON_NEWPROJECT, wxCDMMainHelpDialog::OnNewProject)
+EVT_BUTTON(ID_BUTTON_OPENPROJECT, wxCDMMainHelpDialog::OnOpenProject)
+EVT_CHECKBOX(ID_CHECKBOX_DISABLE_HELP, wxCDMMainHelpDialog::OnDisableHelp)
+END_EVENT_TABLE()
+
+wxCDMMainHelpDialog::wxCDMMainHelpDialog(
+ wxWindow* parent,
+ wxCDMMainDescriptionPanel* mainDescription,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& position,
+ const wxSize& size,
+ long style
+)
+{
+ wxCDMMainHelpDialog::Create(parent, id, caption, position, size, style);
+ this->mainDescription = mainDescription;
+}
+
+wxCDMMainHelpDialog::~wxCDMMainHelpDialog()
+{
+}
+
+bool wxCDMMainHelpDialog::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 wxCDMMainHelpDialog::CreateControls()
+{
+ wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
+
+
+ wxStaticText* title = new wxStaticText(this, wxID_ANY, wxT("Welcome to the Crea Development Manager"), 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(
+ "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."),
+ 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);
+
+ 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 wxCDMMainHelpDialog::OnFinish(wxCommandEvent& event)
+{
+ this->EndDialog(wxID_CANCEL);
+}
+
+void wxCDMMainHelpDialog::OnNewProject(wxCommandEvent& event)
+{
+ wxPostEvent(this->GetParent(), event);
+ event.Skip();
+
+ this->EndDialog(wxID_OK);
+}
+
+void wxCDMMainHelpDialog::OnOpenProject(wxCommandEvent& event)
+{
+ wxPostEvent(this->GetParent(), event);
+ event.Skip();
+
+ this->EndDialog(wxID_OK);
+}
+
+void wxCDMMainHelpDialog::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.
+# ------------------------------------------------------------------------
+*/
+
+
+/*
+ * wxCDMMainHelpDialog.h
+ *
+ * Created on: 7/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#ifndef WXCDMMAINHELPDIALOG_H_
+#define WXCDMMAINHELPDIALOG_H_
+
+#include <creaWx.h>
+#include <wx/dialog.h>
+
+#include "wxCDMMainDescriptionPanel.h"
+
+class wxCDMMainHelpDialog : public wxDialog
+{
+ DECLARE_EVENT_TABLE()
+public:
+ wxCDMMainHelpDialog(
+ wxWindow* parent,
+ wxCDMMainDescriptionPanel* packageManager,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Welcome"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(350,450),
+ long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
+ );
+ ~wxCDMMainHelpDialog();
+ bool Create(
+ wxWindow* parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Welcome"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(350,450),
+ long style = wxDEFAULT_DIALOG_STYLE
+ );
+
+protected:
+ void CreateControls();
+
+//attributes
+private:
+ wxCDMMainDescriptionPanel* mainDescription;
+
+//handlers
+protected:
+ void OnFinish(wxCommandEvent& event);
+
+ void OnNewProject(wxCommandEvent& event);
+ void OnOpenProject(wxCommandEvent& event);
+
+ void OnDisableHelp(wxCommandEvent& event);
+};
+
+#endif /* WXCDMPACKAGEMANAGERHELPDIALOG_H_ */
--- /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.
+# ------------------------------------------------------------------------
+ */
+
+
+/*
+ * wxCDMPackageManagerHelpDialog.cpp
+ *
+ * Created on: 7/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#include "wxCDMPackageManagerHelpDialog.h"
+
+#include "creaDevManagerIds.h"
+
+BEGIN_EVENT_TABLE(wxCDMPackageManagerHelpDialog, wxDialog)
+EVT_BUTTON(ID_BUTTON_CANCEL, wxCDMPackageManagerHelpDialog::OnFinish)
+EVT_BUTTON(ID_BUTTON_CREATE_PACKAGE, wxCDMPackageManagerHelpDialog::OnCreatePackage)
+EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMPackageManagerHelpDialog::OnEditCMake)
+EVT_CHECKBOX(ID_CHECKBOX_DISABLE_HELP, wxCDMPackageManagerHelpDialog::OnDisableHelp)
+END_EVENT_TABLE()
+
+wxCDMPackageManagerHelpDialog::wxCDMPackageManagerHelpDialog(
+ wxWindow* parent,
+ wxCDMPackageManagerPanel* packageManager,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& position,
+ const wxSize& size,
+ long style
+)
+{
+ wxCDMPackageManagerHelpDialog::Create(parent, id, caption, position, size, style);
+ this->packageManager = packageManager;
+}
+
+wxCDMPackageManagerHelpDialog::~wxCDMPackageManagerHelpDialog()
+{
+}
+
+bool wxCDMPackageManagerHelpDialog::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 wxCDMPackageManagerHelpDialog::CreateControls()
+{
+ wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
+
+
+ wxStaticText* title = new wxStaticText(this, wxID_ANY, wxT("Managing your 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(
+ "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."),
+ 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);
+
+ 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 wxCDMPackageManagerHelpDialog::OnFinish(wxCommandEvent& event)
+{
+ this->EndDialog(wxID_CANCEL);
+}
+
+void wxCDMPackageManagerHelpDialog::OnCreatePackage(wxCommandEvent& event)
+{
+ if(this->packageManager != NULL)
+ {
+ wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_TOOL_CLICKED);
+ wxPostEvent(this->packageManager, *newEvent);
+ }
+ event.Skip();
+
+ this->EndDialog(wxID_OK);
+}
+
+void wxCDMPackageManagerHelpDialog::OnEditCMake(wxCommandEvent& event)
+{
+ wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_TOOL_ENTER);
+ if(this->packageManager != NULL)
+ wxPostEvent(this->packageManager, *newEvent);
+ event.Skip();
+
+ this->EndDialog(wxID_OK);
+}
+
+
+void wxCDMPackageManagerHelpDialog::OnEditCMakeMouseEnter(wxMouseEvent& event)
+{
+ wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED);
+
+ if(packageManager->GetProject()->GetCMakeLists() != NULL)
+ {
+ int CMId = packageManager->GetProject()->GetCMakeLists()->GetId();
+ newEvent->SetInt(CMId);
+ newEvent->SetId(0);
+ wxPostEvent(this->GetParent(), *newEvent);
+ }
+ event.Skip();
+}
+
+void wxCDMPackageManagerHelpDialog::OnEditCMakeMouseExit(wxMouseEvent& event)
+{
+ wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
+
+ if(packageManager->GetProject()->GetCMakeLists() != NULL)
+ {
+ int CMId = packageManager->GetProject()->GetCMakeLists()->GetId();
+ newEvent->SetInt(CMId);
+ newEvent->SetId(0);
+ wxPostEvent(this->GetParent(), *newEvent);
+ }
+ event.Skip();
+}
+
+
+void wxCDMPackageManagerHelpDialog::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.
+# ------------------------------------------------------------------------
+*/
+
+
+/*
+ * wxCDMPackageManagerHelpDialog.h
+ *
+ * Created on: 7/1/2013
+ * Author: Daniel Felipe Gonzalez Obando
+ */
+
+#ifndef WXCDMPACKAGEMANAGERHELPDIALOG_H_
+#define WXCDMPACKAGEMANAGERHELPDIALOG_H_
+
+#include <creaWx.h>
+#include <wx/dialog.h>
+
+#include "wxCDMPackageManagerPanel.h"
+
+class wxCDMPackageManagerHelpDialog : public wxDialog
+{
+ DECLARE_EVENT_TABLE()
+public:
+ wxCDMPackageManagerHelpDialog(
+ wxWindow* parent,
+ wxCDMPackageManagerPanel* packageManager,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Managing Packages"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(350,450),
+ long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
+ );
+ ~wxCDMPackageManagerHelpDialog();
+ bool Create(
+ wxWindow* parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& caption = wxT("Managing Packages"),
+ const wxPoint& position = wxDefaultPosition,
+ const wxSize& size = wxSize(350,450),
+ long style = wxDEFAULT_DIALOG_STYLE
+ );
+
+protected:
+ void CreateControls();
+
+//attributes
+private:
+ wxCDMPackageManagerPanel* packageManager;
+
+//handlers
+protected:
+ void OnFinish(wxCommandEvent& event);
+
+ void OnCreatePackage(wxCommandEvent& event);
+ void OnEditCMake(wxCommandEvent& event);
+
+ void OnEditCMakeMouseEnter(wxMouseEvent& event);
+ void OnEditCMakeMouseExit(wxMouseEvent& event);
+
+ void OnDisableHelp(wxCommandEvent& event);
+};
+
+#endif /* WXCDMPACKAGEMANAGERHELPDIALOG_H_ */
#include "wxCDMMainFrame.h"
#include "wxCDMNewPackageDialog.h"
+#include "wxCDMPackageManagerHelpDialog.h"
+
#include "creaDevManagerIds.h"
#include "images/PkIcon64.xpm"
EVT_BUTTON(ID_BUTTON_PREV, wxCDMPackageManagerPanel::OnBtnReturn)
EVT_HYPERLINK(ID_LINK_SELECT_PACKAGE, wxCDMPackageManagerPanel::OnLnkPackageSelect)
EVT_BUTTON(ID_BUTTON_CREATE_PACKAGE, wxCDMPackageManagerPanel::OnBtnCreatePackage)
+EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_TOOL_CLICKED, wxCDMPackageManagerPanel::OnBtnCreatePackage)
EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMPackageManagerPanel::OnBtnEditCMakeLists)
+EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_TOOL_ENTER, wxCDMPackageManagerPanel::OnBtnEditCMakeLists)
END_EVENT_TABLE()
wxCDMPackageManagerPanel::wxCDMPackageManagerPanel(
//Assign sizer
SetSizer(sizer);
sizer->SetSizeHints(this);
+
+ if (((wxCDMMainFrame*)this->GetParent())->isHelp())
+ {
+ wxCDMPackageManagerHelpDialog* helpDialog = new wxCDMPackageManagerHelpDialog(this->GetParent(), this, wxID_ANY);
+ helpDialog->Show(true);
+ }
+}
+
+modelCDMProject* wxCDMPackageManagerPanel::GetProject() const
+{
+ return this->project;
}
void wxCDMPackageManagerPanel::OnBtnReturn(wxCommandEvent& event)
#include "modelCDMProject.h"
+
class wxCDMPackageManagerPanel : public wxPanel
{
DECLARE_EVENT_TABLE()
void CreateControls();
+ modelCDMProject* GetProject() const;
+
private:
modelCDMProject* project;
#include "wxCDMMainFrame.h"
#include "wxCDMNewPackageDialog.h"
+#include "wxCDMProjectHelpDialog.h"
+
#include "creaDevManagerIds.h"
#include "images/PrIcon64.xpm"
#include "CDMUtilities.h"
//Assign sizer
this->SetSizer(sizer);
sizer->SetSizeHints(this);
+
+ if(((wxCDMMainFrame*)this->GetParent())->isHelp())
+ {
+ wxCDMProjectHelpDialog* helpDialog = new wxCDMProjectHelpDialog(this->GetParent(), this, wxID_ANY);
+ helpDialog->Show(true);
+ }
+}
+
+modelCDMProject* wxCDMProjectDescriptionPanel::GetProject() const
+{
+ return this->project;
}
void wxCDMProjectDescriptionPanel::OnBtnManagePackages(wxCommandEvent& event)
void CreateControls();
+ modelCDMProject* GetProject() const;
+
private:
modelCDMProject* project;
wxStaticText* versiontc;
#include "wxCDMProjectHelpDialog.h"
-#include "wxCDMMainFrame.h"
+#include "wxCDMProjectDescriptionPanel.h"
#include "creaDevManagerIds.h"
wxCDMProjectHelpDialog::wxCDMProjectHelpDialog(
wxWindow* parent,
+ wxCDMProjectDescriptionPanel* projectDescription,
wxWindowID id,
const wxString& caption,
const wxPoint& position,
)
{
wxCDMProjectHelpDialog::Create(parent, id, caption, position, size, style);
+ this->projectDescription = projectDescription;
}
wxCDMProjectHelpDialog::~wxCDMProjectHelpDialog()
"Applications, just click in the \"Manage Libraries\" button or \"Manage Applications\" button to start working "
"with them.\n"
"\n"
- "Select an action or click Finish to continue working on the project."),
+ "Select an action or click Close to continue working on the project."),
wxDefaultPosition,
wxDefaultSize,
wxALIGN_LEFT
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("Cancel")), 0, wxALIGN_RIGHT | wxRIGHT | wxBOTTOM | wxALIGN_CENTER_VERTICAL, 30);
+ 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();
wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
newEvent->SetId(1);
newEvent->SetString(wxT("manage_packages"));
- newEvent->SetInt(((wxCDMMainFrame*)this->GetParent())->GetModel()->GetProject()->GetId());
+ newEvent->SetInt(this->projectDescription->GetProject()->GetId());
wxPostEvent(this->GetParent(), *newEvent);
event.Skip();
wxCommandEvent* newEvent1 = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
- if(((wxCDMMainFrame*)this->GetParent())->GetModel()->GetProject()->GetLib() != NULL)
+ if(this->projectDescription->GetProject()->GetLib() != NULL)
{
- int CMId = ((wxCDMMainFrame*)this->GetParent())->GetModel()->GetProject()->GetLib()->GetId();
+ int CMId = this->projectDescription->GetProject()->GetLib()->GetId();
newEvent1->SetInt(CMId);
newEvent1->SetId(0);
wxPostEvent(this->GetParent(), *newEvent1);
wxCommandEvent* newEvent1 = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
- if(((wxCDMMainFrame*)this->GetParent())->GetModel()->GetProject()->GetAppli() != NULL)
+ if(this->projectDescription->GetProject()->GetAppli() != NULL)
{
- int CMId = ((wxCDMMainFrame*)this->GetParent())->GetModel()->GetProject()->GetAppli()->GetId();
+ int CMId = this->projectDescription->GetProject()->GetAppli()->GetId();
newEvent1->SetInt(CMId);
newEvent1->SetId(0);
wxPostEvent(this->GetParent(), *newEvent1);
{
wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED);
- if(((wxCDMMainFrame*)this->GetParent())->GetModel()->GetProject()->GetAppli() != NULL)
+ if(this->projectDescription->GetProject()->GetAppli() != NULL)
{
- int AppId = ((wxCDMMainFrame*)this->GetParent())->GetModel()->GetProject()->GetAppli()->GetId();
+ int AppId = this->projectDescription->GetProject()->GetAppli()->GetId();
newEvent->SetInt(AppId);
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
{
wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
- if(((wxCDMMainFrame*)this->GetParent())->GetModel()->GetProject()->GetAppli() != NULL)
+ if(this->projectDescription->GetProject()->GetAppli() != NULL)
{
- int AppId = ((wxCDMMainFrame*)this->GetParent())->GetModel()->GetProject()->GetAppli()->GetId();
+ int AppId = this->projectDescription->GetProject()->GetAppli()->GetId();
newEvent->SetInt(AppId);
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
{
wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED);
- if(((wxCDMMainFrame*)this->GetParent())->GetModel()->GetProject()->GetLib() != NULL)
+ if(this->projectDescription->GetProject()->GetLib() != NULL)
{
- int LbId = ((wxCDMMainFrame*)this->GetParent())->GetModel()->GetProject()->GetLib()->GetId();
+ int LbId = this->projectDescription->GetProject()->GetLib()->GetId();
newEvent->SetInt(LbId);
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
{
wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
- if(((wxCDMMainFrame*)this->GetParent())->GetModel()->GetProject()->GetLib() != NULL)
+ if(this->projectDescription->GetProject()->GetLib() != NULL)
{
- int LbId = ((wxCDMMainFrame*)this->GetParent())->GetModel()->GetProject()->GetLib()->GetId();
+ int LbId = this->projectDescription->GetProject()->GetLib()->GetId();
newEvent->SetInt(LbId);
newEvent->SetId(0);
wxPostEvent(this->GetParent(), *newEvent);
#include <creaWx.h>
#include <wx/dialog.h>
+#include "wxCDMProjectDescriptionPanel.h"
+
class wxCDMProjectHelpDialog : public wxDialog
{
DECLARE_EVENT_TABLE()
public:
wxCDMProjectHelpDialog(
wxWindow* parent,
+ wxCDMProjectDescriptionPanel* projectDescription,
wxWindowID id = wxID_ANY,
const wxString& caption = wxT("Project Ready"),
const wxPoint& position = wxDefaultPosition,
protected:
void CreateControls();
+//attributes
+private:
+ wxCDMProjectDescriptionPanel* projectDescription;
+
//handlers
protected:
void OnFinish(wxCommandEvent& event);