本文整理汇总了C++中JXKeyModifiers::GetState方法的典型用法代码示例。如果您正苦于以下问题:C++ JXKeyModifiers::GetState方法的具体用法?C++ JXKeyModifiers::GetState怎么用?C++ JXKeyModifiers::GetState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXKeyModifiers
的用法示例。
在下文中一共展示了JXKeyModifiers::GetState方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
CBFileNameDisplay::HandleKeyPress
(
const int key,
const JXKeyModifiers& modifiers
)
{
if (key == kJEscapeKey)
{
itsTE->Focus();
}
else if (key == '\t' &&
!modifiers.GetState(kJXMetaKeyIndex) &&
modifiers.GetState(kJXControlKeyIndex) &&
!modifiers.shift())
{
itsTE->Focus();
itsTE->HandleKeyPress(key, modifiers);
}
else if ((key == '\r' || key == '\n') &&
!modifiers.GetState(JXMenu::AdjustNMShortcutModifier(kJXMetaKeyIndex)) &&
!modifiers.shift())
{
itsUnfocusAction =
modifiers.GetState(JXMenu::AdjustNMShortcutModifier(kJXControlKeyIndex)) ?
kRename : kSaveAs;
itsTE->Focus(); // trigger HandleUnfocusEvent()
itsUnfocusAction = kCancel;
}
else
{
JXFileInput::HandleKeyPress(key, modifiers);
}
}
示例2: if
void
CMLineIndexTable::AdjustBreakpoints
(
const JIndex lineIndex,
const JPoint& pt,
const JXButtonStates& buttonStates,
const JXKeyModifiers& modifiers
)
{
JIndex bpIndex;
if (!GetFirstBreakpointOnLine(lineIndex, &bpIndex))
{
SetBreakpoint(lineIndex, JI2B(
modifiers.GetState(JXMenu::AdjustNMShortcutModifier(kJXMetaKeyIndex)) &&
modifiers.shift()));
}
else if (HasMultipleBreakpointsOnLine(bpIndex))
{
OpenLineMenu(lineIndex, pt, buttonStates, modifiers, kJTrue, bpIndex);
}
else if (modifiers.shift())
{
(itsBPList->NthElement(bpIndex))->ToggleEnabled();
}
else
{
itsLink->RemoveBreakpoint(*(itsBPList->NthElement(bpIndex)));
}
}
示例3:
Atom
CBCommandTable::GetDNDAction
(
const JXContainer* target,
const JXButtonStates& buttonStates,
const JXKeyModifiers& modifiers
)
{
const JBoolean meta =
modifiers.GetState(JXMenu::AdjustNMShortcutModifier(kJXMetaKeyIndex));
if ((target == this && !meta) ||
(target != this && meta))
{
return (GetDNDManager())->GetDNDActionMoveXAtom();
}
else
{
return (GetDNDManager())->GetDNDActionCopyXAtom();
}
}