From c9db1bda434713b98f282ef6bb9abd5a2337bb9e Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sat, 16 Jul 2016 22:14:45 +0100 Subject: [PATCH] Added XCCalendarMonthView* param to the XCCalendarDay::SetupControl function --- source/widgets/XCCalendarDay.cpp | 6 +++++- source/widgets/XCCalendarDay.h | 2 +- source/widgets/XCCalendarMonthView.cpp | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/widgets/XCCalendarDay.cpp b/source/widgets/XCCalendarDay.cpp index edc0856..37ce112 100644 --- a/source/widgets/XCCalendarDay.cpp +++ b/source/widgets/XCCalendarDay.cpp @@ -251,7 +251,7 @@ void XCCalendarDay::DeselectOthersEvent(wxCommandEvent &DeselectEvent) } -void XCCalendarDay::SetupControl(int SetupDay, int SetupMonth, int SetupYear, bool SetupIsInMonth) +void XCCalendarDay::SetupControl(int SetupDay, int SetupMonth, int SetupYear, bool SetupIsInMonth, XCCalendarMonthView *MonthViewPointer) { // Set the day @@ -266,4 +266,8 @@ void XCCalendarDay::SetupControl(int SetupDay, int SetupMonth, int SetupYear, bo IsInMonth = SetupIsInMonth; + // Setup the month view pointer. + + this->MonthViewPointer = MonthViewPointer; + } \ No newline at end of file diff --git a/source/widgets/XCCalendarDay.h b/source/widgets/XCCalendarDay.h index 7f6aca4..e1a884b 100644 --- a/source/widgets/XCCalendarDay.h +++ b/source/widgets/XCCalendarDay.h @@ -65,7 +65,7 @@ class XCCalendarDay: public wxPanel void ResizeFrameEvent(wxSizeEvent &SizeEvent); void DeselectOthersEvent(wxCommandEvent &DeselectEvent); void UpdateTopIcons(); - void SetupControl(int SetupDay, int SetupMonth, int SetupYear, bool SetupIsInMonth); + void SetupControl(int SetupDay, int SetupMonth, int SetupYear, bool SetupIsInMonth, XCCalendarMonthView *MonthViewPointer); DECLARE_EVENT_TABLE() }; diff --git a/source/widgets/XCCalendarMonthView.cpp b/source/widgets/XCCalendarMonthView.cpp index 9c23929..9d485ab 100644 --- a/source/widgets/XCCalendarMonthView.cpp +++ b/source/widgets/XCCalendarMonthView.cpp @@ -95,7 +95,7 @@ void XCCalendarMonthView::ProcessGrid(XCCalendarMonthViewGrid *grid){ // Setup the control. - CalendarDayItem->SetupControl((*DayIter).Day, (*DayIter).Month, (*DayIter).Year, (*DayIter).IsInMonth); + CalendarDayItem->SetupControl((*DayIter).Day, (*DayIter).Month, (*DayIter).Year, (*DayIter).IsInMonth, this); CalendarDayList.push_back(CalendarDayItem); WindowSizer->Add(CalendarDayItem, 1, wxEXPAND, 5); -- 2.39.5