librime: rime::Context Class Reference

| librime 1.2 Rime Input Method Engine, the core library

Public Types | Public Member Functions | List of all members
rime::Context Class Reference

`#include <context.h>`

## Public Types
using | Notifier = signal<void(Context* ctx)>
using | OptionUpdateNotifier = signal<void(Context* ctx, const string& option)>
using | PropertyUpdateNotifier
using | KeyEventNotifier

## Public Member Functions
| Context ()=default
| ~Context ()=default
bool | Commit ()
string | GetCommitText () const
string | GetScriptText () const
Preedit | GetPreedit () const
bool | IsComposing () const
bool | HasMenu () const
an< Candidate > | GetSelectedCandidate () const
bool | PushInput (char ch)
bool | PushInput (const string &str)
bool | PopInput (size_t len=1)
bool | DeleteInput (size_t len=1)
void | Clear ()
void | AbortComposition ()
bool | Select (size_t index)
bool | Highlight (size_t index)
bool | DeleteCandidate (size_t index)
bool | ConfirmCurrentSelection ()
bool | DeleteCurrentSelection ()
void | BeginEditing ()
bool | ConfirmPreviousSelection ()
bool | ReopenPreviousSegment ()
bool | ClearPreviousSegment ()
bool | ReopenPreviousSelection ()
bool | ClearNonConfirmedComposition ()
bool | RefreshNonConfirmedComposition ()
void | set_input (const string &value)
const string & | input () const
void | set_caret_pos (size_t caret_pos)
size_t | caret_pos () const
void | set_composition (Composition &&comp)
Composition & | composition ()
const Composition & | composition () const
CommitHistory & | commit_history ()
const CommitHistory & | commit_history () const
void | set_option (const string &name, bool value)
bool | get_option (const string &name) const
void | set_property (const string &name, const string &value)
string | get_property (const string &name) const
const map< string, bool > & | options () const
const map< string, string > & | properties () const
void | ClearTransientOptions ()
Notifier & | commit_notifier ()
Notifier & | select_notifier ()
Notifier & | update_notifier ()
Notifier & | delete_notifier ()
Notifier & | abort_notifier ()
OptionUpdateNotifier & | option_update_notifier ()
PropertyUpdateNotifier & | property_update_notifier ()
KeyEventNotifier & | unhandled_key_notifier ()

## Member Typedef Documentation

## ◆ KeyEventNotifier

using rime::Context::KeyEventNotifier

Initial value:
signal<void(Context* ctx, const KeyEvent& key_event)>
rime::Context::Context
Context()=default
rime::KeyEvent
Definition key_event.h:17

## ◆ Notifier

using rime::Context::Notifier = signal<void(Context* ctx)>

## ◆ OptionUpdateNotifier

using rime::Context::OptionUpdateNotifier = signal<void(Context* ctx, const string& option)>

## ◆ PropertyUpdateNotifier

using rime::Context::PropertyUpdateNotifier

Initial value:
signal<void(Context* ctx, const string& property)>

## Constructor & Destructor Documentation

## ◆ Context()

rime::Context::Context | ( |  | ) |
| default

## ◆ ~Context()

rime::Context::~Context | ( |  | ) |
| default

## Member Function Documentation

## ◆ abort_notifier()

Notifier & rime::Context::abort_notifier | ( |  | ) |
| inline

## ◆ AbortComposition()

void rime::Context::AbortComposition | ( |  | ) |

## ◆ BeginEditing()

void rime::Context::BeginEditing | ( |  | ) |

## ◆ caret_pos()

size_t rime::Context::caret_pos | ( |  | ) | const
| inline

## ◆ Clear()

void rime::Context::Clear | ( |  | ) |

## ◆ ClearNonConfirmedComposition()

bool rime::Context::ClearNonConfirmedComposition | ( |  | ) |

## ◆ ClearPreviousSegment()

bool rime::Context::ClearPreviousSegment | ( |  | ) |

## ◆ ClearTransientOptions()

void rime::Context::ClearTransientOptions | ( |  | ) |

## ◆ Commit()

bool rime::Context::Commit | ( |  | ) |

## ◆ commit_history() [1/2]

CommitHistory & rime::Context::commit_history | ( |  | ) |
| inline

