3 #include "helpers/ScopeNumber.h"
4 #include "ScopeDefines.h"
14 :
public CWindowImpl<CScopeSliderCtrl, CTrackBarCtrl> {
52 MESSAGE_HANDLER(WM_KEYUP,
OnKeyUp)
54 DEFAULT_REFLECTION_HANDLER()
62 CScopeSliderCtrl(
ScopeNumber<
double>* _scopenum, const
double& _increment = 0, const
bool& _connectback = false, const
bool& _connectcontrolstate = false);
74 LRESULT
OnKeyDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
77 LRESULT
OnKeyUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
80 void OnScroll(UINT nSBCode, UINT nPos, CScrollBar pScrollBar);
83 LRESULT
OnUpdateControl(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
boost::signals2::connection stateconnection
The connection object for the control state (connection to the scopenum rw state change) ...
bool created
true if window created
LRESULT 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 k...
LRESULT OnUpdateControl(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Worker for UpdateControl.
LRESULT OnKeyUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Resets state of shift key.
const double offset
is ScopeNumber lower limit
bool shiftstate
stores state of shift key
void OnScroll(UINT nSBCode, UINT nPos, CScrollBar pScrollBar)
Updates the ScopeNumber from the slider position.
const int32_t rangelow
lower end of the slider range, usually 0
const int32_t rangehigh
the upper end of the slider range (100 if not incrementing, otherwise range/increment) ...
const double scalefactor
scalefactor is increment or range/100 (if not incrementing)
ScopeNumber< double > *const scopenum
Pointer to the underlying ScopeNumber.
An adapted CTrackBarCtrl control around a ScopeNumber.
const double increment
if != 0, then scopenum can only be changed by multiples of increment and the slider should display ti...
boost::signals2::connection valueconnection
The connection object for the control state (connection to the scopenum value change) ...
BOOL AttachToDlgItem(HWND hWnd)
Attach the control to a dialog item and set range and tick frequency.