XCCalendarMonthView::XCCalendarMonthView(const wxString& title, const wxPoint& pos, const wxSize& size, XCCalendarMonthViewGrid *grid)
: wxFrame(NULL, wxID_ANY, title, pos, size){
+ Connect(ID_MONTHVIEWCLEARSELECTION, XCCALENDARMONTH_DESELECTOTHERENTRIES, wxCommandEventHandler(XCCalendarMonthView::DeselectOthersEvent));
+
MondayText = new XCCalendarMonthViewDayTitle(this, _("Monday"), wxDefaultPosition, wxDefaultSize);
TuesdayText = new XCCalendarMonthViewDayTitle(this, _("Tuesday"), wxDefaultPosition, wxDefaultSize);
WednesdayText = new XCCalendarMonthViewDayTitle(this, _("Wednesday"), wxDefaultPosition, wxDefaultSize);
this->Refresh();
+}
+
+void XCCalendarMonthView::DeselectOthersEvent(wxCommandEvent &DeselectEvent){
+
+ for (vector<XCCalendarDay*>::iterator DayIter = CalendarDayList.begin();
+ DayIter != CalendarDayList.end(); DayIter++){
+
+ if (DeselectEvent.GetClientData() != (void*)(*DayIter)){
+
+ wxCommandEvent DeselectEvent(XCCALENDARDAY_DESELECTALLENTRIES);
+ DeselectEvent.SetId(ID_DESELECTALLITEMS);
+ wxPostEvent((*DayIter), DeselectEvent);
+
+ }
+
+ }
+
}
\ No newline at end of file