Code::Blocks
SVN r11506
|
#include <vector>
#include <wx/string.h>
#include <wx/treectrl.h>
#include <wx/file.h>
#include <wx/filename.h>
#include <wx/intl.h>
#include <wx/msgdlg.h>
#include <wx/bitmap.h>
#include "settings.h"
Go to the source code of this file.
Classes | |
class | cbProjectTreeImages |
Namespaces | |
platform | |
Macros | |
#define | HL_AUTO _T(" ") |
#define | HL_NONE _T(" ") |
Typedefs | |
typedef wxString | HighlightLanguage |
typedef std::vector< wxString > | wxStringVec |
Functions | |
DLLIMPORT bool | cbRead (wxFile &file, wxString &st, wxFontEncoding encoding=wxFONTENCODING_SYSTEM) |
Reads a wxString from a non-unicode file. File must be open. File is closed automatically. More... | |
DLLIMPORT wxString | cbReadFileContents (wxFile &file, wxFontEncoding encoding=wxFONTENCODING_SYSTEM) |
Reads a wxString from a non-unicode file. File must be open. File is closed automatically. More... | |
DLLIMPORT bool | cbWrite (wxFile &file, const wxString &buff, wxFontEncoding encoding=wxFONTENCODING_SYSTEM) |
Writes a wxString to a non-unicode file. File must be open. File is closed automatically. More... | |
DLLIMPORT bool | cbSaveToFile (const wxString &filename, const wxString &contents, wxFontEncoding encoding=wxFONTENCODING_SYSTEM, bool bom=false) |
Writes a wxString to a file. More... | |
DLLIMPORT bool | cbSaveTinyXMLDocument (TiXmlDocument *doc, const wxString &filename) |
Saves a TinyXML document correctly, even if the path contains unicode characters. More... | |
DLLIMPORT wxString | cbC2U (const char *str) |
Return str as a proper unicode-compatible string. More... | |
DLLIMPORT const wxWX2MBbuf | cbU2C (const wxString &str) |
Return multibyte (C string) representation of the string. More... | |
DLLIMPORT wxFontEncoding | DetectEncodingAndConvert (const char *strIn, wxString &strOut, wxFontEncoding possibleEncoding=wxFONTENCODING_SYSTEM) |
Try converting a C-string from different encodings until a possible match is found. More... | |
DLLIMPORT int | GetPlatformsFromString (const wxString &platforms) |
Return an integer representation of a platform string. More... | |
DLLIMPORT wxString | GetStringFromPlatforms (int platforms, bool forceSeparate=false) |
Return a string representation of a platform / multiple platforms. More... | |
DLLIMPORT wxString | GetStringFromArray (const wxArrayString &array, const wxString &separator=DEFAULT_ARRAY_SEP, bool SeparatorAtEnd=true) |
DLLIMPORT wxArrayString | GetArrayFromString (const wxString &text, const wxString &separator=DEFAULT_ARRAY_SEP, bool trimSpaces=true) |
DLLIMPORT wxStringVec | GetVectorFromString (const wxString &text, const wxString &separator=DEFAULT_ARRAY_SEP, bool trimSpaces=true) |
DLLIMPORT wxArrayString | MakeUniqueArray (const wxArrayString &array, bool caseSens) |
DLLIMPORT wxString | MakeUniqueString (const wxString &text, const wxString &separator=DEFAULT_ARRAY_SEP, bool caseSens=true) |
DLLIMPORT void | AppendArray (const wxArrayString &from, wxArrayString &to) |
DLLIMPORT wxString | UnixFilename (const wxString &filename, wxPathFormat format=wxPATH_NATIVE) |
DLLIMPORT void | QuoteStringIfNeeded (wxString &str) |
DLLIMPORT bool | NeedQuotes (const wxString &str) |
DLLIMPORT wxString | EscapeSpaces (const wxString &str) |
Escapes spaces and tabs (NOT quoting the string) More... | |
DLLIMPORT FileType | FileTypeOf (const wxString &filename) |
DLLIMPORT wxString | cbFindFileInPATH (const wxString &filename) |
DLLIMPORT void | SaveTreeState (wxTreeCtrl *tree, const wxTreeItemId &parent, wxArrayString &nodePaths, wxArrayString &selectedItemPaths) |
DLLIMPORT void | RestoreTreeState (wxTreeCtrl *tree, const wxTreeItemId &parent, wxArrayString &nodePaths, wxArrayString &selectedItemPaths) |
DLLIMPORT bool | CreateDirRecursively (const wxString &full_path, int perms=0755) |
DLLIMPORT bool | CreateDir (const wxString &full_path, int perms=0755) |
DLLIMPORT wxString | ChooseDirectory (wxWindow *parent, const wxString &message=_("Select directory"), const wxString &initialPath=_T(""), const wxString &basePath=_T(""), bool askToMakeRelative=false, bool showCreateDirButton=false) |
DLLIMPORT bool | NormalizePath (wxFileName &f, const wxString &base) |
DLLIMPORT bool | IsSuffixOfPath (wxFileName const &suffix, wxFileName const &path) |
DLLIMPORT bool | cbResolveSymLinkedDirPath (wxString &dirpath) |
If path is pointing to a symlink then the function will set dirpath parameter to the path the symlink points to. More... | |
DLLIMPORT wxString | cbResolveSymLinkedDirPathRecursive (wxString dirpath) |
Call cbResolveSymLinkedPath until the path is not a symlink. More... | |
DLLIMPORT wxString | GetEOLStr (int eolMode=-1) |
Reads settings if eolMode is -1 Expected input (defined in sdk/wxscintilla/include/wx/wxscintilla.h) is: wxSCI_EOL_CRLF=0, wxSCI_EOL_CR=1, or wxSCI_EOL_LF=2. More... | |
DLLIMPORT wxString | URLEncode (const wxString &str) |
DLLIMPORT wxString | ExpandBackticks (wxString &str) |
DLLIMPORT wxMenu * | CopyMenu (wxMenu *mnu, bool with_accelerators=false) |
This function creates a new wxMenu object on the heap and recursively copies a given menu into it. More... | |
DLLIMPORT bool | UsesCommonControls6 () |
Check if CommonControls version is at least 6 (XP and up) More... | |
DLLIMPORT wxBitmap | cbLoadBitmap (const wxString &filename, wxBitmapType bitmapType=wxBITMAP_TYPE_PNG) |
This function loads a bitmap from disk. More... | |
wxBitmap | LoadPNGWindows2000Hack (const wxString &filename) |
DLLIMPORT bool | IsWindowReallyShown (wxWindow *win) |
Finds out if a window is really shown. More... | |
DLLIMPORT void | SetSettingsIconsStyle (wxListCtrl *lc, SettingsIconsStyle style) |
Set the icons style for the supplied list control. More... | |
DLLIMPORT SettingsIconsStyle | GetSettingsIconsStyle (wxListCtrl *lc) |
Get the icons style set in environment-dialog. More... | |
DLLIMPORT SettingsIconsStyle | GetSettingsIconsStyle () |
Get the icons style set in environment-dialog. More... | |
DLLIMPORT void | PlaceWindow (wxTopLevelWindow *w, cbPlaceDialogMode mode=pdlBest, bool enforce=false) |
DLLIMPORT wxRect | cbGetMonitorRectForWindow (wxWindow *window) |
DLLIMPORT int | cbMessageBox (const wxString &message, const wxString &caption=wxEmptyString, int style=wxOK, wxWindow *parent=NULL, int x=-1, int y=-1) |
wxMessageBox wrapper. More... | |
DLLIMPORT int | cbGetSingleChoiceIndex (const wxString &message, const wxString &caption, const wxArrayString &choices, wxWindow *parent=NULL, const wxSize &size=wxSize(300, 300), int initialSelection=0) |
DLLIMPORT wxArrayInt | cbGetMultiChoiceDialog (const wxString &message, const wxString &caption, const wxArrayString &choices, wxWindow *parent=nullptr, const wxSize &size=wxSize(300, 300), const wxArrayInt &initialSelection=wxArrayInt()) |
wxMultiChoiceDialog wrapper. More... | |
DLLIMPORT wxString | cbGetTextFromUser (const wxString &message, const wxString &caption=cbGetTextFromUserPromptStr, const wxString &default_value=wxEmptyString, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord, bool centre=true) |
void | NotifyMissingFile (const wxString &name) |
DLLIMPORT DirAccessCheck | cbDirAccessCheck (const wxString &dir) |
Check what access the current user has in a directory. More... | |
DLLIMPORT windows_version_t | platform::WindowsVersion () |
DLLIMPORT wxString | realpath (const wxString &path) |
Variables | |
DLLIMPORT const wxString | DEFAULT_WORKSPACE |
DLLIMPORT const wxString | DEFAULT_ARRAY_SEP |
DLLIMPORT const wxString | DEFAULT_CONSOLE_TERM |
DLLIMPORT const wxString | DEFAULT_CONSOLE_SHELL |
DLLIMPORT const wxString | cbDEFAULT_OPEN_FOLDER_CMD |
DLLIMPORT const char * | cbGetTextFromUserPromptStr |
#define HL_AUTO _T(" ") |
Definition at line 166 of file globals.h.
Referenced by EditorColourSet::Apply(), EditorColourSet::Load(), EditorColourSet::Save(), cbEditor::SaveAs(), cbEditor::SetEditorStyleBeforeFileOpen(), and cbEditor::SetLanguage().
#define HL_NONE _T(" ") |
Definition at line 167 of file globals.h.
Referenced by EditorColourSet::AddHighlightLanguage(), EditorColourSet::AddOption(), EditorColourSet::Apply(), CodeCompletion::DoCodeComplete(), EditorLexerLoader::DoLexer(), ProjectFileOptionsDlg::FillGeneralProperties(), EditorColourSet::GetCaseSensitivity(), EditorColourSet::GetCommentToken(), EditorColourSet::GetDefaultOption(), EditorColourSet::GetHighlightLanguage(), EditorColourSet::GetLanguageForFilename(), EditorColourSet::GetLanguageName(), EditorColourSet::GetOptionByIndex(), EditorColourSet::GetOptionByName(), EditorColourSet::GetOptionByValue(), EditorColourSet::GetOptionCount(), EditorColourSet::GetSampleCode(), EditorColourSet::Load(), EditorConfigurationDlg::OnColoursReset(), EditorConfigurationDlg::OnEditFilemasks(), EditorConfigurationDlg::OnEditKeywords(), EditorColourSet::Save(), EditorColourSet::SetCaseSensitivity(), EditorColourSet::SetCharacterLexerStyles(), EditorColourSet::SetCommentLexerStyles(), EditorColourSet::SetCommentToken(), EditorColourSet::SetFileMasks(), EditorColourSet::SetKeywords(), EditorColourSet::SetPreprocessorLexerStyles(), EditorColourSet::SetSampleCode(), and EditorColourSet::SetStringLexerStyles().
typedef wxString HighlightLanguage |
typedef std::vector<wxString> wxStringVec |
enum cbPlaceDialogMode |
enum DirAccessCheck |
Result values of cbDirAccessCheck()
Enumerator | |
---|---|
dacInvalidDir | Invalid directory (does not exist). |
dacReadWrite | Current user has read-write access to the directory. |
dacReadOnly | Current user has read-only access to the directory. |
enum FileType |
Known file types.
enum FileVisualState |
These are valid values for the state of each project file.
If a value is casted to integer, it corresponds to the tree's imagelist index for the state. NOTE: Keep in sync with icons loaded in ProjectManager::BuildTree()!
enum ModuleType |
enum PluginType |
These are valid values for the visual style of the project tree.
They can be OR'ed to modify the representation of the project tree.
enum SettingsIconsStyle |
enum SupportedPlatforms |
enum TemplateOutputType |
DLLIMPORT void AppendArray | ( | const wxArrayString & | from, |
wxArrayString & | to | ||
) |
Definition at line 222 of file globals.cpp.
References wxArrayString::Add(), and wxArrayString::GetCount().
Referenced by DirectCommands::AreExternalDepsOutdated(), EditorManager::CollectDefines(), DirectCommands::CompileFile(), DirectCommands::GetCleanCommands(), DirectCommands::GetCompileCommands(), DirectCommands::GetCompileFileCommand(), DirectCommands::GetLinkCommands(), DirectCommands::GetTargetCompileCommands(), and DirectCommands::GetTargetLinkCommands().
Return str
as a proper unicode-compatible string.
Definition at line 733 of file globals.cpp.
Referenced by CfgMgrBldr::Build(), ProjectManagerUI::BuildProjectTree(), cbProject::CalculateCommonTopLevelPath(), ScriptBindings::ScriptPluginWrapper::CreateMenu(), ScriptBindings::ScriptPluginWrapper::CreateModuleMenu(), ConfigManager::Delete(), ConfigManager::DeleteAll(), ConfigManager::DeleteSubPath(), ProjectLoader::DoBuild(), ProjectLoader::DoBuildTarget(), ProjectLoader::DoBuildTargetOptions(), ProjectLoader::DoCompilerOptions(), ProjectLoader::DoEnvironment(), ProjectLoader::DoExtraCommands(), ProjectTemplateLoader::DoFileSet(), ProjectTemplateLoader::DoFileSetFile(), ProjectLoader::DoIncludesOptions(), ProjectLoader::DoLibsOptions(), ProjectLoader::DoLinkerOptions(), ProjectLoader::DoMakeCommands(), ProjectTemplateLoader::DoOption(), ProjectTemplateLoader::DoOptionCompiler(), ProjectTemplateLoader::DoOptionLinker(), ProjectTemplateLoader::DoOptionProject(), ProjectLoader::DoProjectOptions(), ProjectLoader::DoResourceCompilerOptions(), ProjectTemplateLoader::DoTemplate(), ProjectTemplateLoader::DoTemplateNotice(), ProjectLoader::DoUnitOptions(), ProjectLoader::DoUnits(), ProjectLoader::DoVirtualTargets(), ConfigManager::EnumerateKeys(), ConfigManager::EnumerateSubPaths(), ScriptBindings::ScriptPluginWrapper::ExecutePlugin(), ScriptingManager::GetErrorString(), ConfigManager::GetPath(), handleConfigError(), ConfigManager::InvalidNameMessage(), EditorLexerLoader::Load(), ScriptingManager::LoadBuffer(), WorkspaceLoader::LoadLayout(), CodeBlocksApp::OnInit(), DebuggerGDB::OnProjectLoadingHook(), NativeParser::OnProjectLoadingHook(), CodeBlocksApp::OnRun(), ScriptBindings::ScriptPluginWrapper::OnScriptMenu(), ScriptBindings::ScriptPluginWrapper::OnScriptModuleMenu(), WorkspaceLoader::Open(), ProjectLayoutLoader::Open(), PrintSquirrelToWxString(), ConfigManager::Read(), ConfigManager::ReadBinary(), PluginManager::ReadExtraFilesFromManifestFile(), PluginManager::ReadManifestFile(), realpath(), ScriptBindings::Register_ScriptPlugin(), EncodingDetector::Report(), ScriptConsolePrintFunc(), StartHerePage::StartHerePage(), ScriptBindings::static_(), ScriptBindings::static_T(), CfgMgrBldr::SwitchToR(), ConfigManager::Write(), ScriptBindings::wxString_AddChar(), ScriptBindings::wxString_OpAdd(), ScriptBindings::wxString_OpCmp(), ScriptBindings::XrcId(), and BlockAllocator< T, pool_size, debug >::~BlockAllocator().
DLLIMPORT DirAccessCheck cbDirAccessCheck | ( | const wxString & | dir | ) |
Check what access the current user has in a directory.
dir | The directory in question. It may or may not contain an ending path separator. |
Definition at line 1271 of file globals.cpp.
References _T, wxFileName::CreateTempFileName(), dacInvalidDir, dacReadOnly, dacReadWrite, wxString::IsEmpty(), wxString::Last(), wxDirExists(), and wxRemoveFile().
Referenced by PluginsConfigurationDlg::PluginsConfigurationDlg().
Definition at line 420 of file globals.cpp.
References _T, wxString::empty(), GetArrayFromString(), wxArrayString::GetCount(), wxFileName::GetPathSeparator(), HTMLTags::sep, wxEmptyString, wxFileExists(), and wxGetEnv().
Referenced by cbDetectDebuggerExecutable().
Definition at line 1153 of file globals.cpp.
References wxDisplay::GetClientArea(), wxDisplay::GetCount(), wxDisplay::GetFromWindow(), wxDisplay::GetGeometry(), wxRect::Intersect(), wxDisplaySize(), and wxNOT_FOUND.
Referenced by GotoFile::BuildContent(), and PlaceWindow().
DLLIMPORT wxArrayInt cbGetMultiChoiceDialog | ( | const wxString & | message, |
const wxString & | caption, | ||
const wxArrayString & | choices, | ||
wxWindow * | parent = nullptr , |
||
const wxSize & | size = wxSize(300, 300) , |
||
const wxArrayInt & | initialSelection = wxArrayInt() |
||
) |
wxMultiChoiceDialog wrapper.
Use this instead of wxMessageBox(), as this uses PlaceWindow() to show it in the correct monitor.
Definition at line 1441 of file globals.cpp.
References Manager::Get(), Manager::GetAppWindow(), wxMultiChoiceDialog::GetSelections(), PlaceWindow(), wxMultiChoiceDialog::SetSelections(), wxMultiChoiceDialog::ShowModal(), and wxID_OK.
Referenced by CompilerOptionsDlg::OnCopyDirsClick(), and CompilerOptionsDlg::OnCopyLibsClick().
DLLIMPORT int cbGetSingleChoiceIndex | ( | const wxString & | message, |
const wxString & | caption, | ||
const wxArrayString & | choices, | ||
wxWindow * | parent = NULL , |
||
const wxSize & | size = wxSize(300, 300) , |
||
int | initialSelection = 0 |
||
) |
Definition at line 1427 of file globals.cpp.
References Manager::Get(), Manager::GetAppWindow(), wxSingleChoiceDialog::GetSelection(), PlaceWindow(), wxSingleChoiceDialog::SetSelection(), wxSingleChoiceDialog::ShowModal(), and wxID_OK.
Referenced by ProjectManagerUI::AskForBuildTargetIndex(), CCDebugInfo::OnFindClick(), CodeCompletion::OnGotoDeclaration(), CCDebugInfo::OnSave(), and ClassBrowser::OnSearch().
DLLIMPORT wxString cbGetTextFromUser | ( | const wxString & | message, |
const wxString & | caption = cbGetTextFromUserPromptStr , |
||
const wxString & | default_value = wxEmptyString , |
||
wxWindow * | parent = NULL , |
||
int | x = wxDefaultCoord , |
||
int | y = wxDefaultCoord , |
||
bool | centre = true |
||
) |
Definition at line 1465 of file globals.cpp.
References Manager::Get(), Manager::GetAppWindow(), PlaceWindow(), wxDialog::ShowModal(), wxCENTRE, wxID_OK, and wxTextEntryDialogStyle.
Referenced by cbProject::ExportTargetAsProject(), TemplateManager::NewProjectFromUserTemplate(), ProjectsFileMasksDlg::OnAdd(), EditArrayStringDlg::OnAdd(), ProjectOptionsDlg::OnAddBuildTargetClick(), VirtualBuildTargetsDlg::OnAddClick(), CompilerOptionsDlg::OnAddCompilerClick(), AdvancedCompilerOptionsDlg::OnAddExt(), ProjectManagerUI::OnAddVirtualFolder(), DebuggerMenuHandler::OnAttachToProcess(), ProjectOptionsDlg::OnCopyBuildTargetClick(), ProjectsFileMasksDlg::OnEdit(), EditArrayStringDlg::OnEdit(), ProjectOptionsDlg::OnEditBuildTargetClick(), VirtualBuildTargetsDlg::OnEditClick(), CompilerOptionsDlg::OnEditCompilerClick(), EditorConfigurationDlg::OnEditFilemasks(), ProjectOptionsDlg::OnFileMarkOffClick(), ProjectOptionsDlg::OnFileMarkOnClick(), ProjectManagerUI::OnRenameWorkspace(), MainFrame::OnSearchGotoLine(), DebuggerMenuHandler::OnSendCommand(), MainFrame::OnViewLayoutSave(), MultiSelectDlg::OnWildcard(), CodeRefactoring::RenameSymbols(), and ScriptBindings::wx_GetTextFromUser().
DLLIMPORT wxBitmap cbLoadBitmap | ( | const wxString & | filename, |
wxBitmapType | bitmapType = wxBITMAP_TYPE_PNG |
||
) |
This function loads a bitmap from disk.
Always use this to load bitmaps because it takes care of various issues with pre-XP windows (actually common controls < 6.00).
Definition at line 1102 of file globals.cpp.
References wxImage::ConvertAlphaToMask(), wxFSFile::GetStream(), wxImage::HasAlpha(), wxImage::LoadFile(), wxFileSystem::OpenFile(), and UsesCommonControls6().
Referenced by CompilerSettingsDlg::AddPluginPanels(), EnvironmentSettingsDlg::AddPluginPanels(), EditorConfigurationDlg::AddPluginPanels(), MainFrame::AddToolbarItem(), Wiz::AddWizard(), BreakpointsDlg::BreakpointsDlg(), ProjectManagerUI::BuildTree(), FindReplace::CreateSearchLog(), DebuggerManager::GetLogger(), InfoPane::InfoPane(), cbEditor::InternalSetEditorStyleBeforeFileOpen(), EnvironmentSettingsDlg::LoadListbookImages(), EditorConfigurationDlg::LoadListbookImages(), LoadPNGWindows2000Hack(), cbProjectTreeImages::MakeImageList(), EditorManager::MarkReadOnly(), NativeParser::NativeParser(), and CompilerGCC::OnAttach().
DLLIMPORT int cbMessageBox | ( | const wxString & | message, |
const wxString & | caption = wxEmptyString , |
||
int | style = wxOK , |
||
wxWindow * | parent = NULL , |
||
int | x = -1 , |
||
int | y = -1 |
||
) |
wxMessageBox wrapper.
Use this instead of wxMessageBox(), as this uses PlaceWindow() to show it in the correct monitor.
Definition at line 1395 of file globals.cpp.
References Manager::Get(), Manager::GetAppWindow(), PlaceWindow(), wxMessageDialog::ShowModal(), wxCANCEL, wxID_CANCEL, wxID_NO, wxID_OK, wxID_YES, wxMessageBox(), wxNO, wxOK, and wxYES.
Referenced by EditorConfigurationDlg::AskToSaveTheme(), CompilerICC::AutoDetectInstallationDir(), ProjectManager::BeginLoadingProject(), ScriptBindings::CallMenu(), cbConfigurationPanel::cbMessageBox(), cbWriteBatchBuildPlugins(), EditorManager::CheckForExternallyModifiedFiles(), ProjectManagerUI::CheckForExternallyModifiedProjects(), ChooseDirectory(), ProjectLoader::ConvertVersion_Pre_1_1(), Wiz::CopyFiles(), ScriptBindings::ScriptPluginWrapper::CreateMenu(), ScriptBindings::ScriptPluginWrapper::CreateModuleMenu(), DebuggerSettingsDlg::DeleteConfig(), ConfigManager::DeleteSubPath(), ScriptingManager::DisplayErrors(), dlgAbout::dlgAbout(), CodeCompletion::DoAllMethodsImpl(), DebuggerGDB::DoBreak(), ProjectOptionsDlg::DoCheckScripts(), DebuggerGDB::DoDebug(), ProjectManagerUI::DoOpenFile(), MainFrame::DoOpenProject(), NewFromTemplateDlg::EditScript(), ProjectManager::EndLoadingWorkspace(), BatchLogWindow::EndModal(), ScriptBindings::EndModal(), cbDebuggerPlugin::EnsureBuildUpToDate(), ToolsManager::Execute(), ScriptBindings::ScriptPluginWrapper::ExecutePlugin(), PluginManager::ExportPlugin(), PluginManager::ExtractFile(), FindReplace::Find(), FindReplace::FindInFiles(), Wiz::GenerateFile(), CompilerGCC::GetBuildTargetForFile(), cbDebuggerPlugin::GetDebuggee(), CodeRefactoring::GetSymbolUnderCursor(), DirectCommands::GetTargetLinkCommands(), ScriptBindings::gMessage(), ScriptBindings::gShowMessage(), ScriptBindings::gShowMessageError(), ScriptBindings::gShowMessageInfo(), ScriptBindings::gShowMessageWarn(), CompilerCommandGenerator::Init(), CodeBlocksApp::InitXRCStuff(), ScriptBindings::InstallPlugin(), PluginManager::InstallPlugin(), ScriptingManager::IsScriptTrusted(), Wiz::Launch(), cbWorkspace::Load(), EditorColourSet::Load(), PluginManager::LoadAllPlugins(), ScriptingManager::LoadBuffer(), Compiler::LoadDefaultOptions(), Compiler::LoadSettings(), ConfigManager::MigrateFolders(), ProjectManager::NewProject(), TemplateManager::NewProjectFromUserTemplate(), NotifyMissingFile(), ProjectOptionsDlg::OnAddBuildTargetClick(), VirtualBuildTargetsDlg::OnAddClick(), MainFrame::OnApplicationClose(), Wiz::OnAttach(), CodeBlocksApp::OnBatchBuildDone(), EditPathDlg::OnBrowse(), DebuggerSettingsPanel::OnButtonCreate(), DebuggerSettingsPanel::OnButtonReset(), ProjectOptionsDlg::OnCheckScripts(), EditorConfigurationDlg::OnColoursReset(), EditorConfigurationDlg::OnColourTheme(), ProjectOptionsDlg::OnCopyBuildTargetClick(), CompilerPanel::OnDebugChange(), ProjectsFileMasksDlg::OnDelete(), EditArrayStringDlg::OnDelete(), EditArrayFileDlg::OnDelete(), EditorConfigurationDlg::OnDeleteColourTheme(), AdvancedCompilerOptionsDlg::OnDelExt(), NewFromTemplateDlg::OnDiscardScript(), ProjectOptionsDlg::OnEditBuildTargetClick(), VirtualBuildTargetsDlg::OnEditClick(), NewFromTemplateDlg::OnEditGlobalScript(), PluginsConfigurationDlg::OnExport(), ProjectOptionsDlg::OnExportTargetClick(), CodeBlocksApp::OnFatalException(), MainFrame::OnFileNewWhat(), MainFrame::OnFileOpenDefWorkspace(), MainFrame::OnFileSave(), DebuggerGDB::OnGDBTerminated(), CodeCompletion::OnGotoDeclaration(), CodeCompletion::OnGotoFunction(), NewFromTemplateDlg::OnHelp(), CodeBlocksApp::OnInit(), PluginsConfigurationDlg::OnInstall(), ProjectOptionsDlg::OnOK(), ProjectManagerUI::OnOpenFolderFiles(), CodeCompletion::OnOpenIncludeFile(), WizFilePathPanel::OnPageChanging(), WizProjectPathPanel::OnPageChanging(), WizGenericSelectPathPanel::OnPageChanging(), WizCompilerPanel::OnPageChanging(), WizBuildTargetPanel::OnPageChanging(), cbDebuggerPlugin::OnProjectActivated(), AdvancedCompilerOptionsDlg::OnRegexDefaults(), AdvancedCompilerOptionsDlg::OnRegexDelete(), AdvancedCompilerOptionsDlg::OnRegexTest(), CompilerPanel::OnReleaseChange(), ConfigureToolsDlg::OnRemove(), ProjectOptionsDlg::OnRemoveBuildTargetClick(), VirtualBuildTargetsDlg::OnRemoveClick(), ProjectManagerUI::OnRemoveFileFromProject(), ProjectManagerUI::OnRenameFile(), BacktraceDlg::OnSave(), DisassemblyDlg::OnSave(), CCDebugInfo::OnSave(), ScriptBindings::ScriptPluginWrapper::OnScriptMenu(), ScriptingManager::OnScriptMenu(), ScriptBindings::ScriptPluginWrapper::OnScriptModuleMenu(), ClassBrowser::OnSearch(), MainFrame::OnSettingsEnvironment(), BacktraceDlg::OnSwitchFrame(), ToolsManager::OnToolClick(), PluginsConfigurationDlg::OnUninstall(), ScriptingSettingsDlg::OnValidateTrusts(), CodeCompletion::OnViewClassBrowser(), MainFrame::OnViewLayoutDelete(), ClassBrowser::OnViewScope(), MultiSelectDlg::OnWildcard(), WorkspaceLoader::Open(), cbProject::Open(), MainFrame::OpenGeneric(), CodeRefactoring::Parse(), GdbCmd_AddBreakpointCondition::ParseOutput(), cbEditor::Print(), EditorBase::QueryClose(), ProjectManagerUI::QueryCloseProject(), ProjectManagerUI::QueryCloseWorkspace(), ScriptBindings::Register_ScriptPlugin(), ProjectManager::RemoveFileFromProject(), FindReplace::Replace(), FindReplace::ReplaceInFiles(), NativeParser::RereadParserOptions(), CompilerGCC::Run(), Wiz::RunCustomWizard(), Wiz::RunFilesWizard(), Wiz::RunProjectWizard(), CompilerGCC::RunSingleFile(), Wiz::RunTargetWizard(), cbWorkspace::Save(), UsrGlblMgrEditDialog::Save(), cbEditor::Save(), cbProject::Save(), EditorManager::SaveAll(), cbProject::SaveAs(), CCDebugInfoHelper::SaveCCDebugInfo(), ProjectDepsDlg::SaveList(), TemplateManager::SaveUserTemplate(), ConfigManager::SetUserDataFolder(), VirtualBuildTargetsDlg::SetVirtualTarget(), ScriptBindings::ShowDialog(), cbException::ShowErrorMessage(), FindReplace::ShowFindDialog(), CompilerGCC::StopRunningDebugger(), EditorManager::SwapActiveHeaderSource(), CfgMgrBldr::SwitchTo(), PluginManager::UninstallPlugin(), pfDetails::Update(), ProjectOptionsDlg::ValidateTargetName(), FileManager::WriteWxStringToFile(), and ScriptBindings::XrcId().
DLLIMPORT bool cbRead | ( | wxFile & | file, |
wxString & | st, | ||
wxFontEncoding | encoding = wxFONTENCODING_SYSTEM |
||
) |
Reads a wxString from a non-unicode file. File must be open. File is closed automatically.
Definition at line 668 of file globals.cpp.
References wxFile::Close(), DetectEncodingAndConvert(), wxString::Empty(), wxFile::IsOpened(), wxFile::Length(), and wxFile::Read().
Referenced by cbReadFileContents(), and Tokenizer::ReadFile().
DLLIMPORT wxString cbReadFileContents | ( | wxFile & | file, |
wxFontEncoding | encoding = wxFONTENCODING_SYSTEM |
||
) |
Reads a wxString from a non-unicode file. File must be open. File is closed automatically.
Definition at line 697 of file globals.cpp.
References cbRead().
Referenced by wxCrc32::FromFile(), ScriptingManager::LoadScript(), ScriptBindings::IOLib::ReadFileContents(), and FindReplace::ReplaceInFiles().
If path is pointing to a symlink then the function will set dirpath parameter to the path the symlink points to.
Definition at line 1001 of file globals.cpp.
References wxFileName::DirName(), wxString::empty(), wxFileName::GetFullPath(), wxFileName::IsAbsolute(), wxString::Last(), wxString::length(), wxFileName::MakeAbsolute(), wxString::mb_str(), wxString::RemoveLast(), wxFileName::RemoveLastDir(), and wxT.
Referenced by cbResolveSymLinkedDirPathRecursive().
Call cbResolveSymLinkedPath until the path is not a symlink.
Definition at line 1054 of file globals.cpp.
References cbResolveSymLinkedDirPath().
Referenced by HeaderDirTraverser::OnDir().
Saves a TinyXML document correctly, even if the path contains unicode characters.
Definition at line 727 of file globals.cpp.
References TinyXML::SaveDocument().
Referenced by ProjectLoader::ExportTargetAsProject(), WorkspaceLoader::Save(), ProjectLayoutLoader::Save(), and WorkspaceLoader::SaveLayout().
DLLIMPORT bool cbSaveToFile | ( | const wxString & | filename, |
const wxString & | contents, | ||
wxFontEncoding | encoding = wxFONTENCODING_SYSTEM , |
||
bool | bom = false |
||
) |
Writes a wxString to a file.
Takes care of unicode and uses a temporary file to save first and then it copies it over the original.
Definition at line 721 of file globals.cpp.
References Manager::Get(), Manager::GetFileManager(), and FileManager::Save().
Referenced by CrashHandlerSaveEditorFiles(), DisassemblyDlg::OnSave(), and cbEditor::Save().
Return multibyte (C string) representation of the string.
Definition at line 743 of file globals.cpp.
References wxString::mb_str().
Referenced by ProjectLoader::AddElement(), cbProject::AddToExtensions(), ConfigManager::AssertPath(), CfgMgrBldr::Build(), ConfigManager::DeleteSubPath(), CompilerCommandGenerator::DoBuildScripts(), ConfigManager::Exists(), ProjectLoader::ExportTargetAsProject(), cbProject::GetExtensionsNode(), WizPageBase::GetNext(), WizPageBase::GetPrev(), ConfigManager::GetUniqElement(), ScriptingManager::LoadBuffer(), ScriptBindings::XrcDialog::OnButton(), WizPage::OnButton(), WizPageBase::OnPageChanged(), WizPageBase::OnPageChanging(), DebuggerGDB::OnProjectLoadingHook(), NativeParser::OnProjectLoadingHook(), ScriptingManager::OnScriptMenu(), ConfigManager::Read(), ConfigManager::ReadBinary(), PluginManager::ReadExtraFilesFromManifestFile(), PluginManager::ReadManifestFile(), realpath(), ScriptBindings::Require(), WorkspaceLoader::Save(), ProjectLayoutLoader::Save(), ProjectLoader::SaveEnvironment(), WorkspaceLoader::SaveLayout(), CfgMgrBldr::SwitchToR(), ConfigManager::Write(), and ScriptBindings::wxString_GetChar().
DLLIMPORT bool cbWrite | ( | wxFile & | file, |
const wxString & | buff, | ||
wxFontEncoding | encoding = wxFONTENCODING_SYSTEM |
||
) |
Writes a wxString to a non-unicode file. File must be open. File is closed automatically.
Definition at line 705 of file globals.cpp.
References wxFile::Close(), wxFile::Flush(), wxFile::IsOpened(), and wxFile::Write().
Referenced by Wiz::GenerateFile(), and ScriptBindings::IOLib::WriteFileContents().
DLLIMPORT wxString ChooseDirectory | ( | wxWindow * | parent, |
const wxString & | message = _("Select directory") , |
||
const wxString & | initialPath = _T("") , |
||
const wxString & | basePath = _T("") , |
||
bool | askToMakeRelative = false , |
||
bool | showCreateDirButton = false |
||
) |
Definition at line 639 of file globals.cpp.
References _(), _T, cbMessageBox(), wxDirDialog::GetPath(), wxString::IsEmpty(), wxFileName::MakeRelativeTo(), PlaceWindow(), wxDirDialog::SetPath(), wxDirDialog::ShowModal(), wxDD_NEW_DIR_BUTTON, wxEmptyString, wxICON_QUESTION, wxID_OK, wxID_YES, wxRESIZE_BORDER, and wxYES_NO.
Referenced by ScriptBindings::IOLib::ChooseDir(), TemplateManager::NewProjectFromUserTemplate(), ProjectManagerUI::OnAddFilesToProjectRecursively(), EditPairDlg::OnBrowse(), EditPathDlg::OnBrowse(), EditToolDlg::OnBrowseDir(), ProjectOptionsDlg::OnBrowseDirClick(), FindReplaceDlg::OnBrowsePath(), WizProjectPathPanel::OnButton(), WizGenericSelectPathPanel::OnButton(), UsrGlblMgrEditDialog::OnFS(), and CompilerOptionsDlg::OnMasterPathClick().
This function creates a new wxMenu object on the heap and recursively copies a given menu into it.
It's up to the user to make sure the returned menu is deleted.
mnu | The menu to copy |
with_accelerators | If true, also copies the accelerators (defaults to false). |
Definition at line 911 of file globals.cpp.
References wxMenu::Append(), wxMenu::FindItemByPosition(), wxMenuItem::GetHelp(), wxMenuItem::GetId(), wxMenuItem::GetItemLabel(), wxMenuItem::GetItemLabelText(), wxMenuItem::GetKind(), wxMenu::GetMenuItemCount(), and wxMenuItem::GetSubMenu().
Referenced by MainFrame::OnFileNew().
Definition at line 631 of file globals.cpp.
References wxDirExists(), and wxMkdir().
Referenced by ConfigManager::InitPaths().
Definition at line 610 of file globals.cpp.
References _T, Manager::Get(), wxArrayString::GetCount(), wxFileName::GetDirs(), wxFileName::GetFullPath(), wxFileName::GetPath(), wxFileName::GetVolume(), wxFileName::GetVolumeSeparator(), NormalizePath(), ScriptBindings::IOLib::SecurityAllows(), wxDirExists(), wxEmptyString, and wxMkdir().
Referenced by Wiz::CopyFiles(), NewFromTemplateDlg::EditScript(), PluginManager::ExtractFile(), DirectCommands::GetCompileFileCommand(), DirectCommands::GetTargetLinkCommands(), ConfigManager::InitPaths(), ConfigManager::MigrateFolders(), TemplateManager::NewProjectFromUserTemplate(), ScriptBindings::Register_IO(), Wiz::RunProjectWizard(), TemplateManager::SaveUserTemplate(), and ConfigManager::SetUserDataFolder().
DLLIMPORT wxFontEncoding DetectEncodingAndConvert | ( | const char * | strIn, |
wxString & | strOut, | ||
wxFontEncoding | possibleEncoding = wxFONTENCODING_SYSTEM |
||
) |
Try converting a C-string from different encodings until a possible match is found.
This tries the following encoding converters (in the same order): utf8, system, default and iso8859-1 to iso8859-15. Returns the final encoding detected.
Definition at line 754 of file globals.cpp.
References wxString::Clear(), wxString::Length(), wxFONTENCODING_ISO8859_MAX, wxFONTENCODING_SYSTEM, wxFONTENCODING_UTF16, wxFONTENCODING_UTF16BE, wxFONTENCODING_UTF16LE, wxFONTENCODING_UTF32, wxFONTENCODING_UTF32BE, wxFONTENCODING_UTF32LE, and wxFONTENCODING_UTF8.
Referenced by cbRead().
Escapes spaces and tabs (NOT quoting the string)
Definition at line 273 of file globals.cpp.
References _T, wxString::IsEmpty(), and wxString::Replace().
Referenced by ScriptBindings::Register_Globals(), and CompilerGCC::Run().
Definition at line 861 of file globals.cpp.
References _T, LogManager::DebugLog(), F(), wxString::find(), Manager::Get(), Manager::GetLogManager(), GetStringFromArray(), wxString::IsEmpty(), m_Backticks, wxString::npos, wxString::substr(), wxString::Trim(), platform::WindowsVersion(), platform::winver_WindowsNT2000, wxString::wx_str(), wxEXEC_NODISABLE, and wxExecute().
Referenced by EditorManager::CollectDefines(), CompilerGCC::DoCleanWithMake(), CompilerGCC::DoRunQueue(), CompilerCommandGenerator::SetupCompilerOptions(), CompilerCommandGenerator::SetupLinkerOptions(), and CompilerCommandGenerator::SetupResourceCompilerOptions().
Definition at line 285 of file globals.cpp.
References _T, wxString::AfterLast(), FileFilters::ASM_EXT, FileFilters::C_EXT, FileFilters::CC_EXT, FileFilters::CODEBLOCKS_EXT, FileFilters::CPLPL_EXT, FileFilters::CPP_EXT, FileFilters::CXX_EXT, FileFilters::D_EXT, FileFilters::DEVCPP_EXT, FileFilters::DYNAMICLIB_EXT, FileFilters::EXECUTABLE_EXT, FileFilters::F03_EXT, FileFilters::F08_EXT, FileFilters::F77_EXT, FileFilters::F90_EXT, FileFilters::F95_EXT, FileFilters::F_EXT, FileFilters::FOR_EXT, FileFilters::FPP_EXT, ftCodeBlocksProject, ftCodeBlocksWorkspace, ftDevCppProject, ftDynamicLib, ftExecutable, ftHeader, ftMSVC10Project, ftMSVC6Project, ftMSVC6Workspace, ftMSVC7Project, ftMSVC7Workspace, ftNative, ftObject, ftOther, ftResource, ftResourceBin, ftScript, ftSource, ftStaticLib, ftTemplateSource, ftXcode1Project, ftXcode2Project, ftXMLDocument, ftXRCResource, FileFilters::H_EXT, FileFilters::HH_EXT, FileFilters::HPLPL_EXT, FileFilters::HPP_EXT, FileFilters::HXX_EXT, FileFilters::INL_EXT, wxString::IsSameAs(), FileFilters::JAVA_EXT, wxString::Lower(), FileFilters::MSVC10_EXT, FileFilters::MSVC6_EXT, FileFilters::MSVC6_WORKSPACE_EXT, FileFilters::MSVC7_EXT, FileFilters::MSVC7_WORKSPACE_EXT, FileFilters::NATIVE_EXT, FileFilters::OBJECT_EXT, FileFilters::RESOURCE_EXT, FileFilters::RESOURCEBIN_EXT, FileFilters::S62_EXT, FileFilters::S_EXT, FileFilters::SCRIPT_EXT, FileFilters::SS_EXT, FileFilters::STATICLIB_EXT, FileFilters::TCC_EXT, FileFilters::TPP_EXT, FileFilters::WORKSPACE_EXT, FileFilters::XCODE1_EXT, FileFilters::XCODE2_EXT, FileFilters::XML_EXT, and FileFilters::XRCRESOURCE_EXT.
Referenced by cbProject::AddFile(), NativeParser::AddProjectToParser(), CompilerGCC::BuildModuleMenu(), CodeCompletion::DoAllMethodsImpl(), CodeCompletion::DoClassMethodDeclImpl(), CodeCompletion::DoCodeComplete(), CodeCompletion::DoCodeCompleteIncludes(), CodeCompletion::DoCodeCompletePreprocessor(), ProjectManagerUI::DoOpenFile(), ProjectLoader::ExportTargetAsProject(), EditorManager::FindHeaderSource(), Wiz::GenerateFile(), DirectCommands::GetCleanSingleFileCommand(), DirectCommands::GetCompileFileCommand(), DirectCommands::GetCompileSingleFileCommand(), DirectCommands::GetTargetLinkCommands(), EditorManager::IsHeaderSource(), cbWorkspace::Load(), ProjectManager::LoadProject(), EditorManager::New(), TemplateManager::NewProjectFromUserTemplate(), MainFrame::OnDropFiles(), cbProject::Open(), MainFrame::OpenGeneric(), CodeBlocksApp::ParseCmdLine(), ScriptBindings::Register_Globals(), Parser::ReparseModifiedFiles(), cbProject::SetCompilerID(), ProjectFile::SetObjName(), CompilerMINGWGenerator::SetupIncludeDirs(), EditorManager::SwapActiveHeaderSource(), cbDebuggerPlugin::SyncEditor(), pfDetails::Update(), ProjectFileOptionsDlg::UpdateBuildCommand(), and ProjectFile::UpdateFileDetails().
DLLIMPORT wxArrayString GetArrayFromString | ( | const wxString & | text, |
const wxString & | separator = DEFAULT_ARRAY_SEP , |
||
bool | trimSpaces = true |
||
) |
Definition at line 134 of file globals.cpp.
References wxArrayString::Add(), wxString::Find(), wxString::IsEmpty(), wxString::Left(), wxString::Length(), wxString::Remove(), and wxString::Trim().
Referenced by Wiz::AddGenericSingleChoiceListPage(), Wiz::AppendContainerWithChoices(), Wiz::AppendContainerWithSelectCompilers(), DirectCommands::AreExternalDepsOutdated(), CompilerXML::AutoDetectInstallationDir(), CompilerGNUFortran::AutoDetectInstallationDir(), CompilerMSVC10::AutoDetectInstallationDir(), CompilerMSVC8::AutoDetectInstallationDir(), CompilerG95::AutoDetectInstallationDir(), CompilerMINGW::AutoDetectInstallationDir(), cbFindFileInPATH(), EditorManager::CollectDefines(), ProjectLoader::DoEnvironment(), EditorLexerLoader::DoLangAttributesLexerStyles(), ProjectLoader::DoProjectOptions(), EditorLexerLoader::DoStyles(), ProjectLoader::DoVirtualTargets(), Compiler::EvalXMLCondition(), ExternalDepsDlg::FillAdditional(), Wizard::FillCompilerControl(), Wiz::FillContainerWithChoices(), Wiz::FillContainerWithSelectCompilers(), ExternalDepsDlg::FillExternal(), FindReplace::FindInFiles(), CompilerCommandGenerator::GenerateCommandLine(), FileFilters::GetFilterIndexFromName(), FileFilters::GetFilterNameFromIndex(), FileFilters::GetFilterString(), EditorColourSet::Load(), Compiler::LoadRegExArray(), Compiler::LoadSettings(), MakeUniqueString(), CompilerOptionsDlg::OnAddLibClick(), ProjectOptionsDlg::OnAddScript(), EditorConfigurationDlg::OnEditKeywords(), CompilerOptionsDlg::OnOptionChanged(), ProjectOptionsDlg::OnPlatform(), ParseCDBWatchValue(), CDB_driver::ParseOutput(), GDB_driver::ParseOutput(), CdbCmd_GetPID::ParseOutput(), CdbCmd_AttachToProcess::ParseOutput(), CdbCmd_AddBreakpoint::ParseOutput(), GdbCmd_AttachToProcess::ParseOutput(), GdbCmd_Detach::ParseOutput(), CdbCmd_Backtrace::ParseOutput(), CdbCmd_SwitchFrame::ParseOutput(), CdbCmd_InfoRegisters::ParseOutput(), CdbCmd_Disassembly::ParseOutput(), CdbCmd_DisassemblyInit::ParseOutput(), GdbCmd_Start::ParseOutput(), GdbCmd_Threads::ParseOutput(), GdbCmd_Backtrace::ParseOutput(), GdbCmd_InfoRegisters::ParseOutput(), GdbCmd_Disassembly::ParseOutput(), GdbCmd_DisassemblyInit::ParseOutput(), GdbCmd_ExamineMemory::ParseOutput(), GdbCmd_FindCursor::ParseOutput(), GdbCmd_InfoRegisters::ParseOutputFromOR32gdbPort(), GDB_driver::Prepare(), ScriptBindings::Register_Globals(), FindReplace::ReplaceInFiles(), Wiz::RunProjectWizard(), AdvancedCompilerOptionsDlg::SaveCommands(), cbAuiNotebook::SavePerspective(), MultiSelectDlg::SelectWildCard(), FilesGroupsAndMasks::SetFileMasks(), and EditorColourSet::SetFileMasks().
Reads settings if eolMode is -1 Expected input (defined in sdk/wxscintilla/include/wx/wxscintilla.h) is: wxSCI_EOL_CRLF=0, wxSCI_EOL_CR=1, or wxSCI_EOL_LF=2.
Definition at line 812 of file globals.cpp.
References Manager::Get(), Manager::GetConfigManager(), ConfigManager::ReadInt(), wxSCI_EOL_CR, wxSCI_EOL_CRLF, wxSCI_EOL_LF, and wxT.
Referenced by cbEditorInternalData::EnsureFinalLineEnd(), Wiz::GenerateFile(), InsertNewLine(), CodeCompletion::MatchCodeStyle(), and MainFrame::OnEditBoxCommentSelected().
Return an integer representation of a platform string.
Definition at line 73 of file globals.cpp.
References _(), wxString::Contains(), spAll, spMac, spUnix, and spWindows.
Referenced by ProjectOptionsDlg::DoBeforeTargetChange(), ProjectLoader::DoBuildTargetOptions(), ProjectLoader::DoProjectOptions(), ProjectOptionsDlg::EndModal(), and ScriptBindings::Register_Globals().
DLLIMPORT SettingsIconsStyle GetSettingsIconsStyle | ( | wxListCtrl * | lc | ) |
Get the icons style set in environment-dialog.
This version is left for backwardscompatibility.
DLLIMPORT SettingsIconsStyle GetSettingsIconsStyle | ( | ) |
Get the icons style set in environment-dialog.
Definition at line 1148 of file globals.cpp.
References _T, and Manager::Get().
DLLIMPORT wxString GetStringFromArray | ( | const wxArrayString & | array, |
const wxString & | separator = DEFAULT_ARRAY_SEP , |
||
bool | SeparatorAtEnd = true |
||
) |
Definition at line 122 of file globals.cpp.
References wxArrayString::GetCount().
Referenced by cbGetDynamicLinkerPathForTarget(), EditorManager::CheckForExternallyModifiedFiles(), EditorManager::CollectDefines(), AdvancedCompilerOptionsDlg::DisplayCommand(), DebuggerGDB::DoDebug(), CompilerOptionsDlg::DoSaveCompilerDefinition(), Compiler::EvalXMLCondition(), ScriptBindings::IOLib::ExecuteAndGetOutput(), ScriptBindings::IOLib::ExecuteAndGetOutputAndError(), ExpandBackticks(), ProjectLoader::ExportTargetAsProject(), CompilerCommandGenerator::GenerateCommandLine(), FilesGroupsAndMasks::GetFileMasks(), ParserThread::HandleClass(), MakeUniqueString(), EditPathDlg::OnBrowse(), EditorConfigurationDlg::OnEditFilemasks(), ProjectOptionsDlg::OnPlatform(), ProjectManagerUI::OnTreeBeginDrag(), CompilerOptionsDlg::OptionsToText(), AdvancedCompilerOptionsDlg::ReadExtensions(), ScriptBindings::Register_Globals(), FilesGroupsAndMasks::Save(), EditorColourSet::Save(), AdvancedCompilerOptionsDlg::SaveCommands(), cbAuiNotebook::SavePerspective(), Compiler::SaveSettings(), CompilerCommandGenerator::SetupCompilerOptions(), CompilerCommandGenerator::SetupLinkerOptions(), and CompilerCommandGenerator::SetupResourceCompilerOptions().
Return a string representation of a platform / multiple platforms.
Definition at line 90 of file globals.cpp.
References _(), spAll, spMac, spUnix, and spWindows.
Referenced by ProjectOptionsDlg::DoTargetChange(), ProjectLoader::ExportTargetAsProject(), ProjectOptionsDlg::OnCreateDefFileClick(), ProjectOptionsDlg::OnCreateImportFileClick(), ProjectOptionsDlg::OnPlatform(), ProjectOptionsDlg::ProjectOptionsDlg(), and ScriptBindings::Register_Globals().
DLLIMPORT wxStringVec GetVectorFromString | ( | const wxString & | text, |
const wxString & | separator = DEFAULT_ARRAY_SEP , |
||
bool | trimSpaces = true |
||
) |
Definition at line 166 of file globals.cpp.
References wxString::Find(), wxString::IsEmpty(), wxString::Left(), wxString::Length(), wxString::Remove(), and wxString::Trim().
DLLIMPORT bool IsSuffixOfPath | ( | wxFileName const & | suffix, |
wxFileName const & | path | ||
) |
Definition at line 962 of file globals.cpp.
References _T, wxArrayString::GetCount(), wxFileName::GetDirs(), wxFileName::GetFullName(), wxFileName::GetVolume(), and wxFileName::IsAbsolute().
Referenced by CompilerErrors::DoGotoError(), and CodeCompletion::OnOpenIncludeFile().
Finds out if a window is really shown.
win->IsShown() is not that good because we don't know if the window's container (parent) is actually shown or not...
This is usually used to find out if docked windows are shown.
win | The window in question. |
win
is shown, false if not. Definition at line 931 of file globals.cpp.
Referenced by DebuggerMenuHandler::DebuggerMenuHandler(), LoadPNGWindows2000Hack(), cbAuiNotebook::MinimizeFreeSpace(), DebuggerMenuHandler::OnAddWatch(), DebuggerGDB::OnCursorChanged(), WatchesDlg::OnMenuExamineMemory(), CodeCompletion::OnUpdateUI(), MainFrame::PluginsUpdated(), DebuggerMenuHandler::RegisterDefaultWindowItems(), DebuggerGDB::RequestUpdate(), DebuggerManager::ShowBacktraceDialog(), MainFrame::ShowHideScriptConsole(), DebuggerManager::UpdateBacktrace(), DebuggerManager::UpdateCPURegisters(), DebuggerManager::UpdateDisassembly(), DebuggerManager::UpdateExamineMemory(), and DebuggerManager::UpdateThreads().
Definition at line 281 of file globals.h.
References cbLoadBitmap(), DLLIMPORT, and IsWindowReallyShown().
DLLIMPORT wxArrayString MakeUniqueArray | ( | const wxArrayString & | array, |
bool | caseSens | ||
) |
Definition at line 198 of file globals.cpp.
References wxArrayString::Add(), wxArrayString::GetCount(), wxArrayString::Index(), and wxNOT_FOUND.
Referenced by EditorManager::CollectDefines(), Compiler::Compiler(), Compiler::EvalXMLCondition(), FilesGroupsAndMasks::GetFileMasks(), Compiler::LoadSettings(), MakeUniqueString(), Compiler::MirrorCurrentSettings(), FilesGroupsAndMasks::Save(), Compiler::SaveSettings(), and FilesGroupsAndMasks::SetFileMasks().
DLLIMPORT wxString MakeUniqueString | ( | const wxString & | text, |
const wxString & | separator = DEFAULT_ARRAY_SEP , |
||
bool | caseSens = true |
||
) |
Definition at line 217 of file globals.cpp.
References GetArrayFromString(), GetStringFromArray(), and MakeUniqueArray().
Referenced by Compiler::LoadDefaultOptions(), and CompilerOptionsDlg::OnFlagsPopup().
Definition at line 266 of file globals.cpp.
References _T, wxString::Find(), wxString::GetChar(), and wxString::IsEmpty().
Referenced by QuoteString(), and QuoteStringIfNeeded().
DLLIMPORT bool NormalizePath | ( | wxFileName & | f, |
const wxString & | base | ||
) |
Definition at line 942 of file globals.cpp.
References wxFileName::IsOk(), wxFileName::Normalize(), wxPATH_NORM_ALL, and wxPATH_NORM_CASE.
Referenced by NativeParser::AddIncludeDirsToParser(), ScriptBindings::IOLib::CopyFile(), ScriptBindings::IOLib::CreateDirRecursively(), ScriptBindings::IOLib::DirectoryExists(), cbEditor::DoInitializations(), ScriptBindings::IOLib::FileExists(), ParserBase::FindFileInIncludeDirs(), ParserBase::GetFullFileName(), ClassBrowser::OnJumpTo(), CodeCompletion::OnOpenIncludeFile(), ClassBrowser::OnTreeItemDoubleClick(), EditorManager::Open(), ScriptBindings::IOLib::ReadFileContents(), ScriptBindings::IOLib::RemoveDir(), ScriptBindings::IOLib::RemoveFile(), ScriptBindings::IOLib::RenameFile(), EditorBase::SetTitle(), and ScriptBindings::IOLib::WriteFileContents().
|
inline |
Definition at line 370 of file globals.h.
References _T, wxString::c_str(), cbMessageBox(), and wxString::Printf().
Referenced by CodeCompletion::CodeCompletion(), CompilerGCC::CompilerGCC(), DebuggerGDB::DebuggerGDB(), and ScriptBindings::Register_Globals().
DLLIMPORT void PlaceWindow | ( | wxTopLevelWindow * | w, |
cbPlaceDialogMode | mode = pdlBest , |
||
bool | enforce = false |
||
) |
Definition at line 1177 of file globals.cpp.
References _T, cbGetMonitorRectForWindow(), cbThrow, Manager::Get(), Manager::GetAppWindow(), wxRect::GetBottom(), Manager::GetConfigManager(), wxRect::GetRight(), wxRect::height, pdlBest, pdlCentre, pdlClip, pdlConstrain, pdlHead, ConfigManager::ReadBool(), ConfigManager::ReadInt(), wxRect::width, wxSIZE_ALLOW_MINUS_ONE, wxRect::x, and wxRect::y.
Referenced by DebuggerGDB::AddDataBreakpoint(), UserVariableManager::Arrogate(), ProjectManagerUI::AskForMultiBuildTargetIndex(), RecentItemsList::AskToRemoveFileFromHistory(), CodeBlocksApp::BatchJob(), cbGetMultiChoiceDialog(), cbGetSingleChoiceIndex(), cbGetTextFromUser(), cbMessageBox(), EditorManager::CheckForExternallyModifiedFiles(), ProjectManagerUI::CheckForExternallyModifiedProjects(), ChooseDirectory(), ScriptBindings::IOLib::ChooseFile(), UsrGlblMgrEditDialog::CloneSet(), UsrGlblMgrEditDialog::CloneVar(), UserVariableManager::Configure(), ToolsManager::Configure(), CompilerGCC::Configure(), PluginManager::Configure(), ProjectManagerUI::ConfigureProjectDependencies(), DebuggerSettingsDlg::DeleteConfig(), UsrGlblMgrEditDialog::DeleteSet(), UsrGlblMgrEditDialog::DeleteVar(), CodeCompletion::DoClassMethodDeclImpl(), ConfigureToolsDlg::DoEditTool(), MainFrame::DoOnFileOpen(), FindReplace::FindInFiles(), CfgMgrBldr::Flush(), CodeBlocksApp::InitAssociations(), CompilerFactory::LoadSettings(), TemplateManager::New(), UsrGlblMgrEditDialog::NewSet(), UsrGlblMgrEditDialog::NewVar(), EditArrayFileDlg::OnAdd(), CCOptionsProjectDlg::OnAdd(), DebuggerOptionsProjectDlg::OnAdd(), EditorConfigurationDlg::OnAddColourTheme(), CompilerOptionsDlg::OnAddDirClick(), CompilerOptionsDlg::OnAddExtraPathClick(), ProjectManagerUI::OnAddFilesToProjectRecursively(), ProjectManagerUI::OnAddFileToProject(), CompilerOptionsDlg::OnAddLibClick(), ProjectOptionsDlg::OnAddScript(), CompilerOptionsDlg::OnAddVarClick(), CompilerOptionsDlg::OnAdvancedClick(), EditPairDlg::OnBrowse(), EditPathDlg::OnBrowse(), DebuggerConfigurationPanel::OnBrowse(), ScriptingSettingsDlg::OnBrowse(), ProjectOptionsDlg::OnBrowseDefinitionFileFilenameClick(), ProjectOptionsDlg::OnBrowseImportLibraryFilenameClick(), ProjectOptionsDlg::OnBrowseOutputFilenameClick(), FilePathPanel::OnbtnBrowseClick(), ProjectOptionsDlg::OnBuildOrderClick(), DebuggerSettingsPanel::OnButtonCreate(), EditorConfigurationDlg::OnChooseColour(), EnvironmentSettingsDlg::OnChooseColour(), CCOptionsDlg::OnChooseColour(), DebuggerSettingsCommonPanel::OnChooseFontClick(), cbEditor::OnContextMenuEntry(), EditArrayFileDlg::OnEdit(), CCOptionsProjectDlg::OnEdit(), DebuggerOptionsProjectDlg::OnEdit(), ProjectOptionsDlg::OnEditDepsClick(), CompilerOptionsDlg::OnEditDirClick(), CompilerOptionsDlg::OnEditExtraPathClick(), EditorConfigurationDlg::OnEditKeywords(), CompilerOptionsDlg::OnEditLibClick(), CompilerOptionsDlg::OnEditVarClick(), MainFrame::OnFilePrint(), ProjectManagerUI::OnFindFile(), CompilerOptionsDlg::OnFlagsPopup(), ProjectManagerUI::OnGotoFile(), CodeCompletion::OnGotoFunction(), EnvironmentSettingsDlg::OnHeadCheck(), MainFrame::OnHelpAbout(), MainFrame::OnHelpPluginMenu(), SelectTargetDlg::OnHostApplicationButtonClick(), EnvironmentSettingsDlg::OnManageAssocs(), CodeCompletion::OnOpenIncludeFile(), ProjectManagerUI::OnProperties(), EditorManager::OnProperties(), ProjectManagerUI::OnRemoveFileFromProject(), EditorConfigurationDlg::OnRenameColourTheme(), ProjectManagerUI::OnRenameFile(), BacktraceDlg::OnSave(), DisassemblyDlg::OnSave(), CompilerOptionsDlg::OnSelectProgramClick(), MainFrame::OnSettingsCompiler(), MainFrame::OnSettingsDebugger(), MainFrame::OnSettingsEditor(), MainFrame::OnSettingsEnvironment(), ProjectManagerUI::OnViewFileMasks(), UserVariableManager::Replace(), FindReplace::ReplaceInFiles(), cbWorkspace::SaveAs(), cbEditor::SaveAs(), cbProject::SaveAs(), CCDebugInfoHelper::SaveCCDebugInfo(), TemplateManager::SaveUserTemplate(), CodeRefactoring::SearchInFiles(), CompilerFactory::SelectCompilerUI(), cbProject::SelectTarget(), FindReplace::ShowFindDialog(), AnnoyingDialog::ShowModal(), cbProject::ShowNotes(), MainFrame::ShowOpenFileDialog(), ProjectFile::ShowOptions(), DebuggerGDB::UpdateBreakpoint(), EditorConfigurationDlg::UpdateSampleFont(), UsrGlblMgrEditDialog::UsrGlblMgrEditDialog(), and CodeRefactoring::VerifyResult().
Definition at line 260 of file globals.cpp.
References _T, and NeedQuotes().
Referenced by CdbCmd_AddBreakpoint::CdbCmd_AddBreakpoint(), CompilerCommandGenerator::FixupLinkLibraries(), CompilerCommandGenerator::GenerateCommandLine(), DirectCommands::GetCompileFileCommand(), DirectCommands::GetCompileSingleFileCommand(), CompilerCommandGenerator::GetProcessedIncludeDir(), CompilerCommandGenerator::Init(), CompilerCommandGenerator::MakeOptString(), EditorManager::OpenContainingFolder(), QuoteString(), MacrosManager::RecalcVars(), CompilerGCC::Run(), CompilerMINGWGenerator::SetupIncludeDirs(), CompilerCommandGenerator::SetupLinkLibraries(), CompilerCommandGenerator::SetupOutputFilenames(), and pfDetails::Update().
Definition at line 1348 of file globals.cpp.
References cbC2U(), and cbU2C().
Referenced by cbProject::AddFile(), cbProject::cbProject(), cbProject::GetFileByFilename(), EditorBase::InitFilename(), EditorManager::IsOpen(), ProjectManager::IsOpen(), EditorManager::Open(), and EditorBase::SetTitle().
DLLIMPORT void RestoreTreeState | ( | wxTreeCtrl * | tree, |
const wxTreeItemId & | parent, | ||
wxArrayString & | nodePaths, | ||
wxArrayString & | selectedItemPaths | ||
) |
Definition at line 589 of file globals.cpp.
References wxArrayString::Clear(), wxTreeCtrl::Collapse(), DoExpandRememberedNode(), DoSelectRememberedNode(), wxArrayString::GetCount(), wxTreeCtrl::GetRootItem(), and wxTreeItemId::IsOk().
Referenced by cbProject::AddExpandedNode().
DLLIMPORT void SaveTreeState | ( | wxTreeCtrl * | tree, |
const wxTreeItemId & | parent, | ||
wxArrayString & | nodePaths, | ||
wxArrayString & | selectedItemPaths | ||
) |
Definition at line 575 of file globals.cpp.
References wxArrayString::Add(), wxArrayString::Clear(), DoRememberExpandedNodes(), DoRememberSelectedNodes(), wxTreeCtrl::IsExpanded(), wxTreeItemId::IsOk(), and wxTreeCtrl::ItemHasChildren().
Referenced by cbProject::AddExpandedNode().
DLLIMPORT void SetSettingsIconsStyle | ( | wxListCtrl * | lc, |
SettingsIconsStyle | style | ||
) |
Set the icons style for the supplied list control.
lc | The wxListCtrl. |
style | The style to use. |
Definition at line 1125 of file globals.cpp.
References wxListCtrl::SetWindowStyleFlag(), sisNoIcons, wxLC_ICON, wxLC_LIST, wxLC_MASK_TYPE, and wxLC_SMALL_ICON.
Referenced by NewFromTemplateDlg::NewFromTemplateDlg(), CompilerSettingsDlg::UpdateListbookImages(), EnvironmentSettingsDlg::UpdateListbookImages(), and EditorConfigurationDlg::UpdateListbookImages().
DLLIMPORT wxString UnixFilename | ( | const wxString & | filename, |
wxPathFormat | format = wxPATH_NATIVE |
||
) |
Definition at line 228 of file globals.cpp.
References _T, wxString::Prepend(), wxString::Replace(), wxString::StartsWith(), wxPATH_NATIVE, wxPATH_UNIX, wxPATH_WIN, and wxT.
Referenced by ProjectLoader::AddArrayOfElements(), CompileOptionsBase::AddBuildScript(), cbProject::AddFile(), CompileOptionsBase::AddIncludeDir(), CompileOptionsBase::AddLibDir(), NativeParser::AddPaths(), CompileOptionsBase::AddResourceIncludeDir(), DirectCommands::AreExternalDepsOutdated(), Compiler::CheckForWarningsAndErrors(), MacrosManager::ClearProjectKeys(), DebuggerGDB::ConvertToGDBFriendly(), ProjectLoader::DoBuildTargetOptions(), ProjectLoader::DoCompilerOptions(), ProjectLoader::DoEnvironment(), ProjectLoader::DoIncludesOptions(), ProjectLoader::DoLibsOptions(), ProjectLoader::DoLinkerOptions(), ProjectLoader::DoProjectOptions(), ProjectLoader::DoResourceCompilerOptions(), ProjectLoader::DoUnitOptions(), ProjectLoader::DoUnits(), ProjectLoader::ExportTargetAsProject(), PluginsConfigurationDlg::FillList(), ParserBase::FindFirstFileInIncludeDirs(), DirectCommands::GetCompileFileCommand(), cbDebuggerPlugin::GetDebuggee(), cbProject::GetFileByFilename(), DirectCommands::GetTargetLinkCommands(), ConfigManager::InitPaths(), PluginManager::InstallPlugin(), EditorManager::IsOpen(), ScriptingManager::LoadBuffer(), ScriptingSettingsDlg::OnBrowse(), CompilerGCC::OnCompileFileRequest(), CompilerGCC::OnJobEnd(), PluginsConfigurationDlg::OnSelect(), WorkspaceLoader::Open(), EditorManager::Open(), GDB_driver::ParseOutput(), PipedProcess::PipedProcess(), cbProject::ProjectFileRenamed(), MacrosManager::RecalcVars(), ScriptBindings::Register_Globals(), CompileOptionsBase::RemoveBuildScript(), cbProject::RemoveFile(), CompileOptionsBase::RemoveIncludeDir(), CompileOptionsBase::RemoveLibDir(), CompileOptionsBase::RemoveResourceIncludeDir(), MacrosManager::ReplaceMacros(), MacrosManager::Reset(), CompilerGCC::Run(), WorkspaceLoader::Save(), WorkspaceLoader::SaveLayout(), CompileOptionsBase::SetBuildScripts(), CompileTargetBase::SetDefinitionFileFilename(), CompileTargetBase::SetDepsOutput(), CompileTargetBase::SetImportLibraryFilename(), CompileOptionsBase::SetIncludeDirs(), CompileOptionsBase::SetLibDirs(), CompileTargetBase::SetObjectOutput(), CompileTargetBase::SetOutputFilename(), cbEditor::SetProjectFile(), CompileOptionsBase::SetResourceIncludeDirs(), EditorBase::SetTitle(), CompilerCommandGenerator::SetupOutputFilenames(), CompileTargetBase::SetWorkingDir(), CompilerGCC::StartCompileFile(), CompileTargetBase::SuggestOutputFilename(), cbDebuggerPlugin::SyncEditor(), and pfDetails::Update().
Definition at line 832 of file globals.cpp.
References _T, wxString::Append(), and wxString::length().
Referenced by EditorBase::OnContextMenuEntry(), and ScriptBindings::Register_Globals().
DLLIMPORT bool UsesCommonControls6 | ( | ) |
Check if CommonControls version is at least 6 (XP and up)
Definition at line 1065 of file globals.cpp.
References _T, and LibLoader::LoadLibrary().
Referenced by cbLoadBitmap().
Definition at line 66 of file globals.cpp.
Referenced by EnvironmentSettingsDlg::EnvironmentSettingsDlg(), EditorManager::OpenContainingFolder(), and OpenContainingFolderData::OpenContainingFolderData().
DLLIMPORT const char* cbGetTextFromUserPromptStr |
Definition at line 1460 of file globals.cpp.
Definition at line 56 of file globals.cpp.
Referenced by CompilerOptionsDlg::DoSaveCompilerDefinition(), EditPathDlg::OnBrowse(), and AdvancedCompilerOptionsDlg::ReadExtensions().
Definition at line 63 of file globals.cpp.
Referenced by CompilerGCC::DoRunQueue(), EnvironmentSettingsDlg::EnvironmentSettingsDlg(), GetShellString(), OpenContainingFolderData::OpenContainingFolderData(), and CompilerGCC::Run().
Definition at line 59 of file globals.cpp.
Referenced by EnvironmentSettingsDlg::EnvironmentSettingsDlg(), ToolsManager::Execute(), CompilerGCC::Run(), cbDebuggerPlugin::RunNixConsole(), and CompilerGCC::RunSingleFile().
Definition at line 55 of file globals.cpp.
Referenced by cbWorkspace::cbWorkspace(), ProjectManager::GetProjects(), and cbWorkspace::SaveAs().