X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32f1f66a3e79f705db1e3beb7d58f6763c5fb878..a7689c49fe02c0c065facf736ab28b19f5997b7c:/include/wx/msw/datectrl.h diff --git a/include/wx/msw/datectrl.h b/include/wx/msw/datectrl.h index 2faab5ac34..f4b5b3d242 100644 --- a/include/wx/msw/datectrl.h +++ b/include/wx/msw/datectrl.h @@ -27,7 +27,7 @@ public: const wxDateTime& dt = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, + long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxDatePickerCtrlNameStr) { @@ -39,29 +39,27 @@ public: const wxDateTime& dt = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, + long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxDatePickerCtrlNameStr); - // set/get the date + // Override this one to add date-specific (and time-ignoring) checks. virtual void SetValue(const wxDateTime& dt); virtual wxDateTime GetValue() const; - // set/get the allowed valid range for the dates, if either/both of them - // are invalid, there is no corresponding limit and if neither is set - // GetRange() returns false + // Implement the base class pure virtuals. virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2); virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const; -protected: + // Override MSW-specific functions used during control creation. virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; - virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); - - virtual wxSize DoGetBestSize() const; - +protected: + virtual wxLocaleInfo MSWGetFormat() const; + virtual bool MSWAllowsNone() const { return HasFlag(wxDP_ALLOWNONE); } + virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch); - DECLARE_NO_COPY_CLASS(wxDatePickerCtrl) + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDatePickerCtrl) }; #endif // _WX_MSW_DATECTRL_H_