/* Legal Notice: Some portions of the source code contained in this file were derived from the source code of TrueCrypt 7.1a, which is Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2017 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef TC_HEADER_DLGCODE #define TC_HEADER_DLGCODE #include "Common.h" #include "Apidrvr.h" #include "Keyfiles.h" #include "Wipe.h" #ifdef __cplusplus extern "C" { #endif /* IDs for dynamically generated GUI elements */ enum dynamic_gui_element_ids { IDPM_CHECK_FILESYS = 500001, IDPM_REPAIR_FILESYS, IDPM_OPEN_VOLUME, IDPM_SELECT_FILE_AND_MOUNT, IDPM_SELECT_DEVICE_AND_MOUNT, IDPM_ADD_TO_FAVORITES, IDPM_ADD_TO_SYSTEM_FAVORITES, IDM_SHOW_HIDE, IDM_HOMEPAGE_SYSTRAY, IDPM_COPY_VALUE_TO_CLIPBOARD }; enum { TC_TBXID_LEGAL_NOTICES, TC_TBXID_SYS_ENCRYPTION_PRETEST, TC_TBXID_SYS_ENC_RESCUE_DISK, TC_TBXID_DECOY_OS_INSTRUCTIONS, TC_TBXID_EXTRA_BOOT_PARTITION_REMOVAL_INSTRUCTIONS }; #define TC_APPLICATION_ID L"IDRIX.VeraCrypt" #define TC_MUTEX_NAME_SYSENC L"Global\\VeraCrypt System Encryption Wizard" #define TC_MUTEX_NAME_NONSYS_INPLACE_ENC L"Global\\VeraCrypt In-Place Encryption Wizard" #define TC_MUTEX_NAME_APP_SETUP L"Global\\VeraCrypt Setup" #define TC_MUTEX_NAME_DRIVER_SETUP L"Global\\VeraCrypt Driver Setup" #define IDC_ABOUT 0x7fff /* ID for AboutBox on system menu in wm_user range */ #define EXCL_ACCESS_MAX_AUTO_RETRIES 500 #define EXCL_ACCESS_AUTO_RETRY_DELAY 10 #define UNMOUNT_MAX_AUTO_RETRIES 30 #define UNMOUNT_AUTO_RETRY_DELAY 50 // After the user receives the "Incorrect password" error this number of times in a row, we should automatically // try using the embedded header backup (if any). This ensures that the "Incorrect password" message is reported faster // initially (most such errors are really caused by supplying an incorrect password, not by header corruption). #define TC_TRY_HEADER_BAK_AFTER_NBR_WRONG_PWD_TRIES 2 #define MAX_MULTI_CHOICES 10 /* Maximum number of options for mutliple-choice dialog */ #define TC_APPD_FILENAME_CONFIGURATION L"Configuration.xml" #define TC_APPD_FILENAME_SYSTEM_ENCRYPTION L"System Encryption.xml" #define TC_APPD_FILENAME_DEFAULT_KEYFILES L"Default Keyfiles.xml" #define TC_APPD_FILENAME_HISTORY L"History.xml" #define TC_APPD_FILENAME_FAVORITE_VOLUMES L"Favorite Volumes.xml" #define TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES _T(TC_APP_NAME) L" System Favorite Volumes.xml" #define TC_APPD_FILENAME_NONSYS_INPLACE_ENC L"In-Place Encryption" #define TC_APPD_FILENAME_NONSYS_INPLACE_ENC_WIPE L"In-Place Encryption Wipe Algo" #define TC_APPD_FILENAME_POST_INSTALL_TASK_TUTORIAL L"Post-Install Task - Tutorial" #define TC_APPD_FILENAME_POST_INSTALL_TASK_RELEASE_NOTES L"Post-Install Task - Release Notes" #define TC_APPD_FILENAME_POST_INSTALL_TASK_RESCUE_DISK L"Post-Install Task - Rescue Disk" #define VC_FILENAME_RENAMED_SUFFIX L"_old" #ifndef USER_DEFAULT_SCREEN_DPI #define USER_DEFAULT_SCREEN_DPI 96 #endif #if (USER_DEFAULT_SCREEN_DPI != 96) # error Revision of GUI and graphics necessary, since everything assumes default screen DPI as 96 (note that 96 is the default on Windows 2000, XP, and Vista). #endif enum { TC_POST_INSTALL_CFG_REMOVE_ALL = 0, TC_POST_INSTALL_CFG_TUTORIAL, TC_POST_INSTALL_CFG_RELEASE_NOTES, TC_POST_INSTALL_CFG_RESCUE_DISK, }; extern char *LastDialogId; extern char *ConfigBuffer; extern wchar_t szHelpFile[TC_MAX_PATH]; extern wchar_t szHelpFile2[TC_MAX_PATH]; extern wchar_t SecurityTokenLibraryPath[TC_MAX_PATH]; extern char CmdTokenPin [TC_MAX_PATH]; extern HFONT hFixedDigitFont; extern HFONT hBoldFont; extern HFONT hTitleFont; extern HFONT hFixedFont; extern HFONT hUserFont; extern HFONT hUserUnderlineFont; extern HFONT hUserBoldFont; extern HFONT WindowTitleBarFont; extern int ScreenDPI; extern double DlgAspectRatio; extern HWND MainDlg; extern BOOL Silent; extern BOOL bHistory; extern BOOL bPreserveTimestamp; extern BOOL bShowDisconnectedNetworkDrives; extern BOOL bHideWaitingDialog; extern BOOL bCmdHideWaitingDialog; extern BOOL bCmdHideWaitingDialogValid; extern BOOL bUseSecureDesktop; extern BOOL bCmdUseSecureDesktop; extern BOOL bCmdUseSecureDesktopValid; extern BOOL bStartOnLogon; extern BOOL bMountDevicesOnLogon; extern BOOL bMountFavoritesOnLogon; extern int HiddenSectorDetectionStatus; extern wchar_t *lpszTitle; extern OSVersionEnum nCurrentOS; extern int CurrentOSMajor; extern int CurrentOSMinor; extern int CurrentOSServicePack; extern int CurrentOSBuildNumber; extern BOOL RemoteSessio
/*
Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Modifications and additions to the original source code (contained in this file)
and all other portions of this file are Copyright (c) 2013-2015 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
#ifndef TC_HEADER_Main_Forms_WizardPage
#define TC_HEADER_Main_Forms_WizardPage
#include "Main/Main.h"
namespace VeraCrypt
{
class WizardPage : public wxPanel
{
public:
WizardPage (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style)
: wxPanel (parent, id, pos, size, style)
{ }
virtual ~WizardPage () { }
wxString GetPageTitle () const { return PageTitle; }
virtual bool IsValid () = 0;
virtual void OnPageChanging (bool forward) { }
wxString GetNextButtonText () const { return NextButtonText; }
void SetNextButtonText (const wxString &text) { NextButtonText = text; }
virtual void SetMaxStaticTextWidth (int width) { }
void SetPageTitle (const wxString &title) { PageTitle = title; }
virtual void SetPageText (const wxString &text) = 0;
Event PageUpdatedEvent;
protected:
wxString PageTitle;
wxString NextButtonText;
};
}
#endif // TC_HEADER_Main_Forms_WizardPage