From 8bc333d76d46ce8b3a0077e211ff1485673ae725 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 11 Dec 2006 14:14:07 +0000 Subject: [PATCH] added $Id$ to the header git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/srchctlg.h | 7 +++---- include/wx/mac/carbon/srchctrl.h | 13 ++++++------- include/wx/srchctrl.h | 3 +-- src/generic/srchctlg.cpp | 27 +++++++++++++-------------- src/mac/carbon/srchctrl.cpp | 15 +++++++-------- 5 files changed, 30 insertions(+), 35 deletions(-) diff --git a/include/wx/generic/srchctlg.h b/include/wx/generic/srchctlg.h index 223ad39f31..84daadaa38 100644 --- a/include/wx/generic/srchctlg.h +++ b/include/wx/generic/srchctlg.h @@ -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 ); diff --git a/include/wx/mac/carbon/srchctrl.h b/include/wx/mac/carbon/srchctrl.h index 980b707594..6c3f2496a2 100644 --- a/include/wx/mac/carbon/srchctrl.h +++ b/include/wx/mac/carbon/srchctrl.h @@ -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( diff --git a/include/wx/srchctrl.h b/include/wx/srchctrl.h index a5ea78dd73..e9d2a277c5 100644 --- a/include/wx/srchctrl.h +++ b/include/wx/srchctrl.h @@ -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 ///////////////////////////////////////////////////////////////////////////// diff --git a/src/generic/srchctlg.cpp b/src/generic/srchctlg.cpp index b4f18fd782..45647bbf92 100644 --- a/src/generic/srchctlg.cpp +++ b/src/generic/srchctlg.cpp @@ -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 ) { diff --git a/src/mac/carbon/srchctrl.cpp b/src/mac/carbon/srchctrl.cpp index fc3e1e6f04..7af18fe184 100644 --- a/src/mac/carbon/srchctrl.cpp +++ b/src/mac/carbon/srchctrl.cpp @@ -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; } -- 2.45.2