Class - Msg_

Public Methods
Public Method Details
Private Methods
State

Inheritance - ::gui::Msg_ ::mps::Msg_

Public Methods

(top level)

create key ev_src ev_dst args   Create a gui::Msg_ object and display a view of it on the current canvas (procedure)
destroy     Delete a gui::Msg_ object and undisplay any views
move mode args   Move one end of a Msg view
optget option   Optain a value for the specified graphical option
optmod args   Set a value for a graphical option, or obtain option list(s), do arch check, history, update
update args   Bring the current view of the object up-to-date with the architecture state
select args   Show the object as selected
unselect     Undo the effects of 'select'
activate sbtag args   One end of the Msg appears as disconnected and actively follows the cursor
cancel     The current "activation" is cancelled

(low level)

addSelectBoxes     Show selection boxes on the current view of the object
anchor dir  
attachGate gtag  
buildTree top   Build the architectural state and graphical defaults of the object into a DOM tree
buildTree_gui top view   Build the graphical values of the specified view into a DOM tree
checkConfig vname  
connect event   The Msg is connected to an event
constructor binder ev_src ev_dst args  
copy    
cut    
deactivate sbtag args  
delete args  
deleteSelectBoxes     Undo the effects of 'addSelectBoxes'
deploy glist   A view of the object is displayed and attached gates are also displayed
destructor    
display args   Display a graphical view of the object on the current canvas
dumpTemp    
editParams x y  
getCanvas    
getCname    
getCommand mode   Returns a string that can be used to re-create the object as it exists now
getFont spec   used by scaling mechanism
getGraphicsId piece  
getOptions args   Return information about the options for this object
getParams args  
getPcode    
getProperties     (procedure)
getPropertyList    
getRules dir   return rule (or rules) associated with each end of Msg (dir - src,dst)
invalidate    
isEditable     (procedure)
isOkToAddGate {gtype {}}  
isOkToConnect otag dir  
isOkToDelete    
locate mode args  
moveDist orient xDist yDist  
moveTo orient x y  
optset args  
paste {mode obj}  
raise     Raise the view of the object in the canvas display order
recall glist   Any view is undisplayed and attached gates are also undisplayed
resize sbtag mode args  
setParams plist  
swap dir ev_new ev_old   The connection of one end of the Msg is swapped
unattachGate gtag  
undisplay {view {}}   Undisplay a view of the object

Public Method Details

activate
  One of the selectboxes on the Msg has been selected and the message is going to be moved. For a Msg, this means that only one end or the other is going to be re-attached somewhere, or a midpoint moved.
 
sbtag
  pass in the object tag of the chosen selectbox
 
args
  not used in Msg object
addSelectBoxes
  Add selectbox objects to the Msg.
anchor
  Add a new anchor point to the front or back end of an existing message being reconnected.
attachGate
buildTree
  The architectural state and initial graphical state of the Msg object are grafted onto the DOM tree element indicated.
 
top
  a pointer to a tree element
buildTree_gui
  The current graphical state of the specified view is grafted onto the DOM tree element indicated.
 
top
  a pointer to a tree element
 
view
  the View (Edit sheet) from which to obtain the view of the Msg object
cancel
  The message was 'activate'd but we clicked on the plain canvas, so we will just forget about the whole thing.
checkConfig
connect
  We have been moving one end of a Msg and could have connected it to a different event on another Rule and/or Pe. Now we must reconnect and re-initialize it.
 
event
  the event to which the Msg will now be attached, now that movement is deactivated
constructor
  Use the itcl::class definition to create a Msg object.
copy
create   key ev_src ev_dst ?<options>?
  A gui::Msg_ object is created with name <key> starting on event <ev_src> and ending on event <ev_dst>. A view of the object is shown on the current canvas.
  Graphical options can be passed in which will be used as default values for all subsequent views of the object which are displayed on any canvas. (Any graphical options not specified will use the class values set up during program start up.)
  The command is put onto the Hist/Undo stack.
 
key
  used to create a name for the object
  can be #auto, see documentation for itcl::class
 
ev_src
  must be a valid Event object of type "action"
 
ev_dst
  must be a valid Event object of type "guard"
 
?<options>?
  graphical options (see options )
cut
deactivate
delete
deleteSelectBoxes
  Remove selectbox objects from the Msg.
deploy   y ?<options>?
  A view of the object is placed on the canvas using the Start event and End event as endpoints. If only one endpoint event is present, a Connector object is shown connected to the end without an event.
  Graphical options can be passed in, which will be used as default values for all subsequent views of the object which are displayed on any canvas. (Any graphical options not specified will use the class values set up during program start up.)
  The Gui does not directly call this method, as only a Pe is 'deploy'd directly. History is recorded as part of a group history started by Pe.
 
