]>
Commit | Line | Data |
---|---|---|
569c7d8c VZ |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/msw/timectrl.h | |
3 | // Purpose: wxTimePickerCtrl for Windows. | |
4 | // Author: Vadim Zeitlin | |
5 | // Created: 2011-09-22 | |
569c7d8c VZ |
6 | // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwindows.org> |
7 | // Licence: wxWindows licence | |
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifndef _WX_MSW_TIMECTRL_H_ | |
11 | #define _WX_MSW_TIMECTRL_H_ | |
12 | ||
13 | // ---------------------------------------------------------------------------- | |
14 | // wxTimePickerCtrl | |
15 | // ---------------------------------------------------------------------------- | |
16 | ||
17 | class WXDLLIMPEXP_ADV wxTimePickerCtrl : public wxTimePickerCtrlBase | |
18 | { | |
19 | public: | |
20 | // ctors | |
21 | wxTimePickerCtrl() { } | |
22 | ||
23 | wxTimePickerCtrl(wxWindow *parent, | |
24 | wxWindowID id, | |
25 | const wxDateTime& dt = wxDefaultDateTime, | |
26 | const wxPoint& pos = wxDefaultPosition, | |
27 | const wxSize& size = wxDefaultSize, | |
28 | long style = wxTP_DEFAULT, | |
29 | const wxValidator& validator = wxDefaultValidator, | |
30 | const wxString& name = wxTimePickerCtrlNameStr) | |
31 | { | |
32 | Create(parent, id, dt, pos, size, style, validator, name); | |
33 | } | |
34 | ||
35 | bool Create(wxWindow *parent, | |
36 | wxWindowID id, | |
37 | const wxDateTime& dt = wxDefaultDateTime, | |
38 | const wxPoint& pos = wxDefaultPosition, | |
39 | const wxSize& size = wxDefaultSize, | |
40 | long style = wxTP_DEFAULT, | |
41 | const wxValidator& validator = wxDefaultValidator, | |
42 | const wxString& name = wxTimePickerCtrlNameStr) | |
43 | { | |
44 | return MSWCreateDateTimePicker(parent, id, dt, | |
45 | pos, size, style, | |
46 | validator, name); | |
47 | } | |
48 | ||
49 | // Override MSW-specific functions used during control creation. | |
50 | virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; | |
51 | ||
52 | protected: | |
53 | virtual wxLocaleInfo MSWGetFormat() const; | |
54 | virtual bool MSWAllowsNone() const { return false; } | |
55 | virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch); | |
56 | ||
57 | wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTimePickerCtrl); | |
58 | }; | |
59 | ||
60 | #endif // _WX_MSW_TIMECTRL_H_ |