140 Main controller of microscope hardware and acquisition, also interface to the GUI.
const uint32_t area
for which area
const uint32_t channels
how many channels
void OnLButtonDown(UINT nFlags, CPoint point)
Ask renderer for hit test and set click state.
std::vector< uint16_t > upper_limits
upper limit values of all channels/the value that corresponds to histogram array index (because of ra...
std::vector< bool > dragginglower
Keeps track of mouse dragging which lower limit.
uint16_t range
what uin16_t histogram range is used
void OnLButtonUp(UINT nFlags, CPoint point)
Releases click state.
void SetLimits()
Set limits in renderer and scope_controller.
ScopeMultiHistogramPtr current_histogram
currently displayed histogram
SCOPE_MULTIIMAGECPTR_T current_frame
image corresponding to the currently displayed histogram
CChannelView is just a dumb holder for the renderer and takes care of window resizes etc...
std::vector< bool > draggingupper
Keeps track of mouse dragging which upper limit.
void OnMouseMove(UINT nFlags, CPoint point)
If moving with left mouse button down, give position to Renderer and render limit bars...
void OnShowWindow(BOOL bShow, UINT nStatus)
Create the renderer only now, because now the window is shown.
Handles all Direct2D rendering in a CHistogramView.
std::vector< uint16_t > lower_limits
lower limit values of all channels/the value that corresponds to histogram array index (because of ra...
In here all declarations for all kinds of datatypes Scope needs.
std::vector< FLOAT > ulpos
Keeps track of the upper limit positions in screen coordinates/histogram array index.
void OnSize(UINT, CSize _size)
Resize the Renderer accordingly, be careful not to resize to 0.
DECLARE_WND_CLASS_EX(nullptr, CS_HREDRAW|CS_VREDRAW,-1)
Set background brush to -1, avoids erasure of background (similar effect as OnEraseBkgnd below...
LRESULT OnEraseBkgnd(HDC wParam)
avoids flickering during resize
void UpdateHistogramFrame()
Update Histogram with current parameters.
static const uint32_t width
static constant width of the histogram renderer
CHistogramView is a holder for the renderer, calculates histograms, and takes care of window resizes ...
ScopeController scope_controller
the ScopeController kept handy here
d2d::D2HistogramRender renderer
this one handles all of the Views rendering
CHistogramView(const uint32_t &_area, const uint32_t &_channels, uint16_t _range)
Initialize everything.
void OnPaint(CDCHandle)
Render the histogram and the limit bars (both via Renderer)
std::vector< FLOAT > llpos
Keeps track of the lower limit positions in screen coordinates/histogram array index.
virtual void OnFinalMessage(HWND)
Do not do 'delete this;' because view is a member of frame and gets destroyed when frame is destroyed...