Newer
Older
# This file is automatically generated from Scintilla.iface
# DO NOT MODIFY
module Fox
class FXScintilla
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Basics
INVALID_POSITION = -1
# Define start of Scintilla messages to be greater than all Windows edit (EM_*) messages
# as many EM_ messages can be used although that use is deprecated.
SCI_START = 2000
SCI_OPTIONAL_START = 3000
SCI_LEXER_START = 4000
# Add text to the document at current position.
def addText(length, text)
sendMessage(2001, length, text)
end
# Add array of cells to document.
def addStyledText(length, c)
sendMessage(2002, length, c)
end
# Insert string at a position.
def insertText(pos, text)
sendMessage(2003, pos, text)
end
# Delete all text in the document.
def clearAll
sendMessage(2004, 0, 0)
end
# Set all style bytes to 0, remove all folding information.
def clearDocumentStyle
sendMessage(2005, 0, 0)
end
# Returns the number of bytes in the document.
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
def getLength
sendMessage(2006, 0, 0)
end
# Returns the character byte at the position.
def getCharAt(pos)
sendMessage(2007, pos, 0)
end
# Returns the position of the caret.
def getCurrentPos
sendMessage(2008, 0, 0)
end
# Returns the position of the opposite end of the selection to the caret.
def getAnchor
sendMessage(2009, 0, 0)
end
# Returns the style byte at the position.
def getStyleAt(pos)
sendMessage(2010, pos, 0)
end
# Redoes the next action on the undo history.
def redo
sendMessage(2011, 0, 0)
end
# Choose between collecting actions into the undo
# history and discarding them.
def setUndoCollection(collectUndo)
sendMessage(2012, collectUndo, 0)
end
# Select all the text in the document.
def selectAll
sendMessage(2013, 0, 0)
end
# Remember the current position in the undo history as the position
# at which the document was saved.
def setSavePoint
sendMessage(2014, 0, 0)
end
# Retrieve a buffer of cells.
# Returns the number of bytes in the buffer not including terminating NULs.
def getStyledText(tr)
sendMessage(2015, 0, tr)
end
# Are there any redoable actions in the undo history?
def canRedo
sendMessage(2016, 0, 0) == 1 ? true : false
end
# Retrieve the line number at which a particular marker is located.
def markerLineFromHandle(handle)
sendMessage(2017, handle, 0)
end
# Delete a marker.
def markerDeleteHandle(handle)
sendMessage(2018, handle, 0)
end
# Is undo history being collected?
def getUndoCollection
sendMessage(2019, 0, 0) == 1 ? true : false
end
SCWS_INVISIBLE = 0
SCWS_VISIBLEALWAYS = 1
SCWS_VISIBLEAFTERINDENT = 2
# Are white space characters currently visible?
# Returns one of SCWS_* constants.
def getViewWS
sendMessage(2020, 0, 0)
end
# Make white space characters invisible, always visible or visible outside indentation.
def setViewWS(viewWS)
sendMessage(2021, viewWS, 0)
end
# Find the position from a point within the window.
def positionFromPoint(x, y)
sendMessage(2022, x, y)
end
# Find the position from a point within the window but return
# INVALID_POSITION if not close to text.
def positionFromPointClose(x, y)
sendMessage(2023, x, y)
end
# Set caret to start of a line and ensure it is visible.
def gotoLine(line)
sendMessage(2024, line, 0)
end
# Set caret to a position and ensure it is visible.
def gotoPos(pos)
sendMessage(2025, pos, 0)
end
# Set the selection anchor to a position. The anchor is the opposite
# end of the selection from the caret.
def setAnchor(posAnchor)
sendMessage(2026, posAnchor, 0)
end
# Retrieve the text of the line containing the caret.
# Returns the index of the caret on the line.
def getCurLine(length)
buffer = "".ljust(length)
sendMessage(2027, length, buffer)
buffer
end
# Retrieve the position of the last correctly styled character.
def getEndStyled
sendMessage(2028, 0, 0)
end
SC_EOL_CRLF = 0
SC_EOL_CR = 1
SC_EOL_LF = 2
# Convert all line endings in the document to one mode.
def convertEOLs(eolMode)
sendMessage(2029, eolMode, 0)
end
# Retrieve the current end of line mode - one of CRLF, CR, or LF.
def getEOLMode
sendMessage(2030, 0, 0)
end
# Set the current end of line mode.
def setEOLMode(eolMode)
sendMessage(2031, eolMode, 0)
end
# Set the current styling position to pos and the styling mask to mask.
# The styling mask can be used to protect some bits in each styling byte from modification.
def startStyling(pos, mask)
sendMessage(2032, pos, mask)
end
Loading
Loading full blame...