edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
textselection.h
Go to the documentation of this file.
1// edbee - Copyright (c) 2012-2025 by Rick Blommers and contributors
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
6#include "edbee/exports.h"
7
9
10namespace edbee {
11
13
25{
26public:
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
41protected:
42 virtual void processChangesIfRequired( bool joinBorders=false );
43 virtual void processChangesIfRequiredKeepCaretCache( bool joinBorders=false );
44
45
46private:
47
48 TextEditorController* textControllerRef_;
49
50
51};
52
53
54} // edbee
The texteditor works via the controller. The controller is the central point/mediator which maps/cont...
Definition texteditorcontroller.h:39
TextRangeSet(TextDocument *doc)
Constructs a textrange set.
Definition textrange.cpp:1043
static void moveCaretsByPage(TextEditorController *controller, TextRangeSet *rangeSet, int amount)
Moves the carets by page.
Definition textselection.cpp:94
TextSelection(TextEditorController *controller)
Constructs the textextselection object.
Definition textselection.cpp:19
virtual TextEditorController * textEditorController() const
Returns the controller for this selection.
Definition textselection.cpp:163
static void addRangesByLine(TextEditorController *controller, TextRangeSet *rangeSet, int amount)
This method adds the ranges by line.
Definition textselection.cpp:113
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:47
virtual void processChangesIfRequiredKeepCaretCache(bool joinBorders=false)
This method process the changes if required.
Definition textselection.cpp:180
virtual void processChangesIfRequired(bool joinBorders=false)
This method process the changes if required.
Definition textselection.cpp:170
#define EDBEE_EXPORT
Definition exports.h:15
QT Acessibility has an issue with reporting blank lines between elements lines. defining 'WINDOWS_EMP...
Definition commentcommand.cpp:20