1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef STYLESCI_H
6#define STYLESCI_H
7
8#include "common/common.h"
9
10#include <QObject>
11#include <QColor>
12
13class TextEdit;
14class StyleSciPrivate;
15class StyleSci : public QObject
16{
17 Q_OBJECT
18 StyleSciPrivate *const d;
19public:
20 enum Margin
21 {
22 LineNumber = 0,
23 Runtime = 1,
24 CodeFormat = 2,
25 Custom = 3,
26 };
27
28 enum MarkerNumber
29 {
30 Debug = 0,
31 Running = 1,
32 RunningLineBackground = 2,
33 CustomLineBackground = 3,
34 Extern = 4
35 };
36
37 StyleSci(TextEdit *parent);
38 virtual ~StyleSci();
39
40 TextEdit *edit();
41 void setKeyWords();
42 virtual void setStyle();
43 virtual void setMargin();
44 virtual void setLexer();
45
46 virtual QMap<int, QString> keyWords() const;
47 virtual int sectionEnd() const;
48 virtual int sectionStart() const;
49};
50
51
52
53#endif // STYLESCI_H
54