| 1 |
#ifndef _FCITX5_VARNAM_CANDIDATE_H |
| 2 |
#define _FCITX5_VARNAM_CANDIDATE_H |
| 3 |
|
| 4 |
#include "varnam_engine.h" |
| 5 |
|
| 6 |
#include <fcitx/candidatelist.h> |
| 7 |
#include <fcitx/inputcontext.h> |
| 8 |
|
| 9 |
namespace fcitx { |
| 10 |
|
| 11 |
class VarnamCandidateWord : public CandidateWord { |
| 12 |
private: |
| 13 |
VarnamEngine *engine_; |
| 14 |
int index_; |
| 15 |
|
| 16 |
public: |
| 17 |
VarnamCandidateWord(VarnamEngine *engine, const char *text, int index); |
| 18 |
|
| 19 |
void select(InputContext *inputContext) const override; |
| 20 |
}; |
| 21 |
|
| 22 |
class VarnamCandidateList : public CommonCandidateList { |
| 23 |
private: |
| 24 |
VarnamEngine *engine_; |
| 25 |
InputContext *ic_; |
| 26 |
|
| 27 |
public: |
| 28 |
VarnamCandidateList(VarnamEngine *engine, InputContext *ic); |
| 29 |
|
| 30 |
void prev() override; |
| 31 |
|
| 32 |
void next() override; |
| 33 |
|
| 34 |
void prevCandidate() override; |
| 35 |
|
| 36 |
void nextCandidate() override; |
| 37 |
|
| 38 |
bool usedNextBefore() const override; |
| 39 |
}; |
| 40 |
|
| 41 |
} // namespace fcitx |
| 42 |
#endif |