wxWizardPage may be loaded from resource (patch 470683)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -46,6 +46,7 @@ All (GUI):
|
||||
- wxStreamToTextRedirector to allow easily redirect cout to wxTextCtrl added
|
||||
- fixed bug with using wxExecute() to capture huge amounts of output
|
||||
- new wxCalendarCtrl styles added (S<>ren Erland Vest<73>)
|
||||
- wxWizardPage can be loaded from WXR (Robert Cavanaugh)
|
||||
- wxDirSelector() added (Paul A. Thiessen)
|
||||
|
||||
wxHTML:
|
||||
|
@@ -50,13 +50,21 @@ should be very rarely needed.
|
||||
|
||||
\membersection{wxWizardPage::wxWizardPage}\label{wxwizardpagewxwizardpage}
|
||||
|
||||
\func{}{wxWizardPage}{\param{wxWizard* }{parent}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}}
|
||||
\func{}{wxWizardPage}{\param{wxWizard* }{parent}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}, \param{const wxChar }{*resource = NULL}}
|
||||
|
||||
Constructor accepts an optional bitmap which will be used for this page
|
||||
instead of the default one for this wizard (note that all bitmaps used should
|
||||
be of the same size). Notice that no other parameters are needed because the
|
||||
wizard will resize and reposition the page anyhow.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{The parent wizard}
|
||||
|
||||
\docparam{bitmap}{The page-specific bitmap if different from the global one}
|
||||
|
||||
\docparam{resource}{Load the page from the specified resource if non NULL}
|
||||
|
||||
\membersection{wxWizardPage::GetPrev}\label{wxwizardpagegetprev}
|
||||
|
||||
\constfunc{wxWizardPage*}{GetPrev}{\void}
|
||||
|
@@ -4,7 +4,9 @@
|
||||
// sequence of dialogs which allows to simply perform some task
|
||||
// Author: Vadim Zeitlin (partly based on work by Ron Kuris and Kevin B.
|
||||
// Smith)
|
||||
// Modified by:
|
||||
// Modified by: Robert Cavanaugh
|
||||
// Added capability to use .WXR resource files in Wizard pages
|
||||
// Added wxWIZARD_HELP event
|
||||
// Created: 15.08.99
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
@@ -48,7 +50,9 @@ public:
|
||||
// of the default one for this wizard (should be of the same size). Notice
|
||||
// that no other parameters are needed because the wizard will resize and
|
||||
// reposition the page anyhow
|
||||
wxWizardPage(wxWizard *parent, const wxBitmap& bitmap = wxNullBitmap);
|
||||
wxWizardPage(wxWizard *parent,
|
||||
const wxBitmap& bitmap = wxNullBitmap,
|
||||
const wxChar* resource = NULL);
|
||||
|
||||
// these functions are used by the wizard to show another page when the
|
||||
// user chooses "Back" or "Next" button
|
||||
@@ -59,10 +63,10 @@ public:
|
||||
// cases - override this method if you want to create the bitmap to be used
|
||||
// dynamically or to do something even more fancy. It's ok to return
|
||||
// wxNullBitmap from here - the default one will be used then.
|
||||
virtual wxBitmap GetBitmap() const { return m_bitmap; }
|
||||
virtual wxBitmap GetBitmap() const { return m_PageBitmap; }
|
||||
|
||||
protected:
|
||||
wxBitmap m_bitmap;
|
||||
wxBitmap m_PageBitmap;
|
||||
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxWizardPage)
|
||||
@@ -83,8 +87,10 @@ public:
|
||||
// ctor takes the previous and next pages
|
||||
wxWizardPageSimple(wxWizard *parent = NULL, // let it be default ctor too
|
||||
wxWizardPage *prev = (wxWizardPage *)NULL,
|
||||
wxWizardPage *next = (wxWizardPage *)NULL)
|
||||
: wxWizardPage(parent)
|
||||
wxWizardPage *next = (wxWizardPage *)NULL,
|
||||
const wxBitmap& bitmap = wxNullBitmap,
|
||||
const wxChar* resource = NULL)
|
||||
: wxWizardPage(parent, bitmap, resource)
|
||||
{
|
||||
m_prev = prev;
|
||||
m_next = next;
|
||||
|
@@ -2,7 +2,10 @@
|
||||
// Name: generic/wizard.cpp
|
||||
// Purpose: generic implementation of wxWizard class
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Modified by: Robert Cavanaugh
|
||||
// 1) Added capability for wxWizardPage to accept resources
|
||||
// 2) Added "Help" button handler stub
|
||||
// 3) Fixed ShowPage() bug on displaying bitmaps
|
||||
// Created: 15.08.99
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
@@ -73,9 +76,21 @@ IMPLEMENT_DYNAMIC_CLASS(wxWizardEvent, wxNotifyEvent)
|
||||
// wxWizardPage
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxWizardPage::wxWizardPage(wxWizard *parent, const wxBitmap& bitmap)
|
||||
: wxPanel(parent), m_bitmap(bitmap)
|
||||
wxWizardPage::wxWizardPage(wxWizard *parent,
|
||||
const wxBitmap& bitmap,
|
||||
const wxChar *resource)
|
||||
: wxPanel(parent)
|
||||
{
|
||||
if ( resource != NULL )
|
||||
{
|
||||
if ( !LoadFromResource(this, resource) )
|
||||
{
|
||||
wxFAIL_MSG(wxT("wxWizardPage LoadFromResource failed!!!!"));
|
||||
}
|
||||
}
|
||||
|
||||
m_PageBitmap = bitmap;
|
||||
|
||||
// initially the page is hidden, it's shown only when it becomes current
|
||||
Hide();
|
||||
}
|
||||
|
Reference in New Issue
Block a user