2 #include "ScopeLEDCtrl.h"
15 : scopebool(_scopebool)
20 icon.LoadIconWithScaleDown(IDI_LED_GREEN, 18, 18);
26 icon.LoadIconWithScaleDown(IDI_LED_RED, 18, 18);
27 imagered.Create(18, 18, ILC_COLOR32, 0, 2);
32 icon.LoadIconWithScaleDown(IDI_LED_WARNING, 18, 18);
51 if ( SubclassWindow(hWnd) ) {
61 dc.FillRect(&rc, (HBRUSH)(COLOR_BTNFACE));
63 CBitmapButtonImpl<CScopeLEDCtrl>::DoPaint(dc);
67 if (
style == SCOPELED_OKONTRUE )
69 if (
style == SCOPELED_WARNINGONTRUE )
78 if (
style == SCOPELED_OKONTRUE )
80 if (
style == SCOPELED_WARNINGONTRUE )
void DoPaint(CDCHandle dc)
override of CBitmapButtonImpl DoPaint() in CBmpBtn class to erase background (otherwise weird overlay...
boost::signals2::connection ConnectGUI(signalchange_t::slot_type slot)
Connect signal to slot to GUI.
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) ...
This is the include file for standard system include files, or project specific include files that ar...
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.
Various helper functions and classes for Scope.
void SetTrue()
Sets LED to true.
~CScopeLEDCtrl()
Disconnects.
ScopeNumber< bool > *const scopebool
pointer to underlying ScopeNumber
static CImageList imagegreen
image for green LED
const uint32_t style
the LED style