librime: rime::Switcher Class Reference

| librime 1.2 Rime Input Method Engine, the core library

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
rime::Switcher Class Reference

`#include <switcher.h>`

Inheritance diagram for rime::Switcher:
[legend]
Collaboration diagram for rime::Switcher:
[legend]

## Public Member Functions
| Switcher (const Ticket &ticket)
virtual | ~Switcher ()
virtual bool | ProcessKey (const KeyEvent &key_event)
virtual ProcessResult | ProcessKeyEvent (const KeyEvent &key_event)
void | SetActiveSchema (const string &schema_id)
Schema * | CreateSchema ()
void | SelectNextSchema ()
bool | IsAutoSave (const string &option) const
void | RestoreSavedOptions ()
void | RefreshMenu ()
void | Activate ()
void | Deactivate ()
void | DeactivateAndApply (function< void()> apply)
Engine * | attached_engine () const
Config * | user_config () const
bool | active () const
Public Member Functions inherited from rime::Processor
| Processor (const Ticket &ticket)
virtual | ~Processor ()=default
string | name_space () const
Public Member Functions inherited from rime::Engine
virtual | ~Engine ()
virtual void | ApplySchema (Schema *schema)
virtual void | CommitText (string text)
virtual void | Compose (Context *ctx)
Schema * | schema () const
Context * | context () const
CommitSink & | sink ()
Engine * | active_engine ()
void | set_active_engine (Engine *engine=nullptr)
Public Member Functions inherited from rime::Messenger
MessageSink & | message_sink ()

## Static Public Member Functions
static int | ForEachSchemaListEntry (Config *config, function< bool(const string &schema_id)> process_entry)
Static Public Member Functions inherited from rime::Class< Processor, const Ticket & >
static Component * | Require (const string &name)
Static Public Member Functions inherited from rime::Engine
static RIME_DLL Engine * | Create ()

## Protected Member Functions
void | InitializeComponents ()
void | LoadSettings ()
void | HighlightNextSchema ()
void | OnSelect (Context *ctx)
Protected Member Functions inherited from rime::Engine
| Engine ()

## Protected Attributes
the< Config > | user_config_
string | caption_
vector< KeyEvent > | hotkeys_
set< string > | save_options_
bool | fold_options_ = false
bool | fix_schema_list_order_ = false
vector< of< Processor > > | processors_
vector< of< Translator > > | translators_
bool | active_ = false
Protected Attributes inherited from rime::Processor
Engine * | engine_
string | name_space_
Protected Attributes inherited from rime::Engine
the< Schema > | schema_
the< Context > | context_
CommitSink | sink_
Engine * | active_engine_ = nullptr
Protected Attributes inherited from rime::Messenger
MessageSink | message_sink_

## Additional Inherited Members
Public Types inherited from rime::Class< Processor, const Ticket & >
using | Initializer
Public Types inherited from rime::Engine
using | CommitSink = signal<void(const string& commit_text)>
Public Types inherited from rime::Messenger
using | MessageSink

## Constructor & Destructor Documentation

## ◆ Switcher()

rime::Switcher::Switcher | ( | const Ticket & | ticket | ) |

## ◆ ~Switcher()

rime::Switcher::~Switcher | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ Activate()

void rime::Switcher::Activate | ( |  | ) |

## ◆ active()

bool rime::Switcher::active | ( |  | ) | const
| inline

## ◆ attached_engine()

Engine * rime::Switcher::attached_engine | ( |  | ) | const
| inline

## ◆ CreateSchema()

Schema * rime::Switcher::CreateSchema | ( |  | ) |

## ◆ Deactivate()

void rime::Switcher::Deactivate | ( |  | ) |

## ◆ DeactivateAndApply()

void rime::Switcher::DeactivateAndApply | ( | function< void()> | apply | ) |

## ◆ ForEachSchemaListEntry()

int rime::Switcher::ForEachSchemaListEntry | ( | Config * | config,
|  | function< bool(const string &schema_id)> | process_entry )
| static

## ◆ HighlightNextSchema()

void rime::Switcher::HighlightNextSchema | ( |  | ) |
| protected

## ◆ InitializeComponents()

void rime::Switcher::InitializeComponents | ( |  | ) |
| protected

## ◆ IsAutoSave()

bool rime::Switcher::IsAutoSave | ( | const string & | option | ) | const

## ◆ LoadSettings()

void rime::Switcher::LoadSettings | ( |  | ) |
| protected

## ◆ OnSelect()

void rime::Switcher::OnSelect | ( | Context * | ctx | ) |
| protected

## ◆ ProcessKey()

virtual bool rime::Switcher::ProcessKey | ( | const KeyEvent & | key_event | ) |
| inlinevirtual

Reimplemented from rime::Engine.

## ◆ ProcessKeyEvent()

ProcessResult rime::Switcher::ProcessKeyEvent | ( | const KeyEvent & | key_event | ) |
| virtual

Reimplemented from rime::Processor.

## ◆ RefreshMenu()

void rime::Switcher::RefreshMenu | ( |  | ) |

## ◆ RestoreSavedOptions()

void rime::Switcher::RestoreSavedOptions | ( |  | ) |

## ◆ SelectNextSchema()

void rime::Switcher::SelectNextSchema | ( |  | ) |

## ◆ SetActiveSchema()

void rime::Switcher::SetActiveSchema | ( | const string & | schema_id | ) |

## ◆ user_config()

Config * rime::Switcher::user_config | ( |  | ) | const
| inline

## Member Data Documentation

## ◆ active_

bool rime::Switcher::active_ = false
| protected

## ◆ caption_

string rime::Switcher::caption_
| protected

## ◆ fix_schema_list_order_

bool rime::Switcher::fix_schema_list_order_ = false
| protected

## ◆ fold_options_

bool rime::Switcher::fold_options_ = false
| protected

## ◆ hotkeys_

vector<KeyEvent> rime::Switcher::hotkeys_
| protected

## ◆ processors_

vector<of<Processor> > rime::Switcher::processors_
| protected

## ◆ save_options_

set<string> rime::Switcher::save_options_
| protected

## ◆ translators_

vector<of<Translator> > rime::Switcher::translators_
| protected

## ◆ user_config_

the<Config> rime::Switcher::user_config_
| protected

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

- switcher.h
- switcher.cc