]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/regconf.h
Added #define wxHelpController to help.h; added wxWinHelpController::Quit code
[wxWidgets.git] / include / wx / msw / regconf.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: msw/regconf.h
3 // Purpose: Registry based implementation of wxConfig
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 27.04.98
7 // RCS-ID: $Id$
8 // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9 // Licence: wxWindows license
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _REGCONF_H
13 #define _REGCONF_H
14
15 // ----------------------------------------------------------------------------
16 // wxRegConfig
17 // ----------------------------------------------------------------------------
18
19 class wxRegConfig : public wxConfig
20 {
21 public:
22 // ctor & dtor
23 // will store data in HKLM\strRegHive and HKCU\strRegHive
24 wxRegConfig(const wxString& strRegHive);
25 // dtor will save unsaved data
26 virtual ~wxRegConfig();
27
28 // implement inherited pure virtual functions
29 // ------------------------------------------
30
31 // path management
32 virtual void SetPath(const wxString& strPath);
33 virtual const wxString& GetPath() const { return m_strPath; }
34
35 // enum
36 virtual bool GetFirstGroup(wxString& str, long& lIndex);
37 virtual bool GetNextGroup (wxString& str, long& lIndex);
38 virtual bool GetFirstEntry(wxString& str, long& lIndex);
39 virtual bool GetNextEntry (wxString& str, long& lIndex);
40
41 // read/write
42 virtual bool Read(wxString&, const char *, const char * = 0) const;
43 virtual bool Read(long&, const char *, long = 0) const;
44 virtual bool Write(const char *szKey, const char *szValue);
45 virtual bool Write(const char *szKey, long Value);
46 virtual bool Flush(bool /* bCurrentOnly = FALSE */ ) { return true; }
47
48 // delete
49 virtual bool DeleteEntry(const char *szKey, bool bGroupIfEmptyAlso);
50 virtual bool DeleteGroup(const char *szKey);
51 virtual bool DeleteAll();
52
53 private:
54 // these keys are opened during all lifetime of wxRegConfig object
55 wxRegKey m_keyLocalRoot, m_keyLocal,
56 m_keyGlobalRoot, m_keyGlobal;
57
58 // current path (not '/' terminated)
59 wxString m_strPath;
60 };
61
62 #endif //_REGCONF_H