Scope
|
#include <ScopeScrollbarCtrl.h>
Inherits CWindowImpl< CScopeScrollbarCtrl, CScrollBar >.
Public Member Functions | |
* | CScopeScrollbarCtrl (ScopeNumber< double > *_scopenum, const double &_smallincrement, const double &_largeincrement, const bool &_connectback=false, const bool &_connectcontrolstate=false) |
~CScopeScrollbarCtrl () | |
BOOL | AttachToDlgItem (HWND hWnd) |
void | SetState (const bool &state) |
void | SetSmallIncrement (const double &incr) |
Called via Win32 messages | |
LRESULT | OnKeyDown (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) |
LRESULT | OnKeyUp (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) |
void | OnScroll (int nSBCode, short nPos, CScrollBar pScrollBar) |
LRESULT | OnUpdateControl (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) |
These send async Win32 messages | |
/** | |
void | UpdateControl () |
Protected Attributes | |
bool | created |
ScopeNumber< double > *const | scopenum |
boost::signals2::connection | stateconnection |
boost::signals2::connection | valueconnection |
double | smallincrement |
double | largeincrement |
bool | shiftstate |
An adapted CScrollB ar control around a ScopeNumber<double>.
Definition at line 11 of file ScopeScrollbarCtrl.h.
scope::gui::CScopeScrollbarCtrl::CScopeScrollbarCtrl | ( | ScopeNumber< double > * | _scopenum, |
const double & | _smallincrement, | ||
const double & | _largeincrement, | ||
const bool & | _connectback = false , |
||
const bool & | _connectcontrolstate = false |
||
) |
()
Gets a pointer to the ScopeNumber<double> and connects if desired
[in] | _scopenum | ScopeNumber to which the slider connects |
[in] | _smallincrement | discrete increment of underlying ScopeNumber on scrollbar buttons or set to 0 for 1/100th of scopenum range |
[in] | _largeincrement | discrete increment of underlying ScopeNumber on click into scrollbar or set to 0 for 1/20th of scopenum range |
[in] | _connectback | change scrollbar value when ScopeNumber is changed |
[in] | _connectcontrolstate | change scrollbar enabled/disabled state when read/write state of the ScopeNumber is changed |
Definition at line 9 of file ScopeScrollbarCtrl.cpp.
scope::gui::CScopeScrollbarCtrl::~CScopeScrollbarCtrl | ( | ) |
Disconnects everything.
Definition at line 20 of file ScopeScrollbarCtrl.cpp.
BOOL scope::gui::CScopeScrollbarCtrl::AttachToDlgItem | ( | HWND | hWnd | ) |
Attach the control to a dialog item and set range and tick frequency.
Definition at line 25 of file ScopeScrollbarCtrl.cpp.
LRESULT scope::gui::CScopeScrollbarCtrl::OnKeyDown | ( | UINT | uMsg, |
WPARAM | wParam, | ||
LPARAM | lParam, | ||
BOOL & | bHandled | ||
) |
Switches to next control on return or tab and updates ScopeValue scope_val Also sets state of shift key.
Definition at line 52 of file ScopeScrollbarCtrl.cpp.
LRESULT scope::gui::CScopeScrollbarCtrl::OnKeyUp | ( | UINT | uMsg, |
WPARAM | wParam, | ||
LPARAM | lParam, | ||
BOOL & | bHandled | ||
) |
Resets state of shift key.
Definition at line 64 of file ScopeScrollbarCtrl.cpp.
void scope::gui::CScopeScrollbarCtrl::OnScroll | ( | int | nSBCode, |
short | nPos, | ||
CScrollBar | pScrollBar | ||
) |
Updates the ScopeNumber from the slider position.
Definition at line 35 of file ScopeScrollbarCtrl.cpp.
LRESULT scope::gui::CScopeScrollbarCtrl::OnUpdateControl | ( | UINT | uMsg, |
WPARAM | wParam, | ||
LPARAM | lParam, | ||
BOOL & | bHandled | ||
) |
Worker for UpdateControl.
Definition at line 72 of file ScopeScrollbarCtrl.cpp.
void scope::gui::CScopeScrollbarCtrl::UpdateControl | ( | ) |
Updates the slider position from the ScopeNumber.
Definition at line 78 of file ScopeScrollbarCtrl.cpp.
void scope::gui::CScopeScrollbarCtrl::SetState | ( | const bool & | state | ) |
Sets the enabled/disabled control state.
Definition at line 82 of file ScopeScrollbarCtrl.cpp.
void scope::gui::CScopeScrollbarCtrl::SetSmallIncrement | ( | const double & | incr | ) |
Sets the small increment.
Definition at line 87 of file ScopeScrollbarCtrl.cpp.
|
protected |
true if window created
Definition at line 16 of file ScopeScrollbarCtrl.h.
|
protected |
pointer to underlying ScopeValue
Definition at line 19 of file ScopeScrollbarCtrl.h.
|
protected |
The connection object for the control state (connection to the scopenum rw state change)
Definition at line 22 of file ScopeScrollbarCtrl.h.
|
protected |
The connection object for the control state (connection to the scopenum value change)
Definition at line 25 of file ScopeScrollbarCtrl.h.
|
protected |
if != 0, then scopenum is changed by increment on click on scrollbar arrows, otherwise by range/100
Definition at line 28 of file ScopeScrollbarCtrl.h.
|
protected |
if != 0, then scopenum is changed by largeincrement on click inside scrollbar, otherwise by range/20
Definition at line 31 of file ScopeScrollbarCtrl.h.
|
protected |
stores state of shift key
Definition at line 34 of file ScopeScrollbarCtrl.h.