added API, docs and Win32 implementation of wxDatePickerCtrl

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-01-15 01:31:10 +00:00
parent f38d3607bb
commit feb72429e8
13 changed files with 752 additions and 39 deletions

View File

@@ -23,7 +23,7 @@
#if wxUSE_CALENDARCTRL
#include "wx/datetime.h"
#include "wx/dateevt.h"
#include "wx/colour.h"
#include "wx/font.h"
@@ -161,23 +161,23 @@ private:
class WXDLLIMPEXP_ADV wxCalendarCtrl;
class WXDLLIMPEXP_ADV wxCalendarEvent : public wxCommandEvent
class WXDLLIMPEXP_ADV wxCalendarEvent : public wxDateEvent
{
friend class wxCalendarCtrl;
public:
wxCalendarEvent() { Init(); }
wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type);
const wxDateTime& GetDate() const { return m_date; }
void SetDate(const wxDateTime &date) { m_date = date; }
void SetWeekDay(const wxDateTime::WeekDay wd) { m_wday = wd; }
wxDateTime::WeekDay GetWeekDay() const { return m_wday; }
protected:
void Init();
void Init()
{
m_wday = wxDateTime::Inv_WeekDay;
}
private:
wxDateTime m_date;
wxDateTime::WeekDay m_wday;
DECLARE_DYNAMIC_CLASS_NO_COPY(wxCalendarEvent)
@@ -190,6 +190,14 @@ private:
// so far we only have a generic version, so keep it simple
#include "wx/generic/calctrl.h"
// now we can define the inline ctor using wxCalendarCtrl
inline
wxCalendarEvent::wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type)
: wxDateEvent(cal, cal->GetDate(), type)
{
}
// ----------------------------------------------------------------------------
// calendar event types and macros for handling them
// ----------------------------------------------------------------------------