Fcitx
Public Member Functions | List of all members
fcitx::CommonCandidateList Class Reference

A common simple candidate list that serves most of the purpose. More...

#include <fcitx/candidatelist.h>

Inheritance diagram for fcitx::CommonCandidateList:
Inheritance graph
[legend]
Collaboration diagram for fcitx::CommonCandidateList:
Collaboration graph
[legend]

Public Member Functions

void clear ()
 
void setLabels (const std::vector< std::string > &labels={})
 Set the label of candidate list. More...
 
void setSelectionKey (const KeyList &keyList)
 Set the label of candidate list by key. More...
 
void setPageSize (int size)
 
int pageSize () const
 
void setLayoutHint (CandidateLayoutHint hint)
 
void setGlobalCursorIndex (int index)
 
int globalCursorIndex () const
 Return Global cursor index. More...
 
const fcitx::Textlabel (int idx) const override
 
const CandidateWordcandidate (int idx) const override
 
int cursorIndex () const override
 
int size () const override
 
bool hasPrev () const override
 
bool hasNext () const override
 
void prev () override
 
void next () override
 
bool usedNextBefore () const override
 
int totalPages () const override
 
int currentPage () const override
 
void setPage (int page) override
 
CandidateLayoutHint layoutHint () const override
 
const CandidateWordcandidateFromAll (int idx) const override
 
int totalSize () const override
 
void insert (int idx, std::unique_ptr< CandidateWord > word) override
 
void remove (int idx) override
 
void replace (int idx, std::unique_ptr< CandidateWord > word) override
 
void move (int from, int to) override
 
void prevCandidate () override
 
void nextCandidate () override
 
void setCursorIncludeUnselected (bool)
 
void setCursorKeepInSamePage (bool)
 
void setCursorPositionAfterPaging (CursorPositionAfterPaging afterPaging)
 
- Public Member Functions inherited from fcitx::CandidateList
bool empty () const
 
PageableCandidateListtoPageable () const
 
BulkCandidateListtoBulk () const
 
ModifiableCandidateListtoModifiable () const
 
CursorMovableCandidateListtoCursorMovable () const
 
- Public Member Functions inherited from fcitx::ModifiableCandidateList
void append (std::unique_ptr< CandidateWord > word)
 
template<typename CandidateWordType , typename... Args>
void append (Args &&...args)
 

Additional Inherited Members

- Protected Member Functions inherited from fcitx::CandidateList
void setPageable (PageableCandidateList *list)
 
void setBulk (BulkCandidateList *list)
 
void setModifiable (ModifiableCandidateList *list)
 
void setCursorMovable (CursorMovableCandidateList *list)
 

Detailed Description

A common simple candidate list that serves most of the purpose.

Definition at line 180 of file candidatelist.h.

Member Function Documentation

◆ globalCursorIndex()

int fcitx::CommonCandidateList::globalCursorIndex ( ) const

Return Global cursor index.

-1 means it is not selected.

Returns
cursor index.
Since
5.0.4

Definition at line 474 of file candidatelist.cpp.

◆ setLabels()

void fcitx::CommonCandidateList::setLabels ( const std::vector< std::string > &  labels = {})

Set the label of candidate list.

The labels less than 10 will be automatically filled with to empty ones up to 10 to be more error prone.

Parameters
labelslist of labels.
Since
5.0.4

Definition at line 329 of file candidatelist.cpp.

◆ setSelectionKey()

void fcitx::CommonCandidateList::setSelectionKey ( const KeyList &  keyList)

Set the label of candidate list by key.

Parameters
keyListlist of selection key

Definition at line 336 of file candidatelist.cpp.


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