Class - Pe_

Public Methods
Public Method Details
Private Methods
State

Inheritance - ::gui::Pe_ ::mps::Pe_

Public Methods

(top level)

create key parent x args   Create a gui::Pe_ object and display a view of it on the current canvas (procedure)
destroy     Delete a gui::Pe_ object and undisplay any views
deploy x args   A view of the object is displayed and sub-objects are also deployed
recall args   Any view is undisplayed and sub-objects are also recalled
move mode args   Move a view of the Pe object around on a drawing canvas
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 checks, history, update
update args   Bring the current view of the object up-to-date with the architecture state
select     Show the object as selected
unselect     Undo the effects of 'select'
fade     Show the current view of the object as faded
unfade     Undo the effects of 'fade'
activate sbtag args   Show a piece of the object as ready to resize
deactivate args   Undo the effects of 'activate'
resize sbtag mode args   Resize the object due to movement of a selectbox

(low level)

addSelectBoxes     Show selection boxes on the current view of the object
adjust args   Adjust the Pe's graphical appearance, needed due to changes in other objects
align args   Align the object to the nearest canvas grid lines
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
bump y dist  
checkConfig vname  
constructor parent args   create a Processing Entity object
copy    
cut    
delete {mod none}   Destroy the object
deleteSelectBoxes     Undo the effects of 'addSelectBoxes'
destructor     Destroy the Pe object
display x args   Display a graphical view of the object on the current canvas
dump    
getCanvas     Get a widget name (command) for the current canvas
getClass    
getCname    
getCommand mode   Returns a string that can be used to re-create/display/copy the object as it exists now
getCoord req   Get a coordinate value for the requested part of the object
getGraphicsId piece   Get the tag name for the requested piece of the object
getGroupTag     Get a tag which is used for "grouping"
getInitRules     Get a list of rules that "Initial" rules (no incoming msgs)
getOptions args   Return information about the options for this object
getPcode    
getProperties     (procedure)
getPropertyList    
insert y dist  
isEditable     (procedure)
isOkToDelete     Determine if it is ok to delete the object.
moveDist moveit xDist yDist  
optset args  
paste {mode obj}  
raise     Raise the view of the object in the canvas display order
recallList lpes   (procedure)
undisplay {view {}}   Undisplay a view of the object

Public Method Details

activate   sbtag args
  A selectionbox has been chosen (clicked). Show the object item as ready to be resized via selection boxe(s).
 
sbtag
  pass in the object tag of the chosen selectbox
 
args
  not used in Pe object
addSelectBoxes
  Determine locations for selection boxes and then create the selectbox objects
adjust   ?<hints>? ?<actionlist>?
  Adjust the graphical components of the Pe to their correct position given the current situation. If no arguments are given, then all components (see <actionlist>) are checked to see if adjustment is required. Providing <hints> can improve efficiency.
  This method is public so that as other objects undergo changes changes (move, resize) that can affect the rule, they can invoke this method and get the rule to adjust itself.
 
?<hints>?
  used to give hints to the adjust method
 
-y <y>
  a y-value to use
  If the calling code already has the pertinent y-value, then passing it here can remove the need for a lookup. This will speed up adjustment of 'Stem'.
 
?<actionlist>?
  a list of components to be adjusted (default is all)
 
Stem
  adjust the length of the Pe stem
  If -y is passed, it is used as the southernmost y-value past which the Pe stem must extend
align
  The object is aligned to the nearest grid lines from the coordinate formed by the object's x-origin and y-origin.
buildTree   top
  The architectural state and initial graphical state of the Pe object are grafted onto the DOM tree element indicated.
 
top
  a pointer to a tree element
buildTree_gui   top view
  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 Pe object
bump   y dist
  Somebody wants to place an object (rule) on the Pe stem. Check to see if the rules below need to be bumped down.
checkConfig
constructor   parent ?<options>?
  Use the itcl::class definition to create a Pe (processing entity) object.
 
parent
  object tag of parent
 
<options>
  can give graphical options for object
copy
create   key parent x ?<options>?
  A gui::Pe_ object is created with name <key> and parent <parent>. The initial placement is at x-coordinate <x>. 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 posted to the Hist/Undo stacks.
 
key
  used to create a name for the object
  can be #auto, see documentation for itcl::class
 
