本文整理汇总了C++中TCommandEnabler::SetCheck方法的典型用法代码示例。如果您正苦于以下问题:C++ TCommandEnabler::SetCheck方法的具体用法?C++ TCommandEnabler::SetCheck怎么用?C++ TCommandEnabler::SetCheck使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCommandEnabler
的用法示例。
在下文中一共展示了TCommandEnabler::SetCheck方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetHintText
//
// !CQ Auto-hide all docking areas? Give them IDW_s
//
/// Handles checking and unchecking of menu items that are associated with
/// decorations.
//
void
TDecoratedFrame::EvCommandEnable(TCommandEnabler& commandEnabler)
{
// Provide default command text to TooltipEnablers
//
if (dynamic_cast<TTooltipEnabler*>(&commandEnabler))
{
tstring hint = GetHintText(commandEnabler.GetId(), htTooltip);
if (hint.length() > 0)
{
commandEnabler.SetText(hint);
return;
}
}
#if 0
TWindow* decoration;
if (DocAreaTop)
decoration = DocAreaTop->ChildWithId(commandEnabler.GetId());
else
decoration = ChildWithId(commandEnabler.GetId());
#else
TWindow* decoration = ChildWithId(commandEnabler.GetId());
#endif
if (!decoration)
TFrameWindow::EvCommandEnable(commandEnabler);
else {
commandEnabler.Enable();
commandEnabler.SetCheck(decoration->IsWindowVisible() ?
TCommandEnabler::Checked :
TCommandEnabler::Unchecked);
}
}
示例2: CeBright
void TSensorView::CeBright(TCommandEnabler& ce)
{
double d = 1.0 / ((ce.Id - CM_BRIGHT0)*0.5 + 1.0) - m_dBright;
ce.SetCheck(d*d < 0.0001);
}
示例3: CeGrid
void TSensorView::CeGrid(TCommandEnabler& ce)
{
ce.Enable(m_nType != 4);
ce.SetCheck(m_bGrid);
}
示例4: CeDrawing
void TSensorView::CeDrawing(TCommandEnabler& ce)
{
ce.Enable(m_pSim && m_nDimSize[0] > 1 && m_nDimSize[1] == 2);
ce.SetCheck(m_nType == 5);
}
示例5: CeStereo
void TSensorView::CeStereo(TCommandEnabler& ce)
{
ce.Enable(m_pSim && m_nDim < 3);
ce.SetCheck(m_nType == 4);
}
示例6: CeColor
void TSensorView::CeColor(TCommandEnabler& ce)
{
ce.Enable(m_pSim && m_nDim && m_nDimSize[m_nDim-1] <= 3);
ce.SetCheck(m_nType == 3);
}
示例7: CeGrey
void TSensorView::CeGrey(TCommandEnabler& ce)
{
ce.Enable(m_pSim && m_nDim < 3);
ce.SetCheck(m_nType == 2);
}
示例8: CeColumn
void TSensorView::CeColumn(TCommandEnabler& ce)
{
ce.Enable(m_pSim && m_nDim < 3);
ce.SetCheck(m_nType == 1);
}
示例9: CeLine
void TSensorView::CeLine(TCommandEnabler& ce)
{
ce.Enable(m_pSim && m_nDim < 3 && m_nDimSize[0] > 1);
ce.SetCheck(m_nType == 0);
}