|
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... | |
| bool | spaceBetweenComment () const |
| Whether there should be no space between text and comment. More... | |
Protected Member Functions | |
| void | setText (Text text) |
| void | setPlaceHolder (bool placeHolder) |
| void | resetCustomLabel () |
| void | setCustomLabel (Text text) |
| void | setComment (Text comment) |
| void | setSpaceBetweenComment (bool space) |
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 205 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 225 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.
| bool fcitx::CandidateWord::spaceBetweenComment | ( | ) | const |
Whether there should be no space between text and comment.
This is optional and may not be used if UI doesn't support it. By default the value is true.
This doesn't change the behavior of textWithComment. The caller of textWithComment should check this function and decide whether to add space or not.
Definition at line 257 of file candidatelist.cpp.
| Text fcitx::CandidateWord::textWithComment | ( | std::string | separator = " " | ) | const |
Return text with comment.
| separator | separator between text and comment. |
Definition at line 215 of file candidatelist.cpp.
1.8.13