Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added code to XCCalendarDay
[xestiacalendar/.git] / source / widgets / XCCalendarDay.h
1 // XCCalendarDay.h - Xestia Calendar XCCalendarDay widget class header file.
2 //
3 // (c) 2016 Xestia Software Development.
4 //
5 // This file is part of Xestia Calendar.
6 //
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
10 //
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Calendar. If not, see <http://www.gnu.org/licenses/>
19 #ifndef __WIDGETS_XCCALENDARDAY_H__
20 #define __WIDGETS_XCCALENDARDAY_H__
22 #include <wx/wx.h>
23 #include <wx/dcbuffer.h>
24 #include <vector>
26 #include "XCCalendarDayEntry.h"
27 #include "XCCalendarMonthView.h"
28 #include "../common/events.h"
30 class XCCalendarMonthView;
32 class XCCalendarDay: public wxPanel
33 {
34         private:
35                 XCCalendarMonthView *MonthViewPointer = nullptr;
36                 wxFlexGridSizer *WindowSizer = new wxFlexGridSizer(2, 1, 0, 0);
37                 wxBoxSizer *TopSectionSizer = new wxBoxSizer(wxHORIZONTAL);
38                 wxBoxSizer *MainSectionSizer = new wxBoxSizer(wxVERTICAL);
39                 wxBoxSizer *EventListFrameSizer = new wxBoxSizer(wxVERTICAL);
40                 wxStaticBitmap *HighPriorityIcon = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(32,32), 0);
41                 wxStaticBitmap *AlertIcon = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(32,32), 0);
42                 wxBitmap AlertIconBitmap;
43                 wxBitmap PriorityIconBitmap;
44                 wxStaticText *NumberText = nullptr;
45                 wxScrolledWindow *EventListFrame = new wxScrolledWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL);
46                 int CalendarEntrySeekNumber = 0;
47                 bool IsInMonth = false;
48         
49                 vector<XCCalendarDayEntry*> CalendarEntryList;
50                 XCCalendarDayEntry *CalendarEntry1 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 1", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
51                 XCCalendarDayEntry *CalendarEntry2 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 2", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
52                 XCCalendarDayEntry *CalendarEntry3 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 3", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
53                 XCCalendarDayEntry *CalendarEntry4 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 4", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
54                 XCCalendarDayEntry *CalendarEntry5 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 5", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
55                 XCCalendarDayEntry *CalendarEntry6 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 6", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
56                 XCCalendarDayEntry *CalendarEntry7 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 7", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
57                 XCCalendarDayEntry *CalendarEntry8 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 8", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
58                 XCCalendarDayEntry *CalendarEntry9 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 9", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
59                 XCCalendarDayEntry *CalendarEntry10 = new XCCalendarDayEntry(EventListFrame, "Calendar Entry 10", wxDefaultPosition, wxDefaultSize, CalendarEntrySeekNumber++);
60         
61                 void Repaint();
62         
63         public:
64                 XCCalendarDay(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size);
65                 ~XCCalendarDay();
66                 void PaintFrameEvent(wxPaintEvent &PaintEvent);
67                 void ResizeFrameEvent(wxSizeEvent &SizeEvent);
68                 void DeselectOthersEvent(wxCommandEvent &DeselectEvent);
69                 void DeselectAllEvent(wxCommandEvent &DeselectEvent);
70                 void UpdateTopIcons();
71                 void SetupControl(int SetupDay, int SetupMonth, int SetupYear, bool SetupIsInMonth, XCCalendarMonthView *MonthViewPointer);
72         
73         DECLARE_EVENT_TABLE()
75 };
77 #endif
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy