From fccd6cdc314e0afba1978d27ff7a514be7db606f Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Wed, 26 Jul 2000 21:34:05 +0000 Subject: [PATCH] added handling of wxGridSizer and wxFlexGridSizer git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/xml/xh_sizer.cpp | 10 ++++++++++ contrib/utils/wxrcedit/Makefile.in | 3 ++- contrib/utils/wxrcedit/df/boxsizer.df | 2 +- contrib/utils/wxrcedit/df/flexgridsizer.df | 9 +++++++++ contrib/utils/wxrcedit/df/gridsizer.df | 9 +++++++++ contrib/utils/wxrcedit/prophnd.cpp | 1 + 6 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 contrib/utils/wxrcedit/df/flexgridsizer.df create mode 100644 contrib/utils/wxrcedit/df/gridsizer.df diff --git a/contrib/src/xml/xh_sizer.cpp b/contrib/src/xml/xh_sizer.cpp index 8932fc6557..f339d0609c 100644 --- a/contrib/src/xml/xh_sizer.cpp +++ b/contrib/src/xml/xh_sizer.cpp @@ -153,6 +153,14 @@ wxObject *wxSizerXmlHandler::DoCreateResource() new wxStaticBox(m_ParentAsWindow, -1, GetText(_T("label"))), GetStyle(_T("orient"), wxHORIZONTAL)); } + + else if (m_Node->GetName() == _T("gridsizer")) + sizer = new wxGridSizer(GetLong(_T("rows")), GetLong(_T("cols")), + GetLong(_T("vgap")), GetLong(_T("hgap"))); + + else if (m_Node->GetName() == _T("flexgridsizer")) + sizer = new wxFlexGridSizer(GetLong(_T("rows")), GetLong(_T("cols")), + GetLong(_T("vgap")), GetLong(_T("hgap"))); wxSizer *old_par = m_ParentSizer; m_ParentSizer = sizer; @@ -187,6 +195,8 @@ bool wxSizerXmlHandler::CanHandle(wxXmlNode *node) { return ((!m_IsInside && node->GetName() == _T("boxsizer")) || (!m_IsInside && node->GetName() == _T("staticboxsizer")) || + (!m_IsInside && node->GetName() == _T("gridsizer")) || + (!m_IsInside && node->GetName() == _T("flexgridsizer")) || #if wxUSE_NOTEBOOK (!m_IsInside && node->GetName() == _T("notebooksizer")) || #endif diff --git a/contrib/utils/wxrcedit/Makefile.in b/contrib/utils/wxrcedit/Makefile.in index 94843b0b36..eee98d6156 100644 --- a/contrib/utils/wxrcedit/Makefile.in +++ b/contrib/utils/wxrcedit/Makefile.in @@ -15,7 +15,8 @@ DATAFILES = df/boxsizer.df df/break.df df/button.df df/checkbox.df \ df/panel.df df/panel_item.df df/panelbase.df df/radiobutton.df \ df/separator.df df/sizer_item.df df/sizeritem.df df/slider.df \ df/spacer.df df/staticbitmap.df df/staticboxsizer.df \ - df/statictext.df df/textctrl.df df/toolbar_item.df df/window.df + df/statictext.df df/textctrl.df df/toolbar_item.df df/window.df \ + df/gridsizer.df df/flexgridsizer.df APPEXTRALIBS=$(top_builddir)/lib/libwxxml.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include diff --git a/contrib/utils/wxrcedit/df/boxsizer.df b/contrib/utils/wxrcedit/df/boxsizer.df index 123c93efa3..80c1609369 100644 --- a/contrib/utils/wxrcedit/df/boxsizer.df +++ b/contrib/utils/wxrcedit/df/boxsizer.df @@ -1,6 +1,6 @@ node boxsizer type sizer -icon 2 +icon 0 childtype sizer_item derived from panel_item var orient of flags wxHORIZONTAL,wxVERTICAL diff --git a/contrib/utils/wxrcedit/df/flexgridsizer.df b/contrib/utils/wxrcedit/df/flexgridsizer.df new file mode 100644 index 0000000000..a067469022 --- /dev/null +++ b/contrib/utils/wxrcedit/df/flexgridsizer.df @@ -0,0 +1,9 @@ +node flexgridsizer +type sizer +icon 4 +childtype sizer_item +derived from panel_item +var rows of integer +var cols of integer +var vgap of integer +var hgap of integer diff --git a/contrib/utils/wxrcedit/df/gridsizer.df b/contrib/utils/wxrcedit/df/gridsizer.df new file mode 100644 index 0000000000..ea0d051b90 --- /dev/null +++ b/contrib/utils/wxrcedit/df/gridsizer.df @@ -0,0 +1,9 @@ +node gridsizer +type sizer +icon 4 +childtype sizer_item +derived from panel_item +var rows of integer +var cols of integer +var vgap of integer +var hgap of integer diff --git a/contrib/utils/wxrcedit/prophnd.cpp b/contrib/utils/wxrcedit/prophnd.cpp index 24e8bb5189..d70ad658a2 100644 --- a/contrib/utils/wxrcedit/prophnd.cpp +++ b/contrib/utils/wxrcedit/prophnd.cpp @@ -24,6 +24,7 @@ #include "wx/valtext.h" #include "wx/tokenzr.h" #include "wx/checklst.h" +#include "wx/listctrl.h" #include "xmlhelpr.h" #include "editor.h" -- 2.45.2