]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/docview.h
test whether pointer is non-NULL before using it, not after, in wxAnimation::Load...
[wxWidgets.git] / include / wx / docview.h
index 5aa48192a3190780dda931651637e9741e82bc04..1af42ff2c954e05da194c81679409cbd29957ea1 100644 (file)
@@ -17,7 +17,6 @@
 #if wxUSE_DOC_VIEW_ARCHITECTURE
 
 #include "wx/list.h"
-#include "wx/cmndata.h"
 #include "wx/string.h"
 #include "wx/frame.h"
 
@@ -499,14 +498,24 @@ private:
 class WXDLLEXPORT wxDocParentFrame : public wxFrame
 {
 public:
+    wxDocParentFrame();
     wxDocParentFrame(wxDocManager *manager,
                      wxFrame *frame,
                      wxWindowID id,
                      const wxString& title,
                      const wxPoint& pos = wxDefaultPosition,
                      const wxSize& size = wxDefaultSize,
-                     long type = wxDEFAULT_FRAME_STYLE,
-                     const wxString& name = wxT("frame"));
+                     long style = wxDEFAULT_FRAME_STYLE,
+                     const wxString& name = wxFrameNameStr);
+
+    bool Create(wxDocManager *manager,
+                wxFrame *frame,
+                wxWindowID id,
+                const wxString& title,
+                const wxPoint& pos = wxDefaultPosition,
+                const wxSize& size = wxDefaultSize,
+                long style = wxDEFAULT_FRAME_STYLE,
+                const wxString& name = wxFrameNameStr);
 
     // Extend event processing to search the document manager's event table
     virtual bool ProcessEvent(wxEvent& event);
@@ -521,6 +530,7 @@ protected:
     wxDocManager *m_docManager;
 
 private:
+    typedef wxFrame base_type;
     DECLARE_CLASS(wxDocParentFrame)
     DECLARE_EVENT_TABLE()
     DECLARE_NO_COPY_CLASS(wxDocParentFrame)
@@ -584,6 +594,10 @@ public:
 
     const wxList& GetMenus() const { return m_fileMenus; }
 
+    // Set/get base id
+    void SetBaseId(wxWindowID baseId) { m_idBase = baseId; }
+    wxWindowID GetBaseId() const { return m_idBase; }
+
 #if WXWIN_COMPATIBILITY_2_6
     // deprecated, use GetCount() instead
     wxDEPRECATED( size_t GetNoHistoryFiles() const );