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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "appsettings.cpp"
19 #include "wx/notebook.h"
20 #include "wx/dialog.h"
21 #include "wx/datetime.h"
23 #include "wxconfigtool.h"
26 #define ctSHOW_STATUS_NORMAL 0x01
27 #define ctSHOW_STATUS_MINIMIZED 0x02
28 #define ctSHOW_STATUS_MAXIMIZED 0x03
31 * \brief ctSettings holds all the settings that can be altered
32 * by the user (and probably some that can't).
35 class ctSettings
: public wxObject
37 DECLARE_DYNAMIC_CLASS(ctSettings
)
39 /// Default constructor.
43 ctSettings(const ctSettings
& settings
);
50 /// Assignment operator.
51 void operator = (const ctSettings
& settings
);
54 void Copy (const ctSettings
& settings
);
56 /// Loads configuration information from the registry or a file.
59 /// Saves configuration information to the registry or a file.
62 /// Initialisation before LoadConfig is called.
65 /// Shows the settings dialog.
66 void ShowSettingsDialog(const wxString
& page
= wxEmptyString
);
68 /// Generates a new document filename.
69 wxString
GenerateFilename(const wxString
& rootName
);
73 /// Returns the long application name. This name is used
74 /// for the registry key and main frame titlebar.
75 wxString
GetAppName() const { return m_appName
; }
77 /// Returns the short application name.
78 wxString
GetShortAppName() const { return m_appNameShort
; }
80 /// Gets the name of the last filename to be loaded.
81 /// May not be needed in this application.
82 wxString
& GetLastFilename() { return m_lastFilename
; }
84 /// Returns TRUE if this is the first time the application
86 bool GetFirstTimeRun() const { return m_firstTimeRun
; }
89 wxString m_lastSetupSaveDir
; // Not yet used
90 wxString m_lastDocument
; // Last document
94 // wxColour m_backgroundColour; // background colour
95 wxFont m_editWindowFont
;
96 int m_noUses
; // Number of times the app was invoked
98 wxString m_appName
; // The current name of the app...
99 wxString m_appNameShort
; // The short name of the app...
100 bool m_showSplashScreen
; // Show the splash screen
102 wxString m_lastFilename
; // So we can auto-generate sensible filenames
103 bool m_loadLastDocument
;
104 bool m_useToolTips
; // Use tooltips on dialogs
106 wxString m_exportDir
; // Where files are exported to
108 wxString m_frameworkDir
; // Where the wxWin hierarchy is
109 bool m_useEnvironmentVariable
; // Use WXWIN
111 /// This isn't explicitly held in the registry
112 /// but deduced from whether there are values there
114 bool m_showWelcomeDialog
; // Show opening helpful dialog
118 bool m_trayIconIsShown
;
120 // "Setup file" or "Configure script"
121 wxString m_defaultFileKind
;
125 bool m_matchWholeWord
;
129 // _AP_APPSETTINGS_H_