X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/89d94e046d82725ac0b6d266c3d6263237ab2e47..ada083260a7c74b3bd084f6092a298e64a6c6b0f:/include/wx/docview.h?ds=sidebyside diff --git a/include/wx/docview.h b/include/wx/docview.h index f03945be15..821c7abc1c 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -190,7 +190,7 @@ protected: private: DECLARE_ABSTRACT_CLASS(wxDocument) - DECLARE_NO_COPY_CLASS(wxDocument) + wxDECLARE_NO_COPY_CLASS(wxDocument); }; class WXDLLIMPEXP_CORE wxView: public wxEvtHandler @@ -251,7 +251,7 @@ protected: private: DECLARE_ABSTRACT_CLASS(wxView) - DECLARE_NO_COPY_CLASS(wxView) + wxDECLARE_NO_COPY_CLASS(wxView); }; // Represents user interface (and other) properties of documents and views @@ -336,7 +336,7 @@ protected: private: DECLARE_CLASS(wxDocTemplate) - DECLARE_NO_COPY_CLASS(wxDocTemplate) + wxDECLARE_NO_COPY_CLASS(wxDocTemplate); }; // One object of this class may be created in an application, to manage all @@ -417,7 +417,7 @@ public: // Views or windows should inform the document manager // when a view is going in or out of focus virtual void ActivateView(wxView *view, bool activate = true); - virtual wxView *GetCurrentView() const; + virtual wxView *GetCurrentView() const { return m_currentView; } wxList& GetDocuments() { return m_docs; } wxList& GetTemplates() { return m_templates; } @@ -472,6 +472,11 @@ protected: // return the command processor for the current document, if any wxCommandProcessor *GetCurrentCommandProcessor() const; + // this method tries to find an active view harder than GetCurrentView(): + // if the latter is NULL, it also checks if we don't have just a single + // view and returns it then + wxView *GetActiveView() const; + int m_defaultDocumentNameCounter; int m_maxDocsOpen; @@ -484,7 +489,7 @@ protected: DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(wxDocManager) - DECLARE_NO_COPY_CLASS(wxDocManager) + wxDECLARE_NO_COPY_CLASS(wxDocManager); }; #if WXWIN_COMPATIBILITY_2_6 @@ -531,7 +536,7 @@ protected: private: DECLARE_CLASS(wxDocChildFrame) DECLARE_EVENT_TABLE() - DECLARE_NO_COPY_CLASS(wxDocChildFrame) + wxDECLARE_NO_COPY_CLASS(wxDocChildFrame); }; // ---------------------------------------------------------------------------- @@ -576,7 +581,7 @@ private: typedef wxFrame base_type; DECLARE_CLASS(wxDocParentFrame) DECLARE_EVENT_TABLE() - DECLARE_NO_COPY_CLASS(wxDocParentFrame) + wxDECLARE_NO_COPY_CLASS(wxDocParentFrame); }; // ---------------------------------------------------------------------------- @@ -603,7 +608,7 @@ protected: private: DECLARE_DYNAMIC_CLASS(wxDocPrintout) - DECLARE_NO_COPY_CLASS(wxDocPrintout) + wxDECLARE_NO_COPY_CLASS(wxDocPrintout); }; #endif // wxUSE_PRINTING_ARCHITECTURE @@ -663,7 +668,7 @@ private: wxWindowID m_idBase; DECLARE_DYNAMIC_CLASS(wxFileHistory) - DECLARE_NO_COPY_CLASS(wxFileHistory) + wxDECLARE_NO_COPY_CLASS(wxFileHistory); }; #if WXWIN_COMPATIBILITY_2_6