y
  y-value for initial placement of view
 
?<options>?
  graphical options (see options )
destroy
  After checking that architectural conditions are met, a gui::Msg_ is deleted and all views are undisplayed.
  The command is put onto the Hist/Undo stack.
destructor
  Undisplay all views of the object on any canvas and itcl::delete the object.
display
  Show the graphical items for this object on the current canvas.
dumpTemp
editParams
  Pop up a window so that the parameters of a message can be edited. Pass back the new list of params.
getCanvas
getCname
getCommand
  see command explanation here
getFont
  A public method which returns the font option which matches the tags or keyword which are passed in. Used by the scaling mechanism.
getGraphicsId
getOptions
  see command explanation here
  see graphical options here
getParams
  The gui version returns the list formatted to be a string (list with comma seperators or ...N...) if the string is too long. Use "-string" switch.
getPcode
getProperties
getPropertyList
getRules
  Get the rule (or rules as indicated by "s") that is assoc- iated with the specified direction or end of the message.
  The msg could have gate(s) attached, and the gate(s) could have segments added/removed so that the rules associated with the message could be changing over time. That is the reason this needs to be a dynamic method (not state set up when the message is created).
invalidate
isEditable
isOkToAddGate
  Check to see if another gate of the given "gtype" can be added to the Msg (limit is one "in" and one "out" gate). Not only the GateList state (gates directly attached to the Msg) must be checked, but also the end Events to see if their are Pin objects with gates on them.
isOkToConnect
isOkToDelete
locate
  Given a fractional distance along the message line, return the corresponding x,y point.
move
  Move a Message on a canvas. Only one end at a time can be moved. Same modes and usage as pe An additional argument -dir is explained below.
 
?optional args?
  arguments used depending on mode
 
-dir <dir>
  indicate which end of msg is to be moved
  required for modes: to, start
  allowed: src, dst, or <int> (for interior selection box)
 

msg_0 move to -dir src -x 2c -y 2c
the source end of the message is placed at x = 2cm and y = 2cm, history is recorded
 
msg_0 move start -dir dst; msg_0 move delta -x 64; msg_0 move delta -x 32; msg_0 move end -align 1
the destination end of the Msg object is moved 128 pixels to the right, do alignment, one history event is recorded

moveDist
  This procedure is part of the generic move system.
moveTo
  Given an absolute location, move the end of the message indicated to a new location.
optget
  see command explanation here
  see graphical options here
optmod
  see command explanation here
  see graphical options here
optset
paste
  Do applicable paste cmds in Istate(clipboard). Valid objects to paste: Rule_
raise
  Raises the view on the canvas and also causes a 'raise' any attached gate.
recall
  Any view of the object on the current canvas is undisplayed. Any associated gates are also recalled (if on input glist).
resize
  An interior selectbox on the Msg is being moved, so we need to reshape the line.
select
  A msg view is selected, and we indicate it is selected by drawing "selectboxes" at key places
setParams
  Need a gui version of this method so that param changes are reflected in the display.
swap   dir ev_new ev_old
  Change around the event to which a message is attached.
 
dir
  which direction or orientation of the msg is to be swapped
  allowed: src, dst
 
ev_new
  tag of the event to which the message is to be attached
 
ev_old
  tag of the event from which the message is unattached
unattachGate
undisplay
  Remove the graphical items from the canvas which comprise a "view" of the object.
 
view
  View tag which contains the object view to be undisplayed.
  if no View tag is given, try to remove a view of the object on the current canvas.
unselect
  Show the view of the Msg as unselected.
update   ?options?
  Bring the view of the Msg up-to-date with the Architecture. Architecture changes could have been made in other views that need to be reflected onto this view of the object.
 
?options?
  choose pieces to be updated (default is all)
 
-Label
  bring the Msg label in sync with state value
 
-params
  bring parameters text list up to date

Private Methods

_checkDisplay    
_cleanDisplay    
_deployGates glist  
_genGateList glist  
_getCoords {which all}  
_initopts    
_placeText {point {}}  
_setCoords lcoords  
_setFont which font  
_setLinewidth lw  
_setMidCoords lcoords  
_setParamStrlen slen  
_setTextFraction frac  

State

  Protection Type  
_b private variable  
_coupler_dst private variable  
_coupler_src private variable  
_id private variable  
_lastX private variable  
_lastY private variable  
_lview private variable  
_opt private variable  
_opti private variable  
_optList private variable  
_paramlist private variable  
_propertylist private common  
_startX private variable  
_startY private variable  
_store private variable  
_tag private variable  
_tag private variable  
EvTag_dst public variable  
EvTag_src public variable  
GateList public variable  
Label public variable  
MsgtestList public variable  
Notes public variable