From 28c02c4a4aba22500b35cb40556a94210c3927c8 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 26 Jun 2016 12:06:46 +0100 Subject: [PATCH] Added the XCCalendarMonthViewDayTitle class --- .../widgets/XCCalendarMonthViewDayTitle.cpp | 42 +++++++++++++++++++ source/widgets/XCCalendarMonthViewDayTitle.h | 42 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 source/widgets/XCCalendarMonthViewDayTitle.cpp create mode 100644 source/widgets/XCCalendarMonthViewDayTitle.h diff --git a/source/widgets/XCCalendarMonthViewDayTitle.cpp b/source/widgets/XCCalendarMonthViewDayTitle.cpp new file mode 100644 index 0000000..f67ea77 --- /dev/null +++ b/source/widgets/XCCalendarMonthViewDayTitle.cpp @@ -0,0 +1,42 @@ +// XCCalendarMonthViewDayTitle.cpp - Xestia Calendar month view day title widget. +// +// (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 + +#include "XCCalendarMonthViewDayTitle.h" + +XCCalendarMonthViewDayTitle::XCCalendarMonthViewDayTitle(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size) + : wxPanel(parent, wxID_ANY, pos, size, wxTAB_TRAVERSAL, title) +{ + + WindowSizer->Add(DayPanel, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); + DayPanel->SetSizer(DaySizer); + + DayText = new wxStaticText(DayPanel, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE); + DaySizer->Add(DayText, 1, wxALL, 0); + DayPanel->Layout(); + + this->SetSizer(WindowSizer); + this->Layout(); + +} + +XCCalendarMonthViewDayTitle::~XCCalendarMonthViewDayTitle() +{ + + // Delete the objects. + +} \ No newline at end of file diff --git a/source/widgets/XCCalendarMonthViewDayTitle.h b/source/widgets/XCCalendarMonthViewDayTitle.h new file mode 100644 index 0000000..ea0bef0 --- /dev/null +++ b/source/widgets/XCCalendarMonthViewDayTitle.h @@ -0,0 +1,42 @@ +// XCCalendarMonthViewDayTitle.h - Xestia Calendar month view day title widget. +// +// (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_XCCALENDARMONTHVIEWDAYTITLE_H__ +#define __WIDGETS_XCCALENDARMONTHVIEWDAYTITLE_H__ + +#include +#include + +class XCCalendarMonthViewDayTitle: public wxPanel +{ + + private: + + wxBoxSizer *WindowSizer = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer *DaySizer = new wxBoxSizer(wxHORIZONTAL); + wxPanel *DayPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, "Test"); + wxStaticText *DayText = nullptr; + + public: + + XCCalendarMonthViewDayTitle(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size); + ~XCCalendarMonthViewDayTitle(); + +}; + +#endif \ No newline at end of file -- 2.39.5