]> git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/AutoComplete.h
622a5666ec5ffdf56357ed4760e4d00b3daea92c
[wxWidgets.git] / src / stc / scintilla / src / AutoComplete.h
1 // Scintilla source code edit control
2 /** @file AutoComplete.h
3 ** Defines the auto completion list box.
4 **/
5 // Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
7
8 #ifndef AUTOCOMPLETE_H
9 #define AUTOCOMPLETE_H
10
11 /**
12 */
13 class AutoComplete {
14 bool active;
15 char stopChars[256];
16 char fillUpChars[256];
17 char separator;
18
19 public:
20 bool ignoreCase;
21 bool chooseSingle;
22 ListBox lb;
23 int posStart;
24 int startLen;
25 /// Should autocompletion be canceled if editor's currentPos <= startPos?
26 bool cancelAtStartPos;
27 bool autoHide;
28 bool dropRestOfWord;
29
30 AutoComplete();
31 ~AutoComplete();
32
33 /// Is the auto completion list displayed?
34 bool Active();
35
36 /// Display the auto completion list positioned to be near a character position
37 void Start(Window &parent, int ctrlID, int position, int startLen_);
38
39 /// The stop chars are characters which, when typed, cause the auto completion list to disappear
40 void SetStopChars(const char *stopChars_);
41 bool IsStopChar(char ch);
42
43 /// The fillup chars are characters which, when typed, fill up the selected word
44 void SetFillUpChars(const char *fillUpChars_);
45 bool IsFillUpChar(char ch);
46
47 /// The separator character is used when interpreting the list in SetList
48 void SetSeparator(char separator_);
49 char GetSeparator();
50
51 /// The list string contains a sequence of words separated by the separator character
52 void SetList(const char *list);
53
54 void Show();
55 void Cancel();
56
57 /// Move the current list element by delta, scrolling appropriately
58 void Move(int delta);
59
60 /// Select a list element that starts with word as the current element
61 void Select(const char *word);
62 };
63
64 #endif