Fcitx
|
Base class of candidate word. More...
#include <fcitx/candidatelist.h>
Public Member Functions | |
CandidateWord (Text text={}) | |
virtual void | select (InputContext *inputContext) const =0 |
Called when candidate is selected by user. More... | |
const Text & | text () const |
bool | isPlaceHolder () const |
Whether the candidate is only a place holder. More... | |
bool | hasCustomLabel () const |
const Text & | customLabel () const |
const Text & | comment () const |
Return comment corresponding to the candidate. More... | |
Text | textWithComment (std::string separator=" ") const |
Return text with comment. More... | |
Protected Member Functions | |
void | setText (Text text) |
void | setPlaceHolder (bool placeHolder) |
void | resetCustomLabel () |
void | setCustomLabel (Text text) |
void | setComment (Text comment) |
Base class of candidate word.
Definition at line 38 of file candidatelist.h.
const Text & fcitx::CandidateWord::comment | ( | ) | const |
Return comment corresponding to the candidate.
Definition at line 204 of file candidatelist.cpp.
bool fcitx::CandidateWord::isPlaceHolder | ( | ) | const |
Whether the candidate is only a place holder.
If candidate is a place holder, it will not be displayed by UI, but it will still take one place in the candidate list.
Definition at line 224 of file candidatelist.cpp.
|
pure virtual |
Called when candidate is selected by user.
inputContext | the associated input context for the candidate. |
Implemented in fcitx::DisplayOnlyCandidateWord.
Text fcitx::CandidateWord::textWithComment | ( | std::string | separator = " " | ) | const |
Return text with comment.
separator | separator between text and comment. |
Definition at line 214 of file candidatelist.cpp.