Remove all lines containing cvs/svn "$Id$" keyword.
[wxWidgets.git] / include / wx / generic / timectrl.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/timectrl.h
3 // Purpose: Generic implementation of wxTimePickerCtrl.
4 // Author: Paul Breen, Vadim Zeitlin
5 // Created: 2011-09-22
6 // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_GENERIC_TIMECTRL_H_
11 #define _WX_GENERIC_TIMECTRL_H_
12
13 #include "wx/containr.h"
14 #include "wx/compositewin.h"
15
16 class WXDLLIMPEXP_ADV wxTimePickerCtrlGeneric
17 : public wxCompositeWindow< wxNavigationEnabled<wxTimePickerCtrlBase> >
18 {
19 public:
20 typedef wxCompositeWindow< wxNavigationEnabled<wxTimePickerCtrlBase> > Base;
21
22 // Creating the control.
23 wxTimePickerCtrlGeneric() { Init(); }
24 virtual ~wxTimePickerCtrlGeneric();
25 wxTimePickerCtrlGeneric(wxWindow *parent,
26 wxWindowID id,
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)
33 {
34 Init();
35
36 (void)Create(parent, id, date, pos, size, style, validator, name);
37 }
38
39 bool Create(wxWindow *parent,
40 wxWindowID id,
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);
47
48 // Implement pure virtual wxTimePickerCtrlBase methods.
49 virtual void SetValue(const wxDateTime& date);
50 virtual wxDateTime GetValue() const;
51
52 protected:
53 virtual wxSize DoGetBestSize() const;
54
55 virtual void DoMoveWindow(int x, int y, int width, int height);
56
57 private:
58 void Init();
59
60 // Return the list of the windows composing this one.
61 virtual wxWindowList GetCompositeWindowParts() const;
62
63 // Implementation data.
64 class wxTimePickerGenericImpl* m_impl;
65
66 wxDECLARE_NO_COPY_CLASS(wxTimePickerCtrlGeneric);
67 };
68
69 #endif // _WX_GENERIC_TIMECTRL_H_