scim::FrontEndHotkeyMatcher Class Reference
[Accessories]

This class hold all FrontEnd specific Hotkeys, such as trigger keys, on/off keys, etc. More...

#include <scim_hotkey.h>

List of all members.

Public Member Functions

 FrontEndHotkeyMatcher ()
 ~FrontEndHotkeyMatcher ()
void load_hotkeys (const ConfigPointer &config)
 Load all FrontEnd specific Hotkeys from Config.
void save_hotkeys (const ConfigPointer &config) const
 Save all FrontEnd specific Hotkeys to Config.
void add_hotkey (const KeyEvent &key, FrontEndHotkeyAction action)
 Add a Hotkey for an FrontEnd into this FrontEndHotkeyMatcher.
void add_hotkeys (const KeyEventList &keys, FrontEndHotkeyAction action)
 Add a set of Hotkeys for an FrontEnd into this FrontEndHotkeyMatcher.
size_t find_hotkeys (FrontEndHotkeyAction action, KeyEventList &keys) const
 Find all Hotkeys binded to a specific action.
size_t get_all_hotkeys (KeyEventList &keys, std::vector< FrontEndHotkeyAction > &actions) const
 Get all hotkeys in this FrontEndHotkeyMatcher.
void reset (void)
 Reset the FrontEndHotkeyMatcher.
void clear (void)
 Clear all Hotkeys and reset the FrontEndHotkeyMatcher.
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.
FrontEndHotkeyAction get_match_result (void) const
 Get the match result.


Detailed Description

This class hold all FrontEnd specific Hotkeys, such as trigger keys, on/off keys, etc.

Constructor & Destructor Documentation

scim::FrontEndHotkeyMatcher::FrontEndHotkeyMatcher (  ) 

scim::FrontEndHotkeyMatcher::~FrontEndHotkeyMatcher (  ) 


Member Function Documentation

void scim::FrontEndHotkeyMatcher::load_hotkeys ( const ConfigPointer config  ) 

Load all FrontEnd specific Hotkeys from Config.

Parameters:
config The Config object in which the Hotkeys are stored.

void scim::FrontEndHotkeyMatcher::save_hotkeys ( const ConfigPointer config  )  const

Save all FrontEnd specific Hotkeys to Config.

Parameters:
config Store all Hotkeys to this Config object.

void scim::FrontEndHotkeyMatcher::add_hotkey ( const KeyEvent key,
FrontEndHotkeyAction  action 
)

Add a Hotkey for an FrontEnd into this FrontEndHotkeyMatcher.

Parameters:
key The Hotkey.
action The action to do when the hotkey is matched.

void scim::FrontEndHotkeyMatcher::add_hotkeys ( const KeyEventList keys,
FrontEndHotkeyAction  action 
)

Add a set of Hotkeys for an FrontEnd into this FrontEndHotkeyMatcher.

Parameters:
keys The Hotkeys.
action The action to do when the hotkey is matched.

size_t scim::FrontEndHotkeyMatcher::find_hotkeys ( FrontEndHotkeyAction  action,
KeyEventList keys 
) const

Find all Hotkeys binded to a specific action.

Parameters:
action The action to be found.
keys A KeyEventList object to hold all KeyEvents binded to the action.
Returns:
The number of Hotkeys found.

size_t scim::FrontEndHotkeyMatcher::get_all_hotkeys ( KeyEventList keys,
std::vector< FrontEndHotkeyAction > &  actions 
) const

Get all hotkeys in this FrontEndHotkeyMatcher.

Parameters:
keys A list of all Hotkeys.
actions A list of all corresponding actions

void scim::FrontEndHotkeyMatcher::reset ( void   ) 

Reset the FrontEndHotkeyMatcher.

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

void scim::FrontEndHotkeyMatcher::clear ( void   ) 

Clear all Hotkeys and reset the FrontEndHotkeyMatcher.

void scim::FrontEndHotkeyMatcher::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.

bool scim::FrontEndHotkeyMatcher::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.

FrontEndHotkeyAction scim::FrontEndHotkeyMatcher::get_match_result ( void   )  const

Get the match result.

Returns:
The corresponding action of the matched Hotkey.


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

Generated on Sat Jan 24 23:45:08 2009 for scim by  doxygen 1.5.7.1