1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/timectrl_osx.cpp
3 // Purpose: Implementation of wxTimePickerCtrl for OS X.
4 // Author: Vadim Zeitlin
6 // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
10 // ============================================================================
12 // ============================================================================
14 // ----------------------------------------------------------------------------
16 // ----------------------------------------------------------------------------
18 // for compilers that support precompilation, includes "wx.h".
19 #include "wx/wxprec.h"
25 #if wxUSE_TIMEPICKCTRL && wxOSX_USE_COCOA
27 #include "wx/timectrl.h"
28 #include "wx/dateevt.h"
30 #include "wx/osx/core/private/datetimectrl.h"
32 // ============================================================================
33 // wxTimePickerCtrl implementation
34 // ============================================================================
36 wxIMPLEMENT_DYNAMIC_CLASS(wxTimePickerCtrl
, wxControl
);
39 wxTimePickerCtrl::Create(wxWindow
*parent
,
45 const wxValidator
& validator
,
50 if ( !wxTimePickerCtrlBase::Create(parent
, id
, pos
, size
,
51 style
, validator
, name
) )
54 wxOSXWidgetImpl
* const peer
= wxDateTimeWidgetImpl::CreateDateTimePicker
61 wxDateTimeWidget_HourMinuteSecond
68 MacPostControlCreate(pos
, size
);
73 void wxTimePickerCtrl::OSXGenerateEvent(const wxDateTime
& dt
)
75 wxDateEvent
event(this, dt
, wxEVT_TIME_CHANGED
);
76 HandleWindowEvent(event
);
79 #endif // wxUSE_TIMEPICKCTRL && wxOSX_USE_COCOA