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: wxsstaticboxsizer.cpp 4850 2008-01-29 21:45:49Z byo $
20
* $HeadURL: svn://svn.berlios.de/codeblocks/tags/8.02/src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsstaticboxsizer.cpp $
23
#include "wxsstaticboxsizer.h"
27
wxsRegisterItem<wxsStaticBoxSizer> Reg(_T("StaticBoxSizer"),wxsTSizer,_T("Layout"),40);
31
wxsStaticBoxSizer::wxsStaticBoxSizer(wxsItemResData* Data):
32
wxsSizer(Data,&Reg.Info),
39
wxSizer* wxsStaticBoxSizer::OnBuildSizerPreview(wxWindow* Parent)
41
return new wxStaticBoxSizer(Orient,Parent,Label);
44
void wxsStaticBoxSizer::OnBuildSizerCreatingCode()
46
switch ( GetLanguage() )
50
AddHeader(_T("<wx/sizer.h>"),GetInfo().ClassName,hfInPCH);
51
Codef(_T("%C(%s, %W, %t);\n"),
52
(Orient!=wxHORIZONTAL)?_T("wxVERTICAL"):_T("wxHORIZONTAL"),
59
wxsCodeMarks::Unknown(_T("wxsStaticBoxSizer::OnBuildSizerCreatingCode"),GetLanguage());
64
void wxsStaticBoxSizer::OnEnumSizerProperties(long Flags)
66
static const long OrientValues[] = { wxHORIZONTAL, wxVERTICAL, 0 };
67
static const wxChar* OrientNames[] = { _T("wxHORIZONTAL"), _T("wxVERTICAL"), 0 };
69
WXS_SHORT_STRING(wxsStaticBoxSizer,Label,_("Label"),_T("label"),_T(""),false);
70
WXS_ENUM(wxsStaticBoxSizer,Orient,_("Orientation"),_T("orient"),OrientValues,OrientNames,wxHORIZONTAL);