X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/89d94e046d82725ac0b6d266c3d6263237ab2e47..6cab4fcac7fe26d9ae5a1d29066e0893d689bb38:/include/wx/docview.h diff --git a/include/wx/docview.h b/include/wx/docview.h index f03945be15..a7c6df2620 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -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;