]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/datetimectrl.h
Explicitly use _stati64() with MinGW-W64.
[wxWidgets.git] / include / wx / msw / datetimectrl.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/datetimectrl.h
3 // Purpose: wxDateTimePickerCtrl for Windows.
4 // Author: Vadim Zeitlin
5 // Created: 2011-09-22 (extracted from wx/msw/datectrl.h).
6 // RCS-ID: $Id$
7 // Copyright: (c) 2005-2011 Vadim Zeitlin <vadim@wxwindows.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_MSW_DATETIMECTRL_H_
12 #define _WX_MSW_DATETIMECTRL_H_
13
14 #include "wx/intl.h"
15
16 // Forward declare a struct from Platform SDK.
17 struct tagNMDATETIMECHANGE;
18
19 // ----------------------------------------------------------------------------
20 // wxDateTimePickerCtrl
21 // ----------------------------------------------------------------------------
22
23 class WXDLLIMPEXP_ADV wxDateTimePickerCtrl : public wxDateTimePickerCtrlBase
24 {
25 public:
26 // set/get the date
27 virtual void SetValue(const wxDateTime& dt);
28 virtual wxDateTime GetValue() const;
29
30 // returns true if the platform should explicitly apply a theme border
31 virtual bool CanApplyThemeBorder() const { return false; }
32
33 virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
34
35 protected:
36 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
37 virtual wxSize DoGetBestSize() const;
38
39 // Helper for the derived classes Create(): creates a native control with
40 // the specified attributes.
41 bool MSWCreateDateTimePicker(wxWindow *parent,
42 wxWindowID id,
43 const wxDateTime& dt,
44 const wxPoint& pos,
45 const wxSize& size,
46 long style,
47 const wxValidator& validator,
48 const wxString& name);
49
50 // Override to return the date/time format used by this control.
51 virtual wxLocaleInfo MSWGetFormat() const = 0;
52
53 // Override to indicate whether we can have no date at all.
54 virtual bool MSWAllowsNone() const = 0;
55
56 // Override to update m_date and send the event when the control contents
57 // changes, return true if the event was handled.
58 virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch) = 0;
59
60
61 // the date currently shown by the control, may be invalid
62 wxDateTime m_date;
63 };
64
65 #endif // _WX_MSW_DATETIMECTRL_H_