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