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