2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
10 # This software is governed by the CeCILL-B license under French law and
11 # abiding by the rules of distribution of free software. You can use,
12 # modify and/ or redistribute the software under the terms of the CeCILL-B
13 # license as circulated by CEA, CNRS and INRIA at the following URL
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 # or in the file LICENSE.txt.
17 # As a counterpart to the access to the source code and rights to copy,
18 # modify and redistribute granted by the license, users are provided only
19 # with a limited warranty and the software's author, the holder of the
20 # economic rights, and the successive licensors have only limited
23 # The fact that you are presently reading this means that you have had
24 # knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------
30 * wxCDMNewProjectDialog.h
32 * Created on: 13/11/2012
33 * Author: Daniel Felipe Gonzalez Obando
36 #ifndef WXCDMNEWPROJECTDIALOG_H_
37 #define WXCDMNEWPROJECTDIALOG_H_
40 #include <wx/dialog.h>
43 * Dialog to create a new Crea Project.
45 class wxCDMNewProjectDialog : public wxDialog
50 * New Project Dialog Constructor.
51 * @param parent Parent window reference.
52 * @param id Dialog ID. By default wxID_ANY.
53 * @param caption Dialog label. By default "New Project".
54 * @param position Dialog position. By default wxDefaultPosition.
55 * @param size Dialog size. By default 700, 400.
56 * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER.
58 wxCDMNewProjectDialog(
60 wxWindowID id = wxID_ANY,
61 const wxString& caption = wxT("New Project"),
62 const wxPoint& position = wxDefaultPosition,
63 const wxSize& size = wxSize(700,400),
64 long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
69 ~wxCDMNewProjectDialog();
71 * New Project Dialog Creator.
72 * @param parent Parent window reference.
73 * @param id Dialog ID. By default wxID_ANY.
74 * @param caption Dialog label. By default "New Project".
75 * @param position Dialog position. By default wxDefaultPosition.
76 * @param size Dialog size. By default 700, 400.
77 * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER.
78 * @return True if the creation was successful.
82 wxWindowID id = wxID_ANY,
83 const wxString& caption = wxT("New Project"),
84 const wxPoint& position = wxDefaultPosition,
85 const wxSize& size = wxSize(700,400),
86 long style = wxDEFAULT_DIALOG_STYLE
90 * Returns the project location chosen by the user.
91 * @return Project creation path.
93 const wxString GetProjectLocation();
95 * Returns the project name chosen by the user.
96 * @return Project name.
98 const wxString GetProjectName();
100 * Returns the default package authors chosen by the user.
101 * @return Default Package authors.
103 const wxString GetPackageAuthor();
105 * Returns the default package description chosen by the user.
106 * @return Default Package description.
108 const wxString GetPackageDescription();
112 * Creates the visual controls of the Dialog.
114 void CreateControls();
118 * Project creation path.
120 wxStaticText* projectLocation;
124 wxTextCtrl* projectName;
126 * Default Package Author.
128 wxTextCtrl* packageAuthor;
130 * Default Package Description.
132 wxTextCtrl* packageDescription;
137 * Handles when the create project button is pressed. If no path or no author was specified, the dialog shows an error.
138 * @param event Unused event.
140 void OnCreateProject(wxCommandEvent& event);
142 * Handles when the cancel button is pressed.
143 * @param event Unused event.
145 void OnCancel(wxCommandEvent& event);
147 * Handles when the choose location is pressed. a Directory dialog is shown and the new project location is chosen.
148 * @param event Unused event.
150 void OnChooseLocation(wxCommandEvent& event);
153 #endif /* WXCDMNEWPROJECTDIALOG_H_ */