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


C++ TCommandEnabler类代码示例

本文整理汇总了C++中TCommandEnabler的典型用法代码示例。如果您正苦于以下问题:C++ TCommandEnabler类的具体用法?C++ TCommandEnabler怎么用?C++ TCommandEnabler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了TCommandEnabler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: eventInfo

//
/// When the gadget window receives a WM_COMMAND_ENABLE message, it is likely from a
/// gadget or control within a TControlGadget. This reroutes it to the command
/// target.
//
void
TGadgetWindow::EvCommandEnable(TCommandEnabler& ce)
{
  // If someone derived from TGadgetWindow and handles the command there,
  // give these handlers the first crack.
  //
  TEventInfo eventInfo(WM_COMMAND_ENABLE, ce.GetId());
  if (Find(eventInfo)) {
    Dispatch(eventInfo, 0, TParam2(&ce));
    return;
  }

  TWindow* target = GetParentO();

  // Forward to command target if the enabler was really destined for us, and
  // not a routing from the frame.
  //
  if (target && ce.IsReceiver(*this)) {
    CHECK(target->IsWindow());
    ce.SetReceiver(*target);
    target->EvCommandEnable(ce);
    if( ce.GetHandled() )
      return;
  }

  // Default to TWindow's implementation if the above routing fails
  //
  TWindow::EvCommandEnable(ce);
}
开发者ID:Darkman-M59,项目名称:Meridian59_115,代码行数:34,代码来源:gadgetwi.cpp

示例2: CmEnableECGScale

/////////////////////////////////////////////////////////////////////////////
// TDrawView::CmEnableECGScale()
//
// command enabler for ECGSCALE button.
/////////////////////////////////////////////////////////////////////////////
void TDrawView::CmEnableECGScale(TCommandEnabler &commandEnabler)
{
	// Enable the scakle command if an ECG exists.
	if (DrawDoc->IsOpen())
		commandEnabler.Enable(TRUE);	// if pointer to ecgdata=NULL then disable
	else
		commandEnabler.Enable(FALSE);
}
开发者ID:vagnerr,项目名称:ECGHolterMonitor,代码行数:13,代码来源:ecgdv.cpp

示例3: CmEnableECGRThresh

/////////////////////////////////////////////////////////////////////////////
// TDrawView::CmEnableECGRThresh()
//
// command enabler for RTHRESH button.
/////////////////////////////////////////////////////////////////////////////
void TDrawView::CmEnableECGRThresh(TCommandEnabler &commandEnabler)
{
	// Enable the scakle command if an ECG exists.
	if (DrawDoc->IsOpen())
	{
		if ((DrawDoc->GetECG())->get_r_thresh()!=-1)
			commandEnabler.Enable(TRUE);
		else
			commandEnabler.Enable(FALSE);
	}
	else
		commandEnabler.Enable(FALSE);
}
开发者ID:vagnerr,项目名称:ECGHolterMonitor,代码行数:18,代码来源:ecgdv.cpp

示例4: CmEnableECGQCalc

/////////////////////////////////////////////////////////////////////////////
// TDrawView::CmEnableECGQCalc()
//
// command enabler for QCALC button.
/////////////////////////////////////////////////////////////////////////////
void TDrawView::CmEnableECGQCalc(TCommandEnabler &commandEnabler)
{
	// enable if ecg exists, && it has already been analysed (so we have rwaves)
	if (DrawDoc->IsOpen())
	{
		if ((DrawDoc->GetECG())->IsAnalysed())
			commandEnabler.Enable(TRUE);
		else
			commandEnabler.Enable(FALSE);
	}
	else
		commandEnabler.Enable(FALSE);
}
开发者ID:vagnerr,项目名称:ECGHolterMonitor,代码行数:18,代码来源:ecgdv.cpp

示例5: CeEditSelected

void TFuncSpecView::CeEditSelected(TCommandEnabler &tce)
{
  // INSERT>> Your code here.
  tce.Enable( (wFuncs->List()->GetNextItem(-1, TListWindow::Selected) >=0) &&
              (wTabs->GetSel()==wFuncs) );

}
开发者ID:double16,项目名称:switchmin-w32,代码行数:7,代码来源:funcspecview.cpp

示例6: 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

示例7: RemoveMruItemsFromMenu

//
/// Reads information in the TProfile to display the menu choices.
//
void
TRecentFiles::CeExit(TCommandEnabler& ce)
{
  ce.Enable(true);

  TMenuItemEnabler* me = TYPESAFE_DOWNCAST(&ce, TMenuItemEnabler);
  if (me == 0)
    return;

  HMENU hMenu = me->GetMenu();
  RemoveMruItemsFromMenu(hMenu);
  InsertMruItemsToMenu(hMenu);
}
开发者ID:Meridian59,项目名称:Meridian59,代码行数:16,代码来源:rcntfile.cpp

示例8: CeStepNumber

void TSetupDialog::CeStepNumber(TCommandEnabler& ce)
{
  ce.Enable(step->GetCheck() == BF_CHECKED ? true : false);
}
开发者ID:kartano,项目名称:Biomorphs,代码行数:4,代码来源:SETUPDIA.CPP

示例9: CeGenerations

void TSetupDialog::CeGenerations(TCommandEnabler& ce)
{
  ce.Enable(evoToLimit->GetCheck() == BF_CHECKED ? true : false);
}
开发者ID:kartano,项目名称:Biomorphs,代码行数:4,代码来源:SETUPDIA.CPP

示例10: CeDelayTime

void TSetupDialog::CeDelayTime(TCommandEnabler& ce)
{
  ce.Enable(userDefDel->GetCheck() == BF_CHECKED ? true : false);
}
开发者ID:kartano,项目名称:Biomorphs,代码行数:4,代码来源:SETUPDIA.CPP

示例11: 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

示例12: CeAddfunc

void TFuncSpecView::CeAddfunc(TCommandEnabler &tce)
{
  // INSERT>> Your code here.
  tce.Enable((wTabs->GetSel()==wFuncs));
}
开发者ID:double16,项目名称:switchmin-w32,代码行数:5,代码来源:funcspecview.cpp

示例13: 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

示例14:

//
/// If there are MDI child windows, CmChildActionEnalbe enables any one of the child
/// window action menu items.
//
void
TMDIClient::CmChildActionEnable(TCommandEnabler& commandEnabler)
{
  commandEnabler.Enable(GetFirstChild() != 0);
}
开发者ID:AlleyCat1976,项目名称:Meridian59_103,代码行数:9,代码来源:mdiclien.cpp

示例15: GetCurrentDoc

//
/// Command enabler for CmFileSave.
//
void
TDocManager::CeFileSave(TCommandEnabler& ce)
{
  TDocument* doc = GetCurrentDoc();
  ce.Enable(doc && (doc->IsDirty() || (Mode & dmSaveEnable)));
}
开发者ID:Meridian59,项目名称:Meridian59,代码行数:9,代码来源:docmanag.cpp


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