Code::Blocks  SVN r11506
newfromtemplatedlg.h
Go to the documentation of this file.
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 "scrollingdialog.h"
10 #include "globals.h"
11 #include "pluginmanager.h"
12 #include "cbplugin.h"
13 
14 class wxChoice;
15 class wxListCtrl;
16 class wxListEvent;
18 
20 {
21  public:
22  NewFromTemplateDlg(TemplateOutputType initial, const wxArrayString& user_templates);
23  ~NewFromTemplateDlg() override;
24 
27  int GetWizardIndex() const { return m_WizardIndex; }
29  bool SelectedUserTemplate() const;
31 
32  void EndModal(int retCode) override;
33  protected:
35  void BuildCategories();
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);
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);
56  private:
60  PluginsArray m_Wizards;
61  DECLARE_EVENT_TABLE()
62 };
63 
64 #endif // NEWFROMTEMPLATEDLG_H
void OnViewChange(wxCommandEvent &event)
ProjectTemplateLoader * m_Template
void ClearListFor(wxListCtrl *list)
wxChoice * GetVisibleCategory()
void EditScript(const wxString &filename)
void FillTemplate(ProjectTemplateLoader *pt)
void OnListRightClick(wxListEvent &event)
bool SelectedUserTemplate() const
void EndModal(int retCode) override
wxString GetSelectedUserTemplate() const
NewFromTemplateDlg(TemplateOutputType initial, const wxArrayString &user_templates)
void OnListActivate(wxListEvent &event)
cbWizardPlugin * m_pWizard
cbWizardPlugin * GetSelectedTemplate()
int GetWizardIndex() const
void OnCategoryChanged(wxCommandEvent &event)
void OnDiscardScript(wxCommandEvent &event)
wxListCtrl * GetVisibleListCtrl()
cbWizardPlugin * GetWizard()
void BuildListFor(TemplateOutputType otype, wxListCtrl *list, const wxChoice *cat)
void OnUpdateUI(wxUpdateUIEvent &event)
void BuildCategoriesFor(TemplateOutputType otype, wxChoice *cat)
void OnEditScript(wxCommandEvent &event)
TemplateOutputType
Template output types.
Definition: globals.h:145
ProjectTemplateLoader * GetTemplate()
void OnHelp(wxCommandEvent &event)
TemplateOutputType GetVisibleOutputType() const
Base class for wizard plugins.
Definition: cbplugin.h:967
void OnEditGlobalScript(wxCommandEvent &event)