当前位置: 首页>>代码示例>>C++>>正文


C++ TCommandEnabler::SetCheck方法代码示例

本文整理汇总了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);
  }
}
开发者ID:Meridian59,项目名称:Meridian59,代码行数:41,代码来源:decframe.cpp

示例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);
}
开发者ID:OS2World,项目名称:APP-SCIENCE-SimRobot2,代码行数:5,代码来源:srSensorView.cpp

示例3: CeGrid

void TSensorView::CeGrid(TCommandEnabler& ce)
{
  ce.Enable(m_nType != 4);
  ce.SetCheck(m_bGrid);
}
开发者ID:OS2World,项目名称:APP-SCIENCE-SimRobot2,代码行数:5,代码来源:srSensorView.cpp

示例4: CeDrawing

void TSensorView::CeDrawing(TCommandEnabler& ce)
{
  ce.Enable(m_pSim && m_nDimSize[0] > 1 && m_nDimSize[1] == 2);
  ce.SetCheck(m_nType == 5);
}
开发者ID:OS2World,项目名称:APP-SCIENCE-SimRobot2,代码行数:5,代码来源:srSensorView.cpp

示例5: CeStereo

void TSensorView::CeStereo(TCommandEnabler& ce)
{
  ce.Enable(m_pSim && m_nDim < 3);
  ce.SetCheck(m_nType == 4);
}
开发者ID:OS2World,项目名称:APP-SCIENCE-SimRobot2,代码行数:5,代码来源:srSensorView.cpp

示例6: CeColor

void TSensorView::CeColor(TCommandEnabler& ce)
{
  ce.Enable(m_pSim && m_nDim && m_nDimSize[m_nDim-1] <= 3);
  ce.SetCheck(m_nType == 3);
}
开发者ID:OS2World,项目名称:APP-SCIENCE-SimRobot2,代码行数:5,代码来源:srSensorView.cpp

示例7: CeGrey

void TSensorView::CeGrey(TCommandEnabler& ce)
{
  ce.Enable(m_pSim && m_nDim < 3);
  ce.SetCheck(m_nType == 2);
}
开发者ID:OS2World,项目名称:APP-SCIENCE-SimRobot2,代码行数:5,代码来源:srSensorView.cpp

示例8: CeColumn

void TSensorView::CeColumn(TCommandEnabler& ce)
{
  ce.Enable(m_pSim && m_nDim < 3);
  ce.SetCheck(m_nType == 1);
}
开发者ID:OS2World,项目名称:APP-SCIENCE-SimRobot2,代码行数:5,代码来源:srSensorView.cpp

示例9: CeLine

void TSensorView::CeLine(TCommandEnabler& ce)
{
  ce.Enable(m_pSim && m_nDim < 3 && m_nDimSize[0] > 1);
  ce.SetCheck(m_nType == 0);
}
开发者ID:OS2World,项目名称:APP-SCIENCE-SimRobot2,代码行数:5,代码来源:srSensorView.cpp


注:本文中的TCommandEnabler::SetCheck方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。