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

Push Button object type. More...

Public Member Functions

 PushButton (name, _ctcpanel, _canvas,...)
 Construct a PushButton object. More...
 
 ~PushButton ()
 Clean up all data objects and free up all resources. More...
 
 getv ()
 Method to get our value (PushButton state). More...
 
 setv (newstate)
 Method to set out value (PushButton state). More...
 
 geti (ind)
 Method to get the state of one of our indicators. More...
 
 seti (ind, value)
 Method to set an indicator's state (none). More...
 
 invoke ()
 Method to invoke the PushButton. More...
 

Private Member Functions

 _configureLabel (option, value)
 Method to update the label option. More...
 

Private Attributes

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

Detailed Description

Push Button object type.

These are on the control panel and represent simple push buttons.

Parameters
_ctcpanelThe CTCPanel megawidget.
_canvasThe control panel canvas to draw the PushButton 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 PushButton is part of (readonly, default CP1).
  • -color The color of the PushButton (default white).
  • -label The label of the PushButton (default "PushButton").
  • -command The Tcl script to run when the PushButton button is pushed.
Defined coords terminals: none. Defined values (states): none. Defined indicators:
  • I -color if on.
Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ PushButton()

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

Construct a PushButton object.

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

◆ ~PushButton()

CTCPanel::PushButton::~PushButton ( )

Clean up all data objects and free up all resources.

Member Function Documentation

◆ _configureLabel()

CTCPanel::PushButton::_configureLabel ( option  ,
value   
)
private

Method to update the label option.

◆ geti()

CTCPanel::PushButton::geti ( ind  )

Method to get the state of one of our indicators.

◆ getv()

CTCPanel::PushButton::getv ( )

Method to get our value (PushButton state).

◆ invoke()

CTCPanel::PushButton::invoke ( )

Method to invoke the PushButton.

◆ seti()

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

Method to set an indicator's state (none).

◆ setv()

CTCPanel::PushButton::setv ( newstate  )

Method to set out value (PushButton state).

Parameters
newstateThe new PushButton state.

Member Data Documentation

◆ canvas

CTCPanel::PushButton::canvas
private

The canvas component (parent widget component).

◆ ctcpanel

CTCPanel::PushButton::ctcpanel
private

The CTC Panel component (parent widget).