]>
Commit | Line | Data |
---|---|---|
51317496 VZ |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/msw/calctrl.h | |
3 | // Purpose: wxCalendarCtrl control implementation for MSW | |
4 | // Author: Vadim Zeitlin | |
5 | // RCS-ID: $Id$ | |
6 | // Copyright: (C) 2008 Vadim Zeitlin <vadim@wxwidgets.org> | |
7 | // Licence: wxWindows licence | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifndef _WX_MSW_CALCTRL_H_ | |
11 | #define _WX_MSW_CALCTRL_H_ | |
12 | ||
13 | class WXDLLIMPEXP_ADV wxCalendarCtrl : public wxCalendarCtrlBase | |
14 | { | |
15 | public: | |
16 | wxCalendarCtrl() { } | |
17 | wxCalendarCtrl(wxWindow *parent, | |
18 | wxWindowID id, | |
19 | const wxDateTime& date = wxDefaultDateTime, | |
20 | const wxPoint& pos = wxDefaultPosition, | |
21 | const wxSize& size = wxDefaultSize, | |
22 | long style = wxCAL_SHOW_HOLIDAYS, | |
23 | const wxString& name = wxCalendarNameStr) | |
24 | { | |
25 | Create(parent, id, date, pos, size, style, name); | |
26 | } | |
27 | ||
28 | bool Create(wxWindow *parent, | |
29 | wxWindowID id, | |
30 | const wxDateTime& date = wxDefaultDateTime, | |
31 | const wxPoint& pos = wxDefaultPosition, | |
32 | const wxSize& size = wxDefaultSize, | |
33 | long style = wxCAL_SHOW_HOLIDAYS, | |
34 | const wxString& name = wxCalendarNameStr); | |
35 | ||
36 | virtual bool SetDate(const wxDateTime& date); | |
37 | virtual wxDateTime GetDate() const; | |
38 | ||
39 | virtual bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime, | |
40 | const wxDateTime& upperdate = wxDefaultDateTime); | |
41 | virtual bool GetDateRange(wxDateTime *lowerdate, wxDateTime *upperdate) const; | |
42 | ||
43 | virtual bool EnableMonthChange(bool enable = true); | |
44 | ||
45 | virtual void Mark(size_t day, bool mark); | |
46 | ||
47 | protected: | |
48 | virtual wxSize wxCalendarCtrl::DoGetBestSize() const; | |
49 | ||
50 | virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; | |
51 | ||
52 | virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); | |
53 | ||
54 | private: | |
55 | DECLARE_DYNAMIC_CLASS(wxCalendarCtrl) | |
56 | DECLARE_NO_COPY_CLASS(wxCalendarCtrl) | |
57 | }; | |
58 | ||
59 | #endif // _WX_MSW_CALCTRL_H_ |