Scope
FrameScanResonancePage.cpp
1 #include "StdAfx.h"
2 #include "FrameScanResonancePage.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]->FrameResonance())
13  , ycutoff_edit(&scope_controller.GuiParameters.areas[_area]->FrameResonance().ycutoff, true, true)
14  , yretrace_edit(&scope_controller.GuiParameters.areas[_area]->FrameResonance().yretrace, true, true)
15  , waitstorage_edit(&scope_controller.GuiParameters.areas[_area]->FrameResonance().waitafterenqueuestorage, true, true)
16  , waitdisplay_edit(&scope_controller.GuiParameters.areas[_area]->FrameResonance().waitafterenqueuedisplay, true, true) {
17 
19 
20  // Overwrite base class enum { IDD = ... }
21  // Use different dialog resources depending if this area is a slave area (only Pockels and ETL sliders) or a master area (full control complement)
22  if ( scope_controller.GuiParameters.areas[area]->isslave() )
23  m_psp.pszTemplate = MAKEINTRESOURCE(IDD_FRAMESCAN_SLAVE_PROPPAGE);
24  else
25  m_psp.pszTemplate = MAKEINTRESOURCE(IDD_FRAMESCAN_RESONANCE_PROPPAGE);
26 }
27 
28 BOOL CFrameScanResonancePage::OnInitDialog(CWindow wndFocus, LPARAM lInitParam) {
29  // Call base class dialog initialization
30  CFrameScanBasePage::OnInitDialog(wndFocus, lInitParam);
31 
32  // slave areas do not have these controls
33  if ( !scope_controller.GuiParameters.areas[area]->isslave() ) {
34  // Add the additional dialog elements
35  ycutoff_edit.AttachToDlgItem(GetDlgItem(IDC_YCUTOFF_EDIT));
36  yretrace_edit.AttachToDlgItem(GetDlgItem(IDC_YRETRACE_EDIT));
37  waitstorage_edit.AttachToDlgItem(GetDlgItem(IDC_WAITSTORAGE_EDIT));
38  waitdisplay_edit.AttachToDlgItem(GetDlgItem(IDC_WAITDISPLAY_EDIT));
39  }
40 
41  SetMsgHandled(true);
42  return 0;
43 }
44 
45 
46 }
47 
48 }
CScopeEditCtrl< double > ycutoff_edit
cutoff fraction for y scanner
void SetSmallIncrement(const double &incr)
Sets the small increment.
bool AttachToDlgItem(HWND hWnd)
Attach the control to a dialog item.
Definition: ScopeEditCtrl.h:68
std::array< std::unique_ptr< Area >, SCOPE_NAREAS > areas
holds AreaParameters for all areas.
Definition: Scope.h:231
CFrameScanResonancePage(const uint32_t &_area)
create the edit objects (e.g.
const uint32_t area
for which area are the image settings
ScopeController scope_controller
our ScopeController here
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...
CScopeEditCtrl< uint32_t > waitdisplay_edit
time to wait after image was enqueued to display
static parameters::Scope GuiParameters
The complete pseudo-global parameter set of the microscope.
CScopeScrollbarCtrl zoom_scroll
zoom scrollbar control
CScopeEditCtrl< double > yretrace_edit
retrace fraction for y scanner
CScopeEditCtrl< uint32_t > waitstorage_edit
time to wait after image was enqueued to storage