本文整理汇总了C++中TCommandEnabler::Enable方法的典型用法代码示例。如果您正苦于以下问题:C++ TCommandEnabler::Enable方法的具体用法?C++ TCommandEnabler::Enable怎么用?C++ TCommandEnabler::Enable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCommandEnabler
的用法示例。
在下文中一共展示了TCommandEnabler::Enable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
}
示例2: 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);
}
示例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);
}
示例4: 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);
}
}
示例5: CeEditSelected
void TFuncSpecView::CeEditSelected(TCommandEnabler &tce)
{
// INSERT>> Your code here.
tce.Enable( (wFuncs->List()->GetNextItem(-1, TListWindow::Selected) >=0) &&
(wTabs->GetSel()==wFuncs) );
}
示例6: 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);
}
示例7: CeGenerations
void TSetupDialog::CeGenerations(TCommandEnabler& ce)
{
ce.Enable(evoToLimit->GetCheck() == BF_CHECKED ? true : false);
}
示例8:
//
/// Enables save command (only if text is modified).
//
void
TEditFile::CmSaveEnable(TCommandEnabler& commandHandler)
{
commandHandler.Enable(IsModified());
}
示例9: CeDelayTime
void TSetupDialog::CeDelayTime(TCommandEnabler& ce)
{
ce.Enable(userDefDel->GetCheck() == BF_CHECKED ? true : false);
}
示例10: GetCurrentDoc
//
/// Command enabler for CmFileRevert.
//
void
TDocManager::CeFileRevert(TCommandEnabler& ce)
{
TDocument* doc = GetCurrentDoc();
ce.Enable(doc && doc->IsDirty() && doc->GetDocPath());
}
示例11:
void
THelpFileManager::CeContextHelp (TCommandEnabler& ce)
{
ce.Enable(true);
}
示例12:
//
/// Enables FindNext (only if there's data to search for).
//
void
TEditSearch::CeEditFindNext(TCommandEnabler& ce)
{
ce.Enable(SearchData.FindWhat && *SearchData.FindWhat);
}
示例13: CeLine
void TSensorView::CeLine(TCommandEnabler& ce)
{
ce.Enable(m_pSim && m_nDim < 3 && m_nDimSize[0] > 1);
ce.SetCheck(m_nType == 0);
}
示例14: CeGrid
void TSensorView::CeGrid(TCommandEnabler& ce)
{
ce.Enable(m_nType != 4);
ce.SetCheck(m_bGrid);
}
示例15:
//
/// 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);
}