Okular::TextSelection
Okular::TextSelection Class Reference
#include <misc.h>
Public Member Functions | |
TextSelection (const NormalizedPoint &start, const NormalizedPoint &end) | |
TextSelection (const TextSelection &)=delete | |
~TextSelection () | |
int | direction () const |
NormalizedPoint | end () const |
void | end (const NormalizedPoint &point) |
int | itB () const |
void | itB (int pos) |
int | itE () const |
void | itE (int pos) |
TextSelection & | operator= (const TextSelection &)=delete |
NormalizedPoint | start () const |
Detailed Description
Wrapper around the information needed to generate the selection area There are two assumptions inside this class:
- the start never changes, one instance of this class is used for one selection, therefore the start of the selection will not change, only end and direction of the selection will change. By direction we mean the direction in which the end moves in relation to the start, forward selection is when end is after the start, backward when its before.
- The following changes might appear during selection: a. the end moves without changing the direction (it can move up and down but not past the start): only itE will be updated b. the end moves with changing the direction then itB becomes itE if the previous direction was forward or itE becomes itB
- Internally it that is related to the start cursor is always at it[0] while it related to end is it[1], transition between meanings (itB/itE) is done with dir modifier;
Constructor & Destructor Documentation
◆ TextSelection()
TextSelection::TextSelection | ( | const NormalizedPoint & | start, |
const NormalizedPoint & | end | ||
) |
◆ ~TextSelection()
TextSelection::~TextSelection | ( | ) |
Member Function Documentation
◆ direction()
int TextSelection::direction | ( | ) | const |
◆ end() [1/2]
NormalizedPoint TextSelection::end | ( | ) | const |
◆ end() [2/2]
void TextSelection::end | ( | const NormalizedPoint & | point | ) |
◆ start()
NormalizedPoint TextSelection::start | ( | ) | const |
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Sep 27 2023 03:53:51 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Sep 27 2023 03:53:51 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.