X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..abe5726aff7744e67c81f8dd6a2116dab0ec9a53:/src/generic/calctrl.cpp diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index f2ecd265a1..a6a8779994 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -97,6 +97,17 @@ END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS(wxCalendarCtrl, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxCalendarEvent, wxCommandEvent) +// ---------------------------------------------------------------------------- +// events +// ---------------------------------------------------------------------------- + +DEFINE_EVENT_TYPE(wxEVT_CALENDAR_SEL_CHANGED) +DEFINE_EVENT_TYPE(wxEVT_CALENDAR_DAY_CHANGED) +DEFINE_EVENT_TYPE(wxEVT_CALENDAR_MONTH_CHANGED) +DEFINE_EVENT_TYPE(wxEVT_CALENDAR_YEAR_CHANGED) +DEFINE_EVENT_TYPE(wxEVT_CALENDAR_DOUBLECLICKED) +DEFINE_EVENT_TYPE(wxEVT_CALENDAR_WEEKDAY_CLICKED) + // ============================================================================ // implementation // ============================================================================ @@ -469,7 +480,7 @@ wxSize wxCalendarCtrl::DoGetBestSize() const if ( GetWindowStyle() & (wxRAISED_BORDER | wxSUNKEN_BORDER) ) { // the border would clip the last line otherwise - height += 4; + height += 6; } return wxSize(width, height); @@ -637,7 +648,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) wxCalendarDateAttr *attr = m_attrs[day - 1]; - bool isSel = m_date == date; + bool isSel = date.IsSameDate(m_date); if ( isSel ) { dc.SetTextForeground(m_colHighlightFg);