X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/07f20d9a63226a25e71ba6c72e2803c1f58e7903..1978421a6d8b81c1f8a961da4b8ddf544fec7b1b:/src/generic/wizard.cpp?ds=sidebyside diff --git a/src/generic/wizard.cpp b/src/generic/wizard.cpp index 158b7708e3..6f703687d3 100644 --- a/src/generic/wizard.cpp +++ b/src/generic/wizard.cpp @@ -21,7 +21,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "wizardg.h" #endif @@ -46,6 +46,29 @@ #include "wx/wizard.h" +// ---------------------------------------------------------------------------- +// wxWizardSizer +// ---------------------------------------------------------------------------- + +class wxWizardSizer : public wxSizer +{ +public: + wxWizardSizer(wxWizard *owner); + + void RecalcSizes(); + wxSize CalcMin(); + + wxSize GetMaxChildSize(); + int Border() const; + +private: + wxSize SiblingSize(wxSizerItem *child); + + wxWizard *m_owner; + bool m_childSizeValid; + wxSize m_childSize; +}; + // ---------------------------------------------------------------------------- // event tables and such // ---------------------------------------------------------------------------- @@ -70,6 +93,14 @@ BEGIN_EVENT_TABLE(wxWizard, wxDialog) END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS(wxWizard, wxDialog) + +/* + TODO PROPERTIES : + wxWizard + extstyle + title +*/ + IMPLEMENT_ABSTRACT_CLASS(wxWizardPage, wxPanel) IMPLEMENT_DYNAMIC_CLASS(wxWizardPageSimple, wxWizardPage) IMPLEMENT_DYNAMIC_CLASS(wxWizardEvent, wxNotifyEvent) @@ -139,29 +170,6 @@ wxWizardPage *wxWizardPageSimple::GetNext() const // wxWizardSizer // ---------------------------------------------------------------------------- -class wxWizardSizer : public wxSizer -{ -public: - wxWizardSizer(wxWizard *owner); - - void RecalcSizes(); - wxSize CalcMin(); - - wxSize GetMaxChildSize(); - int Border() const; - -private: - wxSize SiblingSize(wxSizerItem *child); - - wxWizard *m_owner; - bool m_childSizeValid; - wxSize m_childSize; - - DECLARE_CLASS(wxWizardSizer); -}; - -IMPLEMENT_CLASS(wxWizardSizer, wxSizer) - wxWizardSizer::wxWizardSizer(wxWizard *owner) : m_owner(owner) { @@ -191,7 +199,7 @@ wxSize wxWizardSizer::GetMaxChildSize() #endif wxSize maxOfMin; - wxSizerItemList::Node *childNode; + wxSizerItemList::compatibility_iterator childNode; for(childNode = m_children.GetFirst(); childNode; childNode = childNode->GetNext()) @@ -264,6 +272,7 @@ void wxWizard::Init() m_page = (wxWizardPage *)NULL; m_btnPrev = m_btnNext = NULL; m_statbmp = NULL; + m_sizerBmpAndPage = NULL; m_sizerPage = NULL; m_calledSetBorder = false; m_border = 0; @@ -271,11 +280,11 @@ void wxWizard::Init() } bool wxWizard::Create(wxWindow *parent, - int id, - const wxString& title, - const wxBitmap& bitmap, - const wxPoint& pos, - long style) + int id, + const wxString& title, + const wxBitmap& bitmap, + const wxPoint& pos, + long style) { bool result = wxDialog::Create(parent,id,title,pos,wxDefaultSize,style); @@ -315,8 +324,6 @@ void wxWizard::AddBitmapRow(wxBoxSizer *mainColumn) wxEXPAND // No border, (mostly useless) vertical stretching ); } - else - m_statbmp = (wxStaticBitmap *)NULL; // Added to m_sizerBmpAndPage in FinishLayout m_sizerPage = new wxWizardSizer(this); @@ -602,6 +609,7 @@ wxSizer *wxWizard::GetPageAreaSizer() const void wxWizard::SetBorder(int border) { wxCHECK_RET(!m_started,wxT("wxWizard::SetBorder after RunWizard")); + m_calledSetBorder = true; m_border = border; } @@ -616,8 +624,10 @@ wxSize wxWizard::GetManualPageSize() const totalPageSize.IncTo(m_sizePage); - if(m_statbmp) - totalPageSize.IncTo(wxSize(0,m_bitmap.GetHeight())); + if ( m_statbmp ) + { + totalPageSize.IncTo(wxSize(0, m_bitmap.GetHeight())); + } return totalPageSize; }