X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/26607f41ae9c6e8d805167e039ddf64eacee55a8..bfa7bf7d6b75e4fa31db205cf0b339c28ea6d090:/contrib/utils/wxrcedit/editor.h diff --git a/contrib/utils/wxrcedit/editor.h b/contrib/utils/wxrcedit/editor.h index 3afd1c19c2..90917acff9 100644 --- a/contrib/utils/wxrcedit/editor.h +++ b/contrib/utils/wxrcedit/editor.h @@ -7,7 +7,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "editor.h" #endif @@ -47,11 +47,23 @@ enum ChangeType }; +class wxXmlRcEditDocument : public wxXmlDocument +{ + // Helper functions for Upgrade() + void UpgradeNodeValue(wxXmlNode *node); + void UpgradeNode(wxXmlNode *node); + + public: + // Upgrades older versions + void Upgrade(); + +}; + class EditorFrame : public wxFrame { public: friend class EditorTreeCtrl; - + EditorFrame(wxFrame *parent, const wxString& filename); ~EditorFrame(); @@ -59,31 +71,31 @@ class EditorFrame : public wxFrame void NewFile(); void SaveFile(const wxString& filename); wxString GetFileName() { return m_FileName; } - + void RefreshTree(); void RefreshTitle(); bool SelectNode(wxXmlNode *node, wxTreeItemId *root = NULL); - + wxTreeItemId CreateTreeNode(wxTreeCtrl *treectrl, wxTreeItemId parent, wxXmlNode *node); - + void NotifyChanged(int change_type); - + static EditorFrame *Get() { return ms_Instance; } - + private: static EditorFrame *ms_Instance; - + wxTreeCtrl *m_TreeCtrl; - + wxXmlNode *m_SelectedNode; - + wxXmlNode *m_Clipboard; wxString m_FileName; - wxXmlDocument *m_Resource; - + wxXmlRcEditDocument *m_Resource; + bool m_Modified; - + bool AskToSave(); void DeleteSelectedNode();