// 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 "XCCalendarDayEntry.h"
#include "XCCalendarMonthView.h"
#include "../common/events.h"
class XCCalendarMonthView;
class XCCalendarDay: public wxPanel
{
private:
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;
bool IsInMonth = false;
vector CalendarEntryList;
XCCalendarDayEntry *CalendarEntry1 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 1", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
XCCalendarDayEntry *CalendarEntry2 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 2", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
XCCalendarDayEntry *CalendarEntry3 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 3", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
XCCalendarDayEntry *CalendarEntry4 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 4", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
XCCalendarDayEntry *CalendarEntry5 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 5", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
XCCalendarDayEntry *CalendarEntry6 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 6", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
XCCalendarDayEntry *CalendarEntry7 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 7", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
XCCalendarDayEntry *CalendarEntry8 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 8", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
XCCalendarDayEntry *CalendarEntry9 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 9", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
XCCalendarDayEntry *CalendarEntry10 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 10", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
void Repaint();
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 UpdateTopIcons();
void SetupControl(int SetupDay, int SetupMonth, int SetupYear, bool SetupIsInMonth, XCCalendarMonthView *MonthViewPointer);
DECLARE_EVENT_TABLE()
};
#endif