]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/datectrl.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / msw / datectrl.h
CommitLineData
32f1f66a
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/msw/datectrl.h
3// Purpose: wxDatePickerCtrl for Windows
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 2005-01-09
32f1f66a
VZ
7// Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org>
8// Licence: wxWindows licence
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_MSW_DATECTRL_H_
12#define _WX_MSW_DATECTRL_H_
13
14// ----------------------------------------------------------------------------
15// wxDatePickerCtrl
16// ----------------------------------------------------------------------------
17
18class WXDLLIMPEXP_ADV wxDatePickerCtrl : public wxDatePickerCtrlBase
19{
20public:
21 // ctors
22 wxDatePickerCtrl() { }
23
24 wxDatePickerCtrl(wxWindow *parent,
25 wxWindowID id,
26 const wxDateTime& dt = wxDefaultDateTime,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
2cfbeac8 29 long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
32f1f66a
VZ
30 const wxValidator& validator = wxDefaultValidator,
31 const wxString& name = wxDatePickerCtrlNameStr)
32 {
33 Create(parent, id, dt, pos, size, style, validator, name);
34 }
35
36 bool Create(wxWindow *parent,
37 wxWindowID id,
38 const wxDateTime& dt = wxDefaultDateTime,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
2cfbeac8 41 long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
32f1f66a
VZ
42 const wxValidator& validator = wxDefaultValidator,
43 const wxString& name = wxDatePickerCtrlNameStr);
44
8957e55e 45 // Override this one to add date-specific (and time-ignoring) checks.
32f1f66a
VZ
46 virtual void SetValue(const wxDateTime& dt);
47 virtual wxDateTime GetValue() const;
48
8957e55e 49 // Implement the base class pure virtuals.
32f1f66a
VZ
50 virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2);
51 virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const;
52
8957e55e 53 // Override MSW-specific functions used during control creation.
32f1f66a
VZ
54 virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
55
6f02a879 56protected:
8957e55e
VZ
57 virtual wxLocaleInfo MSWGetFormat() const;
58 virtual bool MSWAllowsNone() const { return HasFlag(wxDP_ALLOWNONE); }
59 virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch);
32f1f66a 60
a69e2a0a 61 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDatePickerCtrl)
32f1f66a
VZ
62};
63
64#endif // _WX_MSW_DATECTRL_H_