1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/timectrl_osx.cpp
3 // Purpose: Implementation of wxTimePickerCtrl for OS X.
4 // Author: Vadim Zeitlin
6 // RCS-ID: $Id: wxhead.cpp,v 1.11 2010-04-22 12:44:51 zeitlin Exp $
7 // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 // ============================================================================
13 // ============================================================================
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 // for compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
26 #if wxUSE_TIMEPICKCTRL && wxOSX_USE_COCOA
28 #include "wx/timectrl.h"
29 #include "wx/dateevt.h"
31 #include "wx/osx/core/private/datetimectrl.h"
33 // ============================================================================
34 // wxTimePickerCtrl implementation
35 // ============================================================================
37 wxIMPLEMENT_DYNAMIC_CLASS(wxTimePickerCtrl
, wxControl
);
40 wxTimePickerCtrl::Create(wxWindow
*parent
,
46 const wxValidator
& validator
,
51 if ( !wxTimePickerCtrlBase::Create(parent
, id
, pos
, size
,
52 style
, validator
, name
) )
55 wxOSXWidgetImpl
* const peer
= wxDateTimeWidgetImpl::CreateDateTimePicker
62 wxDateTimeWidget_HourMinuteSecond
69 MacPostControlCreate(pos
, size
);
74 void wxTimePickerCtrl::OSXGenerateEvent(const wxDateTime
& dt
)
76 wxDateEvent
event(this, dt
, wxEVT_TIME_CHANGED
);
77 HandleWindowEvent(event
);
80 #endif // wxUSE_TIMEPICKCTRL && wxOSX_USE_COCOA