]> git.saurik.com Git - wxWidgets.git/blame - src/stc/scintilla/src/AutoComplete.h
wxMGL fixes (patch #884758)
[wxWidgets.git] / src / stc / scintilla / src / AutoComplete.h
CommitLineData
9ce192d4 1// Scintilla source code edit control
65ec6247
RD
2/** @file AutoComplete.h
3 ** Defines the auto completion list box.
4 **/
9e730a78 5// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
9ce192d4
RD
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
65ec6247
RD
11/**
12 */
9ce192d4
RD
13class AutoComplete {
14 bool active;
15 char stopChars[256];
d134f170 16 char fillUpChars[256];
f6bcfd97 17 char separator;
9e730a78 18 char typesep; // Type seperator
65ec6247 19
9ce192d4 20public:
d134f170
RD
21 bool ignoreCase;
22 bool chooseSingle;
9e730a78 23 ListBox *lb;
9ce192d4
RD
24 int posStart;
25 int startLen;
65ec6247 26 /// Should autocompletion be canceled if editor's currentPos <= startPos?
d134f170 27 bool cancelAtStartPos;
65ec6247 28 bool autoHide;
1a2fb4cd 29 bool dropRestOfWord;
65ec6247 30
9ce192d4
RD
31 AutoComplete();
32 ~AutoComplete();
33
65ec6247 34 /// Is the auto completion list displayed?
9ce192d4 35 bool Active();
65ec6247
RD
36
37 /// Display the auto completion list positioned to be near a character position
9e730a78
RD
38 void Start(Window &parent, int ctrlID, int position,
39 int startLen_, int lineHeight, bool unicodeMode);
65ec6247
RD
40
41 /// The stop chars are characters which, when typed, cause the auto completion list to disappear
9ce192d4
RD
42 void SetStopChars(const char *stopChars_);
43 bool IsStopChar(char ch);
65ec6247
RD
44
45 /// The fillup chars are characters which, when typed, fill up the selected word
d134f170
RD
46 void SetFillUpChars(const char *fillUpChars_);
47 bool IsFillUpChar(char ch);
48
65ec6247 49 /// The separator character is used when interpreting the list in SetList
f6bcfd97
BP
50 void SetSeparator(char separator_);
51 char GetSeparator();
65ec6247 52
9e730a78
RD
53 /// The typesep character is used for seperating the word from the type
54 void SetTypesep(char separator_);
55 char GetTypesep();
56
65ec6247 57 /// The list string contains a sequence of words separated by the separator character
d134f170 58 void SetList(const char *list);
65ec6247 59
9ce192d4
RD
60 void Show();
61 void Cancel();
65ec6247
RD
62
63 /// Move the current list element by delta, scrolling appropriately
9ce192d4 64 void Move(int delta);
65ec6247
RD
65
66 /// Select a list element that starts with word as the current element
9ce192d4
RD
67 void Select(const char *word);
68};
69
70#endif