home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / linux / 23395 < prev    next >
Encoding:
Internet Message Format  |  1993-01-09  |  19.4 KB

  1. Path: sparky!uunet!olivea!charnel!rat!usc!sdd.hp.com!ux1.cso.uiuc.edu!bradley.bradley.edu!brad
  2. From: brad@bradley.bradley.edu (Bradley E. Smith)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: SUIT
  5. Message-ID: <1993Jan9.215214.23247@bradley.bradley.edu>
  6. Date: 9 Jan 93 21:52:14 GMT
  7. References: <1993Jan9.060254.17125@bradley.bradley.edu> <1993Jan9.154229.19123@sol.UVic.CA>
  8. Organization: Bradley University
  9. Lines: 565
  10.  
  11.  
  12. =============================================================================
  13.      SUIT -- The Simple User Interface Toolkit
  14. =============================================================================
  15.  
  16.  
  17. INTRODUCTION: WHAT IS SUIT?
  18. ===================================
  19. Welcome to SUIT, Simple User Interface Toolkit.
  20.  
  21. SUIT is a library of interface tools developed at the University of
  22. Virginia to help C programmers create sophisticated mouse based
  23. interfaces without the lengthy learning period associated with
  24. traditional user interface toolkits. Ease of learning and fast ramp up
  25. time is central to SUIT's design. The SUIT tutorial is designed to
  26. make the user productive in under two hours.
  27.  
  28. Also central to SUIT design is portability. SUIT programs currently
  29. run without changes to the source code on the following platforms:
  30.     o IBM PC
  31.     o Macintosh
  32.     o Sun3
  33.     o Sun4 (SparcStation)
  34.     o SGI (Silicon Graphics IRIS workstations)
  35.     o DECstation
  36.     o HP 
  37.  
  38. This document is an overview of SUIT's capabilities; full
  39. documentation is included with the SUIT distribution in the form of a
  40. 10 page tutorial and a comprehensive Reference Manual. Parts of this
  41. overview were taken from the SUIT tutorial.
  42.  
  43. In this introduction you will:
  44.     o Run a sample SUIT program
  45.     o See how SUIT allows you to modify the appearance of the
  46.          interface while the program is running
  47.     o See how to ftp SUIT from the University of Virginia to 
  48.       your local site
  49.  
  50. Along with this document, you will need the files called:
  51.     o demo
  52.     o demo.sui
  53.  
  54.  
  55. THE DEMO PROGRAM
  56. ============================
  57.  
  58.     To begin the demonstration, start the SUIT demonstration
  59. program called demo; a so-called "do-nothing application" because
  60. none of the widgets are connected to any program functionality.
  61.  
  62.     Demo contains just a few of the screen objects (or
  63. "widgets") available to programmers from the SUIT library.  If you
  64. need a specialized widget of your own, you can create one with the
  65. programming calls that SUIT provides. Such "home grown" widgets can be
  66. introduced into any SUIT program as easily as one from the standard
  67. SUIT library.
  68.  
  69.     Try clicking on the "bounded value" widget found in the lower
  70. left hand corner. This is a widget that allows the user to specify a
  71. number between a minimum and maximum value. 
  72.     
  73.  
  74.     The Other Widgets in Demo:
  75.     ----------------------------------
  76.     o Bouncing balls (just for fun)
  77.     o A label widget for displaying text
  78.     o A bounded value widget.
  79.     o A polygon widget (used mostly for demonstration
  80.       purposes)
  81.     o A menu widget 
  82.     o A set of radio buttons for mutually exclusive choices
  83.     o A Text editor 
  84.      (The simple editing commands are customizable, but default
  85.      to those used by the popular text editor, Emacs)
  86.     o A scrollable list of text for selecting
  87.      words/lines of text from a list.
  88.     o An on/off switch
  89.     o A type-in box for letting users specify strings
  90.       (Also Emacs)
  91.     o A set of color chips for selecting colors
  92.     o a UVa Logo !
  93.     o A set of buttons to exit the program.
  94.  
  95.  
  96.     There are several other widgets, like dialog boxes and
  97.     file selectors that are also part of the standard SUIT 
  98.     distribution, but are not shown in Demo.    
  99.  
  100.     Try interacting with the various widgets in Demo.
  101.  
  102.  
  103. MANIPULATING A SUIT INTERFACE
  104. =====================================
  105.  
  106.     Moving Widgets
  107.     --------------
  108.     SUIT gives you the ability to move and resize widgets while
  109.     the application is running.
  110.  
  111.     To move a SUIT widget:
  112.     1.) Hold down both the SHIFT and CONTROL keys with one
  113.      hand.
  114.     2.) With the other hand, move the cursor near the center
  115.      of the widget you'd like to move and press and hold down
  116.      the leftmost mouse button. A dashed outline of the widget
  117.      should appear and follow the cursor until you release the
  118.      mouse button, at which point the widget will be placed at 
  119.      the new location and you can release the SHIFT and CONTROL keys.
  120.  
  121.     Try moving the bounded value widget.
  122.  
  123.  
  124.     SHIFT and CONTROL: The SUIT-keys
  125.     --------------------------------
  126.     The SHIFT and CONTROL keys are used as a signal to SUIT that you wish
  127.     to interact with the interface as the interface designer (letting you
  128.     move and resize things), not as a user of the application (letting you
  129.     move the needle on the bounded value up and down). Whenever
  130.     you are holding down the SHIFT and CONTROL keys, you're
  131.     "talking to SUIT" and whenever you are not,
  132.     you're "talking to the application". In the rest of this overview, we
  133.     will precede any operation which requires you to use the SHIFT and
  134.     CONTROL keys with the prefix "SUIT-". For example, "SUIT-a" means
  135.     "hold down the SHIFT and CONTROL keys and press the letter `a`on the
  136.     keyboard". Similarly, "SUIT-click" means "hold down the SHIFT and
  137.     CONTROL keys, and click on the left mouse button".
  138.  
  139.  
  140.     Selecting Widgets
  141.     -----------------
  142.     SUIT provides several other means by which you can change the
  143.     appearance of widgets in your interface. All of these, however,
  144.     require you to first select the object you wish to change. To do this,
  145.     SUIT-click on it.
  146.  
  147.     Try selecting the bounded value. When the bounded value is selected, 
  148.     "handles" appear around the edges.
  149.  
  150.  
  151.     Deselecting Widgets
  152.     -------------------
  153.     An object may be deselected either by SUIT-clicking on it again, or by
  154.     SUIT-clicking anywhere on the screen. 
  155.  
  156.     Try deselecting the bounded value. The handles should go away.
  157.  
  158.  
  159.     Resizing Widgets
  160.     ----------------
  161.     In addition to moving widgets, you can also resize them. To do this:
  162.     1.) SUIT-click on the object you wish to resize
  163.     2.) SUIT-drag one of the handles
  164.  
  165.     Practice resizing the bounded value. Try to make it taller and
  166.     thinner. Now make it square.
  167.  
  168.  
  169.     Cycling Widgets Among Display Styles
  170.     ------------------------------------
  171.  
  172.     The bounded value you have been manipulating allows the user to specify a
  173.     number from 1 to 10. There are any number of ways that a bounded value
  174.     like this could be displayed. SUIT provides four built-in display
  175.     styles: a simple slider, a pie-chart display, a scroll bar,
  176.     and a speedometer-like display: To change a given widget from 
  177.     its current display style to another, you can cycle the
  178.     widget. 
  179.     To do this:
  180.  
  181.     1.) Move the cursor to the center of the widget
  182.     2.) Type SUIT-c 
  183.  
  184.     Cycle to each of the five available display styles and click
  185.     on them to see how they work.
  186.  
  187.  
  188.  
  189. THE SUIT PROPERTY EDITOR
  190. ================================
  191.  
  192. What if we wanted to change something about a widget other than its
  193. location, such as its color? Each SUIT widget maintains information like this in 
  194. the form of a collection of variables or properties that govern the widget's 
  195. appearance and functionality. To view or change any of the properties that 
  196. a widget has, you can invoke the SUIT property editor. You will notice that 
  197. properties, like variables, come in different types; SUIT supports a wide 
  198. variety of types including double, string, boolean, and more advanced 
  199. types like color, font, and enumeration.
  200.  
  201. To become familiar with the property editor, try these steps:
  202.     1.) Make sure you are still running demo.
  203.  
  204.     2.) Move the cursor to the center of the polygon widget. Type SUIT-e.
  205.  
  206.     3.) BOOLEANS: Click on the object property FILLED. It should change to 
  207.         NO. Notice that the polygon is not filled anymore.
  208.  
  209.     4.) TEXT: Click on the object property called NUMBER_OF_SIDES. A text 
  210.         box will appear. Type a CONTROL-k to delete the text currently in the 
  211.         textbox. (This means hold down the control key and press "k") Type 
  212.         in the number 3 and press RETURN. Notice that the
  213.         polygon has 3 sides. 
  214.         
  215.         Here are some other useful editing keys:
  216.         o Delete character    CONTROL-d
  217.         o Forward a character    CONTROL-f
  218.         o Backward a character    CONTROL-b
  219.         o Kill Line        CONTROL-k
  220.         o Beginning of Line    CONTROL-a
  221.         o End of Line        CONTROL-e
  222.  
  223.     5.) COLOR: If you have a color monitor, Click on the
  224.         object property FOREGROUND_COLOR. Select a bright color from
  225.         the choices offered and press OK. Notice
  226.         that the color of the polygon has changed to the 
  227.         color selected on the color chips.
  228.  
  229.     6.) Exit the property editor by clicking on "OK."
  230.  
  231.  
  232.     More About Properties 
  233.     --------------------- 
  234.  
  235.     As you have seen, each screen object has various properties
  236.     which store information about the object's appearance and
  237.     functionality. If these properties were always stored with
  238.     each object, it would be hard to enforce consistency. For
  239.     example, if all the labels in an application were green, and
  240.     you decided to make them all red, you would have to change
  241.     them all one by one. SUIT addresses this problem by allowing
  242.     properties to be stored at three different levels: the
  243.     object level, the class level, and the global level.  These
  244.     nested levels are shown below.
  245.  
  246.     To find a property, SUIT starts at the object level. If the
  247.     property in question has not been defined at the object
  248.     level, the search is performed again at that widget's class
  249.     level. If the search fails here too, SUIT searches the
  250.     global level, where if it is still not found, a default
  251.     value for that type of property is returned.
  252.     
  253.     EXAMPLE: Suppose the code for a button widget called 
  254.     "Bert" initiates a property lookup on a property called 
  255.     FOREGROUND_COLOR. SUIT first looks to see if a
  256.     FOREGROUND_COLOR property has been specified for Bert at the
  257.     object level. If so, SUIT returns the value of the property. 
  258.     If not, SUIT looks to see if there is a FOREGROUND_COLOR 
  259.     property specified at the class level for all widgets that
  260.     belong to the class called "buttons". If not, SUIT searches
  261.     the global level for FOREGROUND_COLOR, at which point, if the
  262.     property is still not found, the default value of black will
  263.     be returned.
  264.     
  265.  
  266.     Experimenting with Property Lookups
  267.     -----------------------------------
  268.     To get a better idea of how property lookup works, perform 
  269.     the following steps. 
  270.  
  271.     1.) INVOKE THE PROPERTY EDITOR: Type SUIT-e over the label at the top 
  272.     of the screen that says "SUIT".
  273.  
  274.     Note that the label has no HAS_BORDER property at the object level. This 
  275.     means that the label is inheriting its HAS_BORDER from a higher level -- in 
  276.     this case, the class level. Change the class level HAS_BORDER
  277.     property to YES by clicking on it.
  278.  
  279.     2.) EXIT THE PROPERTY EDITOR: Click on the OK button. 
  280.  
  281.     All the labels now have borders because they are all getting their boolean 
  282.     HAS_BORDER property from the Class level. Suppose you wanted all but 
  283.     one of the labels to have a border? To do this, you have the single label 
  284.     override his class level property by giving him a property at the object 
  285.     level. We'll do this by copying the label's class property to
  286.     the object level.
  287.  
  288.     3.) COPYING PROPERTIES: Invoke the property editor again on the same 
  289.     label. We are now going to copy a property from the Class level to the 
  290.     Object level. To do this: Press and hold the mouse button down (No 
  291.     need to use SUIT keys here) over the HAS_BORDER property listed 
  292.     under Class Properties and move your mouse until the cursor is over 
  293.     the Object Properties box. When you release the mouse button, the 
  294.     property will be copied from the Class level to the Object level. 
  295.  
  296.     4.) Change the Object level HAS_BORDER property of this label back to 
  297.     NO. Exit the property editor again. Notice that this label is now differ
  298.     ent from the others: it has no border because this label finds its 
  299.     HAS_BORDER property at the object level (where HAS_BORDER is NO), 
  300.     not the class level (where the value is YES). 
  301.  
  302.     What if we wanted this label to revert to inheriting its HAS_BORDER from 
  303.     the Class? We need to delete the object level property to let
  304.     this happen. 
  305.  
  306.     5.) DELETING PROPERTIES: Invoke the property editor one last time on 
  307.     the label. Dispose of the object level HAS_BORDER property by drag
  308.     ging the property from the object level listing to the trash can icon. 
  309.     Notice that the label has gone back to inheriting its HAS_BORDER 
  310.     property from its class. 
  311.  
  312.     6.) EXIT PROPERTY EDITOR: Click on OK.
  313.     
  314.     
  315.  
  316. INTERACTIVE CREATION OF WIDGETS
  317. =======================================
  318.     SUIT is capable of adding widgets to an application on the
  319. fly. In this next section, we are going to add a clock widget.
  320.  
  321.     To create a clock widget on the fly:
  322.     1.) Invoke the "New Widget" command by typing 
  323.         "SUIT-n"
  324.     3.) Select "clock" from the list of widget 
  325.         classes supplied
  326.     4.) Press OK.
  327.  
  328. This same procedure can be used to add labels, buttons and other
  329. widgets to an application without writing code. Adding functionality
  330. to a widget can be done by writing code or by "exporting" a property...
  331.  
  332.  
  333.  
  334. EXPORTING PROPERTIES
  335. ==========================
  336.  
  337.     SUIT can attach program functionality interactively.
  338.  
  339.     Suppose you had a widget called "Ernie" and you wanted the
  340. user to be able to control Ernie's foreground color through a set of
  341. color chips some where in the application. Instead of adding a
  342. SUIT_createColorChips() call to your code, writing the callback, and
  343. recompiling the code, you could "export" Ernie's FOREGROUND COLOR to the
  344. application's interface via the export button in the property editor.
  345.  
  346.     Exporting a property means having SUIT add another widget to
  347. your application interface whose sole job is to control some property
  348. of another widget. SUIT can do this because for every data type that
  349. SUIT manipulates (integers, booleans, strings, etc.) there is a
  350. corresponding widget that can represent that type (bounded values,
  351. check boxes, type-in boxes, and respectively). 
  352.  
  353.     To export the polygon's FILLED property: 
  354.  
  355.     1.) If you're not still running demo, start up the demo program again.
  356.     2.) Invoke the property editor (SUIT-e) on the polygon widget.
  357.     3.) Drag the FILLED property from the object level listing to the export
  358.     panel (looks like a moving van), in the same way you might drag a
  359.     property to the trash can.  Select OK to exit the property editor.
  360.  
  361. Notice that there is now a new on/off switch in the application (this
  362. is the kind of widget that controls boolean data types). Click on the
  363. switch and the polygon will change from filled to unfilled and back
  364. again.
  365.     New functionality. No new code.
  366.  
  367.  
  368.  
  369. WHO CAN GET SUIT?
  370. ==============================
  371. SUIT, including all its source code, is available without charge
  372. to Universities and other non-profit institutions.  For-profit
  373. organizations can send email to 
  374.  
  375.     suit@uvacs.cs.virginia.edu 
  376.  
  377. to find out how they can help support graduate education in America.
  378.  
  379. WHAT DO I NEED AT MY SITE IN ORDER TO USE SUIT? 
  380. ===================================================
  381.     This all depends on the platform you will use:
  382.  
  383.     X WINDOWS: 
  384.         You will need at least X11R4 and gcc 2.1 or later.
  385.         Or any ANSI-compatible C compiler. 
  386.         (If all you have is gcc 1.37.X, send us mail.)
  387.                 
  388.     MAC:
  389.         Think C 5.0 
  390.  
  391.     DOS:
  392.         DOS version 5.0 and Borland C++ version 3.1
  393.     
  394.     WINDOWS:
  395.         Microsoft Windows 3.1 and Borland C++ version 3.1
  396.     
  397.  
  398. HOW TO GET THE SUIT DISTRIBUTION
  399. ========================================
  400. SUIT is available through anonymous ftp from
  401. uvacs.cs.virginia.edu (128.143.8.29). Each SUIT distribution 
  402. package comes with full source code and documentation, though
  403. as explained below, the source and docs are available separately 
  404. as well for those attempting to port SUIT to an architecture we do not
  405. yet support. To set a standard SUIT distribution package for your 
  406. machine: 
  407.  
  408.  
  409. 1.) On your system, make a directory that will hold the 
  410. distribution. For example, in your home directory type:
  411.  
  412.         mkdir suit
  413.  
  414. The process of installing the SUIT distribution causes SUIT to 
  415. create a new directory underneath the one you've created here.
  416.  
  417. 2.) Change your current directory to this new location:
  418.  
  419.         cd suit
  420.  
  421. 3.) Type the following command:
  422.  
  423.         ftp uvacs.cs.Virginia.EDU
  424.         
  425.     (if this doesn't work, try ftp 128.143.8.100 or
  426.                    ftp 128.143.60.100)
  427.  
  428.  You should see something that looks like:
  429.  
  430.         Connected to 128.143.8.100
  431.         220 uvacs FTP server (SunOS 4.1) ready.
  432.         Name (128.143.8.100:CookieMonster):
  433.  
  434.     where "CookieMonster" is your login ID.
  435.  
  436.  
  437. 4.) At this prompt, type: 
  438.  
  439.         anonymous
  440.     
  441.     You should see something like this:
  442.     
  443.         331 Guest login ok, send ident as password.
  444.         Password:
  445.  
  446. 5.) Please type in your local login ID as a courtesy. This will not be
  447. echoed back to you, so don't panic.
  448.     You will see:
  449.  
  450.         230 Guest login ok, access restrictions apply.
  451.         ftp>
  452.  
  453. 6.) cd into the SUIT directory by typing:
  454.  
  455.         cd /pub/suit/distribution
  456.  
  457. 7.) cd into the directory named after the hardware platform
  458.     you intend to use:
  459.  
  460.     cd <machine_type>
  461.     where <machine_type> is one of:
  462.  
  463.         sparc         
  464.         sun3
  465.         sgi
  466.         rs6000
  467.     for example:
  468.         cd sparc
  469.             OR 
  470.         cd sun3 
  471.             ETC.
  472.  
  473. 8.) VERY IMPORTANT: set the ftp transfer to use binary mode
  474.     Type:
  475.         binary
  476.  
  477. 9.) transfer the archive
  478.     Type:
  479.         get <machine_type>.tar.Z
  480.  
  481.         for example:    
  482.             get sparc.tar.Z
  483.                 OR
  484.             get sun3.tar.Z
  485.                 ETC.
  486.  
  487.     This file is VERY large. Expect it to take
  488.     several minutes to come over.
  489.     
  490. 10.) leave ftp
  491.     Type:
  492.         quit
  493.  
  494. 11.) uncompress the archive
  495.     Type:
  496.     uncompress < <machine_type>.tar.Z | tar xfh -
  497.     
  498.     for example:
  499.         uncompress < sparc.tar.Z | tar xfh -
  500.  
  501. 12.) CONGRATULATIONS! You've got yourself the SUIT library and header
  502. files! You can now safely remove the <machine_name>.tar file if you so
  503. desire.
  504.  
  505. 13.) Follow the directions in the top level README file to prepare
  506. the SUIT distrbution for your site.
  507.  
  508.  
  509. GETTING SUIT SOURCE
  510. ===========================
  511.     Full source code comes with each distribution package of SUIT
  512.     (same source for all architectures). 
  513.  
  514.     IF YOU ONLY WANT THE SOURCE, you can ftp it from uvacs, as
  515.     described above
  516.  
  517.         ftp uvacs.cs.virginia.edu
  518.         (Be sure to use binary transfer)
  519.         
  520.     in the file called    
  521.  
  522.         /pub/suit/distribution/JustSource/src.tar.Z
  523.  
  524.  
  525.  
  526. GETTING THE SUIT REFERENCE MANUAL
  527. =========================================
  528.     Each standard distribution package of SUIT comes with a
  529.     complete reference manual which describes the SUIT library 
  530.     calls. In the standard distribution, the manual comes in
  531.     the form of a VERY long    postscript file that prints out 
  532.     from last page to first.
  533.     
  534.     If it is more convenient for you to print the manual out from
  535.     first page to last, or if you need just individual reference 
  536.     manual chapters, those are distributed as well in the file 
  537.  
  538.         /pub/suit/distribution/JustDocs/doc.tar.Z
  539.  
  540.     which can ftp from uvacs as explained above. These files are
  541.     called chap_01.ps, chap_02.ps, etc. The complete reference
  542.     manual is in the file chap_all.ps.
  543.  
  544.     Again, be sure to use binary mode when getting this file.
  545.     (type "binary" at the ftp prompt before typing "get")
  546.  
  547.  
  548. ACKNOWLEDGEMENTS
  549. ========================
  550.  
  551.     Thanks for SUIT are due to its original author, Nathaniel Young, and
  552.     to Roderic Collins, Matt Conway, Jim Defay, Pramod Dwivedi, Robert
  553.     DeLine, Brandon Furlich, Rich Gossweiler, Chris Long, William
  554.     McClennan, Kim Passarella, and Randy Pausch. This work was supported
  555.     in part by the National Science Foundation, the United Cerebral Palsy
  556.     Foundation, the Virginia Engineering Foundation, the Virginia Center
  557.     for Innovative Technology, and SAIC.
  558.     
  559.     TELL US WHAT YOU THINK: 
  560.     We would like to hear from you: if you have 
  561.     any comments about SUIT, please send electronic mail to 
  562.     
  563.         suit@uvacs.cs.Virginia.EDU 
  564.     
  565.     We are very interested in your comments as well as your reports of
  566.     errors, unclear sections, or omissions you find in any part of SUIT.
  567.     
  568.     SUIT (c) 1990, 1991 , 1992
  569.     Copyright Rector and Visitors of the University of Virginia
  570.  
  571. -- 
  572. Bradley Smith             brad@bradley.edu ---  309-677-2337
  573. Network & Technical Services @ Bradley University, Peoria, IL
  574.  
  575. "It's amazing how much scrap metal you get from 4 cans of beer"
  576.