Pages
API Documentation
On this page

KSyntaxHighlighting::State Class

Opaque handle to the state of the highlighting engine. More...

  • Header: #include <KSyntaxHighlighting/State>
  • CMake: find_package(KF6 REQUIRED COMPONENTS KSyntaxHighlighting)
    target_link_libraries(mytarget PRIVATE KF6::KSyntaxHighlighting)

List of all members, including inherited members

Public Functions

Detailed Description

This needs to be fed into AbstractHighlighter for every line of text and allows concrete highlighter implementations to store state per line for fast re-highlighting of specific lines (e.g. during editing).

Member Function Documentation

State::State()

Creates an initial state, ie. what should be used for the first line in a document.

bool State::indentationBasedFoldingEnabled() const

Returns whether or not indentation-based folding is enabled in this state. When using a Definition with indentation-based folding, use this method to check if indentation-based folding has been suspended in the current line.

See also Definition::indentationBasedFoldingEnabled()

bool State::operator!=(const KSyntaxHighlighting::State &other) const

Compares two states for inequality. This is the opposite of operator==().

bool State::operator==(const KSyntaxHighlighting::State &other) const

Compares two states for equality. For two equal states and identical text input, AbstractHighlighter guarantees to produce equal results. This can be used to only re-highlight as many lines as necessary during editing.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.