2 #include "ScanModesSettingsPage.h"
3 #include "scanmodes/ScannerVectorFrameBasic.h"
8 CScanModesSettingsPage::CScanModesSettingsPage()
9 : framesaw_radio(&scope_controller.ScanMode[0].map.at(ScannerVectorTypeHelper::Sawtooth))
10 , framebidi_radio(&scope_controller.ScanMode[0].map.at(ScannerVectorTypeHelper::Bidirectional))
11 , framehopper_radio(&scope_controller.ScanMode[0].map.at(ScannerVectorTypeHelper::Planehopper))
12 , frameresonancebidi_radio(&scope_controller.ScanMode[0].map.at(ScannerVectorTypeHelper::ResonanceBiDi))
13 , frameresonancehopper_radio(&scope_controller.ScanMode[0].map.at(ScannerVectorTypeHelper::ResonanceHopper))
14 , linestraight_radio(&scope_controller.ScanMode[0].map.at(ScannerVectorTypeHelper::LineStraight)) {
22 framehopper_radio.
AttachToDlgItem(GetDlgItem(IDC_FRAME_PLANEHOPPER_RADIO));
23 frameresonancebidi_radio.
AttachToDlgItem(GetDlgItem(IDC_FRAME_RESONANT_BIDI_RADIO));
24 frameresonancehopper_radio.
AttachToDlgItem(GetDlgItem(IDC_FRAME_RESONANT_PLANEHOPPER_RADIO));
25 linestraight_radio.
AttachToDlgItem(GetDlgItem(IDC_LINE_STRAIGHT_RADIO));
36 for ( uint32_t a = 0 ; a < SCOPE_NAREAS ; a++ ) {
37 std::wostringstream stream;
38 stream << L
"Area " << a+1;
54 assert( (sel >= 0) && (sel < SCOPE_NAREAS) );
57 framesaw_radio.Disconnect();
58 framebidi_radio.Disconnect();
59 framehopper_radio.Disconnect();
60 frameresonancebidi_radio.Disconnect();
61 frameresonancehopper_radio.Disconnect();
62 linestraight_radio.Disconnect();
66 framesaw_radio.SetCheck(BST_UNCHECKED);
68 framebidi_radio.SetCheck(BST_UNCHECKED);
70 framehopper_radio.SetCheck(BST_UNCHECKED);
72 frameresonancebidi_radio.SetCheck(BST_UNCHECKED);
73 frameresonancehopper_radio.Connect(&
scope_controller.
ScanMode[sel].map.at(ScannerVectorTypeHelper::ResonanceHopper));
74 frameresonancehopper_radio.SetCheck(BST_UNCHECKED);
76 linestraight_radio.SetCheck(BST_UNCHECKED);
89 case ScannerVectorTypeHelper::Sawtooth:
90 framesaw_radio.SetCheck(BST_CHECKED);
92 case ScannerVectorTypeHelper::Bidirectional:
93 framebidi_radio.SetCheck(BST_CHECKED);
95 case ScannerVectorTypeHelper::Planehopper:
96 framehopper_radio.SetCheck(BST_CHECKED);
98 case ScannerVectorTypeHelper::ResonanceBiDi:
99 frameresonancebidi_radio.SetCheck(BST_CHECKED);
101 case ScannerVectorTypeHelper::ResonanceHopper:
102 frameresonancehopper_radio.SetCheck(BST_CHECKED);
104 case ScannerVectorTypeHelper::LineStraight:
105 linestraight_radio.SetCheck(BST_CHECKED);
std::array< std::unique_ptr< Area >, SCOPE_NAREAS > areas
holds AreaParameters for all areas.
CListBox areas_list
List of all areas, selection updates radio buttons.
static bool IsBuiltinSupported(const ScannerVectorTypeHelper::Mode &_scanmode)
Returns true if a given scannervector/scanmode is supported by the builtin/hardcoded (see ScopeDefine...
void SetChecks(const uint32_t &_a)
Checks radio buttons according to the scan mode of the selected area.
BOOL OnInitDialog(CWindow wndFocus, LPARAM lInitParam)
Handles dialog initialization.
This is the include file for standard system include files, or project specific include files that ar...
static std::array< ScanModeButtons, SCOPE_NAREAS > ScanMode
Buttons for switching the scan mode.
scope::ScopeController scope_controller
A ScopeController kept handy.
LRESULT OnAreaChange(WORD, WORD, HWND, BOOL &)
handles selection changes in area list box
static parameters::Scope GuiParameters
The complete pseudo-global parameter set of the microscope.