]> git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/AutoComplete.h
e4f8ade0d8da534c0481e788e1376a0238720748
[wxWidgets.git] / src / stc / scintilla / src / AutoComplete.h
1 // Scintilla source code edit control
2 // AutoComplete.h - defines the auto completion list box
3 // Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
4 // The License.txt file describes the conditions under which this software may be distributed.
5
6 #ifndef AUTOCOMPLETE_H
7 #define AUTOCOMPLETE_H
8
9 class AutoComplete {
10 bool active;
11 char stopChars[256];
12 char separator;
13 public:
14 ListBox lb;
15 int posStart;
16 int startLen;
17
18 AutoComplete();
19 ~AutoComplete();
20
21 // Is the auto completion list displayed?
22 bool Active();
23
24 // Display the auto completion list positioned to be near a character position
25 void Start(Window &parent, int ctrlID, int position, int startLen_);
26
27 // The stop chars are characters which, when typed, cause the auto completion list to disappear
28 void SetStopChars(const char *stopChars_);
29 bool IsStopChar(char ch);
30
31 // The separator character is used when interpreting the list in SetList
32 void SetSeparator(char separator_);
33 char GetSeparator();
34
35 // The list string contains a sequence of words separated by the separator character
36 int SetList(const char *list);
37
38 void Show();
39 void Cancel();
40
41 // Move the current list element by delta, scrolling appropriately
42 void Move(int delta);
43
44 // Select a list element that starts with word as the current element
45 void Select(const char *word);
46 };
47
48 #endif