// XCCalendarDay.h - Xestia Calendar XCCalendarDay widget class header file. // // (c) 2016 Xestia Software Development. // // This file is part of Xestia Calendar. // // Xestia Address Book 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, // 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 "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; wxFlexGridSizer *WindowSizer = new wxFlexGridSizer(2, 1, 0, 0); wxBoxSizer *TopSectionSizer = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer *MainSectionSizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer *EventListFrameSizer = new wxBoxSizer(wxVERTICAL); wxStaticBitmap *HighPriorityIcon = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(32,32), 0); wxStaticBitmap *AlertIcon = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(32,32), 0); wxBitmap AlertIconBitmap; wxBitmap PriorityIconBitmap; wxStaticText *NumberText = nullptr; wxScrolledWindow *EventListFrame = new wxScrolledWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL); int CalendarEntrySeekNumber = 0; int calendarDay = 0; int calendarMonth = 0; int calendarYear = 0; bool IsInMonth = false; vector CalendarEntryList; vector CalendarEntryListIndex; void Repaint(); protected: void HideAccountEntries(wxCommandEvent &accountData); void ShowAccountEntries(wxCommandEvent &accountData); void HideCalendarEntries(wxCommandEvent &calendarData); void ShowCalendarEntries(wxCommandEvent &calendarData); public: XCCalendarDay(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size); ~XCCalendarDay(); 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, CalendarDataStorage *dataStorage, std::vector *hideAccounts, std::vector *hideCalendars); DECLARE_EVENT_TABLE() }; #endif