1 // XCCalendarDayEntry.h - Xestia Calendar XCCalendarDayEntry widget class.
3 // (c) 2016 Xestia Software Development.
5 // This file is part of Xestia Calendar.
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.
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.
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_XCCALENDARDAYENTRY_H__
20 #define __WIDGETS_XCCALENDARDAYENTRY_H__
23 #include <wx/mstream.h>
25 #include "../common/colour.h"
26 #include "../common/text.h"
27 #include "../common/events.h"
28 #include "../bitmaps.h"
30 enum XCCalendarDayEntryMode {
31 XCCALENDARDAYENTRY_NORMAL,
32 XCCALENDARDAYENTRY_SMALL,
35 class XCCalendarDayEntry: public wxPanel
39 wxWindow *DayPanel = nullptr;
40 string EventTextData = "";
41 wxStaticText *EventText = nullptr;
42 wxStaticBitmap *HighPriorityIcon = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxPoint(14,7), wxDefaultSize, 0 );
43 wxStaticBitmap *AlarmIcon = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxPoint(30,7), wxDefaultSize, 0 );
44 wxBitmap AlarmIconBitmap;
45 wxBitmap PriorityIconBitmap;
49 bool HasAlarm = false;
50 bool HasHighPriority = false;
53 const int FirstPosition = 14;
54 const int SecondPosition = 30;
55 const int ThirdPosition = 49;
58 void RepaintSelected();
60 void UpdateInformation();
63 XCCalendarDayEntry(wxWindow* parent, const wxString& title, const wxPoint& pos, const wxSize& size, const int id);
64 ~XCCalendarDayEntry();
66 void PaintFrameEvent(wxPaintEvent &PaintEvent);
67 void ResizeFrameEvent(wxSizeEvent &SizeEvent);
68 void LeftClick(wxMouseEvent &MouseEvent);
69 void Deselect(wxCommandEvent &DeselectEvent);
71 void SetColour(Colour *ColourIn);
72 void SetDisplayAlarm(bool DisplayValue);
73 void SetDisplayHighPriority(bool DisplayValue);
75 bool GetDisplayAlarm();
76 bool GetDisplayHighPriority();