]>
Commit | Line | Data |
---|---|---|
a121d720 VZ |
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 | |
8795498c | 9 | %% License: wxWindows license |
a121d720 VZ |
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 | ||
28 | \wxheading{Include files} | |
29 | ||
30 | <wx/fileconf.h> | |
31 | ||
32 | ||
33 | \helponly{\insertatlevel{2}{\wxheading{Members}}} | |
34 | ||
f510b7b2 | 35 | \membersection{wxFileConfig::wxFileConfig}\label{wxfileconfigctor} |
a121d720 VZ |
36 | |
37 | \func{}{wxFileConfig}{\param{wxInputStream\& }{is}, \param{wxMBConv\& }{conv = wxConvUTF8}} | |
38 | ||
39 | Read the config data from the specified stream instead of the associated file, | |
40 | as usual. | |
41 | ||
42 | \wxheading{See also} | |
43 | ||
44 | \helpref{Save}{wxfileconfigsave} | |
45 | ||
46 | ||
f510b7b2 | 47 | \membersection{wxFileConfig::Save}\label{wxfileconfigsave} |
a121d720 VZ |
48 | |
49 | \func{bool}{Save}{\param{wxOutputStream\& }{os}, \param{wxMBConv\& }{conv = wxConvUTF8}} | |
50 | ||
51 | Saves all config data to the given stream, returns \true if data was saved | |
52 | successfully or \false on error. | |
53 | ||
54 | Note the interaction of this function with the internal ``dirty flag'': the | |
55 | data is saved unconditionally, i.e. even if the object is not dirty. However | |
56 | after saving it successfully, the dirty flag is reset so no changes will be | |
57 | written back to the file this object is associated with until you change its | |
58 | contents again. | |
59 | ||
60 | \wxheading{See also} | |
61 | ||
62 | \helpref{Flush}{wxconfigbaseflush} | |
63 | ||
64 | ||
65 | \membersection{wxFileConfig::SetUmask}\label{wxfileconfigsetumask} | |
66 | ||
67 | \func{void}{SetUmask}{\param{int }{mode}} | |
68 | ||
69 | Allows to set the mode to be used for the config file creation. For example, to | |
70 | create a config file which is not readable by other users (useful if it stores | |
71 | some sensitive information, such as passwords), you could use | |
72 | {\tt SetUmask(0077)}. | |
73 | ||
74 | This function doesn't do anything on non-Unix platforms. | |
75 | ||
76 | \wxheading{See also} | |
77 | ||
78 | \helpref{wxCHANGE\_UMASK}{wxchangeumask} | |
79 | ||
80 | ||
81 |