Fcitx
Public Member Functions | Protected Member Functions | List of all members
fcitx::CandidateWord Class Referenceabstract

Base class of candidate word. More...

#include <fcitx/candidatelist.h>

Inheritance diagram for fcitx::CandidateWord:
Inheritance graph
[legend]

Public Member Functions

 CandidateWord (Text text={})
 
virtual void select (InputContext *inputContext) const =0
 Called when candidate is selected by user. More...
 
const Texttext () const
 
bool isPlaceHolder () const
 Whether the candidate is only a place holder. More...
 
bool hasCustomLabel () const
 
const TextcustomLabel () const
 
const Textcomment () 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)
 

Detailed Description

Base class of candidate word.

Definition at line 38 of file candidatelist.h.

Member Function Documentation

◆ comment()

const Text & fcitx::CandidateWord::comment ( ) const

Return comment corresponding to the candidate.

Returns
value of comment.
Since
5.1.9

Definition at line 204 of file candidatelist.cpp.

◆ isPlaceHolder()

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.

◆ select()

virtual void fcitx::CandidateWord::select ( InputContext inputContext) const
pure virtual

Called when candidate is selected by user.

Parameters
inputContextthe associated input context for the candidate.

Implemented in fcitx::DisplayOnlyCandidateWord.

◆ textWithComment()

Text fcitx::CandidateWord::textWithComment ( std::string  separator = " ") const

Return text with comment.

Parameters
separatorseparator between text and comment.
Returns
value of comment.
Since
5.1.9

Definition at line 214 of file candidatelist.cpp.


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