Scope
scope::gui::CScopeButtonCtrl Class Reference

#include <ScopeButtonCtrl.h>

Inherits CWindowImpl< CScopeButtonCtrl, CButton >.

Public Member Functions

CScopeButtonCtrl (ScopeButton *_butt, const bool &_connectcontrolstate=true)
 
 ~CScopeButtonCtrl ()
 
bool AttachToDlgItem (HWND hWnd)
 
void Enable (const bool &state)
 
Called via Win32 messages
LRESULT OnClicked (UINT uNotifyCode, int nID, CWindow wndCtl)
 
LRESULT OnKeyDown (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnKeyUp (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
Handles connection to underlying ScopeButton
void Connect (ScopeButton *_butt, const bool &_connectcontrolstate=true)
 
void Disconnect ()
 

Protected Attributes

bool created
 
ScopeButtonscope_button
 
boost::signals2::connection stateconnection
 
std::mutex mutex
 
bool shiftstate
 

Detailed Description

An adapted CButton control around a ScopeButton.

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

Definition at line 11 of file ScopeButtonCtrl.h.

Constructor & Destructor Documentation

scope::gui::CScopeButtonCtrl::CScopeButtonCtrl ( ScopeButton _butt,
const bool &  _connectcontrolstate = true 
)

()

Gets a pointer to the ScopeButton and connects control enabled/disabled state if desired

Definition at line 7 of file ScopeButtonCtrl.cpp.

scope::gui::CScopeButtonCtrl::~CScopeButtonCtrl ( )

Disconnects control state.

Definition at line 18 of file ScopeButtonCtrl.cpp.

Member Function Documentation

LRESULT scope::gui::CScopeButtonCtrl::OnClicked ( UINT  uNotifyCode,
int  nID,
CWindow  wndCtl 
)

Call ScopeButton's click method.

Definition at line 67 of file ScopeButtonCtrl.cpp.

LRESULT scope::gui::CScopeButtonCtrl::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 47 of file ScopeButtonCtrl.cpp.

LRESULT scope::gui::CScopeButtonCtrl::OnKeyUp ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL &  bHandled 
)

Resets state of shift key.

Definition at line 59 of file ScopeButtonCtrl.cpp.

bool scope::gui::CScopeButtonCtrl::AttachToDlgItem ( HWND  hWnd)

Attach the control to a dialog item.

Definition at line 22 of file ScopeButtonCtrl.cpp.

void scope::gui::CScopeButtonCtrl::Enable ( const bool &  state)

Sets the enabled/disabled state of the control.

Definition at line 73 of file ScopeButtonCtrl.cpp.

Member Data Documentation

bool scope::gui::CScopeButtonCtrl::created
protected

true after window creation

Definition at line 16 of file ScopeButtonCtrl.h.

ScopeButton* scope::gui::CScopeButtonCtrl::scope_button
protected

pointer to the underlying ScopeButton

Definition at line 19 of file ScopeButtonCtrl.h.

boost::signals2::connection scope::gui::CScopeButtonCtrl::stateconnection
protected

The connection object for the control state (connection to the scope_button)

Definition at line 22 of file ScopeButtonCtrl.h.

std::mutex scope::gui::CScopeButtonCtrl::mutex
mutableprotected

protect connection managment

Definition at line 25 of file ScopeButtonCtrl.h.

bool scope::gui::CScopeButtonCtrl::shiftstate
protected

stores state of shift key

Definition at line 28 of file ScopeButtonCtrl.h.


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