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