1 // XCCalendarDayEntry.cpp - Xestia Calendar XCCalendarMonthView widget class.
3 // (c) 2016-2017 Xestia Software Development.
5 // This file is part of Xestia Calendar.
7 // Xestia Calendar 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 Calendar 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 #ifndef __WIDGETS_XCCALENDARMONTHVIEW_H__
20 #define __WIDGETS_XCCALENDARMONTHVIEW_H__
28 #include "monthviewgen.h"
31 #include "../libraries/CalendarDataStorage/CalendarDataStorage.h"
33 #include "XCCalendarMonthView.h"
34 #include "XCCalendarMonthViewDayTitle.h"
35 #include "XCCalendarDay.h"
36 #include "XCEventMenu.h"
40 class XCCalendarMonthView: public wxPanel
44 wxFlexGridSizer *windowSizer = new wxFlexGridSizer(0, 7, 1, 1);
45 vector<XCCalendarDay*> calendarDayList;
46 XCCalendarMonthViewDayTitle *mondayText = nullptr;
47 XCCalendarMonthViewDayTitle *tuesdayText = nullptr;
48 XCCalendarMonthViewDayTitle *wednesdayText = nullptr;
49 XCCalendarMonthViewDayTitle *thursdayText = nullptr;
50 XCCalendarMonthViewDayTitle *fridayText = nullptr;
51 XCCalendarMonthViewDayTitle *saturdayText = nullptr;
52 XCCalendarMonthViewDayTitle *sundayText = nullptr;
53 XCEventMenu *eventMenu = nullptr;
54 CalendarDataStorage *calendarStorage = nullptr;
56 void ProcessGrid(XCCalendarMonthViewGrid *grid, std::vector<int> *hideAccounts, std::vector<int> *hideCalendars);
59 void HideAccountEntries(wxCommandEvent &accountData);
60 void ShowAccountEntries(wxCommandEvent &accountData);
61 void HideCalendarEntries(wxCommandEvent &calendarData);
62 void ShowCalendarEntries(wxCommandEvent &calendarData);
63 void DeleteCalendarEntries(wxCommandEvent &calendarData);
64 void DeleteCalendarEntry(wxCommandEvent &eventData);
65 void AddCalendarEntry(wxCommandEvent &eventData);
66 void UpdateCalendarEntry(wxCommandEvent &eventData);
67 void UpdateCalendarColour(wxCommandEvent &colourData);
68 void ShowEventMenu(wxCommandEvent &eventData);
71 XCCalendarMonthView(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size, XCCalendarMonthViewGrid *grid, CalendarDataStorage *dataStorage, std::vector<int> *hideAccounts, std::vector<int> *hideCalendars);
72 ~XCCalendarMonthView();
74 void ResizeFrameEvent(wxSizeEvent &sizeEvent);
75 void DeselectOthersEvent(wxCommandEvent &deselectEvent);