Scope
StimulationSettingsPage.cpp
1 #include "StdAfx.h"
2 #include "StimulationSettingsPage.h"
3 #include "resource.h"
4 
5 namespace scope {
6  namespace gui {
7 
9  : onset(&scope_controller.GuiParameters.stimulation.onset, true)
10  , duration(&scope_controller.GuiParameters.stimulation.duration, true)
11  , ontime(&scope_controller.GuiParameters.stimulation.ontime, true)
12  , offtime(&scope_controller.GuiParameters.stimulation.offtime, true)
13  , enabled(&scope_controller.GuiParameters.stimulation.enable, true) {
15 }
16 
18  DBOUT(L"CStimulationSettings::EnableDisableControls\n");
19  // Attention: ReadOnly ist !Enable
21  onset.SetState(state);
22  duration.SetState(state);
23  ontime.SetState(state);
24  offtime.SetState(state);
25 }
26 
27 BOOL CStimulationSettingsPage::OnInitDialog(CWindow wndFocus, LPARAM lInitParam) {
28  // attach the dialog controls to the edit objects
29  onset.AttachToDlgItem(GetDlgItem(IDC_ONSET));
30  duration.AttachToDlgItem(GetDlgItem(IDC_DURATION));
31  ontime.AttachToDlgItem(GetDlgItem(IDC_ONTIME));
32  offtime.AttachToDlgItem(GetDlgItem(IDC_OFFTIME));
33  enabled.AttachToDlgItem(GetDlgItem(IDC_ENABLE));
34 
35  // set depending on initial stimulation.enable value
37 
38  SetMsgHandled(false);
39  return 0;
40 }
41 
42 }}
CScopeEditCtrl< double > onset
stimulation onset (in sec)
void SetState(const bool &state)
Sets the enabled/disabled state of the control.
bool AttachToDlgItem(HWND hWnd)
Attach the control to a dialog item.
Definition: ScopeEditCtrl.h:68
ScopeNumber< bool > enable
stimulation enabled/disabled
Definition: Scope.h:42
CScopeEditCtrl< double > ontime
on time of one stimulation pulse (in sec)
This is the include file for standard system include files, or project specific include files that ar...
CScopeEditCtrl< double > offtime
off time of one stimulation pulse (in sec)
#define DBOUT(s)
A debug output to the debug console.
Definition: helpers.h:153
bool AttachToDlgItem(HWND hWnd)
Attach the control to a dialog item.
CStimulationSettingsPage(void)
create the edit objects (e.g.
CScopeCheckBoxCtrl enabled
to enable the whole stimulation page
void EnableDisableControls()
Enable/Disable controls, depending on scope_controller.GuiParameters.stimulation.enable() ...
scope::ScopeController scope_controller
keep a ScopeController for connecting GUI controls
CScopeEditCtrl< double > duration
total duration of stimulation, is filled with as many stimulation pulses as possible according to on&...
boost::signals2::connection ConnectOther(signalchange_t::slot_type slot)
Connect signal to slot to other stuff.
static parameters::Scope GuiParameters
The complete pseudo-global parameter set of the microscope.
Stimulation stimulation
the StimulationParameters
Definition: Scope.h:249