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

Hidden Block object type. More...

Public Member Functions

 HiddenBlock (name, _ctcpanel, _canvas,...)
 Construct a HiddenBlock object. More...
 
 ~HiddenBlock ()
 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 HiddenBlock. 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

Hidden Block 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 HiddenBlock on.
...Options:
  • -x1 The first x coordinate of the object (readonly, default 0).
  • -y1 The first y coordinate of the object (readonly, default 0).
  • -x2 The second x coordinate of the object (readonly, default 0).
  • -y2 The second y coordinate of the object (readonly, default 0).
  • -controlpoint The name of the control point this label is part of (readonly, default MainLine).
  • -label The label of the HiddenBlock (default "").
  • -position The position of the label (readonly, default below).
  • -orientation The orientation of the bridge (8-way) (readonly, default 0).
  • -flipped Whether the bridge is flipped (readonly, default no).
  • -occupiedcommand A command to run to find out if the HiddenBlock is occupied (default {}).
Defined coords terminals:
  • E1 First endpoint.
  • E2 Second endpoint.
Defined values (states): none. Defined indicators: none.
Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ HiddenBlock()

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

Construct a HiddenBlock object.

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

◆ ~HiddenBlock()

CTCPanel::HiddenBlock::~HiddenBlock ( )

Clean up all data objects and free up all resources.

Member Function Documentation

◆ _configureLabel()

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

Method to update the label option.

◆ geti()

CTCPanel::HiddenBlock::geti ( ind  )

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

◆ getv()

CTCPanel::HiddenBlock::getv ( )

Method to get our value (state).

◆ invoke()

CTCPanel::HiddenBlock::invoke ( )

Method to invoke the HiddenBlock.

◆ seti()

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

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

◆ setv()

CTCPanel::HiddenBlock::setv ( value  )

Method to set out value (state).

Parameters
valueThe new state to set.

Member Data Documentation

◆ canvas

CTCPanel::HiddenBlock::canvas
private

The canvas component (parent widget component).

◆ ctcpanel

CTCPanel::HiddenBlock::ctcpanel
private

The CTC Panel component (parent widget).