2
* This file is part of wxSmith plugin for Code::Blocks Studio
3
* Copyright (C) 2006-2007 Bartlomiej Swiecki
5
* wxSmith is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 3 of the License, or
8
* (at your option) any later version.
10
* wxSmith is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with wxSmith. If not, see <http://www.gnu.org/licenses/>.
19
* $Id: wxsgridsizer.cpp 8335 2012-09-03 07:43:04Z ollydbg $
20
* $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-16.xx/src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsgridsizer.cpp $
23
#include "wxsgridsizer.h"
27
wxsRegisterItem<wxsGridSizer> Reg(_T("GridSizer"),wxsTSizer,_T("Layout"),60);
30
wxsGridSizer::wxsGridSizer(wxsItemResData* Data):
31
wxsSizer(Data,&Reg.Info),
37
wxSizer* wxsGridSizer::OnBuildSizerPreview(wxWindow* Parent)
39
return new wxGridSizer(Rows,Cols,
40
VGap.GetPixels(Parent),HGap.GetPixels(Parent));
43
void wxsGridSizer::OnBuildSizerCreatingCode()
45
switch ( GetLanguage() )
49
AddHeader(_T("<wx/sizer.h>"),GetInfo().ClassName,hfInPCH);
50
Codef(_T("%C(%d, %d, %s, %s);\n"),Rows,Cols,
51
VGap.GetPixelsCode(GetCoderContext()).wx_str(),
52
HGap.GetPixelsCode(GetCoderContext()).wx_str());
58
wxsCodeMarks::Unknown(_T("wxsGridSizer::OnBuildSizerCreatingCode"),GetLanguage());
63
void wxsGridSizer::OnEnumSizerProperties(long Flags)
65
WXS_LONG(wxsGridSizer,Cols,_("Cols"),_T("cols"),0);
66
WXS_LONG(wxsGridSizer,Rows,_("Rows"),_T("rows"),0);
67
WXS_DIMENSION(wxsGridSizer,VGap,_("V-Gap"),_("V-Gap in dialog units"),_T("vgap"),0,false);
68
WXS_DIMENSION(wxsGridSizer,HGap,_("H-Gap"),_("H,y-Gap in dialog units"),_T("hgap"),0,false);