Update stc interface docs
[wxWidgets.git] / interface / wx / stc / stc.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: stc/stc.h
3 // Purpose: interface of wxStyledTextEvent
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 /// Represents an invalid position.
10 #define wxSTC_INVALID_POSITION -1
11
12 /**
13 @class wxStyledTextEvent
14
15 The type of events sent from wxStyledTextCtrl.
16
17 @todo list styled text ctrl events.
18
19 @library{wxbase}
20 @category{events,stc}
21 */
22 class wxStyledTextEvent : public wxCommandEvent
23 {
24 public:
25 //@{
26 /**
27 Ctors; used internally by wxWidgets.
28 */
29 wxStyledTextEvent(wxEventType commandType = 0, int id = 0);
30 wxStyledTextEvent(const wxStyledTextEvent& event);
31 //@}
32
33 /**
34
35 */
36 bool GetAlt() const;
37
38 /**
39
40 */
41 bool GetControl() const;
42
43 /**
44
45 */
46 bool GetDragAllowMove();
47
48 /**
49
50 */
51 wxDragResult GetDragResult();
52
53 /**
54
55 */
56 wxString GetDragText();
57
58 /**
59
60 */
61 int GetFoldLevelNow() const;
62
63 /**
64
65 */
66 int GetFoldLevelPrev() const;
67
68 /**
69
70 */
71 int GetKey() const;
72
73 /**
74
75 */
76 int GetLParam() const;
77
78 /**
79
80 */
81 int GetLength() const;
82
83 /**
84
85 */
86 int GetLine() const;
87
88 /**
89
90 */
91 int GetLinesAdded() const;
92
93 /**
94
95 */
96 int GetListType() const;
97
98 /**
99
100 */
101 int GetMargin() const;
102
103 /**
104
105 */
106 int GetMessage() const;
107
108 /**
109
110 */
111 int GetModificationType() const;
112
113 /**
114
115 */
116 int GetModifiers() const;
117
118 /**
119
120 */
121 int GetPosition() const;
122
123 /**
124
125 */
126 bool GetShift() const;
127
128 /**
129
130 */
131 wxString GetText() const;
132
133 /**
134
135 */
136 int GetWParam() const;
137
138 /**
139
140 */
141 int GetX() const;
142
143 /**
144
145 */
146 int GetY() const;
147
148 /**
149 */
150 int GetToken() const;
151
152 /**
153 */
154 int GetAnnotationsLinesAdded() const;
155
156 /**
157 */
158 int GetUpdated() const;
159
160 /**
161
162 */
163 void SetDragAllowMove(bool val);
164
165 /**
166
167 */
168 void SetDragResult(wxDragResult val);
169
170 /**
171
172 */
173 void SetDragText(const wxString& val);
174
175 /**
176
177 */
178 void SetFoldLevelNow(int val);
179
180 /**
181
182 */
183 void SetFoldLevelPrev(int val);
184
185 /**
186
187 */
188 void SetKey(int k);
189
190 /**
191
192 */
193 void SetLParam(int val);
194
195 /**
196
197 */
198 void SetLength(int len);
199
200 /**
201
202 */
203 void SetLine(int val);
204
205 /**
206
207 */
208 void SetLinesAdded(int num);
209
210 /**
211
212 */
213 void SetListType(int val);
214
215 /**
216
217 */
218 void SetMargin(int val);
219
220 /**
221
222 */
223 void SetMessage(int val);
224
225 /**
226
227 */
228 void SetModificationType(int t);
229
230 /**
231
232 */
233 void SetModifiers(int m);
234
235 /**
236
237 */
238 void SetPosition(int pos);
239
240 /**
241
242 */
243 void SetText(const wxString& t);
244
245 /**
246
247 */
248 void SetWParam(int val);
249
250 /**
251
252 */
253 void SetX(int val);
254
255 /**
256
257 */
258 void SetY(int val);
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
272 };
273
274
275
276 /**
277 @class wxStyledTextCtrl
278
279 A wxWidgets implementation of the Scintilla source code editing component.
280
281 As well as features found in standard text editing components, Scintilla
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
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
289 foreground and background colours and multiple fonts.
290
291 wxStyledTextCtrl is a 1 to 1 mapping of "raw" scintilla interface, whose
292 documentation can be found in the Scintilla website (http://www.scintilla.org/).
293
294 @beginEventEmissionTable{wxStyledTextEvent}
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
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
355 @event{EVT_STC_HOTSPOT_RELEASE_CLICK(id, fn)}
356 TOWRITE
357 @endEventTable
358
359 @library{wxbase}
360 @category{stc}
361
362 @see wxStyledTextEvent
363 */
364 class wxStyledTextCtrl : public wxControl
365 {
366 public:
367 /**
368 Ctor.
369 */
370 wxStyledTextCtrl::wxStyledTextCtrl(wxWindow* parent,
371 wxWindowID id = wxID_ANY,
372 const wxPoint& pos = wxDefaultPosition,
373 const wxSize& size = wxDefaultSize,
374 long style = 0,
375 const wxString& name = wxSTCNameStr);
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 /**
388 Add text to the document at current position.
389 */
390 void AddText(const wxString& text);
391
392 /**
393 Add raw text to the document at current position.
394 */
395 void AddTextRaw(const char* text, int length=-1);
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 */
405 virtual void AppendText(const wxString& text);
406
407 /**
408 Append a string to the end of the document without changing the selection.
409 */
410 void AppendTextRaw(const char* text, int length=-1);
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 */
431 bool AutoCompGetAutoHide() const;
432
433 /**
434 Retrieve whether auto-completion cancelled by backspacing before start.
435 */
436 bool AutoCompGetCancelAtStart() const;
437
438 /**
439 Retrieve whether a single item auto-completion list automatically choose the
440 item.
441 */
442 bool AutoCompGetChooseSingle() const;
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 */
453 bool AutoCompGetDropRestOfWord() const;
454
455 /**
456 Retrieve state of ignore case flag.
457 */
458 bool AutoCompGetIgnoreCase() const;
459
460 /**
461 Set the maximum height, in rows, of auto-completion and user lists.
462 */
463 int AutoCompGetMaxHeight() const;
464
465 /**
466 Get the maximum width, in characters, of auto-completion and user lists.
467 */
468 int AutoCompGetMaxWidth() const;
469
470 /**
471 Retrieve the auto-completion list separator character.
472 */
473 int AutoCompGetSeparator() const;
474
475 /**
476 Retrieve the auto-completion list type-separator character.
477 */
478 int AutoCompGetTypeSeparator() const;
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 /**
542 Change the type-separator character in the string setting up an auto-completion list.
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
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
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
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
595 /**
596 Highlight the characters at two positions.
597 */
598 void BraceHighlight(int pos1, int pos2);
599
600 /**
601 Find the position of a matching brace or wxSTC_INVALID_POSITION if no match.
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
640 /**
641 Set position of calltip, above or below text.
642 */
643 void CallTipSetPosition(bool above);
644
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 */
658 virtual bool CanPaste() const;
659
660 /**
661 Are there any redoable actions in the undo history?
662 */
663 virtual bool CanRedo() const;
664
665 /**
666 Are there any undoable actions in the undo history?
667 */
668 virtual bool CanUndo() const;
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 */
715 virtual void Clear();
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 */
765 virtual void Copy();
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
777 /**
778 Count characters between two positions.
779 */
780 int CountCharacters(int startPos, int endPos);
781
782 /**
783
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 */
800 virtual void Cut();
801
802 /**
803 Delete a range of text in the document.
804 */
805 void DeleteRange(int pos, int deleteLength);
806
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 */
934 int GetAnchor() const;
935
936 /**
937 Does a backspace pressed when caret is within indentation unindent?
938 */
939 bool GetBackSpaceUnIndents() const;
940
941 /**
942 Is drawing done first into a buffer or direct to the screen?
943 */
944 bool GetBufferedDraw() const;
945
946 /**
947 Get the foreground colour of the caret.
948 */
949 wxColour GetCaretForeground() const;
950
951 /**
952 Get the background alpha of the caret line.
953 */
954 int GetCaretLineBackAlpha() const;
955
956 /**
957 Get the colour of the background of the line containing the caret.
958 */
959 wxColour GetCaretLineBackground() const;
960
961 /**
962 Is the background of the line containing the caret in a different colour?
963 */
964 bool GetCaretLineVisible() const;
965
966 /**
967 Get the time in milliseconds that the caret is on and off.
968 */
969 int GetCaretPeriod() const;
970
971 /**
972 Can the caret preferred x position only be changed by explicit movement
973 commands?
974 */
975 int GetCaretSticky() const;
976
977 /**
978 Returns the width of the insert mode caret.
979 */
980 int GetCaretWidth() const;
981
982 /**
983 Returns the character byte at the position.
984 */
985 int GetCharAt(int pos) const;
986
987 /**
988 Get the code page used to interpret the bytes of the document as characters.
989 */
990 int GetCodePage() const;
991
992 /**
993 Retrieve the column number of a position, taking tab width into account.
994 */
995 int GetColumn(int pos) const;
996
997 /**
998 Get the way control characters are displayed.
999 */
1000 int GetControlCharSymbol() const;
1001
1002 /**
1003
1004 */
1005 wxString GetCurLine(int* linePos = NULL);
1006
1007 /**
1008
1009 */
1010 wxCharBuffer GetCurLineRaw(int* linePos = NULL);
1011
1012 /**
1013 END of generated section
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 */
1022 int GetCurrentPos() const;
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 */
1032 int GetEOLMode() const;
1033
1034 /**
1035 Retrieve the colour used in edge indication.
1036 */
1037 wxColour GetEdgeColour() const;
1038
1039 /**
1040 Retrieve the column number which text should be kept within.
1041 */
1042 int GetEdgeColumn() const;
1043
1044 /**
1045 Retrieve the edge highlight mode.
1046 */
1047 int GetEdgeMode() const;
1048
1049 /**
1050 Retrieve whether the maximum scroll position has the last
1051 line at the bottom of the view.
1052 */
1053 bool GetEndAtLastLine() const;
1054
1055 /**
1056 Retrieve the position of the last correctly styled character.
1057 */
1058 int GetEndStyled() const;
1059
1060 /**
1061 Retrieve the display line at the top of the display.
1062 */
1063 int GetFirstVisibleLine() const;
1064
1065 /**
1066 Is a header line expanded?
1067 */
1068 bool GetFoldExpanded(int line) const;
1069
1070 /**
1071 Retrieve the fold level of a line.
1072 */
1073 int GetFoldLevel(int line) const;
1074
1075 /**
1076 Find the parent line of a child line.
1077 */
1078 int GetFoldParent(int line) const;
1079
1080 /**
1081 Get the highlighted indentation guide column.
1082 */
1083 int GetHighlightGuide() const;
1084
1085 /**
1086 Retrieve indentation size.
1087 */
1088 int GetIndent() const;
1089
1090 /**
1091 Are the indentation guides visible?
1092 */
1093 int GetIndentationGuides() const;
1094
1095 /**
1096 Find the last child line of a header line.
1097 */
1098 int GetLastChild(int line, int level) const;
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 */
1108 int GetLayoutCache() const;
1109
1110 /**
1111 Returns the number of bytes in the document.
1112 */
1113 int GetLength() const;
1114
1115 /**
1116 Retrieve the lexing language of the document.
1117 */
1118 int GetLexer() const;
1119
1120 /**
1121 Retrieve the contents of a line.
1122 */
1123 wxString GetLine(int line) const;
1124
1125 /**
1126 Returns the number of lines in the document. There is always at least one.
1127 */
1128 int GetLineCount() const;
1129
1130 /**
1131 Get the position after the last visible characters on a line.
1132 */
1133 int GetLineEndPosition(int line) const;
1134
1135 /**
1136 Retrieve the position before the first non indentation character on a line.
1137 */
1138 int GetLineIndentPosition(int line) const;
1139
1140 /**
1141 Retrieve the number of columns that a line is indented.
1142 */
1143 int GetLineIndentation(int line) const;
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
1152 (wxSTC_INVALID_POSITION if no selection on this line).
1153 */
1154 int GetLineSelEndPosition(int line);
1155
1156 /**
1157 Retrieve the position of the start of the selection at the given line
1158 (wxSTC_INVALID_POSITION if no selection on this line).
1159 */
1160 int GetLineSelStartPosition(int line);
1161
1162 /**
1163 Retrieve the extra styling information for a line.
1164 */
1165 int GetLineState(int line) const;
1166
1167 /**
1168 Is a line visible?
1169 */
1170 bool GetLineVisible(int line) const;
1171
1172 /**
1173 Are all lines visible?
1174 */
1175 bool GetAllLinesVisible() const;
1176
1177 /**
1178 Returns the size in pixels of the left margin.
1179 */
1180 int GetMarginLeft() const;
1181
1182 /**
1183 Retrieve the marker mask of a margin.
1184 */
1185 int GetMarginMask(int margin) const;
1186
1187 /**
1188 Returns the size in pixels of the right margin.
1189 */
1190 int GetMarginRight() const;
1191
1192 /**
1193 Retrieve the mouse click sensitivity of a margin.
1194 */
1195 bool GetMarginSensitive(int margin) const;
1196
1197 /**
1198 Retrieve the type of a margin.
1199 */
1200 int GetMarginType(int margin) const;
1201
1202 /**
1203 Retrieve the width of a margin in pixels.
1204 */
1205 int GetMarginWidth(int margin) const;
1206
1207 /**
1208 Retrieve the last line number that has line state.
1209 */
1210 int GetMaxLineState() const;
1211
1212 /**
1213 Get which document modification events are sent to the container.
1214 */
1215 int GetModEventMask() const;
1216
1217 /**
1218 Is the document different from when it was last saved?
1219 */
1220 bool GetModify() const;
1221
1222 /**
1223 Get whether mouse gets captured.
1224 */
1225 bool GetMouseDownCaptures() const;
1226
1227 /**
1228 Retrieve the time the mouse must sit still to generate a mouse dwell event.
1229 */
1230 int GetMouseDwellTime() const;
1231
1232 /**
1233 Returns @true if overtype mode is active otherwise @false is returned.
1234 */
1235 bool GetOvertype() const;
1236
1237 /**
1238 Get convert-on-paste setting
1239 */
1240 bool GetPasteConvertEndings() const;
1241
1242 /**
1243 Returns the print colour mode.
1244 */
1245 int GetPrintColourMode() const;
1246
1247 /**
1248 Returns the print magnification.
1249 */
1250 int GetPrintMagnification() const;
1251
1252 /**
1253 Is printing line wrapped?
1254 */
1255 int GetPrintWrapMode() const;
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 */
1272 int GetPropertyInt(const wxString& key) const;
1273
1274 /**
1275 In read-only mode?
1276 */
1277 bool GetReadOnly() const;
1278
1279 /**
1280 Get cursor type.
1281 */
1282 int GetSTCCursor() const;
1283
1284 /**
1285 Get internal focus flag.
1286 */
1287 bool GetSTCFocus() const;
1288
1289 /**
1290 Retrieve the document width assumed for scrolling.
1291 */
1292 int GetScrollWidth() const;
1293
1294 /**
1295 Get the search flags used by SearchInTarget.
1296 */
1297 int GetSearchFlags() const;
1298
1299 /**
1300 Get the alpha of the selection.
1301 */
1302 int GetSelAlpha() const;
1303
1304 /**
1305 Retrieve the selected text.
1306 */
1307 wxString GetSelectedText();
1308
1309 /**
1310 Retrieve the selected text.
1311 */
1312 wxCharBuffer GetSelectedTextRaw();
1313
1314 /**
1315
1316 */
1317 void GetSelection(int* OUTPUT, int* OUTPUT);
1318
1319 /**
1320 Returns the position at the end of the selection.
1321 */
1322 int GetSelectionEnd() const;
1323
1324 /**
1325 Get the mode of the current selection.
1326 */
1327 int GetSelectionMode() const;
1328
1329 /**
1330 Returns the position at the start of the selection.
1331 */
1332 int GetSelectionStart() const;
1333
1334 /**
1335 Get error status.
1336 */
1337 int GetStatus() const;
1338
1339 /**
1340 Returns the style byte at the position.
1341 */
1342 int GetStyleAt(int pos) const;
1343
1344 /**
1345 Retrieve number of bits in style bytes used to hold the lexical state.
1346 */
1347 int GetStyleBits() const;
1348
1349 /**
1350 Retrieve the number of bits the current lexer needs for styling.
1351 */
1352 int GetStyleBitsNeeded() const;
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 */
1362 bool GetTabIndents() const;
1363
1364 /**
1365 Retrieve the visible size of a tab.
1366 */
1367 int GetTabWidth() const;
1368
1369 /**
1370 Get the position that ends the target.
1371 */
1372 int GetTargetEnd() const;
1373
1374 /**
1375 Get the position that starts the target.
1376 */
1377 int GetTargetStart() const;
1378
1379 /**
1380 Retrieve all the text in the document.
1381 */
1382 wxString GetText() const;
1383
1384 /**
1385 Retrieve the number of characters in the document.
1386 */
1387 int GetTextLength() const;
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 */
1407 bool GetTwoPhaseDraw() const;
1408
1409 /**
1410 Is undo history being collected?
1411 */
1412 bool GetUndoCollection() const;
1413
1414 /**
1415 Returns the current UseAntiAliasing setting.
1416 */
1417 bool GetUseAntiAliasing();
1418
1419 /**
1420 Is the horizontal scroll bar visible?
1421 */
1422 bool GetUseHorizontalScrollBar() const;
1423
1424 /**
1425 Retrieve whether tabs will be used in indentation.
1426 */
1427 bool GetUseTabs() const;
1428
1429 /**
1430 Is the vertical scroll bar visible?
1431 */
1432 bool GetUseVerticalScrollBar() const;
1433
1434 /**
1435 Are the end of line characters visible?
1436 */
1437 bool GetViewEOL() const;
1438
1439 /**
1440 Are white space characters currently visible?
1441 Returns one of SCWS_* constants.
1442 */
1443 int GetViewWhiteSpace() const;
1444
1445 /**
1446 Retrieve whether text is word wrapped.
1447 */
1448 int GetWrapMode() const;
1449
1450 /**
1451 Retrieve the start indent for wrapped lines.
1452 */
1453 int GetWrapStartIndent() const;
1454
1455 /**
1456 Retrieve the display mode of visual flags for wrapped lines.
1457 */
1458 int GetWrapVisualFlags() const;
1459
1460 /**
1461 Retrieve the location of visual flags for wrapped lines.
1462 */
1463 int GetWrapVisualFlagsLocation() const;
1464
1465 /**
1466
1467 */
1468 int GetXOffset() const;
1469
1470 /**
1471 Retrieve the zoom level.
1472 */
1473 int GetZoom() const;
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
1527 start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
1528 */
1529 void HomeWrap();
1530
1531 /**
1532
1533 */
1534 void HomeWrapExtend();
1535
1536 /**
1537 Retrieve the foreground colour of an indicator.
1538 */
1539 wxColour IndicatorGetForeground(int indic) const;
1540
1541 /**
1542 Retrieve the style of an indicator.
1543 */
1544 int IndicatorGetStyle(int indic) const;
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 /**
1629
1630 */
1631 void LineEndWrap();
1632
1633 /**
1634
1635 */
1636 void LineEndWrapExtend();
1637
1638 /**
1639 Retrieve the line containing a position.
1640 */
1641 int LineFromPosition(int pos) const;
1642
1643 /**
1644 How many characters are on a line, including end of line characters?
1645 */
1646 int LineLength(int line) const;
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 */
1691 int LinesOnScreen() const;
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 */
1702 bool LoadFile(const wxString& file, int fileType = wxTEXT_TYPE_ANY);
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 /**
1759 Find the next line at or after lineStart that includes a marker in mask.
1760 Return -1 when no more lines.
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
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
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 /**
1840
1841 */
1842 void ParaDownExtend();
1843
1844 /**
1845
1846 */
1847 void ParaUp();
1848
1849 /**
1850
1851 */
1852 void ParaUpExtend();
1853
1854 /**
1855 Paste the contents of the clipboard into the document replacing the selection.
1856 */
1857 virtual void Paste();
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 */
1879 int PositionFromLine(int line) const;
1880
1881 /**
1882 Find the position from a point within the window.
1883 */
1884 int PositionFromPoint(wxPoint pt) const;
1885
1886 /**
1887 Find the position from a point within the window but return
1888 wxSTC_INVALID_POSITION if not close to text.
1889 */
1890 int PositionFromPointClose(int x, int y);
1891
1892 /**
1893 Redoes the next action on the undo history.
1894 */
1895 virtual void Redo();
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 /**
1920 Replace the target text with the argument text after d processing.
1921 Text is counted so it can contain NULs.
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
1926 Returns the length of the replacement text including any change
1927 caused by processing the d patterns.
1928 */
1929 int ReplaceTargetRE(const wxString& text);
1930
1931 /**
1932 Write the contents of the editor to filename
1933 */
1934 bool SaveFile(const wxString& file = wxEmptyString, int fileType = wxTEXT_TYPE_ANY);
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 */
1973 virtual void SelectAll();
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 */
1985 bool SelectionIsRectangle() const;
1986
1987 /**
1988 Send a message to Scintilla
1989 */
1990 wxIntPtr SendMsg(int msg, wxUIntPtr wp = 0, wxIntPtr lp = 0) const;
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 */
2037 void SetCaretSticky(int useCaretStickyBehaviour);
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 /**
2122
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 */
2167 void SetIndentationGuides(int indentView);
2168
2169 /**
2170 Set up the key words used by the lexer.
2171 */
2172 void SetKeyWords(int keywordSet, const wxString& keyWords);
2173
2174 /**
2175
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
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
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
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
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 /**
2346 Set the background colour of the main and additional selections and whether to use this setting.
2347 */
2348 void SetSelBackground(bool useSetting, const wxColour& back);
2349
2350 /**
2351 Set the foreground colour of the main and additional selections and whether to use this setting.
2352 */
2353 void SetSelForeground(bool useSetting, const wxColour& fore);
2354
2355 /**
2356 Set caret to a position, while removing any existing selection.
2357 */
2358 void SetEmptySelection(int pos);
2359
2360 /**
2361 Select a range of text.
2362 */
2363 virtual void SetSelection(long from, long to);
2364
2365 /**
2366 Sets the position that ends the selection - this becomes the currentPosition.
2367 */
2368 void SetSelectionEnd(int pos);
2369
2370 /**
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).
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
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
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
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
2540 /**
2541 Set the set of characters making up words for when moving or selecting by word.
2542 First sets defaults like SetCharsDefault.
2543 */
2544 void SetWordChars(const wxString& characters);
2545
2546 /**
2547 Get the set of characters making up words for when moving or selecting by word.
2548 */
2549 wxString GetWordChars() const;
2550
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 /**
2578 Get and Set the xOffset (ie, horizontal scroll position).
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
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
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
2752 fore:[name or \#RRGGBB] sets the foreground colour
2753 back:[name or \#RRGGBB] sets the background colour
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 */
2776 void Tab();
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 */
2809 virtual void Undo();
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 /**
2846
2847 */
2848 void VCHomeWrap();
2849
2850 /**
2851
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();
2948
2949
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
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
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
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
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
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
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.
3173 Return wxSTC_INVALID_POSITION if not close to text.
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();
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
3438 /**
3439 Get Scintilla library version information.
3440
3441 @since 2.9.2
3442 @see wxVersionInfo
3443 */
3444 static wxVersionInfo GetLibraryVersionInfo();
3445 };
3446