Code::Blocks
SVN r11506
|
#include <templatemanager.h>
Public Member Functions | |
void | CreateMenu (wxMenuBar *menuBar) |
void | ReleaseMenu (wxMenuBar *menuBar) |
void | BuildToolsMenu (wxMenu *menu) |
cbProject * | New (TemplateOutputType initial=totProject, wxString *pFilename=nullptr) |
wxString | GetLastCreatedFilename () const |
void | SaveUserTemplate (cbProject *prj) |
Protected Member Functions | |
void | LoadTemplates () |
void | LoadUserTemplates () |
cbProject * | NewFromTemplate (NewFromTemplateDlg &dlg, wxString *pFilename=nullptr) |
cbProject * | NewProjectFromUserTemplate (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 TemplateManager * | Get () |
static void | Free () |
Definition at line 23 of file templatemanager.h.
|
private |
Definition at line 38 of file templatemanager.cpp.
References Manager::Get(), and Manager::GetAppWindow().
|
overrideprivate |
Definition at line 44 of file templatemanager.cpp.
void TemplateManager::BuildToolsMenu | ( | wxMenu * | menu | ) |
Definition at line 57 of file templatemanager.cpp.
void TemplateManager::CreateMenu | ( | wxMenuBar * | menuBar | ) |
Definition at line 49 of file templatemanager.cpp.
wxString TemplateManager::GetLastCreatedFilename | ( | ) | const |
|
protected |
|
protected |
Definition at line 61 of file templatemanager.cpp.
References _T, wxArrayString::Add(), wxArrayString::Clear(), LogManager::DebugLog(), F(), Manager::Get(), ConfigManager::GetConfigFolder(), wxArrayString::GetCount(), wxDir::GetFirst(), Manager::GetLogManager(), wxDir::GetNext(), wxDir::IsOpened(), m_UserTemplates, wxDIR_DIRS, and wxDirExists().
Referenced by New().
cbProject * TemplateManager::New | ( | TemplateOutputType | initial = totProject , |
wxString * | pFilename = nullptr |
||
) |
Definition at line 84 of file templatemanager.cpp.
References LoadUserTemplates(), m_UserTemplates, NewFromTemplate(), NewProjectFromUserTemplate(), NULL, PlaceWindow(), NewFromTemplateDlg::SelectedUserTemplate(), wxDialog::ShowModal(), and wxID_OK.
Referenced by MainFrame::OnFileNewWhat().
|
protected |
Definition at line 101 of file templatemanager.cpp.
References cbWizardPlugin::GetOutputType(), NewFromTemplateDlg::GetWizard(), NewFromTemplateDlg::GetWizardIndex(), cbWizardPlugin::Launch(), NULL, totCustom, totFiles, totProject, totTarget, and totUser.
Referenced by New().
|
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().
void TemplateManager::ReleaseMenu | ( | wxMenuBar * | menuBar | ) |
Definition at line 53 of file templatemanager.cpp.
void TemplateManager::SaveUserTemplate | ( | cbProject * | prj | ) |
Definition at line 244 of file templatemanager.cpp.
References _(), _T, wxFileName::Assign(), wxString::c_str(), cbMessageBox(), CreateDirRecursively(), LogManager::DebugLog(), F(), Manager::Get(), cbProject::GetCommonTopLevelPath(), ConfigManager::GetConfigFolder(), CompileTargetBase::GetFilename(), cbProject::GetFilesCount(), cbProject::GetFilesList(), wxFileName::GetForbiddenChars(), wxFileName::GetFullPath(), Manager::GetLogManager(), wxFileName::GetPath(), CompileTargetBase::GetTitle(), wxString::Length(), wxFileName::MakeRelativeTo(), PlaceWindow(), wxString::Replace(), cbProject::Save(), cbProject::SaveAllFiles(), wxDialog::ShowModal(), wxString::wx_str(), wxCopyFile(), wxDirExists(), wxICON_ERROR, wxICON_INFORMATION, wxID_OK, wxMkdir(), wxOK, and wxT.
Referenced by MainFrame::OnFileSaveProjectTemplate().
|
friend |
Definition at line 25 of file templatemanager.h.
|
protected |
Definition at line 39 of file templatemanager.h.
Referenced by LoadUserTemplates(), and New().