⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.xrolodex

📁 `smith.motif.tar.Z includes the source code for the book "Designing X clients with Xt/Motif," by Je
💻 XROLODEX
字号:
File:  README.xrolodex/***********************************************************************  Copyright (c) 1991, 1992 Iris Computing Laboratories.**  This software is provided for demonstration purposes only.  As*  freely-distributed, modifiable source code, this software carries*  absolutely no warranty.  Iris Computing Laboratories disclaims*  all warranties for this software, including any implied warranties*  of merchantability and fitness, and shall not be liable for*  damages of any type resulting from its use.*  Permission to use, copy, modify, and distribute this source code*  for any purpose and without fee is hereby granted, provided that*  the above copyright and this permission notice appear in all copies*  and supporting documentation, and provided that Iris Computing*  Laboratories not be named in advertising or publicity pertaining*  to the redistribution of this software without specific, written*  prior permission.**********************************************************************/`xrolodex.tar.Z' includes the source code for a Motif rolodexapplication.  Note that you must have X and the Motif librariesto compile `xrolodex'.  This X client is further described in thebook "Designing X clients with Xt/Motif," by Jerry D. Smith,Morgan Kaufmann, 1992 (available @ July 1992).Note:  There is an existing XView program named `xrolo', so pleasedo NOT rename `xrolodex' to `xrolo'.  Having distinct names willeliminate confusion and allow some users to install both products.Programmers:  See the comments near the end of this file regardingthe makefile, Motif versions, etc.`xrolodex' is a Rolodex(R)-style application for maintaining a set of"virtual business cards."  `xrolodex's top-level window includes fourprincipal components: - an application-level menu bar, - a label area for displaying the name of the current rolodex file, - a control panel for entry-level rolodex manipulation, and - an edit window (with local menu bar) for editing the currently   displayed rolodex entry, also providing a basic viewport facility.`xrolodex' has the following command-line option:{system prompt} xrolodex [<filename>]The filename is optional.  That is, you can specify a file via thefile selection box that's activated by the "Open" entry in the "File"menu.To create a new rolodex file, first use "Open" to associate therolodex contents with a filename, and then simply type in each entry.`xrolodex' has the following client-level resources:Resource            Default Value    Range of Values       Type--------            -------------    ---------------       ----viewportMenuBar     False            {True, False}         BooleanviewportRows        12               @ 12 or greater       integerviewportColumns     40               @ 6 or greater        integerindexRows           15               positive integer      integerindexColumns        30               positive integer      integercenterDialogs       True             {True, False}         BooleanentryDelimiter      "####\n"         any char. string      stringdirectoryMask       $HOME/*.xrolo    any char. string      stringThe default viewport menu is a pop-up, background menu; see the"Editor" help menu.  There are approximate lower limits on thesize of the viewport window because Motif will force the viewport'srow-column dimensions to be large enough to fill the top-level window,which must be large enough to accommodate the top-level menu bar andthe control panel.The default card delimiter sequence is "####" on a separate line,that is, "####\n".  There is no reason for the typical `xrolodex'user to specify the delimiter option; it is transparent during normal`xrolodex' use.The editor facility provides menus for copy, cut, and pasteoperations and for search and replace operations.  Again, theeditor window allows the user to edit the text within the currentlydisplayed rolodex entry, not the entire rolodex file--the scrollbarwill not navigate across entries.  Entry-level rolodex operationsare performed elsewhere.  Since the editor maintains its internalstate from one entry to the next, you can copy and paste textacross entries.With `xrolodex' the rolodex database is completely free-form.  Thereare no limitations on the number of entries, and no limitations onthe character dimensions of an individual entry.  Individualentries are delimited in the rolodex file by preceding each entrywith "####" on a separate line--`xrolodex' depends on this convention.Note that you can specify a different delimiter sequence from thecommand line.Since `xrolodex's rolodex file is a simple stream of bytes, experiencedUNIX users can use other text processing tools to manipulate therolodex file(s).  In particular, you can use your own/preferredtext editor, if you need to perform a considerable amount of editingon a particular file.  With `xrolodex' you can maintain as many distinctrolodex files as you'd like.  The "Open..." menu option allows you toload any rolodex file via a file selection box.  The file type is"*.xrolo" in the user's home directory.During normal operations, `xrolodex' maintains a rolodex file inmemory.  That is, when you "open" a file, its contents are readinto RAM, and all rolodex operations are applied to this "memoryfile."  When you select "Save" from the "File" menu, the rolodexfile as it exists in memory is saved to disk, replacing theoriginal rolodex file.  The first time that a file is saved afterit's been loaded with "Open..." a back-up of the original fileis created with ".bak" appended to the filename.  For subsequent saveoperations (without an intervening use of "Open..."), the back-upfile remains unchanged.The "Quit" menu option terminates the application without savingpending modifications to the rolodex file.  If there are unsavedchanges to the file, you are prompted and given the opportunity tosave changes to disk before the program terminates.  The "Exit"menu option terminates the application after saving any pendingmodifications to the rolodex file; the save process is automatic,i.e., there is no user prompt.There is no "New" menu entry.  To create a new rolodex file, firstuse "Open" to associate the rolodex contents with a filename, andthen simply type in each entry.When viewing an individual rolodex entry you can change it simplyby moving the mouse pointer into the rolodex entry viewport andusing normal Motif editing commands--the viewport is implementedwith a standard Motif text widget.  If the number of lines exceedsthe height of the window, you can scroll the edit window.Within the edit window you can copy, cut, and paste text for thecurrent rolodex entry, and you can use the "Find Selection" menuoption to find the next occurence (forward) of the currentlyselected text.  The "Search and Replace..." menu option activatesa top-level window that you can use to enter search text manually.It also contains a "Replace" button so that you can "Find" atext segment and then "Replace" it.  Coordinated operations with"Find" and "Replace" will allow you to make changes to the textthroughout the current rolodex entry.There are pull-down menus in the main menu bar that group togetherlogically related operations for entry-level rolodex manipulation.At present, "Edit" contains the buttons:  "New/Ins", "New/Add","Copy", "Delete", and "Undelete".  The "Find" menu presently containsthe buttons:  "Index..." and "Find Entry...".  The latter two buttonspop up dialog boxes.  These buttons are explained below.For convenience, several of these buttons are present in the controlpanel as well.  The control panel is to the left of the viewport andis used for moving *among* rolodex entries.  It contains buttons forthe most commonly used operations so that the user doesn't have togo to a pull-down menu.  The "First", "Last", "Next", and "Previous"buttons are self-explanatory.  Several other command buttons requireexplanation."Index..." activates a top-level window that displays the first lineof every rolodex entry.  With this convention in mind, you should makesure that the beginning of the first line of each entry containsmeaningful information, e.g., a person's name.  If you select one ofthe entries displayed in the index window, that rolodex entry will bedisplayed in the edit window/viewport."Find Entry..." activates a top-level window in which you can entera string.  `xrolodex' will search forward or backward, beginning withthe next (previous) rolodex entry, for the first entry that containsthe specified text string, presenting that entry in the viewport.By default, text searches across entries are case insensitive.  Youcan enable case sensitive searching with a toggle button from theradio box."New/Ins" clears the edit window and allows you to enter a newrolodex entry.  `xrolodex' *automatically* saves the contents of thecurrent rolodex entry in the file (if modifications have beenmade) any time that you preform an operation that switches toanother rolodex entry, e.g., "Next", "Index", etc."New/Add" is similar to "New/Ins", except that it inserts/adds theentry *after* the current entry.  The insert/add operations are con-sistent with text editors, such as `vi', where "insert" means beforethe current character and "add" means after the current character.Also, "New/Add" makes it possible to add an entry to the very endof the rolodex database.You can select "Copy" to enter a duplicate of any entry into therolodex file.  This provide a convenient mechanism for creating a newentry by copying an existing rolodex entry, and then making changesto the new entry.  As an alternative, you could use "Copy" (from theviewport "Edit" menu) to copy an entry's text to the clipboard,select "New" to create an empty entry, and then "Paste" the textfrom the clipboard--pressing "Copy" is considerably faster."Delete" deletes the current rolodex entry.  `xrolodex' provides asingle level of undo capability for "Delete"ions with the "Undelete"button.  "Undelete" recovers the deleted entry at the currentposition in the rolodex file.Programmers-----------There is a simple makefile in `xrolo.make', so that you can simple copythe entire project into a working directory and type `make -f xrolo.make',if you don't want to install `xrolodex' in the MIT or Motif X source tree.This source code has been tested extensively in a Sun SPARCstation, MIT Xenvironment with Motif 1.1.x under CodeCenter/Saber-C.  There areno known errors/problems.THIS APPLICATION CURRENTLY USES THE DEFAULT XT ERROR HANDLER AND CANTERMINATE UNEXPECTEDLY--WITH UNSAVED CHANGES IN THE EDIT WINDOW.YOU MAY WANT TO ADD A CUSTOMIZED ERROR HANDLER.Jerry SmithIris Computing Laboratoriesjsmith@spectro.com

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -