Scope
FrameScanBidiPage.cpp
1 #include "StdAfx.h"
2 #include "FrameScanBidiPage.h"
3 #include "PresetNameDlg.h"
4 #include "parameters/Framescan.h"
5 #include "helpers/ScopeButton.h"
6 #include "resource.h"
7 
8 namespace scope {
9  namespace gui {
10 
12  : CFrameScanBasePage(_area, scope_controller.GuiParameters.areas[_area]->FrameBiDi())
13  , xturn_edit(&scope_controller.GuiParameters.areas[_area]->FrameBiDi().xturnfraction, true, true)
14  , ycutoff_edit(&scope_controller.GuiParameters.areas[_area]->FrameBiDi().ycutoff, true, true)
15  , yretrace_edit(&scope_controller.GuiParameters.areas[_area]->FrameBiDi().yretrace, true, true) {
16 
17  // Overwrite base class enum { IDD = ... }
18  // Use different dialog resources depending if this area is a slave area (only Pockels and ETL sliders) or a master area (full control complement)
19  if ( scope_controller.GuiParameters.areas[area]->isslave() )
20  m_psp.pszTemplate = MAKEINTRESOURCE(IDD_FRAMESCAN_SLAVE_PROPPAGE);
21  else
22  m_psp.pszTemplate = MAKEINTRESOURCE(IDD_FRAMESCAN_BIDI_PROPPAGE);
23 }
24 
25 BOOL CFrameScanBidiPage::OnInitDialog(CWindow wndFocus, LPARAM lInitParam) {
26  // Call base class dialog initialization
27  CFrameScanBasePage::OnInitDialog(wndFocus, lInitParam);
28 
29  // slave areas do not have these controls
30  if ( !scope_controller.GuiParameters.areas[area]->isslave() ) {
31  // Add the additional dialog elements
32  xturn_edit.AttachToDlgItem(GetDlgItem(IDC_XTURN_EDIT));
33  ycutoff_edit.AttachToDlgItem(GetDlgItem(IDC_YCUTOFF_EDIT));
34  yretrace_edit.AttachToDlgItem(GetDlgItem(IDC_YRETRACE_EDIT));
35  }
36 
37  SetMsgHandled(true);
38  return 0;
39 }
40 
41 
42 }
43 
44 }
bool AttachToDlgItem(HWND hWnd)
Attach the control to a dialog item.
Definition: ScopeEditCtrl.h:68
CScopeEditCtrl< double > ycutoff_edit
cutoff fraction for y scanner
std::array< std::unique_ptr< Area >, SCOPE_NAREAS > areas
holds AreaParameters for all areas.
Definition: Scope.h:231
const uint32_t area
for which area are the image settings
ScopeController scope_controller
our ScopeController here
CScopeEditCtrl< double > yretrace_edit
retrace fraction for y scanner
CScopeEditCtrl< double > xturn_edit
turn fraction for x scanner
CFrameScanBidiPage(const uint32_t &_area)
create the edit objects (e.g.
Base class for all frame scan property pages.
This is the include file for standard system include files, or project specific include files that ar...
static parameters::Scope GuiParameters
The complete pseudo-global parameter set of the microscope.