Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added code to XCCalendarDay
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 16 Nov 2016 22:24:43 +0000 (22:24 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 16 Nov 2016 22:24:43 +0000 (22:24 +0000)
source/widgets/XCCalendarDay.cpp
source/widgets/XCCalendarDay.h

index 6a6d442..15c8c65 100644 (file)
@@ -249,6 +249,33 @@ void XCCalendarDay::DeselectOthersEvent(wxCommandEvent &DeselectEvent)
                        
        }
        
+       // 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)
index e1a884b..aed2bca 100644 (file)
 #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);
@@ -64,10 +66,12 @@ class XCCalendarDay: public wxPanel
                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
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy