edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
newlinecommand.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
8
10
11
12namespace edbee {
13
14class TextRange;
15
19{
20public:
26
27
28 NewlineCommand( NewLineType method );
29
30 QString calculateSmartIndent( TextEditorController* controller, TextRange& range );
31
32 virtual void executeNormalNewline( TextEditorController* controller );
33
34 virtual void executeSpecialNewline( TextEditorController* controller, bool nextLine );
35
36 virtual void execute( TextEditorController* controller ) override;
37 virtual QString toString() override;
38
39private:
40 NewLineType newLineType_;
41};
42
43
44} // edbee
Inserts a newline. When smarttab is enabled it also inser leading tabs/spaces.
Definition newlinecommand.h:19
NewlineCommand(NewLineType method)
Constructs the newline command.
Definition newlinecommand.cpp:21
NewLineType
Definition newlinecommand.h:21
@ NormalNewline
Definition newlinecommand.h:22
@ AddLineBefore
Definition newlinecommand.h:23
@ AddLineAfter
Definition newlinecommand.h:24
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
A single text region A region constists of an anchor and a caret: The anchor defines the 'start' of t...
Definition textrange.h:29
#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