1 // preferences.h - Preferences subroutines header.
3 // (c) 2012-2017 Xestia Software Development.
5 // This file is part of Xestia Calendar. Originally from Xestia Address Book.
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/>
25 void SavePreferences();
26 void LoadPreferences();
33 wxArrayString themeName;
34 wxArrayString themeData;
37 class XCALPrefAccounts
40 wxArrayString accountName;
41 wxArrayString accountType;
42 wxArrayString accountAddress;
43 wxArrayInt accountPort;
44 wxArrayInt accountSSL;
45 wxArrayString accountUsername;
46 wxArrayString accountPassword;
47 wxArrayString directoryPrefix;
48 wxArrayString accountDirectory;
49 wxArrayLong accountRefresh;
55 wxString GetAccountName(int accountNum);
56 wxString GetAccountType(int accountNum);
57 wxString GetAccountAddress(int accountNum);
58 int GetAccountPort(int acconutNum);
59 bool GetAccountSSL(int accountNum);
60 wxString GetAccountUsername(int accountNum);
61 wxString GetAccountPassword(int accountNum);
62 wxString GetAccountDirectory(int accountNum);
63 wxString GetAccountDirPrefix(int accountNum);
64 long GetAccountRefresh(int accountNum);
65 int AddAccount(wxString newAccName,
67 wxString newAccAddress,
72 wxString newAccDirPrefix,
78 //XCALPreferences should emulate what is in the Preferences window.
79 //Including others which aren't in the window such as main window
87 bool saveWindowPos = FALSE;
88 wxRect mainWindowData;
89 bool hideLocalABs = FALSE;
92 bool enableThemes = FALSE;
100 XCALPreferences(wxString preferencesFilename);
103 XCALPrefAccounts accounts;
104 XCALPrefThemes themes;
106 int WritePreferences();
107 int ReadPreferences();
109 bool GetBoolData(wxString settingName);
110 bool SetBoolData(wxString settingName, bool settingValue);
111 wxRect GetMainWindowData();
112 void SetMainWindowData(wxRect windowData);
114 //int AddAccount(wxString Name);
117 wxString GetThemeData(wxString themeName);