// XCCalendarDay.h - Xestia Calendar XCCalendarDay widget class header file. // // (c) 2016-2017 Xestia Software Development. // // This file is part of Xestia Calendar. // // 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 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. // // You should have received a copy of the GNU General Public License along // with Xestia Calendar. If not, see #ifndef __WIDGETS_XCCALENDARDAY_H__ #define __WIDGETS_XCCALENDARDAY_H__ #include #include #include #include #include #include "XCCalendarDayEntry.h" #include "XCCalendarMonthView.h" #include "../common/events.h" #include "../bitmaps.h" #include "../libraries/CalendarDataStorage/CalendarDataStorage.h" class XCCalendarMonthView; class XCCalendarDay: public wxPanel { private: XCCalendarMonthView *monthViewPointer = nullptr; wxPanel *topPanel = nullptr; wxPanel *mainPanel = nullptr; wxBoxSizer *windowSizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer *topSectionSizer = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer *mainSectionSizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer *eventListFrameSizer = new wxBoxSizer(wxVERTICAL); wxStaticBitmap *highPriorityIcon = nullptr; wxStaticBitmap *alertIcon = nullptr; CalendarDataStorage *dataStorage = nullptr; wxBitmap alertIconBitmap; wxBitmap priorityIconBitmap; wxStaticText *numberText = nullptr; wxScrolledWindow *eventListFrame = nullptr; int calendarEntrySeekNumber = 0; int calendarDay = 0; int calendarMonth = 0; int calendarYear = 0; bool isInMonth = false; vector calendarEntryList; 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); public: XCCalendarDay(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size); ~XCCalendarDay(); 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, CalendarDataStorage *dataStorage, std::vector *hideAccounts, std::vector *hideCalendars); int GetCalendarDay(); int GetCalendarMonth(); int GetCalendarYear(); DECLARE_EVENT_TABLE() }; #endif