Model Railroad System  2.2.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Instruments::CabSignalLamp Class Reference

Cab signal lamp type. More...

Public Member Functions

 CabSignalLamp (name, _canvas,...)
 Constructor – initialize a Cab Signal Lamp. More...
 
 ~CabSignalLamp ()
 Destructor – free up all resources. More...
 

Private Member Functions

 _ConfigureXY (option, value)
 Method to configure X or Y. More...
 
 _ConfigureSize (option, value)
 Method to configure size. More...
 
 _ConfigureFillColor (option, value)
 Method to configure a fill color. More...
 
 _ConfigureOutlineColor (option, value)
 Method to configure an outline color. More...
 

Private Attributes

 canvas
 Canvas the lamp is on. More...
 
 sx
 X size offset. More...
 
 sy
 Y size offset. More...
 

Detailed Description

Cab signal lamp type.

Parameters
_canvasThe canvas to draw the cab signal lamp on.
...Options:
  • -x The X coordinate of the instrument (default 0).
  • -y The Y coordinate of the instrument (default 0).
  • -size The size of the instrument (default 100).
  • -color The color of the lamp (default black).
  • -outline The outline color of the instrument (default black).
Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ CabSignalLamp()

Instruments::CabSignalLamp::CabSignalLamp ( name  ,
_canvas  ,
  ... 
)

Constructor – initialize a Cab Signal Lamp.

Parameters
_canvasThe canvas to draw the DialInstrument on.
...Option list.

◆ ~CabSignalLamp()

Instruments::CabSignalLamp::~CabSignalLamp ( )

Destructor – free up all resources.

Member Function Documentation

◆ _ConfigureFillColor()

Instruments::CabSignalLamp::_ConfigureFillColor ( option  ,
value   
)
private

Method to configure a fill color.

Parameters
optionThe name of the option to configure.
valueThe new value.

◆ _ConfigureOutlineColor()

Instruments::CabSignalLamp::_ConfigureOutlineColor ( option  ,
value   
)
private

Method to configure an outline color.

Parameters
optionThe name of the option to configure.
valueThe new value.

◆ _ConfigureSize()

Instruments::CabSignalLamp::_ConfigureSize ( option  ,
value   
)
private

Method to configure size.

Parameters
optionThe name of the option to configure.
valueThe new value.

◆ _ConfigureXY()

Instruments::CabSignalLamp::_ConfigureXY ( option  ,
value   
)
private

Method to configure X or Y.

Parameters
optionThe name of the option to configure.
valueThe new value.

Member Data Documentation

◆ canvas

Instruments::CabSignalLamp::canvas
private

Canvas the lamp is on.

◆ sx

Instruments::CabSignalLamp::sx
private

X size offset.

◆ sy

Instruments::CabSignalLamp::sy
private

Y size offset.