Vuo 2.4.4
Loading...
Searching...
No Matches
VuoCodeEditor.hh
Go to the documentation of this file.
1
10#pragma once
11
12class VuoCodeGutter;
14class VuoCodeWindow;
15
19class VuoCodeEditor : public QTextEdit
20{
21 Q_OBJECT
22
23public:
24 explicit VuoCodeEditor(QString initialSourceCode);
25
26 void zoom11();
27 void zoomIn();
28 void zoomOut();
30
31 void selectLine(int lineNumber);
32
33 void updateColor(bool isDark);
34
35 QColor gutterColor;
39 QColor commentColor;
40 QColor keywordColor;
45 QPixmap *errorIcon;
47
48private:
49 void setFontSize(int fontSize);
50 void keyPressEvent(QKeyEvent *event);
51 void handleTab(bool forward);
52 void handleLinebreak(bool dontBreakAtCursor);
53 void handleBlockEnd();
54 void handleComment();
55 int toggleLineComment(QTextCursor &cursor);
56 void resizeEvent(QResizeEvent *event);
57 void cursorPositionChanged();
58 int getCurrentLineNumber();
59
60 friend class VuoCodeGutter;
61 friend class VuoCodeWindow;
62 int currentFontSize;
63 QList<int> fontSizes;
64 VuoCodeHighlighterGLSL *highlighter;
65 bool isDark;
66};