本文整理汇总了C++中Flags::get方法的典型用法代码示例。如果您正苦于以下问题:C++ Flags::get方法的具体用法?C++ Flags::get怎么用?C++ Flags::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Flags
的用法示例。
在下文中一共展示了Flags::get方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isOn
bool isOn(Flags flags) const {
if (flags.isOn(ModifierFlag::NONE)) {
return (value_ | ModifierFlag::NONE.get()) == flags.get();
} else {
return (value_ & flags.get()) == flags.get();
}
}
示例2: if
void
KeyboardRepeat::set(EventType eventType,
Flags flags,
ConsumerKeyCode key,
int delayUntilRepeat,
int keyRepeat) {
if (key == ConsumerKeyCode::VK_NONE) return;
if (eventType == EventType::UP) {
goto cancel;
} else if (eventType == EventType::DOWN) {
if (!key.isRepeatable()) {
goto cancel;
}
cancel();
primitive_add(eventType, flags, key);
primitive_start(delayUntilRepeat, keyRepeat);
IOLOG_DEVEL("KeyboardRepeat::set consumer key:%d flags:0x%x\n", key.get(), flags.get());
} else {
goto cancel;
}
return;
cancel:
cancel();
}
示例3: if
void
KeyboardRepeat::set(EventType eventType,
Flags flags,
ConsumerKeyCode key)
{
if (! queue_) return;
if (key == ConsumerKeyCode::VK_NONE) return;
if (eventType == EventType::UP) {
goto cancel;
} else if (eventType == EventType::DOWN) {
if (! key.isRepeatable()) {
goto cancel;
}
cancel();
primitive_add(eventType, flags, key);
primitive_start(Config::get_repeat_consumer_initial_wait(),
Config::get_repeat_consumer_wait());
IOLOG_DEVEL("KeyboardRepeat::set consumer key:%d flags:0x%x\n", key.get(), flags.get());
} else {
goto cancel;
}
return;
cancel:
cancel();
}
示例4: loadBitmapFromResource
inline BitmapHandle loadBitmapFromResource(
ModuleHandle module,
const Tstring& instName,
Flags<ImageLoadOption> loadOption,
const Size& size = {}
) {
return
static_cast<BitmapHandle>(
::LoadImage(
module,
instName.c_str(),
IMAGE_ICON,
size.x,
size.y,
loadOption.get()
)
);
}
示例5: loadBitmap
inline BitmapHandle loadBitmap(
ModuleHandle module,
const Tstring& fileName,
Flags<ImageLoadOption> loadOption,
const Size& size
) {
return
static_cast<BitmapHandle>(
::LoadImage(
module,
fileName.c_str(),
IMAGE_BITMAP,
size.x,
size.y,
loadOption.get() | LR_LOADFROMFILE
)
);
}
示例6: set
void KeyboardRepeat::set(EventType eventType,
Flags flags,
KeyCode key,
KeyboardType keyboardType,
int delayUntilRepeat,
int keyRepeat) {
if (key == KeyCode::VK_NONE) return;
if (eventType == EventType::MODIFY) {
goto cancel;
} else if (eventType == EventType::UP) {
// The repetition of multiple keys is controlled by manual operation.
// So, we ignore it.
if (queue_.size() != 1) return;
// We stop key repeat only when the repeating key is up.
KeyboardRepeat::Item* p = static_cast<KeyboardRepeat::Item*>(queue_.safe_front());
if (p) {
auto params = (p->getParamsBase()).get_Params_KeyboardEventCallBack();
if (params && key == params->key) {
goto cancel;
}
}
} else if (eventType == EventType::DOWN) {
cancel();
primitive_add(eventType, flags, key, keyboardType);
primitive_start(delayUntilRepeat, keyRepeat);
IOLOG_DEVEL("KeyboardRepeat::set key:%d flags:0x%x\n", key.get(), flags.get());
} else {
goto cancel;
}
return;
cancel:
cancel();
}
示例7: add
void add(Flags newval) { add(BRIDGE_DATATYPE_FLAGS, newval.get()); }
示例8: log
// ----------------------------------------
static void log(bool isCaught, Flags flags) {
IOLOG_DEBUG("UpdateEventFlagsCallback [%7s]: flags 0x%08x\n",
isCaught ? "caught" : "sending",
flags.get());
}
示例9:
Flags operator&(Flags other) const { return value_ & other.get(); }
示例10: add
void add(KeyToKeyType::Value type, Flags newval) { add(type, BRIDGE_DATATYPE_FLAGS, newval.get()); }