1 // XCCalendarDay.cpp - Xestia Calendar XCCalendarDay widget class.
3 // (c) 2016 Xestia Software Development.
5 // This file is part of Xestia Calendar.
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Calendar. If not, see <http://www.gnu.org/licenses/>
19 #include "XCCalendarDay.h"
23 wxDEFINE_EVENT(XCCALENDARDAY_DESELECTOTHERENTRIES, wxCommandEvent);
24 wxDEFINE_EVENT(XCCALENDARDAY_DESELECTALLENTRIES, wxCommandEvent);
25 wxDEFINE_EVENT(XCCALENDARDAY_HIDEACCOUNTENTRIES, wxCommandEvent);
26 wxDEFINE_EVENT(XCCALENDARDAY_SHOWACCOUNTENTRIES, wxCommandEvent);
27 wxDEFINE_EVENT(XCCALENDARDAY_HIDECALENDARENTRIES, wxCommandEvent);
28 wxDEFINE_EVENT(XCCALENDARDAY_SHOWCALENDARENTRIES, wxCommandEvent);
29 wxDEFINE_EVENT(XCCALENDARDAY_DELETECALENDARENTRIES, wxCommandEvent);
30 wxDEFINE_EVENT(XCCALENDARDAY_DELETEENTRY, wxCommandEvent);
31 wxDEFINE_EVENT(XCCALENDARDAY_ADDENTRY, wxCommandEvent);
32 wxDEFINE_EVENT(XCCALENDARDAY_UPDATEENTRY, wxCommandEvent);
33 wxDEFINE_EVENT(XCCALENDARDAY_UPDATECALENDARCOLOUR, wxCommandEvent);
35 BEGIN_EVENT_TABLE(XCCalendarDay, wxPanel)
38 XCCalendarDay::XCCalendarDay(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size)
39 : wxPanel(parent, wxID_ANY, pos, size, wxTAB_TRAVERSAL, title){
40 this->SetMinSize( wxSize( 100,100 ) );
42 // Setup the top panel.
44 topPanel = new wxPanel(this, wxID_ANY, wxPoint(0,0), wxSize(50, 40), wxTAB_TRAVERSAL);
45 mainPanel = new wxPanel(this, wxID_ANY, wxPoint(0,0), wxSize(200, 200), wxTAB_TRAVERSAL);
49 highPriorityIcon = new wxStaticBitmap(topPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(32,32), 0);
50 alertIcon = new wxStaticBitmap(topPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(32,32), 0);
52 wxMemoryInputStream alerticon(icons_alert32_png, sizeof(icons_alert32_png));
53 wxMemoryInputStream priorityicon(icons_priority32_png, sizeof(icons_priority32_png));
55 wxImage icons_alert_png(alerticon, wxBITMAP_TYPE_PNG);
56 wxBitmap imgAlertIcon(icons_alert_png, -1);
58 wxImage icons_priority_png(priorityicon, wxBITMAP_TYPE_PNG);
59 wxBitmap imgPriorityIcon(icons_priority_png, -1);
61 alertIcon->SetBitmap(imgAlertIcon);
62 highPriorityIcon->SetBitmap(imgPriorityIcon);
64 numberText = new wxStaticText(topPanel, wxID_ANY, wxT("09"), wxDefaultPosition, wxDefaultSize, 0);
65 numberText->SetFont(wxFont(24, 70, 90, 92, false, wxEmptyString));
67 topSectionSizer->Add(highPriorityIcon, 0, wxALL|wxALIGN_CENTER_VERTICAL, 0);
68 topSectionSizer->Add(alertIcon, 0, wxALL|wxALIGN_CENTER_VERTICAL, 0);
69 topSectionSizer->Add(0, 0, 1, wxEXPAND, 5);
70 topSectionSizer->Add(numberText, 0, wxALL|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5);
72 // Setup the scrollable section.
74 eventListFrame = new wxScrolledWindow(mainPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL);
77 eventColour.red = 40; eventColour.green = 80; eventColour.blue = 80;
79 eventListFrame->SetSizer(eventListFrameSizer);
81 eventListFrame->SetScrollRate(0,1);
82 eventListFrameSizer->Fit(eventListFrame);
83 eventListFrameSizer->Layout();
85 // Setup the scroll window.
87 mainSectionSizer->Add(eventListFrame, 1, wxGROW | wxALL, 5);
89 topPanel->SetSizer(topSectionSizer);
90 mainPanel->SetSizer(mainSectionSizer);
92 windowSizer->Add(topPanel, 1, wxEXPAND, 0);
93 windowSizer->Add(mainPanel, 1, wxEXPAND, 0);
95 this->SetSizer(windowSizer);
102 // Bind events to the control.
104 Bind(XCCALENDARDAY_DESELECTOTHERENTRIES, &XCCalendarDay::DeselectOthersEvent, this, ID_DESELECTOTHERENTRIES);
105 Bind(XCCALENDARDAY_DESELECTALLENTRIES, &XCCalendarDay::DeselectAllEvent, this, ID_DESELECTALLITEMS);
106 Bind(XCCALENDARDAY_HIDEACCOUNTENTRIES, &XCCalendarDay::HideAccountEntries, this, ID_HIDEENTRIES);
107 Bind(XCCALENDARDAY_SHOWACCOUNTENTRIES, &XCCalendarDay::ShowAccountEntries, this, ID_SHOWENTRIES);
108 Bind(XCCALENDARDAY_HIDECALENDARENTRIES, &XCCalendarDay::HideCalendarEntries, this, ID_HIDECALENDARENTRIES);
109 Bind(XCCALENDARDAY_SHOWCALENDARENTRIES, &XCCalendarDay::ShowCalendarEntries, this, ID_SHOWCALENDARENTRIES);
110 Bind(XCCALENDARDAY_DELETECALENDARENTRIES, &XCCalendarDay::DeleteCalendarEntries, this, ID_DELETECALENDARENTRIES);
111 Bind(XCCALENDARDAY_DELETEENTRY, &XCCalendarDay::DeleteCalendarEntry, this, ID_DELETEENTRY);
112 Bind(XCCALENDARDAY_ADDENTRY, &XCCalendarDay::AddCalendarEntry, this, ID_ADDENTRY);
113 Bind(XCCALENDARDAY_UPDATEENTRY, &XCCalendarDay::UpdateCalendarEntry, this, ID_UPDATEENTRY);
114 Bind(XCCALENDARDAY_UPDATECALENDARCOLOUR, &XCCalendarDay::UpdateCalendarColour, this, ID_UPDATECOLOUR);
117 XCCalendarDay::~XCCalendarDay(){
119 // Destory the controls from the widget.
121 Unbind(XCCALENDARDAY_DESELECTOTHERENTRIES, &XCCalendarDay::DeselectOthersEvent, this, ID_DESELECTOTHERENTRIES);
122 Unbind(XCCALENDARDAY_DESELECTALLENTRIES, &XCCalendarDay::DeselectAllEvent, this, ID_DESELECTALLITEMS);
123 Unbind(XCCALENDARDAY_HIDEACCOUNTENTRIES, &XCCalendarDay::HideAccountEntries, this, ID_HIDEENTRIES);
124 Unbind(XCCALENDARDAY_SHOWACCOUNTENTRIES, &XCCalendarDay::ShowAccountEntries, this, ID_SHOWENTRIES);
125 Unbind(XCCALENDARDAY_HIDECALENDARENTRIES, &XCCalendarDay::HideCalendarEntries, this, ID_HIDECALENDARENTRIES);
126 Unbind(XCCALENDARDAY_SHOWCALENDARENTRIES, &XCCalendarDay::ShowCalendarEntries, this, ID_SHOWCALENDARENTRIES);
127 Unbind(XCCALENDARDAY_DELETECALENDARENTRIES, &XCCalendarDay::DeleteCalendarEntries, this, ID_DELETECALENDARENTRIES);
128 Unbind(XCCALENDARDAY_DELETEENTRY, &XCCalendarDay::DeleteCalendarEntry, this, ID_DELETEENTRY);
129 Unbind(XCCALENDARDAY_ADDENTRY, &XCCalendarDay::AddCalendarEntry, this, ID_ADDENTRY);
130 Unbind(XCCALENDARDAY_UPDATEENTRY, &XCCalendarDay::UpdateCalendarEntry, this, ID_UPDATEENTRY);
131 Unbind(XCCALENDARDAY_UPDATECALENDARCOLOUR, &XCCalendarDay::UpdateCalendarColour, this, ID_UPDATECOLOUR);
133 for (vector<XCCalendarDayEntry*>::iterator calendarEntryIter = calendarEntryList.begin();
134 calendarEntryIter != calendarEntryList.end(); calendarEntryIter++){
136 delete((*calendarEntryIter));
140 eventListFrameSizer->Clear();
142 eventListFrame->SetSizer(nullptr, true);
144 mainSectionSizer->Clear();
145 topSectionSizer->Clear();
146 windowSizer->Clear();
151 delete highPriorityIcon;
152 highPriorityIcon = nullptr;
154 delete eventListFrame;
155 eventListFrame = nullptr;
158 numberText = nullptr;
166 calendarEntryList.clear();
168 this->SetSizer(nullptr, true);
170 monthViewPointer = nullptr;
171 dataStorage = nullptr;
175 void XCCalendarDay::UpdateTopIcons(){
177 bool alarmFound = false;
178 bool highPriorityFound = false;
180 for (vector<XCCalendarDayEntry*>::iterator entryIter = calendarEntryList.begin();
181 entryIter != calendarEntryList.end(); entryIter++){
183 if ((*entryIter)->GetDisplayAlarm() == true){
189 if ((*entryIter)->GetDisplayHighPriority() == true){
191 highPriorityFound = true;
195 if (alarmFound == true && highPriorityFound == true){
203 alertIcon->Show(alarmFound);
204 highPriorityIcon->Show(highPriorityFound);
208 void XCCalendarDay::ResizeFrameEvent(wxSizeEvent &sizeEvent)
211 // TODO: Check if window size is less than 120 pixels and if it is,
212 // switch to the small block mode.
214 // Refresh the window.
218 mainPanel->Refresh();
219 topSectionSizer->Layout();
220 mainSectionSizer->Layout();
221 windowSizer->Layout();
225 void XCCalendarDay::DeselectOthersEvent(wxCommandEvent &deselectEvent)
228 int selectedEntryID = deselectEvent.GetInt();
230 wxCommandEvent deselectEntryEvent(XCCALENDARDAYENTRY_DESELECT);
231 deselectEntryEvent.SetId(ID_ENTRYDESELECT);
233 for (vector<XCCalendarDayEntry*>::iterator entryIter = calendarEntryList.begin();
234 entryIter != calendarEntryList.end(); entryIter++){
236 if ((*entryIter)->GetID() != selectedEntryID){
238 wxPostEvent((*entryIter), deselectEntryEvent);
244 // Send event notification to deselect the other calendar entries.
246 if (this->monthViewPointer != nullptr){
248 wxCommandEvent deselectMonthEvent(XCCALENDARMONTH_DESELECTOTHERENTRIES);
249 deselectMonthEvent.SetClientData(this);
250 deselectMonthEvent.SetId(ID_MONTHVIEWCLEARSELECTION);
251 wxPostEvent(this->monthViewPointer, deselectMonthEvent);
257 void XCCalendarDay::DeselectAllEvent(wxCommandEvent &deselectEvent)
260 int selectedEntryID = deselectEvent.GetInt();
262 wxCommandEvent deselectEntryEvent(XCCALENDARDAYENTRY_DESELECT);
263 deselectEntryEvent.SetId(ID_ENTRYDESELECT);
265 for (vector<XCCalendarDayEntry*>::iterator entryIter = calendarEntryList.begin();
266 entryIter != calendarEntryList.end(); entryIter++){
268 wxPostEvent((*entryIter), deselectEntryEvent);
274 void XCCalendarDay::SetupControl(int setupDay, int setupMonth, int setupYear, bool setupIsInMonth, XCCalendarMonthView *monthViewPointer, CalendarDataStorage *dataStorage, vector<int> *hideAccounts, vector<int> *hideCalendars)
277 this->dataStorage = dataStorage;
281 numberText->SetLabel(wxString::Format("%02i", setupDay));
282 calendarDay = setupDay;
286 calendarMonth = setupMonth;
290 calendarYear = setupYear;
292 // Setup the Is In Month value.
294 isInMonth = setupIsInMonth;
297 topPanel->SetBackgroundColour(wxColor(255,255,255));
298 mainPanel->SetBackgroundColour(wxColor(225,225,225));
299 eventListFrame->SetBackgroundColour(wxColor(225,225,225));
303 topPanel->SetBackgroundColour(wxColor(185,185,185));
304 mainPanel->SetBackgroundColour(wxColor(155,155,155));
305 eventListFrame->SetBackgroundColour(wxColor(155,155,155));
308 // Setup the month view pointer.
310 this->monthViewPointer = monthViewPointer;
312 // Setup the calendar items.
314 CDSEntryList calendarItems = dataStorage->GetEventListByDate(setupYear, setupMonth, setupDay);
316 for (int entrySeek = 0; entrySeek < calendarItems.entryList.size(); entrySeek++){
318 // Get the information about the calendar entry.
320 CDSGetCalendarEntryInfo newEntryInfo = dataStorage->GetEvent(calendarItems.entryList[entrySeek]);
321 CDSGetCalendarInfo newEntryCalendarInfo = dataStorage->GetCalendar(newEntryInfo.calendarID);
323 // Setup the calendar entry.
325 XCCalendarDayEntry *newEntry = new XCCalendarDayEntry(eventListFrame, newEntryInfo.entryName, wxDefaultPosition, wxDefaultSize, calendarItems.entryList[entrySeek]);
327 newEntry->SetColour(&newEntryCalendarInfo.calendarColour);
328 newEntry->SetTime(newEntryInfo.entryStartHour, newEntryInfo.entryStartMinute, newEntryInfo.entryStartSecond);
329 newEntry->SetEntryIDs(newEntryCalendarInfo.accountID, newEntryInfo.calendarID, newEntryInfo.calendarEntryID);
331 eventListFrameSizer->Add(newEntry, 0, wxEXPAND, 5);
332 wxSizerItem *afterSpacer = eventListFrameSizer->Add(0, 5, 0, 0, 5);
334 newEntry->SetAfterSpacer(afterSpacer);
336 // Go through the list of calendar entries to hide by account.
338 for (vector<int>::iterator hideAccountsItem = hideAccounts->begin();
339 hideAccountsItem != hideAccounts->end(); hideAccountsItem++){
341 if (*hideAccountsItem == newEntryCalendarInfo.accountID){
342 newEntry->Show(false);
343 newEntry->GetAfterSpacer()->Show(false);
348 // Go through the list of calendar entries to hide by calendar.
350 for (vector<int>::iterator hideCalendarsItem = hideCalendars->begin();
351 hideCalendarsItem != hideCalendars->end(); hideCalendarsItem++){
353 if (*hideCalendarsItem == newEntryInfo.calendarID){
354 newEntry->Show(false);
355 newEntry->GetAfterSpacer()->Show(false);
360 calendarEntryList.push_back(newEntry);
365 void XCCalendarDay::HideAccountEntries(wxCommandEvent &accountData){
367 // Go through each of the controls and hide the controls (and spacing) that
368 // have the matched account IDs.
370 int sizerPosition = 0;
372 for (vector<XCCalendarDayEntry*>::iterator calendarEntryIter = calendarEntryList.begin();
373 calendarEntryIter != calendarEntryList.end(); calendarEntryIter++){
375 (*calendarEntryIter)->SetShowAccountStatus(false);
377 if ((*calendarEntryIter)->GetAccountID() == accountData.GetInt()){
379 wxSizerItem *calendarItem = eventListFrameSizer->GetItem((*calendarEntryIter));
380 (*calendarEntryIter)->Show(false);
382 // Get the spacing and hide it as well.
384 wxSizerItem *afterSpacer = (*calendarEntryIter)->GetAfterSpacer();
385 afterSpacer->Show(false);
395 void XCCalendarDay::ShowAccountEntries(wxCommandEvent &accountData){
397 // Go through each of the controls and hide the controls (and spacing) that
398 // have the matched account IDs.
400 int sizerPosition = 0;
402 for (vector<XCCalendarDayEntry*>::iterator calendarEntryIter = calendarEntryList.begin();
403 calendarEntryIter != calendarEntryList.end(); calendarEntryIter++){
405 (*calendarEntryIter)->SetShowAccountStatus(true);
407 if ((*calendarEntryIter)->GetShowCalendarStatus() == false){
411 if ((*calendarEntryIter)->GetAccountID() == accountData.GetInt()){
413 wxSizerItem *calendarItem = eventListFrameSizer->GetItem((*calendarEntryIter));
414 (*calendarEntryIter)->Show(true);
416 // Get the spacing and hide it as well.
418 wxSizerItem *afterSpacer = (*calendarEntryIter)->GetAfterSpacer();
419 afterSpacer->Show(true);
429 void XCCalendarDay::HideCalendarEntries(wxCommandEvent &calendarData){
431 // Go through each of the controls and hide the controls (and spacing) that
432 // have the matched account IDs.
434 int sizerPosition = 0;
436 for (vector<XCCalendarDayEntry*>::iterator calendarEntryIter = calendarEntryList.begin();
437 calendarEntryIter != calendarEntryList.end(); calendarEntryIter++){
439 if ((*calendarEntryIter)->GetCalendarID() == calendarData.GetInt()){
441 (*calendarEntryIter)->SetShowCalendarStatus(false);
443 wxSizerItem *calendarItem = eventListFrameSizer->GetItem((*calendarEntryIter));
444 (*calendarEntryIter)->Show(false);
446 // Get the spacing and hide it as well.
448 wxSizerItem *afterSpacer = (*calendarEntryIter)->GetAfterSpacer();
449 afterSpacer->Show(false);
459 void XCCalendarDay::ShowCalendarEntries(wxCommandEvent &calendarData){
461 // Go through each of the controls and hide the controls (and spacing) that
462 // have the matched account IDs.
464 int sizerPosition = 0;
466 for (vector<XCCalendarDayEntry*>::iterator calendarEntryIter = calendarEntryList.begin();
467 calendarEntryIter != calendarEntryList.end(); calendarEntryIter++){
469 if ((*calendarEntryIter)->GetCalendarID() == calendarData.GetInt()){
471 (*calendarEntryIter)->SetShowCalendarStatus(true);
473 if ((*calendarEntryIter)->GetShowAccountStatus() == false){
475 // Don't show the calendar entry because the account status
476 // is set to hidden. Continue to the next one.
482 wxSizerItem *calendarItem = eventListFrameSizer->GetItem((*calendarEntryIter));
483 (*calendarEntryIter)->Show(true);
485 // Get the spacing and hide it as well.
487 wxSizerItem *afterSpacer = (*calendarEntryIter)->GetAfterSpacer();
488 afterSpacer->Show(true);
498 void XCCalendarDay::DeleteCalendarEntries(wxCommandEvent &calendarData){
500 vector<vector<XCCalendarDayEntry*>::iterator> deleteEntriesList;
502 for (vector<XCCalendarDayEntry*>::iterator calendarEntryIter = calendarEntryList.begin();
503 calendarEntryIter != calendarEntryList.end(); calendarEntryIter++){
505 if ((*calendarEntryIter)->GetCalendarID() == calendarData.GetInt()){
507 wxSizerItem *calendarItem = eventListFrameSizer->GetItem((*calendarEntryIter));
508 (*calendarEntryIter)->Show(false);
510 // Get the spacing and hide it as well.
512 wxSizerItem *afterSpacer = (*calendarEntryIter)->GetAfterSpacer();
513 afterSpacer->Show(false);
516 afterSpacer = nullptr;
518 delete (*calendarEntryIter);
519 deleteEntriesList.push_back(calendarEntryIter);
528 for (auto deleteIter : deleteEntriesList) {
529 calendarEntryList.erase(deleteIter);
532 if (calendarEntryList.size() > 0)
534 eventListFrame->Layout();
535 eventListFrameSizer->Layout();
540 void XCCalendarDay::DeleteCalendarEntry(wxCommandEvent &eventData){
542 vector<vector<XCCalendarDayEntry*>::iterator> deleteEntriesList;
544 for (vector<XCCalendarDayEntry*>::iterator calendarEntryIter = calendarEntryList.begin();
545 calendarEntryIter != calendarEntryList.end(); calendarEntryIter++){
547 if ((*calendarEntryIter)->GetEventID() == eventData.GetInt()){
549 wxSizerItem *calendarItem = eventListFrameSizer->GetItem((*calendarEntryIter));
550 (*calendarEntryIter)->Show(false);
552 // Get the spacing and hide it as well.
554 wxSizerItem *afterSpacer = (*calendarEntryIter)->GetAfterSpacer();
555 afterSpacer->Show(false);
557 delete (*calendarEntryIter);
558 deleteEntriesList.push_back(calendarEntryIter);
564 for (auto deleteIter : deleteEntriesList){
565 calendarEntryList.erase(deleteIter);
570 eventListFrame->Layout();
571 eventListFrameSizer->Layout();
575 void XCCalendarDay::AddCalendarEntry(wxCommandEvent &eventData){
577 EventProperties *eventInfo = (EventProperties*)eventData.GetClientData();
579 // TODO: Fix conversion from string to wxString
580 XCCalendarDayEntry *newEntry = new XCCalendarDayEntry(eventListFrame, wxString(eventInfo->eventName.c_str(), wxConvUTF8), wxDefaultPosition, wxDefaultSize, eventInfo->eventID);
582 CDSGetCalendarInfo calendarInfo = dataStorage->GetCalendar(eventInfo->calendarID);
584 newEntry->SetColour(&calendarInfo.calendarColour);
585 newEntry->SetTime(eventInfo->eventHour, eventInfo->eventMinute, eventInfo->eventSecond);
586 newEntry->SetEntryIDs(calendarInfo.accountID, eventInfo->calendarID, eventInfo->eventID);
588 eventListFrameSizer->Add(newEntry, 0, wxEXPAND, 5);
589 wxSizerItem *afterSpacer = eventListFrameSizer->Add(0, 5, 0, 0, 5);
591 newEntry->SetAfterSpacer(afterSpacer);
593 // Go through the list of calendar entries to hide by account.
595 for (vector<int>::iterator hideAccountsItem = eventInfo->hideAccountsList.begin();
596 hideAccountsItem != eventInfo->hideAccountsList.end(); hideAccountsItem++){
598 if (*hideAccountsItem = calendarInfo.accountID){
599 newEntry->Show(false);
600 newEntry->GetAfterSpacer()->Show(false);
605 // Go through the list of calendar entries to hide by calendar.
607 for (vector<int>::iterator hideCalendarsItem = eventInfo->hideCalendarsList.begin();
608 hideCalendarsItem != eventInfo->hideCalendarsList.end(); hideCalendarsItem++){
610 if (*hideCalendarsItem == eventInfo->calendarID){
611 newEntry->Show(false);
612 newEntry->GetAfterSpacer()->Show(false);
617 calendarEntryList.push_back(newEntry);
621 eventListFrame->Layout();
622 eventListFrameSizer->Layout();
626 void XCCalendarDay::UpdateCalendarEntry(wxCommandEvent &eventData){
628 // Go thorugh each of the entries in the day and
631 EventProperties *eventInfo = (EventProperties*)eventData.GetClientData();
633 for (vector<XCCalendarDayEntry*>::iterator calendarEntryIter = calendarEntryList.begin();
634 calendarEntryIter != calendarEntryList.end(); calendarEntryIter++){
636 if ((*calendarEntryIter)->GetEventID() == eventInfo->eventID){
638 (*calendarEntryIter)->SetEventName(eventInfo->eventName);
639 (*calendarEntryIter)->SetTime(eventInfo->eventHour, eventInfo->eventMinute, eventInfo->eventSecond);
650 void XCCalendarDay::UpdateCalendarColour(wxCommandEvent &colourData){
652 // Go thorugh each of the entries in the day and
655 ColourUpdateProperties *colourInfo = (ColourUpdateProperties*)colourData.GetClientData();
657 for (vector<XCCalendarDayEntry*>::iterator calendarEntryIter = calendarEntryList.begin();
658 calendarEntryIter != calendarEntryList.end(); calendarEntryIter++){
660 if ((*calendarEntryIter)->GetCalendarID() == colourInfo->calendarID){
662 (*calendarEntryIter)->SetColour(&colourInfo->newColour);
670 int XCCalendarDay::GetCalendarDay(){
676 int XCCalendarDay::GetCalendarMonth(){
678 return calendarMonth;
682 int XCCalendarDay::GetCalendarYear(){