summaryrefslogtreecommitdiffstats
path: root/sip/qtext/qextscintilla.sip
blob: f9a7592d0a409bad69872830bbbef8eb96b652cc (plain)
1
2
3
4
5
6
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
48
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
// This is the SIP interface definition for TQextScintilla.
//
// Copyright (c) 2007
// 	Riverbank Computing Limited <[email protected]>
// 
// This file is part of PyTQt.
// 
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
// 
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
// details.
// 
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE.  If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


// The documentation is in the main documentation file because SIP isn't clever
// enough to handle the resulting %Timeline complexity.


class TQextScintilla : TQextScintillaBase
{
%TypeHeaderCode
#include <tqextscintilla.h>
%End

public:
	enum {
		AiMaintain,
		AiOpening,
		AiClosing
	};

	enum AutoCompletionSource {
		AcsDocument,
		AcsAPIs,
%If (TQScintilla_1_7 -)
		AcsAll,
%End
	};

	enum BraceMatch {
		NoBraceMatch,
		StrictBraceMatch,
		SloppyBraceMatch
	};

%If (TQScintilla_1_4 -)
	enum EdgeMode {
		EdgeNone,
		EdgeLine,
		EdgeBackground
	};
%End

	enum EolMode {
		EolWindows,
		EolUnix,
		EolMac
	};

	enum FoldStyle {
		NoFoldStyle,
		PlainFoldStyle,
		CircledFoldStyle,
		BoxedFoldStyle,
		CircledTreeFoldStyle,
		BoxedTreeFoldStyle
	};

	enum MarkerSymbol {
		Circle,
		Rectangle,
		RightTriangle,
		SmallRectangle,
		RightArrow,
		Invisible,
		DownTriangle,
		Minus,
		Plus,
		VerticalLine,
		BottomLeftCorner,
		LeftSideSplitter,
		BoxedPlus,
		BoxedPlusConnected,
		BoxedMinus,
		BoxedMinusConnected,
		RoundedBottomLeftCorner,
		LeftSideRoundedSplitter,
		CircledPlus,
		CircledPlusConnected,
		CircledMinus,
		CircledMinusConnected,
		Background,
		ThreeDots,
		ThreeRightArrows
	};

	enum WhitespaceVisibility {
		WsInvisible,
		WsVisible,
		WsVisibleAfterIndent
	};

	enum WrapMode {
		WrapNone,
		WrapWord,
%If (TQScintilla_1_7 -)
		WrapCharacter,
%End
	};

%If (TQScintilla_1_7 -)
	enum WrapVisualFlag {
		WrapFlagNone,
		WrapFlagByText,
		WrapFlagByBorder,
	};
%End

	TQextScintilla(TQWidget * /TransferThis/ = 0,const char * = 0,
		      WFlags = 0);

	bool autoCompletionCaseSensitivity();
%If (TQScintilla_1_7 -)
	bool autoCompletionFillupsEnabled();
%End
	bool autoCompletionReplaceWord();
	bool autoCompletionShowSingle();
	AutoCompletionSource autoCompletionSource() const;
	int autoCompletionThreshold() const;
	bool autoIndent() const;
	bool backspaceUnindents();
	void beginUndoAction();
	BraceMatch braceMatching() const;
	int callTipsVisible() const;
%If (TQScintilla_1_7 -)
	void cancelList();
%End
	void clearRegisteredImages();
	void convertEols(EolMode);
%If (TQScintilla_1_3 -)
	TQextScintillaDocument document();
%End
	void endUndoAction();

%If (TQScintilla_1_4 -)
	TQColor edgeColor();
	int edgeColumn();
	EdgeMode edgeMode();
%End

	EolMode eolMode();
	bool eolVisibility();

%If (TQScintilla_1_7 -)
	TQColor color() const;
	TQColor paper() const;
%End

%If (TQScintilla_1_6 -)
	virtual bool findFirst(const TQString &,bool,bool,bool,bool,bool = 1,
			       int = -1,int = -1,bool = 1);
%End
%If (- TQScintilla_1_6)
	virtual bool findFirst(const TQString &,bool,bool,bool,bool,bool = 1,
			       int = -1,int = -1);
%End
	virtual bool findNext();

%If (TQScintilla_1_7 -)
	int firstVisibleLine();
%End

	FoldStyle folding() const;

	void getCursorPosition(int *,int *);
	void getSelection(int *,int *,int *,int *);
	bool hasSelectedText();

	int indentation(int);
	bool indentationGuides();
	bool indentationsUseTabs();
	int indentationWidth();

%If (TQScintilla_1_7 -)
	bool isCallTipActive();
	bool isListActive();
%End
	bool isModified();
	bool isReadOnly();
	bool isRedoAvailable();
	bool isUndoAvailable();
	bool isUtf8();
	int lineAt(const TQPoint &);
	int lineLength(int);
	int lines();
	int length();
%If (TQScintilla_1_7 -)
	TQextScintillaLexer *lexer() const;
%End

	bool marginLineNumbers(int);
	int marginMarkerMask(int);
	bool marginSensitivity(int);
	int marginWidth(int);

	int markerDefine(MarkerSymbol,int = -1);
	int markerDefine(char,int = -1);
	int markerDefine(const TQPixmap *,int = -1);
	int markerAdd(int,int);
	unsigned markersAtLine(int);
	void markerDelete(int,int = -1);
	void markerDeleteAll(int = -1);
	void markerDeleteHandle(int);
	int markerLine(int);
	int markerFindNext(int,unsigned);
	int markerFindPrevious(int,unsigned);
%If (TQScintilla_1_3 -)
	virtual void recolor(int = 0,int = -1);
%End
	void registerImage(int,const TQPixmap *);
	virtual void replace(const TQString &);
	void resetFoldMarginColors();
	void setFoldMarginColors(const TQColor &,const TQColor &);

	void setAutoCompletionAPIs(TQextScintillaAPIs * = 0);
	void setAutoCompletionFillups(const char *);
%If (TQScintilla_1_7 -)
	void setAutoCompletionFillupsEnabled(bool);
	void setAutoCompletionStartCharacters(const char *);
%End

	void setCallTipsAPIs(TQextScintillaAPIs * = 0);
	void setCallTipsBackgroundColor(const TQColor &);
	void setCallTipsForegroundColor(const TQColor &);
	void setCallTipsHighlightColor(const TQColor &);
	void setCallTipsVisible(int);

%If (TQScintilla_1_3 -)
	void setDocument(const TQextScintillaDocument &);
%End

%If (TQScintilla_1_4 -)
	void setEdgeColor(const TQColor &);
	void setEdgeColumn(int);
	void setEdgeMode(EdgeMode);
%End

%If (TQScintilla_1_7 -)
	virtual void setFont(const TQFont &);
%End

	void setMarkerBackgroundColor(const TQColor &,int = -1);
	void setMarkerForegroundColor(const TQColor &,int = -1);

	void setMatchedBraceBackgroundColor(const TQColor &);
	void setMatchedBraceForegroundColor(const TQColor &);
	void setUnmatchedBraceBackgroundColor(const TQColor &);
	void setUnmatchedBraceForegroundColor(const TQColor &);

%If (TQScintilla_1_7 -)
	void setWrapVisualFlags(WrapVisualFlag,
		WrapVisualFlag = TQextScintilla::WrapFlagNone, int = 0);
%End

	TQString selectedText();
%If (TQScintilla_1_7 -)
	void showUserList(int, const TQStringList &);
%End
	TQextScintillaCommandSet *standardCommands() const;
	bool tabIndents();
	int tabWidth();
	TQString text();
	TQString text(int);
%If (TQScintilla_1_7 -)
	int textHeight(int);
%End
	WhitespaceVisibility whitespaceVisibility();
%If (TQScintilla_1_4 -)
	WrapMode wrapMode();
%End

public slots:
	virtual void append(const TQString &);
%If (TQScintilla_1_7 -)
	virtual void autoCompleteFromAll();
%End
	virtual void autoCompleteFromAPIs();
	virtual void autoCompleteFromDocument();
	virtual void callTip();
	virtual void clear();
	virtual void copy();
	virtual void cut();

