// XCCalendarMenu.cpp - XCCalendarMenu widget header // // (c) 2012-2017 Xestia Software Development. // // This file is part of Xestia Calendar. Original code from Xestia Address Book. // // 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 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. // // You should have received a copy of the GNU General Public License along // with Xestia Calendar. If not, see #ifndef __WIDGETS_XCCALENDARMENU__ #define __WIDGETS_XCCALENDARMENU__ #include #include #include #include #include #include #include "structs.h" #include "events.h" class XCCalendarMenuADT : public wxMenu { private: protected: virtual void ProcessMenuItemClick(wxCommandEvent& event) {event.Skip();}; public: XCCalendarMenuADT(){}; ~XCCalendarMenuADT(){}; }; class XCCalendarMenu : public XCCalendarMenuADT { private: std::map menuItems = {}; wxWindow *windowPtr = NULL; wxPopupTransientWindow *popupPtr = NULL; bool enableAccountSettings = FALSE; bool searchModeOnly = FALSE; int calendarID = 0; int accountPreferencesID = 0; void AppendMenuItem(wxString objectName, wxString menuName, wxString menuDescription, XCCalendarMenuID itemID, wxItemKind itemType); protected: void ProcessMenuItemClick(wxCommandEvent& event); public: XCCalendarMenu(); ~XCCalendarMenu(); wxMenu* MenuPointer(); void SetCalendarID(int calendarID); void SetAccountPreferencesID(int accountPreferencesID); void SetWindowPointer(wxWindow *windowPointer); void SetPopupPointer(wxPopupTransientWindow *popupPointer); }; #endif