X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/19bc15143af345787753717e2a1b22a29e339469..54753c3d75cce7721667aef855fe30a0f90dcedd:/src/os2/slider.cpp diff --git a/src/os2/slider.cpp b/src/os2/slider.cpp index eec25e5f92..e74e38ac5e 100644 --- a/src/os2/slider.cpp +++ b/src/os2/slider.cpp @@ -28,8 +28,6 @@ #include "wx/slider.h" #include "wx/os2/private.h" -IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl) - wxSlider::wxSlider() { m_hStaticValue = 0L; @@ -370,7 +368,7 @@ bool wxSlider::Create( ,NULL // no control data ,NULL // no Presentation parameters ); - if (GetFont().Ok()) + if (GetFont().IsOk()) { if (GetFont().GetResourceHandle()) { @@ -883,7 +881,6 @@ int wxSlider::GetValue() const ) ); double dPixelToRange = (double)(nPixelRange - m_nThumbLength)/(double)(m_nRangeMax - m_nRangeMin); - int nNewPos = 0; int nPixelPos = SHORT1FROMMR(::WinSendMsg( GetHwnd() ,SLM_QUERYSLIDERINFO ,MPFROM2SHORT( SMA_SLIDERARMPOSITION @@ -892,7 +889,7 @@ int wxSlider::GetValue() const ,(MPARAM)0 ) ); - nNewPos = (int)(nPixelPos/dPixelToRange); + int nNewPos = (int)(nPixelPos/dPixelToRange); if (nNewPos > (m_nRangeMax - m_nRangeMin)/2) nNewPos++; return nNewPos; @@ -972,13 +969,13 @@ bool wxSlider::OS2OnScroll( int WXUNUSED(nOrientation), vEvent.SetPosition(nNewPos); vEvent.SetEventObject(this); - GetEventHandler()->ProcessEvent(vEvent); + HandleWindowEvent(vEvent); - wxCommandEvent vCevent( wxEVT_COMMAND_SLIDER_UPDATED, GetId() ); + wxCommandEvent vCevent( wxEVT_SLIDER, GetId() ); vCevent.SetInt(nNewPos); vCevent.SetEventObject(this); - return (GetEventHandler()->ProcessEvent(vCevent)); + return (HandleWindowEvent(vCevent)); } // end of wxSlider::OS2OnScroll void wxSlider::SetLineSize( int nLineSize ) @@ -1076,7 +1073,7 @@ void wxSlider::SetTick( } // end of wxSlider::SetTick // For trackbars only -void wxSlider::SetTickFreq( int n, int WXUNUSED(nPos) ) +void wxSlider::DoSetTickFreq( int n ) { SLDCDATA vSlData; WNDPARAMS vWndParams;