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