KTextEditor

marks.h
1/*
2 SPDX-FileCopyrightText: KDE Developers
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KATE_VIMODE_MARKS_H
8#define KATE_VIMODE_MARKS_H
9
10#include <KConfigGroup>
11#include <KTextEditor/Document>
12
13#include <QMap>
14
15namespace KTextEditor
16{
17class DocumentPrivate;
18class Cursor;
19class MovingCursor;
20}
21
22namespace KateVi
23{
24class InputModeManager;
25
26class Marks : public QObject
27{
28public:
29 explicit Marks(InputModeManager *imm);
30
31 /** JBOS == Just a Bunch Of Shortcuts **/
32 void setStartEditYanked(const KTextEditor::Cursor pos);
33 void setFinishEditYanked(const KTextEditor::Cursor pos);
34 void setLastChange(const KTextEditor::Cursor pos);
35 void setInsertStopped(const KTextEditor::Cursor pos);
36 void setSelectionStart(const KTextEditor::Cursor pos);
37 void setSelectionFinish(const KTextEditor::Cursor pos);
38 void setUserMark(const QChar &mark, const KTextEditor::Cursor pos);
39
40 KTextEditor::Cursor getStartEditYanked() const;
41 KTextEditor::Cursor getFinishEditYanked() const;
42 KTextEditor::Cursor getLastChange() const;
43 KTextEditor::Cursor getInsertStopped() const;
44 KTextEditor::Cursor getSelectionStart() const;
45 KTextEditor::Cursor getSelectionFinish() const;
46 KTextEditor::Cursor getMarkPosition(const QChar &mark) const;
47
48 void writeSessionConfig(KConfigGroup &config) const;
49 void readSessionConfig(const KConfigGroup &config);
50
51 QString getMarksOnTheLine(int line) const;
52
53private:
54 void syncViMarksAndBookmarks();
55 static bool isShowable(const QChar &mark);
56
57 void setMark(const QChar &mark, const KTextEditor::Cursor pos);
58
59private:
61
62private:
63 InputModeManager *m_inputModeManager;
65
67 bool m_settingMark;
68};
69}
70
71#endif // KATE_VIMODE_MARKS_H
The Cursor represents a position in a Document.
Definition cursor.h:75
Backend of KTextEditor::Document related public KTextEditor interfaces.
A KParts derived class representing a text document.
Definition document.h:284
MarkChangeAction
Possible actions on a mark.
Definition document.h:1664
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.