// XCCalendarDayEntry.h - Xestia Calendar XCCalendarDayEntry 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_XCCALENDARDAYENTRY_H__
#define __WIDGETS_XCCALENDARDAYENTRY_H__
#include
#include "../common/colour.h"
#include "../common/text.h"
#include "../common/events.h"
enum XCCalendarDayEntryMode {
XCCALENDARDAYENTRY_NORMAL,
XCCALENDARDAYENTRY_SMALL,
};
class XCCalendarDayEntry: public wxPanel
{
private:
wxWindow *DayPanel = nullptr;
string EventTextData = "";
wxStaticText *EventText = nullptr;
wxStaticBitmap *HighPriorityIcon = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxPoint(14,7), wxDefaultSize, 0 );
wxStaticBitmap *AlarmIcon = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxPoint(30,7), wxDefaultSize, 0 );
wxBitmap AlarmIconBitmap;
wxBitmap PriorityIconBitmap;
Colour EntryColour;
bool HasAlarm = false;
bool HasHighPriority = false;
int PositionMode = 0;
int EntryID = 0;
const int FirstPosition = 14;
const int SecondPosition = 30;
const int ThirdPosition = 49;
void Repaint();
void RepaintSelected();
void UpdateInformation();
public:
XCCalendarDayEntry(wxWindow* parent, const wxString& title, const wxPoint& pos, const wxSize& size, const int id);
~XCCalendarDayEntry();
void PaintFrameEvent(wxPaintEvent &PaintEvent);
void ResizeFrameEvent(wxSizeEvent &SizeEvent);
void LeftClick(wxMouseEvent &MouseEvent);
void Deselect(wxCommandEvent &DeselectEvent);
void SetColour(Colour *ColourIn);
void SetDisplayAlarm(bool DisplayValue);
void SetDisplayHighPriority(bool DisplayValue);
int GetID();
bool GetDisplayAlarm();
bool GetDisplayHighPriority();
DECLARE_EVENT_TABLE()
};
#endif