}
+ // Send event notification to deselect the other calendar entries.
+
+ if (this->MonthViewPointer != nullptr){
+
+ wxCommandEvent DeselectEvent(XCCALENDARMONTH_DESELECTOTHERENTRIES);
+ DeselectEvent.SetClientData(this);
+ DeselectEvent.SetId(ID_MONTHVIEWCLEARSELECTION);
+ wxPostEvent(this->MonthViewPointer, DeselectEvent);
+
+ }
+
+}
+
+void XCCalendarDay::DeselectAllEvent(wxCommandEvent &DeselectEvent)
+{
+
+ int SelectedEntryID = DeselectEvent.GetInt();
+
+ wxCommandEvent DeselectEntryEvent(XCCALENDARDAYENTRY_DESELECT);
+
+ for (vector<XCCalendarDayEntry*>::iterator EntryIter = CalendarEntryList.begin();
+ EntryIter != CalendarEntryList.end(); EntryIter++){
+
+ wxPostEvent((*EntryIter), DeselectEntryEvent);
+
+ }
+
}
void XCCalendarDay::SetupControl(int SetupDay, int SetupMonth, int SetupYear, bool SetupIsInMonth, XCCalendarMonthView *MonthViewPointer)
#include "../common/events.h"
class XCCalendarMonthView;
+
class XCCalendarDay: public wxPanel
{
private:
+ XCCalendarMonthView *MonthViewPointer = nullptr;
wxFlexGridSizer *WindowSizer = new wxFlexGridSizer(2, 1, 0, 0);
wxBoxSizer *TopSectionSizer = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *MainSectionSizer = new wxBoxSizer(wxVERTICAL);
void PaintFrameEvent(wxPaintEvent &PaintEvent);
void ResizeFrameEvent(wxSizeEvent &SizeEvent);
void DeselectOthersEvent(wxCommandEvent &DeselectEvent);
+ void DeselectAllEvent(wxCommandEvent &DeselectEvent);
void UpdateTopIcons();
void SetupControl(int SetupDay, int SetupMonth, int SetupYear, bool SetupIsInMonth, XCCalendarMonthView *MonthViewPointer);
DECLARE_EVENT_TABLE()
+
};
#endif
\ No newline at end of file