]> git.saurik.com Git - wxWidgets.git/blame - include/wx/calctrl.h
Updated wxvc_dll.dsp and memory.h to make VC++ compile in DLL mode again
[wxWidgets.git] / include / wx / calctrl.h
CommitLineData
9d9b7755
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/calctrl.h
3// Purpose: date-picker control
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 29.12.99
7// RCS-ID: $Id$
8// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9// Licence: wxWindows license
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CALCTRL_H
13#define _WX_CALCTRL_H
14
0185cd09
VZ
15// ----------------------------------------------------------------------------
16// constants
17// ----------------------------------------------------------------------------
18
19// return values for the HitTest() method
20enum wxCalendarHitTestResult
21{
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
25};
26
27// ----------------------------------------------------------------------------
28// wxCalendarCtrl
29// ----------------------------------------------------------------------------
30
9d9b7755
VZ
31// so far we only have a generic version, so keep it simple
32#include "wx/generic/calctrl.h"
33
34// ----------------------------------------------------------------------------
35// wxCalendarCtrl events
36// ----------------------------------------------------------------------------
37
38class WXDLLEXPORT wxCalendarEvent : public wxCommandEvent
39{
0185cd09 40friend class wxCalendarCtrl;
9d9b7755 41public:
0185cd09 42 wxCalendarEvent() { Init(); }
9d9b7755
VZ
43 wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type);
44
45 const wxDateTime& GetDate() const { return m_date; }
0185cd09
VZ
46 wxDateTime::WeekDay GetWeekDay() const { return m_wday; }
47
48protected:
49 void Init();
9d9b7755
VZ
50
51private:
52 wxDateTime m_date;
0185cd09 53 wxDateTime::WeekDay m_wday;
9d9b7755
VZ
54};
55
0185cd09
VZ
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 },
9d9b7755
VZ
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 },
0185cd09 61#define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) { wxEVT_CALENDAR_WEEKDAY_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
9d9b7755
VZ
62
63#endif // _WX_CALCTRL_H