parent
  must be a binder object or another Pe object
 
x
  physical x-value for initial placement of Pe object
 
?<options>?
  graphical options (do '<obj> optmod' to see all options)
cut
deactivate
  A selectbox on the object has been de-selected. Modify the appearance of the object to indicate this.
  Note that this method does not use any input arguments. The "args" are required for compatability with the selectbox object.
delete   mod
  Calls the 'destroy' method. The method is required to provide a standard method for the Menu system to call for any object to be removed.
 
mod
  indicates modification key (ie. ctrl, alt) pressed
  default: none
  allowed: none ctrl
deleteSelectBoxes
  Remove the selectboxes from the view of the object.
deploy   x ?<options>?
  A view of the object is placed on the current canvas at the x-coordinate specified in <x>. All attached rules also execute a 'deploy' method.
  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.
 
x
  x-value for initial placement of view
 
?<options>?
  graphical options (do '<obj> optmod' to see all options)
destroy
  After checking that architectural conditions are met, a gui::Pe_ object is deleted and all views are undisplayed. Before these actions are completed, affects on any Test Scenarios are shown.
  The command is put onto the Hist/Undo stack.
destructor
  All related Rule, Pe-pointer, and Petest sub-objects will also be destroyed.
display   x ?<options>?
  Show the graphical items for this object on the current canvas.
 
x
  x-location to display Pe object
 
<options>
  can give graphical options for object
dump
fade
  Look up graphic components of PE, and redraw them so the PE looks faded.
getCanvas
  Get a widget (command) name for the current canvas.
getClass
getCname
getCommand   mode
  A string is returned which can be used as a command to reproduce the requested action.
 
mode
  specify format for the command to be returned
  allowed: (re)create, display, attr, copy
    create contains the 'create' method and a list of options to create (or recreate) the object
    display contains the 'display' method and a list of options to display a view of the object
    attr get the graphical options and the state which is not "connection" dependent
    copy a string which will create a copy of the rule and any attached events.
getCoord   req
  Get x-y coordinate(s) for the indicated location on the object.
 
req
  requested location of the object view
  bbx or bbox will return a list of four values, which are the nw and se x-y coordinates.
getGraphicsId   piece
  Return the item id of the indicated graphical piece of the object.
 
piece
  indicate desired graphical piece of object
  allowed: text box line
getGroupTag
  Return an object tag which is used to label objects to be grouped together.
getInitRules
  For a given Pe, determine which rules are "init" rules. (Those rules with no reception (no guards with msgs).)
getOptions   ?<switches>? ?<output>?
  Return various information about the graphical options for the object.
 
?<switches>?
  choose zero or more to modify output results
 
-view <view>
  set view for current options-values, otherwise use current view
 
-nodash
  indicate whether to remove dash on options (default with dash)
 
-noxy
  indicate whether to leave off any orig_* or coord* options (default with)
 
?<output>?
  choose one to select information to retrieve (default is 'p_all')
 
p_all
  opt-val (current value) pairs for view for all possible options (default)
 
p_diff
  opt-val (current value) pairs on "defs" list with value different from init value
 
p_init
  opt-val (initial value) pairs as set upon object creation
  the initial value could come from class defaults (set upon progam startup), or could have been set via options when the object was created
 
list
  return names of all options
 
defs
  return names of options which have class defaults
 
nodefs
  return names of options which do not have class defaults
getPcode
getProperties
getPropertyList
insert   y dist
  Somebody wants to insert an object (rule) on the Pe stem. Check for the requested distance and slide rules if necessary to accomodate. Return a y-coordinate that will work.
 
y
  y-location at which to insert
 
dist
  requested distance (amount to slide existing rules)
isEditable
isOkToDelete
  If a Pe is used in multiple places in the architecture, or rules on the Pe have events with messages attached, it cannot be deleted.
move   mode ?options?
  Move a Processing Entity (PE) on a canvas. This method is designed for ease of use by canvas binding code. See the examples.
 
mode
  operation control
  Use 'start' and 'end' modes to bracket a series of one or more 'delta' or 'track' commands in order to record history correctly. A 'track' command uses the x/y input as a coordinate, while 'delta' uses the x/y input as a relative distance. (It is possible to issue 'delta' commands without a 'start' or 'end' and get correct operation, but no history.)
  The 'end' method is built to accept x,y values to facilitate recording/playback. When recording, the 'move delta' is not saved, but we do want to have a record of the final object disposition.
  allowed: start, delta, track, end, to
 
