Code::Blocks  SVN r11506
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
TemplateManager Class Reference

#include <templatemanager.h>

Inheritance diagram for TemplateManager:
Collaboration diagram for TemplateManager:

Public Member Functions

void CreateMenu (wxMenuBar *menuBar)
 
void ReleaseMenu (wxMenuBar *menuBar)
 
void BuildToolsMenu (wxMenu *menu)
 
cbProjectNew (TemplateOutputType initial=totProject, wxString *pFilename=nullptr)
 
wxString GetLastCreatedFilename () const
 
void SaveUserTemplate (cbProject *prj)
 

Protected Member Functions

void LoadTemplates ()
 
void LoadUserTemplates ()
 
cbProjectNewFromTemplate (NewFromTemplateDlg &dlg, wxString *pFilename=nullptr)
 
cbProjectNewProjectFromUserTemplate (NewFromTemplateDlg &dlg, wxString *pFilename=nullptr)
 
- Protected Member Functions inherited from Mgr< TemplateManager >
 Mgr ()
 
virtual ~Mgr ()
 

Protected Attributes

wxArrayString m_UserTemplates
 

Private Member Functions

 TemplateManager ()
 
 ~TemplateManager () override
 

Friends

class Mgr< TemplateManager >
 

Additional Inherited Members

- Static Public Member Functions inherited from Mgr< TemplateManager >
static bool Valid ()
 
static TemplateManagerGet ()
 
static void Free ()
 

Detailed Description

Definition at line 23 of file templatemanager.h.

Constructor & Destructor Documentation

◆ TemplateManager()

TemplateManager::TemplateManager ( )
private

Definition at line 38 of file templatemanager.cpp.

References Manager::Get(), and Manager::GetAppWindow().

◆ ~TemplateManager()

TemplateManager::~TemplateManager ( )
overrideprivate

Definition at line 44 of file templatemanager.cpp.

Member Function Documentation

◆ BuildToolsMenu()

void TemplateManager::BuildToolsMenu ( wxMenu menu)

Definition at line 57 of file templatemanager.cpp.

◆ CreateMenu()

void TemplateManager::CreateMenu ( wxMenuBar menuBar)

Definition at line 49 of file templatemanager.cpp.

◆ GetLastCreatedFilename()

wxString TemplateManager::GetLastCreatedFilename ( ) const

◆ LoadTemplates()

void TemplateManager::LoadTemplates ( )
protected

◆ LoadUserTemplates()

void TemplateManager::LoadUserTemplates ( )
protected

◆ New()

cbProject * TemplateManager::New ( TemplateOutputType  initial = totProject,
wxString pFilename = nullptr 
)

◆ NewFromTemplate()

cbProject * TemplateManager::NewFromTemplate ( NewFromTemplateDlg dlg,
wxString pFilename = nullptr 
)
protected

◆ NewProjectFromUserTemplate()

cbProject * TemplateManager::NewProjectFromUserTemplate ( NewFromTemplateDlg dlg,
wxString pFilename = nullptr 
)
protected

Definition at line 122 of file templatemanager.cpp.

References _(), _T, wxString::c_str(), cbEVT_PROJECT_OPEN, cbGetTextFromUser(), cbMessageBox(), ChooseDirectory(), CreateDirRecursively(), LogManager::DebugLog(), F(), FileTypeOf(), ftCodeBlocksProject, Manager::Get(), wxDir::GetAllFiles(), cbProject::GetBuildTarget(), cbProject::GetBuildTargetsCount(), CompilerFactory::GetCompiler(), CompileTargetBase::GetCompilerID(), ConfigManager::GetConfigFolder(), Manager::GetConfigManager(), wxArrayString::GetCount(), CompileTargetBase::GetFilename(), wxFileName::GetFullPath(), Manager::GetLogManager(), wxFileName::GetName(), CompileTargetBase::GetOutputFilename(), wxFileName::GetPathSeparator(), Manager::GetProjectManager(), NewFromTemplateDlg::GetSelectedUserTemplate(), Compiler::GetSwitches(), CompileTargetBase::GetTargetFilenameGenerationPolicy(), CompileTargetBase::GetTargetType(), ProjectManager::GetUI(), wxDir::HasFiles(), wxDir::HasSubDirs(), wxString::IsEmpty(), wxString::Length(), CompilerSwitches::libPrefix, ProjectManager::LoadProject(), wxFileName::MakeRelativeTo(), wxString::Mid(), NULL, wxString::Prepend(), Manager::ProcessEvent(), ConfigManager::Read(), cbProjectManagerUI::RebuildTree(), wxString::RemoveLast(), NewFromTemplateDlg::SelectedUserTemplate(), HTMLTags::sep, wxFileName::SetName(), CompileTargetBase::SetOutputFilename(), cbProject::SetTitle(), tgfpPlatformDefault, ttStaticLib, wxString::wx_str(), wxCopyFile(), wxDirExists(), wxICON_ERROR, wxICON_EXCLAMATION, wxID_YES, wxNO_DEFAULT, wxRenameFile(), and wxYES_NO.

Referenced by New().

◆ ReleaseMenu()

void TemplateManager::ReleaseMenu ( wxMenuBar menuBar)

Definition at line 53 of file templatemanager.cpp.

◆ SaveUserTemplate()

void TemplateManager::SaveUserTemplate ( cbProject prj)

Friends And Related Function Documentation

◆ Mgr< TemplateManager >

friend class Mgr< TemplateManager >
friend

Definition at line 25 of file templatemanager.h.

Member Data Documentation

◆ m_UserTemplates

wxArrayString TemplateManager::m_UserTemplates
protected

Definition at line 39 of file templatemanager.h.

Referenced by LoadUserTemplates(), and New().


The documentation for this class was generated from the following files: