]>
Commit | Line | Data |
---|---|---|
23324ae1 FM |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: stc/stc.h | |
e54c96f1 | 3 | // Purpose: interface of wxStyledTextEvent |
23324ae1 FM |
4 | // Author: wxWidgets team |
5 | // RCS-ID: $Id$ | |
526954c5 | 6 | // Licence: wxWindows licence |
23324ae1 FM |
7 | ///////////////////////////////////////////////////////////////////////////// |
8 | ||
f549e3da VZ |
9 | /// Represents an invalid position. |
10 | #define wxSTC_INVALID_POSITION -1 | |
11 | ||
23324ae1 FM |
12 | /** |
13 | @class wxStyledTextEvent | |
7c913512 | 14 | |
23324ae1 | 15 | The type of events sent from wxStyledTextCtrl. |
7c913512 | 16 | |
4701dc09 | 17 | @todo list styled text ctrl events. |
7c913512 | 18 | |
23324ae1 | 19 | @library{wxbase} |
3c99e2fd | 20 | @category{events,stc} |
23324ae1 FM |
21 | */ |
22 | class wxStyledTextEvent : public wxCommandEvent | |
23 | { | |
24 | public: | |
25 | //@{ | |
26 | /** | |
4701dc09 | 27 | Ctors; used internally by wxWidgets. |
23324ae1 FM |
28 | */ |
29 | wxStyledTextEvent(wxEventType commandType = 0, int id = 0); | |
7c913512 | 30 | wxStyledTextEvent(const wxStyledTextEvent& event); |
23324ae1 FM |
31 | //@} |
32 | ||
33 | /** | |
23324ae1 | 34 | |
23324ae1 | 35 | */ |
328f5751 | 36 | bool GetAlt() const; |
23324ae1 FM |
37 | |
38 | /** | |
4701dc09 | 39 | |
23324ae1 | 40 | */ |
328f5751 | 41 | bool GetControl() const; |
23324ae1 FM |
42 | |
43 | /** | |
4701dc09 | 44 | |
23324ae1 FM |
45 | */ |
46 | bool GetDragAllowMove(); | |
47 | ||
48 | /** | |
4701dc09 | 49 | |
23324ae1 FM |
50 | */ |
51 | wxDragResult GetDragResult(); | |
52 | ||
53 | /** | |
4701dc09 | 54 | |
23324ae1 FM |
55 | */ |
56 | wxString GetDragText(); | |
57 | ||
58 | /** | |
4701dc09 | 59 | |
23324ae1 | 60 | */ |
328f5751 | 61 | int GetFoldLevelNow() const; |
23324ae1 FM |
62 | |
63 | /** | |
4701dc09 | 64 | |
23324ae1 | 65 | */ |
328f5751 | 66 | int GetFoldLevelPrev() const; |
23324ae1 FM |
67 | |
68 | /** | |
4701dc09 | 69 | |
23324ae1 | 70 | */ |
328f5751 | 71 | int GetKey() const; |
23324ae1 FM |
72 | |
73 | /** | |
4701dc09 | 74 | |
23324ae1 | 75 | */ |
328f5751 | 76 | int GetLParam() const; |
23324ae1 FM |
77 | |
78 | /** | |
4701dc09 | 79 | |
23324ae1 | 80 | */ |
328f5751 | 81 | int GetLength() const; |
23324ae1 FM |
82 | |
83 | /** | |
4701dc09 | 84 | |
23324ae1 | 85 | */ |
328f5751 | 86 | int GetLine() const; |
23324ae1 FM |
87 | |
88 | /** | |
4701dc09 | 89 | |
23324ae1 | 90 | */ |
328f5751 | 91 | int GetLinesAdded() const; |
23324ae1 FM |
92 | |
93 | /** | |
4701dc09 | 94 | |
23324ae1 | 95 | */ |
328f5751 | 96 | int GetListType() const; |
23324ae1 FM |
97 | |
98 | /** | |
4701dc09 | 99 | |
23324ae1 | 100 | */ |
328f5751 | 101 | int GetMargin() const; |
23324ae1 FM |
102 | |
103 | /** | |
4701dc09 | 104 | |
23324ae1 | 105 | */ |
328f5751 | 106 | int GetMessage() const; |
23324ae1 FM |
107 | |
108 | /** | |
4701dc09 | 109 | |
23324ae1 | 110 | */ |
328f5751 | 111 | int GetModificationType() const; |
23324ae1 FM |
112 | |
113 | /** | |
4701dc09 | 114 | |
23324ae1 | 115 | */ |
328f5751 | 116 | int GetModifiers() const; |
23324ae1 FM |
117 | |
118 | /** | |
4701dc09 | 119 | |
23324ae1 | 120 | */ |
328f5751 | 121 | int GetPosition() const; |
23324ae1 FM |
122 | |
123 | /** | |
4701dc09 | 124 | |
23324ae1 | 125 | */ |
328f5751 | 126 | bool GetShift() const; |
23324ae1 FM |
127 | |
128 | /** | |
4701dc09 | 129 | |
23324ae1 | 130 | */ |
328f5751 | 131 | wxString GetText() const; |
23324ae1 FM |
132 | |
133 | /** | |
4701dc09 | 134 | |
23324ae1 | 135 | */ |
328f5751 | 136 | int GetWParam() const; |
23324ae1 FM |
137 | |
138 | /** | |
4701dc09 | 139 | |
23324ae1 | 140 | */ |
328f5751 | 141 | int GetX() const; |
23324ae1 FM |
142 | |
143 | /** | |
4701dc09 | 144 | |
23324ae1 | 145 | */ |
328f5751 | 146 | int GetY() const; |
23324ae1 | 147 | |
65d6e39b RD |
148 | /** |
149 | */ | |
150 | int GetToken() const; | |
151 | ||
152 | /** | |
153 | */ | |
154 | int GetAnnotationsLinesAdded() const; | |
155 | ||
156 | /** | |
157 | */ | |
158 | int GetUpdated() const; | |
159 | ||
23324ae1 | 160 | /** |
4701dc09 | 161 | |
23324ae1 FM |
162 | */ |
163 | void SetDragAllowMove(bool val); | |
164 | ||
165 | /** | |
4701dc09 | 166 | |
23324ae1 FM |
167 | */ |
168 | void SetDragResult(wxDragResult val); | |
169 | ||
170 | /** | |
4701dc09 | 171 | |
23324ae1 FM |
172 | */ |
173 | void SetDragText(const wxString& val); | |
174 | ||
175 | /** | |
4701dc09 | 176 | |
23324ae1 FM |
177 | */ |
178 | void SetFoldLevelNow(int val); | |
179 | ||
180 | /** | |
4701dc09 | 181 | |
23324ae1 FM |
182 | */ |
183 | void SetFoldLevelPrev(int val); | |
184 | ||
185 | /** | |
4701dc09 | 186 | |
23324ae1 FM |
187 | */ |
188 | void SetKey(int k); | |
189 | ||
190 | /** | |
4701dc09 | 191 | |
23324ae1 FM |
192 | */ |
193 | void SetLParam(int val); | |
194 | ||
195 | /** | |
4701dc09 | 196 | |
23324ae1 FM |
197 | */ |
198 | void SetLength(int len); | |
199 | ||
200 | /** | |
4701dc09 | 201 | |
23324ae1 FM |
202 | */ |
203 | void SetLine(int val); | |
204 | ||
205 | /** | |
4701dc09 | 206 | |
23324ae1 FM |
207 | */ |
208 | void SetLinesAdded(int num); | |
209 | ||
210 | /** | |
4701dc09 | 211 | |
23324ae1 FM |
212 | */ |
213 | void SetListType(int val); | |
214 | ||
215 | /** | |
4701dc09 | 216 | |
23324ae1 FM |
217 | */ |
218 | void SetMargin(int val); | |
219 | ||
220 | /** | |
4701dc09 | 221 | |
23324ae1 FM |
222 | */ |
223 | void SetMessage(int val); | |
224 | ||
225 | /** | |
4701dc09 | 226 | |
23324ae1 FM |
227 | */ |
228 | void SetModificationType(int t); | |
229 | ||
230 | /** | |
4701dc09 | 231 | |
23324ae1 FM |
232 | */ |
233 | void SetModifiers(int m); | |
234 | ||
235 | /** | |
4701dc09 | 236 | |
23324ae1 FM |
237 | */ |
238 | void SetPosition(int pos); | |
239 | ||
240 | /** | |
4701dc09 | 241 | |
23324ae1 FM |
242 | */ |
243 | void SetText(const wxString& t); | |
244 | ||
245 | /** | |
4701dc09 | 246 | |
23324ae1 FM |
247 | */ |
248 | void SetWParam(int val); | |
249 | ||
250 | /** | |
4701dc09 | 251 | |
23324ae1 | 252 | */ |
4cc4bfaf | 253 | void SetX(int val); |
23324ae1 FM |
254 | |
255 | /** | |
4701dc09 | 256 | |
23324ae1 | 257 | */ |
4cc4bfaf | 258 | void SetY(int val); |
65d6e39b RD |
259 | |
260 | /** | |
261 | */ | |
262 | void SetToken(int val); | |
263 | ||
264 | /** | |
265 | */ | |
266 | void SetAnnotationLinesAdded(int val); | |
267 | ||
268 | /** | |
269 | */ | |
270 | void SetUpdated(int val); | |
271 | ||
23324ae1 FM |
272 | }; |
273 | ||
274 | ||
e54c96f1 | 275 | |
23324ae1 FM |
276 | /** |
277 | @class wxStyledTextCtrl | |
7c913512 | 278 | |
23324ae1 | 279 | A wxWidgets implementation of the Scintilla source code editing component. |
7c913512 | 280 | |
23324ae1 | 281 | As well as features found in standard text editing components, Scintilla |
4701dc09 FM |
282 | includes features especially useful when editing and debugging source code. |
283 | These include support for syntax styling, error indicators, code completion | |
284 | and call tips. | |
285 | ||
286 | The selection margin can contain markers like those used in debuggers to indicate | |
7c913512 FM |
287 | breakpoints and the current line. Styling choices are more open than with many |
288 | editors, allowing the use of proportional fonts, bold and italics, multiple | |
23324ae1 | 289 | foreground and background colours and multiple fonts. |
7c913512 | 290 | |
23324ae1 | 291 | wxStyledTextCtrl is a 1 to 1 mapping of "raw" scintilla interface, whose |
4701dc09 FM |
292 | documentation can be found in the Scintilla website (http://www.scintilla.org/). |
293 | ||
3051a44a | 294 | @beginEventEmissionTable{wxStyledTextEvent} |
4701dc09 FM |
295 | @event{EVT_STC_CHANGE(id, fn)} |
296 | TOWRITE | |
297 | @event{EVT_STC_STYLENEEDED(id, fn)} | |
298 | TOWRITE | |
299 | @event{EVT_STC_CHARADDED(id, fn)} | |
300 | TOWRITE | |
301 | @event{EVT_STC_SAVEPOINTREACHED(id, fn)} | |
302 | TOWRITE | |
303 | @event{EVT_STC_SAVEPOINTLEFT(id, fn)} | |
304 | TOWRITE | |
305 | @event{EVT_STC_ROMODIFYATTEMPT(id, fn)} | |
306 | TOWRITE | |
307 | @event{EVT_STC_KEY(id, fn)} | |
308 | TOWRITE | |
309 | @event{EVT_STC_DOUBLECLICK(id, fn)} | |
310 | TOWRITE | |
311 | @event{EVT_STC_UPDATEUI(id, fn)} | |
312 | TOWRITE | |
313 | @event{EVT_STC_MODIFIED(id, fn)} | |
314 | TOWRITE | |
315 | @event{EVT_STC_MACRORECORD(id, fn)} | |
316 | TOWRITE | |
317 | @event{EVT_STC_MARGINCLICK(id, fn)} | |
318 | TOWRITE | |
319 | @event{EVT_STC_NEEDSHOWN(id, fn)} | |
320 | TOWRITE | |
321 | @event{EVT_STC_PAINTED(id, fn)} | |
322 | TOWRITE | |
323 | @event{EVT_STC_USERLISTSELECTION(id, fn)} | |
324 | TOWRITE | |
325 | @event{EVT_STC_URIDROPPED(id, fn)} | |
326 | TOWRITE | |
327 | @event{EVT_STC_DWELLSTART(id, fn)} | |
328 | TOWRITE | |
329 | @event{EVT_STC_DWELLEND(id, fn)} | |
330 | TOWRITE | |
331 | @event{EVT_STC_START_DRAG(id, fn)} | |
332 | TOWRITE | |
333 | @event{EVT_STC_DRAG_OVER(id, fn)} | |
334 | TOWRITE | |
335 | @event{EVT_STC_DO_DROP(id, fn)} | |
336 | TOWRITE | |
337 | @event{EVT_STC_ZOOM(id, fn)} | |
338 | TOWRITE | |
339 | @event{EVT_STC_HOTSPOT_CLICK(id, fn)} | |
340 | TOWRITE | |
341 | @event{EVT_STC_HOTSPOT_DCLICK(id, fn)} | |
342 | TOWRITE | |
343 | @event{EVT_STC_CALLTIP_CLICK(id, fn)} | |
344 | TOWRITE | |
345 | @event{EVT_STC_AUTOCOMP_SELECTION(id, fn)} | |
346 | TOWRITE | |
9e96e16f RD |
347 | @event{EVT_STC_INDICATOR_CLICK(id, fn)} |
348 | TOWRITE | |
349 | @event{EVT_STC_INDICATOR_RELEASE(id, fn)} | |
350 | TOWRITE | |
351 | @event{EVT_STC_AUTOCOMP_CANCELLED(id, fn)} | |
352 | TOWRITE | |
353 | @event{EVT_STC_AUTOCOMP_CHAR_DELETED(id, fn)} | |
354 | TOWRITE | |
65d6e39b RD |
355 | @event{EVT_STC_HOTSPOT_RELEASE_CLICK(id, fn)} |
356 | TOWRITE | |
4701dc09 | 357 | @endEventTable |
7c913512 | 358 | |
23324ae1 FM |
359 | @library{wxbase} |
360 | @category{stc} | |
7c913512 | 361 | |
e54c96f1 | 362 | @see wxStyledTextEvent |
23324ae1 FM |
363 | */ |
364 | class wxStyledTextCtrl : public wxControl | |
365 | { | |
366 | public: | |
367 | /** | |
368 | Ctor. | |
369 | */ | |
4cc4bfaf | 370 | wxStyledTextCtrl::wxStyledTextCtrl(wxWindow* parent, |
23324ae1 | 371 | wxWindowID id = wxID_ANY, |
4ccf0566 FM |
372 | const wxPoint& pos = wxDefaultPosition, |
373 | const wxSize& size = wxDefaultSize, | |
23324ae1 | 374 | long style = 0, |
4ccf0566 | 375 | const wxString& name = wxSTCNameStr); |
23324ae1 FM |
376 | |
377 | /** | |
378 | Extend life of document. | |
379 | */ | |
380 | void AddRefDocument(void* docPointer); | |
381 | ||
382 | /** | |
383 | Add array of cells to document. | |
384 | */ | |
385 | void AddStyledText(const wxMemoryBuffer& data); | |
386 | ||
387 | /** | |
23324ae1 FM |
388 | Add text to the document at current position. |
389 | */ | |
390 | void AddText(const wxString& text); | |
391 | ||
392 | /** | |
6f67e6d2 | 393 | Add raw text to the document at current position. |
23324ae1 | 394 | */ |
6f67e6d2 | 395 | void AddTextRaw(const char* text, int length=-1); |
23324ae1 FM |
396 | |
397 | /** | |
398 | Enlarge the document to a particular size of text bytes. | |
399 | */ | |
400 | void Allocate(int bytes); | |
401 | ||
402 | /** | |
403 | Append a string to the end of the document without changing the selection. | |
404 | */ | |
adaaa686 | 405 | virtual void AppendText(const wxString& text); |
23324ae1 FM |
406 | |
407 | /** | |
408 | Append a string to the end of the document without changing the selection. | |
409 | */ | |
6f67e6d2 | 410 | void AppendTextRaw(const char* text, int length=-1); |
23324ae1 FM |
411 | |
412 | /** | |
413 | Is there an auto-completion list visible? | |
414 | */ | |
415 | bool AutoCompActive(); | |
416 | ||
417 | /** | |
418 | Remove the auto-completion list from the screen. | |
419 | */ | |
420 | void AutoCompCancel(); | |
421 | ||
422 | /** | |
423 | User has selected an item so remove the list and insert the selection. | |
424 | */ | |
425 | void AutoCompComplete(); | |
426 | ||
427 | /** | |
428 | Retrieve whether or not autocompletion is hidden automatically when nothing | |
429 | matches. | |
430 | */ | |
adaaa686 | 431 | bool AutoCompGetAutoHide() const; |
23324ae1 FM |
432 | |
433 | /** | |
434 | Retrieve whether auto-completion cancelled by backspacing before start. | |
435 | */ | |
adaaa686 | 436 | bool AutoCompGetCancelAtStart() const; |
23324ae1 FM |
437 | |
438 | /** | |
439 | Retrieve whether a single item auto-completion list automatically choose the | |
440 | item. | |
441 | */ | |
adaaa686 | 442 | bool AutoCompGetChooseSingle() const; |
23324ae1 FM |
443 | |
444 | /** | |
445 | Get currently selected item position in the auto-completion list | |
446 | */ | |
447 | int AutoCompGetCurrent(); | |
448 | ||
449 | /** | |
450 | Retrieve whether or not autocompletion deletes any word characters | |
451 | after the inserted text upon completion. | |
452 | */ | |
adaaa686 | 453 | bool AutoCompGetDropRestOfWord() const; |
23324ae1 FM |
454 | |
455 | /** | |
456 | Retrieve state of ignore case flag. | |
457 | */ | |
adaaa686 | 458 | bool AutoCompGetIgnoreCase() const; |
23324ae1 FM |
459 | |
460 | /** | |
461 | Set the maximum height, in rows, of auto-completion and user lists. | |
462 | */ | |
adaaa686 | 463 | int AutoCompGetMaxHeight() const; |
23324ae1 FM |
464 | |
465 | /** | |
466 | Get the maximum width, in characters, of auto-completion and user lists. | |
467 | */ | |
adaaa686 | 468 | int AutoCompGetMaxWidth() const; |
23324ae1 FM |
469 | |
470 | /** | |
471 | Retrieve the auto-completion list separator character. | |
472 | */ | |
adaaa686 | 473 | int AutoCompGetSeparator() const; |
23324ae1 FM |
474 | |
475 | /** | |
476 | Retrieve the auto-completion list type-separator character. | |
477 | */ | |
adaaa686 | 478 | int AutoCompGetTypeSeparator() const; |
23324ae1 FM |
479 | |
480 | /** | |
481 | Retrieve the position of the caret when the auto-completion list was displayed. | |
482 | */ | |
483 | int AutoCompPosStart(); | |
484 | ||
485 | /** | |
486 | Select the item in the auto-completion list that starts with a string. | |
487 | */ | |
488 | void AutoCompSelect(const wxString& text); | |
489 | ||
490 | /** | |
491 | Set whether or not autocompletion is hidden automatically when nothing matches. | |
492 | */ | |
493 | void AutoCompSetAutoHide(bool autoHide); | |
494 | ||
495 | /** | |
496 | Should the auto-completion list be cancelled if the user backspaces to a | |
497 | position before where the box was created. | |
498 | */ | |
499 | void AutoCompSetCancelAtStart(bool cancel); | |
500 | ||
501 | /** | |
502 | Should a single item auto-completion list automatically choose the item. | |
503 | */ | |
504 | void AutoCompSetChooseSingle(bool chooseSingle); | |
505 | ||
506 | /** | |
507 | Set whether or not autocompletion deletes any word characters | |
508 | after the inserted text upon completion. | |
509 | */ | |
510 | void AutoCompSetDropRestOfWord(bool dropRestOfWord); | |
511 | ||
512 | /** | |
513 | Define a set of characters that when typed will cause the autocompletion to | |
514 | choose the selected item. | |
515 | */ | |
516 | void AutoCompSetFillUps(const wxString& characterSet); | |
517 | ||
518 | /** | |
519 | Set whether case is significant when performing auto-completion searches. | |
520 | */ | |
521 | void AutoCompSetIgnoreCase(bool ignoreCase); | |
522 | ||
523 | /** | |
524 | Set the maximum height, in rows, of auto-completion and user lists. | |
525 | The default is 5 rows. | |
526 | */ | |
527 | void AutoCompSetMaxHeight(int rowCount); | |
528 | ||
529 | /** | |
530 | Set the maximum width, in characters, of auto-completion and user lists. | |
531 | Set to 0 to autosize to fit longest item, which is the default. | |
532 | */ | |
533 | void AutoCompSetMaxWidth(int characterCount); | |
534 | ||
535 | /** | |
536 | Change the separator character in the string setting up an auto-completion list. | |
537 | Default is space but can be changed if items contain space. | |
538 | */ | |
539 | void AutoCompSetSeparator(int separatorCharacter); | |
540 | ||
541 | /** | |
4701dc09 | 542 | Change the type-separator character in the string setting up an auto-completion list. |
23324ae1 FM |
543 | Default is '?' but can be changed if items contain '?'. |
544 | */ | |
545 | void AutoCompSetTypeSeparator(int separatorCharacter); | |
546 | ||
547 | /** | |
548 | Display a auto-completion list. | |
549 | The lenEntered parameter indicates how many characters before | |
550 | the caret should be used to provide context. | |
551 | */ | |
552 | void AutoCompShow(int lenEntered, const wxString& itemList); | |
553 | ||
554 | /** | |
555 | Define a set of character that when typed cancel the auto-completion list. | |
556 | */ | |
557 | void AutoCompStops(const wxString& characterSet); | |
558 | ||
65d6e39b RD |
559 | /** |
560 | Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. | |
561 | */ | |
562 | void AutoCompSetCaseInsensitiveBehaviour(int behaviour); | |
563 | ||
564 | /** | |
565 | Get auto-completion case insensitive behaviour. | |
566 | */ | |
567 | int AutoCompGetCaseInsensitiveBehaviour() const; | |
568 | ||
23324ae1 FM |
569 | /** |
570 | Dedent the selected lines. | |
571 | */ | |
572 | void BackTab(); | |
573 | ||
574 | /** | |
575 | Start a sequence of actions that is undone and redone as a unit. | |
576 | May be nested. | |
577 | */ | |
578 | void BeginUndoAction(); | |
579 | ||
580 | /** | |
581 | Highlight the character at a position indicating there is no matching brace. | |
582 | */ | |
583 | void BraceBadLight(int pos); | |
584 | ||
65d6e39b RD |
585 | /** |
586 | Use specified indicator to highlight matching braces instead of changing their style. | |
587 | */ | |
588 | void BraceHighlightIndicator(bool useBraceHighlightIndicator, int indicator); | |
589 | ||
590 | /** | |
591 | Use specified indicator to highlight non matching brace instead of changing its style. | |
592 | */ | |
593 | void BraceBadLightIndicator(bool useBraceBadLightIndicator, int indicator); | |
594 | ||
23324ae1 FM |
595 | /** |
596 | Highlight the characters at two positions. | |
597 | */ | |
598 | void BraceHighlight(int pos1, int pos2); | |
599 | ||
600 | /** | |
f549e3da | 601 | Find the position of a matching brace or wxSTC_INVALID_POSITION if no match. |
23324ae1 FM |
602 | */ |
603 | int BraceMatch(int pos); | |
604 | ||
605 | /** | |
606 | Is there an active call tip? | |
607 | */ | |
608 | bool CallTipActive(); | |
609 | ||
610 | /** | |
611 | Remove the call tip from the screen. | |
612 | */ | |
613 | void CallTipCancel(); | |
614 | ||
615 | /** | |
616 | Retrieve the position where the caret was before displaying the call tip. | |
617 | */ | |
618 | int CallTipPosAtStart(); | |
619 | ||
620 | /** | |
621 | Set the background colour for the call tip. | |
622 | */ | |
623 | void CallTipSetBackground(const wxColour& back); | |
624 | ||
625 | /** | |
626 | Set the foreground colour for the call tip. | |
627 | */ | |
628 | void CallTipSetForeground(const wxColour& fore); | |
629 | ||
630 | /** | |
631 | Set the foreground colour for the highlighted part of the call tip. | |
632 | */ | |
633 | void CallTipSetForegroundHighlight(const wxColour& fore); | |
634 | ||
635 | /** | |
636 | Highlight a segment of the definition. | |
637 | */ | |
638 | void CallTipSetHighlight(int start, int end); | |
639 | ||
65d6e39b RD |
640 | /** |
641 | Set position of calltip, above or below text. | |
642 | */ | |
643 | void CallTipSetPosition(bool above); | |
644 | ||
23324ae1 FM |
645 | /** |
646 | Show a call tip containing a definition near position pos. | |
647 | */ | |
648 | void CallTipShow(int pos, const wxString& definition); | |
649 | ||
650 | /** | |
651 | Enable use of STYLE_CALLTIP and set call tip tab size in pixels. | |
652 | */ | |
653 | void CallTipUseStyle(int tabSize); | |
654 | ||
655 | /** | |
656 | Will a paste succeed? | |
657 | */ | |
4ccf0566 | 658 | virtual bool CanPaste() const; |
23324ae1 FM |
659 | |
660 | /** | |
661 | Are there any redoable actions in the undo history? | |
662 | */ | |
adaaa686 | 663 | virtual bool CanRedo() const; |
23324ae1 FM |
664 | |
665 | /** | |
666 | Are there any undoable actions in the undo history? | |
667 | */ | |
adaaa686 | 668 | virtual bool CanUndo() const; |
23324ae1 FM |
669 | |
670 | /** | |
671 | Cancel any modes such as call tip or auto-completion list display. | |
672 | */ | |
673 | void Cancel(); | |
674 | ||
675 | /** | |
676 | Move caret left one character. | |
677 | */ | |
678 | void CharLeft(); | |
679 | ||
680 | /** | |
681 | Move caret left one character extending selection to new caret position. | |
682 | */ | |
683 | void CharLeftExtend(); | |
684 | ||
685 | /** | |
686 | Move caret left one character, extending rectangular selection to new caret | |
687 | position. | |
688 | */ | |
689 | void CharLeftRectExtend(); | |
690 | ||
691 | /** | |
692 | Move caret right one character. | |
693 | */ | |
694 | void CharRight(); | |
695 | ||
696 | /** | |
697 | Move caret right one character extending selection to new caret position. | |
698 | */ | |
699 | void CharRightExtend(); | |
700 | ||
701 | /** | |
702 | Move caret right one character, extending rectangular selection to new caret | |
703 | position. | |
704 | */ | |
705 | void CharRightRectExtend(); | |
706 | ||
707 | /** | |
708 | Set the last x chosen value to be the caret x position. | |
709 | */ | |
710 | void ChooseCaretX(); | |
711 | ||
712 | /** | |
713 | Clear the selection. | |
714 | */ | |
adaaa686 | 715 | virtual void Clear(); |
23324ae1 FM |
716 | |
717 | /** | |
718 | Delete all text in the document. | |
719 | */ | |
720 | void ClearAll(); | |
721 | ||
722 | /** | |
723 | Set all style bytes to 0, remove all folding information. | |
724 | */ | |
725 | void ClearDocumentStyle(); | |
726 | ||
727 | /** | |
728 | Clear all the registered images. | |
729 | */ | |
730 | void ClearRegisteredImages(); | |
731 | ||
732 | /** | |
733 | When key+modifier combination km is pressed perform msg. | |
734 | */ | |
735 | void CmdKeyAssign(int key, int modifiers, int cmd); | |
736 | ||
737 | /** | |
738 | When key+modifier combination km is pressed do nothing. | |
739 | */ | |
740 | void CmdKeyClear(int key, int modifiers); | |
741 | ||
742 | /** | |
743 | Drop all key mappings. | |
744 | */ | |
745 | void CmdKeyClearAll(); | |
746 | ||
747 | /** | |
748 | Perform one of the operations defined by the wxSTC_CMD_* constants. | |
749 | */ | |
750 | void CmdKeyExecute(int cmd); | |
751 | ||
752 | /** | |
753 | Colourise a segment of the document using the current lexing language. | |
754 | */ | |
755 | void Colourise(int start, int end); | |
756 | ||
757 | /** | |
758 | Convert all line endings in the document to one mode. | |
759 | */ | |
760 | void ConvertEOLs(int eolMode); | |
761 | ||
762 | /** | |
763 | Copy the selection to the clipboard. | |
764 | */ | |
adaaa686 | 765 | virtual void Copy(); |
23324ae1 FM |
766 | |
767 | /** | |
768 | Copy a range of text to the clipboard. Positions are clipped into the document. | |
769 | */ | |
770 | void CopyRange(int start, int end); | |
771 | ||
772 | /** | |
773 | Copy argument text to the clipboard. | |
774 | */ | |
775 | void CopyText(int length, const wxString& text); | |
776 | ||
65d6e39b RD |
777 | /** |
778 | Count characters between two positions. | |
779 | */ | |
780 | int CountCharacters(int startPos, int endPos); | |
781 | ||
23324ae1 | 782 | /** |
4701dc09 | 783 | |
23324ae1 FM |
784 | */ |
785 | bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, | |
786 | const wxPoint& pos = wxDefaultPosition, | |
787 | const wxSize& size = wxDefaultSize, | |
788 | long style = 0, | |
789 | const wxString& name = wxSTCNameStr); | |
790 | ||
791 | /** | |
792 | Create a new document object. | |
793 | Starts with reference count of 1 and not selected into editor. | |
794 | */ | |
795 | void* CreateDocument(); | |
796 | ||
797 | /** | |
798 | Cut the selection to the clipboard. | |
799 | */ | |
adaaa686 | 800 | virtual void Cut(); |
23324ae1 | 801 | |
65d6e39b RD |
802 | /** |
803 | Delete a range of text in the document. | |
804 | */ | |
805 | void DeleteRange(int pos, int deleteLength); | |
806 | ||
23324ae1 FM |
807 | /** |
808 | Delete back from the current position to the start of the line. | |
809 | */ | |
810 | void DelLineLeft(); | |
811 | ||
812 | /** | |
813 | Delete forwards from the current position to the end of the line. | |
814 | */ | |
815 | void DelLineRight(); | |
816 | ||
817 | /** | |
818 | Delete the word to the left of the caret. | |
819 | */ | |
820 | void DelWordLeft(); | |
821 | ||
822 | /** | |
823 | Delete the word to the right of the caret. | |
824 | */ | |
825 | void DelWordRight(); | |
826 | ||
827 | /** | |
828 | Delete the selection or if no selection, the character before the caret. | |
829 | */ | |
830 | void DeleteBack(); | |
831 | ||
832 | /** | |
833 | Delete the selection or if no selection, the character before the caret. | |
834 | Will not delete the character before at the start of a line. | |
835 | */ | |
836 | void DeleteBackNotLine(); | |
837 | ||
838 | /** | |
839 | Allow for simulating a DnD DragOver | |
840 | */ | |
841 | wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def); | |
842 | ||
843 | /** | |
844 | Allow for simulating a DnD DropText | |
845 | */ | |
846 | bool DoDropText(long x, long y, const wxString& data); | |
847 | ||
848 | /** | |
849 | Find the document line of a display line taking hidden lines into account. | |
850 | */ | |
851 | int DocLineFromVisible(int lineDisplay); | |
852 | ||
853 | /** | |
854 | Move caret to last position in document. | |
855 | */ | |
856 | void DocumentEnd(); | |
857 | ||
858 | /** | |
859 | Move caret to last position in document extending selection to new caret | |
860 | position. | |
861 | */ | |
862 | void DocumentEndExtend(); | |
863 | ||
864 | /** | |
865 | Move caret to first position in document. | |
866 | */ | |
867 | void DocumentStart(); | |
868 | ||
869 | /** | |
870 | Move caret to first position in document extending selection to new caret | |
871 | position. | |
872 | */ | |
873 | void DocumentStartExtend(); | |
874 | ||
875 | /** | |
876 | Switch from insert to overtype mode or the reverse. | |
877 | */ | |
878 | void EditToggleOvertype(); | |
879 | ||
880 | /** | |
881 | Delete the undo history. | |
882 | */ | |
883 | void EmptyUndoBuffer(); | |
884 | ||
885 | /** | |
886 | End a sequence of actions that is undone and redone as a unit. | |
887 | */ | |
888 | void EndUndoAction(); | |
889 | ||
890 | /** | |
891 | Ensure the caret is visible. | |
892 | */ | |
893 | void EnsureCaretVisible(); | |
894 | ||
895 | /** | |
896 | Ensure a particular line is visible by expanding any header line hiding it. | |
897 | */ | |
898 | void EnsureVisible(int line); | |
899 | ||
900 | /** | |
901 | Ensure a particular line is visible by expanding any header line hiding it. | |
902 | Use the currently set visibility policy to determine which range to display. | |
903 | */ | |
904 | void EnsureVisibleEnforcePolicy(int line); | |
905 | ||
906 | /** | |
907 | Find the position of a column on a line taking into account tabs and | |
908 | multi-byte characters. If beyond end of line, return line end position. | |
909 | */ | |
910 | int FindColumn(int line, int column); | |
911 | ||
912 | /** | |
913 | Find some text in the document. | |
914 | */ | |
915 | int FindText(int minPos, int maxPos, const wxString& text, | |
916 | int flags = 0); | |
917 | ||
918 | /** | |
919 | Insert a Form Feed character. | |
920 | */ | |
921 | void FormFeed(); | |
922 | ||
923 | /** | |
924 | On Windows, will draw the document into a display context such as a printer. | |
925 | */ | |
926 | int FormatRange(bool doDraw, int startPos, int endPos, | |
927 | wxDC* draw, wxDC* target, | |
928 | wxRect renderRect, | |
929 | wxRect pageRect); | |
930 | ||
931 | /** | |
932 | Returns the position of the opposite end of the selection to the caret. | |
933 | */ | |
adaaa686 | 934 | int GetAnchor() const; |
23324ae1 FM |
935 | |
936 | /** | |
937 | Does a backspace pressed when caret is within indentation unindent? | |
938 | */ | |
adaaa686 | 939 | bool GetBackSpaceUnIndents() const; |
23324ae1 FM |
940 | |
941 | /** | |
942 | Is drawing done first into a buffer or direct to the screen? | |
943 | */ | |
adaaa686 | 944 | bool GetBufferedDraw() const; |
23324ae1 FM |
945 | |
946 | /** | |
947 | Get the foreground colour of the caret. | |
948 | */ | |
adaaa686 | 949 | wxColour GetCaretForeground() const; |
23324ae1 FM |
950 | |
951 | /** | |
952 | Get the background alpha of the caret line. | |
953 | */ | |
adaaa686 | 954 | int GetCaretLineBackAlpha() const; |
23324ae1 FM |
955 | |
956 | /** | |
957 | Get the colour of the background of the line containing the caret. | |
958 | */ | |
adaaa686 | 959 | wxColour GetCaretLineBackground() const; |
23324ae1 FM |
960 | |
961 | /** | |
962 | Is the background of the line containing the caret in a different colour? | |
963 | */ | |
adaaa686 | 964 | bool GetCaretLineVisible() const; |
23324ae1 FM |
965 | |
966 | /** | |
967 | Get the time in milliseconds that the caret is on and off. | |
968 | */ | |
adaaa686 | 969 | int GetCaretPeriod() const; |
23324ae1 FM |
970 | |
971 | /** | |
972 | Can the caret preferred x position only be changed by explicit movement | |
973 | commands? | |
974 | */ | |
65d6e39b | 975 | int GetCaretSticky() const; |
23324ae1 FM |
976 | |
977 | /** | |
978 | Returns the width of the insert mode caret. | |
979 | */ | |
adaaa686 | 980 | int GetCaretWidth() const; |
23324ae1 FM |
981 | |
982 | /** | |
983 | Returns the character byte at the position. | |
984 | */ | |
adaaa686 | 985 | int GetCharAt(int pos) const; |
23324ae1 FM |
986 | |
987 | /** | |
988 | Get the code page used to interpret the bytes of the document as characters. | |
989 | */ | |
adaaa686 | 990 | int GetCodePage() const; |
23324ae1 FM |
991 | |
992 | /** | |
993 | Retrieve the column number of a position, taking tab width into account. | |
994 | */ | |
adaaa686 | 995 | int GetColumn(int pos) const; |
23324ae1 FM |
996 | |
997 | /** | |
998 | Get the way control characters are displayed. | |
999 | */ | |
adaaa686 | 1000 | int GetControlCharSymbol() const; |
23324ae1 FM |
1001 | |
1002 | /** | |
4701dc09 | 1003 | |
23324ae1 | 1004 | */ |
43c48e1e | 1005 | wxString GetCurLine(int* linePos = NULL); |
23324ae1 FM |
1006 | |
1007 | /** | |
4701dc09 | 1008 | |
23324ae1 | 1009 | */ |
43c48e1e | 1010 | wxCharBuffer GetCurLineRaw(int* linePos = NULL); |
23324ae1 FM |
1011 | |
1012 | /** | |
1013 | END of generated section | |
23324ae1 FM |
1014 | Others... |
1015 | Returns the line number of the line with the caret. | |
1016 | */ | |
1017 | int GetCurrentLine(); | |
1018 | ||
1019 | /** | |
1020 | Returns the position of the caret. | |
1021 | */ | |
adaaa686 | 1022 | int GetCurrentPos() const; |
23324ae1 FM |
1023 | |
1024 | /** | |
1025 | Retrieve a pointer to the document object. | |
1026 | */ | |
1027 | void* GetDocPointer(); | |
1028 | ||
1029 | /** | |
1030 | Retrieve the current end of line mode - one of CRLF, CR, or LF. | |
1031 | */ | |
adaaa686 | 1032 | int GetEOLMode() const; |
23324ae1 FM |
1033 | |
1034 | /** | |
1035 | Retrieve the colour used in edge indication. | |
1036 | */ | |
adaaa686 | 1037 | wxColour GetEdgeColour() const; |
23324ae1 FM |
1038 | |
1039 | /** | |
1040 | Retrieve the column number which text should be kept within. | |
1041 | */ | |
adaaa686 | 1042 | int GetEdgeColumn() const; |
23324ae1 FM |
1043 | |
1044 | /** | |
1045 | Retrieve the edge highlight mode. | |
1046 | */ | |
adaaa686 | 1047 | int GetEdgeMode() const; |
23324ae1 FM |
1048 | |
1049 | /** | |
1050 | Retrieve whether the maximum scroll position has the last | |
1051 | line at the bottom of the view. | |
1052 | */ | |
adaaa686 | 1053 | bool GetEndAtLastLine() const; |
23324ae1 FM |
1054 | |
1055 | /** | |
1056 | Retrieve the position of the last correctly styled character. | |
1057 | */ | |
adaaa686 | 1058 | int GetEndStyled() const; |
23324ae1 FM |
1059 | |
1060 | /** | |
1061 | Retrieve the display line at the top of the display. | |
1062 | */ | |
adaaa686 | 1063 | int GetFirstVisibleLine() const; |
23324ae1 FM |
1064 | |
1065 | /** | |
1066 | Is a header line expanded? | |
1067 | */ | |
adaaa686 | 1068 | bool GetFoldExpanded(int line) const; |
23324ae1 FM |
1069 | |
1070 | /** | |
1071 | Retrieve the fold level of a line. | |
1072 | */ | |
adaaa686 | 1073 | int GetFoldLevel(int line) const; |
23324ae1 FM |
1074 | |
1075 | /** | |
1076 | Find the parent line of a child line. | |
1077 | */ | |
adaaa686 | 1078 | int GetFoldParent(int line) const; |
23324ae1 FM |
1079 | |
1080 | /** | |
1081 | Get the highlighted indentation guide column. | |
1082 | */ | |
adaaa686 | 1083 | int GetHighlightGuide() const; |
23324ae1 FM |
1084 | |
1085 | /** | |
1086 | Retrieve indentation size. | |
1087 | */ | |
adaaa686 | 1088 | int GetIndent() const; |
23324ae1 FM |
1089 | |
1090 | /** | |
1091 | Are the indentation guides visible? | |
1092 | */ | |
43c48e1e | 1093 | int GetIndentationGuides() const; |
23324ae1 FM |
1094 | |
1095 | /** | |
1096 | Find the last child line of a header line. | |
1097 | */ | |
adaaa686 | 1098 | int GetLastChild(int line, int level) const; |
23324ae1 FM |
1099 | |
1100 | /** | |
1101 | Can be used to prevent the EVT_CHAR handler from adding the char | |
1102 | */ | |
1103 | bool GetLastKeydownProcessed(); | |
1104 | ||
1105 | /** | |
1106 | Retrieve the degree of caching of layout information. | |
1107 | */ | |
adaaa686 | 1108 | int GetLayoutCache() const; |
23324ae1 FM |
1109 | |
1110 | /** | |
9e96e16f | 1111 | Returns the number of bytes in the document. |
23324ae1 | 1112 | */ |
adaaa686 | 1113 | int GetLength() const; |
23324ae1 FM |
1114 | |
1115 | /** | |
1116 | Retrieve the lexing language of the document. | |
1117 | */ | |
adaaa686 | 1118 | int GetLexer() const; |
23324ae1 FM |
1119 | |
1120 | /** | |
1121 | Retrieve the contents of a line. | |
1122 | */ | |
adaaa686 | 1123 | wxString GetLine(int line) const; |
23324ae1 FM |
1124 | |
1125 | /** | |
1126 | Returns the number of lines in the document. There is always at least one. | |
1127 | */ | |
adaaa686 | 1128 | int GetLineCount() const; |
23324ae1 FM |
1129 | |
1130 | /** | |
1131 | Get the position after the last visible characters on a line. | |
1132 | */ | |
adaaa686 | 1133 | int GetLineEndPosition(int line) const; |
23324ae1 FM |
1134 | |
1135 | /** | |
1136 | Retrieve the position before the first non indentation character on a line. | |
1137 | */ | |
adaaa686 | 1138 | int GetLineIndentPosition(int line) const; |
23324ae1 FM |
1139 | |
1140 | /** | |
1141 | Retrieve the number of columns that a line is indented. | |
1142 | */ | |
adaaa686 | 1143 | int GetLineIndentation(int line) const; |
23324ae1 FM |
1144 | |
1145 | /** | |
1146 | Retrieve the contents of a line. | |
1147 | */ | |
1148 | wxCharBuffer GetLineRaw(int line); | |
1149 | ||
1150 | /** | |
1151 | Retrieve the position of the end of the selection at the given line | |
f549e3da | 1152 | (wxSTC_INVALID_POSITION if no selection on this line). |
23324ae1 FM |
1153 | */ |
1154 | int GetLineSelEndPosition(int line); | |
1155 | ||
1156 | /** | |
1157 | Retrieve the position of the start of the selection at the given line | |
f549e3da | 1158 | (wxSTC_INVALID_POSITION if no selection on this line). |
23324ae1 FM |
1159 | */ |
1160 | int GetLineSelStartPosition(int line); | |
1161 | ||
1162 | /** | |
1163 | Retrieve the extra styling information for a line. | |
1164 | */ | |
adaaa686 | 1165 | int GetLineState(int line) const; |
23324ae1 FM |
1166 | |
1167 | /** | |
1168 | Is a line visible? | |
1169 | */ | |
adaaa686 | 1170 | bool GetLineVisible(int line) const; |
23324ae1 | 1171 | |
65d6e39b RD |
1172 | /** |
1173 | Are all lines visible? | |
1174 | */ | |
1175 | bool GetAllLinesVisible() const; | |
1176 | ||
23324ae1 FM |
1177 | /** |
1178 | Returns the size in pixels of the left margin. | |
1179 | */ | |
adaaa686 | 1180 | int GetMarginLeft() const; |
23324ae1 FM |
1181 | |
1182 | /** | |
1183 | Retrieve the marker mask of a margin. | |
1184 | */ | |
adaaa686 | 1185 | int GetMarginMask(int margin) const; |
23324ae1 FM |
1186 | |
1187 | /** | |
1188 | Returns the size in pixels of the right margin. | |
1189 | */ | |
adaaa686 | 1190 | int GetMarginRight() const; |
23324ae1 FM |
1191 | |
1192 | /** | |
1193 | Retrieve the mouse click sensitivity of a margin. | |
1194 | */ | |
adaaa686 | 1195 | bool GetMarginSensitive(int margin) const; |
23324ae1 FM |
1196 | |
1197 | /** | |
1198 | Retrieve the type of a margin. | |
1199 | */ | |
adaaa686 | 1200 | int GetMarginType(int margin) const; |
23324ae1 FM |
1201 | |
1202 | /** | |
1203 | Retrieve the width of a margin in pixels. | |
1204 | */ | |
adaaa686 | 1205 | int GetMarginWidth(int margin) const; |
23324ae1 FM |
1206 | |
1207 | /** | |
1208 | Retrieve the last line number that has line state. | |
1209 | */ | |
adaaa686 | 1210 | int GetMaxLineState() const; |
23324ae1 FM |
1211 | |
1212 | /** | |
1213 | Get which document modification events are sent to the container. | |
1214 | */ | |
adaaa686 | 1215 | int GetModEventMask() const; |
23324ae1 FM |
1216 | |
1217 | /** | |
1218 | Is the document different from when it was last saved? | |
1219 | */ | |
adaaa686 | 1220 | bool GetModify() const; |
23324ae1 FM |
1221 | |
1222 | /** | |
1223 | Get whether mouse gets captured. | |
1224 | */ | |
adaaa686 | 1225 | bool GetMouseDownCaptures() const; |
23324ae1 FM |
1226 | |
1227 | /** | |
1228 | Retrieve the time the mouse must sit still to generate a mouse dwell event. | |
1229 | */ | |
adaaa686 | 1230 | int GetMouseDwellTime() const; |
23324ae1 FM |
1231 | |
1232 | /** | |
1233 | Returns @true if overtype mode is active otherwise @false is returned. | |
1234 | */ | |
adaaa686 | 1235 | bool GetOvertype() const; |
23324ae1 FM |
1236 | |
1237 | /** | |
1238 | Get convert-on-paste setting | |
1239 | */ | |
adaaa686 | 1240 | bool GetPasteConvertEndings() const; |
23324ae1 FM |
1241 | |
1242 | /** | |
1243 | Returns the print colour mode. | |
1244 | */ | |
adaaa686 | 1245 | int GetPrintColourMode() const; |
23324ae1 FM |
1246 | |
1247 | /** | |
1248 | Returns the print magnification. | |
1249 | */ | |
adaaa686 | 1250 | int GetPrintMagnification() const; |
23324ae1 FM |
1251 | |
1252 | /** | |
1253 | Is printing line wrapped? | |
1254 | */ | |
adaaa686 | 1255 | int GetPrintWrapMode() const; |
23324ae1 FM |
1256 | |
1257 | /** | |
1258 | Retrieve a 'property' value previously set with SetProperty. | |
1259 | */ | |
1260 | wxString GetProperty(const wxString& key); | |
1261 | ||
1262 | /** | |
1263 | Retrieve a 'property' value previously set with SetProperty, | |
1264 | with '$()' variable replacement on returned buffer. | |
1265 | */ | |
1266 | wxString GetPropertyExpanded(const wxString& key); | |
1267 | ||
1268 | /** | |
1269 | Retrieve a 'property' value previously set with SetProperty, | |
1270 | interpreted as an int AFTER any '$()' variable replacement. | |
1271 | */ | |
adaaa686 | 1272 | int GetPropertyInt(const wxString& key) const; |
23324ae1 FM |
1273 | |
1274 | /** | |
1275 | In read-only mode? | |
1276 | */ | |
adaaa686 | 1277 | bool GetReadOnly() const; |
23324ae1 FM |
1278 | |
1279 | /** | |
1280 | Get cursor type. | |
1281 | */ | |
adaaa686 | 1282 | int GetSTCCursor() const; |
23324ae1 FM |
1283 | |
1284 | /** | |
1285 | Get internal focus flag. | |
1286 | */ | |
adaaa686 | 1287 | bool GetSTCFocus() const; |
23324ae1 FM |
1288 | |
1289 | /** | |
1290 | Retrieve the document width assumed for scrolling. | |
1291 | */ | |
adaaa686 | 1292 | int GetScrollWidth() const; |
23324ae1 FM |
1293 | |
1294 | /** | |
1295 | Get the search flags used by SearchInTarget. | |
1296 | */ | |
adaaa686 | 1297 | int GetSearchFlags() const; |
23324ae1 FM |
1298 | |
1299 | /** | |
1300 | Get the alpha of the selection. | |
1301 | */ | |
adaaa686 | 1302 | int GetSelAlpha() const; |
23324ae1 FM |
1303 | |
1304 | /** | |
1305 | Retrieve the selected text. | |
1306 | */ | |
1307 | wxString GetSelectedText(); | |
1308 | ||
1309 | /** | |
1310 | Retrieve the selected text. | |
1311 | */ | |
1312 | wxCharBuffer GetSelectedTextRaw(); | |
1313 | ||
1314 | /** | |
4701dc09 | 1315 | |
23324ae1 FM |
1316 | */ |
1317 | void GetSelection(int* OUTPUT, int* OUTPUT); | |
1318 | ||
1319 | /** | |
1320 | Returns the position at the end of the selection. | |
1321 | */ | |
adaaa686 | 1322 | int GetSelectionEnd() const; |
23324ae1 FM |
1323 | |
1324 | /** | |
1325 | Get the mode of the current selection. | |
1326 | */ | |
adaaa686 | 1327 | int GetSelectionMode() const; |
23324ae1 FM |
1328 | |
1329 | /** | |
1330 | Returns the position at the start of the selection. | |
1331 | */ | |
adaaa686 | 1332 | int GetSelectionStart() const; |
23324ae1 FM |
1333 | |
1334 | /** | |
1335 | Get error status. | |
1336 | */ | |
adaaa686 | 1337 | int GetStatus() const; |
23324ae1 FM |
1338 | |
1339 | /** | |
1340 | Returns the style byte at the position. | |
1341 | */ | |
adaaa686 | 1342 | int GetStyleAt(int pos) const; |
23324ae1 FM |
1343 | |
1344 | /** | |
1345 | Retrieve number of bits in style bytes used to hold the lexical state. | |
1346 | */ | |
adaaa686 | 1347 | int GetStyleBits() const; |
23324ae1 FM |
1348 | |
1349 | /** | |
1350 | Retrieve the number of bits the current lexer needs for styling. | |
1351 | */ | |
adaaa686 | 1352 | int GetStyleBitsNeeded() const; |
23324ae1 FM |
1353 | |
1354 | /** | |
1355 | Retrieve a buffer of cells. | |
1356 | */ | |
1357 | wxMemoryBuffer GetStyledText(int startPos, int endPos); | |
1358 | ||
1359 | /** | |
1360 | Does a tab pressed when caret is within indentation indent? | |
1361 | */ | |
adaaa686 | 1362 | bool GetTabIndents() const; |
23324ae1 FM |
1363 | |
1364 | /** | |
1365 | Retrieve the visible size of a tab. | |
1366 | */ | |
adaaa686 | 1367 | int GetTabWidth() const; |
23324ae1 FM |
1368 | |
1369 | /** | |
1370 | Get the position that ends the target. | |
1371 | */ | |
adaaa686 | 1372 | int GetTargetEnd() const; |
23324ae1 FM |
1373 | |
1374 | /** | |
1375 | Get the position that starts the target. | |
1376 | */ | |
adaaa686 | 1377 | int GetTargetStart() const; |
23324ae1 FM |
1378 | |
1379 | /** | |
1380 | Retrieve all the text in the document. | |
1381 | */ | |
adaaa686 | 1382 | wxString GetText() const; |
23324ae1 FM |
1383 | |
1384 | /** | |
1385 | Retrieve the number of characters in the document. | |
1386 | */ | |
adaaa686 | 1387 | int GetTextLength() const; |
23324ae1 FM |
1388 | |
1389 | /** | |
1390 | Retrieve a range of text. | |
1391 | */ | |
1392 | wxString GetTextRange(int startPos, int endPos); | |
1393 | ||
1394 | /** | |
1395 | Retrieve a range of text. | |
1396 | */ | |
1397 | wxCharBuffer GetTextRangeRaw(int startPos, int endPos); | |
1398 | ||
1399 | /** | |
1400 | Retrieve all the text in the document. | |
1401 | */ | |
1402 | wxCharBuffer GetTextRaw(); | |
1403 | ||
1404 | /** | |
1405 | Is drawing done in two phases with backgrounds drawn before foregrounds? | |
1406 | */ | |
adaaa686 | 1407 | bool GetTwoPhaseDraw() const; |
23324ae1 FM |
1408 | |
1409 | /** | |
1410 | Is undo history being collected? | |
1411 | */ | |
adaaa686 | 1412 | bool GetUndoCollection() const; |
23324ae1 FM |
1413 | |
1414 | /** | |
1415 | Returns the current UseAntiAliasing setting. | |
1416 | */ | |
1417 | bool GetUseAntiAliasing(); | |
1418 | ||
1419 | /** | |
1420 | Is the horizontal scroll bar visible? | |
1421 | */ | |
adaaa686 | 1422 | bool GetUseHorizontalScrollBar() const; |
23324ae1 FM |
1423 | |
1424 | /** | |
1425 | Retrieve whether tabs will be used in indentation. | |
1426 | */ | |
adaaa686 | 1427 | bool GetUseTabs() const; |
23324ae1 FM |
1428 | |
1429 | /** | |
1430 | Is the vertical scroll bar visible? | |
1431 | */ | |
adaaa686 | 1432 | bool GetUseVerticalScrollBar() const; |
23324ae1 FM |
1433 | |
1434 | /** | |
1435 | Are the end of line characters visible? | |
1436 | */ | |
adaaa686 | 1437 | bool GetViewEOL() const; |
23324ae1 FM |
1438 | |
1439 | /** | |
1440 | Are white space characters currently visible? | |
1441 | Returns one of SCWS_* constants. | |
1442 | */ | |
adaaa686 | 1443 | int GetViewWhiteSpace() const; |
23324ae1 FM |
1444 | |
1445 | /** | |
1446 | Retrieve whether text is word wrapped. | |
1447 | */ | |
adaaa686 | 1448 | int GetWrapMode() const; |
23324ae1 FM |
1449 | |
1450 | /** | |
57ab6f23 | 1451 | Retrieve the start indent for wrapped lines. |
23324ae1 | 1452 | */ |
adaaa686 | 1453 | int GetWrapStartIndent() const; |
23324ae1 FM |
1454 | |
1455 | /** | |
57ab6f23 | 1456 | Retrieve the display mode of visual flags for wrapped lines. |
23324ae1 | 1457 | */ |
adaaa686 | 1458 | int GetWrapVisualFlags() const; |
23324ae1 FM |
1459 | |
1460 | /** | |
57ab6f23 | 1461 | Retrieve the location of visual flags for wrapped lines. |
23324ae1 | 1462 | */ |
adaaa686 | 1463 | int GetWrapVisualFlagsLocation() const; |
23324ae1 FM |
1464 | |
1465 | /** | |
4701dc09 | 1466 | |
23324ae1 | 1467 | */ |
adaaa686 | 1468 | int GetXOffset() const; |
23324ae1 FM |
1469 | |
1470 | /** | |
1471 | Retrieve the zoom level. | |
1472 | */ | |
adaaa686 | 1473 | int GetZoom() const; |
23324ae1 FM |
1474 | |
1475 | /** | |
1476 | Set caret to start of a line and ensure it is visible. | |
1477 | */ | |
1478 | void GotoLine(int line); | |
1479 | ||
1480 | /** | |
1481 | Set caret to a position and ensure it is visible. | |
1482 | */ | |
1483 | void GotoPos(int pos); | |
1484 | ||
1485 | /** | |
1486 | Make a range of lines invisible. | |
1487 | */ | |
1488 | void HideLines(int lineStart, int lineEnd); | |
1489 | ||
1490 | /** | |
1491 | Draw the selection in normal style or with selection highlighted. | |
1492 | */ | |
1493 | void HideSelection(bool normal); | |
1494 | ||
1495 | /** | |
1496 | Move caret to first position on line. | |
1497 | */ | |
1498 | void Home(); | |
1499 | ||
1500 | /** | |
1501 | Move caret to first position on display line. | |
1502 | */ | |
1503 | void HomeDisplay(); | |
1504 | ||
1505 | /** | |
1506 | Move caret to first position on display line extending selection to | |
1507 | new caret position. | |
1508 | */ | |
1509 | void HomeDisplayExtend(); | |
1510 | ||
1511 | /** | |
1512 | Move caret to first position on line extending selection to new caret position. | |
1513 | */ | |
1514 | void HomeExtend(); | |
1515 | ||
1516 | /** | |
1517 | Move caret to first position on line, extending rectangular selection to new | |
1518 | caret position. | |
1519 | */ | |
1520 | void HomeRectExtend(); | |
1521 | ||
1522 | /** | |
1523 | These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? | |
1524 | except they behave differently when word-wrap is enabled: | |
1525 | They go first to the start / end of the display line, like (Home|LineEnd)Display | |
1526 | The difference is that, the cursor is already at the point, it goes on to the | |
4701dc09 | 1527 | start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?. |
23324ae1 FM |
1528 | */ |
1529 | void HomeWrap(); | |
1530 | ||
1531 | /** | |
4701dc09 | 1532 | |
23324ae1 FM |
1533 | */ |
1534 | void HomeWrapExtend(); | |
1535 | ||
1536 | /** | |
1537 | Retrieve the foreground colour of an indicator. | |
1538 | */ | |
adaaa686 | 1539 | wxColour IndicatorGetForeground(int indic) const; |
23324ae1 FM |
1540 | |
1541 | /** | |
1542 | Retrieve the style of an indicator. | |
1543 | */ | |
adaaa686 | 1544 | int IndicatorGetStyle(int indic) const; |
23324ae1 FM |
1545 | |
1546 | /** | |
1547 | Set the foreground colour of an indicator. | |
1548 | */ | |
1549 | void IndicatorSetForeground(int indic, const wxColour& fore); | |
1550 | ||
1551 | /** | |
1552 | Set an indicator to plain, squiggle or TT. | |
1553 | */ | |
1554 | void IndicatorSetStyle(int indic, int style); | |
1555 | ||
1556 | /** | |
1557 | Insert string at a position. | |
1558 | */ | |
1559 | void InsertText(int pos, const wxString& text); | |
1560 | ||
1561 | /** | |
1562 | Insert string at a position. | |
1563 | */ | |
1564 | void InsertTextRaw(int pos, const char* text); | |
1565 | ||
1566 | /** | |
1567 | Copy the line containing the caret. | |
1568 | */ | |
1569 | void LineCopy(); | |
1570 | ||
1571 | /** | |
1572 | Cut the line containing the caret. | |
1573 | */ | |
1574 | void LineCut(); | |
1575 | ||
1576 | /** | |
1577 | Delete the line containing the caret. | |
1578 | */ | |
1579 | void LineDelete(); | |
1580 | ||
1581 | /** | |
1582 | Move caret down one line. | |
1583 | */ | |
1584 | void LineDown(); | |
1585 | ||
1586 | /** | |
1587 | Move caret down one line extending selection to new caret position. | |
1588 | */ | |
1589 | void LineDownExtend(); | |
1590 | ||
1591 | /** | |
1592 | Move caret down one line, extending rectangular selection to new caret position. | |
1593 | */ | |
1594 | void LineDownRectExtend(); | |
1595 | ||
1596 | /** | |
1597 | Duplicate the current line. | |
1598 | */ | |
1599 | void LineDuplicate(); | |
1600 | ||
1601 | /** | |
1602 | Move caret to last position on line. | |
1603 | */ | |
1604 | void LineEnd(); | |
1605 | ||
1606 | /** | |
1607 | Move caret to last position on display line. | |
1608 | */ | |
1609 | void LineEndDisplay(); | |
1610 | ||
1611 | /** | |
1612 | Move caret to last position on display line extending selection to new | |
1613 | caret position. | |
1614 | */ | |
1615 | void LineEndDisplayExtend(); | |
1616 | ||
1617 | /** | |
1618 | Move caret to last position on line extending selection to new caret position. | |
1619 | */ | |
1620 | void LineEndExtend(); | |
1621 | ||
1622 | /** | |
1623 | Move caret to last position on line, extending rectangular selection to new | |
1624 | caret position. | |
1625 | */ | |
1626 | void LineEndRectExtend(); | |
1627 | ||
1628 | /** | |
4701dc09 | 1629 | |
23324ae1 FM |
1630 | */ |
1631 | void LineEndWrap(); | |
1632 | ||
1633 | /** | |
4701dc09 | 1634 | |
23324ae1 FM |
1635 | */ |
1636 | void LineEndWrapExtend(); | |
1637 | ||
1638 | /** | |
1639 | Retrieve the line containing a position. | |
1640 | */ | |
adaaa686 | 1641 | int LineFromPosition(int pos) const; |
23324ae1 FM |
1642 | |
1643 | /** | |
9e96e16f | 1644 | How many characters are on a line, including end of line characters? |
23324ae1 | 1645 | */ |
adaaa686 | 1646 | int LineLength(int line) const; |
23324ae1 FM |
1647 | |
1648 | /** | |
1649 | Scroll horizontally and vertically. | |
1650 | */ | |
1651 | void LineScroll(int columns, int lines); | |
1652 | ||
1653 | /** | |
1654 | Scroll the document down, keeping the caret visible. | |
1655 | */ | |
1656 | void LineScrollDown(); | |
1657 | ||
1658 | /** | |
1659 | Scroll the document up, keeping the caret visible. | |
1660 | */ | |
1661 | void LineScrollUp(); | |
1662 | ||
1663 | /** | |
1664 | Switch the current line with the previous. | |
1665 | */ | |
1666 | void LineTranspose(); | |
1667 | ||
1668 | /** | |
1669 | Move caret up one line. | |
1670 | */ | |
1671 | void LineUp(); | |
1672 | ||
1673 | /** | |
1674 | Move caret up one line extending selection to new caret position. | |
1675 | */ | |
1676 | void LineUpExtend(); | |
1677 | ||
1678 | /** | |
1679 | Move caret up one line, extending rectangular selection to new caret position. | |
1680 | */ | |
1681 | void LineUpRectExtend(); | |
1682 | ||
1683 | /** | |
1684 | Join the lines in the target. | |
1685 | */ | |
1686 | void LinesJoin(); | |
1687 | ||
1688 | /** | |
1689 | Retrieves the number of lines completely visible. | |
1690 | */ | |
adaaa686 | 1691 | int LinesOnScreen() const; |
23324ae1 FM |
1692 | |
1693 | /** | |
1694 | Split the lines in the target into lines that are less wide than pixelWidth | |
1695 | where possible. | |
1696 | */ | |
1697 | void LinesSplit(int pixelWidth); | |
1698 | ||
1699 | /** | |
1700 | Load the contents of filename into the editor | |
1701 | */ | |
43c48e1e | 1702 | bool LoadFile(const wxString& file, int fileType = wxTEXT_TYPE_ANY); |
23324ae1 FM |
1703 | |
1704 | /** | |
1705 | Transform the selection to lower case. | |
1706 | */ | |
1707 | void LowerCase(); | |
1708 | ||
1709 | /** | |
1710 | Add a marker to a line, returning an ID which can be used to find or delete the | |
1711 | marker. | |
1712 | */ | |
1713 | int MarkerAdd(int line, int markerNumber); | |
1714 | ||
1715 | /** | |
1716 | Add a set of markers to a line. | |
1717 | */ | |
1718 | void MarkerAddSet(int line, int set); | |
1719 | ||
1720 | /** | |
1721 | Set the symbol used for a particular marker number, | |
1722 | and optionally the fore and background colours. | |
1723 | */ | |
1724 | void MarkerDefine(int markerNumber, int markerSymbol, | |
1725 | const wxColour& foreground = wxNullColour, | |
1726 | const wxColour& background = wxNullColour); | |
1727 | ||
1728 | /** | |
1729 | Define a marker from a bitmap | |
1730 | */ | |
1731 | void MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp); | |
1732 | ||
1733 | /** | |
1734 | Delete a marker from a line. | |
1735 | */ | |
1736 | void MarkerDelete(int line, int markerNumber); | |
1737 | ||
1738 | /** | |
1739 | Delete all markers with a particular number from all lines. | |
1740 | */ | |
1741 | void MarkerDeleteAll(int markerNumber); | |
1742 | ||
1743 | /** | |
1744 | Delete a marker. | |
1745 | */ | |
1746 | void MarkerDeleteHandle(int handle); | |
1747 | ||
1748 | /** | |
1749 | Get a bit mask of all the markers set on a line. | |
1750 | */ | |
1751 | int MarkerGet(int line); | |
1752 | ||
1753 | /** | |
1754 | Retrieve the line number at which a particular marker is located. | |
1755 | */ | |
1756 | int MarkerLineFromHandle(int handle); | |
1757 | ||
1758 | /** | |
65d6e39b RD |
1759 | Find the next line at or after lineStart that includes a marker in mask. |
1760 | Return -1 when no more lines. | |
23324ae1 FM |
1761 | */ |
1762 | int MarkerNext(int lineStart, int markerMask); | |
1763 | ||
1764 | /** | |
1765 | Find the previous line before lineStart that includes a marker in mask. | |
1766 | */ | |
1767 | int MarkerPrevious(int lineStart, int markerMask); | |
1768 | ||
1769 | /** | |
1770 | Set the alpha used for a marker that is drawn in the text area, not the margin. | |
1771 | */ | |
1772 | void MarkerSetAlpha(int markerNumber, int alpha); | |
1773 | ||
1774 | /** | |
1775 | Set the background colour used for a particular marker number. | |
1776 | */ | |
1777 | void MarkerSetBackground(int markerNumber, const wxColour& back); | |
1778 | ||
1779 | /** | |
1780 | Set the foreground colour used for a particular marker number. | |
1781 | */ | |
1782 | void MarkerSetForeground(int markerNumber, const wxColour& fore); | |
1783 | ||
65d6e39b RD |
1784 | /** |
1785 | Set the background colour used for a particular marker number when its folding block is selected. | |
1786 | */ | |
1787 | void MarkerSetBackgroundSelected(int markerNumber, const wxColour& back); | |
1788 | ||
1789 | /** | |
1790 | Enable/disable highlight for current folding bloc (smallest one that contains the caret) | |
1791 | */ | |
1792 | void MarkerEnableHighlight(bool enabled); | |
1793 | ||
23324ae1 FM |
1794 | /** |
1795 | Move the caret inside current view if it's not there already. | |
1796 | */ | |
1797 | void MoveCaretInsideView(); | |
1798 | ||
1799 | /** | |
1800 | Insert a new line, may use a CRLF, CR or LF depending on EOL mode. | |
1801 | */ | |
1802 | void NewLine(); | |
1803 | ||
1804 | /** | |
1805 | Move caret one page down. | |
1806 | */ | |
1807 | void PageDown(); | |
1808 | ||
1809 | /** | |
1810 | Move caret one page down extending selection to new caret position. | |
1811 | */ | |
1812 | void PageDownExtend(); | |
1813 | ||
1814 | /** | |
1815 | Move caret one page down, extending rectangular selection to new caret position. | |
1816 | */ | |
1817 | void PageDownRectExtend(); | |
1818 | ||
1819 | /** | |
1820 | Move caret one page up. | |
1821 | */ | |
1822 | void PageUp(); | |
1823 | ||
1824 | /** | |
1825 | Move caret one page up extending selection to new caret position. | |
1826 | */ | |
1827 | void PageUpExtend(); | |
1828 | ||
1829 | /** | |
1830 | Move caret one page up, extending rectangular selection to new caret position. | |
1831 | */ | |
1832 | void PageUpRectExtend(); | |
1833 | ||
1834 | /** | |
1835 | Move caret between paragraphs (delimited by empty lines). | |
1836 | */ | |
1837 | void ParaDown(); | |
1838 | ||
1839 | /** | |
4701dc09 | 1840 | |
23324ae1 FM |
1841 | */ |
1842 | void ParaDownExtend(); | |
1843 | ||
1844 | /** | |
4701dc09 | 1845 | |
23324ae1 FM |
1846 | */ |
1847 | void ParaUp(); | |
1848 | ||
1849 | /** | |
4701dc09 | 1850 | |
23324ae1 FM |
1851 | */ |
1852 | void ParaUpExtend(); | |
1853 | ||
1854 | /** | |
1855 | Paste the contents of the clipboard into the document replacing the selection. | |
1856 | */ | |
adaaa686 | 1857 | virtual void Paste(); |
23324ae1 FM |
1858 | |
1859 | /** | |
1860 | Retrieve the point in the window where a position is displayed. | |
1861 | */ | |
1862 | wxPoint PointFromPosition(int pos); | |
1863 | ||
1864 | /** | |
1865 | Given a valid document position, return the next position taking code | |
1866 | page into account. Maximum value returned is the last position in the document. | |
1867 | */ | |
1868 | int PositionAfter(int pos); | |
1869 | ||
1870 | /** | |
1871 | Given a valid document position, return the previous position taking code | |
1872 | page into account. Returns 0 if passed 0. | |
1873 | */ | |
1874 | int PositionBefore(int pos); | |
1875 | ||
1876 | /** | |
1877 | Retrieve the position at the start of a line. | |
1878 | */ | |
adaaa686 | 1879 | int PositionFromLine(int line) const; |
23324ae1 FM |
1880 | |
1881 | /** | |
1882 | Find the position from a point within the window. | |
1883 | */ | |
adaaa686 | 1884 | int PositionFromPoint(wxPoint pt) const; |
23324ae1 FM |
1885 | |
1886 | /** | |
1887 | Find the position from a point within the window but return | |
f549e3da | 1888 | wxSTC_INVALID_POSITION if not close to text. |
23324ae1 FM |
1889 | */ |
1890 | int PositionFromPointClose(int x, int y); | |
1891 | ||
1892 | /** | |
1893 | Redoes the next action on the undo history. | |
1894 | */ | |
adaaa686 | 1895 | virtual void Redo(); |
23324ae1 FM |
1896 | |
1897 | /** | |
1898 | Register an image for use in autocompletion lists. | |
1899 | */ | |
1900 | void RegisterImage(int type, const wxBitmap& bmp); | |
1901 | ||
1902 | /** | |
1903 | Release a reference to the document, deleting document if it fades to black. | |
1904 | */ | |
1905 | void ReleaseDocument(void* docPointer); | |
1906 | ||
1907 | /** | |
1908 | Replace the selected text with the argument text. | |
1909 | */ | |
1910 | void ReplaceSelection(const wxString& text); | |
1911 | ||
1912 | /** | |
1913 | Replace the target text with the argument text. | |
1914 | Text is counted so it can contain NULs. | |
1915 | Returns the length of the replacement text. | |
1916 | */ | |
1917 | int ReplaceTarget(const wxString& text); | |
1918 | ||
1919 | /** | |
4701dc09 | 1920 | Replace the target text with the argument text after d processing. |
23324ae1 | 1921 | Text is counted so it can contain NULs. |
4701dc09 FM |
1922 | |
1923 | Looks for d where d is between 1 and 9 and replaces these with the strings | |
1924 | matched in the last search operation which were surrounded by ( and ). | |
1925 | ||
23324ae1 | 1926 | Returns the length of the replacement text including any change |
4701dc09 | 1927 | caused by processing the d patterns. |
23324ae1 FM |
1928 | */ |
1929 | int ReplaceTargetRE(const wxString& text); | |
1930 | ||
1931 | /** | |
1932 | Write the contents of the editor to filename | |
1933 | */ | |
43c48e1e | 1934 | bool SaveFile(const wxString& file = wxEmptyString, int fileType = wxTEXT_TYPE_ANY); |
23324ae1 FM |
1935 | |
1936 | /** | |
1937 | Scroll enough to make the given column visible | |
1938 | */ | |
1939 | void ScrollToColumn(int column); | |
1940 | ||
1941 | /** | |
1942 | Scroll enough to make the given line visible | |
1943 | */ | |
1944 | void ScrollToLine(int line); | |
1945 | ||
1946 | /** | |
1947 | Sets the current caret position to be the search anchor. | |
1948 | */ | |
1949 | void SearchAnchor(); | |
1950 | ||
1951 | /** | |
1952 | Search for a counted string in the target and set the target to the found | |
1953 | range. Text is counted so it can contain NULs. | |
1954 | Returns length of range or -1 for failure in which case target is not moved. | |
1955 | */ | |
1956 | int SearchInTarget(const wxString& text); | |
1957 | ||
1958 | /** | |
1959 | Find some text starting at the search anchor. | |
1960 | Does not ensure the selection is visible. | |
1961 | */ | |
1962 | int SearchNext(int flags, const wxString& text); | |
1963 | ||
1964 | /** | |
1965 | Find some text starting at the search anchor and moving backwards. | |
1966 | Does not ensure the selection is visible. | |
1967 | */ | |
1968 | int SearchPrev(int flags, const wxString& text); | |
1969 | ||
1970 | /** | |
1971 | Select all the text in the document. | |
1972 | */ | |
adaaa686 | 1973 | virtual void SelectAll(); |
23324ae1 FM |
1974 | |
1975 | /** | |
1976 | Duplicate the selection. If selection empty duplicate the line containing the | |
1977 | caret. | |
1978 | */ | |
1979 | void SelectionDuplicate(); | |
1980 | ||
1981 | /** | |
1982 | Is the selection rectangular? The alternative is the more common stream | |
1983 | selection. | |
1984 | */ | |
adaaa686 | 1985 | bool SelectionIsRectangle() const; |
23324ae1 FM |
1986 | |
1987 | /** | |
1988 | Send a message to Scintilla | |
1989 | */ | |
43c48e1e | 1990 | wxIntPtr SendMsg(int msg, wxUIntPtr wp = 0, wxIntPtr lp = 0) const; |
23324ae1 FM |
1991 | |
1992 | /** | |
1993 | Set the selection anchor to a position. The anchor is the opposite | |
1994 | end of the selection from the caret. | |
1995 | */ | |
1996 | void SetAnchor(int posAnchor); | |
1997 | ||
1998 | /** | |
1999 | Sets whether a backspace pressed when caret is within indentation unindents. | |
2000 | */ | |
2001 | void SetBackSpaceUnIndents(bool bsUnIndents); | |
2002 | ||
2003 | /** | |
2004 | If drawing is buffered then each line of text is drawn into a bitmap buffer | |
2005 | before drawing it to the screen to avoid flicker. | |
2006 | */ | |
2007 | void SetBufferedDraw(bool buffered); | |
2008 | ||
2009 | /** | |
2010 | Set the foreground colour of the caret. | |
2011 | */ | |
2012 | void SetCaretForeground(const wxColour& fore); | |
2013 | ||
2014 | /** | |
2015 | Set background alpha of the caret line. | |
2016 | */ | |
2017 | void SetCaretLineBackAlpha(int alpha); | |
2018 | ||
2019 | /** | |
2020 | Set the colour of the background of the line containing the caret. | |
2021 | */ | |
2022 | void SetCaretLineBackground(const wxColour& back); | |
2023 | ||
2024 | /** | |
2025 | Display the background of the line containing the caret in a different colour. | |
2026 | */ | |
2027 | void SetCaretLineVisible(bool show); | |
2028 | ||
2029 | /** | |
2030 | Get the time in milliseconds that the caret is on and off. 0 = steady on. | |
2031 | */ | |
2032 | void SetCaretPeriod(int periodMilliseconds); | |
2033 | ||
2034 | /** | |
2035 | Stop the caret preferred x position changing when the user types. | |
2036 | */ | |
65d6e39b | 2037 | void SetCaretSticky(int useCaretStickyBehaviour); |
23324ae1 FM |
2038 | |
2039 | /** | |
2040 | Set the width of the insert mode caret. | |
2041 | */ | |
2042 | void SetCaretWidth(int pixelWidth); | |
2043 | ||
2044 | /** | |
2045 | Reset the set of characters for whitespace and word characters to the defaults. | |
2046 | */ | |
2047 | void SetCharsDefault(); | |
2048 | ||
2049 | /** | |
2050 | Set the code page used to interpret the bytes of the document as characters. | |
2051 | */ | |
2052 | void SetCodePage(int codePage); | |
2053 | ||
2054 | /** | |
2055 | Change the way control characters are displayed: | |
2056 | If symbol is 32, keep the drawn way, else, use the given character. | |
2057 | */ | |
2058 | void SetControlCharSymbol(int symbol); | |
2059 | ||
2060 | /** | |
2061 | Sets the position of the caret. | |
2062 | */ | |
2063 | void SetCurrentPos(int pos); | |
2064 | ||
2065 | /** | |
2066 | Change the document object used. | |
2067 | */ | |
2068 | void SetDocPointer(void* docPointer); | |
2069 | ||
2070 | /** | |
2071 | Set the current end of line mode. | |
2072 | */ | |
2073 | void SetEOLMode(int eolMode); | |
2074 | ||
2075 | /** | |
2076 | Change the colour used in edge indication. | |
2077 | */ | |
2078 | void SetEdgeColour(const wxColour& edgeColour); | |
2079 | ||
2080 | /** | |
2081 | Set the column number of the edge. | |
2082 | If text goes past the edge then it is highlighted. | |
2083 | */ | |
2084 | void SetEdgeColumn(int column); | |
2085 | ||
2086 | /** | |
2087 | The edge may be displayed by a line (EDGE_LINE) or by highlighting text that | |
2088 | goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). | |
2089 | */ | |
2090 | void SetEdgeMode(int mode); | |
2091 | ||
2092 | /** | |
2093 | Sets the scroll range so that maximum scroll position has | |
2094 | the last line at the bottom of the view (default). | |
2095 | Setting this to @false allows scrolling one page below the last line. | |
2096 | */ | |
2097 | void SetEndAtLastLine(bool endAtLastLine); | |
2098 | ||
2099 | /** | |
2100 | Show the children of a header line. | |
2101 | */ | |
2102 | void SetFoldExpanded(int line, bool expanded); | |
2103 | ||
2104 | /** | |
2105 | Set some style options for folding. | |
2106 | */ | |
2107 | void SetFoldFlags(int flags); | |
2108 | ||
2109 | /** | |
2110 | Set the fold level of a line. | |
2111 | This encodes an integer level along with flags indicating whether the | |
2112 | line is a header and whether it is effectively white space. | |
2113 | */ | |
2114 | void SetFoldLevel(int line, int level); | |
2115 | ||
2116 | /** | |
2117 | Set the colours used as a chequerboard pattern in the fold margin | |
2118 | */ | |
2119 | void SetFoldMarginColour(bool useSetting, const wxColour& back); | |
2120 | ||
2121 | /** | |
4701dc09 | 2122 | |
23324ae1 FM |
2123 | */ |
2124 | void SetFoldMarginHiColour(bool useSetting, const wxColour& fore); | |
2125 | ||
2126 | /** | |
2127 | Set the horizontal scrollbar to use instead of the ont that's built-in. | |
2128 | */ | |
2129 | void SetHScrollBar(wxScrollBar* bar); | |
2130 | ||
2131 | /** | |
2132 | Set the highlighted indentation guide column. | |
2133 | 0 = no highlighted guide. | |
2134 | */ | |
2135 | void SetHighlightGuide(int column); | |
2136 | ||
2137 | /** | |
2138 | Set a back colour for active hotspots. | |
2139 | */ | |
2140 | void SetHotspotActiveBackground(bool useSetting, | |
2141 | const wxColour& back); | |
2142 | ||
2143 | /** | |
2144 | Set a fore colour for active hotspots. | |
2145 | */ | |
2146 | void SetHotspotActiveForeground(bool useSetting, | |
2147 | const wxColour& fore); | |
2148 | ||
2149 | /** | |
2150 | Enable / Disable underlining active hotspots. | |
2151 | */ | |
2152 | void SetHotspotActiveUnderline(bool underline); | |
2153 | ||
2154 | /** | |
2155 | Limit hotspots to single line so hotspots on two lines don't merge. | |
2156 | */ | |
2157 | void SetHotspotSingleLine(bool singleLine); | |
2158 | ||
2159 | /** | |
2160 | Set the number of spaces used for one level of indentation. | |
2161 | */ | |
2162 | void SetIndent(int indentSize); | |
2163 | ||
2164 | /** | |
2165 | Show or hide indentation guides. | |
2166 | */ | |
43c48e1e | 2167 | void SetIndentationGuides(int indentView); |
23324ae1 FM |
2168 | |
2169 | /** | |
2170 | Set up the key words used by the lexer. | |
2171 | */ | |
2172 | void SetKeyWords(int keywordSet, const wxString& keyWords); | |
2173 | ||
2174 | /** | |
4701dc09 | 2175 | |
23324ae1 FM |
2176 | */ |
2177 | void SetLastKeydownProcessed(bool val); | |
2178 | ||
2179 | /** | |
2180 | Sets the degree of caching of layout information. | |
2181 | */ | |
2182 | void SetLayoutCache(int mode); | |
2183 | ||
2184 | /** | |
2185 | Set the lexing language of the document. | |
2186 | */ | |
2187 | void SetLexer(int lexer); | |
2188 | ||
2189 | /** | |
2190 | Set the lexing language of the document based on string name. | |
2191 | */ | |
2192 | void SetLexerLanguage(const wxString& language); | |
2193 | ||
2194 | /** | |
2195 | Change the indentation of a line to a number of columns. | |
2196 | */ | |
2197 | void SetLineIndentation(int line, int indentSize); | |
2198 | ||
2199 | /** | |
2200 | Used to hold extra styling information for each line. | |
2201 | */ | |
2202 | void SetLineState(int line, int state); | |
2203 | ||
2204 | /** | |
2205 | Sets the size in pixels of the left margin. | |
2206 | */ | |
2207 | void SetMarginLeft(int pixelWidth); | |
2208 | ||
2209 | /** | |
2210 | Set a mask that determines which markers are displayed in a margin. | |
2211 | */ | |
2212 | void SetMarginMask(int margin, int mask); | |
2213 | ||
2214 | /** | |
2215 | Sets the size in pixels of the right margin. | |
2216 | */ | |
2217 | void SetMarginRight(int pixelWidth); | |
2218 | ||
2219 | /** | |
2220 | Make a margin sensitive or insensitive to mouse clicks. | |
2221 | */ | |
2222 | void SetMarginSensitive(int margin, bool sensitive); | |
2223 | ||
2224 | /** | |
2225 | Set a margin to be either numeric or symbolic. | |
2226 | */ | |
2227 | void SetMarginType(int margin, int marginType); | |
2228 | ||
2229 | /** | |
2230 | Set the width of a margin to a width expressed in pixels. | |
2231 | */ | |
2232 | void SetMarginWidth(int margin, int pixelWidth); | |
2233 | ||
65d6e39b RD |
2234 | /** |
2235 | Set the cursor shown when the mouse is inside a margin.' | |
2236 | */ | |
2237 | void SetMarginCursor(int margin, int cursor); | |
2238 | ||
2239 | /** | |
2240 | Retrieve the cursor shown in a margin. | |
2241 | */ | |
2242 | int GetMarginCursor(int margin) const; | |
2243 | ||
23324ae1 FM |
2244 | /** |
2245 | Set the left and right margin in the edit area, measured in pixels. | |
2246 | */ | |
2247 | void SetMargins(int left, int right); | |
2248 | ||
2249 | /** | |
2250 | Set which document modification events are sent to the container. | |
2251 | */ | |
2252 | void SetModEventMask(int mask); | |
2253 | ||
2254 | /** | |
2255 | Set whether the mouse is captured when its button is pressed. | |
2256 | */ | |
2257 | void SetMouseDownCaptures(bool captures); | |
2258 | ||
2259 | /** | |
2260 | Sets the time the mouse must sit still to generate a mouse dwell event. | |
2261 | */ | |
2262 | void SetMouseDwellTime(int periodMilliseconds); | |
2263 | ||
2264 | /** | |
2265 | Set to overtype (@true) or insert mode. | |
2266 | */ | |
2267 | void SetOvertype(bool overtype); | |
2268 | ||
2269 | /** | |
2270 | Enable/Disable convert-on-paste for line endings | |
2271 | */ | |
2272 | void SetPasteConvertEndings(bool convert); | |
2273 | ||
65d6e39b RD |
2274 | /** |
2275 | Change the effect of pasting when there are multiple selections. | |
2276 | */ | |
2277 | void SetMultiPaste(int multiPaste); | |
2278 | ||
2279 | /** | |
2280 | Retrieve the effect of pasting when there are multiple selections.. | |
2281 | */ | |
2282 | int GetMultiPaste() const; | |
2283 | ||
2284 | /** | |
2285 | Retrieve the value of a tag from a regular expression search. | |
2286 | */ | |
2287 | wxString GetTag(int tagNumber) const; | |
2288 | ||
23324ae1 FM |
2289 | /** |
2290 | Modify colours when printing for clearer printed text. | |
2291 | */ | |
2292 | void SetPrintColourMode(int mode); | |
2293 | ||
2294 | /** | |
2295 | Sets the print magnification added to the point size of each style for printing. | |
2296 | */ | |
2297 | void SetPrintMagnification(int magnification); | |
2298 | ||
2299 | /** | |
2300 | Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). | |
2301 | */ | |
2302 | void SetPrintWrapMode(int mode); | |
2303 | ||
2304 | /** | |
2305 | Set up a value that may be used by a lexer for some optional feature. | |
2306 | */ | |
2307 | void SetProperty(const wxString& key, const wxString& value); | |
2308 | ||
2309 | /** | |
2310 | Set to read only or read write. | |
2311 | */ | |
2312 | void SetReadOnly(bool readOnly); | |
2313 | ||
2314 | /** | |
2315 | Sets the cursor to one of the SC_CURSOR* values. | |
2316 | */ | |
2317 | void SetSTCCursor(int cursorType); | |
2318 | ||
2319 | /** | |
2320 | Change internal focus flag. | |
2321 | */ | |
2322 | void SetSTCFocus(bool focus); | |
2323 | ||
2324 | /** | |
2325 | Remember the current position in the undo history as the position | |
2326 | at which the document was saved. | |
2327 | */ | |
2328 | void SetSavePoint(); | |
2329 | ||
2330 | /** | |
2331 | Sets the document width assumed for scrolling. | |
2332 | */ | |
2333 | void SetScrollWidth(int pixelWidth); | |
2334 | ||
2335 | /** | |
2336 | Set the search flags used by SearchInTarget. | |
2337 | */ | |
2338 | void SetSearchFlags(int flags); | |
2339 | ||
2340 | /** | |
2341 | Set the alpha of the selection. | |
2342 | */ | |
2343 | void SetSelAlpha(int alpha); | |
2344 | ||
2345 | /** | |
9e96e16f | 2346 | Set the background colour of the main and additional selections and whether to use this setting. |
23324ae1 FM |
2347 | */ |
2348 | void SetSelBackground(bool useSetting, const wxColour& back); | |
2349 | ||
2350 | /** | |
9e96e16f | 2351 | Set the foreground colour of the main and additional selections and whether to use this setting. |
23324ae1 FM |
2352 | */ |
2353 | void SetSelForeground(bool useSetting, const wxColour& fore); | |
2354 | ||
65d6e39b RD |
2355 | /** |
2356 | Set caret to a position, while removing any existing selection. | |
2357 | */ | |
2358 | void SetEmptySelection(int pos); | |
2359 | ||
23324ae1 FM |
2360 | /** |
2361 | Select a range of text. | |
2362 | */ | |
43c48e1e | 2363 | virtual void SetSelection(long from, long to); |
23324ae1 FM |
2364 | |
2365 | /** | |
2366 | Sets the position that ends the selection - this becomes the currentPosition. | |
2367 | */ | |
2368 | void SetSelectionEnd(int pos); | |
2369 | ||
2370 | /** | |
9e96e16f RD |
2371 | Set the selection mode to stream (wxSTC_SEL_STREAM) or rectangular |
2372 | (wxSTC_SEL_RECTANGLE/wxSTC_SEL_THIN) or by lines (wxSTC_SEL_LINES). | |
23324ae1 FM |
2373 | */ |
2374 | void SetSelectionMode(int mode); | |
2375 | ||
2376 | /** | |
2377 | Sets the position that starts the selection - this becomes the anchor. | |
2378 | */ | |
2379 | void SetSelectionStart(int pos); | |
2380 | ||
2381 | /** | |
2382 | Change error status - 0 = OK. | |
2383 | */ | |
2384 | void SetStatus(int statusCode); | |
2385 | ||
2386 | /** | |
2387 | Divide each styling byte into lexical class bits (default: 5) and indicator | |
2388 | bits (default: 3). If a lexer requires more than 32 lexical states, then this | |
2389 | is used to expand the possible states. | |
2390 | */ | |
2391 | void SetStyleBits(int bits); | |
2392 | ||
2393 | /** | |
2394 | Set the styles for a segment of the document. | |
2395 | */ | |
2396 | void SetStyleBytes(int length, char* styleBytes); | |
2397 | ||
2398 | /** | |
2399 | Change style from current styling position for length characters to a style | |
2400 | and move the current styling position to after this newly styled segment. | |
2401 | */ | |
2402 | void SetStyling(int length, int style); | |
2403 | ||
2404 | /** | |
2405 | Sets whether a tab pressed when caret is within indentation indents. | |
2406 | */ | |
2407 | void SetTabIndents(bool tabIndents); | |
2408 | ||
2409 | /** | |
2410 | Change the visible size of a tab to be a multiple of the width of a space | |
2411 | character. | |
2412 | */ | |
2413 | void SetTabWidth(int tabWidth); | |
2414 | ||
2415 | /** | |
2416 | Sets the position that ends the target which is used for updating the | |
2417 | document without affecting the scroll position. | |
2418 | */ | |
2419 | void SetTargetEnd(int pos); | |
2420 | ||
2421 | /** | |
2422 | Sets the position that starts the target which is used for updating the | |
2423 | document without affecting the scroll position. | |
2424 | */ | |
2425 | void SetTargetStart(int pos); | |
2426 | ||
2427 | /** | |
2428 | Replace the contents of the document with the argument text. | |
2429 | */ | |
2430 | void SetText(const wxString& text); | |
2431 | ||
2432 | /** | |
2433 | Replace the contents of the document with the argument text. | |
2434 | */ | |
2435 | void SetTextRaw(const char* text); | |
2436 | ||
2437 | /** | |
2438 | In twoPhaseDraw mode, drawing is performed in two phases, first the background | |
2439 | and then the foreground. This avoids chopping off characters that overlap the | |
2440 | next run. | |
2441 | */ | |
2442 | void SetTwoPhaseDraw(bool twoPhase); | |
2443 | ||
2444 | /** | |
2445 | Choose between collecting actions into the undo | |
2446 | history and discarding them. | |
2447 | */ | |
2448 | void SetUndoCollection(bool collectUndo); | |
2449 | ||
2450 | /** | |
2451 | Specify whether anti-aliased fonts should be used. Will have no effect | |
2452 | on some platforms, but on some (wxMac for example) can greatly improve | |
2453 | performance. | |
2454 | */ | |
2455 | void SetUseAntiAliasing(bool useAA); | |
2456 | ||
2457 | /** | |
2458 | Show or hide the horizontal scroll bar. | |
2459 | */ | |
2460 | void SetUseHorizontalScrollBar(bool show); | |
2461 | ||
2462 | /** | |
2463 | Indentation will only use space characters if useTabs is @false, otherwise | |
2464 | it will use a combination of tabs and spaces. | |
2465 | */ | |
2466 | void SetUseTabs(bool useTabs); | |
2467 | ||
2468 | /** | |
2469 | Show or hide the vertical scroll bar. | |
2470 | */ | |
2471 | void SetUseVerticalScrollBar(bool show); | |
2472 | ||
2473 | /** | |
2474 | Set the vertical scrollbar to use instead of the ont that's built-in. | |
2475 | */ | |
2476 | void SetVScrollBar(wxScrollBar* bar); | |
2477 | ||
2478 | /** | |
2479 | Make the end of line characters visible or invisible. | |
2480 | */ | |
2481 | void SetViewEOL(bool visible); | |
2482 | ||
2483 | /** | |
2484 | Make white space characters invisible, always visible or visible outside | |
2485 | indentation. | |
2486 | */ | |
2487 | void SetViewWhiteSpace(int viewWS); | |
2488 | ||
2489 | /** | |
2490 | Set the way the display area is determined when a particular line | |
2491 | is to be moved to by Find, FindNext, GotoLine, etc. | |
2492 | */ | |
2493 | void SetVisiblePolicy(int visiblePolicy, int visibleSlop); | |
2494 | ||
2495 | /** | |
2496 | Set the background colour of all whitespace and whether to use this setting. | |
2497 | */ | |
2498 | void SetWhitespaceBackground(bool useSetting, | |
2499 | const wxColour& back); | |
2500 | ||
2501 | /** | |
2502 | Set the set of characters making up whitespace for when moving or selecting by | |
2503 | word. | |
2504 | Should be called after SetWordChars. | |
2505 | */ | |
2506 | void SetWhitespaceChars(const wxString& characters); | |
2507 | ||
65d6e39b RD |
2508 | /** |
2509 | Get the set of characters making up whitespace for when moving or selecting by word. | |
2510 | */ | |
2511 | wxString GetWhitespaceChars() const; | |
2512 | ||
2513 | /** | |
2514 | Set the set of characters making up punctuation characters. Should be called after SetWordChars. | |
2515 | */ | |
2516 | void SetPunctuationChars(const wxString& characters); | |
2517 | ||
2518 | /** | |
2519 | Get the set of characters making up punctuation characters | |
2520 | */ | |
2521 | wxString GetPunctuationChars() const; | |
2522 | ||
23324ae1 FM |
2523 | /** |
2524 | Set the foreground colour of all whitespace and whether to use this setting. | |
2525 | */ | |
2526 | void SetWhitespaceForeground(bool useSetting, | |
2527 | const wxColour& fore); | |
2528 | ||
9e96e16f RD |
2529 | /** |
2530 | Set the size of the dots used to mark space characters. | |
2531 | */ | |
2532 | void SetWhitespaceSize(int size); | |
2533 | ||
2534 | /** | |
2535 | Get the size of the dots used to mark space characters. | |
2536 | */ | |
2537 | int GetWhitespaceSize() const; | |
2538 | ||
2539 | ||
23324ae1 FM |
2540 | /** |
2541 | Set the set of characters making up words for when moving or selecting by word. | |
9e96e16f | 2542 | First sets defaults like SetCharsDefault. |
23324ae1 FM |
2543 | */ |
2544 | void SetWordChars(const wxString& characters); | |
2545 | ||
65d6e39b RD |
2546 | /** |
2547 | Get the set of characters making up words for when moving or selecting by word. | |
2548 | */ | |
2549 | wxString GetWordChars() const; | |
2550 | ||
23324ae1 FM |
2551 | /** |
2552 | Sets whether text is word wrapped. | |
2553 | */ | |
2554 | void SetWrapMode(int mode); | |
2555 | ||
2556 | /** | |
2557 | Set the start indent for wrapped lines. | |
2558 | */ | |
2559 | void SetWrapStartIndent(int indent); | |
2560 | ||
2561 | /** | |
2562 | Set the display mode of visual flags for wrapped lines. | |
2563 | */ | |
2564 | void SetWrapVisualFlags(int wrapVisualFlags); | |
2565 | ||
2566 | /** | |
2567 | Set the location of visual flags for wrapped lines. | |
2568 | */ | |
2569 | void SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation); | |
2570 | ||
2571 | /** | |
2572 | Set the way the caret is kept visible when going sideway. | |
2573 | The exclusion zone is given in pixels. | |
2574 | */ | |
2575 | void SetXCaretPolicy(int caretPolicy, int caretSlop); | |
2576 | ||
2577 | /** | |
57ab6f23 | 2578 | Get and Set the xOffset (ie, horizontal scroll position). |
23324ae1 FM |
2579 | */ |
2580 | void SetXOffset(int newOffset); | |
2581 | ||
2582 | /** | |
2583 | Set the way the line the caret is on is kept visible. | |
2584 | The exclusion zone is given in lines. | |
2585 | */ | |
2586 | void SetYCaretPolicy(int caretPolicy, int caretSlop); | |
2587 | ||
2588 | /** | |
2589 | Set the zoom level. This number of points is added to the size of all fonts. | |
2590 | It may be positive to magnify or negative to reduce. | |
2591 | */ | |
2592 | void SetZoom(int zoom); | |
2593 | ||
2594 | /** | |
2595 | Make a range of lines visible. | |
2596 | */ | |
2597 | void ShowLines(int lineStart, int lineEnd); | |
2598 | ||
2599 | /** | |
2600 | Start notifying the container of all key presses and commands. | |
2601 | */ | |
2602 | void StartRecord(); | |
2603 | ||
2604 | /** | |
2605 | Set the current styling position to pos and the styling mask to mask. | |
2606 | The styling mask can be used to protect some bits in each styling byte from | |
2607 | modification. | |
2608 | */ | |
2609 | void StartStyling(int pos, int mask); | |
2610 | ||
2611 | /** | |
2612 | Stop notifying the container of all key presses and commands. | |
2613 | */ | |
2614 | void StopRecord(); | |
2615 | ||
2616 | /** | |
2617 | Move caret to bottom of page, or one page down if already at bottom of page. | |
2618 | */ | |
2619 | void StutteredPageDown(); | |
2620 | ||
2621 | /** | |
2622 | Move caret to bottom of page, or one page down if already at bottom of page, | |
2623 | extending selection to new caret position. | |
2624 | */ | |
2625 | void StutteredPageDownExtend(); | |
2626 | ||
2627 | /** | |
2628 | Move caret to top of page, or one page up if already at top of page. | |
2629 | */ | |
2630 | void StutteredPageUp(); | |
2631 | ||
2632 | /** | |
2633 | Move caret to top of page, or one page up if already at top of page, extending | |
2634 | selection to new caret position. | |
2635 | */ | |
2636 | void StutteredPageUpExtend(); | |
2637 | ||
2638 | /** | |
2639 | Clear all the styles and make equivalent to the global default style. | |
2640 | */ | |
2641 | void StyleClearAll(); | |
2642 | ||
2643 | /** | |
2644 | Reset the default style to its state at startup | |
2645 | */ | |
2646 | void StyleResetDefault(); | |
2647 | ||
2648 | /** | |
2649 | Set the background colour of a style. | |
2650 | */ | |
2651 | void StyleSetBackground(int style, const wxColour& back); | |
2652 | ||
2653 | /** | |
2654 | Set a style to be bold or not. | |
2655 | */ | |
2656 | void StyleSetBold(int style, bool bold); | |
2657 | ||
2658 | /** | |
2659 | Set a style to be mixed case, or to force upper or lower case. | |
2660 | */ | |
2661 | void StyleSetCase(int style, int caseForce); | |
2662 | ||
2663 | /** | |
2664 | Set a style to be changeable or not (read only). | |
2665 | Experimental feature, currently buggy. | |
2666 | */ | |
2667 | void StyleSetChangeable(int style, bool changeable); | |
2668 | ||
2669 | /** | |
2670 | Set the character set of the font in a style. Converts the Scintilla | |
2671 | character set values to a wxFontEncoding. | |
2672 | */ | |
2673 | void StyleSetCharacterSet(int style, int characterSet); | |
2674 | ||
2675 | /** | |
2676 | Set a style to have its end of line filled or not. | |
2677 | */ | |
2678 | void StyleSetEOLFilled(int style, bool filled); | |
2679 | ||
2680 | /** | |
2681 | Set the font of a style. | |
2682 | */ | |
2683 | void StyleSetFaceName(int style, const wxString& fontName); | |
2684 | ||
2685 | /** | |
2686 | Set style size, face, bold, italic, and underline attributes from | |
2687 | a wxFont's attributes. | |
2688 | */ | |
2689 | void StyleSetFont(int styleNum, wxFont& font); | |
2690 | ||
2691 | /** | |
2692 | Set all font style attributes at once. | |
2693 | */ | |
2694 | void StyleSetFontAttr(int styleNum, int size, | |
2695 | const wxString& faceName, | |
2696 | bool bold, | |
2697 | bool italic, | |
2698 | bool underline, | |
2699 | wxFontEncoding encoding = wxFONTENCODING_DEFAULT); | |
2700 | ||
2701 | /** | |
2702 | Set the font encoding to be used by a style. | |
2703 | */ | |
2704 | void StyleSetFontEncoding(int style, wxFontEncoding encoding); | |
2705 | ||
2706 | /** | |
2707 | Set the foreground colour of a style. | |
2708 | */ | |
2709 | void StyleSetForeground(int style, const wxColour& fore); | |
2710 | ||
2711 | /** | |
2712 | Set a style to be a hotspot or not. | |
2713 | */ | |
2714 | void StyleSetHotSpot(int style, bool hotspot); | |
2715 | ||
2716 | /** | |
2717 | Set a style to be italic or not. | |
2718 | */ | |
2719 | void StyleSetItalic(int style, bool italic); | |
2720 | ||
2721 | /** | |
2722 | Set the size of characters of a style. | |
2723 | */ | |
2724 | void StyleSetSize(int style, int sizePoints); | |
2725 | ||
65d6e39b RD |
2726 | /** |
2727 | Set the size of characters of a style. Size is in points multiplied by 100. | |
2728 | */ | |
2729 | void StyleSetSizeFractional(int style, int caseForce); | |
2730 | ||
2731 | /** | |
2732 | Get the size of characters of a style in points multiplied by 100 | |
2733 | */ | |
2734 | int StyleGetSizeFractional(int style) const; | |
2735 | ||
2736 | /** | |
2737 | Set the weight of characters of a style. | |
2738 | */ | |
2739 | void StyleSetWeight(int style, int weight); | |
2740 | ||
2741 | /** | |
2742 | *Get the weight of characters of a style. | |
2743 | */ | |
2744 | int StyleGetWeight(int style) const; | |
2745 | ||
2746 | ||
23324ae1 FM |
2747 | /** |
2748 | Extract style settings from a spec-string which is composed of one or | |
2749 | more of the following comma separated elements: | |
2750 | bold turns on bold | |
2751 | italic turns on italics | |
3f5506cf RR |
2752 | fore:[name or \#RRGGBB] sets the foreground colour |
2753 | back:[name or \#RRGGBB] sets the background colour | |
23324ae1 FM |
2754 | face:[facename] sets the font face name to use |
2755 | size:[num] sets the font size in points | |
2756 | eol turns on eol filling | |
2757 | underline turns on underlining | |
2758 | */ | |
2759 | void StyleSetSpec(int styleNum, const wxString& spec); | |
2760 | ||
2761 | /** | |
2762 | Set a style to be underlined or not. | |
2763 | */ | |
2764 | void StyleSetUnderline(int style, bool underline); | |
2765 | ||
2766 | /** | |
2767 | Set a style to be visible or not. | |
2768 | */ | |
2769 | void StyleSetVisible(int style, bool visible); | |
2770 | ||
2771 | /** | |
2772 | If selection is empty or all on one line replace the selection with a tab | |
2773 | character. | |
2774 | If more than one line selected, indent the lines. | |
2775 | */ | |
4cc4bfaf | 2776 | void Tab(); |
23324ae1 FM |
2777 | |
2778 | /** | |
2779 | Make the target range start and end be the same as the selection range start | |
2780 | and end. | |
2781 | */ | |
2782 | void TargetFromSelection(); | |
2783 | ||
2784 | /** | |
2785 | Retrieve the height of a particular line of text in pixels. | |
2786 | */ | |
2787 | int TextHeight(int line); | |
2788 | ||
2789 | /** | |
2790 | Measure the pixel width of some text in a particular style. | |
2791 | NUL terminated text argument. | |
2792 | Does not handle tab or control characters. | |
2793 | */ | |
2794 | int TextWidth(int style, const wxString& text); | |
2795 | ||
2796 | /** | |
2797 | Switch between sticky and non-sticky: meant to be bound to a key. | |
2798 | */ | |
2799 | void ToggleCaretSticky(); | |
2800 | ||
2801 | /** | |
2802 | Switch a header line between expanded and contracted. | |
2803 | */ | |
2804 | void ToggleFold(int line); | |
2805 | ||
2806 | /** | |
2807 | Undo one action in the undo history. | |
2808 | */ | |
adaaa686 | 2809 | virtual void Undo(); |
23324ae1 FM |
2810 | |
2811 | /** | |
2812 | Transform the selection to upper case. | |
2813 | */ | |
2814 | void UpperCase(); | |
2815 | ||
2816 | /** | |
2817 | Set whether a pop up menu is displayed automatically when the user presses | |
2818 | the wrong mouse button. | |
2819 | */ | |
2820 | void UsePopUp(bool allowPopUp); | |
2821 | ||
2822 | /** | |
2823 | Display a list of strings and send notification when user chooses one. | |
2824 | */ | |
2825 | void UserListShow(int listType, const wxString& itemList); | |
2826 | ||
2827 | /** | |
2828 | Move caret to before first visible character on line. | |
2829 | If already there move to first character on line. | |
2830 | */ | |
2831 | void VCHome(); | |
2832 | ||
2833 | /** | |
2834 | Like VCHome but extending selection to new caret position. | |
2835 | */ | |
2836 | void VCHomeExtend(); | |
2837 | ||
2838 | /** | |
2839 | Move caret to before first visible character on line. | |
2840 | If already there move to first character on line. | |
2841 | In either case, extend rectangular selection to new caret position. | |
2842 | */ | |
2843 | void VCHomeRectExtend(); | |
2844 | ||
2845 | /** | |
4701dc09 | 2846 | |
23324ae1 FM |
2847 | */ |
2848 | void VCHomeWrap(); | |
2849 | ||
2850 | /** | |
4701dc09 | 2851 | |
23324ae1 FM |
2852 | */ |
2853 | void VCHomeWrapExtend(); | |
2854 | ||
2855 | /** | |
2856 | Find the display line of a document line taking hidden lines into account. | |
2857 | */ | |
2858 | int VisibleFromDocLine(int line); | |
2859 | ||
2860 | /** | |
2861 | Get position of end of word. | |
2862 | */ | |
2863 | int WordEndPosition(int pos, bool onlyWordCharacters); | |
2864 | ||
2865 | /** | |
2866 | Move caret left one word. | |
2867 | */ | |
2868 | void WordLeft(); | |
2869 | ||
2870 | /** | |
2871 | Move caret left one word, position cursor at end of word. | |
2872 | */ | |
2873 | void WordLeftEnd(); | |
2874 | ||
2875 | /** | |
2876 | Move caret left one word, position cursor at end of word, extending selection | |
2877 | to new caret position. | |
2878 | */ | |
2879 | void WordLeftEndExtend(); | |
2880 | ||
2881 | /** | |
2882 | Move caret left one word extending selection to new caret position. | |
2883 | */ | |
2884 | void WordLeftExtend(); | |
2885 | ||
2886 | /** | |
2887 | Move to the previous change in capitalisation. | |
2888 | */ | |
2889 | void WordPartLeft(); | |
2890 | ||
2891 | /** | |
2892 | Move to the previous change in capitalisation extending selection | |
2893 | to new caret position. | |
2894 | */ | |
2895 | void WordPartLeftExtend(); | |
2896 | ||
2897 | /** | |
2898 | Move to the change next in capitalisation. | |
2899 | */ | |
2900 | void WordPartRight(); | |
2901 | ||
2902 | /** | |
2903 | Move to the next change in capitalisation extending selection | |
2904 | to new caret position. | |
2905 | */ | |
2906 | void WordPartRightExtend(); | |
2907 | ||
2908 | /** | |
2909 | Move caret right one word. | |
2910 | */ | |
2911 | void WordRight(); | |
2912 | ||
2913 | /** | |
2914 | Move caret right one word, position cursor at end of word. | |
2915 | */ | |
2916 | void WordRightEnd(); | |
2917 | ||
2918 | /** | |
2919 | Move caret right one word, position cursor at end of word, extending selection | |
2920 | to new caret position. | |
2921 | */ | |
2922 | void WordRightEndExtend(); | |
2923 | ||
2924 | /** | |
2925 | Move caret right one word extending selection to new caret position. | |
2926 | */ | |
2927 | void WordRightExtend(); | |
2928 | ||
2929 | /** | |
2930 | Get position of start of word. | |
2931 | */ | |
2932 | int WordStartPosition(int pos, bool onlyWordCharacters); | |
2933 | ||
2934 | /** | |
2935 | The number of display lines needed to wrap a document line | |
2936 | */ | |
2937 | int WrapCount(int line); | |
2938 | ||
2939 | /** | |
2940 | Magnify the displayed text by increasing the sizes by 1 point. | |
2941 | */ | |
2942 | void ZoomIn(); | |
2943 | ||
2944 | /** | |
2945 | Make the displayed text smaller by decreasing the sizes by 1 point. | |
2946 | */ | |
2947 | void ZoomOut(); | |
9e96e16f RD |
2948 | |
2949 | ||
9e96e16f RD |
2950 | /** |
2951 | Sets how wrapped sublines are placed. Default is fixed. | |
2952 | */ | |
2953 | void SetWrapIndentMode(int mode); | |
2954 | ||
2955 | /** | |
2956 | Retrieve how wrapped sublines are placed. Default is fixed. | |
2957 | */ | |
2958 | int GetWrapIndentMode() const; | |
2959 | ||
2960 | /** | |
2961 | Scroll so that a display line is at the top of the display. | |
2962 | */ | |
2963 | void SetFirstVisibleLine(int lineDisplay); | |
2964 | ||
2965 | ||
2966 | ||
2967 | /** | |
2968 | Copy the selection, if selection empty copy the line with the caret | |
2969 | */ | |
2970 | void CopyAllowLine(); | |
2971 | ||
2972 | /** | |
2973 | Compact the document buffer and return a read-only pointer to the | |
2974 | characters in the document. | |
2975 | */ | |
2976 | const char* GetCharacterPointer(); | |
2977 | ||
65d6e39b RD |
2978 | /** |
2979 | Return a read-only pointer to a range of characters in the document. | |
2980 | May move the gap so that the range is contiguous, but will only move up | |
2981 | to rangeLength bytes. | |
2982 | */ | |
2983 | const char* GetRangePointer(int position, int rangeLength) const; | |
2984 | ||
2985 | /** | |
2986 | Return a position which, to avoid performance costs, should not be within | |
2987 | the range of a call to GetRangePointer. | |
2988 | */ | |
2989 | int GetGapPosition() const; | |
2990 | ||
9e96e16f RD |
2991 | /** |
2992 | Always interpret keyboard input as Unicode | |
2993 | */ | |
2994 | void SetKeysUnicode(bool keysUnicode); | |
2995 | ||
2996 | /** | |
2997 | Are keys always interpreted as Unicode? | |
2998 | */ | |
2999 | bool GetKeysUnicode() const; | |
3000 | ||
3001 | /** | |
3002 | Set the alpha fill colour of the given indicator. | |
3003 | */ | |
3004 | void IndicatorSetAlpha(int indicator, int alpha); | |
3005 | ||
3006 | /** | |
3007 | Get the alpha fill colour of the given indicator. | |
3008 | */ | |
3009 | int IndicatorGetAlpha(int indicator) const; | |
3010 | ||
65d6e39b RD |
3011 | /** |
3012 | Set the alpha outline colour of the given indicator. | |
3013 | */ | |
3014 | void IndicatorSetOutlineAlpha(int indicator, int alpha); | |
3015 | ||
3016 | /** | |
3017 | Get the alpha outline colour of the given indicator. | |
3018 | */ | |
3019 | int IndicatorGetOutlineAlpha(int indicator) const; | |
3020 | ||
9e96e16f RD |
3021 | /** |
3022 | Set extra ascent for each line | |
3023 | */ | |
3024 | void SetExtraAscent(int extraAscent); | |
3025 | ||
3026 | /** | |
3027 | Get extra ascent for each line | |
3028 | */ | |
3029 | int GetExtraAscent() const; | |
3030 | ||
3031 | /** | |
3032 | Set extra descent for each line | |
3033 | */ | |
3034 | void SetExtraDescent(int extraDescent); | |
3035 | ||
3036 | /** | |
3037 | Get extra descent for each line | |
3038 | */ | |
3039 | int GetExtraDescent() const; | |
3040 | ||
3041 | /** | |
3042 | Which symbol was defined for markerNumber with MarkerDefine | |
3043 | */ | |
3044 | int GetMarkerSymbolDefined(int markerNumber); | |
3045 | ||
3046 | /** | |
3047 | Set the text in the text margin for a line | |
3048 | */ | |
3049 | void MarginSetText(int line, const wxString& text); | |
3050 | ||
3051 | /** | |
3052 | Get the text in the text margin for a line | |
3053 | */ | |
3054 | wxString MarginGetText(int line) const; | |
3055 | ||
3056 | /** | |
3057 | Set the style number for the text margin for a line | |
3058 | */ | |
3059 | void MarginSetStyle(int line, int style); | |
3060 | ||
3061 | /** | |
3062 | Get the style number for the text margin for a line | |
3063 | */ | |
3064 | int MarginGetStyle(int line) const; | |
3065 | ||
3066 | /** | |
3067 | Set the style in the text margin for a line | |
3068 | */ | |
3069 | void MarginSetStyles(int line, const wxString& styles); | |
3070 | ||
3071 | /** | |
3072 | Get the styles in the text margin for a line | |
3073 | */ | |
3074 | wxString MarginGetStyles(int line) const; | |
3075 | ||
3076 | /** | |
3077 | Clear the margin text on all lines | |
3078 | */ | |
3079 | void MarginTextClearAll(); | |
3080 | ||
3081 | /** | |
3082 | Get the start of the range of style numbers used for margin text | |
3083 | */ | |
3084 | void MarginSetStyleOffset(int style); | |
3085 | ||
3086 | /** | |
3087 | Get the start of the range of style numbers used for margin text | |
3088 | */ | |
3089 | int MarginGetStyleOffset() const; | |
3090 | ||
65d6e39b RD |
3091 | /** |
3092 | Set the margin options. | |
3093 | */ | |
3094 | void SetMarginOptions(int marginOptions); | |
3095 | ||
3096 | /** | |
3097 | Get the margin options. | |
3098 | */ | |
3099 | int GetMarginOptions() const; | |
3100 | ||
9e96e16f RD |
3101 | /** |
3102 | Set the annotation text for a line | |
3103 | */ | |
3104 | void AnnotationSetText(int line, const wxString& text); | |
3105 | ||
3106 | /** | |
3107 | Get the annotation text for a line | |
3108 | */ | |
3109 | wxString AnnotationGetText(int line) const; | |
3110 | ||
3111 | /** | |
3112 | Set the style number for the annotations for a line | |
3113 | */ | |
3114 | void AnnotationSetStyle(int line, int style); | |
3115 | ||
3116 | /** | |
3117 | Get the style number for the annotations for a line | |
3118 | */ | |
3119 | int AnnotationGetStyle(int line) const; | |
3120 | ||
3121 | /** | |
3122 | Set the annotation styles for a line | |
3123 | */ | |
3124 | void AnnotationSetStyles(int line, const wxString& styles); | |
3125 | ||
3126 | /** | |
3127 | Get the annotation styles for a line | |
3128 | */ | |
3129 | wxString AnnotationGetStyles(int line) const; | |
3130 | ||
3131 | /** | |
3132 | Get the number of annotation lines for a line | |
3133 | */ | |
3134 | int AnnotationGetLines(int line) const; | |
3135 | ||
3136 | /** | |
3137 | Clear the annotations from all lines | |
3138 | */ | |
3139 | void AnnotationClearAll(); | |
3140 | ||
3141 | /** | |
3142 | Set the visibility for the annotations for a view | |
3143 | */ | |
3144 | void AnnotationSetVisible(int visible); | |
3145 | ||
3146 | /** | |
3147 | Get the visibility for the annotations for a view | |
3148 | */ | |
3149 | int AnnotationGetVisible() const; | |
3150 | ||
3151 | /** | |
3152 | Get the start of the range of style numbers used for annotations | |
3153 | */ | |
3154 | void AnnotationSetStyleOffset(int style); | |
3155 | ||
3156 | /** | |
3157 | Get the start of the range of style numbers used for annotations | |
3158 | */ | |
3159 | int AnnotationGetStyleOffset() const; | |
3160 | ||
3161 | /** | |
3162 | Add a container action to the undo stack | |
3163 | */ | |
3164 | void AddUndoAction(int token, int flags); | |
3165 | ||
3166 | /** | |
3167 | Find the position of a character from a point within the window. | |
3168 | */ | |
3169 | int CharPositionFromPoint(int x, int y); | |
3170 | ||
3171 | /** | |
3172 | Find the position of a character from a point within the window. | |
f549e3da | 3173 | Return wxSTC_INVALID_POSITION if not close to text. |
9e96e16f RD |
3174 | */ |
3175 | int CharPositionFromPointClose(int x, int y); | |
3176 | ||
3177 | /** | |
3178 | Set whether multiple selections can be made | |
3179 | */ | |
3180 | void SetMultipleSelection(bool multipleSelection); | |
3181 | ||
3182 | /** | |
3183 | Whether multiple selections can be made | |
3184 | */ | |
3185 | bool GetMultipleSelection() const; | |
3186 | ||
3187 | /** | |
3188 | Set whether typing can be performed into multiple selections | |
3189 | */ | |
3190 | void SetAdditionalSelectionTyping(bool additionalSelectionTyping); | |
3191 | ||
3192 | /** | |
3193 | Whether typing can be performed into multiple selections | |
3194 | */ | |
3195 | bool GetAdditionalSelectionTyping() const; | |
3196 | ||
3197 | /** | |
3198 | Set whether additional carets will blink | |
3199 | */ | |
3200 | void SetAdditionalCaretsBlink(bool additionalCaretsBlink); | |
3201 | ||
3202 | /** | |
3203 | Whether additional carets will blink | |
3204 | */ | |
3205 | bool GetAdditionalCaretsBlink() const; | |
3206 | ||
3207 | /** | |
3208 | Set whether additional carets are visible | |
3209 | */ | |
3210 | void SetAdditionalCaretsVisible(bool additionalCaretsBlink); | |
3211 | ||
3212 | /** | |
3213 | Whether additional carets are visible | |
3214 | */ | |
3215 | bool GetAdditionalCaretsVisible() const; | |
3216 | ||
3217 | /** | |
3218 | How many selections are there? | |
3219 | */ | |
3220 | int GetSelections() const; | |
3221 | ||
3222 | /** | |
3223 | Clear selections to a single empty stream selection | |
3224 | */ | |
3225 | void ClearSelections(); | |
3226 | ||
3227 | /** | |
3228 | Add a selection | |
3229 | */ | |
3230 | int AddSelection(int caret, int anchor); | |
3231 | ||
3232 | /** | |
3233 | Set the main selection | |
3234 | */ | |
3235 | void SetMainSelection(int selection); | |
3236 | ||
3237 | /** | |
3238 | Which selection is the main selection | |
3239 | */ | |
3240 | int GetMainSelection() const; | |
3241 | ||
3242 | void SetSelectionNCaret(int selection, int pos); | |
3243 | int GetSelectionNCaret(int selection) const; | |
3244 | void SetSelectionNAnchor(int selection, int posAnchor); | |
3245 | int GetSelectionNAnchor(int selection) const; | |
3246 | void SetSelectionNCaretVirtualSpace(int selection, int space); | |
3247 | int GetSelectionNCaretVirtualSpace(int selection) const; | |
3248 | void SetSelectionNAnchorVirtualSpace(int selection, int space); | |
3249 | int GetSelectionNAnchorVirtualSpace(int selection) const; | |
3250 | ||
3251 | /** | |
3252 | Sets the position that starts the selection - this becomes the anchor. | |
3253 | */ | |
3254 | void SetSelectionNStart(int selection, int pos); | |
3255 | ||
3256 | /** | |
3257 | Returns the position at the start of the selection. | |
3258 | */ | |
3259 | int GetSelectionNStart(int selection) const; | |
3260 | ||
3261 | /** | |
3262 | Sets the position that ends the selection - this becomes the currentPosition. | |
3263 | */ | |
3264 | void SetSelectionNEnd(int selection, int pos); | |
3265 | ||
3266 | /** | |
3267 | Returns the position at the end of the selection. | |
3268 | */ | |
3269 | int GetSelectionNEnd(int selection) const; | |
3270 | ||
3271 | void SetRectangularSelectionCaret(int pos); | |
3272 | int GetRectangularSelectionCaret() const; | |
3273 | void SetRectangularSelectionAnchor(int posAnchor); | |
3274 | int GetRectangularSelectionAnchor() const; | |
3275 | void SetRectangularSelectionCaretVirtualSpace(int space); | |
3276 | int GetRectangularSelectionCaretVirtualSpace() const; | |
3277 | void SetRectangularSelectionAnchorVirtualSpace(int space); | |
3278 | int GetRectangularSelectionAnchorVirtualSpace() const; | |
3279 | void SetVirtualSpaceOptions(int virtualSpaceOptions); | |
3280 | int GetVirtualSpaceOptions() const; | |
3281 | ||
3282 | /** | |
3283 | Select the modifier key to use for mouse-based rectangular selection. | |
3284 | */ | |
3285 | void SetRectangularSelectionModifier(int modifier); | |
3286 | ||
3287 | /** | |
3288 | Get the modifier key used for rectangular selection. | |
3289 | */ | |
3290 | int GetRectangularSelectionModifier() const; | |
3291 | ||
3292 | /** | |
3293 | Set the foreground colour of additional selections. Must have | |
3294 | previously called SetSelFore with non-zero first argument for this to | |
3295 | have an effect. | |
3296 | */ | |
3297 | void SetAdditionalSelForeground(const wxColour& fore); | |
3298 | ||
3299 | /** | |
3300 | Set the background colour of additional selections. Must have | |
3301 | previously called SetSelBack with non-zero first argument for this to | |
3302 | have an effect. | |
3303 | */ | |
3304 | void SetAdditionalSelBackground(const wxColour& back); | |
3305 | ||
3306 | /** | |
3307 | Set the alpha of the selection. | |
3308 | */ | |
3309 | void SetAdditionalSelAlpha(int alpha); | |
3310 | ||
3311 | /** | |
3312 | Get the alpha of the selection. | |
3313 | */ | |
3314 | int GetAdditionalSelAlpha() const; | |
3315 | ||
3316 | /** | |
3317 | Set the foreground colour of additional carets. | |
3318 | */ | |
3319 | void SetAdditionalCaretForeground(const wxColour& fore); | |
3320 | ||
3321 | /** | |
3322 | Get the foreground colour of additional carets. | |
3323 | */ | |
3324 | wxColour GetAdditionalCaretForeground() const; | |
3325 | ||
3326 | /** | |
3327 | Set the main selection to the next selection. | |
3328 | */ | |
3329 | void RotateSelection(); | |
3330 | ||
3331 | /** | |
3332 | Swap that caret and anchor of the main selection. | |
3333 | */ | |
3334 | void SwapMainAnchorCaret(); | |
65d6e39b RD |
3335 | |
3336 | /** | |
3337 | Indicate that the internal state of a lexer has changed over a range and therefore | |
3338 | there may be a need to redraw. | |
3339 | */ | |
3340 | int ChangeLexerState(int start, int end); | |
3341 | ||
3342 | /** | |
3343 | Find the next line at or after lineStart that is a contracted fold header line. | |
3344 | Return -1 when no more lines. | |
3345 | */ | |
3346 | int ContractedFoldNext(int lineStart); | |
3347 | ||
3348 | /** | |
3349 | Centre current line in window. | |
3350 | */ | |
3351 | void VerticalCentreCaret(); | |
3352 | ||
3353 | /** | |
3354 | Move the selected lines up one line, shifting the line above after the selection | |
3355 | */ | |
3356 | void MoveSelectedLinesUp(); | |
3357 | ||
3358 | /** | |
3359 | Move the selected lines down one line, shifting the line below before the selection | |
3360 | */ | |
3361 | void MoveSelectedLinesDown(); | |
3362 | ||
3363 | /** | |
3364 | Set the identifier reported as idFrom in notification messages. | |
3365 | */ | |
3366 | void SetIdentifier(int identifier); | |
3367 | ||
3368 | /** | |
3369 | Get the identifier. | |
3370 | */ | |
3371 | int GetIdentifier() const; | |
3372 | ||
3373 | /** | |
3374 | Set the width for future RGBA image data. | |
3375 | */ | |
3376 | void RGBAImageSetWidth(int width); | |
3377 | ||
3378 | /** | |
3379 | Set the height for future RGBA image data. | |
3380 | */ | |
3381 | void RGBAImageSetHeight(int height); | |
3382 | ||
3383 | /** | |
3384 | Define a marker from RGBA data. | |
3385 | It has the width and height from RGBAImageSetWidth/Height | |
3386 | */ | |
3387 | void MarkerDefineRGBAImage(int markerNumber, const unsigned char* pixels); | |
3388 | ||
3389 | /** | |
3390 | Register an RGBA image for use in autocompletion lists. | |
3391 | It has the width and height from RGBAImageSetWidth/Height | |
3392 | */ | |
3393 | void RegisterRGBAImage(int type, const unsigned char* pixels); | |
3394 | ||
3395 | /** | |
3396 | Scroll to start of document. | |
3397 | */ | |
3398 | void ScrollToStart(); | |
3399 | ||
3400 | /** | |
3401 | Scroll to end of document. | |
3402 | */ | |
3403 | void ScrollToEnd(); | |
3404 | ||
3405 | /** | |
3406 | Create an ILoader. | |
3407 | (This is a Scintilla type which can be used to load a document in | |
3408 | a background thread. See Scintilla's documentation for details.) | |
3409 | */ | |
3410 | void* CreateLoader(int bytes); | |
3411 | ||
3412 | /** | |
3413 | For private communication between an application and a known lexer. | |
3414 | */ | |
3415 | void* PrivateLexerCall(int operation, void* pointer); | |
3416 | ||
3417 | /** | |
3418 | Retrieve a '\n' separated list of properties understood by the current lexer. | |
3419 | */ | |
3420 | wxString PropertyNames() const; | |
3421 | ||
3422 | /** | |
3423 | Retrieve the type of a property. | |
3424 | */ | |
3425 | int PropertyType(const wxString& name); | |
3426 | ||
3427 | /** | |
3428 | Describe a property. | |
3429 | */ | |
3430 | wxString DescribeProperty(const wxString& name) const; | |
3431 | ||
3432 | /** | |
3433 | Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. | |
3434 | */ | |
3435 | wxString DescribeKeyWordSets() const; | |
3436 | ||
3437 | ||
ccec9093 VZ |
3438 | /** |
3439 | Get Scintilla library version information. | |
3440 | ||
3441 | @since 2.9.2 | |
3442 | @see wxVersionInfo | |
3443 | */ | |
3444 | static wxVersionInfo GetLibraryVersionInfo(); | |
23324ae1 | 3445 | }; |
e54c96f1 | 3446 |