// XCCalendarDayEntry.cpp - Xestia Calendar XCCalendarMonthView widget class.
//
-// (c) 2016 Xestia Software Development.
+// (c) 2016-2017 Xestia Software Development.
//
// This file is part of Xestia Calendar.
//
-// Xestia Address Book is free software: you can redistribute it and/or modify
+// Xestia Calendar is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by the
// Free Software Foundation, version 3 of the license.
//
-// Xestia Address Book is distributed in the hope that it will be useful,
+// Xestia Calendar is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
#include <vector>
#include <wx/wx.h>
-#include "../common/colour.h"
-#include "../common/text.h"
-#include "../common/events.h"
-#include "../common/monthviewgen.h"
+#include "colour.h"
+#include "text.h"
+#include "events.h"
+#include "monthviewgen.h"
+#include "structs.h"
#include "../libraries/CalendarDataStorage/CalendarDataStorage.h"
#include "XCCalendarMonthView.h"
#include "XCCalendarMonthViewDayTitle.h"
#include "XCCalendarDay.h"
+#include "XCEventMenu.h"
class XCCalendarDay;
XCCalendarMonthViewDayTitle *FridayText = nullptr;
XCCalendarMonthViewDayTitle *SaturdayText = nullptr;
XCCalendarMonthViewDayTitle *SundayText = nullptr;
+ XCEventMenu *eventMenu = nullptr;
CalendarDataStorage *calendarStorage = nullptr;
- void ProcessGrid(XCCalendarMonthViewGrid *grid);
+
+ void ProcessGrid(XCCalendarMonthViewGrid *grid, std::vector<int> *hideAccounts, std::vector<int> *hideCalendars);
void Repaint();
+ protected:
+ void HideAccountEntries(wxCommandEvent &accountData);
+ void ShowAccountEntries(wxCommandEvent &accountData);
+ void HideCalendarEntries(wxCommandEvent &calendarData);
+ void ShowCalendarEntries(wxCommandEvent &calendarData);
+ void DeleteCalendarEntries(wxCommandEvent &calendarData);
+ void DeleteCalendarEntry(wxCommandEvent &eventData);
+ void AddCalendarEntry(wxCommandEvent &eventData);
+ void UpdateCalendarEntry(wxCommandEvent &eventData);
+ void UpdateCalendarColour(wxCommandEvent &colourData);
+ void ShowEventMenu(wxCommandEvent &eventData);
+
public:
- XCCalendarMonthView(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size, XCCalendarMonthViewGrid *grid, CalendarDataStorage *dataStorage);
- XCCalendarMonthView(XCCalendarMonthViewGrid *grid, CalendarDataStorage *dataStorage);
+ XCCalendarMonthView(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size, XCCalendarMonthViewGrid *grid, CalendarDataStorage *dataStorage, std::vector<int> *hideAccounts, std::vector<int> *hideCalendars);
+ XCCalendarMonthView(XCCalendarMonthViewGrid *grid, CalendarDataStorage *dataStorage, std::vector<int> *hideAccounts, std::vector<int> *hideCalendars);
~XCCalendarMonthView();
void PaintFrameEvent(wxPaintEvent &PaintEvent);