Add wxTextEntry::MSWUsesStandardAutoComplete()

Implementation is a hack, using a magic pointer value because just
storing this in wxTextAutoCompleteData is not simple, as any flag added
to it would need to be reset in several different places.

This is not used yet, but will be in the upcoming commits.
This commit is contained in:
Vadim Zeitlin
2021-04-07 22:22:14 +01:00
parent a6e4cc7eb0
commit 1007259504
2 changed files with 34 additions and 5 deletions

View File

@@ -81,6 +81,9 @@ protected:
virtual bool DoAutoCompleteCustom(wxTextCompleter *completer) wxOVERRIDE;
#endif // wxUSE_OLE
// Returns true if this control uses standard file names completion.
bool MSWUsesStandardAutoComplete() const;
// Helper for wxTE_PROCESS_ENTER handling: activates the default button in
// the dialog containing this control if any.
bool ClickDefaultButtonIfPossible();
@@ -100,6 +103,10 @@ private:
// be called and the default implementation asserts if this is not the case.
virtual void MSWProcessSpecialKey(wxKeyEvent& event);
// Check if we really have auto-complete data. This is not the same as just
// checking if m_autoCompleteData is NULL, see the code for more details.
bool MSWHasAutoCompleteData() const;
// Check that we have auto-complete data, creating it if necessary. Returns
// false if creating it failed.
bool MSWEnsureHasAutoCompleteData();