]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/fileconf.tex
don't make read-only text controls editable when enabled
[wxWidgets.git] / docs / latex / wx / fileconf.tex
CommitLineData
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
14wxFileConfig implements \helpref{wxConfigBase}{wxconfigbase} interface for
15storing and retrieving configuration information using plain text files. The
16files have a simple format reminiscent of Windows INI files with lines of the
17form \texttt{key = value} defining the keys and lines of special form
18\texttt{$[$group$]$} indicating the start of each group.
19
20This class is used by default for wxConfig on Unix platforms but may also be
21used explicitly if you want to use files and not the registry even under
22Windows.
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 36
5487ff0f 37\func{}{wxFileConfig}{\param{wxInputStream\& }{is}, \param{const wxMBConv\& }{conv = wxConvAuto()}}
a121d720
VZ
38
39Read the config data from the specified stream instead of the associated file,
40as usual.
41
42\wxheading{See also}
43
44\helpref{Save}{wxfileconfigsave}
45
46
466e87bd
VZ
47\membersection{wxFileName::GetGlobalFile}\label{wxfilenamegetglobalfile}
48
49\func{static wxFileName}{GetGlobalFile}{\param{const wxString\& }{basename}}
50
51Return the full path to the file which would be used by wxFileConfig as global,
52system-wide, file if it were constructed with \arg{basename} as ``global
53filename'' parameter in the constructor. Notice that this function cannot be
54used if \arg{basename} is already a full path name.
55
56
57\membersection{wxFileName::GetLocalFile}\label{wxfilenamegetlocalfile}
58
59\func{static wxFileName}{GetLocalFile}{\param{const wxString\& }{basename}, \param{int }{style = $0$}}
60
61Return the full path to the file which would be used by wxFileConfig as local,
62user-specific, file if it were constructed with \arg{basename} as ``local
63filename'' parameter in the constructor.
64
65\arg{style} has the same meaning as in \helpref{constructor}{wxconfigbasector}
66and can contain any combination of styles but only wxCONFIG\_USE\_SUBDIR bit is
67examined by this function.
68
69Notice that this function cannot be used if \arg{basename} is already a full
70path name.
71
72
f510b7b2 73\membersection{wxFileConfig::Save}\label{wxfileconfigsave}
a121d720 74
5487ff0f 75\func{bool}{Save}{\param{wxOutputStream\& }{os}, \param{const wxMBConv\& }{conv = wxConvAuto()}}
a121d720
VZ
76
77Saves all config data to the given stream, returns \true if data was saved
78successfully or \false on error.
79
80Note the interaction of this function with the internal ``dirty flag'': the
81data is saved unconditionally, i.e. even if the object is not dirty. However
82after saving it successfully, the dirty flag is reset so no changes will be
83written back to the file this object is associated with until you change its
84contents again.
85
86\wxheading{See also}
87
88\helpref{Flush}{wxconfigbaseflush}
89
90
91\membersection{wxFileConfig::SetUmask}\label{wxfileconfigsetumask}
92
93\func{void}{SetUmask}{\param{int }{mode}}
94
95Allows to set the mode to be used for the config file creation. For example, to
96create a config file which is not readable by other users (useful if it stores
97some sensitive information, such as passwords), you could use
98{\tt SetUmask(0077)}.
99
100This function doesn't do anything on non-Unix platforms.
101
102\wxheading{See also}
103
104\helpref{wxCHANGE\_UMASK}{wxchangeumask}
105
106
107