Added EVT_WIZARD_PAGE_SHOWN event for wxWizard, to give apps

a chance to initiate processing after a page is presented.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2010-01-25 18:48:21 +00:00
parent 83ffdd7111
commit deeb0a89b9
3 changed files with 13 additions and 0 deletions

View File

@ -290,6 +290,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_WIZARD_PAGE_CHANGING, wxWizardE
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_WIZARD_CANCEL, wxWizardEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_WIZARD_HELP, wxWizardEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_WIZARD_FINISHED, wxWizardEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_WIZARD_PAGE_SHOWN, wxWizardEvent );
typedef void (wxEvtHandler::*wxWizardEventFunction)(wxWizardEvent&);
@ -316,6 +317,9 @@ typedef void (wxEvtHandler::*wxWizardEventFunction)(wxWizardEvent&);
// the user pressed "Help" button
#define EVT_WIZARD_HELP(id, fn) wx__DECLARE_WIZARDEVT(HELP, id, fn)
// the page was just shown and laid out
#define EVT_WIZARD_PAGE_SHOWN(id, fn) wx__DECLARE_WIZARDEVT(PAGE_SHOWN, id, fn)
#endif // wxUSE_WIZARDDLG
#endif // _WX_WIZARD_H_

View File

@ -98,6 +98,8 @@ public:
The page has been just changed (this event can not be vetoed).
@event{EVT_WIZARD_PAGE_CHANGING(id, func)}
The page is being changed (this event can be vetoed).
@event{EVT_WIZARD_PAGE_SHOWN(id, func)}
The page was shown and laid out (this event cannot be vetoed).
@event{EVT_WIZARD_CANCEL(id, func)}
The user attempted to cancel the wizard (this event may also be vetoed).
@event{EVT_WIZARD_HELP(id, func)}
@ -229,6 +231,8 @@ public:
The page has just been changed (this event cannot be vetoed).
@event{EVT_WIZARD_PAGE_CHANGING(id, func)}
The page is being changed (this event can be vetoed).
@event{EVT_WIZARD_PAGE_SHOWN(id, func)}
The page was shown and laid out (this event cannot be vetoed).
@event{EVT_WIZARD_CANCEL(id, func)}
The user attempted to cancel the wizard (this event may also be vetoed).
@event{EVT_WIZARD_HELP(id, func)}

View File

@ -86,6 +86,7 @@ wxDEFINE_EVENT( wxEVT_WIZARD_PAGE_CHANGING, wxWizardEvent );
wxDEFINE_EVENT( wxEVT_WIZARD_CANCEL, wxWizardEvent );
wxDEFINE_EVENT( wxEVT_WIZARD_FINISHED, wxWizardEvent );
wxDEFINE_EVENT( wxEVT_WIZARD_HELP, wxWizardEvent );
wxDEFINE_EVENT( wxEVT_WIZARD_PAGE_SHOWN, wxWizardEvent );
BEGIN_EVENT_TABLE(wxWizard, wxDialog)
EVT_BUTTON(wxID_CANCEL, wxWizard::OnCancel)
@ -662,6 +663,10 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
m_sizerPage->RecalcSizes();
}
wxWizardEvent pageShownEvent(wxEVT_WIZARD_PAGE_SHOWN, GetId(),
goingForward, m_page);
m_page->GetEventHandler()->ProcessEvent(pageShownEvent);
return true;
}