1 // preferences.h - Preferences subroutines header.
3 // (c) 2012-2015 Xestia Software Development.
5 // This file is part of Xestia Address Book.
7 // Xestia Address Book 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 Address Book 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 Address Book. If not, see <http://www.gnu.org/licenses/>
25 void SavePreferences();
26 void LoadPreferences();
33 wxArrayString ThemeName;
34 wxArrayString ThemeData;
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 //XABPreferences 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;
97 bool UseBackgroundContactColour = false;
98 wxColour BackgroundContactColour;
104 XABPreferences(wxString PreferencesFilename);
107 XABPrefAccounts accounts;
108 XABPrefThemes themes;
110 int WritePreferences();
111 int ReadPreferences();
113 bool GetBoolData(wxString SettingName);
114 bool SetBoolData(wxString SettingName, bool SettingValue);
115 wxRect GetMainWindowData();
116 void SetMainWindowData(wxRect WindowData);
117 wxColour GetBackgroundContactColourData();
118 void SetBackgroundContactColourData(wxColour ColourData);
120 //int AddAccount(wxString Name);
123 wxString GetThemeData(wxString ThemeName);