8#ifndef KATE_SCRIPT_DOCUMENT_H
9#define KATE_SCRIPT_DOCUMENT_H
14#include <ktexteditor_export.h>
18#include <ktexteditor/cursor.h>
19#include <ktexteditor/range.h>
48 Q_INVOKABLE
QString highlightingMode();
49 Q_INVOKABLE
QStringList embeddedHighlightingModes();
51 Q_INVOKABLE
bool isModified();
53 Q_INVOKABLE
QString text(
int fromLine,
int fromColumn,
int toLine,
int toColumn);
56 Q_INVOKABLE
QString line(
int line);
57 Q_INVOKABLE
QString wordAt(
int line,
int column);
59 Q_INVOKABLE
QJSValue wordRangeAt(
int line,
int column);
61 Q_INVOKABLE
QString charAt(
int line,
int column);
63 Q_INVOKABLE
QString firstChar(
int line);
64 Q_INVOKABLE
QString lastChar(
int line);
65 Q_INVOKABLE
bool isSpace(
int line,
int column);
66 Q_INVOKABLE
bool isSpace(
const QJSValue &jscursor);
67 Q_INVOKABLE
bool matchesAt(
int line,
int column,
const QString &s);
69 Q_INVOKABLE
bool setText(
const QString &s);
70 Q_INVOKABLE
bool clear();
71 Q_INVOKABLE
bool truncate(
int line,
int column);
72 Q_INVOKABLE
bool truncate(
const QJSValue &jscursor);
73 Q_INVOKABLE
bool insertText(
int line,
int column,
const QString &s);
74 Q_INVOKABLE
bool insertText(
const QJSValue &jscursor,
const QString &s);
75 Q_INVOKABLE
bool removeText(
int fromLine,
int fromColumn,
int toLine,
int toColumn);
76 Q_INVOKABLE
bool removeText(
const QJSValue &range);
78 Q_INVOKABLE
bool insertLine(
int line,
const QString &s);
79 Q_INVOKABLE
bool removeLine(
int line);
80 Q_INVOKABLE
bool wrapLine(
int line,
int column);
81 Q_INVOKABLE
bool wrapLine(
const QJSValue &cursor);
82 Q_INVOKABLE
void joinLines(
int startLine,
int endLine);
83 Q_INVOKABLE
int lines();
84 Q_INVOKABLE
bool isLineModified(
int line);
85 Q_INVOKABLE
bool isLineSaved(
int line);
86 Q_INVOKABLE
bool isLineTouched(
int line);
87 Q_INVOKABLE
int findTouchedLine(
int startLine,
bool down);
88 Q_INVOKABLE
int length();
89 Q_INVOKABLE
int lineLength(
int line);
90 Q_INVOKABLE
void editBegin();
91 Q_INVOKABLE
void editEnd();
92 Q_INVOKABLE
int firstColumn(
int line);
93 Q_INVOKABLE
int lastColumn(
int line);
94 Q_INVOKABLE
int prevNonSpaceColumn(
int line,
int column);
95 Q_INVOKABLE
int prevNonSpaceColumn(
const QJSValue &jscursor);
96 Q_INVOKABLE
int nextNonSpaceColumn(
int line,
int column);
97 Q_INVOKABLE
int nextNonSpaceColumn(
const QJSValue &jscursor);
98 Q_INVOKABLE
int prevNonEmptyLine(
int line);
99 Q_INVOKABLE
int nextNonEmptyLine(
int line);
100 Q_INVOKABLE
bool isInWord(
const QString &character,
int attribute);
101 Q_INVOKABLE
bool canBreakAt(
const QString &character,
int attribute);
102 Q_INVOKABLE
bool canComment(
int startAttribute,
int endAttribute);
103 Q_INVOKABLE
QString commentMarker(
int attribute);
104 Q_INVOKABLE
QString commentStart(
int attribute);
105 Q_INVOKABLE
QString commentEnd(
int attribute);
107 Q_INVOKABLE
QJSValue documentRange();
109 Q_INVOKABLE
bool isValidTextPosition(
int line,
int column);
110 Q_INVOKABLE
bool isValidTextPosition(
const QJSValue &cursor);
115 Q_INVOKABLE
int attribute(
int line,
int column);
116 Q_INVOKABLE
int attribute(
const QJSValue &jscursor);
121 Q_INVOKABLE
bool isAttribute(
int line,
int column,
int attr);
122 Q_INVOKABLE
bool isAttribute(
const QJSValue &jscursor,
int attr);
127 Q_INVOKABLE
QString attributeName(
int line,
int column);
133 Q_INVOKABLE
bool isAttributeName(
int line,
int column,
const QString &name);
134 Q_INVOKABLE
bool isAttributeName(
const QJSValue &cursor,
const QString &name);
140 Q_INVOKABLE
int firstVirtualColumn(
int line);
141 Q_INVOKABLE
int lastVirtualColumn(
int line);
142 Q_INVOKABLE
int toVirtualColumn(
int line,
int column);
143 Q_INVOKABLE
int toVirtualColumn(
const QJSValue &cursor);
144 Q_INVOKABLE
QJSValue toVirtualCursor(
int line,
int column);
146 Q_INVOKABLE
int fromVirtualColumn(
int line,
int virtualColumn);
147 Q_INVOKABLE
int fromVirtualColumn(
const QJSValue &jscursor);
148 Q_INVOKABLE
QJSValue fromVirtualCursor(
int line,
int column);
153 Q_INVOKABLE
QJSValue anchor(
int line,
int column,
QChar character);
157 Q_INVOKABLE
QJSValue rfind(
int line,
int column,
const QString &text,
int attribute = -1);
160 Q_INVOKABLE
int defStyleNum(
int line,
int column);
161 Q_INVOKABLE
int defStyleNum(
const QJSValue &cursor);
162 Q_INVOKABLE
bool isCode(
int line,
int column);
163 Q_INVOKABLE
bool isCode(
const QJSValue &cursor);
164 Q_INVOKABLE
bool isComment(
int line,
int column);
165 Q_INVOKABLE
bool isComment(
const QJSValue &cursor);
166 Q_INVOKABLE
bool isString(
int line,
int column);
167 Q_INVOKABLE
bool isString(
const QJSValue &cursor);
168 Q_INVOKABLE
bool isRegionMarker(
int line,
int column);
169 Q_INVOKABLE
bool isRegionMarker(
const QJSValue &cursor);
170 Q_INVOKABLE
bool isChar(
int line,
int column);
171 Q_INVOKABLE
bool isChar(
const QJSValue &cursor);
172 Q_INVOKABLE
bool isOthers(
int line,
int column);
173 Q_INVOKABLE
bool isOthers(
const QJSValue &cursor);
175 Q_INVOKABLE
bool startsWith(
int line,
const QString &pattern,
bool skipWhiteSpaces);
176 Q_INVOKABLE
bool endsWith(
int line,
const QString &pattern,
bool skipWhiteSpaces);
178 Q_INVOKABLE
void indent(
const QJSValue &jsrange,
int change);
181 KTEXTEDITOR_NO_EXPORT
182 static bool _isCode(
int defaultStyle);
The Cursor represents a position in a Document.
Backend of KTextEditor::Document related public KTextEditor interfaces.
Thinish wrapping around KTextEditor::DocumentPrivate, exposing the methods we want exposed and adding...
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 Fri Oct 4 2024 12:03:01 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.