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
// ============================================================================
if ( GetWindowStyle() & (wxRAISED_BORDER | wxSUNKEN_BORDER) )
{
// the border would clip the last line otherwise
- height += 4;
+ height += 6;
}
return wxSize(width, height);
wxCalendarDateAttr *attr = m_attrs[day - 1];
- bool isSel = m_date == date;
+ bool isSel = date.IsSameDate(m_date);
if ( isSel )
{
dc.SetTextForeground(m_colHighlightFg);