1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: date-picker control
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9 // Licence: wxWindows license
10 ///////////////////////////////////////////////////////////////////////////////
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 // return values for the HitTest() method
20 enum wxCalendarHitTestResult
22 wxCAL_HITTEST_NOWHERE
, // outside of anything
23 wxCAL_HITTEST_HEADER
, // on the header (weekdays)
24 wxCAL_HITTEST_DAY
// on a day in the calendar
27 // ----------------------------------------------------------------------------
29 // ----------------------------------------------------------------------------
31 // so far we only have a generic version, so keep it simple
32 #include "wx/generic/calctrl.h"
34 // ----------------------------------------------------------------------------
35 // wxCalendarCtrl events
36 // ----------------------------------------------------------------------------
38 class WXDLLEXPORT wxCalendarEvent
: public wxCommandEvent
40 friend class wxCalendarCtrl
;
42 wxCalendarEvent() { Init(); }
43 wxCalendarEvent(wxCalendarCtrl
*cal
, wxEventType type
);
45 const wxDateTime
& GetDate() const { return m_date
; }
46 wxDateTime::WeekDay
GetWeekDay() const { return m_wday
; }
53 wxDateTime::WeekDay m_wday
;
56 #define EVT_CALENDAR(id, fn) { wxEVT_CALENDAR_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
57 #define EVT_CALENDAR_SEL_CHANGED(id, fn) { wxEVT_CALENDAR_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
58 #define EVT_CALENDAR_DAY(id, fn) { wxEVT_CALENDAR_DAY_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
59 #define EVT_CALENDAR_MONTH(id, fn) { wxEVT_CALENDAR_MONTH_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
60 #define EVT_CALENDAR_YEAR(id, fn) { wxEVT_CALENDAR_YEAR_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
61 #define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) { wxEVT_CALENDAR_WEEKDAY_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
63 #endif // _WX_CALCTRL_H