added $Id$ to the header
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
5b43c75c1d
commit
8bc333d76d
@ -2,9 +2,8 @@
|
||||
// Name: wx/generic/srchctlg.h
|
||||
// Purpose: generic wxSearchCtrl class
|
||||
// Author: Vince Harron
|
||||
// Modified by:
|
||||
// Created: 2006-02-19
|
||||
// RCS-ID:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: Vince Harron
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -38,7 +37,7 @@ public:
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSearchCtrlNameStr);
|
||||
|
||||
~wxSearchCtrl();
|
||||
virtual ~wxSearchCtrl();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
@ -52,7 +51,7 @@ public:
|
||||
// --------------------------
|
||||
virtual void SetMenu( wxMenu* menu );
|
||||
virtual wxMenu* GetMenu();
|
||||
|
||||
|
||||
// get/set search options
|
||||
// ----------------------
|
||||
virtual void ShowSearchButton( bool show );
|
||||
|
@ -2,9 +2,8 @@
|
||||
// Name: wx/mac/carbon/srchctrl.h
|
||||
// Purpose: mac carbon wxSearchCtrl class
|
||||
// Author: Vince Harron
|
||||
// Modified by:
|
||||
// Created: 2006-02-19
|
||||
// RCS-ID:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: Vince Harron
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -31,7 +30,7 @@ public:
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSearchCtrlNameStr);
|
||||
|
||||
~wxSearchCtrl();
|
||||
virtual ~wxSearchCtrl();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
@ -45,7 +44,7 @@ public:
|
||||
// --------------------------
|
||||
virtual void SetMenu( wxMenu* menu );
|
||||
virtual wxMenu* GetMenu();
|
||||
|
||||
|
||||
// get/set search options
|
||||
// ----------------------
|
||||
virtual void ShowSearchButton( bool show );
|
||||
@ -59,13 +58,13 @@ public:
|
||||
|
||||
wxMacSearchFieldControl * GetPeer() const
|
||||
{ return (wxMacSearchFieldControl*) m_peer; }
|
||||
|
||||
|
||||
virtual void SetFocus();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
wxSize DoGetBestSize() const;
|
||||
|
||||
|
||||
void Init();
|
||||
|
||||
virtual void CreatePeer(
|
||||
|
@ -2,9 +2,8 @@
|
||||
// Name: srchctrl.h
|
||||
// Purpose: wxSearchCtrlBase class
|
||||
// Author: Vince Harron
|
||||
// Modified by:
|
||||
// Created: 2006-02-18
|
||||
// RCS-ID:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Vince Harron
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -2,9 +2,8 @@
|
||||
// Name: src/generic/srchctlg.cpp
|
||||
// Purpose: implements wxSearchCtrl as a composite control
|
||||
// Author: Vince Harron
|
||||
// Modified by:
|
||||
// Created: 2006-02-19
|
||||
// RCS-ID:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: Vince Harron
|
||||
// License: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -72,7 +71,7 @@ public:
|
||||
style | wxNO_BORDER)
|
||||
{
|
||||
m_search = search;
|
||||
|
||||
|
||||
// remove the default minsize, the searchctrl will have one instead
|
||||
SetSizeHints(wxDefaultCoord,wxDefaultCoord);
|
||||
}
|
||||
@ -92,7 +91,7 @@ protected:
|
||||
// copy constructor is disabled for some reason?
|
||||
//wxTextUrlEvent event(eventText);
|
||||
wxTextUrlEvent event(
|
||||
m_search->GetId(),
|
||||
m_search->GetId(),
|
||||
eventText.GetMouseEvent(),
|
||||
eventText.GetURLStart(),
|
||||
eventText.GetURLEnd()
|
||||
@ -131,13 +130,13 @@ public:
|
||||
|
||||
void SetBitmapLabel(const wxBitmap& label) { m_bmp = label; }
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
wxSize DoGetBestSize() const
|
||||
{
|
||||
return wxSize(m_bmp.GetWidth(), m_bmp.GetHeight());
|
||||
}
|
||||
|
||||
|
||||
void OnLeftUp(wxMouseEvent&)
|
||||
{
|
||||
wxCommandEvent event(m_eventType, m_search->GetId());
|
||||
@ -160,7 +159,7 @@ protected:
|
||||
dc.DrawBitmap(m_bmp, 0,0, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
wxSearchCtrl *m_search;
|
||||
wxEventType m_eventType;
|
||||
@ -193,7 +192,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxSearchCtrl, wxSearchCtrlBase)
|
||||
// --------
|
||||
|
||||
wxSearchCtrl::wxSearchCtrl()
|
||||
{
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
@ -1004,9 +1003,9 @@ void wxSearchCtrl::RecalcBitmaps()
|
||||
|
||||
if ( !m_searchBitmapUser )
|
||||
{
|
||||
if (
|
||||
if (
|
||||
!m_searchBitmap.Ok() ||
|
||||
m_searchBitmap.GetHeight() != bitmapHeight ||
|
||||
m_searchBitmap.GetHeight() != bitmapHeight ||
|
||||
m_searchBitmap.GetWidth() != bitmapWidth
|
||||
)
|
||||
{
|
||||
@ -1021,9 +1020,9 @@ void wxSearchCtrl::RecalcBitmaps()
|
||||
|
||||
if ( !m_searchMenuBitmapUser )
|
||||
{
|
||||
if (
|
||||
if (
|
||||
!m_searchMenuBitmap.Ok() ||
|
||||
m_searchMenuBitmap.GetHeight() != bitmapHeight ||
|
||||
m_searchMenuBitmap.GetHeight() != bitmapHeight ||
|
||||
m_searchMenuBitmap.GetWidth() != bitmapWidth
|
||||
)
|
||||
{
|
||||
@ -1038,9 +1037,9 @@ void wxSearchCtrl::RecalcBitmaps()
|
||||
|
||||
if ( !m_cancelBitmapUser )
|
||||
{
|
||||
if (
|
||||
if (
|
||||
!m_cancelBitmap.Ok() ||
|
||||
m_cancelBitmap.GetHeight() != bitmapHeight ||
|
||||
m_cancelBitmap.GetHeight() != bitmapHeight ||
|
||||
m_cancelBitmap.GetWidth() != bitmapHeight
|
||||
)
|
||||
{
|
||||
|
@ -2,9 +2,8 @@
|
||||
// Name: src/mac/carbon/srchctrl.cpp
|
||||
// Purpose: implements mac carbon wxSearchCtrl
|
||||
// Author: Vince Harron
|
||||
// Modified by:
|
||||
// Created: 2006-02-19
|
||||
// RCS-ID:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: Vince Harron
|
||||
// License: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -90,14 +89,14 @@ void wxMacSearchFieldControl::CreateControl( wxTextCtrl* /*peer*/, const Rect* b
|
||||
attributes = kHISearchFieldAttributesSearchIcon;
|
||||
}
|
||||
HIRect hibounds = { { bounds->left, bounds->top }, { bounds->right-bounds->left, bounds->bottom-bounds->top } };
|
||||
verify_noerr( HISearchFieldCreate(
|
||||
verify_noerr( HISearchFieldCreate(
|
||||
&hibounds,
|
||||
attributes,
|
||||
0, // MenuRef
|
||||
CFSTR("Search"),
|
||||
&m_controlRef
|
||||
) );
|
||||
HIViewSetVisible (m_controlRef, true);
|
||||
HIViewSetVisible (m_controlRef, true);
|
||||
}
|
||||
|
||||
// search field options
|
||||
@ -120,7 +119,7 @@ void wxMacSearchFieldControl::SetSearchButtonVisible( bool show )
|
||||
}
|
||||
|
||||
bool wxMacSearchFieldControl::GetSearchButtonVisible() const
|
||||
{
|
||||
{
|
||||
OptionBits attributes = 0;
|
||||
verify_noerr( HISearchFieldGetAttributes( m_controlRef, &attributes ) );
|
||||
return ( attributes & kHISearchFieldAttributesSearchIcon ) != 0;
|
||||
@ -142,7 +141,7 @@ void wxMacSearchFieldControl::SetCancelButtonVisible( bool show )
|
||||
}
|
||||
|
||||
bool wxMacSearchFieldControl::GetCancelButtonVisible() const
|
||||
{
|
||||
{
|
||||
OptionBits attributes = 0;
|
||||
verify_noerr( HISearchFieldGetAttributes( m_controlRef, &attributes ) );
|
||||
return ( attributes & kHISearchFieldAttributesCancel ) != 0;
|
||||
@ -207,7 +206,7 @@ DEFINE_ONE_SHOT_HANDLER_GETTER( wxMacSearchControlEventHandler )
|
||||
// --------
|
||||
|
||||
wxSearchCtrl::wxSearchCtrl()
|
||||
{
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
@ -261,7 +260,7 @@ wxSize wxSearchCtrl::DoGetBestSize() const
|
||||
// it seems to return a default width of about 16, which is way too small here.
|
||||
if (size.GetWidth() < 100)
|
||||
size.SetWidth(100);
|
||||
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user