upgraded to scintilla 3.2.0
[TortoiseGit.git] / ext / scintilla / src / AutoComplete.h
blobe06ce9ab6abafba692f4b94c8f62acc2a1e14c4d
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 #ifdef SCI_NAMESPACE
12 namespace Scintilla {
13 #endif
15 /**
17 class AutoComplete {
18 bool active;
19 char stopChars[256];
20 char fillUpChars[256];
21 char separator;
22 char typesep; // Type seperator
24 public:
25 bool ignoreCase;
26 bool chooseSingle;
27 ListBox *lb;
28 int posStart;
29 int startLen;
30 /// Should autocompletion be canceled if editor's currentPos <= startPos?
31 bool cancelAtStartPos;
32 bool autoHide;
33 bool dropRestOfWord;
34 unsigned int ignoreCaseBehaviour;
36 AutoComplete();
37 ~AutoComplete();
39 /// Is the auto completion list displayed?
40 bool Active() const;
42 /// Display the auto completion list positioned to be near a character position
43 void Start(Window &parent, int ctrlID, int position, Point location,
44 int startLen_, int lineHeight, bool unicodeMode, int technology);
46 /// The stop chars are characters which, when typed, cause the auto completion list to disappear
47 void SetStopChars(const char *stopChars_);
48 bool IsStopChar(char ch);
50 /// The fillup chars are characters which, when typed, fill up the selected word
51 void SetFillUpChars(const char *fillUpChars_);
52 bool IsFillUpChar(char ch);
54 /// The separator character is used when interpreting the list in SetList
55 void SetSeparator(char separator_);
56 char GetSeparator() const;
58 /// The typesep character is used for seperating the word from the type
59 void SetTypesep(char separator_);
60 char GetTypesep() const;
62 /// The list string contains a sequence of words separated by the separator character
63 void SetList(const char *list);
65 void Show(bool show);
66 void Cancel();
68 /// Move the current list element by delta, scrolling appropriately
69 void Move(int delta);
71 /// Select a list element that starts with word as the current element
72 void Select(const char *word);
75 #ifdef SCI_NAMESPACE
77 #endif
79 #endif