本文整理汇总了C++中ProjectBuildTarget::GetCreateHex方法的典型用法代码示例。如果您正苦于以下问题:C++ ProjectBuildTarget::GetCreateHex方法的具体用法?C++ ProjectBuildTarget::GetCreateHex怎么用?C++ ProjectBuildTarget::GetCreateHex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProjectBuildTarget
的用法示例。
在下文中一共展示了ProjectBuildTarget::GetCreateHex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoTargetChange
void ProjectOptionsDlg::DoTargetChange(bool saveOld)
{
if (saveOld)
DoBeforeTargetChange();
wxListBox* lstTargets = XRCCTRL(*this, "lstBuildTarget", wxListBox);
if (lstTargets->GetSelection() == -1)
lstTargets->SetSelection(0);
ProjectBuildTarget* target = m_Project->GetBuildTarget(lstTargets->GetSelection());
if (!target)
return;
// global project options
wxComboBox* cmb = XRCCTRL(*this, "cmbProjectType", wxComboBox);
wxCheckBox* chkCH = XRCCTRL(*this, "chkCreateHex", wxCheckBox);
wxTextCtrl* txt = XRCCTRL(*this, "txtOutputFilename", wxTextCtrl);
wxTextCtrl* txtO = XRCCTRL(*this, "txtObjectDir", wxTextCtrl);
wxButton* browse = XRCCTRL(*this, "btnBrowseOutputFilename", wxButton);
wxButton* browseO = XRCCTRL(*this, "btnBrowseObjectDir", wxButton);
chkCH->SetValue(false);
chkCH->Enable(false);
if (cmb && chkCH && txt && txtO && browse && browseO)
{
cmb->SetSelection(target->GetTargetType());
// Compiler* compiler = CompilerFactory::Compilers[target->GetCompilerIndex()];
switch ((TargetType)cmb->GetSelection())
{
case ttExecutable:
chkCH->Enable(true);
chkCH->SetValue(target->GetCreateHex());
case ttLibrary:
txt->SetValue(target->GetOutputFilename());
txt->Enable(true);
txtO->SetValue(target->GetObjectOutput());
txtO->Enable(true);
browse->Enable(true);
browseO->Enable(true);
break;
default: // for commands-only targets
txt->SetValue(_T(""));
txt->Enable(false);
txtO->SetValue(_T(""));
txtO->Enable(false);
browse->Enable(false);
browseO->Enable(false);
break;
}
}
// files options
wxCheckListBox* list = XRCCTRL(*this, "lstFiles", wxCheckListBox);
int count = list->GetCount();
for (int i = 0; i < count; ++i)
{
ProjectFile* pf = m_Project->GetFile(i);
if (!pf)
break;
bool doit = pf->buildTargets.Index(target->GetTitle()) >= 0;
list->Check(i, doit);
}
// update currently selected target
m_Current_Sel = lstTargets->GetSelection();
}