home *** CD-ROM | disk | FTP | other *** search
-
- Sphinx.doc v2.5b
- ⌐ 1991, Nicolas Dade. All Rights Reserved
- permission is hereby granted for non-commercial duplication and distribution
- doc file for the SPHINX: AmigaDOS device
- last revised: January 9th, 1992
-
- - - - - - - - - - - - - - - - - - -
-
- The gadgets:
-
- [Iconize] (or RA-Z):
- This closes the SPHINX window and opens a small drag bar in its place.
- Everything else keeps working as if the main window were open except,
- naturally, nothing is drawn. This results in both a speed increase and an
- uncluttering of the workbench screen.
- To reopen the main window, activate the drag bar (click on it with the lmb
- (left mouse button)), then either try to access a menu (rmb) or press a key
- which produces a character (Shift won't work). If you press a key, the key
- is only used to open the window-it is not entered into the input buffer.
-
- The iconized window and, when it is reopened, the main window, are made
- active only if the previous window was active.
-
- The first time you iconize, the iconized window opens where the main window
- was when it was iconized. From there on, the iconized window opens were it
- was when it was deiconized.
-
- There is a certain request that the calling program can make of SPHINX:
- (DiskInfo packet) that is rarely done, but that forces SPHINX to lock the
- window; thereafter you cannot iconize it because that would close the main
- window. When this happens, if the window is iconized, it is deiconized. Then,
- in either case, the iconize gadget is ghosted and RA-Z is disabled.
- This condition is rare, but if it does occur and you dont like it, then it
- was some program you ran that caused it. Not running that program will
- be as close to a fix as you are going to get.
- NOTE: It is my guess that most programs that ask for this information are
- about to do something not quite legal, and probably are going to crash
- anyhow. But you can never tell... .
- NOTE: WB1.3's SetMap does use this (I have no idea why), and does not crash.
-
- RA-Z:
- Keyboard equivalent to the Iconize Gadget.
-
-
- [Scroll]:
- When depressed and when moved, the window is redrawn making the top line the
- line the fraction of the gadgets distance from the top into the list of saved
- text. This is determined by bytes, not lines, since the number of lines
- changes every time the window is resized.
-
- Unlike most scroll gadgets, this one does NOT move when the window is
- scrolled by some other means. This is done for speed, since scanning through
- many KBytes of data to compute what its position would be is slow. If you
- don't like it, then don't use the scroll gadget. (actually you will find that
- this is not as big a problem as you may imagine it to be. Try it and you will
- see you really didn't need the scroll gadget's position to always be
- correct-just after scrolling is all that seems to be needed, and that is does
- happen with SPHINX).
- Clicking above or below the scroll gadget will move it by a very small
- fraction (so small that often the image itself doesn't move). This gives you
- a way to scroll the window small increments without using the keyboard.
- The image on the scroll gadget is a sphinx (or as close to one as can be
- drawn in such a small space)
- Sometimes the redrawing of the window is achieved by a short scroll, at other
- times the whole window is redrawn. What is happening is internally SPHINX is
- trying to do a scroll, since it is faster, but when certain internal
- variables change (like the total length of the text saved), the scroll
- routine cannot be used, the the whole window must be redrawn.
-
-
- [Undo] (Literal,Searching,F10 Locked,Clipping) (or RA-X):
- This gadget serves various purposes, depending on the state of SPHINX.
- Ordinarily its imagery represents the current clipping mode:
- `X' for private, `C' for one-time clipboard, script `C' for locked to
- clipboard, `F' for one-time file, and script `F' for locked to file.
- When it is hit, the last deletion or insertion is undone:
- If you have just inserted some unparsed text, or just undone a deletion,
- then Undo deletes the text you have just inserted. This is canceled once the
- cursor is moved or a character inserted or deleted. Else the last block of
- text that was deleted in one place using any combination of (BS, DEL, S-BS,
- S-DEL, A-BS, A-DEL, C-X, or Undo) is restored.
- When the literal trigger is loaded, its imagery is an `L', either script L or
- straight L. When hit it just unloads the trigger.
- When the contents of the search buffer are valid, then its imagery shows an
- `S'. When it is hit, it cancels the search and copies the search buffer back
- into the input buffer-restoring the input buffer to what it was before the
- search.
- When the Spot 10 is defined, a small `10' appears in the lower right corner
- of this gadget, on top of the main imagery.
- When inserts are going to be parsed, a small `P' appears in the lower left
- corner of this gadget, on top of the main imagery.
-
- RA-X:
- Keyboard equivalent to the Undo Gadget.
-
-
- [Resize]:
- When the window is resized the whole window is redrawn. The old upperleft
- character is kept in the top line of the window, unless the cursor was
- previously visible and would not be visible in the new window if the old
- upperleft character were put in the new top line. In this case the window is
- scrolled down to that the cursor is visible again.
-
-
- RA-] & SRA-]:
- Pop the SPHINX window and, if it is open, the configuration window, to the
- front (keyboard equivalent to the WindowToFront Gadget).
-
- RA-[ & SRA-[:
- Push the SPHINX window and, if it is open, the configuration window, to the
- back (keyboard equivalent to the WindowToBack Gadget).
- NOTE: if you cannot remember which is which, remember this: the [ and ] keys
- are arranged on the keyboard in the same ordinal pattern as the WindowToFront
- and WindowToBack gadgets are in the upper right of a window (well, in WB1.3
- and lower): the key on the right pops to front, the key on the left pushes to
- back.
-
- - - - - - - - - - - - - - - - - - -
-
- The Left Mouse Button and Clipping:
-
- The mouse can be used to clip text from the window. To clip some text, first
- get the text in view by scrolling the window vertically. Then place the mouse
- pointer on one end if the block of characters you wish to clip. Then hold
- down the lmb while moving to the other end of the block, and release the lmb.
- The text is then clipped to whatever the current clipping mode specifies (the
- input buffer, the clipboard (unit 0)or a file)
- NOTE: if you are clipping a TAB (perhaps along with other characters) the
- block of text will jump from the TAB to the next character as you move the
- mouse, since the TAB is really occupying all those spaces.
- NOTE: if you have configured the SPHINX not to strip the EOL characters, if
- you move the mouse out beyond the end of a line, if there is an invisible
- character there (like CR, LF or FF), then it will be clipped too. With an
- ordinary font, this will show up as a sort of box at the end of the clipped
- text. If you dont want it, just BackSpace and be more carefully next time you
- clip: dont go far beyond the end of the line, or, more permanently, change
- configuration to that these are automatically stripped out.
-
- A word, as defined by the ExtraClipWordChars, or one character that is not in
- the set of ExtraClipWordChars, can be clipped by double-clicking either on
- one character of the word, or on the one non-word character. The edges of the
- word are defined by the first characters which do not belong to the set of
- characters (A-Z + a-z + ExtraClipWordChars), or the first change in format
- (italics, color,...) or a change from an inputed text to written text.
-
- Text cannot be clipped solely from the input buffer. Instead, when a
- character in the input buffer is clicked on, the cursor is moved to that
- character. It is possible, and perfectly legal, to start clipping to the left
- of the input buffer, and have the block extend into the input buffer; the
- block just can't start in the input buffer.
-
- Clicking to the right of the last input buffer character jumps the cursor to
- the end of the input buffer.
-
- Clicking below the last line of the input buffer does nothing (except maybe
- activate the window).
-
- RA-G
- If we are not in a locked clipping mode, this cycles through the one-line
- clipping modes (private->clipboard->file-<). The undo gadget's imagery
- changes to show the current mode (`X'->`C'->`F'-<). The clipping mode
- selected is canceled after a clip has been performed.
- If we are in a locked clipping mode, this cancels that mode, putting you
- back into private clipping.
-
- SRA-G
- If we are not in a locked clipping mode that has been used (something has
- been clipped using this mode), then this cycles through the locked clipping
- modes (private->locked clipboard->locked file-<) and the undo gadget's
- imagery shows which mode is currently selected (`X'->script `C'->script `F').
- If we are in a locked clipping mode which has been used, then this cancels
- that mode, putting us back into private clipping.
-
- - - - - - - - - - - - - - - - - - -
-
- Inserting:
-
- RA-I:
- This inserts whatever text is in the clipboard (unit 0). If input parsing is
- enabled, then the characters are treated as if they had been typed in, if
- not then they are inserted at the cursor as if Literal were enabled.
- (looks down inside all CATs,LISTs and FORMs, and inserts the contents of
- all CHRS hunks it finds inside FTXT forms)
-
- SRA-I:
- This inserts the contents of the file InsertFile using the current parsing
- mode (or saves this information so that the insertion may be done when the
- previous file insertion(s) are completed, if there are already some going
- on).
- This insertion is done without blocking up the SPHINX window-everything
- still works while the insertion is taking place. In fact, the insertion
- looks like you were typing the text in, except that the inserted text never
- gets mixed up with any inputlines you may be typing.
- The file is treated as a plain ascii file.
-
- RA-P:
- Toggles whether inserted text (from private clip, clipboard or insert file)
- is just inserted at the cursor, or is parsed just as if it had been typed in.
- This means that by inserting from a file and parsing that insert you now
- have a primitive (no conditions or loops,...) macro facility within SPHINX:
- just have the insert file contain the input lines as you would type them.
- NOTE: there is one difference between keyboard stroke parsing and insert
- parsing, in an insert, both CR and LF end the input buffer and make it
- available, while in keyboard parsing LF just end the input buffer, but does
- not make it available.
-
- RA-A:
- Inserts again the last clipboard or private insertion as if you had just
- hit RA-I or clipped the text, even if the text is now gone (private text
- was freed, or clipboard file is changed)
- NOTE: does not work with file insertions
-
- - - - - - - - - - - - - - - - - - -
-
- Vertical Movement keystrokes:
- (see also scroll gadget)
-
- SA-UP (shift-alt-UP):
- This scrolls back to the next previous beginning of an input line. This is a
- very usefull keystroke; when you have a short window and have just typed a
- command that returned more text that fitted in the window, pressing SA-UP
- will jump you back to the first text returned by that command. Then you can
- scroll slowly down the text with C-DOWN or A-DOWN.
-
- S-DOWN:
- If we are searching and the cursor is visible, then cancels the search and
- restores the input buffer.
- If the cursor is not in sight, this scrolls just enough to bring it into
- sight.
- If the cursor is already in sight, this scrolls the cursor to the top line of
- the window.
-
- A-UP & A-DOWN:
- Scrolls the window up or down by half the height of the window unless the
- first or last bit of text would be reached, in which case the scroll goes
- only as far as possible. The number of lines to scroll is determined by the
- number of lines visible divided by two, rounded up. This way a one line
- window can still be scrolled.
-
- C-UP & C-DOWN:
- Scrolls the window up or down by one line, unless the first or last bit of
- text has been reached.
-
- SC-S: (Shift-Control-S)
- Disables the automatic scrolling. Now when the window would ordinarily have
- scrolled because text drawn to it had reached the bottom of the window, the
- window will not scroll (and the text will just be "drawn" below what is
- visible in the window; just down arrow to see it when you are ready).
- This is very usefull when you have a program which is writing a lot of lines
- to the window (say, a directory) and you are reading what is at the top of the
- window but the cursor is about to reach the bottom of the window, and so the
- window would scroll. By quickly presing SC-S you keep the window from
- scrolling, and therefore your reading from being interrupted.
- This is canceled by editing the input line in any way (typing a text key,
- inserting or searching), S-DOWN or C-G; RETURN,ENTER,C-J, C-M and C-\ to not
- cancel the auto-scrolling disablement, so you may enter a line of text, press
- SC-S, and then RETURN.
-
- C-S:
- The first time, it stops output to the window, the next it allows it. When
- output is not allowed you may still edit and enter input lines.
- This is most usefull when the non-blocking type ahead is enabled and you
- want to see what you are entering w/o having it jump around ahead of the
- text being outputed.
-
- C-Q & C-G:
- Manually cancels the auto-scroll disable put in place by SC-S, and the output
- stop put in place by C-S.
-
-
- - - - - - - - - - - - - - - - - - -
-
- Spots and Jumping:
-
- F1 to F10:
- These jump the window to a predefined spot. You may program ten of these
- spots.
- When blocks of text are freed, any spots that specified a character in those
- blocks are cleared. The exception is the F10 spot.
- When the jump is done, the character the spot specifies is put in the topmost
- line of the window. (similar to what goes on when the window is resized)
-
-
- S-F1 to S-F9:
- Defines the specified spot by saving the current upper left character.
-
- S-F10:
- Defines the F10 spot by saving the current upper left character. In addition,
- the whole time the F10 spot is defined, a small 10 appears in the lower right
- corner of the undo gadget. The F10 spot operates like the F1 through F9 spots
- with one addition: the automatic and (S)RA-F memory freeing is not allowed to
- free text at or below the character specified by the spot. This way if there
- is some text you would like to keep from being freed automatically, you can
- lock it down by placing the F10 spot at the beginning of that text. (In addi-
- tion, you can jump back to that text by pressing F10).
-
- A-F10:
- Since the F10 spot is not cleared automatically by the memory being freed,
- and if it is not freed, will cause memory to no longer be freed, A-F10 is
- used to free the F10 spot. When the F10 spot is freed, the small 10 in the
- lower right corner of the undo gadget disappears.
-
- - - - - - - - - - - - - - - - - - -
-
- Editing keystrokes:
-
- RETURN, ENTER and C-M (ascii $0d):
- This ends inputing. The current input line is copied elsewhere, input buffer
- is cleared, the undo buffer is cleared, etc..., and makes the input available
- to the program reading from SPHINX (Read()). It appends a LF to the end of
- the current input line.
-
- C-\ (ascii $1c):
- This ends the input line, resets the buffer, etc... just like RETURN, but
- does not append a LF. Then, if the line is not empty, the next read returns a
- zero length read. This way it simulates the EOF (End Of File) of a file
- system file.
-
- C-J (ascii $0a):
- This ends the current input line only, not making it available for input. It
- will be made available when, at the end of some later input line, RETURN or
- C-/ is pressed.
-
- C-Fn:
- If the string correspond to this key (specified in the configuration file)
- is not empty, then that string is inserted at the cursor, as if it had been
- typed in, and then the line is entered, as if RETURN had been pressed.
- If there is not enough room in the input buffer for the string, nothing
- happens.
-
- BACKSPACE, C-H:
- Deletes the character the left of the cursor, if one exists, moving the tail
- of characters and the cursor to the left to fill the gap.
-
- DELETE
- Deletes the character to the right (or under, if a block or underline cursor
- is being used). Again the tail is scrolled in order to fill the gap.
-
- S-BS/C-U:
- Deletes all characters to the left of the cursor.
-
- S-DEL/C-K:
- Deletes all characters to the right (or under and to the right) of the
- cursor.
-
- C-X:
- Deletes everything in the input buffer.
-
- A-BS:
- Deletes the word (or part of word) to the left of the cursor, as defined by
- the configuration delete word characters, or, if there is no word there,
- deletes one character to the left. Does not delete anything to the right of
- the cursor.
-
- A-DEL:
- Deletes the word (or part of word) to the right of the cursor, or, if there
- is no word there, deletes one character to the right. Does not delete
- anything to the left of the cursor.
-
- RIGHT ARROW:
- Moves the cursor one character to the right.
-
- LEFT ARROW:
- Moves the cursor one character to the left.
-
- A-RIGHT/C-RIGHT:
- Moves the cursor to the right until the start of a word is found, as defined
- by the configuration move word characters, or to the end of the input buffer,
- which ever comes first.
-
- A-LEFT/C-LEFT:
- Moves the cursor to the left until the start of a word is found, etc...
- similarly to A-RIGHT.
-
- S-RIGHT/C-Z:
- Moves the cursor to the end of the input buffer.
-
- S-LEFT/C-A:
- Moves the cursor to the beginning of the input buffer.
-
- C-W:
- Moves the cursor to the right to the next "tab stop" (included really for
- NEWCON compatability).
-
- RA-L:
- See also Undo Gadget
- This toggles the literal trigger. When the trigger is loaded, the undo
- gadget's imagery shows an `L', and the next keystroke will be entered
- directly into the input buffer, not interpreted (unless it is an RA-key).
- This way, for example, a Ctrl-X ($18) can be put in the input buffer, instead
- of having it clear the buffer. The literal trigger is unloaded after one
- keystroke has been entered.
-
- SRA-L:
- This does the same thing as RA-L except that when the literal trigger is
- loaded with this keystroke, it is locked: it is not canceled until SRA-L,
- RA-L or UNDO is pressed, instead of being automatically canceled after one
- keystroke has been entered. The undo gadget shows a script `L'.
-
- - - - - - - - - - - - - - - - - - -
-
- Searching keystrokes:
-
- Searching and Search mode are synonymous. They refer to the state in which
- the UNDO GG's picture shows an `S', and the input buffer shows old input. It
- is exited by editing the input line, DOWN ARROWING to the input buffer, or
- SHIFT-DOWN, or UNDO GG/RA-X. When searching, only the newest copy of
- identical input lines is shown to you.
-
- UP ARROW:
- Look at the next higher input line, if one exists.
-
- DOWN ARROW:
- Look at the next lower input line, or, if the input buffer has been reached,
- cancel the searching mode and restore the input buffer.
-
- SHIFT-DOWN/C-B:
- When searching, if the cursor is visible, cancels the search and restores the
- input buffer, like in NEWCON. (see also this key under Vertical Movement)
-
- UNDO GG/RA-X:
- When searching, cancels the search and restores the input buffer.
-
- S-UP/C-R
- This, like in NEWCON, searches back in old input lines. However it is (in my
- biased opinion) a MUCH better implementation of this function.
- First, if we are not searching yet, the input buffer is copied into the
- search buffer. This solves one problem with NEWCON's search, in which you
- have to edit the input line to search back to the second matching line.
- Then I look back in the next older input lines from that which the input
- buffer shows now (so if we have just begun searching, we start with the first
- input line), looking for a line which matches the search line.
- Different sorts of comparisons are done depending on what the search line
- consists of:
- First, if all the alphabetic characters (A-Z) in the search line are uppercase
- then all comparisons are done on a case insensitive basis, instead of on a
- case sensitive basis.
- 1) If the search line contains any of the wildcard characters, which are
- *#?(|){}^[], and the arp.library is avialable (and PreParse() says that
- the search line is a wildcard pattern) then only a wildcard comparison
- is tried, and if it is successfull then I stop.
- then
- 2) If the first characters of the line are exactly those in the search line
- then I stop (NEWCON style search)
- and
- 3) If there are more than MaxLiteralCmpChars in the search line, then if
- the line passes the fragment comparison then I stop.
-
- If no lines are found which match, then the display does not change.
-
- Thus if MaxLiteralCmpChars was 3 and we had the two old input lines:
- Dir INC:intuition/
- dir inc:Intuition/
- then a search line of
- DIR
- would produce a case insensative NEWCON style comparison, and both old input
- lines would match, while
- Dir
- would be considered case sensative, and only the first old input line would
- match.
- dirintui
- ,since it has more then 3 characters, also produce a fragment comparison, and
- the second line would match (dir inc:Intuition/)
- dir in tui
- DIR#?INTUITION
- would cause case insensitive NEWCON style comparisons, fragment comparisons
- and (if arp.library is available) wildcard comparisons to be tried, and the
- case insensitive wildcard comparisons would say that both old lines match.
-
-
- The easiest way to describe the fragment comparision is to describe what it
- looks for: it looks for fragments of the search line in the line being
- tested. These fragments may be as small as one character, and must appear in
- the same order in the line being compared as in the search line. This
- allows you to type in fragments of the line(s) you seek, and then look back
- at those which match by repeatedly pressing S-UP. example:
- If you have these three old input lines:
- dir intuition/
- run v include/intuition/intuition.i
- dirintuition/
- and you typed
- dirintui
- and then pressed S-UP, the third line will be returned, since its first 8
- characters match exactly with the search line. Another press of S-UP will
- return the first line, because the search line can be broken up into
- fragments that can be found, in the same order, in that line: `dir' and
- `intui'.
-
- This gives you a sort of wildcard comparision without wildcards, since the
- search line is treated as having a `*' (or `#?' for the Amiga purists)
- between each of its characters.
-
- NOTE: any characters are allowed in the search line.
-
- - - - - - - - - - - - - - - - - - -
-
- Special keystrokes:
-
- RA-F
- This frees the oldest block of saved text that can be freed. This overrides
- the MaxMemory and MaxBlocks, but no other conditions See
- MaximumKiloBytesOfWrite/InputToSave and MaximumNumberOfWrites/InputsToSave
- (section III).
- This is the only RA-key that repeats at all. Like all other keys, it does not
- repeat after it is released.
-
- SRA-F
- This frees all the blocks of saved text that can be freed. Therefore this
- should be used when you wish to free some memory and you dont need what is
- going to be freed, like when you are switching to doing something else. This
- is equivalent to holding down RA-F until everything is freed.
- Use Spot 10 and/or the top line of the window to control just how much is
- freed.
-
- RA-O:
- Opens the window to the full size of the screen, but does not change its
- depth arrangement, or, once it was been used and the window is still the
- full size of the screen, shrinks the window back down to its previous
- size.
-
- RA-C:
- Opens the configuration window.
-
- - - - - - - - - - - - - - - - - - -
-
-