From: Steve Brokenshire Date: Sat, 16 Jul 2016 21:14:45 +0000 (+0100) Subject: Added XCCalendarMonthView* param to the XCCalendarDay::SetupControl function X-Git-Tag: release-0.02~97 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=c9db1bda434713b98f282ef6bb9abd5a2337bb9e;p=xestiacalendar%2F.git Added XCCalendarMonthView* param to the XCCalendarDay::SetupControl function --- 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);