X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9467bdb7f5bfde9f99331097daacb93564ca122e..3a4cf8a84d9a41c63125c1c1cdd6d0fbb98f41f0:/src/univ/slider.cpp diff --git a/src/univ/slider.cpp b/src/univ/slider.cpp index 4df2aae29a..3d588d1ae3 100644 --- a/src/univ/slider.cpp +++ b/src/univ/slider.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 09.02.01 -// RCS-ID: $Id$ // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -96,8 +95,6 @@ static const wxCoord SLIDER_LABEL_MARGIN = 2; // implementation of wxSlider // ============================================================================ -IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl) - BEGIN_EVENT_TABLE(wxSlider, wxControl) EVT_SIZE(wxSlider::OnSize) END_EVENT_TABLE() @@ -171,7 +168,7 @@ bool wxSlider::Create(wxWindow *parent, // call this after setting the range as the best size depends (at least if // we have wxSL_LABELS style) on the range - SetBestSize(size); + SetInitialSize(size); CreateInputHandler(wxINP_HANDLER_SLIDER); @@ -210,7 +207,7 @@ bool wxSlider::ChangeValueTo(int value) // this method is protected and we should only call it with normalized // value! - wxCHECK_MSG( IsInRange(value), false, _T("invalid slider value") ); + wxCHECK_MSG( IsInRange(value), false, wxT("invalid slider value") ); m_value = value; @@ -222,7 +219,7 @@ bool wxSlider::ChangeValueTo(int value) eventScroll.SetEventObject( this ); (void)GetEventHandler()->ProcessEvent(eventScroll); - wxCommandEvent event(wxEVT_COMMAND_SLIDER_UPDATED, GetId()); + wxCommandEvent event(wxEVT_SLIDER, GetId()); event.SetInt(m_value); event.SetEventObject(this); (void)GetEventHandler()->ProcessEvent(event); @@ -287,14 +284,14 @@ int wxSlider::GetMax() const void wxSlider::SetLineSize(int lineSize) { - wxCHECK_RET( lineSize >= 0, _T("invalid slider line size") ); + wxCHECK_RET( lineSize >= 0, wxT("invalid slider line size") ); m_lineSize = lineSize; } void wxSlider::SetPageSize(int pageSize) { - wxCHECK_RET( pageSize >= 0, _T("invalid slider page size") ); + wxCHECK_RET( pageSize >= 0, wxT("invalid slider page size") ); m_pageSize = pageSize; } @@ -323,7 +320,7 @@ int wxSlider::GetPageSize() const void wxSlider::SetThumbLength(int lenPixels) { - wxCHECK_RET( lenPixels >= 0, _T("invalid slider thumb size") ); + wxCHECK_RET( lenPixels >= 0, wxT("invalid slider thumb size") ); // use m_thumbSize here directly and not GetThumbLength() to avoid setting // it to the default value as we don't need it @@ -354,9 +351,9 @@ int wxSlider::GetThumbLength() const // wxSlider ticks // ---------------------------------------------------------------------------- -void wxSlider::SetTickFreq(int n, int WXUNUSED(dummy)) +void wxSlider::DoSetTickFreq(int n) { - wxCHECK_RET (n > 0, _T("invalid slider tick frequency")); + wxCHECK_RET (n > 0, wxT("invalid slider tick frequency")); if ( n != m_tickFreq ) { @@ -376,7 +373,7 @@ wxSize wxSlider::CalcLabelSize() const // there is no sense in trying to calc the labels size if we haven't got // any, the caller must check for it - wxCHECK_MSG( HasLabels(), size, _T("shouldn't be called") ); + wxCHECK_MSG( HasLabels(), size, wxT("shouldn't be called") ); wxCoord w1, h1, w2, h2; GetTextExtent(FormatValue(m_min), &w1, &h1); @@ -690,7 +687,7 @@ void wxSlider::CalcThumbRect(const wxRect *rectShaftIn, wxString wxSlider::FormatValue(int value) const { - return wxString::Format(_T("%d"), value); + return wxString::Format(wxT("%d"), value); } void wxSlider::DoDraw(wxControlRenderer *renderer)