librime 1.2
Rime Input Method Engine, the core library
selector.h
Go to the documentation of this file.
1//
2// Copyright RIME Developers
3// Distributed under the BSD License
4//
5// 2011-09-11 GONG Chen <chen.sst@gmail.com>
6//
7#ifndef RIME_SELECTOR_H_
8#define RIME_SELECTOR_H_
9
10#include <rime/common.h>
11#include <rime/component.h>
12#include <rime/processor.h>
14
15namespace rime {
16
17class Selector : public Processor, public KeyBindingProcessor<Selector, 4> {
18 public:
22 };
25 Linear = 2,
26 };
27
28 explicit Selector(const Ticket& ticket);
29
30 ProcessResult ProcessKeyEvent(const KeyEvent& key_event) override;
31
38
39 bool SelectCandidateAt(Context* ctx, int index);
40};
41
42} // namespace rime
43
44#endif // RIME_SELECTOR_H_
Definition algebra.cc:12
ProcessResult
Definition processor.h:18
Definition context.h:19
KeyBindingProcessor(ActionDef *action_definitions)
Definition key_binding_processor.h:36
bool Handler(Context *ctx)
Definition key_binding_processor.h:19
bool SelectCandidateAt(Context *ctx, int index)
Definition selector.cc:255
ProcessResult ProcessKeyEvent(const KeyEvent &key_event) override
Definition selector.cc:118
Handler PreviousPage
Definition selector.h:34
CandidateListLayout
Definition selector.h:23
@ Linear
Definition selector.h:25
@ Stacked
Definition selector.h:24
Handler NextPage
Definition selector.h:35
Handler PreviousCandidate
Definition selector.h:32
Handler Home
Definition selector.h:36
Selector(const Ticket &ticket)
Definition selector.cc:29
Handler End
Definition selector.h:37
TextOrientation
Definition selector.h:19
@ Horizontal
Definition selector.h:20
@ Vertical
Definition selector.h:21
Handler NextCandidate
Definition selector.h:33
Definition key_event.h:17
Processor(const Ticket &ticket)
Definition processor.h:26
Definition ticket.h:17