Scope
|
#include <ChannelFrame.h>
Inherits CFrameWindowImpl< CChannelFrame >, CUpdateUI< CChannelFrame >, CToolBarHelper< CChannelFrame >, CIdleHandler, and Active< bool >.
Public Member Functions | |
CChannelFrame (const uint32_t &_area) | |
~CChannelFrame () | |
uint32_t | Area () const |
Called via Win32 messages | |
= | |
virtual void | OnFinalMessage (HWND) |
virtual BOOL | OnIdle () |
int | OnCreate (LPCREATESTRUCT lpCreateStruct) |
void | OnDestroy () |
void | OnSizing (UINT fwSide, LPRECT pRect) |
BOOL | OnMouseWheel (UINT nFlags, short zDelta, CPoint pt) |
void | OnSameSize (UINT uCode, int nID, HWND hwncCtrl) |
void | OnDoubleSize (UINT uCode, int nID, HWND hwncCtrl) |
void | OnHalfSize (UINT uCode, int nID, HWND hwncCtrl) |
Called by CChannelView via user defined Win32 message | |
LRESULT | OnUpdateMousePixel (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) |
Called by the DisplayController | |
these run in the DisplayController's Run thread | |
virtual void | UpdateStatus (const RunState &_rs) |
virtual void | SetHistogramLimits (const uint32_t &_channel, const uint16_t &_lower, const uint16_t &_upper) |
virtual void | LayOverAndRender (scope::SCOPE_MULTIIMAGECPTR_T const _multi) |
virtual void | UpdateScaleText (const std::wstring &_text) |
Public Member Functions inherited from Active< bool > | |
Active () | |
std::future< bool > | Send (const Command &_cmd) |
void | AbortCurrent () |
void | Quit () |
Public Attributes | |
CCommandBarCtrl | m_CmdBar |
Protected Member Functions | |
bool | RunLayOverAndRender (StopCondition *const sc, scope::SCOPE_MULTIIMAGECPTR_T const _multi) |
bool | RunUpdateStatusbar (StopCondition *const sc, scope::SCOPE_MULTIIMAGECPTR_T const _multi) |
void | UpdateScaleText () |
void | UncheckScaleButtons () |
Protected Member Functions inherited from Active< bool > | |
Active (const Active &) | |
void | operator= (const Active &) |
Protected Attributes | |
scope::ScopeController | scope_controller |
const uint32_t | area |
const uint32_t | channels |
bool | attached |
CChannelView | view |
scope::SCOPE_MULTIIMAGECPTR_T | current_frame |
std::wstring | framecountstr |
D2D1_POINT_2F | mousepos |
std::wstring | mouseposstr |
std::wstring | statusstr |
CMultiPaneStatusBarCtrl | m_wndStatusBar |
CToolBarCtrl | toolbar |
std::vector< ColorProps > | channel_colors |
scope::SCOPE_OVERLAY_T | overlay |
Protected Attributes inherited from Active< bool > | |
StopCondition | stop |
bool | done |
SynchronizedQueue< const std::function< void(StopCondition *const sc)> > | ptq |
std::thread | thread |
Static Protected Attributes | |
static std::array< int32_t, 4 > | colorcombo_resources = { IDC_COLORCOMBO1, IDC_COLORCOMBO2, IDC_COLORCOMBO3, IDC_COLORCOMBO4 } |
Additional Inherited Members | |
Public Types inherited from Active< bool > | |
typedef std::function< bool(StopCondition *const sc)> | Command |
Manages the display of images.
Definition at line 26 of file ChannelFrame.h.
scope::gui::CChannelFrame::CChannelFrame | ( | const uint32_t & | _area | ) |
Initialize everything.
[in] | _area | which the CChannelFrame is for |
Definition at line 17 of file ChannelFrame.cpp.
scope::gui::CChannelFrame::~CChannelFrame | ( | ) |
Detach if not yet happened and quit.
Definition at line 30 of file ChannelFrame.cpp.
|
protected |
Worker function which will run in the Active's thread.
Calculates overlay, copies it to a Direct2D bitmap and renders
Definition at line 63 of file ChannelFrame.cpp.
|
protected |
Worker function for all statusbar updates which will run in the Active's thread.
Since UISetText does string buffer delete and new we need to protect it. Additionally, UIUpdateStatusbar sends a settext message to the statusbar and does not return until the message is processes. Taken together having a worker function for the Active, ensuring only one call to UISetText and UIUpdateStatusbar at a time is the most robust solution. (Finally...)
Definition at line 82 of file ChannelFrame.cpp.
|
protected |
Updates the scale text with current values from scope_controller::GuiParameters.
Definition at line 110 of file ChannelFrame.cpp.
|
protected |
Unchecks all scale buttons.
Definition at line 120 of file ChannelFrame.cpp.
|
virtual |
delete this to free the memory
Definition at line 44 of file ChannelFrame.cpp.
|
virtual |
Updates toolbar and statusbar.
Definition at line 57 of file ChannelFrame.cpp.
int scope::gui::CChannelFrame::OnCreate | ( | LPCREATESTRUCT | lpCreateStruct | ) |
Create view, toolbar, and statusbar etc.
Resize window correctly.
Definition at line 126 of file ChannelFrame.cpp.
void scope::gui::CChannelFrame::OnDestroy | ( | ) |
Detaches frame from ScopeController, because after OnDestroy the HWND is not valid anymore.
Definition at line 48 of file ChannelFrame.cpp.
void scope::gui::CChannelFrame::OnSizing | ( | UINT | fwSide, |
LPRECT | pRect | ||
) |
Keeps the aspect ratio.
We subtract 20 for the window border and 92 for the tool- and statusbar to end up with the correct size ChannelFrame must have for correct aspect ratio in ChannelView
Definition at line 216 of file ChannelFrame.cpp.
BOOL scope::gui::CChannelFrame::OnMouseWheel | ( | UINT | nFlags, |
short | zDelta, | ||
CPoint | pt | ||
) |
Handles mouse wheel events to change zoom or pockels cell value (wheel+Ctrl)
Definition at line 242 of file ChannelFrame.cpp.
void scope::gui::CChannelFrame::OnSameSize | ( | UINT | uCode, |
int | nID, | ||
HWND | hwncCtrl | ||
) |
Sets window size to match the real frame size.
Definition at line 260 of file ChannelFrame.cpp.
void scope::gui::CChannelFrame::OnDoubleSize | ( | UINT | uCode, |
int | nID, | ||
HWND | hwncCtrl | ||
) |
Sets window size to double the real frame size.
Definition at line 267 of file ChannelFrame.cpp.
void scope::gui::CChannelFrame::OnHalfSize | ( | UINT | uCode, |
int | nID, | ||
HWND | hwncCtrl | ||
) |
Sets window size to half the real frame size.
Definition at line 274 of file ChannelFrame.cpp.
LRESULT scope::gui::CChannelFrame::OnUpdateMousePixel | ( | UINT | uMsg, |
WPARAM | wParam, | ||
LPARAM | lParam, | ||
BOOL & | bHandled | ||
) |
Mouse movements are received in the client window (CChannelView) with the correct coordinates.
CChannelView passes this on to CChannelFrame which uses this function to process and show intensity values of the corresponding image pixel
Definition at line 231 of file ChannelFrame.cpp.
|
virtual |
Updates the statusstr and send RunUpdateStatusbar to the Active object.
Definition at line 290 of file ChannelFrame.cpp.
|
virtual |
Sets upper and lower limit of displayed colors for a channel.
Definition at line 281 of file ChannelFrame.cpp.
|
virtual |
Sends the worker function 'RunLayOverAndRender' to the ActiveObject.
[in] | _multi | Pointer to the current multi image |
Definition at line 295 of file ChannelFrame.cpp.
|
virtual |
Updates scale text.
Calls CChannelView::UpdateScale
Definition at line 307 of file ChannelFrame.cpp.
|
inline |
Definition at line 194 of file ChannelFrame.h.
|
protected |
the ScopeController kept handy here
Definition at line 35 of file ChannelFrame.h.
|
protected |
area for this CChannelFrame
Definition at line 38 of file ChannelFrame.h.
|
protected |
number of channels in this area
Definition at line 41 of file ChannelFrame.h.
|
protected |
are we attached to ScopeController?
Definition at line 44 of file ChannelFrame.h.
|
protected |
The view inside the client window.
Definition at line 47 of file ChannelFrame.h.
|
protected |
currently displayed image
Definition at line 50 of file ChannelFrame.h.
|
protected |
Holds the current frame count etc as string.
We need a class member for this since UIUpdateStatus bar runs asynchronously. A local string would get deleted once it is out of scope.
Definition at line 53 of file ChannelFrame.h.
|
protected |
current mouse position in device independent pixels (for the renderer)
Definition at line 56 of file ChannelFrame.h.
|
protected |
holds the current mouse position as string
Definition at line 59 of file ChannelFrame.h.
|
protected |
holds the current run status as string
Definition at line 62 of file ChannelFrame.h.
|
protected |
the statusbar
Definition at line 65 of file ChannelFrame.h.
|
protected |
the toolbar
Definition at line 68 of file ChannelFrame.h.
|
protected |
Ordered by channel number.
Definition at line 71 of file ChannelFrame.h.
|
protected |
Overlay of channels of the currently displayed image, use shared_ptr because it is used from different thread (e.g.
the Active's worker thread)
Definition at line 74 of file ChannelFrame.h.
|
staticprotected |
The resource IDs of the channel color combo boxes.
Definition at line 77 of file ChannelFrame.h.
CCommandBarCtrl scope::gui::CChannelFrame::m_CmdBar |
the command bar.
public, CToolBarHelper needs this to compile...
Definition at line 99 of file ChannelFrame.h.