?options?
  arguments used depending on mode
 
-x <f>
  x-coordinate value (or x-delta value)
  Only the coordinate (x or y) being changed needs to be specified.
 
-y <f>
  y-coordinate value (or y-delta value)
  Only the coordinate (x or y) being changed needs to be specified.
 
-align <b>
  control alignment to grid (default=0)
  only recognized on modes 'end' and 'to'
 

pe_0 move to -x 2c -y 2c
the Pe object is placed at x = 2cm and y = 2cm, history is recorded
 
pe_0 move start; pe_0 move delta -x 64; pe_0 move delta -x 32; pe_0 move end -align 1;
the Pe object is moved 128 pixels to the right, do alignment, one history event is recorded
 
pe_0 move delta -x 0 -y -10m
The Pe object is moved 10mm upward, no x-movement, no history is recorded. Both -x and -y must be given.
 
$pe move start -x %x -y %y
place in Button press binding, give cursor start location
 
$pe move track -x %x -y %y
place in Button motion binding, track cursor location
 
$pe move end -x %x -y %y
place in Button release binding, give final cursor locationCalls which could be placed in mouse bindings. The 'start' and 'end' calls could be recorded and would be sufficient to playback the motion.

moveDist
optget
  see command explanation here okay dummy?
  see graphical options here
optmod
  see command explanation here
  see graphical options here
optset
paste   mode
  Do applicable paste cmds in Istate(clipboard). Valid objects to paste: Rule_
 
mode
  indicate type of pasting being done
  Note that pasting behavior also depends on contents of clipboard, in other words what object type was copied to the clipboard
  default: obj
  allowed: attr obj
raise
  Raises the view on the canvas and also causes a 'raise' for each attached rule.
recall   ?<options>?
  Any view of the object on the current canvas is undisplayed and all attached rules also execute a 'recall' method.
  The command is put onto the Hist/Undo stack.
 
-fast <0/1>
  switch to indicate that all Pes are to be recalled
  If we know that all Pes are to be recalled, setting this switch to 1 let's us know that we can avoid useless redrawing of Pes.
  default: 0
recallList
resize   sbtag mode ?<options>?
  A select-box has been clicked on and now the user wants to drag it around on the screen to resize the PE. This method should be called as the motion begins (start), during the motion (track), and when the motion is complete (end). This method is also responsible for animating any and all selectboxes on the object whose location needs to be adjusted.
  Use start and end modes to bracket one or more track commands. Coordinates must be supplied for start and track modes, but not for end mode. The coordinates specify a point on the canvas (not a delta). When ending resize the method will snap to grid if alignment is on. History is recorded by this method.
 
sbtag
  tag of a selectbox on the object to be resized
 
mode
  operational control
 
?<options>?
  options used depending on mode
  Both x and y must be specified if mode is start.
 
-x <f>
  x-coordinate value
 
-y <f>
  y-coordinate value
select
  A PE is selected, and we indicate it is selected by drawing "selectboxes" at key places on the PE
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.
unfade
  Look up graphic components of PE, and redraw them so the PE looks normal
unselect
  Show the view of the Pe as unselected.
update   ?<options>?
  Bring the view of the Pe 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 Pe label in sync with state value
 
-rules
  cause each attached rule to receive a 'display' command

Private Methods

_arch_initopts    
_deployObjects    
_deployRules    
_getBoxMid    
_getHeight    
_getLength    
_getOrigin args  
_getWidth    
_initopts    
_setFont font  
_setHeight h  
_setLength l  
_setLinewidth lw  
_setWidth w  

State

  Protection Type  
_box_sb_left private variable  
_box_sb_right private variable  
_id private variable  
_lview private variable  
_marktag private variable  
_opt private variable  
_opt private variable  
_opti private variable  
_propertylist private common  
_sb_placed private variable  
_sbList private variable  
_store private variable  
_tag private variable  
_tag private variable  
Label public variable  
Multiviewed public variable  
Notes public variable  
Parent public variable  
PetestList public variable  
PostCode public variable  
PreCode public variable  
RuleList public variable  
Type public variable