X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fwidgets%2FXCCalendarMonthView.h;h=db4962fb9fd9b6076432271f5a358ccab47ac10d;hb=cba151c4b833a26c63984769f921bab5e755decd;hp=f81fa17bbea1f3289203db9d6e78dd189826f548;hpb=22376cba960ea152be96f7507a49159907394590;p=xestiacalendar%2F.git diff --git a/source/widgets/XCCalendarMonthView.h b/source/widgets/XCCalendarMonthView.h index f81fa17..db4962f 100644 --- a/source/widgets/XCCalendarMonthView.h +++ b/source/widgets/XCCalendarMonthView.h @@ -1,14 +1,14 @@ // 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. @@ -22,16 +22,22 @@ #include #include -#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; -class XCCalendarMonthView: public wxFrame +class XCCalendarMonthView: public wxPanel { private: @@ -45,16 +51,33 @@ class XCCalendarMonthView: public wxFrame XCCalendarMonthViewDayTitle *FridayText = nullptr; XCCalendarMonthViewDayTitle *SaturdayText = nullptr; XCCalendarMonthViewDayTitle *SundayText = nullptr; - void ProcessGrid(XCCalendarMonthViewGrid *grid); + XCEventMenu *eventMenu = nullptr; + CalendarDataStorage *calendarStorage = nullptr; + + void ProcessGrid(XCCalendarMonthViewGrid *grid, std::vector *hideAccounts, std::vector *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(const wxString& title, const wxPoint& pos, const wxSize& size, XCCalendarMonthViewGrid *grid); + XCCalendarMonthView(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size, XCCalendarMonthViewGrid *grid, CalendarDataStorage *dataStorage, std::vector *hideAccounts, std::vector *hideCalendars); + XCCalendarMonthView(XCCalendarMonthViewGrid *grid, CalendarDataStorage *dataStorage, std::vector *hideAccounts, std::vector *hideCalendars); ~XCCalendarMonthView(); void PaintFrameEvent(wxPaintEvent &PaintEvent); void ResizeFrameEvent(wxSizeEvent &SizeEvent); + void DeselectOthersEvent(wxCommandEvent &DeselectEvent); DECLARE_EVENT_TABLE()