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