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