Code::Blocks
SVN r11506
|
Provides functions and constants regarding file extension filters present in file dialogs throughout Code::Blocks. More...
Functions | |
DLLIMPORT void | AddDefaultFileFilters () |
Adds file filters for various supported projects and workspaces. More... | |
DLLIMPORT bool | Add (const wxString &name, const wxString &mask) |
Add a new extension filter. More... | |
DLLIMPORT wxString | GetFilterString (const wxString &ext=wxEmptyString) |
Generates and returns the filter string for use in file dialogs. More... | |
DLLIMPORT wxString | GetFilterAll () |
Generates a simple special filter "All files". More... | |
DLLIMPORT size_t | GetIndexForFilterAll () |
Get the filter index for the special "All files" filter. More... | |
DLLIMPORT bool | GetFilterNameFromIndex (const wxString &FiltersList, int Index, wxString &FilterName) |
Get the Filter name for the Index-th filter in the FiltersList. More... | |
DLLIMPORT bool | GetFilterIndexFromName (const wxString &FiltersList, const wxString &FilterName, int &Index) |
Get the index of the filter 'FilterName' in the FiltersList. More... | |
Provides functions and constants regarding file extension filters present in file dialogs throughout Code::Blocks.
Add a new extension filter.
name | The filter's name. |
mask | The extension masks comma-separated string (i.e. "*.cpp,*.c"). |
Definition at line 41 of file filefilters.cpp.
References _T, wxString::IsEmpty(), wxString::npos, wxString::Replace(), and s_Filters.
Referenced by AddDefaultFileFilters(), CreateDefaultDelegate(), and EditorColourSet::SetFileMasks().
void FileFilters::AddDefaultFileFilters | ( | ) |
Adds file filters for various supported projects and workspaces.
Definition at line 23 of file filefilters.cpp.
References _(), _T, Add(), and s_Filters.
Referenced by MainFrame::MainFrame().
wxString FileFilters::GetFilterAll | ( | ) |
Generates a simple special filter "All files".
No other filters are added.
Definition at line 98 of file filefilters.cpp.
References _(), and s_LastFilterAllIndex.
Referenced by GetFilterString(), EditArrayFileDlg::OnAdd(), EditPairDlg::OnBrowse(), ProjectOptionsDlg::OnBrowseDefinitionFileFilenameClick(), ProjectOptionsDlg::OnBrowseImportLibraryFilenameClick(), ProjectOptionsDlg::OnBrowseOutputFilenameClick(), EditArrayFileDlg::OnEdit(), BacktraceDlg::OnSave(), and DisassemblyDlg::OnSave().
bool FileFilters::GetFilterIndexFromName | ( | const wxString & | FiltersList, |
const wxString & | FilterName, | ||
int & | Index | ||
) |
Get the index of the filter 'FilterName' in the FiltersList.
FiltersList | The list of Filters |
FilterName | Name of the filter we want to know the index of |
Index | Receives the index of the filter if found |
Definition at line 112 of file filefilters.cpp.
References _T, GetArrayFromString(), and wxArrayString::GetCount().
Referenced by MainFrame::DoOnFileOpen(), and cbEditor::SaveAs().
bool FileFilters::GetFilterNameFromIndex | ( | const wxString & | FiltersList, |
int | Index, | ||
wxString & | FilterName | ||
) |
Get the Filter name for the Index-th filter in the FiltersList.
FiltersList | The list of Filters |
Index | The index in the FiltersList of the filter we want to know the name of |
FilterName | Receives the filters name if found |
Definition at line 130 of file filefilters.cpp.
References _T, GetArrayFromString(), and wxArrayString::GetCount().
Referenced by MainFrame::DoOnFileOpen(), and cbEditor::SaveAs().
wxString FileFilters::GetFilterString | ( | const wxString & | ext = wxEmptyString | ) |
Generates and returns the filter string for use in file dialogs.
ext | If not empty, only filters matching this extension will be returned. Note that ext must include the separating dot. It can be a full filename if you want, but it cannot be just the extension (without the separating dot). |
Definition at line 60 of file filefilters.cpp.
References _T, GetArrayFromString(), wxArrayString::GetCount(), GetFilterAll(), wxString::IsEmpty(), wxString::Matches(), s_Filters, and s_LastFilterAllIndex.
Referenced by MainFrame::DoOnFileOpen(), ProjectManagerUI::OnAddFileToProject(), ScriptingSettingsDlg::OnBrowse(), MainFrame::OnFileImportProjectDevCpp(), MainFrame::OnFileImportProjectMSVC(), MainFrame::OnFileImportProjectMSVCWksp(), MainFrame::OnFileImportProjectMSVS(), MainFrame::OnFileImportProjectMSVSWksp(), cbWorkspace::SaveAs(), cbEditor::SaveAs(), and cbProject::SaveAs().
size_t FileFilters::GetIndexForFilterAll | ( | ) |
Get the filter index for the special "All files" filter.
Definition at line 107 of file filefilters.cpp.
References s_LastFilterAllIndex.
Referenced by MainFrame::DoOnFileOpen(), and ProjectManagerUI::OnAddFileToProject().
const wxString FileFilters::ASM_DOT_EXT = _T('.') + FileFilters::ASM_EXT |
Definition at line 215 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 156 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::C_DOT_EXT = _T('.') + FileFilters::C_EXT |
Definition at line 226 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 167 of file filefilters.cpp.
Referenced by cbProject::AddFile(), ProjectLoader::ExportTargetAsProject(), FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::CC_DOT_EXT = _T('.') + FileFilters::CC_EXT |
Definition at line 227 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 168 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::CODEBLOCKS_DOT_EXT = _T('.') + FileFilters::CODEBLOCKS_EXT |
Definition at line 206 of file filefilters.cpp.
Referenced by ProjectPathPanel::OntxtPrjTitleText(), and ScriptBindings::Register_Constants().
Definition at line 147 of file filefilters.cpp.
Referenced by cbProject::CreateUniqueFilename(), Associations::DoClearAssociation(), Associations::DoSetAssociation(), FileTypeOf(), ScriptBindings::Register_Constants(), and cbProject::SaveAs().
const wxString FileFilters::CPLPL_DOT_EXT = _T('.') + FileFilters::CPLPL_EXT |
Definition at line 232 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 173 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::CPP_DOT_EXT = _T('.') + FileFilters::CPP_EXT |
Definition at line 228 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 169 of file filefilters.cpp.
Referenced by FileTypeOf(), ScriptBindings::Register_Constants(), and EditorManager::SwapActiveHeaderSource().
const wxString FileFilters::CXX_DOT_EXT = _T('.') + FileFilters::CXX_EXT |
Definition at line 231 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 172 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::D_DOT_EXT = _T('.') + FileFilters::D_EXT |
Definition at line 216 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 157 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::DEVCPP_DOT_EXT = _T('.') + FileFilters::DEVCPP_EXT |
Definition at line 207 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 148 of file filefilters.cpp.
Referenced by FileTypeOf(), MainFrame::OnFileImportProjectDevCpp(), and ScriptBindings::Register_Constants().
const wxString FileFilters::DYNAMICLIB_DOT_EXT = _T('.') + FileFilters::DYNAMICLIB_EXT |
Definition at line 250 of file filefilters.cpp.
Referenced by CompileTargetBase::GenerateTargetFilename(), PluginManager::InstallPlugin(), and ScriptBindings::Register_Constants().
Definition at line 191 of file filefilters.cpp.
Referenced by FileTypeOf(), CompileTargetBase::GetDynamicLibFilename(), ProjectOptionsDlg::OnProjectTypeChanged(), and ScriptBindings::Register_Constants().
const wxString FileFilters::EXECUTABLE_DOT_EXT = _T('.') + FileFilters::EXECUTABLE_EXT |
Definition at line 251 of file filefilters.cpp.
Referenced by CompileTargetBase::GenerateTargetFilename(), and ScriptBindings::Register_Constants().
Definition at line 192 of file filefilters.cpp.
Referenced by FileTypeOf(), CompilerCommandGenerator::GenerateCommandLine(), DirectCommands::GetCleanSingleFileCommand(), DirectCommands::GetCompileSingleFileCommand(), CompileTargetBase::GetExecutableFilename(), ProjectOptionsDlg::OnProjectTypeChanged(), ScriptBindings::Register_Constants(), and CompilerGCC::RunSingleFile().
const wxString FileFilters::F03_DOT_EXT = _T('.') + FileFilters::F03_EXT |
Definition at line 223 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 164 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::F08_DOT_EXT = _T('.') + FileFilters::F08_EXT |
Definition at line 224 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 165 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::F77_DOT_EXT = _T('.') + FileFilters::F77_EXT |
Definition at line 218 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 159 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::F90_DOT_EXT = _T('.') + FileFilters::F90_EXT |
Definition at line 219 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 160 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::F95_DOT_EXT = _T('.') + FileFilters::F95_EXT |
Definition at line 220 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 161 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::F_DOT_EXT = _T('.') + FileFilters::F_EXT |
Definition at line 217 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 158 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::FOR_DOT_EXT = _T('.') + FileFilters::FOR_EXT |
Definition at line 221 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 162 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::FPP_DOT_EXT = _T('.') + FileFilters::FPP_EXT |
Definition at line 222 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 163 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::H_DOT_EXT = _T('.') + FileFilters::H_EXT |
Definition at line 234 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 175 of file filefilters.cpp.
Referenced by FileTypeOf(), ScriptBindings::Register_Constants(), and EditorManager::SwapActiveHeaderSource().
const wxString FileFilters::HH_DOT_EXT = _T('.') + FileFilters::HH_EXT |
Definition at line 235 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 176 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::HPLPL_DOT_EXT = _T('.') + FileFilters::HPLPL_EXT |
Definition at line 238 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 179 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::HPP_DOT_EXT = _T('.') + FileFilters::HPP_EXT |
Definition at line 236 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 177 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::HXX_DOT_EXT = _T('.') + FileFilters::HXX_EXT |
Definition at line 237 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 178 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::INL_DOT_EXT = _T('.') + FileFilters::INL_EXT |
Definition at line 233 of file filefilters.cpp.
Definition at line 174 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::JAVA_DOT_EXT = _T('.') + FileFilters::JAVA_EXT |
Definition at line 225 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 166 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::MSVC10_DOT_EXT = _T('.') + FileFilters::MSVC10_EXT |
Definition at line 210 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 151 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::MSVC6_DOT_EXT = _T('.') + FileFilters::MSVC6_EXT |
Definition at line 208 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 149 of file filefilters.cpp.
Referenced by FileTypeOf(), MainFrame::OnFileImportProjectMSVC(), and ScriptBindings::Register_Constants().
const wxString FileFilters::MSVC6_WORKSPACE_DOT_EXT = _T('.') + FileFilters::MSVC6_WORKSPACE_EXT |
Definition at line 211 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 152 of file filefilters.cpp.
Referenced by FileTypeOf(), MainFrame::OnFileImportProjectMSVCWksp(), and ScriptBindings::Register_Constants().
const wxString FileFilters::MSVC7_DOT_EXT = _T('.') + FileFilters::MSVC7_EXT |
Definition at line 209 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 150 of file filefilters.cpp.
Referenced by FileTypeOf(), MainFrame::OnFileImportProjectMSVS(), and ScriptBindings::Register_Constants().
const wxString FileFilters::MSVC7_WORKSPACE_DOT_EXT = _T('.') + FileFilters::MSVC7_WORKSPACE_EXT |
Definition at line 212 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 153 of file filefilters.cpp.
Referenced by FileTypeOf(), MainFrame::OnFileImportProjectMSVSWksp(), and ScriptBindings::Register_Constants().
const wxString FileFilters::NATIVE_DOT_EXT = _T('.') + FileFilters::NATIVE_EXT |
Definition at line 252 of file filefilters.cpp.
Referenced by CompileTargetBase::GenerateTargetFilename(), and ScriptBindings::Register_Constants().
Definition at line 193 of file filefilters.cpp.
Referenced by FileTypeOf(), CompileTargetBase::GetNativeFilename(), and ProjectOptionsDlg::OnProjectTypeChanged().
const wxString FileFilters::OBJECT_DOT_EXT = _T('.') + FileFilters::OBJECT_EXT |
Definition at line 242 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 183 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::RESOURCE_DOT_EXT = _T('.') + FileFilters::RESOURCE_EXT |
Definition at line 245 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 186 of file filefilters.cpp.
Referenced by cbProject::AddFile(), ProjectLoader::ExportTargetAsProject(), FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::RESOURCEBIN_DOT_EXT = _T('.') + FileFilters::RESOURCEBIN_EXT |
Definition at line 246 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants(), ProjectFile::SetObjName(), and pfDetails::Update().
Definition at line 187 of file filefilters.cpp.
Referenced by FileTypeOf(), ScriptBindings::Register_Constants(), ProjectFile::SetObjName(), and pfDetails::Update().
const wxString FileFilters::S62_DOT_EXT = _T('.') + FileFilters::S62_EXT |
Definition at line 241 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 182 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::S_DOT_EXT = _T('.') + FileFilters::S_EXT |
Definition at line 239 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 180 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::SCRIPT_DOT_EXT = _T('.') + FileFilters::SCRIPT_EXT |
Definition at line 248 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 189 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::SS_DOT_EXT = _T('.') + FileFilters::SS_EXT |
Definition at line 240 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 181 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::STATICLIB_DOT_EXT = _T('.') + FileFilters::STATICLIB_EXT |
Definition at line 244 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 185 of file filefilters.cpp.
Referenced by FileTypeOf(), CompileTargetBase::GenerateTargetFilename(), CompileTargetBase::GetStaticLibFilename(), ProjectOptionsDlg::OnProjectTypeChanged(), and ScriptBindings::Register_Constants().
const wxString FileFilters::TCC_DOT_EXT = _T('.') + FileFilters::TCC_EXT |
Definition at line 230 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 171 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::TPP_DOT_EXT = _T('.') + FileFilters::TPP_EXT |
Definition at line 229 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 170 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::WORKSPACE_DOT_EXT = _T('.') + FileFilters::WORKSPACE_EXT |
Definition at line 205 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 146 of file filefilters.cpp.
Referenced by Associations::DoClearAssociation(), Associations::DoSetAssociation(), FileTypeOf(), cbWorkspace::Load(), ScriptBindings::Register_Constants(), and cbWorkspace::SaveAs().
const wxString FileFilters::XCODE1_DOT_EXT = _T('.') + FileFilters::XCODE1_EXT |
Definition at line 213 of file filefilters.cpp.
Definition at line 154 of file filefilters.cpp.
Referenced by FileTypeOf().
const wxString FileFilters::XCODE2_DOT_EXT = _T('.') + FileFilters::XCODE2_EXT |
Definition at line 214 of file filefilters.cpp.
Definition at line 155 of file filefilters.cpp.
Referenced by FileTypeOf().
const wxString FileFilters::XML_DOT_EXT = _T('.') + FileFilters::XML_EXT |
Definition at line 247 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 188 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().
const wxString FileFilters::XRCRESOURCE_DOT_EXT = _T('.') + FileFilters::XRCRESOURCE_EXT |
Definition at line 243 of file filefilters.cpp.
Referenced by ScriptBindings::Register_Constants().
Definition at line 184 of file filefilters.cpp.
Referenced by FileTypeOf(), and ScriptBindings::Register_Constants().