Files
AppleWin/source/Configuration/PropertySheetHelper.h
T
2026-07-26 21:49:53 +01:00

61 lines
1.9 KiB
C++

#pragma once
#include "PropertySheetDefs.h"
#include "Config.h"
class CPropertySheetHelper
{
public:
CPropertySheetHelper() :
m_LastPage(PG_CONFIG),
m_bmPages(0),
m_bmAfterClosePages(0),
m_bSSNewFilename(false),
m_bDoBenchmark(false)
{}
virtual ~CPropertySheetHelper(){}
void FillComboBox(HWND window, int controlid, LPCTSTR choices, int currentchoice);
std::string BrowseToFile(HWND hWindow, const char* pszTitle, const char* REGVALUE, const char* FILEMASKS);
void SaveStateUpdate();
bool SaveStateSelectImage(HWND hWindow, const char* pszTitle, bool bSave);
void PostMsgAfterClose(HWND hWnd, PAGETYPE page);
void ResetPageMask() { m_bmPages = 0; } // Req'd because cancelling doesn't clear the page-mask
PAGETYPE GetLastPage() { return m_LastPage; }
void SetLastPage(PAGETYPE page)
{
m_LastPage = page;
m_bmPages |= 1<<(UINT32)page;
m_bmAfterClosePages = m_bmPages;
}
void SaveCurrentConfig();
const std::string & GetSSNewFilename() { return m_szSSNewFilename; }
CConfigNeedingRestart& GetConfigNew() { return m_ConfigNew; }
bool IsConfigChangedForRestart() { return m_ConfigNew != m_ConfigOld; }
void SetDoBenchmark() { m_bDoBenchmark = true; }
void ApplyNewConfigFromSnapshot();
void ConfigSaveApple2Type(eApple2Type apple2Type);
void SetSlot(UINT slot, SS_CARDTYPE newCardType);
bool IsOkToResetConfig(HWND hWnd);
private:
void ApplyNewConfigForRestart();
bool IsOkToSaveLoadState(HWND hWnd);
bool IsOkToRestart(HWND hWnd);
void SaveComputerType(eApple2Type NewApple2Type);
void SaveCpuType(eCpuType NewCpuType);
bool HardwareConfigChanged(HWND hWnd);
std::string GetSlot(const UINT uSlot);
PAGETYPE m_LastPage;
UINT32 m_bmPages;
UINT32 m_bmAfterClosePages;
bool m_bSSNewFilename;
std::string m_szSSNewDirectory;
std::string m_szSSNewFilename;
CConfigNeedingRestart m_ConfigOld;
CConfigNeedingRestart m_ConfigNew;
bool m_bDoBenchmark;
};