modification to wxSizer handler needed for wxWizard

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2003-04-22 20:26:06 +00:00
parent a84c0558d8
commit 9e82cf9876
2 changed files with 12 additions and 8 deletions

View File

@ -24,6 +24,7 @@
#include "wx/log.h" #include "wx/log.h"
#include "wx/statbox.h" #include "wx/statbox.h"
#include "wx/notebook.h" #include "wx/notebook.h"
#include "wx/panel.h"
#include "wx/tokenzr.h" #include "wx/tokenzr.h"
bool wxSizerXmlHandler::IsSizerNode(wxXmlNode *node) bool wxSizerXmlHandler::IsSizerNode(wxXmlNode *node)
@ -138,10 +139,11 @@ wxObject *wxSizerXmlHandler::DoCreateResource()
wxXmlNode *parentNode = m_node->GetParent(); wxXmlNode *parentNode = m_node->GetParent();
wxCHECK_MSG(m_parentSizer != NULL || wxCHECK_MSG(m_parentSizer != NULL ||
((IsOfClass(parentNode, wxT("wxPanel")) || (parentNode->GetType() == wxXML_ELEMENT_NODE &&
IsOfClass(parentNode, wxT("wxFrame")) || (m_parentAsWindow->IsKindOf(CLASSINFO(wxPanel)) ||
IsOfClass(parentNode, wxT("wxDialog"))) && m_parentAsWindow->IsKindOf(CLASSINFO(wxFrame)) ||
parentNode->GetType() == wxXML_ELEMENT_NODE), NULL, m_parentAsWindow->IsKindOf(CLASSINFO(wxDialog)))
), NULL,
wxT("Incorrect use of sizer: parent is not 'wxDialog', 'wxFrame' or 'wxPanel'.")); wxT("Incorrect use of sizer: parent is not 'wxDialog', 'wxFrame' or 'wxPanel'."));
if (m_class == wxT("wxBoxSizer")) if (m_class == wxT("wxBoxSizer"))

View File

@ -24,6 +24,7 @@
#include "wx/log.h" #include "wx/log.h"
#include "wx/statbox.h" #include "wx/statbox.h"
#include "wx/notebook.h" #include "wx/notebook.h"
#include "wx/panel.h"
#include "wx/tokenzr.h" #include "wx/tokenzr.h"
bool wxSizerXmlHandler::IsSizerNode(wxXmlNode *node) bool wxSizerXmlHandler::IsSizerNode(wxXmlNode *node)
@ -138,10 +139,11 @@ wxObject *wxSizerXmlHandler::DoCreateResource()
wxXmlNode *parentNode = m_node->GetParent(); wxXmlNode *parentNode = m_node->GetParent();
wxCHECK_MSG(m_parentSizer != NULL || wxCHECK_MSG(m_parentSizer != NULL ||
((IsOfClass(parentNode, wxT("wxPanel")) || (parentNode->GetType() == wxXML_ELEMENT_NODE &&
IsOfClass(parentNode, wxT("wxFrame")) || (m_parentAsWindow->IsKindOf(CLASSINFO(wxPanel)) ||
IsOfClass(parentNode, wxT("wxDialog"))) && m_parentAsWindow->IsKindOf(CLASSINFO(wxFrame)) ||
parentNode->GetType() == wxXML_ELEMENT_NODE), NULL, m_parentAsWindow->IsKindOf(CLASSINFO(wxDialog)))
), NULL,
wxT("Incorrect use of sizer: parent is not 'wxDialog', 'wxFrame' or 'wxPanel'.")); wxT("Incorrect use of sizer: parent is not 'wxDialog', 'wxFrame' or 'wxPanel'."));
if (m_class == wxT("wxBoxSizer")) if (m_class == wxT("wxBoxSizer"))