edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
removecommand.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 TextDocument;
13class TextRangeSet;
14
28{
29public:
35
36 enum Direction {
39 };
40
41
42 RemoveCommand( int removeMode, int direction );
43
44 int coalesceId() const;
45 int smartBackspace( TextDocument* doc, int caret );
46
47 void rangesForRemoveChar( TextEditorController* controller, TextRangeSet* ranges );
48 void rangesForRemoveWord( TextEditorController* controller, TextRangeSet* ranges );
49 void rangesForRemoveLine( TextEditorController* controller, TextRangeSet* ranges );
50
51 virtual void execute( TextEditorController* controller ) override;
52 virtual QString toString() override;
53
54private:
55 int directionSign() const;
56
57
58 int removeMode_;
59 int direction_;
60};
61
62
63} // edbee
A delete command. This is a backspace or a delete operation.
Definition removecommand.h:28
Direction
Definition removecommand.h:36
@ Left
Remove the item to the left.
Definition removecommand.h:37
@ Right
Remove the item to ther right.
Definition removecommand.h:38
RemoveCommand(int removeMode, int direction)
The remove command constructor.
Definition removecommand.cpp:23
RemoveMode
Definition removecommand.h:30
@ RemoveChar
Remove a single character.
Definition removecommand.h:31
@ RemoveWord
Remove a single word.
Definition removecommand.h:32
@ RemoveLine
Remove a line.
Definition removecommand.h:33
This is the base and abstract class of a text document A TextDocument is the model part of the editor...
Definition textdocument.h:42
TextEditorCommand()
The default constructor.
Definition texteditorcommand.cpp:12
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