PropRegistry CEDAR 10.1 % FOR INTERNAL XEROX USE ONLY PropRegistryDoc Property registration and property manipulation tool in Cedar Ken Pier Copyright 1991, 1992 Xerox Corporation. All rights reserved. Abstract: Many editors allow properties to be attached to editable objects. Other modules, such as EmbeddedButtons, use object properties to implement functionality. The PropRegistry is a simple registration mechanism for editors that wish to allow other applications to get, set, remove, and list properties on their objects. One application, the PropTool, is implemented as a user interface to properties. The Tioga editor property registration is also implemented here for immediate use by the PropTool. Created by: Ken Pier Maintained by: Ken Pier Keywords: properties, registration, EmbeddedButtons XEROX Xerox Corporation Palo Alto Research Center 3333 Coyote Hill Road Palo Alto, California 94304 For Internal Xerox Use Only 1. PropRegistry See PropRegistry.mesa. It defines a registry class object with class "methods" to get, set, remove, and list properties from viewers of a "named" class. The registry class name should be identical to the viewer class name for which these methods are being registered. See TiogaRegistryImpl for example. Clients of PropRegistry can obtain the class methods by calling PropRegistry.GetRegistered[name] with the class name found in the ViewerClass of the client viewer. There are optional methods which allow clients of PropRegistry to get, set, and validate targets in a given viewer. Targets are generalizations of selections and are represented in class-specific ways. See TiogaRegistryImpl for example. 2. PropTool PropTool is a simple tool which, when cooperating editors are running, allows users to see and manipulate properties of editor objects represented as ROPES. When PropTool starts its viewer looks like: Words in large type followed by ! are buttons. Immediately to the right of buttons are their like-named viewers. These buttons are: Notes!: clears the Notes viewer. The Notes viewer is a status viewer sort of like the MessageWindow for the PropTool. List!: loads the List viewer with what appears to be a list of the currently selected object(s) properties. The properties appear in italic type. Each property is in fact a button which, when pressed, stuffs its name into the Get viewer and initiates a Get. For non-Tioga viewers, lists the properties of the currently selected object(s) in the viewer which has the input focus. Sends status to the Notes viewer. Get!: loads the value of the property in the Name viewer into the Value viewer. Sends status to the Notes viewer. Set!: sets the value of the property in the Name viewer to the value in the Value viewer. Sends status to the Notes viewer. Remove!: removes the property in the Name viewer from the currently selected objects. Sends status to the Notes viewer. Retarget!: attempts to restore the selection to what it was when the last operation was performed. All bets are off if the document in which that selection occurred has been edited. The idea of Retarget is that a selection is made, a Get or List performed, and the value is edited in preparation for a Set. At this point, the input focus and the Tioga selection are in the PropTool, not on the objects whose properties are to be modified. Clicking Retarget! will attempt to reselect the desired target. Retry!: Retry! is an accelerator which is equivalent to Retarget! followed by invoking the last operation you tried. It is a way to recover from forgetting to click Retarget! before invoking Set!, which will result in an error message to the effect that the input focus is in the PropTool instead of where you want it. At the bottom of the tool (not shown in picture above) is a typescript which is a history of PropTool operations and results and may be useful for finding or modifying many properties at once. A PropTool with something useful in it looks like: PropRegistryDoc.tioga Kenneth A. Pier, July 6, 1992 3:58 pm PDT [Artwork node; type 'Artwork on' to command tool] [Artwork node; type 'Artwork on' to command tool] ,NewlineDelimiter "cedardoc" styleMark LastEditedJ LastEdited)J LastEditedIunleaded centerHeader KCharSets  centerFooters((ItitleIsubtitle=IauthorsIabstractp>?Ob O O)O *3OI boilerplate qoboxheadIbodyR  Ileft53.79846 mm bigger topLeading 53.79846 mm bigger topIndent 1.411111 mm bigger bottomLeading 0.5 0.3 0.95 backgroundColor the topLeading 6 pt .sub backgroundAscent 3 pt backgroundDescent 4 pt outlineBoxThickness 1 pt outlineBoxBearoffBounds:0.0 mm xmin 0.0 mm ymin 206.3748 mm xmax 50.97625 mm ymax Artwork Interpress Interpress"Interpress/Xerox/3.0 fjkj=xj8~Us88~xjrj kkf~Iff~xjrj g3kk8~f8~xjrj bkk8f8xjrj !bkkxjXerox TiogaFontsTioga10B   "#q-Welcome to the Property Tool of June 11, 1991kxjxerox tiogafonts helvetica14 ./rHistory!k8f8xjrj Kbkk8 If S 8 xjrj!bkkxjXerox TiogaFontsTioga10  K#2 ֝ =Property values go herek8f t Qf 8f t xjrj - *3nkkxjxerox tiogafonts helvetica14 ./ J Value!k8 Q 8 G 8 Q xjrj - kkIf Q f G If Q xjrj - g3kk8 Q If 8 Q xjrjbkk8 G If t 8 G xjrj!bkkxjXerox TiogaFontsTioga10  K#2  ؠProperty names go herek8f ) Qf i 8f ) xjrj *3nkkxjxerox tiogafonts helvetica14 ./ & ؠName!kxjxerox tiogafonts helvetica14 ./ !  $Retry!kxjxerox tiogafonts helvetica14 ./   $ Retarget!kxjxerox tiogafonts helvetica14 ./ M   $Remove!kxjxerox tiogafonts helvetica14 ./ i<=  $Set!kxjxerox tiogafonts helvetica14 ./  $Get!k8 { $8  $8 { $xjrj+GkkIf { $f  $If { $xjrj+Gg3kk8 { $If $8 { $xjrjc bkk8  $If s $8  $xjrj!bkkxjXerox TiogaFontsTioga10  K#2 $List results go herek8f w $Qf O $8f w $xjrj*3nkkxjxerox tiogafonts helvetica14 ./ $List!k8 # $8 $8 # $xjrjkkIf # $f $If # $xjrjg3kk8 # $If - $8 # $xjrjbkk8 $If $8 $xjrj%!bkkxjXerox TiogaFontsTioga10  K#2 vMessages go herekxjxerox tiogafonts helvetica14 ./ WNotes!kxjrjDX3o*w If S YkkxjrjDX3o*w If S Ykkkkgn33R RlovRRmrRw|RpxR RRR2S142.8749 mm bigger topLeading 142.8749 mm bigger topIndent 1.411111 mm bigger bottomLeading 0.5 0.3 0.95 backgroundColor the topLeading 6 pt .sub backgroundAscent 3 pt backgroundDescent 4 pt outlineBoxThickness 1 pt outlineBoxBearoff:0.0 mm xmin 0.0 mm ymin 229.4817 mm xmax 140.0526 mm ymax  Interpress.Interpress/Xerox/3.0 fjkj=xj| @axYe@axxjrj4f  *kkxexxjrj*|fr *kk&ee@a&exjrj 3ekkxjXerox TiogaFontsTioga10 t^#ACq0Ѡ )kxjXerox TiogaFontsTioga10 t^#ACm Feedback: (kxjXerox TiogaFontsTioga10 t^#ACU# (MouseMoved )kxjXerox TiogaFontsTioga10 t^#ACgU )kxjXerox TiogaFontsTioga10 t^#AC:MessageHandler: Tiogakxjxerox tiogafonts helvetica14 1wѠHistory!k@a(eY-@a(exjrj, 2fa$;;kk(e-(exjrjX 3 2fg3a$;;kkY(e/eY(exjrj5'f OFekk@a-+@a-xjrj5OъpG3kkxjXerox TiogaFontsTioga10 t^*UU efPoppy1kxjXerox TiogaFontsTioga10 t^qClass: PopUpButtonkxjXerox TiogaFontsTioga10 t^PѠMenu: (kxjXerox TiogaFontsTioga10 t^ Ѡ` ((SaveSelectionA PropForSelectedCharacter ClearPropName "Postfix" ClearPropValue "0.36 1 0.322kxjXerox TiogaFontsTioga10 t^7ѠTtextColor" RestoreSelectionA SetNodeProp) "Green" "Makes selected characters green")kxjXerox TiogaFontsTioga10 t^kѠ )kxjXerox TiogaFontsTioga10 t^ Feedback: (kxjXerox TiogaFontsTioga10 t^_U# (MouseMoved )kxjXerox TiogaFontsTioga10 t^U )kxjXerox TiogaFontsTioga10 t^ߣUMessageHandler: Tiogak)xjrjX 3 2f*3nkkxjxerox tiogafonts helvetica14 1Value!k@a1YO@a1xjrj, 2fkk1O1xjrjX 3 2fg3kk@a13@a1xjrj5OъpQD3kkxjXerox TiogaFontsTioga10 t^@ Ef ButtonDatak?K?xjrjX 3 gf*3nkkxjxerox tiogafonts helvetica14 17Name!kxjxerox tiogafonts helvetica14 YRetry!kxjxerox tiogafonts helvetica14  Y Retarget!kxjxerox tiogafonts helvetica14 ʳUYRemove!kxjxerox tiogafonts helvetica14 ?*YSet!kxjxerox tiogafonts helvetica14 1YGet!k@auY@auxjrj, )kkuuxjrjX 3 )g3kkxjrjpsĩkk@a@axjrj5'fpG3kkxjXerox TiogaFontsTioga10I t^@ay Postfix ButtonDatakxjrjX 3 *3nkkxjxerox tiogafonts helvetica14 1{List!k@aY@axjrj, kkxjrjX 3 g3kk@a@axjrj5'fpQD3kk@a@axjrj5?fpG3kkxjXerox TiogaFontsTioga10B t^[ {fGet: ButtonData kxjXerox TiogaFontsTioga10 t^ {f Donekxjxerox tiogafonts helvetica14 1Notes!kxjrj3:33Y@aukkxjrj3:33F@aOkkkkg33=\