File indexing completed on 2024-05-05 03:58:35

0001 /*
0002     SPDX-FileCopyrightText: 2013-2016 Simon St James <kdedevel@etotheipiplusone.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KATEVI_EMULATED_COMMAND_BAR_MATCHHIGHLIGHTER_H
0008 #define KATEVI_EMULATED_COMMAND_BAR_MATCHHIGHLIGHTER_H
0009 
0010 #include <ktexteditor/attribute.h>
0011 
0012 #include <QObject>
0013 
0014 namespace KTextEditor
0015 {
0016 class ViewPrivate;
0017 class Range;
0018 class MovingRange;
0019 }
0020 
0021 namespace KateVi
0022 {
0023 class MatchHighlighter : public QObject
0024 {
0025 public:
0026     explicit MatchHighlighter(KTextEditor::ViewPrivate *view);
0027     ~MatchHighlighter() override;
0028     void updateMatchHighlight(KTextEditor::Range matchRange);
0029 
0030 private:
0031     void updateMatchHighlightAttrib();
0032 
0033 private:
0034     KTextEditor::ViewPrivate *m_view = nullptr;
0035     KTextEditor::Attribute::Ptr m_highlightMatchAttribute;
0036     KTextEditor::MovingRange *m_highlightedMatch;
0037 };
0038 }
0039 #endif