• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegraphics API Reference
  • KDE Home
  • Contact Us
 

okular

  • Okular
  • TextSelection
Public Member Functions | List of all members
Okular::TextSelection Class Reference

#include <misc.h>

Public Member Functions

 TextSelection (const NormalizedPoint &start, const NormalizedPoint &end)
 
 ~TextSelection ()
 
int direction () const
 
void end (const NormalizedPoint &point)
 
NormalizedPoint end () const
 
void itB (int pos)
 
int itB () const
 
void itE (int pos)
 
int itE () const
 
NormalizedPoint start () const
 

Detailed Description

Wrapper around the information needed to generate the selection area There are two assumptions inside this class:

  1. 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.
  2. 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
  3. 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;

Definition at line 36 of file misc.h.

Constructor & Destructor Documentation

TextSelection::TextSelection ( const NormalizedPoint &  start,
const NormalizedPoint &  end 
)

Creates a new text selection with the given start and end point.

Definition at line 26 of file misc.cpp.

TextSelection::~TextSelection ( )

Destroys the text selection.

Definition at line 40 of file misc.cpp.

Member Function Documentation

int TextSelection::direction ( ) const

Returns the direction of the selection.

Definition at line 66 of file misc.cpp.

void TextSelection::end ( const NormalizedPoint &  point)

Changes the end point of the selection to the given point.

Definition at line 45 of file misc.cpp.

NormalizedPoint TextSelection::end ( ) const

Returns the end point of the selection.

Definition at line 76 of file misc.cpp.

void TextSelection::itB ( int  pos)

Definition at line 61 of file misc.cpp.

int TextSelection::itB ( ) const

Definition at line 81 of file misc.cpp.

void TextSelection::itE ( int  pos)

Definition at line 56 of file misc.cpp.

int TextSelection::itE ( ) const

Definition at line 86 of file misc.cpp.

NormalizedPoint TextSelection::start ( ) const

Returns the start point of the selection.

Definition at line 71 of file misc.cpp.


The documentation for this class was generated from the following files:
  • misc.h
  • misc.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okular

Skip menu "okular"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal