📄 wxsboxsizer.cpp
字号:
#include "../wxsheaders.h"
#include "wxsboxsizer.h"
#include "../properties/wxsenumproperty.h"
wxString wxsBoxSizer::GetProducingCode(wxsCodeParams& Params)
{
return wxString::Format(_T("%s = new wxBoxSizer(%s);"),
BaseParams.VarName.c_str(),
(Orient == wxVERTICAL) ? _T("wxVERTICAL") : _T("wxHORIZONTAL") );
}
bool wxsBoxSizer::MyXmlLoad()
{
wxString Value = XmlGetVariable(_T("orient"));
Orient = ( Value == _T("wxVERTICAL") ) ? wxVERTICAL : wxHORIZONTAL;
return true;
}
bool wxsBoxSizer::MyXmlSave()
{
XmlSetVariable(_T("orient"),(Orient == wxVERTICAL) ? _T("wxVERTICAL") : _T("wxHORIZONTAL"));
return true;
}
void wxsBoxSizer::CreateObjectProperties()
{
static const wxChar* Names[] = { _("Horizontal"), _("Vertical"), NULL };
static long Values[] = { wxHORIZONTAL, wxVERTICAL };
wxsWidget::CreateObjectProperties();
PropertiesObject.AddProperty( _("Orientation:"), new wxsEnumProperty(&PropertiesObject,Orient,Names,Values), 0);
}
void wxsBoxSizer::Init()
{
Orient = wxHORIZONTAL;
}
wxSizer* wxsBoxSizer::ProduceSizer(wxWindow* Panel)
{
return new wxBoxSizer(Orient);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -