librime: rime::Segment Struct Reference

| librime 1.2 Rime Input Method Engine, the core library

Public Types | Public Member Functions | Public Attributes | List of all members
rime::Segment Struct Reference

`#include <segmentation.h>`

Collaboration diagram for rime::Segment:
[legend]

## Public Types
enum | Status { kVoid , kGuess , kSelected , kConfirmed }

## Public Member Functions
| Segment ()=default
| Segment (int start_pos, int end_pos)
void | Clear ()
void | Close ()
bool | Reopen (size_t caret_pos)
bool | HasTag (const string &tag) const
bool | HasAnyTagIn (const vector< string > &tags) const
an< Candidate > | GetCandidateAt (size_t index) const
an< Candidate > | GetSelectedCandidate () const

## Public Attributes
Status | status = kVoid
size_t | start = 0
size_t | end = 0
size_t | length = 0
set< string > | tags
an< Menu > | menu
size_t | selected_index = 0
string | prompt

## Member Enumeration Documentation

## ◆ Status

enum rime::Segment::Status

Enumerator
kVoid |
kGuess |
kSelected |
kConfirmed |

## Constructor & Destructor Documentation

## ◆ Segment() [1/2]

rime::Segment::Segment | ( |  | ) |
| default

## ◆ Segment() [2/2]

rime::Segment::Segment | ( | int | start_pos,
|  | int | end_pos )
| inline

## Member Function Documentation

## ◆ Clear()

void rime::Segment::Clear | ( |  | ) |
| inline

## ◆ Close()

void rime::Segment::Close | ( |  | ) |

## ◆ GetCandidateAt()

an< Candidate > rime::Segment::GetCandidateAt | ( | size_t | index | ) | const

## ◆ GetSelectedCandidate()

an< Candidate > rime::Segment::GetSelectedCandidate | ( |  | ) | const

## ◆ HasAnyTagIn()

bool rime::Segment::HasAnyTagIn | ( | const vector< string > & | tags | ) | const
| inline

## ◆ HasTag()

bool rime::Segment::HasTag | ( | const string & | tag | ) | const
| inline

## ◆ Reopen()

bool rime::Segment::Reopen | ( | size_t | caret_pos | ) |

## Member Data Documentation

## ◆ end

size_t rime::Segment::end = 0

## ◆ length

size_t rime::Segment::length = 0

## ◆ menu

an<Menu> rime::Segment::menu

## ◆ prompt

string rime::Segment::prompt

## ◆ selected_index

size_t rime::Segment::selected_index = 0

## ◆ start

size_t rime::Segment::start = 0

## ◆ status

Status rime::Segment::status = kVoid

## ◆ tags

set<string> rime::Segment::tags

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

- segmentation.h
- segmentation.cc