2 #include "ScanSettingsSheet.h"
3 #include "NoScanBasePage.h"
4 #include "FrameScanSawPage.h"
5 #include "FrameScanBidiPage.h"
6 #include "FrameScanHopperPage.h"
7 #include "FrameScanResonancePage.h"
14 : inputsinfospage(dynamic_cast<parameters::SCOPE_INPUTS_PARAMETERS_T*>(scope_controller.GuiParameters.areas[0]->daq.inputs.get())){
16 for ( uint32_t a = 0 ; a < SCOPE_NAREAS ; a++ ) {
25 ATLASSERT(m_hWnd == NULL);
34 m_psh.dwFlags = PSH_NOAPPLYNOW | PSH_MODELESS | PSH_USECALLBACK;
35 m_psh.hwndParent = hWndParent;
36 m_psh.phpage = (HPROPSHEETPAGE*)m_arrPages.GetData();
37 m_psh.nPages = m_arrPages.GetSize();
40 _Module.AddCreateWndData(&m_thunk.cd,
this);
42 HWND hWnd = (HWND)::PropertySheet(&m_psh);
45 ATLASSERT(m_hWnd == hWnd);
48 int nAdjX = GetSystemMetrics(SM_CXDLGFRAME) * 2;
49 int nAdjY = GetSystemMetrics(SM_CYDLGFRAME) * 2;
50 SetWindowPos(NULL, rc.left - nAdjX, rc.top - nAdjY, rc.Width(), rc.Height(),
51 SWP_NOZORDER|SWP_NOACTIVATE);
54 SetActivePage(nStartPage);
67 if (uMsg == PSCB_INITIALIZED) {
68 ATLASSERT(hWnd != NULL);
70 pT->SubclassWindow(hWnd);
73 else if (uMsg == PSCB_PRECREATE) {
74 LPDLGTEMPLATE pTemplate = (LPDLGTEMPLATE)lParam;
77 DWORD dwRemove = WS_POPUP|WS_SYSMENU|WS_CAPTION|DS_MODALFRAME;
78 DWORD dwAdd = WS_CHILD|WS_VISIBLE|WS_TABSTOP|DS_CONTEXTHELP|DS_3DLOOK|DS_CONTROL;
80 pTemplate->style = (pTemplate->style & ~dwRemove) | dwAdd;
81 pTemplate->dwExtendedStyle |= WS_EX_CONTROLPARENT;
88 LRESULT CScanSettingsSheet::OnSelChange(WPARAM wParam, LPNMHDR pnmHdr, BOOL & bHandled) {
89 return DefWindowProc(WM_NOTIFY, wParam, (LPARAM)pnmHdr);
97 case ScannerVectorTypeHelper::Sawtooth:
100 case ScannerVectorTypeHelper::Bidirectional:
103 case ScannerVectorTypeHelper::Planehopper:
106 case ScannerVectorTypeHelper::ResonanceBiDi:
113 SetActivePage(_area);
Main controller of microscope hardware and acquisition, also interface to the GUI.
HWND Create(const HWND hWndParent, const int nStartPage, const CRect &rc)
Adds all the settingspages.
ScopeController scope_controller
Our ScopeController here.
Property page for frame scan with resonance scanner.
std::array< std::unique_ptr< Area >, SCOPE_NAREAS > areas
holds AreaParameters for all areas.
Base class for all Scope datatypes here, provides a uniform interface (and saves typing...).
Settings sheet that has settings pages for different parameter sets.
std::array< std::unique_ptr< CNoScanBasePage >, SCOPE_NAREAS > scanpages
one imaging settings page for each area
Property page for bidirectional frame scan.
This is the include file for standard system include files, or project specific include files that ar...
void RegisterScanmodeCallback(std::function< void(const uint32_t &, const ScannerVectorType &)> _callback)
Registers a function to call when scanmode is changed.
T::Mode t
the enum from the template class
CMovementPage movementpage
the settings page for all stages
CStorageSettingsPage storagesettingspage
the storage settings page
In here all declarations for all kinds of datatypes Scope needs.
CScanSettingsSheet()
Generates CImageSettingsPages for every area.
Property page for sawtooth frame scan.
Property page for bidirectional frame scan.
CStimulationSettingsPage stimulationsettingspage
the stimulation settings page
void ChangeScanmode(const uint32_t &_area, const ScannerVectorType &_type)
Change the imaging settings page according to the choosen scan mode.
CAppModule _Module
The ATL application module.
static int CALLBACK PropSheetCallback(HWND hWnd, UINT uMsg, LPARAM lParam)
We need this for whatever (see some WTL dialog tutorial)...
static parameters::Scope GuiParameters
The complete pseudo-global parameter set of the microscope.
Base class for all scanning and non-scanning scan property pages, i.e.
SCOPE_INPUTSINFOPAGE_T inputsinfospage
a settings page for DAQmx/FPGA information