2012-03-27 21:20:36 +00:00
|
|
|
#pragma once
|
|
|
|
#include "PropertySheetDefs.h"
|
2012-05-06 22:14:03 +00:00
|
|
|
#include "Config.h"
|
2012-03-27 21:20:36 +00:00
|
|
|
|
|
|
|
class CPropertySheetHelper
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CPropertySheetHelper() :
|
|
|
|
m_LastPage(PG_CONFIG),
|
2012-03-31 21:34:02 +00:00
|
|
|
m_bmPages(0),
|
2012-07-08 12:21:15 +00:00
|
|
|
m_bSSNewFilename(false),
|
|
|
|
m_bDoBenchmark(false)
|
2012-03-27 21:20:36 +00:00
|
|
|
{}
|
|
|
|
virtual ~CPropertySheetHelper(){}
|
|
|
|
|
|
|
|
void FillComboBox(HWND window, int controlid, LPCTSTR choices, int currentchoice);
|
2021-02-10 21:05:00 +00:00
|
|
|
std::string BrowseToFile(HWND hWindow, const TCHAR* pszTitle, const TCHAR* REGVALUE, const TCHAR* FILEMASKS);
|
2012-03-27 21:20:36 +00:00
|
|
|
void SaveStateUpdate();
|
2021-02-10 21:05:00 +00:00
|
|
|
int SaveStateSelectImage(HWND hWindow, const TCHAR* pszTitle, bool bSave);
|
2012-05-06 22:14:03 +00:00
|
|
|
void PostMsgAfterClose(HWND hWnd, PAGETYPE page);
|
2012-03-27 21:20:36 +00:00
|
|
|
|
2012-05-06 22:14:03 +00:00
|
|
|
void ResetPageMask(void) { m_bmPages = 0; } // Req'd because cancelling doesn't clear the page-mask
|
2012-03-27 21:20:36 +00:00
|
|
|
PAGETYPE GetLastPage(void) { return m_LastPage; }
|
2012-03-31 21:34:02 +00:00
|
|
|
void SetLastPage(PAGETYPE page)
|
|
|
|
{
|
|
|
|
m_LastPage = page;
|
|
|
|
m_bmPages |= 1<<(UINT32)page;
|
|
|
|
}
|
|
|
|
|
2012-05-06 22:14:03 +00:00
|
|
|
void SaveCurrentConfig(void);
|
2019-09-07 18:37:19 +00:00
|
|
|
const std::string & GetSSNewFilename(void) { return m_szSSNewFilename; }
|
2021-08-29 10:39:51 +00:00
|
|
|
const CConfigNeedingRestart& GetConfigOld(void) { return m_ConfigOld; }
|
2012-05-06 22:14:03 +00:00
|
|
|
CConfigNeedingRestart& GetConfigNew(void) { return m_ConfigNew; }
|
2012-07-08 12:21:15 +00:00
|
|
|
bool IsConfigChanged(void) { return m_ConfigNew != m_ConfigOld; }
|
|
|
|
void SetDoBenchmark(void) { m_bDoBenchmark = true; }
|
2015-02-13 22:40:53 +00:00
|
|
|
void ApplyNewConfig(const CConfigNeedingRestart& ConfigNew, const CConfigNeedingRestart& ConfigOld);
|
2021-09-17 19:43:10 +00:00
|
|
|
void ApplyNewConfigFromSnapshot(const CConfigNeedingRestart& ConfigNew);
|
2018-01-26 11:03:44 +00:00
|
|
|
void ConfigSaveApple2Type(eApple2Type apple2Type);
|
2021-08-29 10:39:51 +00:00
|
|
|
void SetSlot(UINT slot, SS_CARDTYPE newCardType);
|
2012-03-27 21:20:36 +00:00
|
|
|
|
|
|
|
private:
|
2012-07-08 12:21:15 +00:00
|
|
|
bool IsOkToSaveLoadState(HWND hWnd, const bool bConfigChanged);
|
2012-05-06 22:14:03 +00:00
|
|
|
bool IsOkToRestart(HWND hWnd);
|
|
|
|
void SaveComputerType(eApple2Type NewApple2Type);
|
2016-02-14 16:01:30 +00:00
|
|
|
void SaveCpuType(eCpuType NewCpuType);
|
2012-05-06 22:14:03 +00:00
|
|
|
bool HardwareConfigChanged(HWND hWnd);
|
|
|
|
bool CheckChangesForRestart(HWND hWnd);
|
|
|
|
void ApplyNewConfig(void);
|
|
|
|
void RestoreCurrentConfig(void);
|
|
|
|
std::string GetSlot(const UINT uSlot);
|
|
|
|
|
2012-03-27 21:20:36 +00:00
|
|
|
PAGETYPE m_LastPage;
|
2012-03-31 21:34:02 +00:00
|
|
|
UINT32 m_bmPages;
|
2012-03-27 21:20:36 +00:00
|
|
|
bool m_bSSNewFilename;
|
2019-09-07 18:37:19 +00:00
|
|
|
std::string m_szSSNewDirectory;
|
|
|
|
std::string m_szSSNewFilename;
|
2012-05-06 22:14:03 +00:00
|
|
|
CConfigNeedingRestart m_ConfigOld;
|
|
|
|
CConfigNeedingRestart m_ConfigNew;
|
2012-07-08 12:21:15 +00:00
|
|
|
bool m_bDoBenchmark;
|
2012-03-27 21:20:36 +00:00
|
|
|
};
|