📄 tconfig.tex
字号:
\section{wxConfig classes overview}\label{wxconfigoverview}Classes: \helpref{wxConfig}{wxconfigbase}This overview briefly describes what the config classes are and what they arefor. All the details about how to use them may be found in the description ofthe \helpref{wxConfigBase}{wxconfigbase} class and the documentation of thefile, registry and INI file based implementations mentions all thefeatures/limitations specific to each one of these versions.The config classes provide a way to store some application configurationinformation. They were especially designed for this usage and, although mayprobably be used for many other things as well, should be limited to it. Itmeans that this information should be:\begin{enumerate}\itemsep=0pt\item Typed, i.e. strings or numbers for the moment. You can not storebinary data, for example.\item Small. For instance, it is not recommended to use the Windowsregistry for amounts of data more than a couple of kilobytes.\item Not performance critical, neither from speed nor from a memoryconsumption point of view.\end{enumerate}On the other hand, the features provided make them very useful for storing allkinds of small to medium volumes of hierarchically-organized, heterogeneousdata. In short, this is a place where you can conveniently stuff all your data(numbers and strings) organizing it in a tree where you use thefilesystem-like paths to specify the location of a piece of data. Inparticular, these classes were designed to be as easy to use as possible.From another point of view, they provide an interface which hides thedifferences between the Windows registry and the standard Unix text formatconfiguration files. Other (future) implementations of wxConfigBase might alsounderstand GTK resource files or their analogues on the KDE side.In any case, each implementation of wxConfigBase does its best tomake the data look the same way everywhere. Due to limitations of the underlying physical storage, it may not implement 100\% of the base class functionality.There are groups of entries and the entries themselves. Each entry contains either a string or a number(or a boolean value; support for other types of data such as dates ortimestamps is planned) and is identified by the full path to it: somethinglike /MyApp/UserPreferences/Colors/Foreground. The previous elements in thepath are the group names, and each name may contain an arbitrary number of entriesand subgroups. The path components are {\bf always} separated with a slash,even though some implementations use the backslash internally. Furtherdetails (including how to read/write these entries) may be found in the documentation for \helpref{wxConfigBase}{wxconfigbase}.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -