#include "wx/slider.h"
#include "wx/os2/private.h"
-IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
-
wxSlider::wxSlider()
{
m_hStaticValue = 0L;
,NULL // no control data
,NULL // no Presentation parameters
);
- if (GetFont().Ok())
+ if (GetFont().IsOk())
{
if (GetFont().GetResourceHandle())
{
)
) + 4; // for bordersizes
- wxColour vColour;
-
- vColour.Set(wxString(wxT("BLACK")));
+ wxColour vColour(*wxBLACK);
- LONG lColor = (LONG)vColour.GetPixel();
+ LONG lColor = (LONG)vColour.GetPixel();
::WinSetPresParam( m_hStaticMin
,PP_FOREGROUNDCOLOR
)
);
double dPixelToRange = (double)(nPixelRange - m_nThumbLength)/(double)(m_nRangeMax - m_nRangeMin);
- int nNewPos = 0;
int nPixelPos = SHORT1FROMMR(::WinSendMsg( GetHwnd()
,SLM_QUERYSLIDERINFO
,MPFROM2SHORT( SMA_SLIDERARMPOSITION
,(MPARAM)0
)
);
- nNewPos = (int)(nPixelPos/dPixelToRange);
+ int nNewPos = (int)(nPixelPos/dPixelToRange);
if (nNewPos > (m_nRangeMax - m_nRangeMin)/2)
nNewPos++;
return nNewPos;
vEvent.SetPosition(nNewPos);
vEvent.SetEventObject(this);
- GetEventHandler()->ProcessEvent(vEvent);
+ HandleWindowEvent(vEvent);
wxCommandEvent vCevent( wxEVT_COMMAND_SLIDER_UPDATED, GetId() );
vCevent.SetInt(nNewPos);
vCevent.SetEventObject(this);
- return (GetEventHandler()->ProcessEvent(vCevent));
+ return (HandleWindowEvent(vCevent));
} // end of wxSlider::OS2OnScroll
void wxSlider::SetLineSize( int nLineSize )
} // end of wxSlider::SetTick
// For trackbars only
-void wxSlider::SetTickFreq( int n, int WXUNUSED(nPos) )
+void wxSlider::DoSetTickFreq( int n )
{
SLDCDATA vSlData;
WNDPARAMS vWndParams;