]> git.saurik.com Git - wxWidgets.git/commitdiff
added handling of wxGridSizer and wxFlexGridSizer
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 26 Jul 2000 21:34:05 +0000 (21:34 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 26 Jul 2000 21:34:05 +0000 (21:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/xml/xh_sizer.cpp
contrib/utils/wxrcedit/Makefile.in
contrib/utils/wxrcedit/df/boxsizer.df
contrib/utils/wxrcedit/df/flexgridsizer.df [new file with mode: 0644]
contrib/utils/wxrcedit/df/gridsizer.df [new file with mode: 0644]
contrib/utils/wxrcedit/prophnd.cpp

index 8932fc65576dc1f7fcc071c53779d5d5860afc95..f339d0609c150c407213778524db68b43fba6653 100644 (file)
@@ -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
index 94843b0b369861fbc45972c01d122a507e0aa33a..eee98d61566e6de7abd27566cff885ed0b4aa230 100644 (file)
@@ -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
index 123c93efa34a24ccd73f25c0238b8d4d00afed3d..80c1609369edda0b4d433372293fd3730c1d0312 100644 (file)
@@ -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 (file)
index 0000000..a067469
--- /dev/null
@@ -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 (file)
index 0000000..ea0d051
--- /dev/null
@@ -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
index 24e8bb51894c342d68d9a752b5d926bd039a632d..d70ad658a2c7b9ebf63270c079719006e30b6343 100644 (file)
@@ -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"