## ◆ commit_history() [2/2]

const CommitHistory & rime::Context::commit_history | ( |  | ) | const
| inline

## ◆ commit_notifier()

Notifier & rime::Context::commit_notifier | ( |  | ) |
| inline

## ◆ composition() [1/2]

Composition & rime::Context::composition | ( |  | ) |
| inline

## ◆ composition() [2/2]

const Composition & rime::Context::composition | ( |  | ) | const
| inline

## ◆ ConfirmCurrentSelection()

bool rime::Context::ConfirmCurrentSelection | ( |  | ) |

## ◆ ConfirmPreviousSelection()

bool rime::Context::ConfirmPreviousSelection | ( |  | ) |

## ◆ delete_notifier()

Notifier & rime::Context::delete_notifier | ( |  | ) |
| inline

## ◆ DeleteCandidate()

bool rime::Context::DeleteCandidate | ( | size_t | index | ) |

## ◆ DeleteCurrentSelection()

bool rime::Context::DeleteCurrentSelection | ( |  | ) |

## ◆ DeleteInput()

bool rime::Context::DeleteInput | ( | size_t | len = 1 | ) |

## ◆ get_option()

bool rime::Context::get_option | ( | const string & | name | ) | const

## ◆ get_property()

string rime::Context::get_property | ( | const string & | name | ) | const

## ◆ GetCommitText()

string rime::Context::GetCommitText | ( |  | ) | const

## ◆ GetPreedit()

Preedit rime::Context::GetPreedit | ( |  | ) | const

## ◆ GetScriptText()

string rime::Context::GetScriptText | ( |  | ) | const

## ◆ GetSelectedCandidate()

an< Candidate > rime::Context::GetSelectedCandidate | ( |  | ) | const

## ◆ HasMenu()

bool rime::Context::HasMenu | ( |  | ) | const

## ◆ Highlight()

bool rime::Context::Highlight | ( | size_t | index | ) |

## ◆ input()

const string & rime::Context::input | ( |  | ) | const
| inline

## ◆ IsComposing()

bool rime::Context::IsComposing | ( |  | ) | const

## ◆ option_update_notifier()

OptionUpdateNotifier & rime::Context::option_update_notifier | ( |  | ) |
| inline

## ◆ options()

const map< string, bool > & rime::Context::options | ( |  | ) | const
| inline

## ◆ PopInput()

bool rime::Context::PopInput | ( | size_t | len = 1 | ) |

## ◆ properties()

const map< string, string > & rime::Context::properties | ( |  | ) | const
| inline

## ◆ property_update_notifier()

PropertyUpdateNotifier & rime::Context::property_update_notifier | ( |  | ) |
| inline

## ◆ PushInput() [1/2]

bool rime::Context::PushInput | ( | char | ch | ) |

## ◆ PushInput() [2/2]

bool rime::Context::PushInput | ( | const string & | str | ) |

## ◆ RefreshNonConfirmedComposition()

bool rime::Context::RefreshNonConfirmedComposition | ( |  | ) |

## ◆ ReopenPreviousSegment()

bool rime::Context::ReopenPreviousSegment | ( |  | ) |

## ◆ ReopenPreviousSelection()

bool rime::Context::ReopenPreviousSelection | ( |  | ) |

## ◆ Select()

bool rime::Context::Select | ( | size_t | index | ) |

## ◆ select_notifier()

Notifier & rime::Context::select_notifier | ( |  | ) |
| inline

## ◆ set_caret_pos()

void rime::Context::set_caret_pos | ( | size_t | caret_pos | ) |

## ◆ set_composition()

void rime::Context::set_composition | ( | Composition && | comp | ) |

## ◆ set_input()

void rime::Context::set_input | ( | const string & | value | ) |

## ◆ set_option()

void rime::Context::set_option | ( | const string & | name,
|  | bool | value )

## ◆ set_property()

void rime::Context::set_property | ( | const string & | name,
|  | const string & | value )

## ◆ unhandled_key_notifier()

KeyEventNotifier & rime::Context::unhandled_key_notifier | ( |  | ) |
| inline

## ◆ update_notifier()

Notifier & rime::Context::update_notifier | ( |  | ) |
| inline

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

- context.h
- context.cc