// XCCalendarDayEntry.cpp - Xestia Calendar XCCalendarMonthView widget class. // // (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_XCCALENDARMONTHVIEW_H__ #define __WIDGETS_XCCALENDARMONTHVIEW_H__ #include #include #include "../common/colour.h" #include "../common/text.h" #include "../common/events.h" #include "../common/monthviewgen.h" #include "../libraries/CalendarDataStorage/CalendarDataStorage.h" #include "XCCalendarMonthView.h" #include "XCCalendarMonthViewDayTitle.h" #include "XCCalendarDay.h" class XCCalendarDay; class XCCalendarMonthView: public wxPanel { private: wxFlexGridSizer *WindowSizer = new wxFlexGridSizer(0, 7, 1, 1); vector CalendarDayList; wxStaticText *NumberText = nullptr; XCCalendarMonthViewDayTitle *MondayText = nullptr; XCCalendarMonthViewDayTitle *TuesdayText = nullptr; XCCalendarMonthViewDayTitle *WednesdayText = nullptr; XCCalendarMonthViewDayTitle *ThursdayText = nullptr; XCCalendarMonthViewDayTitle *FridayText = nullptr; XCCalendarMonthViewDayTitle *SaturdayText = nullptr; XCCalendarMonthViewDayTitle *SundayText = nullptr; CalendarDataStorage *calendarStorage = nullptr; void ProcessGrid(XCCalendarMonthViewGrid *grid); void Repaint(); public: XCCalendarMonthView(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size, XCCalendarMonthViewGrid *grid, CalendarDataStorage *dataStorage); XCCalendarMonthView(XCCalendarMonthViewGrid *grid, CalendarDataStorage *dataStorage); ~XCCalendarMonthView(); void PaintFrameEvent(wxPaintEvent &PaintEvent); void ResizeFrameEvent(wxSizeEvent &SizeEvent); void DeselectOthersEvent(wxCommandEvent &DeselectEvent); DECLARE_EVENT_TABLE() }; #endif