1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Settings-related classes
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _AP_APPSETTINGS_H_
13 #define _AP_APPSETTINGS_H_
15 #include "wx/notebook.h"
16 #include "wx/dialog.h"
17 #include "wx/datetime.h"
19 #include "wxconfigtool.h"
22 #define ctSHOW_STATUS_NORMAL 0x01
23 #define ctSHOW_STATUS_MINIMIZED 0x02
24 #define ctSHOW_STATUS_MAXIMIZED 0x03
27 * \brief ctSettings holds all the settings that can be altered
28 * by the user (and probably some that can't).
31 class ctSettings
: public wxObject
33 DECLARE_DYNAMIC_CLASS(ctSettings
)
35 /// Default constructor.
39 ctSettings(const ctSettings
& settings
);
42 virtual ~ctSettings(){}
46 /// Assignment operator.
47 void operator = (const ctSettings
& settings
);
50 void Copy (const ctSettings
& settings
);
52 /// Loads configuration information from the registry or a file.
55 /// Saves configuration information to the registry or a file.
58 /// Initialisation before LoadConfig is called.
61 /// Shows the settings dialog.
62 void ShowSettingsDialog(const wxString
& page
= wxEmptyString
);
64 /// Generates a new document filename.
65 wxString
GenerateFilename(const wxString
& rootName
);
69 /// Returns the long application name. This name is used
70 /// for the registry key and main frame titlebar.
71 wxString
GetAppName() const { return m_appName
; }
73 /// Returns the short application name.
74 wxString
GetShortAppName() const { return m_appNameShort
; }
76 /// Gets the name of the last filename to be loaded.
77 /// May not be needed in this application.
78 wxString
& GetLastFilename() { return m_lastFilename
; }
80 /// Returns true if this is the first time the application
82 bool GetFirstTimeRun() const { return m_firstTimeRun
; }
85 wxString m_lastSetupSaveDir
; // Not yet used
86 wxString m_lastDocument
; // Last document
90 // wxColour m_backgroundColour; // background colour
91 wxFont m_editWindowFont
;
92 int m_noUses
; // Number of times the app was invoked
94 wxString m_appName
; // The current name of the app...
95 wxString m_appNameShort
; // The short name of the app...
96 bool m_showSplashScreen
; // Show the splash screen
98 wxString m_lastFilename
; // So we can auto-generate sensible filenames
99 bool m_loadLastDocument
;
100 bool m_useToolTips
; // Use tooltips on dialogs
102 wxString m_exportDir
; // Where files are exported to
104 wxString m_frameworkDir
; // Where the wxWin hierarchy is
105 bool m_useEnvironmentVariable
; // Use WXWIN
107 /// This isn't explicitly held in the registry
108 /// but deduced from whether there are values there
110 bool m_showWelcomeDialog
; // Show opening helpful dialog
114 bool m_trayIconIsShown
;
116 // "Setup file" or "Configure script"
117 wxString m_defaultFileKind
;
121 bool m_matchWholeWord
;
125 // _AP_APPSETTINGS_H_