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

Code button object type. More...

Public Member Functions

 CodeButton (name, _ctcpanel, _canvas,...)
 Construct a Code Button object. More...
 
 ~CodeButton ()
 Clean up all data objects and free up all resources. More...
 
 getv ()
 Method to get our value (none). More...
 
 setv (state)
 Method to set our value (none). More...
 
 geti (ind)
 Method to get an indicator state (none). More...
 
 seti (ind, value)
 Method to set an indicator state (none). More...
 
 invoke ()
 Method to invoke the code button. More...
 

Private Attributes

 ctcpanel
 The CTC Panel component (parent widget). More...
 
 canvas
 The canvas component (parent widget component). More...
 

Detailed Description

Code button object type.

These are on the control panel and represent buttons that enact the settings of the SWPlates and SIGPlates for a given control point.

Parameters
_ctcpanelThe CTCPanel megawidget.
_canvasThe control panel canvas to draw the switch plate on.
...Options:
  • -x The x coordinate of the object (readonly, default 0).
  • -y The y coordinate of the object (readonly, default 0).
  • -controlpoint The name of the control point this switch is part of (readonly, default CP1).
  • -command The Tcl script to run when the code button is invoked.
Defined coords terminals: none. Defined values (states): none. Defined indicators: none.
Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ CodeButton()

CTCPanel::CodeButton::CodeButton ( name  ,
_ctcpanel  ,
_canvas  ,
  ... 
)

Construct a Code Button object.

Parameters
_ctcpanelThe CTCPanel megawidget.
_canvasThe control panel canvas to draw the Code Button on.
...Option list.

◆ ~CodeButton()

CTCPanel::CodeButton::~CodeButton ( )

Clean up all data objects and free up all resources.

Member Function Documentation

◆ geti()

CTCPanel::CodeButton::geti ( ind  )

Method to get an indicator state (none).

◆ getv()

CTCPanel::CodeButton::getv ( )

Method to get our value (none).

◆ invoke()

CTCPanel::CodeButton::invoke ( )

Method to invoke the code button.

The command script is executed.

◆ seti()

CTCPanel::CodeButton::seti ( ind  ,
value   
)

Method to set an indicator state (none).

◆ setv()

CTCPanel::CodeButton::setv ( state  )

Method to set our value (none).

Member Data Documentation

◆ canvas

CTCPanel::CodeButton::canvas
private

The canvas component (parent widget component).

◆ ctcpanel

CTCPanel::CodeButton::ctcpanel
private

The CTC Panel component (parent widget).