Scope
|
#include <HistogramFrame.h>
Inherits CFrameWindowImpl< CHistogramFrame, CWindow, CHistogramFrameTraits >, CUpdateUI< CHistogramFrame >, CToolBarHelper< CHistogramFrame >, CIdleHandler, and Active< bool >.
Public Member Functions | |
CHistogramFrame (const uint32_t &_area, const uint32_t &_channels) | |
~CHistogramFrame () | |
*virtual BOOL | OnIdle () |
int | OnCreate (LPCREATESTRUCT lpCreateStruct) |
void | OnDestroy () |
void | OnSizing (UINT fwSide, LPRECT pRect) |
void | OnOptimize (UINT uNotifyCode, int nID, CWindow wndCtl) |
void | OnFullRange (UINT uNotifyCode, int nID, CWindow wndCtl) |
void | OnLogHistogram (UINT uNotifyCode, int nID, CWindow wndCtl) |
uint32_t | Area () const |
Called by CHistogramView via user defined Win32 message | |
LRESULT | OnUpdateHistogramLimits (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) |
Called by the DisplayController | |
these run in the DisplayController's Run thread | |
void | HistoGramAndRender (scope::SCOPE_MULTIIMAGECPTR_T const _multi) |
void | UpdateStatus (const RunState &_rs) |
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 Types | |
typedef CFrameWindowImpl< CHistogramFrame, CWindow, CHistogramFrameTraits > | CHistogramFrameType |
Protected Member Functions | |
bool | RunUpdateStatusbar (StopCondition *const ac) |
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 |
bool | loghist |
CToolBarCtrl | toolbar |
std::wstring | statusstr |
std::wstring | limitsstr |
CMultiPaneStatusBarCtrl | m_wndStatusBar |
CHistogramView | view |
uint32_t | framecount |
Protected Attributes inherited from Active< bool > | |
StopCondition | stop |
bool | done |
SynchronizedQueue< const std::function< void(StopCondition *const sc)> > | ptq |
std::thread | thread |
Additional Inherited Members | |
Public Types inherited from Active< bool > | |
typedef std::function< bool(StopCondition *const sc)> | Command |
Manages the display of histograms.
Definition at line 17 of file HistogramFrame.h.
|
protected |
Need to typedef this, otherwise problems with CHAIN_MSG_MAP macro...
Definition at line 26 of file HistogramFrame.h.
scope::gui::CHistogramFrame::CHistogramFrame | ( | const uint32_t & | _area, |
const uint32_t & | _channels | ||
) |
Simple constructor.
Definition at line 12 of file HistogramFrame.cpp.
scope::gui::CHistogramFrame::~CHistogramFrame | ( | ) |
Detaches if not yet happened and quits.
Definition at line 23 of file HistogramFrame.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 41 of file HistogramFrame.cpp.
|
virtual |
int scope::gui::CHistogramFrame::OnCreate | ( | LPCREATESTRUCT | lpCreateStruct | ) |
Creates view, toolbar, statusbar etc., resizes window correctly.
Definition at line 52 of file HistogramFrame.cpp.
void scope::gui::CHistogramFrame::OnDestroy | ( | ) |
Detaches frame from ScopeController, because after OnDestroy the HWND is not valid anymore.
Definition at line 101 of file HistogramFrame.cpp.
void scope::gui::CHistogramFrame::OnSizing | ( | UINT | fwSide, |
LPRECT | pRect | ||
) |
Keeps an aspect ratio of 1 by adapting pRect.
void scope::gui::CHistogramFrame::OnOptimize | ( | UINT | uNotifyCode, |
int | nID, | ||
CWindow | wndCtl | ||
) |
Calls CHistogramView::Optimize on view.
Definition at line 114 of file HistogramFrame.cpp.
void scope::gui::CHistogramFrame::OnFullRange | ( | UINT | uNotifyCode, |
int | nID, | ||
CWindow | wndCtl | ||
) |
Calls CHistogramView::FullRange on view.
Definition at line 119 of file HistogramFrame.cpp.
void scope::gui::CHistogramFrame::OnLogHistogram | ( | UINT | uNotifyCode, |
int | nID, | ||
CWindow | wndCtl | ||
) |
Switches between normal and logarithmic histogram.
Definition at line 124 of file HistogramFrame.cpp.
LRESULT scope::gui::CHistogramFrame::OnUpdateHistogramLimits | ( | UINT | uMsg, |
WPARAM | wParam, | ||
LPARAM | lParam, | ||
BOOL & | bHandled | ||
) |
Limit bar movements are handled in the client window (CHistogramView) but we want also an update of CHistogramFrame's statusbar.
Definition at line 129 of file HistogramFrame.cpp.
void scope::gui::CHistogramFrame::HistoGramAndRender | ( | scope::SCOPE_MULTIIMAGECPTR_T const | _multi | ) |
Sends the worker function 'RunHistoGramAndRender' to the ActiveObject.
Definition at line 139 of file HistogramFrame.cpp.
void scope::gui::CHistogramFrame::UpdateStatus | ( | const RunState & | _rs | ) |
Updates the statusstr and send RunUpdateStatusbar to the Active object.
Definition at line 134 of file HistogramFrame.cpp.
|
inline |
Definition at line 152 of file HistogramFrame.h.
|
protected |
our ScopeController here
Definition at line 29 of file HistogramFrame.h.
|
protected |
which area is the histogram for
Definition at line 32 of file HistogramFrame.h.
|
protected |
number of channels for this area
Definition at line 35 of file HistogramFrame.h.
|
protected |
are we attached to ScopeController?
Definition at line 38 of file HistogramFrame.h.
|
protected |
do we want a logarithmic count histogram
Definition at line 41 of file HistogramFrame.h.
|
protected |
the toolbar
Definition at line 44 of file HistogramFrame.h.
|
protected |
holds the current run status as string (we need a member since the lifetime of a local variable is too short for the WTL UIUpdate mechanism).
Definition at line 48 of file HistogramFrame.h.
|
protected |
holds the current limits as string (we need a member since the lifetime of a local variable is too short for the WTL UIUpdate mechanism).
Definition at line 52 of file HistogramFrame.h.
|
protected |
the statusbar (multipane)
Definition at line 55 of file HistogramFrame.h.
|
protected |
The view inside the client window.
Definition at line 58 of file HistogramFrame.h.
|
protected |
number of the currently displayed histogram
Definition at line 61 of file HistogramFrame.h.
CCommandBarCtrl scope::gui::CHistogramFrame::m_CmdBar |
the command bar.
public, CToolBarHelper needs this to compile...
Definition at line 73 of file HistogramFrame.h.