edbee - Qt Editor Library
textselection.h
Go to the documentation of this file.
1 
6 #pragma once
7 
9 
10 namespace edbee {
11 
12 class TextEditorController;
13 
25 {
26 public:
27  TextSelection( TextEditorController* controller );
28  TextSelection( const TextSelection& selection );
29  virtual ~TextSelection();
30 
31  static void moveCaretsByLine( TextEditorController* controller, TextRangeSet* rangeSet, int amount );
32  static void moveCaretsByPage( TextEditorController* controller, TextRangeSet* rangeSet, int amount );
33  static void addRangesByLine( TextEditorController* controller, TextRangeSet* rangeSet, int amount );
34 
35 
36  virtual
37 
38  // getters
40 
41 protected:
42  virtual void processChangesIfRequired( bool joinBorders=false );
43  virtual void processChangesIfRequiredKeepCaretCache( bool joinBorders=false );
44 
45 
46 private:
47 
48  TextEditorController* textControllerRef_;
49 
50 
51 };
52 
53 
54 } // edbee
virtual void processChangesIfRequired(bool joinBorders=false)
This method process the changes if required.
Definition: textselection.cpp:172
virtual ~TextSelection()
The text selection destructor.
Definition: textselection.cpp:37
static void addRangesByLine(TextEditorController *controller, TextRangeSet *rangeSet, int amount)
This method adds the ranges by line.
Definition: textselection.cpp:115
The class textselection is a RangeSet that is used by the view of the document.
Definition: textselection.h:24
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
virtual void processChangesIfRequiredKeepCaretCache(bool joinBorders=false)
This method process the changes if required.
Definition: textselection.cpp:182
TextSelection(TextEditorController *controller)
Constructs the textextselection object.
Definition: textselection.cpp:21
The texteditor works via the controller. The controller is the central point/mediater which maps/cont...
Definition: texteditorcontroller.h:37
The basic textrange class. A simple class of textrange with a simple vector implementation.
Definition: textrange.h:198
static void moveCaretsByPage(TextEditorController *controller, TextRangeSet *rangeSet, int amount)
Moves the carets by page.
Definition: textselection.cpp:96
static void moveCaretsByLine(TextEditorController *controller, TextRangeSet *rangeSet, int amount)
This method is for moving the carets up or down This method can be executed on (this) when a 0 pointe...
Definition: textselection.cpp:49
virtual TextEditorController * textEditorController() const
Returns the controller for this selection.
Definition: textselection.cpp:165