⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pathlist.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
字号:
\section{\class{wxPathList}}\label{wxpathlist}The path list is a convenient way of storing a number of directories, andwhen presented with a filename without a directory, searching for an existing filein those directories.Be sure to look also at \helpref{wxStandardPaths}{wxstandardpaths} if you onlywant to search files in some standard paths.\wxheading{Derived from}\helpref{wxArrayString}{wxarraystring}\wxheading{Include files}<wx/filefn.h>\wxheading{See also}\helpref{wxArrayString}{wxarraystring}, \helpref{wxStandardPaths}{wxstandardpaths}, \helpref{wxFileName}{wxfilename}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxPathList::wxPathList}\label{wxpathlistctor}\func{}{wxPathList}{\void}Empty constructor.\func{}{wxPathList}{\param{const wxArrayString\& }{arr}}Constructs the object calling the \helpref{Add}{wxpathlistadd} function.\membersection{wxPathList::AddEnvList}\label{wxpathlistaddenvlist}\func{void}{AddEnvList}{\param{const wxString\& }{env\_variable}}Finds the value of the given environment variable, and adds all pathsto the path list. Useful for finding files in the {\tt PATH} variable, forexample.\membersection{wxPathList::Add}\label{wxpathlistadd}\func{bool}{Add}{\param{const wxString\& }{path}}\func{void}{Add}{\param{const wxArrayString\& }{arr}}The first form adds the given directory to the path list, if the path is not already in the list.If the path cannot be normalized for some reason, it returns \false.The second form just calls the first form on all elements of the given array.The {\it path} is always considered a directory but no existence checks will be done on it(because if it doesn't exist, it could be created later and thus result a valid path when\helpref{FindValidPath}{wxpathlistfindvalidpath} is called).{\bf Note:} if the given path is relative, it won't be made absolute before adding it(this is why \helpref{FindValidPath}{wxpathlistfindvalidpath} may return relative paths).\membersection{wxPathList::EnsureFileAccessible}\label{wxpathlistensurefileaccessible}\func{bool}{EnsureFileAccessible}{\param{const wxString\& }{filename}}Given a full filename (with path), calls \helpref{Add}{wxpathlistadd} with the pathof the file.\membersection{wxPathList::FindAbsoluteValidPath}\label{wxpathlistfindabsolutepath}\constfunc{wxString}{FindAbsoluteValidPath}{\param{const wxString\& }{file}}Like \helpref{FindValidPath}{wxpathlistfindvalidpath} but this function alwaysreturns an absolute path (eventually prepending the current working directoryto the value returned \helpref{FindValidPath}{wxpathlistfindvalidpath}) or anempty string.\membersection{wxPathList::FindValidPath}\label{wxpathlistfindvalidpath}\constfunc{wxString}{FindValidPath}{\param{const wxString\& }{file}}Searches the given file in all paths stored in this class.The first path which concatenated to the given string points to an existingfile (see \helpref{wxFileExists}{wxfileexists}) is returned.If the file wasn't found in any of the stored paths, an empty string is returned.The given string must be a file name, eventually with a path prefix (if the pathprefix is absolute, only its name will be searched); i.e. it must not end witha directory separator (see \helpref{wxFileName::GetPathSeparator}{wxfilenamegetpathseparator})otherwise an assertion will fail.The returned path may be relative to the current working directory.Note in fact that wxPathList can be used to store both relative and absolute paths so thatif you \helpref{Add()}{wxpathlistadd}ed relative paths, then the current working directory(see \helpref{wxGetCwd}{wxgetcwd} and \helpref{wxSetWorkingDirectory}{wxsetworkingdirectory})may affect the value returned by this function!

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -