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
|
- wxStreamToTextRedirector to allow easily redirect cout to wxTextCtrl added
|
||||||
- fixed bug with using wxExecute() to capture huge amounts of output
|
- fixed bug with using wxExecute() to capture huge amounts of output
|
||||||
- new wxCalendarCtrl styles added (S<>ren Erland Vest<73>)
|
- new wxCalendarCtrl styles added (S<>ren Erland Vest<73>)
|
||||||
|
- wxWizardPage can be loaded from WXR (Robert Cavanaugh)
|
||||||
- wxDirSelector() added (Paul A. Thiessen)
|
- wxDirSelector() added (Paul A. Thiessen)
|
||||||
|
|
||||||
wxHTML:
|
wxHTML:
|
||||||
|
@@ -50,13 +50,21 @@ should be very rarely needed.
|
|||||||
|
|
||||||
\membersection{wxWizardPage::wxWizardPage}\label{wxwizardpagewxwizardpage}
|
\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
|
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
|
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
|
be of the same size). Notice that no other parameters are needed because the
|
||||||
wizard will resize and reposition the page anyhow.
|
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}
|
\membersection{wxWizardPage::GetPrev}\label{wxwizardpagegetprev}
|
||||||
|
|
||||||
\constfunc{wxWizardPage*}{GetPrev}{\void}
|
\constfunc{wxWizardPage*}{GetPrev}{\void}
|
||||||
|
@@ -4,7 +4,9 @@
|
|||||||
// sequence of dialogs which allows to simply perform some task
|
// sequence of dialogs which allows to simply perform some task
|
||||||
// Author: Vadim Zeitlin (partly based on work by Ron Kuris and Kevin B.
|
// Author: Vadim Zeitlin (partly based on work by Ron Kuris and Kevin B.
|
||||||
// Smith)
|
// 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
|
// Created: 15.08.99
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
// 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
|
// 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
|
// that no other parameters are needed because the wizard will resize and
|
||||||
// reposition the page anyhow
|
// 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
|
// these functions are used by the wizard to show another page when the
|
||||||
// user chooses "Back" or "Next" button
|
// 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
|
// 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
|
// dynamically or to do something even more fancy. It's ok to return
|
||||||
// wxNullBitmap from here - the default one will be used then.
|
// 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:
|
protected:
|
||||||
wxBitmap m_bitmap;
|
wxBitmap m_PageBitmap;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_ABSTRACT_CLASS(wxWizardPage)
|
DECLARE_ABSTRACT_CLASS(wxWizardPage)
|
||||||
@@ -83,8 +87,10 @@ public:
|
|||||||
// ctor takes the previous and next pages
|
// ctor takes the previous and next pages
|
||||||
wxWizardPageSimple(wxWizard *parent = NULL, // let it be default ctor too
|
wxWizardPageSimple(wxWizard *parent = NULL, // let it be default ctor too
|
||||||
wxWizardPage *prev = (wxWizardPage *)NULL,
|
wxWizardPage *prev = (wxWizardPage *)NULL,
|
||||||
wxWizardPage *next = (wxWizardPage *)NULL)
|
wxWizardPage *next = (wxWizardPage *)NULL,
|
||||||
: wxWizardPage(parent)
|
const wxBitmap& bitmap = wxNullBitmap,
|
||||||
|
const wxChar* resource = NULL)
|
||||||
|
: wxWizardPage(parent, bitmap, resource)
|
||||||
{
|
{
|
||||||
m_prev = prev;
|
m_prev = prev;
|
||||||
m_next = next;
|
m_next = next;
|
||||||
|
@@ -2,7 +2,10 @@
|
|||||||
// Name: generic/wizard.cpp
|
// Name: generic/wizard.cpp
|
||||||
// Purpose: generic implementation of wxWizard class
|
// Purpose: generic implementation of wxWizard class
|
||||||
// Author: Vadim Zeitlin
|
// 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
|
// Created: 15.08.99
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||||
@@ -73,9 +76,21 @@ IMPLEMENT_DYNAMIC_CLASS(wxWizardEvent, wxNotifyEvent)
|
|||||||
// wxWizardPage
|
// wxWizardPage
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxWizardPage::wxWizardPage(wxWizard *parent, const wxBitmap& bitmap)
|
wxWizardPage::wxWizardPage(wxWizard *parent,
|
||||||
: wxPanel(parent), m_bitmap(bitmap)
|
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
|
// initially the page is hidden, it's shown only when it becomes current
|
||||||
Hide();
|
Hide();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user