X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4107600f205d9d4951c0ffaa4aadb1bc2b75dcf2..9d8fe14a97d1092989eecbe43c4e1f730fba17ad:/src/xrc/xh_sizer.cpp diff --git a/src/xrc/xh_sizer.cpp b/src/xrc/xh_sizer.cpp index d3cccfcf94..c01742c7e1 100644 --- a/src/xrc/xh_sizer.cpp +++ b/src/xrc/xh_sizer.cpp @@ -76,7 +76,6 @@ wxSizerXmlHandler::wxSizerXmlHandler() XRC_ADD_STYLE(wxALIGN_CENTER_VERTICAL); XRC_ADD_STYLE(wxALIGN_CENTRE_VERTICAL); - XRC_ADD_STYLE(wxADJUST_MINSIZE); XRC_ADD_STYLE(wxFIXED_MINSIZE); } @@ -145,9 +144,9 @@ wxObject* wxSizerXmlHandler::Handle_sizeritem() wxWindow *wnd = wxDynamicCast(item, wxWindow); if (sizer) - sitem->SetSizer(sizer); + sitem->AssignSizer(sizer); else if (wnd) - sitem->SetWindow(wnd); + sitem->AssignWindow(wnd); else wxLogError(wxT("Error in resource.")); @@ -171,7 +170,7 @@ wxObject* wxSizerXmlHandler::Handle_spacer() wxSizerItem* sitem = MakeSizerItem(); SetSizerItemAttributes(sitem); - sitem->SetSpacer(GetSize()); + sitem->AssignSpacer(GetSize()); AddSizerItem(sitem); return NULL; } @@ -185,18 +184,16 @@ wxObject* wxSizerXmlHandler::Handle_sizer() wxCHECK_MSG(m_parentSizer != NULL || (parentNode && parentNode->GetType() == wxXML_ELEMENT_NODE && - m_parentAsWindow != NULL && - (m_parentAsWindow->IsKindOf(CLASSINFO(wxPanel)) || - m_parentAsWindow->IsKindOf(CLASSINFO(wxFrame)) || - m_parentAsWindow->IsKindOf(CLASSINFO(wxDialog))) - ), NULL, - wxT("Incorrect use of sizer: parent is not 'wxDialog', 'wxFrame' or 'wxPanel'.")); + m_parentAsWindow), NULL, + wxT("Sizer must have a window parent node")); if (m_class == wxT("wxBoxSizer")) sizer = Handle_wxBoxSizer(); +#if wxUSE_STATBOX else if (m_class == wxT("wxStaticBoxSizer")) sizer = Handle_wxStaticBoxSizer(); +#endif else if (m_class == wxT("wxGridSizer")) sizer = Handle_wxGridSizer(); @@ -255,6 +252,7 @@ wxSizer* wxSizerXmlHandler::Handle_wxBoxSizer() return new wxBoxSizer(GetStyle(wxT("orient"), wxHORIZONTAL)); } +#if wxUSE_STATBOX wxSizer* wxSizerXmlHandler::Handle_wxStaticBoxSizer() { return new wxStaticBoxSizer( @@ -266,6 +264,7 @@ wxSizer* wxSizerXmlHandler::Handle_wxStaticBoxSizer() GetName()), GetStyle(wxT("orient"), wxHORIZONTAL)); } +#endif // wxUSE_STATBOX wxSizer* wxSizerXmlHandler::Handle_wxGridSizer() { @@ -377,6 +376,7 @@ void wxSizerXmlHandler::AddSizerItem(wxSizerItem* sitem) //----------------------------------------------------------------------------- // wxStdDialogButtonSizerXmlHandler //----------------------------------------------------------------------------- +#if wxUSE_BUTTON IMPLEMENT_DYNAMIC_CLASS(wxStdDialogButtonSizerXmlHandler, wxXmlResourceHandler) @@ -438,5 +438,6 @@ bool wxStdDialogButtonSizerXmlHandler::CanHandle(wxXmlNode *node) return (!m_isInside && IsOfClass(node, wxT("wxStdDialogButtonSizer"))) || (m_isInside && IsOfClass(node, wxT("button"))); } +#endif // wxUSE_BUTTON #endif // wxUSE_XRC