yum-archive/TaSTT-Whisper

High-performance GPGPU inference of OpenAI's Whisper automatic speech recognition (ASR) model

git clone https://git.yummers.dev/yum-archive/TaSTT-Whisper

KonstantinMinorcec6627

master
628 B25 linesraw
1#include "stdafx.h"
2#include "TranslateCheckbox.h"
3
4static const LPCTSTR regValTranslate = L"translate";
5
6void TranslateCheckbox::initialize( HWND owner, int idc, AppState& state )
7{
8	m_hWnd = GetDlgItem( owner, idc );
9	assert( nullptr != m_hWnd );
10
11	if( state.boolLoad( regValTranslate ) )
12		::SendMessage( m_hWnd, BM_SETCHECK, BST_CHECKED, 0L );
13}
14
15bool TranslateCheckbox::checked()
16{
17	assert( nullptr != m_hWnd );
18	const int state = ( int )::SendMessage( m_hWnd, BM_GETCHECK, 0, 0 );
19	return state == BST_CHECKED;
20}
21
22void TranslateCheckbox::saveSelection( AppState& state )
23{
24	state.boolStore( regValTranslate, checked() );
25}