scim::IMEngineHotkeyMatcher Class Reference
Accessories

This class hold all Hotkeys for each IMEngines. More...

`#include <scim_hotkey.h>`

## Public Member Functions

| IMEngineHotkeyMatcher ()
| ~IMEngineHotkeyMatcher ()
void | load_hotkeys (const ConfigPointer &config)
| Load all Hotkeys for IMEngines from Config.
void | save_hotkeys (const ConfigPointer &config) const
| Save all Hotkeys for IMEngines to Config.
void | add_hotkey (const KeyEvent &key, const String &uuid)
| Add a Hotkey for an IMEngine into this IMEngineHotkeyMatcher.
void | add_hotkeys (const KeyEventList &keys, const String &uuid)
| Add a set of Hotkeys for an IMEngine into this IMEngineHotkeyMatcher.
size_t | find_hotkeys (const String &uuid, KeyEventList &keys) const
| Find all Hotkeys binded to a specific IMEngine UUID.
size_t | get_all_hotkeys (KeyEventList &keys, std::vector< String > &uuids) const
| Get all hotkeys in this IMEngineHotkeyMatcher.
void | reset (void)
| Reset the IMEngineHotkeyMatcher.
void | clear (void)
| Clear all Hotkeys and reset the IMEngineHotkeyMatcher.
void | push_key_event (const KeyEvent &key)
| Push a KeyEvent into the queue.
bool | is_matched (void) const
| Check if the last KeyEvent pushed by push_key_event () matched with any Hotkey.
String | get_match_result (void) const
| Get the match result.

## Detailed Description

This class hold all Hotkeys for each IMEngines.

## Constructor & Destructor Documentation

## IMEngineHotkeyMatcher()

scim::IMEngineHotkeyMatcher::IMEngineHotkeyMatcher | ( |  | ) |

## ~IMEngineHotkeyMatcher()

scim::IMEngineHotkeyMatcher::~IMEngineHotkeyMatcher | ( |  | ) |

## Member Function Documentation

## load_hotkeys()

void scim::IMEngineHotkeyMatcher::load_hotkeys | ( | const ConfigPointer & | config | ) |

Load all Hotkeys for IMEngines from Config.

Parameters

  config | The Config object in which the Hotkeys are stored.

## save_hotkeys()

void scim::IMEngineHotkeyMatcher::save_hotkeys | ( | const ConfigPointer & | config | ) | const

Save all Hotkeys for IMEngines to Config.

Parameters

  config | Store all Hotkeys to this Config object.

## add_hotkey()

void scim::IMEngineHotkeyMatcher::add_hotkey | ( | const KeyEvent & | key,
|  | const String & | uuid )

Add a Hotkey for an IMEngine into this IMEngineHotkeyMatcher.

Parameters

  key | The Hotkey.
  uuid | The UUID of the corresponding IMEngine.

## add_hotkeys()

void scim::IMEngineHotkeyMatcher::add_hotkeys | ( | const KeyEventList & | keys,
|  | const String & | uuid )

Add a set of Hotkeys for an IMEngine into this IMEngineHotkeyMatcher.

Parameters

  keys | The Hotkeys.
  uuid | The UUID of the corresponding IMEngine.

## find_hotkeys()

size_t scim::IMEngineHotkeyMatcher::find_hotkeys | ( | const String & | uuid,
|  | KeyEventList & | keys ) const

Find all Hotkeys binded to a specific IMEngine UUID.

Parameters

  uuid | The IMEngine uuid to be found.
  keys | A KeyEventList object to hold all KeyEvents binded to the uuid.

Returns
  The number of Hotkeys found.

## get_all_hotkeys()

size_t scim::IMEngineHotkeyMatcher::get_all_hotkeys | ( | KeyEventList & | keys,
|  | std::vector< String > & | uuids ) const

Get all hotkeys in this IMEngineHotkeyMatcher.

Parameters

  keys | A list of all Hotkeys.
  uuids | A list of all corresponding IMEngine UUIDs.

Returns
  the number of hotkeys found.

## reset()

void scim::IMEngineHotkeyMatcher::reset | ( | void |  | ) |

Reset the IMEngineHotkeyMatcher.

The KeyEvent queue will be cleared, all state will be reset. The Hotkeys which were already added will not be touched.

## clear()

void scim::IMEngineHotkeyMatcher::clear | ( | void |  | ) |

Clear all Hotkeys and reset the IMEngineHotkeyMatcher.

## push_key_event()

void scim::IMEngineHotkeyMatcher::push_key_event | ( | const KeyEvent & | key | ) |

Push a KeyEvent into the queue.

This KeyEvent will be matched against the available Hotkeys immediately.

Parameters

  key | The key to be pushed into.

## is_matched()

bool scim::IMEngineHotkeyMatcher::is_matched | ( | void |  | ) | const

Check if the last KeyEvent pushed by push_key_event () matched with any Hotkey.

Returns
  true If the KeyEvent matched with a Hotkey.

## get_match_result()

String scim::IMEngineHotkeyMatcher::get_match_result | ( | void |  | ) | const

Get the match result.

Returns
  The corresponding UUID of the matched Hotkey. If no Hotkey was matched, return null string.

The documentation for this class was generated from the following file:

- scim_hotkey.h