	virtual void ensureCursorVisible();
	virtual void ensureLineVisible(int);
%If (TQScintilla_1_7 -)
	virtual void foldAll(bool = 0);
%End
%If (- TQScintilla_1_7)
	virtual void foldAll();
%End
	virtual void foldLine(int);
	virtual void indent(int);
%If (TQScintilla_1_4 -)
	virtual void insert(const TQString &);
%End
	virtual void insertAt(const TQString &,int,int);
	virtual void moveToMatchingBrace();
	virtual void paste();
	virtual void redo();
	virtual void removeSelectedText();
%If (TQScintilla_1_4 -)
	virtual void resetSelectionBackgroundColor();
	virtual void resetSelectionForegroundColor();
%End
	virtual void selectAll(bool = 1);
	virtual void selectToMatchingBrace();

	virtual void setAutoCompletionCaseSensitivity(bool);
	virtual void setAutoCompletionReplaceWord(bool);
	virtual void setAutoCompletionShowSingle(bool);
	virtual void setAutoCompletionSource(AutoCompletionSource);
	virtual void setAutoCompletionThreshold(int);
	virtual void setAutoIndent(bool);
	virtual void setBraceMatching(BraceMatch);
	virtual void setBackspaceUnindents(bool);
%If (TQScintilla_1_3 -)
	virtual void setCaretForegroundColor(const TQColor &);
	virtual void setCaretLineBackgroundColor(const TQColor &);
	virtual void setCaretLineVisible(bool);
	virtual void setCaretWidth(int);
%End
%If (TQScintilla_1_7 -)
	virtual void setColor(const TQColor &);
%End
	virtual void setCursorPosition(int,int);
	virtual void setEolMode(EolMode);
	virtual void setEolVisibility(bool);
	virtual void setFolding(FoldStyle);

	virtual void setIndentation(int,int);
	virtual void setIndentationGuides(bool);
	virtual void setIndentationGuidesBackgroundColor(const TQColor &);
	virtual void setIndentationGuidesForegroundColor(const TQColor &);
	virtual void setIndentationsUseTabs(bool);
	virtual void setIndentationWidth(int);

	virtual void setLexer(TQextScintillaLexer * = 0);

	virtual void setMarginsBackgroundColor(const TQColor &);
	virtual void setMarginsFont(const TQFont &);
	virtual void setMarginsForegroundColor(const TQColor &);

	virtual void setMarginLineNumbers(int,bool);
	virtual void setMarginMarkerMask(int,int);
	virtual void setMarginSensitivity(int,bool);
	virtual void setMarginWidth(int,int);
	virtual void setMarginWidth(int,const TQString &);

	virtual void setModified(bool);
%If (TQScintilla_1_7 -)
	virtual void setPaper(const TQColor &);
%End
	virtual void setReadOnly(bool);
	virtual void setSelection(int,int,int,int);
%If (TQScintilla_1_3 -)
	virtual void setSelectionBackgroundColor(const TQColor &);
	virtual void setSelectionForegroundColor(const TQColor &);
%End
	virtual void setTabIndents(bool);
	virtual void setTabWidth(int);
	virtual void setText(const TQString &);
	virtual void setUtf8(bool);
	virtual void setWhitespaceVisibility(WhitespaceVisibility);
%If (TQScintilla_1_4 -)
	virtual void setWrapMode(WrapMode);
%End

	virtual void undo();
	virtual void unindent(int);

	virtual void zoomIn(int);
	virtual void zoomIn();
	virtual void zoomOut(int);
	virtual void zoomOut();
	virtual void zoomTo(int);

signals:
	void cursorPositionChanged(int,int);
	void copyAvailable(bool);
	void marginClicked(int,int,TQt::ButtonState);
	void modificationAttempted();
	void modificationChanged(bool);
	void selectionChanged();
	void textChanged();
%If (TQScintilla_1_7 -)
	void userListActivated(int, const TQString &);
%End

private:
	TQextScintilla(const TQextScintilla &);

};