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

Digital instrument. More...

Public Member Functions

 DigitalInstrument (name, _canvas,...)
 Constructor – initialize a digital instrument. More...
 
 ~DigitalInstrument ()
 Destructor – free up all resources. More...
 
 setvalue (value)
 Method to set the value of the digital instrument. More...
 

Detailed Description

Digital instrument.

Parameters
_canvasThe canvas to draw the digital instrument 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).
  • -label The label of the instrument (default DigitalInstrument).
  • -labelcolor The color of the label (default black).
  • -labelfont The font of the label (default {Times 14 bold}).
  • -background The background color of the instrument (default blue).
  • -outline The outline color of the instrument (default black).
  • -scaleback The background color of the scale (default white).
  • -scaleticks The color of the scale ticks (default black).
  • -fontfamily The font family used on the instrument (default Courier).
  • -digitcolor The color of the digits (default black).
  • -digits The number of digits (default 3).
Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ DigitalInstrument()

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

Constructor – initialize a digital instrument.

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

◆ ~DigitalInstrument()

Instruments::DigitalInstrument::~DigitalInstrument ( )

Destructor – free up all resources.

Member Function Documentation

◆ setvalue()

Instruments::DigitalInstrument::setvalue ( value  )

Method to set the value of the digital instrument.

Parameters
valueThe value to set the instrument to.