1. wxWizard supports setting images for each page, sample updated to show it

2. wxLogGui now uses a special dialog instead of a wxMsgBox
3. wxComboBox doesn't limit the text to its size under MSW
4. removed windows.h from dummy.cpp because I think it's unneeded


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-01-21 02:26:25 +00:00
parent cded6e3c28
commit f1df09276c
12 changed files with 387 additions and 148 deletions

View File

@@ -66,7 +66,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxWizardEvent, wxNotifyEvent)
// wxWizardPage
// ----------------------------------------------------------------------------
wxWizardPage::wxWizardPage(wxWizard *parent) : wxPanel(parent)
wxWizardPage::wxWizardPage(wxWizard *parent, const wxBitmap& bitmap)
: wxPanel(parent), m_bitmap(bitmap)
{
// initially the page is hidden, it's shown only when it becomes current
Hide();
@@ -95,6 +96,7 @@ wxWizard::wxWizard(wxWindow *parent,
const wxBitmap& bitmap,
const wxPoint& pos,
const wxSize& size)
: m_bitmap(bitmap)
{
// constants defining the dialog layout
// ------------------------------------
@@ -139,13 +141,15 @@ wxWizard::wxWizard(wxWindow *parent,
m_y = Y_MARGIN;
if ( bitmap.Ok() )
{
(void)new wxStaticBitmap(this, -1, bitmap, wxPoint(m_x, m_y));
m_statbmp = new wxStaticBitmap(this, -1, bitmap, wxPoint(m_x, m_y));
m_x += bitmap.GetWidth() + BITMAP_X_MARGIN;
m_height = bitmap.GetHeight();
}
else
{
m_statbmp = (wxStaticBitmap *)NULL;
m_height = DEFAULT_PAGE_HEIGHT;
}
@@ -193,6 +197,9 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
// button or not (initially the label is "Next")
bool btnLabelWasNext = TRUE;
// and this tells us whether we already had the default bitmap before
bool bmpWasDefault = TRUE;
if ( m_page )
{
// ask the current page first
@@ -214,6 +221,7 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
m_page->Hide();
btnLabelWasNext = m_page->GetNext() != (wxWizardPage *)NULL;
bmpWasDefault = !m_page->GetBitmap().Ok();
}
// set the new one
@@ -237,6 +245,13 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
m_page->SetSize(m_x, m_y, m_width, m_height);
m_page->Show();
// change the bitmap if necessary (and if we have it at all)
bool bmpIsDefault = !m_page->GetBitmap().Ok();
if ( m_statbmp && (bmpIsDefault != bmpWasDefault) )
{
m_statbmp->SetBitmap(bmpIsDefault ? m_bitmap : m_page->GetBitmap());
}
// and update the buttons state
m_btnPrev->Enable(m_page->GetPrev() != (wxWizardPage *)NULL);