#include "wx/textfile.h"
#include "wx/string.h"
#include "wx/confbase.h"
+#include "wx/filename.h"
// ----------------------------------------------------------------------------
// wxFileConfig
//
// where file is the basename of szFile, ext is its extension
// or .conf (Unix) or .ini (Win) if it has none
- static wxString GetGlobalFileName(const wxChar *szFile);
- static wxString GetLocalFileName(const wxChar *szFile);
+ static wxFileName GetGlobalFile(const wxString& szFile);
+ static wxFileName GetLocalFile(const wxString& szFile, int style = 0);
+
+ static wxString GetGlobalFileName(const wxString& szFile)
+ {
+ return GetGlobalFile(szFile).GetFullPath();
+ }
+
+ static wxString GetLocalFileName(const wxString& szFile, int style = 0)
+ {
+ return GetLocalFile(szFile, style).GetFullPath();
+ }
// ctor & dtor
// New constructor: one size fits all. Specify wxCONFIG_USE_LOCAL_FILE or
private:
// GetXXXFileName helpers: return ('/' terminated) directory names
static wxString GetGlobalDir();
- static wxString GetLocalDir();
+ static wxString GetLocalDir(int style = 0);
// common part of all ctors (assumes that m_str{Local|Global}File are already
// initialized
wxFileConfigLineList *m_linesHead, // head of the linked list
*m_linesTail; // tail
- wxString m_strLocalFile, // local file name passed to ctor
- m_strGlobalFile; // global
+ wxFileName m_fnLocalFile, // local file name passed to ctor
+ m_fnGlobalFile; // global
wxString m_strPath; // current path (not '/' terminated)
wxFileConfigGroup *m_pRootGroup, // the top (unnamed) group
bool m_isDirty; // if true, we have unsaved changes
DECLARE_NO_COPY_CLASS(wxFileConfig)
+ DECLARE_ABSTRACT_CLASS(wxFileConfig)
};
#endif