Vuo
2.0.2
editor
VuoCodeEditor.hh
Go to the documentation of this file.
1
10
#pragma once
11
12
class
VuoCodeGutter
;
13
class
VuoCodeHighlighterGLSL
;
14
class
VuoCodeWindow
;
15
19
class
VuoCodeEditor
:
public
QTextEdit
20
{
21
Q_OBJECT
22
23
public
:
24
explicit
VuoCodeEditor
(QString initialSourceCode);
25
26
void
zoom11
();
27
void
zoomIn
();
28
void
zoomOut
();
29
bool
isZoomedToActualSize
();
30
31
void
selectLine
(
int
lineNumber);
32
33
void
updateColor
(
bool
isDark);
34
35
QColor
gutterColor
;
36
QColor
gutterTextColor
;
37
QColor
currentLineColor
;
38
QColor
operatorColor
;
39
QColor
commentColor
;
40
QColor
keywordColor
;
41
QColor
builtinVariableColor
;
42
QColor
builtinFunctionColor
;
43
QColor
constantColor
;
44
QColor
preprocessorColor
;
45
QPixmap *
errorIcon
;
46
VuoCodeGutter
*
gutter
;
47
48
private
:
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
};
Generated on Thu Mar 19 2020 23:15:56 for Vuo by
1.8.17