]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/pathlist.tex
Introduced the ability to size a book control based on the currently selected page
[wxWidgets.git] / docs / latex / wx / pathlist.tex
CommitLineData
a660d684
KB
1\section{\class{wxPathList}}\label{wxpathlist}
2
3The path list is a convenient way of storing a number of directories, and
4when presented with a filename without a directory, searching for an existing file
5in those directories. Storing the filename only in an application's files and
6using a locally-defined list of directories makes the application and its files more
7portable.
8
9Use the {\it wxFileNameFromPath} global function to extract the filename
10from the path.
11
12\wxheading{Derived from}
13
14\helpref{wxList}{wxlist}\\
15\helpref{wxObject}{wxobject}
16
954b8ae6
JS
17\wxheading{Include files}
18
19<wx/filefn.h>
20
a660d684
KB
21\wxheading{See also}
22
23\helpref{wxList}{wxlist}
24
25\latexignore{\rtfignore{\wxheading{Members}}}
26
4d01e350 27
dcbd177f 28\membersection{wxPathList::wxPathList}\label{wxpathlistctor}
a660d684
KB
29
30\func{}{wxPathList}{\void}
31
32Constructor.
33
4d01e350 34
dcbd177f 35\membersection{wxPathList::AddEnvList}\label{wxpathlistaddenvlist}
a660d684
KB
36
37\func{void}{AddEnvList}{\param{const wxString\& }{env\_variable}}
38
39Finds the value of the given environment variable, and adds all paths
40to the path list. Useful for finding files in the PATH variable, for
41example.
42
4d01e350 43
dcbd177f 44\membersection{wxPathList::Add}\label{wxpathlistadd}
a660d684
KB
45
46\func{void}{Add}{\param{const wxString\& }{path}}
47
48Adds the given directory to the path list, but does not
4d01e350
VZ
49check if the path was already on the list (use
50\helpref{wxPathList::Member()}{wxpathlistmember} for this).
51
a660d684 52
dcbd177f 53\membersection{wxPathList::EnsureFileAccessible}\label{wxpathlistensurefileaccessible}
a660d684
KB
54
55\func{void}{EnsureFileAccessible}{\param{const wxString\& }{filename}}
56
57Given a full filename (with path), ensures that files in the same path
58can be accessed using the pathlist. It does this by stripping the
59filename and adding the path to the list if not already there.
60
4d01e350 61
dcbd177f 62\membersection{wxPathList::FindAbsoluteValidPath}\label{wxpathlistfindabsolutepath}
a660d684
KB
63
64\func{wxString}{FindAbsoluteValidPath}{\param{const wxString\& }{file}}
65
66Searches for a full path for an existing file by appending {\it file} to
4d01e350
VZ
67successive members of the path list. If the file wasn't found, an empty
68string is returned.
69
a660d684 70
dcbd177f 71\membersection{wxPathList::FindValidPath}\label{wxpathlistfindvalidpath}
a660d684
KB
72
73\func{wxString}{FindValidPath}{\param{const wxString\& }{file}}
74
75Searches for a full path for an existing file by appending {\it file} to
4d01e350
VZ
76successive members of the path list. If the file wasn't found, an empty string
77is returned. This path may be relative to the current working directory.
78
a660d684 79
4d01e350 80\membersection{wxPathList::Member}\label{wxpathlistmember}
a660d684
KB
81
82\func{bool}{Member}{\param{const wxString\& }{file}}
83
cc81d32f 84true if the path is in the path list (ignoring case).
a660d684 85