]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/fileconf.tex
document ItemDeleted()
[wxWidgets.git] / docs / latex / wx / fileconf.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: fileconf.tex
3 %% Purpose: wxFileConfig documentation
4 %% Author: Vadim Zeitlin
5 %% Modified by:
6 %% Created: 2004-10-04
7 %% RCS-ID: $Id$
8 %% Copyright: (c) 2004 Vadim Zeitlin
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \section{\class{wxFileConfig}}\label{wxfileconfig}
13
14 wxFileConfig implements \helpref{wxConfigBase}{wxconfigbase} interface for
15 storing and retrieving configuration information using plain text files. The
16 files have a simple format reminiscent of Windows INI files with lines of the
17 form \texttt{key = value} defining the keys and lines of special form
18 \texttt{$[$group$]$} indicating the start of each group.
19
20 This class is used by default for wxConfig on Unix platforms but may also be
21 used explicitly if you want to use files and not the registry even under
22 Windows.
23
24 \wxheading{Derived from}
25
26 \helpref{wxConfigBase}{wxconfigbase}\\
27 \helpref{wxObject}{wxobject}
28
29 \wxheading{Include files}
30
31 <wx/fileconf.h>
32
33 \wxheading{Library}
34
35 \helpref{wxBase}{librarieslist}
36
37
38 \helponly{\insertatlevel{2}{\wxheading{Members}}}
39
40 \membersection{wxFileConfig::wxFileConfig}\label{wxfileconfigctor}
41
42 \func{}{wxFileConfig}{\param{wxInputStream\& }{is}, \param{const wxMBConv\& }{conv = wxConvAuto()}}
43
44 Read the config data from the specified stream instead of the associated file,
45 as usual.
46
47 \wxheading{See also}
48
49 \helpref{Save}{wxfileconfigsave}
50
51
52 \membersection{wxFileName::GetGlobalFile}\label{wxfilenamegetglobalfile}
53
54 \func{static wxFileName}{GetGlobalFile}{\param{const wxString\& }{basename}}
55
56 Return the full path to the file which would be used by wxFileConfig as global,
57 system-wide, file if it were constructed with \arg{basename} as ``global
58 filename'' parameter in the constructor. Notice that this function cannot be
59 used if \arg{basename} is already a full path name.
60
61
62 \membersection{wxFileName::GetLocalFile}\label{wxfilenamegetlocalfile}
63
64 \func{static wxFileName}{GetLocalFile}{\param{const wxString\& }{basename}, \param{int }{style = $0$}}
65
66 Return the full path to the file which would be used by wxFileConfig as local,
67 user-specific, file if it were constructed with \arg{basename} as ``local
68 filename'' parameter in the constructor.
69
70 \arg{style} has the same meaning as in \helpref{constructor}{wxconfigbasector}
71 and can contain any combination of styles but only wxCONFIG\_USE\_SUBDIR bit is
72 examined by this function.
73
74 Notice that this function cannot be used if \arg{basename} is already a full
75 path name.
76
77
78 \membersection{wxFileConfig::Save}\label{wxfileconfigsave}
79
80 \func{bool}{Save}{\param{wxOutputStream\& }{os}, \param{const wxMBConv\& }{conv = wxConvAuto()}}
81
82 Saves all config data to the given stream, returns \true if data was saved
83 successfully or \false on error.
84
85 Note the interaction of this function with the internal ``dirty flag'': the
86 data is saved unconditionally, i.e. even if the object is not dirty. However
87 after saving it successfully, the dirty flag is reset so no changes will be
88 written back to the file this object is associated with until you change its
89 contents again.
90
91 \wxheading{See also}
92
93 \helpref{Flush}{wxconfigbaseflush}
94
95
96 \membersection{wxFileConfig::SetUmask}\label{wxfileconfigsetumask}
97
98 \func{void}{SetUmask}{\param{int }{mode}}
99
100 Allows to set the mode to be used for the config file creation. For example, to
101 create a config file which is not readable by other users (useful if it stores
102 some sensitive information, such as passwords), you could use
103 {\tt SetUmask(0077)}.
104
105 This function doesn't do anything on non-Unix platforms.
106
107 \wxheading{See also}
108
109 \helpref{wxCHANGE\_UMASK}{wxchangeumask}
110
111
112