1 // frmMain.h - frmEventEditor form functions.
3 // (c) 2016-2017 Xestia Software Development.
5 // This file is part of Xestia Calendar.
7 // Xestia Calendar 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 Calendar 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/>
24 Subclass of frmMainADT, which is generated by wxFormBuilder.
28 #include <sys/types.h>
30 #include <wx/tooltip.h>
32 #include "../../AppXestiaCalendar.h"
34 #include "../about/frmAbout.h"
35 #include "../update/frmUpdate.h"
36 #include "../preferences/frmPreferences.h"
37 #include "../newaccount/frmNewAccount.h"
38 #include "../calendareditor/frmCalendarEditor.h"
39 #include "../eventeditor/frmEventEditor.h"
40 #include "../actmgr/frmActivityMgr.h"
42 #include "../../widgets/XCCalendarCtrl.h"
43 #include "../../libraries/CalendarDataStorage/CalendarDataStorage.h"
44 #include "../../objects/calendarlist/CalendarList.h"
45 #include "../bitmaps.h"
47 #include "preferences.h"
52 //// end generated include
54 /** Implementing frmMainADT */
55 class frmMain : public frmMainADT
59 XCCalendarCtrl *mainCalendarCtrl = nullptr;
60 XCCalendarMonthView *monthViewCtrl = nullptr;
61 XCALPreferences *preferences = nullptr;
62 CalendarDataStorage calendarData;
63 ColourUpdateProperties updateColourData;
64 bool reloadAccounts = false;
65 std::map<int,wxMenuItem*> windowListPointersMenu;
66 std::map<int,void*> windowListPointers;
67 std::map<int,int> windowListType;
68 int WindowMenuItemID = 0;
69 wxBitmap *imgActIcon1 = nullptr;
70 wxBitmap *imgActIcon2 = nullptr;
71 wxBitmap *imgActIcon3 = nullptr;
72 wxBitmap *imgActIcon4 = nullptr;
73 wxBitmap *imgActIconSleep = nullptr;
74 wxBitmap *imgSSL = nullptr;
75 wxBitmap *imgNoSSL = nullptr;
76 wxBitmap *imgSSLWarning = nullptr;
77 wxBitmap *imgOnline = nullptr;
78 wxBitmap *imgOffline = nullptr;
79 wxStaticBitmap *imgConnStatus = nullptr;
80 wxStaticBitmap *imgActivityStatus = nullptr;
81 wxToolTip *sslToolTip = nullptr;
82 frmActivityMgr *activityManager = nullptr;
84 void SetupFormIcons();
85 void SetupStatusBar();
87 void QuitApp( wxCloseEvent& event );
88 void QuitApp( wxCommandEvent& event );
90 void ShowPreferencesWindow( wxCommandEvent& event );
91 void CreateNewCalendar( wxCommandEvent& event );
92 void EditCalendar( wxCommandEvent& event );
93 void DeleteCalendar( wxCommandEvent& event );
94 void CreateNewEvent( wxCommandEvent& event );
95 void EditEvent( wxCommandEvent& event );
96 void DeleteEvent( wxCommandEvent& event );
97 void AddEvent( wxCommandEvent& event );
98 void UpdateEvent( wxCommandEvent& event );
99 void ShowUpdateWindow( wxCommandEvent& event );
100 void ShowAboutWindow( wxCommandEvent& event );
101 void OpenNewAccountDialog( wxCommandEvent& event );
102 void ShowActivityManager( wxCommandEvent& event );
103 void ProcessCalendar( wxCommandEvent& event );
104 void LoadAccountData();
105 void CloseWindow( wxCommandEvent& event );
106 void ShowHelp( wxCommandEvent& event );
108 void WindowAdd( wxCommandEvent& event );
109 void WindowUpdate( wxCommandEvent& event );
110 void WindowDelete( wxCommandEvent& event );
111 void ShowEventWindow( wxCommandEvent &event );
112 bool CloseAllWindows();
116 frmMain( wxWindow* parent );
117 void SetupPointers(frmActivityMgr *activityManager);
118 //// end generated class members
122 #endif // __frmMain__