1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/timectrl.h
3 // Purpose: Generic implementation of wxTimePickerCtrl.
4 // Author: Paul Breen, Vadim Zeitlin
6 // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GENERIC_TIMECTRL_H_
11 #define _WX_GENERIC_TIMECTRL_H_
13 #include "wx/containr.h"
14 #include "wx/compositewin.h"
16 class WXDLLIMPEXP_ADV wxTimePickerCtrlGeneric
17 : public wxCompositeWindow
< wxNavigationEnabled
<wxTimePickerCtrlBase
> >
20 typedef wxCompositeWindow
< wxNavigationEnabled
<wxTimePickerCtrlBase
> > Base
;
22 // Creating the control.
23 wxTimePickerCtrlGeneric() { Init(); }
24 virtual ~wxTimePickerCtrlGeneric();
25 wxTimePickerCtrlGeneric(wxWindow
*parent
,
27 const wxDateTime
& date
= wxDefaultDateTime
,
28 const wxPoint
& pos
= wxDefaultPosition
,
29 const wxSize
& size
= wxDefaultSize
,
30 long style
= wxTP_DEFAULT
,
31 const wxValidator
& validator
= wxDefaultValidator
,
32 const wxString
& name
= wxTimePickerCtrlNameStr
)
36 (void)Create(parent
, id
, date
, pos
, size
, style
, validator
, name
);
39 bool Create(wxWindow
*parent
,
41 const wxDateTime
& date
= wxDefaultDateTime
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
,
44 long style
= wxTP_DEFAULT
,
45 const wxValidator
& validator
= wxDefaultValidator
,
46 const wxString
& name
= wxTimePickerCtrlNameStr
);
48 // Implement pure virtual wxTimePickerCtrlBase methods.
49 virtual void SetValue(const wxDateTime
& date
);
50 virtual wxDateTime
GetValue() const;
53 virtual wxSize
DoGetBestSize() const;
55 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
60 // Return the list of the windows composing this one.
61 virtual wxWindowList
GetCompositeWindowParts() const;
63 // Implementation data.
64 class wxTimePickerGenericImpl
* m_impl
;
66 wxDECLARE_NO_COPY_CLASS(wxTimePickerCtrlGeneric
);
69 #endif // _WX_GENERIC_TIMECTRL_H_