X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12d9e30820444b48882ab9e29139611b99a84495..6ee3c06421446908fabe9de45b8e0c7519c28c24:/contrib/utils/wxrcedit/editor.h?ds=sidebyside diff --git a/contrib/utils/wxrcedit/editor.h b/contrib/utils/wxrcedit/editor.h index bb1d365c79..a81f2d0892 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,6 +47,18 @@ 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: @@ -61,6 +73,7 @@ class EditorFrame : public wxFrame wxString GetFileName() { return m_FileName; } void RefreshTree(); + void RefreshTitle(); bool SelectNode(wxXmlNode *node, wxTreeItemId *root = NULL); wxTreeItemId CreateTreeNode(wxTreeCtrl *treectrl, wxTreeItemId parent, wxXmlNode *node); @@ -79,7 +92,12 @@ class EditorFrame : public wxFrame wxXmlNode *m_Clipboard; wxString m_FileName; - wxXmlDocument *m_Resource; + wxXmlRcEditDocument *m_Resource; + + bool m_Modified; + + bool AskToSave(); + void DeleteSelectedNode(); DECLARE_EVENT_TABLE() void OnTreeSel(wxTreeEvent& event); @@ -88,8 +106,7 @@ class EditorFrame : public wxFrame void OnNewNode(wxCommandEvent& event); void OnRightClickTree(wxPoint pos); void OnClipboardAction(wxCommandEvent& event); - - void DeleteSelectedNode(); + void OnCloseWindow(wxCloseEvent&); };