added handling of wxGridSizer and wxFlexGridSizer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
55db6a69ce
commit
fccd6cdc31
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
9
contrib/utils/wxrcedit/df/flexgridsizer.df
Normal file
9
contrib/utils/wxrcedit/df/flexgridsizer.df
Normal file
@ -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
|
9
contrib/utils/wxrcedit/df/gridsizer.df
Normal file
9
contrib/utils/wxrcedit/df/gridsizer.df
Normal file
@ -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
|
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user