};
+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:
wxString GetFileName() { return m_FileName; }
void RefreshTree();
+ void RefreshTitle();
bool SelectNode(wxXmlNode *node, wxTreeItemId *root = NULL);
wxTreeItemId CreateTreeNode(wxTreeCtrl *treectrl, wxTreeItemId parent, wxXmlNode *node);
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);
void OnNewNode(wxCommandEvent& event);
void OnRightClickTree(wxPoint pos);
void OnClipboardAction(wxCommandEvent& event);
-
- void DeleteSelectedNode();
+ void OnCloseWindow(wxCloseEvent&);
};