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