25#ifndef PROJECT_TEMPLATE_SELECTOR_H 
   26#define PROJECT_TEMPLATE_SELECTOR_H 
   34#include <wx/filename.h> 
   63    void OnMouse( wxMouseEvent& event );
 
 
  116                              std::vector<std::pair<wxString, wxFileName>> aTitleDirList,
 
  117                              const wxFileName& aDefaultTemplate );
 
  161    void onReload( wxCommandEvent& event ) 
override;
 
 
DIALOG_TEMPLATE_SELECTOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Project Template Selector"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(513, 523), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
 
WEBVIEW_PANEL * m_webviewPanel
 
void AddTemplate(int aPage, PROJECT_TEMPLATE *aTemplate)
 
void OnPageChange(wxNotebookEvent &event) override
 
void onReload(wxCommandEvent &event) override
 
DIALOG_TEMPLATE_SELECTOR(wxWindow *aParent, const wxPoint &aPos, const wxSize &aSize, std::vector< std::pair< wxString, wxFileName > > aTitleDirList, const wxFileName &aDefaultTemplate)
 
PROJECT_TEMPLATE * GetDefaultTemplate()
 
void SetHtml(const wxFileName &aFilename)
 
TEMPLATE_WIDGET * m_selectedWidget
 
void onDirectoryBrowseClicked(wxCommandEvent &event) override
 
wxFileName m_defaultTemplatePath
 
void replaceCurrentPage()
Refresh the current page to show updated template list.
 
wxString m_projectToEdit
Project path to edit instead of creating new.
 
PROJECT_TEMPLATE * GetSelectedTemplate()
 
std::vector< TEMPLATE_WIDGET * > m_allWidgets
 
void SetProjectToEdit(const wxString &aPath)
Set the project path to edit (used by template widgets)
 
void SetWidget(TEMPLATE_WIDGET *aWidget)
 
void buildPageContent(const wxString &aPath, int aPage)
 
wxString GetUserTemplatesPath() const
Get the path to the user templates directory (first panel marked as user templates)
 
std::vector< TEMPLATE_SELECTION_PANEL * > m_panels
 
wxString GetProjectToEdit() const
 
TEMPLATE_WIDGET * m_defaultWidget
 
A class which provides project template functionality.
 
TEMPLATE_SELECTION_PANEL_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL|wxBORDER_NONE, const wxString &name=wxEmptyString)
 
TEMPLATE_SELECTION_PANEL(wxNotebookPage *aParent, const wxString &aPath)
 
wxString m_templatesPath
the path to access to the folder containing the templates (which are also folders)
 
bool IsUserTemplates() const
 
void AddTemplateWidget(TEMPLATE_WIDGET *aTemplateWidget)
 
bool m_isUserTemplates
true if this panel contains user templates
 
void SetIsUserTemplates(bool aIsUser)
Set whether templates in this panel are user templates (can be edited/duplicated)
 
wxNotebookPage * m_parent
 
void SortAlphabetically()
 
const wxString & GetPath() const