2009-01-17 05:43:43 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2010-07-13 09:29:58 -04:00
|
|
|
// Name: wx/osx/srchctrl.h
|
2009-01-17 05:43:43 -05:00
|
|
|
// Purpose: mac carbon wxSearchCtrl class
|
|
|
|
// Author: Vince Harron
|
|
|
|
// Created: 2006-02-19
|
|
|
|
// Copyright: Vince Harron
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_SEARCHCTRL_H_
|
|
|
|
#define _WX_SEARCHCTRL_H_
|
|
|
|
|
|
|
|
#if wxUSE_SEARCHCTRL
|
|
|
|
|
|
|
|
class wxSearchWidgetImpl;
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxSearchCtrl : public wxSearchCtrlBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// creation
|
|
|
|
// --------
|
|
|
|
|
|
|
|
wxSearchCtrl();
|
|
|
|
wxSearchCtrl(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString& value = wxEmptyString,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
2019-10-22 06:34:29 -04:00
|
|
|
const wxString& name = wxASCII_STR(wxSearchCtrlNameStr));
|
2009-01-17 05:43:43 -05:00
|
|
|
|
|
|
|
virtual ~wxSearchCtrl();
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString& value = wxEmptyString,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
2019-10-22 06:34:29 -04:00
|
|
|
const wxString& name = wxASCII_STR(wxSearchCtrlNameStr));
|
2009-01-17 05:43:43 -05:00
|
|
|
|
2014-05-13 15:55:12 -04:00
|
|
|
#if wxUSE_MENUS
|
2009-01-17 05:43:43 -05:00
|
|
|
// get/set search button menu
|
|
|
|
// --------------------------
|
2015-11-22 04:15:41 -05:00
|
|
|
virtual void SetMenu( wxMenu* menu ) wxOVERRIDE;
|
|
|
|
virtual wxMenu* GetMenu() wxOVERRIDE;
|
2014-05-13 15:55:12 -04:00
|
|
|
#endif // wxUSE_MENUS
|
2009-01-17 05:43:43 -05:00
|
|
|
|
|
|
|
// get/set search options
|
|
|
|
// ----------------------
|
2015-11-22 04:15:41 -05:00
|
|
|
virtual void ShowSearchButton( bool show ) wxOVERRIDE;
|
|
|
|
virtual bool IsSearchButtonVisible() const wxOVERRIDE;
|
2009-01-17 05:43:43 -05:00
|
|
|
|
2015-11-22 04:15:41 -05:00
|
|
|
virtual void ShowCancelButton( bool show ) wxOVERRIDE;
|
|
|
|
virtual bool IsCancelButtonVisible() const wxOVERRIDE;
|
2009-01-17 05:43:43 -05:00
|
|
|
|
2018-01-27 07:38:47 -05:00
|
|
|
virtual void SetDescriptiveText(const wxString& text) wxOVERRIDE;
|
|
|
|
virtual wxString GetDescriptiveText() const wxOVERRIDE;
|
2009-01-17 05:43:43 -05:00
|
|
|
|
|
|
|
virtual bool HandleSearchFieldSearchHit() ;
|
|
|
|
virtual bool HandleSearchFieldCancelHit() ;
|
|
|
|
|
|
|
|
wxSearchWidgetImpl * GetSearchPeer() const;
|
|
|
|
|
2021-04-04 08:21:27 -04:00
|
|
|
#if wxUSE_MENUS
|
|
|
|
virtual void OSXAfterMenuEvent() wxOVERRIDE;
|
|
|
|
#endif // wxUSE_MENUS
|
|
|
|
|
2009-01-17 05:43:43 -05:00
|
|
|
protected:
|
|
|
|
|
2015-11-22 04:15:41 -05:00
|
|
|
wxSize DoGetBestSize() const wxOVERRIDE;
|
2009-01-17 05:43:43 -05:00
|
|
|
|
|
|
|
void Init();
|
|
|
|
|
2014-05-13 15:55:12 -04:00
|
|
|
#if wxUSE_MENUS
|
2009-01-17 05:43:43 -05:00
|
|
|
wxMenu *m_menu;
|
2014-05-13 15:55:12 -04:00
|
|
|
#endif // wxUSE_MENUS
|
2009-08-21 06:41:26 -04:00
|
|
|
|
2009-01-17 05:43:43 -05:00
|
|
|
wxString m_descriptiveText;
|
|
|
|
|
|
|
|
private:
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxSearchCtrl);
|
2009-01-17 05:43:43 -05:00
|
|
|
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_EVENT_TABLE();
|
2009-01-17 05:43:43 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // wxUSE_SEARCHCTRL
|
|
|
|
|
|
|
|
#endif // _WX_SEARCHCTRL_H_
|
|
|
|
|