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

Stub Yard object type. More...

Public Member Functions

 StubYard (name, _ctcpanel, _canvas,...)
 Construct a StubYard object. More...
 
 ~StubYard ()
 Clean up all data objects and free up all resources. More...
 
 getv ()
 Method to get our value (state). More...
 
 setv (value)
 Method to set out value (state). More...
 
 geti (ind)
 Method to get the state of one of our indicators (none). More...
 
 seti (ind, value)
 Method to set an indicator's state (none). More...
 
 invoke ()
 Method to invoke the StubYard. 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...
 

Static Private Attributes

static _StubYard_Poly
 Polygon coordinates for a stub yard. More...
 

Detailed Description

Stub Yard object type.

These are on the schematic and represent a piece of track on the Schematic.

Parameters
_ctcpanelThe CTCPanel megawidget.
_canvasThe schematic canvas to draw the StubYard 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 label is part of (readonly, default Yard).
  • -label The label of the StubYard (default "1").
  • -position The position of the label (readonly, default below).
  • -orientation The orientation (8-way) (readonly, default 0).
  • -flipped Whether the yard is flipped (readonly, default no).
  • -occupiedcommand A command to run to find out if the StubYard is occupied (default {}).
Defined coords terminals:
  • Entry Yard throat.
Defined values (states): none. Defined indicators: none.
Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ StubYard()

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

Construct a StubYard object.

Parameters
_ctcpanelThe CTCPanel megawidget.
_canvasThe schematic canvas to draw the StubYard on.
...Option list.

◆ ~StubYard()

CTCPanel::StubYard::~StubYard ( )

Clean up all data objects and free up all resources.

Member Function Documentation

◆ _configureLabel()

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

Method to update the label option.

◆ geti()

CTCPanel::StubYard::geti ( ind  )

Method to get the state of one of our indicators (none).

◆ getv()

CTCPanel::StubYard::getv ( )

Method to get our value (state).

◆ invoke()

CTCPanel::StubYard::invoke ( )

Method to invoke the StubYard.

◆ seti()

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

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

◆ setv()

CTCPanel::StubYard::setv ( value  )

Method to set out value (state).

Parameters
valueThe new state to set.

Member Data Documentation

◆ _StubYard_Poly

CTCPanel::StubYard::_StubYard_Poly
staticprivate

Polygon coordinates for a stub yard.

◆ canvas

CTCPanel::StubYard::canvas
private

The canvas component (parent widget component).

◆ ctcpanel

CTCPanel::StubYard::ctcpanel
private

The CTC Panel component (parent widget).