/////////////////////////////////////////////////////////////////////////////
-// Name: docview.h
+// Name: wx/docview.h
// Purpose: Doc/View classes
// Author: Julian Smart
// Modified by:
#if wxUSE_DOC_VIEW_ARCHITECTURE
#include "wx/list.h"
-#include "wx/cmndata.h"
#include "wx/string.h"
#include "wx/frame.h"
{
public:
wxDocument(wxDocument *parent = (wxDocument *) NULL);
- ~wxDocument();
+ virtual ~wxDocument();
// accessors
void SetFilename(const wxString& filename, bool notifyViews = false);
public:
// wxView(wxDocument *doc = (wxDocument *) NULL);
wxView();
- ~wxView();
+ virtual ~wxView();
wxDocument *GetDocument() const { return m_viewDocument; }
virtual void SetDocument(wxDocument *doc);
wxClassInfo *viewClassInfo = (wxClassInfo *)NULL,
long flags = wxDEFAULT_TEMPLATE_FLAGS);
- ~wxDocTemplate();
+ virtual ~wxDocTemplate();
// By default, these two member functions dynamically creates document and
// view using dynamic instance construction. Override these if you need a
{
public:
wxDocManager(long flags = wxDEFAULT_DOCMAN_FLAGS, bool initialize = true);
- ~wxDocManager();
+ virtual ~wxDocManager();
virtual bool Initialize();
// Get the current document manager
static wxDocManager* GetDocumentManager() { return sm_docManager; }
+#if WXWIN_COMPATIBILITY_2_6
// deprecated, use GetHistoryFilesCount() instead
wxDEPRECATED( size_t GetNoHistoryFiles() const );
+#endif // WXWIN_COMPATIBILITY_2_6
protected:
long m_flags;
DECLARE_NO_COPY_CLASS(wxDocManager)
};
+#if WXWIN_COMPATIBILITY_2_6
inline size_t wxDocManager::GetNoHistoryFiles() const
{
return GetHistoryFilesCount();
}
+#endif // WXWIN_COMPATIBILITY_2_6
// ----------------------------------------------------------------------------
// A default child frame
const wxSize& size = wxDefaultSize,
long type = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxT("frame"));
- ~wxDocChildFrame(){}
+ virtual ~wxDocChildFrame(){}
// Extend event processing to search the view's event table
virtual bool ProcessEvent(wxEvent& event);
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);
wxDocManager *m_docManager;
private:
+ typedef wxFrame base_type;
DECLARE_CLASS(wxDocParentFrame)
DECLARE_EVENT_TABLE()
DECLARE_NO_COPY_CLASS(wxDocParentFrame)
{
public:
wxFileHistory(size_t maxFiles = 9, wxWindowID idBase = wxID_FILE1);
- ~wxFileHistory();
+ virtual ~wxFileHistory();
// Operations
virtual void AddFileToHistory(const wxString& file);
const wxList& GetMenus() const { return m_fileMenus; }
+#if WXWIN_COMPATIBILITY_2_6
// deprecated, use GetCount() instead
wxDEPRECATED( size_t GetNoHistoryFiles() const );
+#endif // WXWIN_COMPATIBILITY_2_6
protected:
// Last n files
DECLARE_NO_COPY_CLASS(wxFileHistory)
};
+#if WXWIN_COMPATIBILITY_2_6
inline size_t wxFileHistory::GetNoHistoryFiles() const
{
return m_fileHistoryN;
}
+#endif // WXWIN_COMPATIBILITY_2_6
#if wxUSE_STD_IOSTREAM
// For compatibility with existing file formats: