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