Scope
NoScanBasePage.cpp
1 #include "stdafx.h"
2 #include "NoScanBasePage.h"
3 
4 namespace scope {
5  namespace gui {
6 
8  : CToolTipDialog(TTS_NOPREFIX)
9  , initialized(false)
10  , area(_area)
11  , pockels_scroll(&_scanvecparams.pockels, 0.01, 0.1, true, true)
12  , pockels_edit (&_scanvecparams.pockels, true, true)
13  , fastz_scroll(&_scanvecparams.fastz, 5, 50, true, true)
14  , fastz_edit(&_scanvecparams.fastz, true, true)
15  , pixeltime_edit(&scope_controller.GuiParameters.areas[area]->daq.pixeltime, true, true)
16  , pixeltime_scroll(&scope_controller.GuiParameters.areas[area]->daq.pixeltime, scope_controller.GuiParameters.areas[area]->daq.inputs->MinimumPixeltime(), scope_controller.GuiParameters.areas[area]->daq.inputs->MinimumPixeltime(), true, true)
17  , fpux_edit(&scope_controller.GuiParameters.areas[area]->fpuxystage.xpos, true, true)
18  , fpuy_edit(&scope_controller.GuiParameters.areas[area]->fpuxystage.ypos, true, true)
19  , fpuleft_button(&scope_controller.FPU[area].LeftButton)
20  , fpuright_button(&scope_controller.FPU[area].RightButton)
21  , fpuup_button(&scope_controller.FPU[area].UpButton)
22  , fpudown_button(&scope_controller.FPU[area].DownButton) {
23 
24  std::wstringstream stream;
25  stream << L"Area " << area+1;
26  if ( scope_controller.GuiParameters.areas[area]->isslave() )
27  stream << L"S";
28  strtitle = stream.str();
29  SetTitle(strtitle.c_str()); // Be careful, do not assign a local variable (since SetTitle takes only the pointer, which will become invalid for a local variable)
30 
31  // For disabling save preset button and presets combo during scanning
33 }
34 
36  // Disconnect
37  rwstateconnection.disconnect();
38 }
39 
40 BOOL CNoScanBasePage::OnInitDialog(CWindow wndFocus, LPARAM lInitParam) {
41  DBOUT(L"CNoScanBasePage::OnInitDialog this " << this);
42  // attach the dialog controls to the edit objects
43  pixeltime_edit.AttachToDlgItem(GetDlgItem(IDC_PIXELTIME_EDIT));
44  pixeltime_scroll.AttachToDlgItem(GetDlgItem(IDC_PIXELTIME_SCROLL));
45  pockels_scroll.AttachToDlgItem(GetDlgItem(IDC_POCKELS_SCROLL));
46  pockels_edit.AttachToDlgItem(GetDlgItem(IDC_POCKELS_EDIT));
47  fastz_scroll.AttachToDlgItem(GetDlgItem(IDC_FASTZ_SCROLL));
48  fastz_edit.AttachToDlgItem(GetDlgItem(IDC_FASTZ_EDIT));
49 
50  // Set the FPU controls and arrow buttons
51  fpux_edit.AttachToDlgItem(GetDlgItem(IDC_FPUX_EDIT));
52  fpuy_edit.AttachToDlgItem(GetDlgItem(IDC_FPUY_EDIT));
53  fpuleft_button.AttachToDlgItem(GetDlgItem(IDC_FPULEFT));
54  fpuright_button.AttachToDlgItem(GetDlgItem(IDC_FPURIGHT));
55  fpuup_button.AttachToDlgItem(GetDlgItem(IDC_FPUUP));
56  fpudown_button.AttachToDlgItem(GetDlgItem(IDC_FPUDOWN));
57  CIcon icon;
58  icon.LoadIconW(IDI_ARROWLEFT);
59  fpuleft_button.SetIcon( icon.Detach());
60  icon.LoadIconW(IDI_ARROWRIGHT);
61  fpuright_button.SetIcon( icon.Detach());
62  icon.LoadIconW(IDI_ARROWUP);
63  fpuup_button.SetIcon( icon.Detach());
64  icon.LoadIconW(IDI_ARROWDOWN);
65  fpudown_button.SetIcon( icon.Detach());
66 
67  // Set the description of the scan type in a bold font
68  CStatic heading;
69  heading.Attach(GetDlgItem(IDC_STATIC_HEADING));
70  HFONT font(AtlCreateBoldFont());
71  heading.SetFont(font);
72  ::DeleteFont(font);
73  SetMsgHandled(true);
74 
75  initialized = true;
76 
77  return 0;
78 }
79 
81  // Nothing to do here...
82 }
83 
84 
85 }
86 
87 }
CScopeEditCtrl< double > fpuy_edit
FPU y position edit control.
boost::signals2::connection ConnectGUI(signalchange_t::slot_type slot)
Connect signal to slot to GUI.
CScopeScrollbarCtrl pockels_scroll
pockels cell scrollbar control
CScopeEditCtrl< double > fpux_edit
FPU x position edit control.
bool AttachToDlgItem(HWND hWnd)
Attach the control to a dialog item.
Definition: ScopeEditCtrl.h:68
virtual ~CNoScanBasePage(void)
Disconnect from ScopeController::ReadOnlyWhileScanning.
std::array< std::unique_ptr< Area >, SCOPE_NAREAS > areas
holds AreaParameters for all areas.
Definition: Scope.h:231
boost::signals2::connection rwstateconnection
Connection object to the ScopeController::ReadOnlyWhileScanning for setting controls RW state...
const uint32_t area
for which area are the image settings
bool initialized
true after dialog is initialized
CScopeButtonCtrl fpuleft_button
nudge FPU left button control
ScopeController scope_controller
our ScopeController here
std::wstring strtitle
string for settings page title
virtual void SetReadOnlyWhileScanning()
Connected to ScopeController::ReadOnlyWhileScanning.
This is the include file for standard system include files, or project specific include files that ar...
CNoScanBasePage(const uint32_t &_area, parameters::ScannerVectorFrameBasic &_scanvecparams)
We need a pointer to a basic ScannerVector (could be e.g.
#define DBOUT(s)
A debug output to the debug console.
Definition: helpers.h:153
CScopeScrollbarCtrl fastz_scroll
Fast Z scrollbar control.
CScopeEditCtrl< double > pixeltime_edit
pixel dwell time edit control
CScopeEditCtrl< double > fastz_edit
Fast Z edit control.
Parameters for a ScannerVectorFrameBasic.
Definition: Framescan.h:45
BOOL AttachToDlgItem(HWND hWnd)
Attach the control to a dialog item and set range and tick frequency.
CScopeButtonCtrl fpuup_button
nudge FPU up button control
CScopeEditCtrl< double > pockels_edit
pockels cell edit control
static parameters::Scope GuiParameters
The complete pseudo-global parameter set of the microscope.
CScopeButtonCtrl fpudown_button
nudge FPU down button control
CScopeButtonCtrl fpuright_button
nudge FPU rightbutton control
static ScopeNumber< bool > ReadOnlyWhileScanning
Set to true while scanning, GUI elements can connect to this to disable buttons and controls (that ar...
CScopeScrollbarCtrl pixeltime_scroll
pixel dwell time scrollbar control
bool AttachToDlgItem(HWND hWnd)
Attach the control to a dialog item.