// RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott
// (c) 2007 Software 2000 Ltd.
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#import <AppKit/NSEvent.h>
#import <AppKit/NSWindow.h>
-IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
- BEGIN_EVENT_TABLE(wxSlider, wxSliderBase)
+BEGIN_EVENT_TABLE(wxSlider, wxSliderBase)
END_EVENT_TABLE()
WX_IMPLEMENT_COCOA_OWNER(wxSlider,NSSlider,NSControl,NSView)
// minValue > maxValue not handled, tickMarks set to 0
if ( style & wxSL_AUTOTICKS )
tickMarks = ((maxValue - minValue >= 0) ? (maxValue - minValue) : 0);
- // arg2 needed a value, doesnt do anything
- SetTickFreq(tickMarks,1);
+ SetTickFreq(tickMarks);
return true;
}
{
wxScrollEvent event(commandType, GetId(), GetValue(), HasFlag(wxSL_VERTICAL)?wxVERTICAL:wxHORIZONTAL);
event.SetEventObject(this);
- GetEventHandler()->ProcessEvent(event);
+ HandleWindowEvent(event);
}
static inline wxEventType wxSliderEventTypeForKeyFromEvent(NSEvent *theEvent)
return [GetNSSlider() maxValue];
}
-void wxSlider::SetTickFreq(int n, int pos)
+void wxSlider::DoSetTickFreq(int n)
{
const int numTicks = (n > 0) ? ((GetMax() - GetMin()) / n) + 1 : 0;
[GetNSSlider() setNumberOfTickMarks:numTicks];