Files
AppleWin/source/Configuration/PropertySheetHelper.h
TomCh 80ec6e5545 Improve Configuration GUI for better slot/card selection (#853, PR #1462)
. Add PropSheetPage: Slots (and include 'Reset to Default')
  - include config options for some cards
. Remove PropSheetPages: Sound & Disk
. Config page: refactor and add 'Reset all to Default'
. Input page: refactor
. Advanced page: refactor
2026-03-07 22:00:07 +00:00

61 lines
2.0 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();
int SaveStateSelectImage(HWND hWindow, const char* pszTitle, bool bSave);
void PostMsgAfterClose(HWND hWnd, PAGETYPE page);
void ResetPageMask(void) { m_bmPages = 0; } // Req'd because cancelling doesn't clear the page-mask
PAGETYPE GetLastPage(void) { return m_LastPage; }
void SetLastPage(PAGETYPE page)
{
m_LastPage = page;
m_bmPages |= 1<<(UINT32)page;
m_bmAfterClosePages = m_bmPages;
}
void SaveCurrentConfig(void);
const std::string & GetSSNewFilename(void) { return m_szSSNewFilename; }
CConfigNeedingRestart& GetConfigNew(void) { return m_ConfigNew; }
bool IsConfigChangedForRestart(void) { return m_ConfigNew != m_ConfigOld; }
void SetDoBenchmark(void) { m_bDoBenchmark = true; }
void ApplyNewConfigFromSnapshot(const CConfigNeedingRestart& ConfigNew);
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;
};