|
/************************************************************************
*
* Resource ID Organiser Core Library
*
* (c) Copyright 2000-2004 by Anna-Jayne Metcalfe (resorg@annasplace.me.uk)
* All rights reserved.
*
************************************************************************
*
* Filename : ResOrgOptions.h
*
* Description : CResOrgOptions - class to hold program options
*
* Compiler : Microsoft Visual C++ 6.0, Service Pack 3 or later
* Microsoft Visual C++ .NET 2003
*
* Target
* Environment : Windows 98/NT/2000/XP
*
* NOTE:
*
* This software is provided "as is" free for personal use. All
* title and copyrights in and to the software, including but not
* limited to any images, text, etc. incorporated into it, are
* owned by Anna-Jayne Metcalfe, except where acknowledged otherwise.
*
* Your may freely to use this code in your own products, PROVIDED
* this notice is not removed or modified.
*
*
* Visit http://www.annasplace.me.uk/resorg for latest updates
*
************************************************************************
*
* MODIFICATION HISTORY:
*
* This is a controlled document. See project configuration
* control tool for latest version and full version history.
*
* $Archive: /Projects/AddIns/ResOrg/ResOrgCore/ResOrgOptions.h $
* $Revision: 29 $
* $Date: 29/08/04 21:32 $
* $Author: Anna $
*
* $History: ResOrgOptions.h $
*
* ***************** Version 29 *****************
* User: Anna Date: 29/08/04 Time: 21:32
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* 1. Added CResOrgOptions::UpdateBooleanOption() as a means of
* simplifying the CResOrgOptions implementation
* 2. Added "Auto save symbol file config" option
* 3. Fixed some miscellaneous bugs
*
* ***************** Version 28 *****************
* User: Anna Date: 21/08/04 Time: 19:29
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Added "Check For Out Of Range Symbols" option
*
* ***************** Version 27 *****************
* User: Anna Date: 11/05/04 Time: 22:50
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* 1. Improved handling of default fixed symbol lists
* 2. Corrected a couple of website URLs
*
* ***************** Version 26 *****************
* User: Anna Date: 11/05/04 Time: 0:22
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* By popular request...added support for "Fixed" symbols
*
* ***************** Version 25 *****************
* User: Anna Date: 20/04/03 Time: 15:33
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Added m_bAutoSaveSymbolFileConfig (reserved for future use)
*
* ***************** Version 24 *****************
* User: Anna Date: 15/04/03 Time: 20:37
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* 1. Removed unnecessary file guards (#pragma once works well enough)
* 2. Updated file banners
*
* ***************** Version 23 *****************
* User: Anna Date: 19/03/03 Time: 18:42
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Moved the "OPTIONS" #define to ResOrgOptions.h so that CResOrgSplashWnd
* can see it
*
* ***************** Version 22 *****************
* User: Anna Date: 15/02/03 Time: 20:47
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Changed big BOOLs into little bools
*
* ***************** Version 21 *****************
* User: Anna Date: 3/01/03 Time: 7:36
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Added an option to filter multi-file Symbols Displays by default
*
* ***************** Version 20 *****************
* User: Anna Date: 25/11/02 Time: 20:28
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* 1. Updated website address on file banner and in the code
* 2. Added CResOrgOptions::GetEmailURL()
*
* ***************** Version 19 *****************
* User: Anna Date: 22/10/02 Time: 13:24
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Changed name/mail address (at last!)
*
* ***************** Version 18 *****************
* User: Andy Date: 7/06/02 Time: 17:04
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Renamed the ResOrgUtils module to ResOrgCore. Updated file banners
* accordingly
*
* ***************** Version 17 *****************
* User: Andy Date: 7/06/02 Time: 9:39
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* The "Add-In" page is no longer used in the Visual C++.NET version
*
* ***************** Version 16 *****************
* User: Andy Date: 10/05/02 Time: 16:00
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Added "Use Office XP style menus" option
*
* ***************** Version 15 *****************
* User: Andy Date: 12/28/01 Time: 12:52a
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Added some new options and moved the others around a bit
*
* ***************** Version 14 *****************
* User: Andy Date: 11/15/01 Time: 1:43p
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Added new option to determine whether development versions should be
* checked for updates
*
* ***************** Version 13 *****************
* User: Andy Date: 10/21/01 Time: 11:00p
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Added "Warn if Next Symbol values are in use" option
*
* ***************** Version 12 *****************
* User: Andy Date: 8/07/01 Time: 8:36
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* CResOrgOptions::Configure() now allows the parent window of the Options
* dialog to be specified
*
* ***************** Version 11 *****************
* User: Andy Date: 2/07/01 Time: 22:17
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Added additional options for web URLs (updated from the version
* checker)
*
* ***************** Version 10 *****************
* User: Andy Date: 22/06/01 Time: 9:48
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Made class declaration "Rose friendly"
*
* ***************** Version 9 *****************
* User: Andy Date: 26/05/01 Time: 15:14
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Added Mailing List prompt option
*
* ***************** Version 8 *****************
* User: Andy Date: 22/05/01 Time: 16:02
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* 1. Removed version check code from Initialise () to a new
* DoVersionCheck() method. This prevents problems with the "nag" screen
* displayed by the ResOrg app.
* 2. Made StartVersionCheck() a bit more fault tolerant
*
* ***************** Version 7 *****************
* User: Andy Date: 22/05/01 Time: 6:42
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* 1. Class now derived from CCmdTarget to allow it to receive WM_COMMAND
* notifications from the MainFrame
* 2. StartVersionCheck() now takes an extra parameter to allow dial-up
* networking prompts to be disabled
* 3. OnVersionCheckCompleted() now returns an error code instead of a
* boolean
* 4. Added OnExit()
*
* ***************** Version 6 *****************
* User: Andy Date: 16/05/01 Time: 20:56
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Added "Updates" page and version checking
*
* ***************** Version 5 *****************
* User: Andy Date: 12/05/01 Time: 6:47
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Added a registry entry to allow ResOrg to be forced to check a
* particular version of DevStudio
*
* ***************** Version 4 *****************
* User: Andy Date: 5/12/00 Time: 20:32
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Added web URL to options
*
* ***************** Version 3 *****************
* User: Andy Date: 3/12/00 Time: 8:40
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Added AskAboutLoadingAddIn()
*
* ***************** Version 2 *****************
* User: Andy Date: 29/11/00 Time: 18:38
* Updated in $/Projects/AddIns/ResOrg/ResOrgUtils
* Added file banners
*
* $Nokeywords: $
*
************************************************************************/
#pragma once
#include <set>
/////////////////////////////////////////////////////////////////////////////
// CResOrgOptions class
#define OPTIONS _T("Options")
#define OPTION_EMAIL_URL _T("Email URL")
#define OPTION_WEB_URL _T("Web URL")
#define OPTION_FAQ_URL _T("FAQ URL")
#define OPTION_DISCUSSIONS_URL _T("Discussion Board URL")
#define OPTION_BUGS_URL _T("Known Bugs URL")
#define OPTION_MAILING_LIST_URL _T("Mailing List URL")
#define OPTION_ABOUTME_URL _T("About Me URL")
#define OPTION_WARN_SYM_CHANGES _T("Warn On Symbol Changes")
#define OPTION_AUTOFIX_NEXT_SYM_VALUES _T("Auto fix Next Symbol Values")
#define OPTION_WARN_NEXT_SYM_VALUES _T("Warn if Next Symbol Values in use")
#define OPTION_FILTER_MULTI_FILE_DISPLAYS _T("Filter Multi-File Symbols Displays")
#define OPTION_FIXED_SYMBOLS _T("Fixed Symbols")
#define OPTION_CHECK_OUT_OF_RANGE_SYMBOLS _T("Check for out of range Symbols")
#define OPTION_SAVE_CONFIG _T("Save symbol file configuration")
#define OPTION_ADDIN_LOAD_PROMPT _T("Ask whether Add-In should be loaded")
#define OPTION_MAILING_LIST_PROMPT _T("Mailing List Prompt")
#define OPTION_DISPLAY_TOOLBAR_TEXT _T("Toolbar Text")
#define OPTION_DISPLAY_AUTO_RELOAD _T("Auto reload files")
#define OPTION_DISPLAY_AUTO_HIDE_WORKSPACE _T("Auto hide workspace")
#define OPTION_DISPLAY_XP_MENUS _T("XP style menus")
#define OPTION_DS_VER _T("DevStudio Version")
#define OPTION_VERSION_CHECKING _T("Check for updates")
#define OPTION_VERSION_CHECK_INTERVAL _T("Update check interval")
#define OPTION_VERSION_CHECK_DEV _T("Check for updated development versions")
#define OPTION_LAST_UPDATE_CHECK _T("Last update check")
class CResOrgVersionCheck;
#define CResOrgOptions_BASE CCmdTarget
class RESORGCORE_EXT_CLASS CResOrgOptions : public CCmdTarget
{
public:
CResOrgOptions(void);
virtual ~CResOrgOptions(void);
// Attributes
protected:
bool m_bWarnOnSymbolChanges;
bool m_bAutoFixNextSymbolValues;
bool m_bWarnIfNextSymbolValuesInUse;
bool m_bFilterMultiFileSymbolsDisplays;
bool m_bCheckForOutOfRangeSymbols;
bool m_bAskAboutLoading;
bool m_bAskAboutMailingList;
bool m_bShowTextOnToolbars;
bool m_bAutoReloadFiles;
bool m_bAutoHideWorkspace;
bool m_bXpStyleMenus;
bool m_bAutoSaveSymbolFileConfig;
CString m_sEmailURL;
CString m_sWebURL;
CString m_sFaqURL;
CString m_sDiscussionBoardURL;
CString m_sKnownBugsURL;
CString m_sMailingListURL;
CString m_sAboutMeURL;
CString m_sDevStudioVer;
bool m_bEnableVersionChecking;
int m_nVersionCheckInterval;
bool m_bCheckDevelopmentVersions;
CTime m_timeLastUpdateCheck;
CResOrgVersionCheck* m_pVersionChecker;
std::set <CString> m_setFixedSymbols;
std::set <CString> m_setDefaultFixedSymbols;
// Operations
public:
bool AutoFixNextSymbolValues(void) const
{ return m_bAutoFixNextSymbolValues; }
bool WarnOnSymbolChanges(void) const
{ return m_bWarnOnSymbolChanges; }
bool WarnOnSymbolChanges(bool bWarn);
bool WarnIfNextSymbolValuesInUse(void) const
{ return m_bWarnIfNextSymbolValuesInUse; }
bool WarnIfNextSymbolValuesInUse(bool bWarn);
bool CheckForOutOfRangeSymbols(void) const
{ return m_bCheckForOutOfRangeSymbols; }
bool CheckForOutOfRangeSymbols(bool bCheck);
bool FilterMultiFileSymbolsDisplays(void) const
{ return m_bFilterMultiFileSymbolsDisplays; }
bool FilterMultiFileSymbolsDisplays(bool bFilter);
bool ShowTextOnToolbars(void) const
{ return m_bShowTextOnToolbars; }
bool ShowTextOnToolbars(bool bShow);
bool AutoSaveSymbolFileConfig(void) const
{ return m_bAutoSaveSymbolFileConfig; }
bool AutoSaveSymbolFileConfig(bool bEnable);
bool AutoFixNextSymbolValues(bool bEnable);
bool AutoReloadFiles(void) const
{ return m_bAutoReloadFiles; }
bool AutoReloadFiles(bool bEnable);
bool AutoHideWorkspace(void) const
{ return m_bAutoHideWorkspace; }
bool AutoHideWorkspace(bool bEnable);
bool AskAboutLoadingAddIn(void) const
{ return m_bAskAboutLoading; }
bool AskAboutLoadingAddIn(bool bLoad);
bool CheckDevelopmentVersions(void) const
{ return m_bCheckDevelopmentVersions; }
bool IsMailingListPromptEnabled(void) const
{ return m_bAskAboutMailingList; }
bool EnableMailingListPrompt(bool bEnable);
bool UseXpStyleMenus(void) const
{ return m_bXpStyleMenus; }
bool UseXpStyleMenus(bool bXpStyleMenus);
CString GetWebURL(void) const
{ return m_sWebURL; }
CString GetEmailURL(void) const
{ return m_sEmailURL; }
CString GetFaqURL(void) const
{ return m_sFaqURL; }
CString GetDiscussionBoardURL(void) const
{ return m_sDiscussionBoardURL; }
CString GetKnownBugsURL(void) const
{ return m_sKnownBugsURL; }
CString GetMailingListURL(void) const
{ return m_sMailingListURL; }
CString GetAboutMeURL(void) const
{ return m_sAboutMeURL; }
bool SetEmailURL(const CString& sEmailURL);
bool SetWebURL(const CString& sWebURL);
bool SetFaqURL(const CString& sFaqURL);
bool SetDiscussionBoardURL(const CString& sDiscussionBoardURL);
bool SetKnownBugsURL(const CString& sKnownBugsURL);
bool SetMailingListURL(const CString& sMailingListURL);
bool SetAboutMeURL(const CString& sAboutMeURL);
bool IsFixedSymbol(const CString& sSymbolName);
CString GetDevStudioVer(void) const
{ return m_sDevStudioVer; }
bool EnableVersionChecking(bool bEnable);
bool CheckDevelopmentVersions(bool bCheck);
bool IsVersionCheckEnabled(void) const
{ return m_bEnableVersionChecking; }
int GetVersionCheckInterval(void) const
{ return m_nVersionCheckInterval; }
bool IsVersionCheckDue(void) const;
bool DoVersionCheck(void);
CResOrgVersionCheck* StartVersionCheck( bool bDisableDialupPrompt,
CWnd* pNotifyTarget = NULL,
UINT uMsg = 0,
UINT uID = 0);
bool IsVersionCheckRunning(void) const;
CResOrgVersionCheck* GetVersionChecker(void) const
{ return m_pVersionChecker; }
virtual DWORD OnVersionCheckCompleted(bool bCheckDevelopmentVersions = FALSE,
bool bPromptAlways = FALSE);
virtual bool OnExit(void);
// Overrides
virtual bool Initialise(void);
virtual int Configure(CWnd* pParentWnd = NULL);
// Implementation
protected:
bool UpdateBooleanOption(const CString& sOptionName,
bool& rbMemberVar,
bool bNewValue);
bool UpdateURLs(void);
virtual void OnOptionChanged(const CString& sOption) const;
afx_msg void OnCmdResOrgUpdateCheckCompleted(void);
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I haven't always written software for a living. When I graduated from Surrey University in 1989, it was with an Electronic Engineering degree, but unfortunately that never really gave me the opportunity to do anything particularly interesting (with the possible exception of designing
Darth Vader's Codpiece * for the UK Army in 1990).
* Also known as the Standard Army Bootswitch. But that's another story...
Since the opportunity arose to lead a software team developing C++ software for
Avionic Test Systems in 1996, I've not looked back. More recently I've been involved in the development of subsea acoustic navigation systems, digital TV broadcast systems, port security/tracking systems, and most recently software development tools with my own company,
Riverblade Ltd.
One of my personal specialities is IDE plug-in development.
ResOrg was my first attempt at a plug-in, but my day to day work is with
Visual Lint, an interactive code analysis tool environment with works within the Visual Studio and Eclipse IDEs or on build servers.
I love lots of things, but particularly music, photography and anything connected with history or engineering. I
despise ignorant, intolerant and obstructive people - and it shows...I can be a bolshy cow if you wind me up the wrong way...
I'm currently based 15 minutes walk from the beach in Bournemouth on the south coast of England. Since I moved here I've grown to love the place - even if it is full of grockles in Summer!