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