CLOS Browser 1 CLOS BROWSER >> section << 1 >> section << 1 >>#<<. CLOS BROWSER 6 One of the key components of CLOS in inheritance. The CLOS Browser provides functionality for displaying this structure and for extending it. It also provides functions for displaying and changing the class definitions and method definitions which make up a system written in CLOS. Creating a Browser 1 A browser can be createded in two ways: f Via a menu option from the Background Menu f By calling the function CLOS-BROWSER:BROWSE-CLASS on a class Creating a browser via the Background Menu When the CLOS-BROWSER module is loaded, an enty is added to the Background Menu, as shown below: eeA~x!AQA,8q8)~5 D"DUA!88)A!QA!DD"D!~ D8px8AA ! Q#)#$@U!')!$Q#$@!#A|  8ExDEQ)dQ)D!A|: A>A@.\<1"b!B!2BA!"b>!\@@A@!@QGtpq)Ț UC )L QH @!GPtpp@A@A!D@Q(@ )~ U@ )(@ QD@!A>! ! ! P> P P    Selecting the menu item BrowseClass brings up a window, with a prompt for the name of the class to use as the root of the browser as shown below.  Jp !Ç $H!" 0"$Hxp!ÿoGL;:p;+ۺ{{W{{W;{ÁG|>; Type in the name of the class you wish to browse at the flashing cursor, and the class graph will be drawn in the window. Creating a browser programmatically Browsers can also be created by calling the function BROWSE-CLASS: (BROWSE-CLASS &OPTIONAL CLASS-NAME-OR-LIST &KEY :WINDOW-OR-TITLE :GOOD-CLASSES :POSITION) [Function] This function brings up a browser on the class named or the list of classes named. If a window is supplied for the :WINDOW-OR-TITLE argument, then the browser is created in that window, else an appropriately sized window is created. The window is positioned at the :POSITION argument or, if not supplied, then the position is set via the mouse. If a text string is supplied for the :WINDOW-OR-TITLE argument, then that string is used for the window title, else the string "CLOS-browse" is used. If :GOOD-CLASSES is supplied, then only those classes in the list are displayed. Using the Class browser 1 Instances of CLOS-BROWSER are operated on through a mouse-based interface. Buttoning on the browser will cause one of the following menus to be popped up: f One menu appears when the left or middle button is pressed while the mouse is in the title bar. This menu has operations that apply to the browser itself. f The other menu appears when the middle button is pressed when the mouse is on one of the nodes in the browser. If the left button is pressed when the mouse is on a node, that node is boxed. This marks the node for some operations. Options in the title bar menu The following menu appears when you left- or middle-button in the title bar. m/A?! Q !!!! QA##!! !AA Recompute and it's suboptions Selecting the Recompute option and dragging the mouse to the right causes the following submenu to appear: U@@@@@Ř@ $&dĄ@$D@ $D@ $$DČ@Dtg@@@@@@@@G,/8È@H!3&$$D&$I@!"$$$|'@H!"$$$@$$@H!"&$dD&$I@G"%ã8È@@@@GDDÇ1q ÇD$HLɉ $HGH H $$HH$HÇpӇ@! @1"D.8d@@D  @@D  GAfà"F$$`HA>D$$ HA D$$ H"D$$`GGA4#à~AA,8p~5 DA!8A!A!DD~ D8p> ! !-.xH!51 >!! H !!  !!  !!@@  G|p"H C L  "H@GR|p @@Gp"HHHHpHH"HHGp@@9뇇GH2DHHȀ"|HHGH"@HH@"DHHȀ"8hGG Edit Edits the class named by the node Inspect Inspects the class object named by the node. Add Method Selecting the Add Method option brings up an editor window with a template for a method to be added to that class. When the editor is done the method is installed for that class and the menu updated. Browse Selecting the Browse option causes a browser to be created starting with that class as the root. Print and it's suboptions Selecting Print prints out the class definition. Sliding the mouse to the right causes the following menu to appear: h?  A ! Q t) U ) Q ! tA     @ @ ,Þxt 3$HĄ! "'Ȅ> ! "$! " "$H!-.x""#xt!51  >!!   !!   !!   !!    %"' ơ"(@ $!GH $!@ $!ËK  $MLH  HO  $HH?$HLH?ÈK????Z0?Y?;>?!? !,Ës? !3$LH? !"'H9? !"$H !#"$HH @>"#Ft @  ÈO $IA "rB  D $IH ÈO                    I    I  I      A ! Q Y=p) fH U DO ) DH Q DH ! DG A  ? Print Print's the class definition Describe Describes the class, listing it's metaclass, it's supers classes, it's subclasses, it's CPL, and the number of methods specialized to it. Documentation Print's the documentation string for the class Specialize Selecting the Specialize option brings up an editor window with a template for a subclass to be added to that class. When the editor is done the class is installed and the browser updated. Slots Selecting the Slots option is the same as selecting the Edit option, it brings up an editor on the class definition. Methods The Methods option allows you to edit one of the methods defined for that class. Selecting it and sliding to the right brings up the following sub-menu: j@ @$@@@@/ @~#$@@!$ @@!$@@#$@#@@@@@ @ @(:: 0@(FF 1!#@DBB!!!@|BB!!!@FF!!#@::@@@@@@@ gÀ@H$@@ EQ@ EP$@ B"$@@!À@@@@@@@ is @ @ @ @ @ @@@@@@@p8@ĉDD@@@d@ĉD@@p:@@@@@@ @ fff@ (G HH *HH HH (HH G @@<BD@ BCB@@(BD@qpל:<3R"F* >B  B( "F : 0m۝   (۽q < *9  ( u Local Bring up a menu of the local methods, ie methods directly defined for this class Inherited Bring up a menu of the methods this class inherits from it's superclasses. All Bring up a menu of all the methods defined for this class, both local and inherited. Selecting an item with the left button from the resulting menu brings up an editor on that method. If there are multiple methods that apply, a gray triangle appears in the right edge of the menu next to that item. Sliding to the right brings up a menu of method specializers to select the appropriate method. 885H5HH`5H``8HH `3HH T2HH2HH 2$$,HH,HH 2$$H-T-T2HH2HH25$F PAGEHEADING VERSOHEADF PAGEHEADING RECTOHEADE PAGEHEADINGFOOTINGVE PAGEHEADINGFOOTINGRCLASSIC CLASSIC TITAN CLASSIC CLASSIC  HELVETICA  HELVETICA%CLASSIC EDITMARK.STYLEFN%CLASSIC EDITMARK.STYLEFNCLASSIC HELVETICACLASSICCLASSIC  HELVETICA    HRULE.GETFNCLASSIC      HRULE.GETFNCLASSIC     HRULE.GETFNCLASSIC     HRULE.GETFNCLASSIC u  HRULE.GETFNCLASSIC   (   .   D    * a   BMOBJ.GETFN3CLASSIC       BMOBJ.GETFN3CLASSIC   z  # C  M  s  l f C  HRULE.GETFNCLASSIC N P  ? U y  N  BMOBJ.GETFN3CLASSIC  k   BMOBJ.GETFN3CLASSIC  L  Y s - "h  BMOBJ.GETFN3CLASSIC  A Y  5  BMOBJ.GETFN3 C > < 8  "M   BMOBJ.GETFN3     BMOBJ.GETFN3 ( 6    a v   BMOBJ.GETFN3 %  >   u   T BMOBJ.GETFN3CLASSIC  X V Z 6 _*z