Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Updated/Added copyright header and licensing to all source files
[xestiacalendar/.git] / source / widgets / XCCalendarDayEntry.h
index 33a18ca..070d268 100644 (file)
@@ -1,14 +1,14 @@
 // XCCalendarDayEntry.h - Xestia Calendar XCCalendarDayEntry widget class.
 //
-// (c) 2016 Xestia Software Development.
+// (c) 2016-2017 Xestia Software Development.
 //
 // This file is part of Xestia Calendar.
 //
-// Xestia Address Book is free software: you can redistribute it and/or modify
+// Xestia Calendar 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,
+// Xestia Calendar 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.
@@ -27,6 +27,8 @@
 #include "../common/events.h"
 #include "../bitmaps.h"
 
+#include "structs.h"
+
 enum XCCalendarDayEntryMode {
        XCCALENDARDAYENTRY_NORMAL,
        XCCALENDARDAYENTRY_SMALL,
@@ -38,18 +40,30 @@ class XCCalendarDayEntry: public wxPanel
        private:
                wxWindow *DayPanel = nullptr;
                string EventTextData = "";
+               wxStaticText *EventTime = nullptr;
                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 );
+               wxSizerItem *afterSpacer = nullptr;
                wxBitmap AlarmIconBitmap;
                wxBitmap PriorityIconBitmap;
        
                Colour EntryColour;
        
+               int timeHour = 0;
+               int timeMinute = 0;
+               int timeSecond = 0;
+       
                bool HasAlarm = false;
                bool HasHighPriority = false;
                int PositionMode = 0;
-               int EntryID = 0;
+       
+               int eventID = 0;
+               int accountID = 0;
+               int calendarID =0;
+               bool showAccount = true;
+               bool showCalendar = true;
+       
                const int FirstPosition = 14;
                const int SecondPosition = 30;
                const int ThirdPosition = 49;
@@ -58,6 +72,12 @@ class XCCalendarDayEntry: public wxPanel
                void RepaintSelected();
        
                void UpdateInformation();
+               
+               string BuildEventTime(int timeHour, int timeMinute);
+       
+       protected:
+               void LeftClick(wxMouseEvent &MouseEvent);
+               void RightClick(wxMouseEvent &MouseEvent);
        
        public:
                XCCalendarDayEntry(wxWindow* parent, const wxString& title, const wxPoint& pos, const wxSize& size, const int id);
@@ -65,15 +85,26 @@ class XCCalendarDayEntry: public wxPanel
        
                void PaintFrameEvent(wxPaintEvent &PaintEvent);
                void ResizeFrameEvent(wxSizeEvent &SizeEvent);
-               void LeftClick(wxMouseEvent &MouseEvent);
                void Deselect(wxCommandEvent &DeselectEvent);
        
+               void SetTime(int timeHour, int timeMinute, int timeSecond);
                void SetColour(Colour *ColourIn);
                void SetDisplayAlarm(bool DisplayValue);
                void SetDisplayHighPriority(bool DisplayValue);
+               void SetEntryIDs(int accountID, int calendarID, int eventID);
+               void SetAfterSpacer(wxSizerItem *afterSpacer);
+               void SetEventName(std::string eventName);
                int GetID();
+               int GetCalendarID();
+               int GetEventID();
+               int GetAccountID();
+               wxSizerItem* GetAfterSpacer();
                bool GetDisplayAlarm();
                bool GetDisplayHighPriority();
+               bool SetShowAccountStatus(bool statusInput);
+               bool SetShowCalendarStatus(bool statusInput);
+               bool GetShowAccountStatus();
+               bool GetShowCalendarStatus();
        
        DECLARE_EVENT_TABLE()
 };
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