mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
d14efe561b
long become wxWidgets 2.9.2, which in turn is expected to be the last 2.9 release before the 3.0 stable release. Since the full wxWidgets distribution is rather large, I have imported only the parts that we use, on a subdirectory basis: art include/wx/*.* include/wx/aui include/wx/cocoa include/wx/generic include/wx/gtk include/wx/meta include/wx/msw include/wx/osx include/wx/persist include/wx/private include/wx/protocol include/wx/unix src/aui src/common src/generic src/gtk src/msw src/osx src/unix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7380 8ced0084-cf51-0410-be5f-012b33b47a6e
96 lines
3.1 KiB
C++
96 lines
3.1 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/srchctrl.h
|
|
// Purpose: wxSearchCtrlBase class
|
|
// Author: Vince Harron
|
|
// Created: 2006-02-18
|
|
// RCS-ID: $Id: srchctrl.h 67254 2011-03-20 00:14:35Z DS $
|
|
// Copyright: (c) Vince Harron
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_SEARCHCTRL_H_BASE_
|
|
#define _WX_SEARCHCTRL_H_BASE_
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#if wxUSE_SEARCHCTRL
|
|
|
|
#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
|
|
// no native version, use the generic one
|
|
#define wxUSE_NATIVE_SEARCH_CONTROL 0
|
|
|
|
class WXDLLIMPEXP_CORE wxSearchCtrlBaseBaseClass : public wxControl,
|
|
public wxTextCtrlIface
|
|
{
|
|
};
|
|
#endif
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// constants
|
|
// ----------------------------------------------------------------------------
|
|
|
|
extern WXDLLIMPEXP_DATA_CORE(const char) wxSearchCtrlNameStr[];
|
|
|
|
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEvent);
|
|
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEvent);
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// a search ctrl is a text control with a search button and a cancel button
|
|
// it is based on the MacOSX 10.3 control HISearchFieldCreate
|
|
// ----------------------------------------------------------------------------
|
|
|
|
class WXDLLIMPEXP_CORE wxSearchCtrlBase : public wxSearchCtrlBaseBaseClass
|
|
{
|
|
public:
|
|
wxSearchCtrlBase() { }
|
|
virtual ~wxSearchCtrlBase() { }
|
|
|
|
// search control
|
|
#if wxUSE_MENUS
|
|
virtual void SetMenu(wxMenu *menu) = 0;
|
|
virtual wxMenu *GetMenu() = 0;
|
|
#endif // wxUSE_MENUS
|
|
|
|
// 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;
|
|
|
|
private:
|
|
// implement wxTextEntry pure virtual method
|
|
virtual wxWindow *GetEditableWindow() { return this; }
|
|
};
|
|
|
|
|
|
// include the platform-dependent class implementation
|
|
#if wxUSE_NATIVE_SEARCH_CONTROL
|
|
#if defined(__WXMAC__)
|
|
#include "wx/osx/srchctrl.h"
|
|
#endif
|
|
#else
|
|
#include "wx/generic/srchctlg.h"
|
|
#endif
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// macros for handling search events
|
|
// ----------------------------------------------------------------------------
|
|
|
|
#define EVT_SEARCHCTRL_CANCEL_BTN(id, fn) \
|
|
wx__DECLARE_EVT1(wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, id, wxCommandEventHandler(fn))
|
|
|
|
#define EVT_SEARCHCTRL_SEARCH_BTN(id, fn) \
|
|
wx__DECLARE_EVT1(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, id, wxCommandEventHandler(fn))
|
|
|
|
#endif // wxUSE_SEARCHCTRL
|
|
|
|
#endif // _WX_SEARCHCTRL_H_BASE_
|