1. Renamed Set/GetXXXVisible() to ShowXXX() and IsXXXVisible()
2. Moved wxSearchCtrlBase to wx/srchctrl.h to avoid duplicating it 3. Removed gcc #pragmas git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -18,6 +18,19 @@
|
||||
|
||||
#include "wx/textctrl.h"
|
||||
|
||||
#if !defined(__WXUNIVERSAL__) && defined(__WXMAC__) && defined(__WXMAC_OSX__) \
|
||||
&& (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3)
|
||||
// search control was introduced in Mac OS X 10.3 Panther
|
||||
#define wxUSE_NATIVE_SEARCH_CONTROL 1
|
||||
|
||||
#define wxSearchCtrlBaseBaseClass wxTextCtrl
|
||||
#else
|
||||
// no native version, use the generic one
|
||||
#define wxUSE_NATIVE_SEARCH_CONTROL 0
|
||||
|
||||
#define wxSearchCtrlBaseBaseClass wxTextCtrlBase
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -34,16 +47,26 @@ END_DECLARE_EVENT_TYPES()
|
||||
// it is based on the MacOSX 10.3 control HISearchFieldCreate
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// include the platform-dependent class implementation
|
||||
#if !defined(__WXUNIVERSAL__) && defined(__WXMAC__) && defined(__WXMAC_OSX__) \
|
||||
&& (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3)
|
||||
// search control was introduced in Mac OS X 10.3 Panther
|
||||
#define wxUSE_NATIVE_SEARCH_CONTROL 1
|
||||
#else
|
||||
// no native version, use the generic one
|
||||
#define wxUSE_NATIVE_SEARCH_CONTROL 0
|
||||
#endif
|
||||
class WXDLLEXPORT wxSearchCtrlBase : public wxSearchCtrlBaseBaseClass
|
||||
{
|
||||
public:
|
||||
wxSearchCtrlBase() { }
|
||||
virtual ~wxSearchCtrlBase() { }
|
||||
|
||||
// search control
|
||||
virtual void SetMenu(wxMenu *menu) = 0;
|
||||
virtual wxMenu *GetMenu() = 0;
|
||||
|
||||
// get/set options
|
||||
virtual void ShowSearchButton( bool show ) = 0;
|
||||
virtual bool IsSearchButtonVisible() const = 0;
|
||||
|
||||
virtual void ShowCancelButton( bool show ) = 0;
|
||||
virtual bool IsCancelButtonVisible() const = 0;
|
||||
};
|
||||
|
||||
|
||||
// include the platform-dependent class implementation
|
||||
#if wxUSE_NATIVE_SEARCH_CONTROL
|
||||
#if defined(__WXMAC__)
|
||||
#include "wx/mac/srchctrl.h"
|
||||
|
Reference in New Issue
Block a user