]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/utils/wxrcedit/editor.h
added wxFrame::IsMDIChild() (msw only, protected)
[wxWidgets.git] / contrib / utils / wxrcedit / editor.h
index 72333a31432bf6e1c5c9d9d0ea93a707b97272f8..3afd1c19c2d0b860480817cca0269b38d790fc1d 100644 (file)
 #define _EDITOR_H_
 
 
-class wxXmlNode;
-class wxTreeCtrl;
-class wxScrolledWindow;
-class wxSplitterWindow;
-
 #include "wx/frame.h"
-
-
-
+#include "wx/treectrl.h"
+#include "wx/imaglist.h"
+#include "wx/listctrl.h"
+
+class WXDLLEXPORT wxXmlNode;
+class WXDLLEXPORT wxTreeCtrl;
+class WXDLLEXPORT wxScrolledWindow;
+class WXDLLEXPORT wxSplitterWindow;
 class NodeHandler;
-class wxXmlNode;
-class wxXmlDocument;
+class WXDLLEXPORT wxXmlNode;
+class WXDLLEXPORT wxXmlDocument;
 class EditorTreeCtrl;
+class WXDLLEXPORT wxTreeCtrl;
+class WXDLLEXPORT wxListCtrl;
+class WXDLLEXPORT wxTreeItemId;
+class WXDLLEXPORT wxImageList;
+class WXDLLEXPORT wxTreeEvent;
+class WXDLLEXPORT wxListEvent;
 
 enum ChangeType
 {
@@ -52,55 +58,43 @@ class EditorFrame : public wxFrame
         void LoadFile(const wxString& filename);
         void NewFile();
         void SaveFile(const wxString& filename);
+        wxString GetFileName() { return m_FileName; }
         
         void RefreshTree();
-        void RefreshPreview(wxXmlNode *node);
-        void RefreshProps(wxXmlNode *node);
-        void RefreshPropsEdit();
+        void RefreshTitle();
         bool SelectNode(wxXmlNode *node, wxTreeItemId *root = NULL);
         
         wxTreeItemId CreateTreeNode(wxTreeCtrl *treectrl, wxTreeItemId parent, wxXmlNode *node);
-        void CreatePropsList(wxListCtrl *listctrl, wxXmlNode *node);
   
         void NotifyChanged(int change_type);
         
-        void RegisterHandlers(const wxString& dir);
-        
-        NodeHandler *FindHandler(wxXmlNode *node);
-        
         static EditorFrame *Get() { return ms_Instance; }
         
     private:
         static EditorFrame *ms_Instance;
     
         wxTreeCtrl *m_TreeCtrl;
-        wxTextCtrl *m_XMLIDCtrl;
-        wxImageList *m_ImgList, *m_ImgListProp;
-        wxPanel *m_PropsPanel;
-        wxScrolledWindow *m_PropsEditPanel;
-        wxSplitterWindow *m_Splitter, *m_Splitter2;
-        wxListCtrl *m_PropsList;
-        int m_SelectedProp;
         
-        wxList m_Handlers;
-
         wxXmlNode *m_SelectedNode;
+        
+        wxXmlNode *m_Clipboard;
 
         wxString m_FileName;
         wxXmlDocument *m_Resource;
-        wxWindow *m_Preview;
+        
+        bool m_Modified;
+        
+        bool AskToSave();
+        void DeleteSelectedNode();
 
         DECLARE_EVENT_TABLE()
         void OnTreeSel(wxTreeEvent& event);
         void OnToolbar(wxCommandEvent& event);
         void OnNew(wxCommandEvent& event);
-        void OnXMLIDEdit(wxCommandEvent& event);
-        void OnXMLIDPick(wxCommandEvent& event);
-        void OnEditCode(wxCommandEvent& event);
-        void OnClearProp(wxCommandEvent& event);
-        void OnPropSel(wxListEvent& event);
         void OnNewNode(wxCommandEvent& event);
         void OnRightClickTree(wxPoint pos);
+        void OnClipboardAction(wxCommandEvent& event);
+        void OnCloseWindow(wxCloseEvent&);
 };