Scope
scope::gui::CScopeUpDownCtrl< ValT > Class Template Reference

#include <ScopeUpDownCtrl.h>

Inherits CWindowImpl< CScopeUpDownCtrl< ValT >, CUpDownCtrl >.

Public Member Functions

CScopeUpDownCtrl (ScopeNumber< ValT > *_scopeval, const ValT &_increment, const bool &_connectback=false, const bool &_connectcontrolstate=false)
 
 ~CScopeUpDownCtrl (void)
 
bool AttachToDlgItem (HWND hWnd)
 
void UpdateValue ()
 
void SetState (const bool &state)
 
Called via Win32 messages
LRESULT OnUpDown (int idCtrl, LPNMHDR pnmh)
 

Protected Attributes

bool created
 
ScopeNumber< ValT > *const scopeval
 
boost::signals2::connection stateconnection
 
const ValT increment
 
bool incdec
 

Detailed Description

template<class ValT>
class scope::gui::CScopeUpDownCtrl< ValT >

An adapted CUpDownCtrl control around a ScopeNumber.

Do not use buddy features etc. in the resource editor, we rely solely on the ScopeNumber magic.

Warning
Needs message reflection in containing (dialog) window via REFLECT_NOTIFICATIONS()

Definition at line 12 of file ScopeUpDownCtrl.h.

Constructor & Destructor Documentation

template<class ValT >
* scope::gui::CScopeUpDownCtrl< ValT >::CScopeUpDownCtrl ( ScopeNumber< ValT > *  _scopeval,
const ValT &  _increment,
const bool &  _connectback = false,
const bool &  _connectcontrolstate = false 
)
inline

()

Gets a pointer to the ScopeNumber and connects if desired

Parameters
[in]_scopevalScopeNumber to which the up down control connects (taken by reference)
[in]_incrementdiscrete increment of underlying ScopeNumber, should be bigger than 0
[in]_connectbackchange ScopeNumber when up/down is clicked
[in]_connectcontrolstatechange up/down enabled/disabled state when read/write state is set at the ScopeNumber

Definition at line 42 of file ScopeUpDownCtrl.h.

template<class ValT >
scope::gui::CScopeUpDownCtrl< ValT >::~CScopeUpDownCtrl ( void  )
inline

Disconnects everything.

Definition at line 51 of file ScopeUpDownCtrl.h.

Member Function Documentation

template<class ValT >
bool scope::gui::CScopeUpDownCtrl< ValT >::AttachToDlgItem ( HWND  hWnd)
inline

Attach the control to a dialog item.

Definition at line 56 of file ScopeUpDownCtrl.h.

template<class ValT >
LRESULT scope::gui::CScopeUpDownCtrl< ValT >::OnUpDown ( int  idCtrl,
LPNMHDR  pnmh 
)
inline

Checks if the reflected notify is for this window and an UDN_DELTAPOS and calls UpdateVale accordingly.

Definition at line 67 of file ScopeUpDownCtrl.h.

template<class ValT >
void scope::gui::CScopeUpDownCtrl< ValT >::UpdateValue ( )
inline

Updates the ScopeValue by incrementing or decrementing.

Definition at line 83 of file ScopeUpDownCtrl.h.

template<class ValT >
void scope::gui::CScopeUpDownCtrl< ValT >::SetState ( const bool &  state)
inline

Sets the enabled/disabled control state.

Definition at line 91 of file ScopeUpDownCtrl.h.

Member Data Documentation

template<class ValT >
bool scope::gui::CScopeUpDownCtrl< ValT >::created
protected

true if window created

Definition at line 17 of file ScopeUpDownCtrl.h.

template<class ValT >
ScopeNumber<ValT>* const scope::gui::CScopeUpDownCtrl< ValT >::scopeval
protected

pointer to the underlying ScopeNumber

Definition at line 20 of file ScopeUpDownCtrl.h.

template<class ValT >
boost::signals2::connection scope::gui::CScopeUpDownCtrl< ValT >::stateconnection
protected

The connection object for the control state (connection to the scopenum rw state change)

Definition at line 23 of file ScopeUpDownCtrl.h.

template<class ValT >
const ValT scope::gui::CScopeUpDownCtrl< ValT >::increment
protected

ScopeNumber is incremented/decremented by this value.

Definition at line 26 of file ScopeUpDownCtrl.h.

template<class ValT >
bool scope::gui::CScopeUpDownCtrl< ValT >::incdec
protected

does the next OnUpdateControl increment (true) or decrement (false)

Definition at line 29 of file ScopeUpDownCtrl.h.


The documentation for this class was generated from the following file: