-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMMEventCallback.h
More file actions
115 lines (98 loc) · 3.97 KB
/
MMEventCallback.h
File metadata and controls
115 lines (98 loc) · 3.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
///////////////////////////////////////////////////////////////////////////////
// FILE: MMEventCallback.h
// PROJECT: Micro-Manager
// SUBSYSTEM: MMCore
//-----------------------------------------------------------------------------
// DESCRIPTION: Callback class used to send notifications from MMCore to
// higher levels (such as GUI)
//
// AUTHOR: Nenad Amodaj, nenad@amodaj.com, 12/10/2007
// COPYRIGHT: University of California, San Francisco, 2007
//
// LICENSE: This file is distributed under the "Lesser GPL" (LGPL) license.
// License text is included with the source distribution.
//
// This file is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES.
// CVS: $Id: Configuration.h 2 2007-02-27 23:33:17Z nenad $
//
#pragma once
#include <iostream>
class MMEventCallback
{
public:
MMEventCallback() {}
virtual ~MMEventCallback() {}
virtual void onPropertiesChanged()
{
std::cout << "onPropertiesChanged()\n";
}
virtual void onPropertyChanged(const char* name, const char* propName, const char* propValue)
{
std::cout << "onPropertyChanged() " << name << " " << propName << " " << propValue << '\n';
}
virtual void onChannelGroupChanged(const char* newChannelGroupName)
{
std::cout << "onChannelGroupChanged() " << newChannelGroupName << '\n';
}
virtual void onConfigGroupChanged(const char* groupName, const char* newConfigName)
{
std::cout << "onConfigGroupChanged() " << groupName << " " << newConfigName << '\n';
}
/**
* \brief Called when the system configuration has changed.
*
* "Changed" includes when a configuration was unloaded, for example because
* loading a new config file failed.
*/
virtual void onSystemConfigurationLoaded()
{
std::cout << "onSystemConfigurationLoaded()\n";
}
virtual void onPixelSizeChanged(double newPixelSizeUm)
{
std::cout << "onPixelSizeChanged() " << newPixelSizeUm << '\n';
}
virtual void onPixelSizeAffineChanged(double v0, double v1, double v2, double v3, double v4, double v5)
{
std::cout << "onPixelSizeAffineChanged() " << v0 << "-" << v1 << "-" << v2 << "-" << v3 << "-" << v4 << "-" << v5 << '\n';
}
virtual void onStagePositionChanged(const char* name, double pos)
{
std::cout << "onStagePositionChanged()" << name << " " << pos << '\n';
}
virtual void onXYStagePositionChanged(const char* name, double xpos, double ypos)
{
std::cout << "onXYStagePositionChanged()" << name << " " << xpos;
std::cout << " " << ypos << '\n';
}
virtual void onExposureChanged(const char* name, double newExposure)
{
std::cout << "onExposureChanged()" << name << " " << newExposure << '\n';
}
virtual void onShutterOpenChanged(const char* name, bool open)
{
std::cout << "onShutterOpenChanged()" << name << " " << open << '\n';
}
virtual void onSLMExposureChanged(const char* name, double newExposure)
{
std::cout << "onSLMExposureChanged()" << name << " " << newExposure << '\n';
}
virtual void onImageSnapped(const char* cameraLabel)
{
std::cout << "onImageSnapped() " << cameraLabel << '\n';
}
virtual void onSequenceAcquisitionStarted(const char* cameraLabel)
{
std::cout << "onSequenceAcquisitionStarted() " << cameraLabel << '\n';
}
virtual void onSequenceAcquisitionStopped(const char* cameraLabel)
{
std::cout << "onSequenceAcquisitionStopped() " << cameraLabel << '\n';
}
};