3 #include "helpers/ScopeNumber.h"
8 #define SCOPELED_OKONTRUE 0
9 #define SCOPELED_WARNINGONTRUE 1
13 :
public CBitmapButtonImpl<CScopeLEDCtrl> {
void DoPaint(CDCHandle dc)
override of CBitmapButtonImpl DoPaint() in CBmpBtn class to erase background (otherwise weird overlay...
An adapted CBitmapButton control around a ScopeNumber to show true or false as green or red LED...
static CImageList imagewarning
image for warning LED
void SetFalse()
Sets LED to false.
bool AttachToDlgItem(HWND hWnd)
Attach the control to a dialog item.
boost::signals2::connection valueconnection
The connection object for the control state (connection to the scopenum value change) ...
CScopeLEDCtrl(ScopeNumber< bool > *_scopebool, const uint32_t &_style=SCOPELED_WARNINGONTRUE)
Gets a pointer to the ScopeNumber and connects.
static CImageList imagered
image for red LED
void UpdateControl()
Sets LED according to value of scopebool.
void SetTrue()
Sets LED to true.
~CScopeLEDCtrl()
Disconnects.
static CImageList imagegreen
image for green LED
ScopeNumber< bool > *const scopebool
pointer to underlying ScopeNumber
const uint32_t style
the LED style