本文整理汇总了C++中StaticArray::resize方法的典型用法代码示例。如果您正苦于以下问题:C++ StaticArray::resize方法的具体用法?C++ StaticArray::resize怎么用?C++ StaticArray::resize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StaticArray
的用法示例。
在下文中一共展示了StaticArray::resize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: layout
void
InfoBoxesConfigWidget::Prepare(ContainerWindow &parent,
const PixelRect &rc)
{
const Layout layout(rc, geometry);
AddText(_("Name"), nullptr,
allow_name_change ? (const TCHAR *)data.name : gettext(data.name));
SetReadOnly(NAME, !allow_name_change);
DataFieldEnum *dfe = new DataFieldEnum(this);
for (unsigned i = 0; i < layout.info_boxes.count; ++i) {
TCHAR label[32];
_stprintf(label, _T("%u"), i + 1);
dfe->addEnumText(label, i);
}
Add(_("InfoBox"), nullptr, dfe);
dfe = new DataFieldEnum(this);
for (unsigned i = InfoBoxFactory::MIN_TYPE_VAL; i < InfoBoxFactory::NUM_TYPES; i++) {
const TCHAR *name = InfoBoxFactory::GetName((InfoBoxFactory::Type) i);
const TCHAR *desc = InfoBoxFactory::GetDescription((InfoBoxFactory::Type) i);
if (name != NULL)
dfe->addEnumText(gettext(name), i, desc != NULL ? gettext(desc) : NULL);
}
dfe->EnableItemHelp(true);
dfe->Sort(0);
Add(_("Content"), nullptr, dfe);
ContainerWindow &form_parent = (ContainerWindow &)RowFormWidget::GetWindow();
AddRemaining(new WndFrame(form_parent, GetLook(), rc));
WindowStyle button_style;
button_style.Hide();
button_style.TabStop();
const auto &button_look = GetLook().button;
copy_button.Create(parent, button_look, _("Copy"), layout.copy_button,
button_style, *this, COPY);
paste_button.Create(parent, button_look, _("Paste"), layout.paste_button,
button_style, *this, PASTE);
close_button.Create(parent, button_look, _("Close"), layout.close_button,
button_style, dialog, mrOK);
WindowStyle preview_style;
preview_style.EnableDoubleClicks();
preview_style.Hide();
previews.resize(layout.info_boxes.count);
for (unsigned i = 0; i < layout.info_boxes.count; ++i) {
previews[i].SetParent(*this, i);
previews[i].Create(parent, layout.info_boxes.positions[i],
preview_style);
}
current_preview = 0;
RefreshEditContent();
RefreshPasteButton();
}