librime 1.2
Rime Input Method Engine, the core library
rime::KeyBindingProcessor< T, N > Class Template Reference

#include <key_binding_processor.h>

Collaboration diagram for rime::KeyBindingProcessor< T, N >:

Classes

struct  ActionDef
struct  Keymap

Public Types

enum  FallbackOptions { None = 0 , ShiftAsControl = (1 << 0) , IgnoreShift = (1 << 1) , All = ShiftAsControl | IgnoreShift }
typedef bool Handler(Context *ctx)
using HandlerPtr = bool (T::*)(Context* ctx)

Public Member Functions

 KeyBindingProcessor (ActionDef *action_definitions)
ProcessResult ProcessKeyEvent (const KeyEvent &key_event, Context *ctx, int keymap_selector=0, int fallback_options=FallbackOptions::None)
void LoadConfig (Config *config, const string &section, int kemap_selector=0)

Static Public Attributes

static const ActionDef kActionNoop

Protected Member Functions

Keymapget_keymap (int keymap_selector=0)
bool Accept (const KeyEvent &key_event, Context *ctx, Keymap &keymap)

Member Typedef Documentation

◆ Handler

template<class T, int N = 1>
typedef bool rime::KeyBindingProcessor< T, N >::Handler(Context *ctx)

◆ HandlerPtr

template<class T, int N = 1>
using rime::KeyBindingProcessor< T, N >::HandlerPtr = bool (T::*)(Context* ctx)

Member Enumeration Documentation

◆ FallbackOptions

template<class T, int N = 1>
enum rime::KeyBindingProcessor::FallbackOptions
Enumerator
None 
ShiftAsControl 
IgnoreShift 
All 

Constructor & Destructor Documentation

◆ KeyBindingProcessor()

template<class T, int N = 1>
rime::KeyBindingProcessor< T, N >::KeyBindingProcessor ( ActionDef * action_definitions)
inlineexplicit

Member Function Documentation

◆ Accept()

template<class T, int N>
bool rime::KeyBindingProcessor< T, N >::Accept ( const KeyEvent & key_event,
Context * ctx,
Keymap & keymap )
protected

◆ get_keymap()

template<class T, int N>
KeyBindingProcessor< T, N >::Keymap & rime::KeyBindingProcessor< T, N >::get_keymap ( int keymap_selector = 0)
protected

◆ LoadConfig()

template<class T, int N>
void rime::KeyBindingProcessor< T, N >::LoadConfig ( Config * config,
const string & section,
int kemap_selector = 0 )

◆ ProcessKeyEvent()

template<class T, int N>
ProcessResult rime::KeyBindingProcessor< T, N >::ProcessKeyEvent ( const KeyEvent & key_event,
Context * ctx,
int keymap_selector = 0,
int fallback_options = FallbackOptions::None )

Member Data Documentation

◆ kActionNoop

template<class T, int N = 1>
const ActionDef rime::KeyBindingProcessor< T, N >::kActionNoop
static

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