本文整理汇总了C++中Draw::GetInitialDrawNo方法的典型用法代码示例。如果您正苦于以下问题:C++ Draw::GetInitialDrawNo方法的具体用法?C++ Draw::GetInitialDrawNo怎么用?C++ Draw::GetInitialDrawNo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Draw
的用法示例。
在下文中一共展示了Draw::GetInitialDrawNo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InsertSomeDraws
void SelectDrawWidget::InsertSomeDraws(size_t start, size_t count) {
wxSizer *sizer = GetSizer();
int width = GetCheckBoxWidth();
ConfigNameHash& cnm = const_cast<ConfigNameHash&>(m_cfg->GetConfigTitles());
for (size_t i = start; count; count--, i++) {
if (i >= m_cb_l.size()) {
i = m_cb_l.size();
m_cb_l.push_back(new wxCheckBox());
m_cb_l[i]->Create(this, drawID_SELDRAWCB,
wxString::Format(_T("%d."), i + 1),
wxDefaultPosition, wxSize(width, -1), 0,
SelectDrawValidator(m_draws_wdg, i, m_cb_l[i]));
m_cb_l[i]->Enable(FALSE);
m_cb_l[i]->SetToolTip(wxEmptyString);
m_cb_l[i]->SetBackgroundColour(DRAW3_BG_COLOR);
sizer->Add(m_cb_l[i], 0, wxTOP | wxLEFT | wxRIGHT, 1);
}
Draw* draw = m_dc->GetDraw(i);
DrawInfo* draw_info = draw->GetDrawInfo();
wxString label;
if (draw_info->IsValid()) {
m_cb_l[i]->Enable(TRUE);
m_cb_l[i]->SetValue(draw->GetEnable());
m_cb_l[i]->SetToolTip(cnm[draw_info->GetBasePrefix()] + _T(":") + draw_info->GetParamName());
label = wxString::Format(_T("%d."), draw->GetInitialDrawNo() + 1) + draw_info->GetName();
if (draw_info->GetParam()->GetIPKParam()->GetPSC())
label += _T("*");
if (draw->GetBlocked())
label.Replace(wxString::Format(_T("%d."), draw->GetInitialDrawNo() + 1), wxString::Format(_("%d.[B]"), i + 1), false);
} else {
label = _T("***");
}
m_cb_l[i]->SetLabel(label);
wxValidator* validator = m_cb_l[i]->GetValidator();
if (validator)
dynamic_cast<SelectDrawValidator*>(validator)->Set(m_draws_wdg, i, m_cb_l[i]);
else
m_cb_l[i]->SetValidator(SelectDrawValidator(m_draws_wdg, i, m_cb_l[i]));
m_cb_l[i]->SetBackgroundColour(draw_info->GetDrawColor());
#ifdef MINGW32
m_cb_l[i]->Refresh();
#endif
}
if (m_cb_l.size() > MIN_DRAWS_COUNT)
SetScrollRate(10, 10);
else
SetScrollRate(0, 0);
sizer->Layout();
}