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_
16 #pragma interface appsettings.cpp
19 #include "wx/notebook.h"
20 #include "wx/dialog.h"
21 #include "wx/datetime.h"
24 #include "wxconfigtool.h"
27 #define ctSHOW_STATUS_NORMAL 0x01
28 #define ctSHOW_STATUS_MINIMIZED 0x02
29 #define ctSHOW_STATUS_MAXIMIZED 0x03
32 * \brief ctSettings holds all the settings that can be altered
33 * by the user (and probably some that can't).
36 class ctSettings
: public wxObject
38 DECLARE_DYNAMIC_CLASS(ctSettings
)
40 /// Default constructor.
44 ctSettings(const ctSettings
& settings
);
51 /// Assignment operator.
52 void operator = (const ctSettings
& settings
);
55 void Copy (const ctSettings
& settings
);
57 /// Loads configuration information from the registry or a file.
60 /// Saves configuration information to the registry or a file.
63 /// Initialisation before LoadConfig is called.
66 /// Shows the settings dialog.
67 void ShowSettingsDialog(const wxString
& page
= wxEmptyString
);
69 /// Generates a new document filename.
70 wxString
GenerateFilename(const wxString
& rootName
);
74 /// Returns the long application name. This name is used
75 /// for the registry key and main frame titlebar.
76 wxString
GetAppName() const { return m_appName
; }
78 /// Returns the short application name.
79 wxString
GetShortAppName() const { return m_appNameShort
; }
81 /// Gets the name of the last filename to be loaded.
82 /// May not be needed in this application.
83 wxString
& GetLastFilename() { return m_lastFilename
; }
85 /// Returns TRUE if this is the first time the application
87 bool GetFirstTimeRun() const { return m_firstTimeRun
; }
90 wxString m_currentDocumentDir
; // Not yet used
91 wxString m_lastDocument
; // Last document
95 // wxColour m_backgroundColour; // background colour
96 wxFont m_editWindowFont
;
97 int m_noUses
; // Number of times the app was invoked
99 wxString m_appName
; // The current name of the app...
100 wxString m_appNameShort
; // The short name of the app...
101 bool m_showSplashScreen
; // Show the splash screen
103 wxString m_lastFilename
; // So we can auto-generate sensible filenames
104 bool m_loadLastDocument
;
105 bool m_useToolTips
; // Use tooltips on dialogs
107 wxString m_exportDir
; // Where files are exported to
109 wxString m_frameworkDir
; // Where the wxWin hierarchy is
110 bool m_useEnvironmentVariable
; // Use WXWIN
112 /// This isn't explicitly held in the registry
113 /// but deduced from whether there are values there
115 bool m_showWelcomeDialog
; // Show opening helpful dialog
119 bool m_trayIconIsShown
;
123 // _AP_APPSETTINGS_H_