Split wxTextAutoCompleteData in two subclasses
Doing two different things in the same class, using m_isDynamicCompleter to determine which kind of completion is used, was not very clear, so create two simple classes each of which does one and one thing only and create the one we need in wxTextEntry methods. Note that wxTextAutoCompleteDynamic can assume to always have a valid wxTextCompleter as otherwise no wxTextAutoCompleteData is needed at all, which results in more simplifications. There should be no changes in behaviour.
This commit is contained in:
@@ -94,13 +94,11 @@ private:
|
||||
// implement this to return the associated GtkEntry
|
||||
virtual GtkEntry *GetEntry() const = 0;
|
||||
|
||||
wxTextAutoCompleteData *GetOrCreateCompleter();
|
||||
|
||||
// Various auto-completion-related stuff, only used if any of AutoComplete()
|
||||
// methods are called. Use the function above to access it.
|
||||
// methods are called.
|
||||
wxTextAutoCompleteData *m_autoCompleteData;
|
||||
|
||||
// It needs to call our GetEditable() method.
|
||||
// It needs to call our GetEntry() method.
|
||||
friend class wxTextAutoCompleteData;
|
||||
|
||||
bool m_isUpperCase;
|
||||
|
Reference in New Issue
Block a user