hook the docview-specific customization of event handling logic at TryValidator() level instead of ProcessEvent(): this ensures that the events are not sent to wxApp before they're passed to all the handlers which might process them (before the events were passed to wxDocument and then immediately to wxApp)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -35,9 +35,6 @@ public:
|
||||
const wxString& title, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxT("frame"));
|
||||
|
||||
// Extend event processing to search the document manager's event table
|
||||
virtual bool ProcessEvent(wxEvent& event);
|
||||
|
||||
wxDocManager *GetDocumentManager(void) const { return m_docManager; }
|
||||
|
||||
void OnExit(wxCommandEvent& event);
|
||||
@@ -46,6 +43,9 @@ public:
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
|
||||
virtual bool TryValidator(wxEvent& event);
|
||||
|
||||
wxDocManager *m_docManager;
|
||||
|
||||
private:
|
||||
@@ -77,9 +77,6 @@ public:
|
||||
long type = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
// Extend event processing to search the view's event table
|
||||
virtual bool ProcessEvent(wxEvent& event);
|
||||
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
@@ -91,6 +88,9 @@ public:
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
|
||||
virtual bool TryValidator(wxEvent& event);
|
||||
|
||||
wxDocument* m_childDocument;
|
||||
wxView* m_childView;
|
||||
|
||||
|
Reference in New Issue
Block a user