Add native wxSearchCtrl for GTK+ port

This commit is contained in:
AliKet
2019-12-27 16:18:14 +01:00
committed by Vadim Zeitlin
parent a7f31db8cd
commit c09db9c23d
7 changed files with 658 additions and 24 deletions

View File

@@ -16,12 +16,7 @@
#include "wx/textctrl.h"
#if !defined(__WXUNIVERSAL__) && defined(__WXMAC__)
// search control was introduced in Mac OS X 10.3 Panther
#define wxUSE_NATIVE_SEARCH_CONTROL 1
#define wxSearchCtrlBaseBaseClass wxTextCtrl
#else
#if (!defined(__WXMAC__) && !defined(__WXGTK20__)) || defined(__WXUNIVERSAL__)
// no native version, use the generic one
#define wxUSE_NATIVE_SEARCH_CONTROL 0
@@ -33,6 +28,17 @@
public wxTextCtrlIface
{
};
#elif defined(__WXMAC__)
// search control was introduced in Mac OS X 10.3 Panther
#define wxUSE_NATIVE_SEARCH_CONTROL 1
#define wxSearchCtrlBaseBaseClass wxTextCtrl
#elif defined(__WXGTK20__)
// Use GtkSearchEntry if available, construct a similar one using GtkEntry
// otherwise.
#define wxUSE_NATIVE_SEARCH_CONTROL 1
#define wxSearchCtrlBaseBaseClass wxTextCtrlBase
#endif
// ----------------------------------------------------------------------------
@@ -81,6 +87,8 @@ private:
#if wxUSE_NATIVE_SEARCH_CONTROL
#if defined(__WXMAC__)
#include "wx/osx/srchctrl.h"
#elif defined(__WXGTK__)
#include "wx/gtk/srchctrl.h"
#endif
#else
#include "wx/generic/srchctlg.h"