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/branches/WX_2_8_BRANCH@63262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -129,6 +129,7 @@ All (GUI):
|
||||
- Speeded up wxTreeCtrl by caching text size (botg).
|
||||
- Fix building with using system libpng 1.4 (Volker Grabsch).
|
||||
- Fixed generic wxDatePickerCtrl keyboard navigation.
|
||||
- Added EVT_WIZARD_PAGE_SHOWN event for wxWizard.
|
||||
|
||||
wxMSW:
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ happening.
|
||||
changed (this event cannot be vetoed).}
|
||||
\twocolitem{{\bf EVT\_WIZARD\_PAGE\_CHANGING(id, func)}}{The page is being
|
||||
changed (this event can be vetoed).}
|
||||
\twocolitem{{\bf EVT\_WIZARD\_PAGE\_SHOWN(id, func)}}{The page was shown and laid out.}
|
||||
\twocolitem{{\bf EVT\_WIZARD\_CANCEL(id, func)}}{The user attempted to cancel
|
||||
the wizard (this event may also be vetoed).}
|
||||
\twocolitem{{\bf EVT\_WIZARD\_HELP(id, func)}}{The wizard help button was pressed.}
|
||||
|
||||
@@ -37,6 +37,7 @@ direct input to member functions that take a wxWizardEvent argument.
|
||||
changed (this event can not be vetoed).}
|
||||
\twocolitem{{\bf EVT\_WIZARD\_PAGE\_CHANGING(id, func)}}{The page is being
|
||||
changed (this event can be vetoed).}
|
||||
\twocolitem{{\bf EVT\_WIZARD\_PAGE\_SHOWN(id, func)}}{The page was shown and laid out.}
|
||||
\twocolitem{{\bf EVT\_WIZARD\_CANCEL(id, func)}}{The user attempted to cancel
|
||||
the wizard (this event may also be vetoed).}
|
||||
\twocolitem{{\bf EVT\_WIZARD\_HELP(id, func)}}{The wizard help button was pressed.}
|
||||
|
||||
@@ -285,6 +285,9 @@ BEGIN_DECLARE_EVENT_TYPES()
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_WIZARD_CANCEL, 902)
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_WIZARD_HELP, 903)
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_WIZARD_FINISHED, 903)
|
||||
#if wxABI_VERSION >= 20811
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_WIZARD_PAGE_SHOWN, 904)
|
||||
#endif
|
||||
END_DECLARE_EVENT_TYPES()
|
||||
|
||||
typedef void (wxEvtHandler::*wxWizardEventFunction)(wxWizardEvent&);
|
||||
@@ -312,6 +315,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_
|
||||
|
||||
@@ -84,6 +84,7 @@ DEFINE_EVENT_TYPE(wxEVT_WIZARD_PAGE_CHANGING)
|
||||
DEFINE_EVENT_TYPE(wxEVT_WIZARD_CANCEL)
|
||||
DEFINE_EVENT_TYPE(wxEVT_WIZARD_FINISHED)
|
||||
DEFINE_EVENT_TYPE(wxEVT_WIZARD_HELP)
|
||||
DEFINE_EVENT_TYPE(wxEVT_WIZARD_PAGE_SHOWN)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxWizard, wxDialog)
|
||||
EVT_BUTTON(wxID_CANCEL, wxWizard::OnCancel)
|
||||
@@ -682,6 +683,10 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
|
||||
}
|
||||
}
|
||||
|
||||
wxWizardEvent pageShownEvent(wxEVT_WIZARD_PAGE_SHOWN, GetId(),
|
||||
goingForward, m_page);
|
||||
m_page->GetEventHandler()->ProcessEvent(pageShownEvent);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user