edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
selectionchange.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
12class TextDocSelState;
14class TextRangeSet;
15
18{
19public:
20
22 virtual ~SelectionChange();
23
24 virtual void giveTextRangeSet( TextRangeSet* rangeSet );
25 virtual TextRangeSet* takeRangeSet();
26
27 virtual void execute(TextDocument* document);
28 virtual void revert(TextDocument* document);
29
30 virtual bool giveAndMerge(TextDocument *document, Change* textChange );
31 TextRangeSet* rangeSet() { return rangeSet_; }
32
33 virtual QString toString();
34
35protected:
36 void notifyChange();
37
38private:
39
40 TextRangeSet* rangeSet_;
41};
42
43
44} // edbee
A basic change.
Definition change.h:18
ControllerChange(TextEditorController *controller)
A controller specific textcommand. Warning you should NOT modify the textdocument!
Definition change.cpp:111
virtual TextEditorController * controller()
returns the controller
Definition change.cpp:126
SelectionChange(TextEditorController *controller)
The selection selection change constructor.
Definition selectionchange.cpp:27
virtual bool giveAndMerge(TextDocument *document, Change *textChange)
This method tries to merge the given change with the other change The textChange supplied with this m...
Definition selectionchange.cpp:94
virtual void giveTextRangeSet(TextRangeSet *rangeSet)
Gives the textrange to the textchange.
Definition selectionchange.cpp:42
TextRangeSet * rangeSet()
Definition selectionchange.h:31
virtual TextRangeSet * takeRangeSet()
Takes ownership of the rangeset and clears the clearset.
Definition selectionchange.cpp:51
virtual void revert(TextDocument *document)
Reverts the selection change.
Definition selectionchange.cpp:77
virtual void execute(TextDocument *document)
Executes the textchange.
Definition selectionchange.cpp:61
This is the base and abstract class of a text document A TextDocument is the model part of the editor...
Definition textdocument.h:42
The texteditor works via the controller. The controller is the central point/mediator which maps/cont...
Definition texteditorcontroller.h:39
The basic textrange class. A simple class of textrange with a simple vector implementation.
Definition textrange.h:202
#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