~ubuntu-branches/ubuntu/hardy/codeblocks/hardy-backports

« back to all changes in this revision

Viewing changes to src/include/newfromtemplatedlg.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Casadevall
  • Date: 2008-07-17 04:39:23 UTC
  • Revision ID: james.westby@ubuntu.com-20080717043923-gmsy5cwkdjswghkm
Tags: upstream-8.02
ImportĀ upstreamĀ versionĀ 8.02

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
 
3
 * http://www.gnu.org/licenses/lgpl-3.0.html
 
4
 */
 
5
 
 
6
#ifndef NEWFROMTEMPLATEDLG_H
 
7
#define NEWFROMTEMPLATEDLG_H
 
8
 
 
9
#include <wx/dialog.h>
 
10
#include "globals.h"
 
11
#include "pluginmanager.h"
 
12
#include "cbplugin.h"
 
13
 
 
14
class wxChoice;
 
15
class wxListCtrl;
 
16
class wxListEvent;
 
17
class ProjectTemplateLoader;
 
18
 
 
19
class NewFromTemplateDlg : public wxDialog
 
20
{
 
21
        public:
 
22
                NewFromTemplateDlg(TemplateOutputType initial, const wxArrayString& user_templates);
 
23
                virtual ~NewFromTemplateDlg();
 
24
 
 
25
                ProjectTemplateLoader* GetTemplate(){ return m_Template; }
 
26
                cbWizardPlugin* GetWizard(){ return m_pWizard; }
 
27
                int GetWizardIndex() const { return m_WizardIndex; }
 
28
                cbWizardPlugin* GetSelectedTemplate();
 
29
                bool SelectedUserTemplate() const;
 
30
                wxString GetSelectedUserTemplate() const;
 
31
 
 
32
                void EndModal(int retCode);
 
33
        protected:
 
34
                void FillTemplate(ProjectTemplateLoader* pt);
 
35
                void BuildCategories();
 
36
                void BuildCategoriesFor(TemplateOutputType otype, wxChoice* cat);
 
37
                void BuildList();
 
38
                void BuildListFor(TemplateOutputType otype, wxListCtrl* list, const wxChoice* cat);
 
39
                void ClearList();
 
40
                void ClearListFor(wxListCtrl* list);
 
41
                void OnListRightClick(wxListEvent& event);
 
42
                void OnListActivate(wxListEvent& event);
 
43
                void OnCategoryChanged(wxCommandEvent& event);
 
44
                void OnEditScript(wxCommandEvent& event);
 
45
                void OnDiscardScript(wxCommandEvent& event);
 
46
                void OnEditGlobalScript(wxCommandEvent& event);
 
47
                void OnViewChange(wxCommandEvent& event);
 
48
                void OnHelp(wxCommandEvent& event);
 
49
                void OnUpdateUI(wxUpdateUIEvent& event);
 
50
 
 
51
                void ChangeView();
 
52
                void EditScript(const wxString& filename);
 
53
                wxListCtrl* GetVisibleListCtrl();
 
54
                wxChoice* GetVisibleCategory();
 
55
                TemplateOutputType GetVisibleOutputType() const;
 
56
        private:
 
57
                ProjectTemplateLoader* m_Template;
 
58
                cbWizardPlugin* m_pWizard;
 
59
                int m_WizardIndex;
 
60
                PluginsArray m_Wizards;
 
61
                DECLARE_EVENT_TABLE()
 
62
};
 
63
 
 
64
#endif // NEWFROMTEMPLATEDLG_H