home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sources / wanted / 3716 < prev    next >
Encoding:
Internet Message Format  |  1992-07-23  |  12.1 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!mp.cs.niu.edu!fnnews!fnsony.fnal.gov!shah
  2. From: shah@fnsony.fnal.gov (Hemant Shah)
  3. Newsgroups: comp.sources.wanted
  4. Subject: Re: WANTED:  X Window Based phone/address book
  5. Message-ID: <2108@fnnews.fnal.gov>
  6. Date: 23 Jul 92 17:28:41 GMT
  7. References: <1992Jul22.160040.11269@newsgate.sps.mot.com>
  8. Sender: news@fnnews.fnal.gov
  9. Reply-To: shah@fnalb.fnal.gov
  10. Organization: Fermi National Accelerator Laboratory, Batavia, IL
  11. Lines: 236
  12. Nntp-Posting-Host: fnsony.fnal.gov
  13.  
  14. In article <1992Jul22.160040.11269@newsgate.sps.mot.com>, rigg@ssdt-tempe.sps.mot.com (Dana Rigg) writes:
  15. |> Does anybody know where I can get an X window based phone/address book tool?
  16. |> 
  17. |> Dana Rigg
  18. |> rigg@ssdt-tempe.sps.mot.com
  19.  
  20. There is a a program called xrolodex (different then xrolo for SUN), it 
  21. requires MOTIF. I think I got from comp.sources.x.
  22. Here is the readme file:
  23.  
  24. File:  README.xrolodex
  25.  
  26. /**********************************************************************
  27. *  Copyright (c) 1991, 1992 Iris Computing Laboratories.
  28. *
  29. *  This software is provided for demonstration purposes only.  As
  30. *  freely-distributed, modifiable source code, this software carries
  31. *  absolutely no warranty.  Iris Computing Laboratories disclaims
  32. *  all warranties for this software, including any implied warranties
  33. *  of merchantability and fitness, and shall not be liable for
  34. *  damages of any type resulting from its use.
  35. *  Permission to use, copy, modify, and distribute this source code
  36. *  for any purpose and without fee is hereby granted, provided that
  37. *  the above copyright and this permission notice appear in all copies
  38. *  and supporting documentation, and provided that Iris Computing
  39. *  Laboratories not be named in advertising or publicity pertaining
  40. *  to the redistribution of this software without specific, written
  41. *  prior permission.
  42. **********************************************************************/
  43.  
  44. `xrolodex.tar.Z' includes the source code for a Motif rolodex
  45. application.  Note that you must have X and the Motif libraries
  46. to compile `xrolodex'.  This X client is further described in the
  47. book "Designing X clients with Xt/Motif," by Jerry D. Smith,
  48. Morgan Kaufmann, 1992 (available @ July 1992).
  49.  
  50. Note:  There is an existing XView program named `xrolo', so please
  51. do NOT rename `xrolodex' to `xrolo'.  Having distinct names will
  52. eliminate confusion and allow some users to install both products.
  53.  
  54. Programmers:  See the comments near the end of this file regarding
  55. the makefile, Motif versions, etc.
  56.  
  57. `xrolodex' is a Rolodex(R)-style application for maintaining a set of
  58. "virtual business cards."  `xrolodex's top-level window includes four
  59. principal components:
  60.  - an application-level menu bar,
  61.  - a label area for displaying the name of the current rolodex file,
  62.  - a control panel for entry-level rolodex manipulation, and
  63.  - an edit window (with local menu bar) for editing the currently
  64.    displayed rolodex entry, also providing a basic viewport facility.
  65.  
  66. `xrolodex' has the following command-line option:
  67.  
  68. {system prompt} xrolodex [<filename>]
  69.  
  70. The filename is optional.  That is, you can specify a file via the
  71. file selection box that's activated by the "Open" entry in the "File"
  72. menu.
  73.  
  74. To create a new rolodex file, first use "Open" to associate the
  75. rolodex contents with a filename, and then simply type in each entry.
  76.  
  77. `xrolodex' has the following client-level resources:
  78.  
  79. Resource            Default Value    Range of Values       Type
  80. --------            -------------    ---------------       ----
  81. viewportMenuBar     False            {True, False}         Boolean
  82. viewportRows        12               @ 12 or greater       integer
  83. viewportColumns     40               @ 6 or greater        integer
  84. indexRows           15               positive integer      integer
  85. indexColumns        30               positive integer      integer
  86. centerDialogs       True             {True, False}         Boolean
  87. entryDelimiter      "####\n"         any char. string      string
  88. directoryMask       $HOME/*.xrolo    any char. string      string
  89.  
  90. The default viewport menu is a pop-up, background menu; see the
  91. "Editor" help menu.  There are approximate lower limits on the
  92. size of the viewport window because Motif will force the viewport's
  93. row-column dimensions to be large enough to fill the top-level window,
  94. which must be large enough to accommodate the top-level menu bar and
  95. the control panel.
  96.  
  97. The default card delimiter sequence is "####" on a separate line,
  98. that is, "####\n".  There is no reason for the typical `xrolodex'
  99. user to specify the delimiter option; it is transparent during normal
  100. `xrolodex' use.
  101.  
  102. The editor facility provides menus for copy, cut, and paste
  103. operations and for search and replace operations.  Again, the
  104. editor window allows the user to edit the text within the currently
  105. displayed rolodex entry, not the entire rolodex file--the scrollbar
  106. will not navigate across entries.  Entry-level rolodex operations
  107. are performed elsewhere.  Since the editor maintains its internal
  108. state from one entry to the next, you can copy and paste text
  109. across entries.
  110.  
  111. With `xrolodex' the rolodex database is completely free-form.  There
  112. are no limitations on the number of entries, and no limitations on
  113. the character dimensions of an individual entry.  Individual
  114. entries are delimited in the rolodex file by preceding each entry
  115. with "####" on a separate line--`xrolodex' depends on this convention.
  116. Note that you can specify a different delimiter sequence from the
  117. command line.
  118.  
  119. Since `xrolodex's rolodex file is a simple stream of bytes, experienced
  120. UNIX users can use other text processing tools to manipulate the
  121. rolodex file(s).  In particular, you can use your own/preferred
  122. text editor, if you need to perform a considerable amount of editing
  123. on a particular file.  With `xrolodex' you can maintain as many distinct
  124. rolodex files as you'd like.  The "Open..." menu option allows you to
  125. load any rolodex file via a file selection box.  The file type is
  126. "*.xrolo" in the user's home directory.
  127.  
  128. During normal operations, `xrolodex' maintains a rolodex file in
  129. memory.  That is, when you "open" a file, its contents are read
  130. into RAM, and all rolodex operations are applied to this "memory
  131. file."  When you select "Save" from the "File" menu, the rolodex
  132. file as it exists in memory is saved to disk, replacing the
  133. original rolodex file.  The first time that a file is saved after
  134. it's been loaded with "Open..." a back-up of the original file
  135. is created with ".bak" appended to the filename.  For subsequent save
  136. operations (without an intervening use of "Open..."), the back-up
  137. file remains unchanged.
  138.  
  139. The "Quit" menu option terminates the application without saving
  140. pending modifications to the rolodex file.  If there are unsaved
  141. changes to the file, you are prompted and given the opportunity to
  142. save changes to disk before the program terminates.  The "Exit"
  143. menu option terminates the application after saving any pending
  144. modifications to the rolodex file; the save process is automatic,
  145. i.e., there is no user prompt.
  146.  
  147. There is no "New" menu entry.  To create a new rolodex file, first
  148. use "Open" to associate the rolodex contents with a filename, and
  149. then simply type in each entry.
  150.  
  151. When viewing an individual rolodex entry you can change it simply
  152. by moving the mouse pointer into the rolodex entry viewport and
  153. using normal Motif editing commands--the viewport is implemented
  154. with a standard Motif text widget.  If the number of lines exceeds
  155. the height of the window, you can scroll the edit window.
  156.  
  157. Within the edit window you can copy, cut, and paste text for the
  158. current rolodex entry, and you can use the "Find Selection" menu
  159. option to find the next occurence (forward) of the currently
  160. selected text.  The "Search and Replace..." menu option activates
  161. a top-level window that you can use to enter search text manually.
  162. It also contains a "Replace" button so that you can "Find" a
  163. text segment and then "Replace" it.  Coordinated operations with
  164. "Find" and "Replace" will allow you to make changes to the text
  165. throughout the current rolodex entry.
  166.  
  167. There are pull-down menus in the main menu bar that group together
  168. logically related operations for entry-level rolodex manipulation.
  169. At present, "Edit" contains the buttons:  "New/Ins", "New/Add",
  170. "Copy", "Delete", and "Undelete".  The "Find" menu presently contains
  171. the buttons:  "Index..." and "Find Entry...".  The latter two buttons
  172. pop up dialog boxes.  These buttons are explained below.
  173.  
  174. For convenience, several of these buttons are present in the control
  175. panel as well.  The control panel is to the left of the viewport and
  176. is used for moving *among* rolodex entries.  It contains buttons for
  177. the most commonly used operations so that the user doesn't have to
  178. go to a pull-down menu.  The "First", "Last", "Next", and "Previous"
  179. buttons are self-explanatory.  Several other command buttons require
  180. explanation.
  181.  
  182. "Index..." activates a top-level window that displays the first line
  183. of every rolodex entry.  With this convention in mind, you should make
  184. sure that the beginning of the first line of each entry contains
  185. meaningful information, e.g., a person's name.  If you select one of
  186. the entries displayed in the index window, that rolodex entry will be
  187. displayed in the edit window/viewport.
  188.  
  189. "Find Entry..." activates a top-level window in which you can enter
  190. a string.  `xrolodex' will search forward or backward, beginning with
  191. the next (previous) rolodex entry, for the first entry that contains
  192. the specified text string, presenting that entry in the viewport.
  193. By default, text searches across entries are case insensitive.  You
  194. can enable case sensitive searching with a toggle button from the
  195. radio box.
  196.  
  197. "New/Ins" clears the edit window and allows you to enter a new
  198. rolodex entry.  `xrolodex' *automatically* saves the contents of the
  199. current rolodex entry in the file (if modifications have been
  200. made) any time that you preform an operation that switches to
  201. another rolodex entry, e.g., "Next", "Index", etc.
  202.  
  203. "New/Add" is similar to "New/Ins", except that it inserts/adds the
  204. entry *after* the current entry.  The insert/add operations are con-
  205. sistent with text editors, such as `vi', where "insert" means before
  206. the current character and "add" means after the current character.
  207. Also, "New/Add" makes it possible to add an entry to the very end
  208. of the rolodex database.
  209.  
  210. You can select "Copy" to enter a duplicate of any entry into the
  211. rolodex file.  This provide a convenient mechanism for creating a new
  212. entry by copying an existing rolodex entry, and then making changes
  213. to the new entry.  As an alternative, you could use "Copy" (from the
  214. viewport "Edit" menu) to copy an entry's text to the clipboard,
  215. select "New" to create an empty entry, and then "Paste" the text
  216. from the clipboard--pressing "Copy" is considerably faster.
  217.  
  218. "Delete" deletes the current rolodex entry.  `xrolodex' provides a
  219. single level of undo capability for "Delete"ions with the "Undelete"
  220. button.  "Undelete" recovers the deleted entry at the current
  221. position in the rolodex file.
  222.  
  223. Programmers
  224. -----------
  225. There is a simple makefile in `xrolo.make', so that you can simple copy
  226. the entire project into a working directory and type `make -f xrolo.make',
  227. if you don't want to install `xrolodex' in the MIT or Motif X source tree.
  228.  
  229. This source code has been tested extensively in a Sun SPARCstation, MIT X
  230. environment with Motif 1.1.x under CodeCenter/Saber-C.  There are
  231. no known errors/problems.
  232.  
  233. THIS APPLICATION CURRENTLY USES THE DEFAULT XT ERROR HANDLER AND CAN
  234. TERMINATE UNEXPECTEDLY--WITH UNSAVED CHANGES IN THE EDIT WINDOW.
  235. YOU MAY WANT TO ADD A CUSTOMIZED ERROR HANDLER.
  236.  
  237. Jerry Smith
  238. Iris Computing Laboratories
  239. jsmith@spectro.com
  240.  
  241. -- 
  242. -------------------------------------------------------------------------------
  243. Hemant Shah                            | All the opinions expressed are my own
  244. Fermi National Accelerator Laboratory  | and does not necessarily reflect
  245. Systems Integration Group              | those of Fermilab.
  246. E-mail :shah@fnal.fnal.gov             |
  247.  Voice : (708) 840-8071                   | I haven't lost my mind
  248.    Fax : (708) 840-2783                | it's backed on tape somewhere.
  249. -------------------------------------------------------------------------------
  250.