aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2014-01-19 11:31:29 (GMT)
committerChristoph Cullmann <cullmann@kde.org>2014-01-19 11:31:29 (GMT)
commitf60875167fd807866df33d22a5353b7ad497d2c7 (patch)
tree6fb314e12cde98ff0ed98a53d2b0252f65156453
parent37aceb93b571d01223104a64c14ff104e9e7408f (diff)
move the integral hl stuff to document, now that we are always a katepart in KTextEditor, the other part needs to be fixed to work on a view
-rw-r--r--src/include/ktexteditor/document.h27
-rw-r--r--src/include/ktexteditor/highlightinterface.h27
2 files changed, 27 insertions, 27 deletions
diff --git a/src/include/ktexteditor/document.h b/src/include/ktexteditor/document.h
index 7ec701e..ca29f9d 100644
--- a/src/include/ktexteditor/document.h
+++ b/src/include/ktexteditor/document.h
@@ -743,6 +743,33 @@ public:
virtual QString highlightingMode() const = 0;
/**
+ * \brief Get all available highlighting modes for the current document.
+ *
+ * Each document can be highlighted using an arbitrary number of highlighting
+ * contexts. This method will return the names for each of the used modes.
+ *
+ * Example: The "PHP (HTML)" mode includes the highlighting for PHP, HTML, CSS and JavaScript.
+ *
+ * \return Returns a list of embedded highlighting modes for the current Document.
+ *
+ * \see KTextEditor::Document::highlightingMode()
+ */
+ virtual QStringList embeddedHighlightingModes() const = 0;
+
+ /**
+ * \brief Get the highlight mode used at a given position in the document.
+ *
+ * Retrieve the name of the applied highlight mode at a given \p position
+ * in the current document.
+ *
+ * Calling this might trigger re-highlighting up to the given line.
+ * Therefore this is not const.
+ *
+ * \see highlightingModes()
+ */
+ virtual QString highlightingModeAt(const Cursor &position) = 0;
+
+ /**
* Return a list of the names of all possible modes
* \return list of mode names
* \see mode(), setMode()
diff --git a/src/include/ktexteditor/highlightinterface.h b/src/include/ktexteditor/highlightinterface.h
index d3f3278..29a5bc1 100644
--- a/src/include/ktexteditor/highlightinterface.h
+++ b/src/include/ktexteditor/highlightinterface.h
@@ -130,33 +130,6 @@ public:
* \return list of AttributeBlocks for given \p line.
*/
virtual QList<AttributeBlock> lineAttributes(const unsigned int line) = 0;
-
- /**
- * \brief Get all available highlighting modes for the current document.
- *
- * Each document can be highlighted using an arbitrary number of highlighting
- * contexts. This method will return the names for each of the used modes.
- *
- * Example: The "PHP (HTML)" mode includes the highlighting for PHP, HTML, CSS and JavaScript.
- *
- * \return Returns a list of embedded highlighting modes for the current Document.
- *
- * \see KTextEditor::Document::highlightingMode()
- */
- virtual QStringList embeddedHighlightingModes() const = 0;
-
- /**
- * \brief Get the highlight mode used at a given position in the document.
- *
- * Retrieve the name of the applied highlight mode at a given \p position
- * in the current document.
- *
- * \see highlightingModes()
- *
- * TODO: I intended to make this const but Kate's implementation needs to
- * call kateTextline which is non-const. Solution?
- */
- virtual QString highlightingModeAt(const Cursor &position) = 0;
};
}