home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / textedit / auror111.zip / AML.DOC < prev    next >
Text File  |  1993-11-07  |  164KB  |  4,454 lines

  1.  
  2.  
  3.  
  4.   T h e   A u r o r a   M a c r o   L a n g u a g e   G u i d e
  5.   ─────────────────────────────────────────────────────────────
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.   The Aurora Macro Language Guide
  16.  
  17.   Version 1.11, November 1993  (unregistered)
  18.  
  19.   Copyright (c) 1993 Aurora Terra, Inc.
  20.  
  21.   ALL RIGHTS RESERVED.
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.   Aurora Terra, Inc.
  29.   P.O. Box 34275
  30.   Bethesda, MD. 20827-0275  USA
  31.   (301)-468-2255
  32.  
  33.  
  34.  
  35.   The Aurora Editor is Copyright (c) 1993 by Aurora Terra, Inc.
  36.   The Aurora Editor/386 is Copyright (c) 1993 by Aurora Terra, Inc.
  37.   The Aurora Macro Language is Copyright (c) 1993 by Aurora Terra, Inc.
  38.  
  39.   No parts of The Aurora Editor software or this document may be copied
  40.   in part or in whole, except as provided by the License in the
  41.   following pages.
  42.  
  43.   This version of The Aurora Editor is NOT public domain or free
  44.   software, but is distributed as "shareware" for evaluation purposes
  45.   only. Please refer to the license information in the following pages.
  46.  
  47.   The Aurora Editor is a trademark of Aurora Terra, Inc.
  48.   The Aurora Editor/386 is a trademark of Aurora Terra, Inc.
  49.   The Aurora Macro Language is a trademark of Aurora Terra, Inc.
  50.  
  51.   Other product names found throughout this document are trademarks of
  52.   various companies.
  53.                                                   Table of Contents   ii
  54.  
  55.  
  56.   Table of Contents
  57.   ─────────────────
  58.  
  59.   I-1  Introduction..................................................iii
  60.  
  61.   1-1  The Aurora Macro Language.......................................1
  62.   1-2  Macro Language Sentences........................................2
  63.   1-3  Comments........................................................3
  64.   1-4  Evaluating Arguments............................................3
  65.   1-5  Function Call Series............................................4
  66.   1-6  Variables.......................................................5
  67.   1-7  Native Functions................................................6
  68.   1-8  Defining Functions..............................................8
  69.   1-9  Control Functions..............................................10
  70.   1-10  Logical Functions.............................................11
  71.   1-11  Objects.......................................................12
  72.   1-12  Handling Events...............................................14
  73.   1-13  The Interpreter and Compiler..................................16
  74.  
  75.   2-1  Native Function List...........................................17
  76.  
  77.   3-1  Native Functions - In Detail...................................24
  78.   3-2  Definition Functions...........................................25
  79.   3-3  Conditional Functions..........................................26
  80.   3-4  Logical Functions..............................................27
  81.   3-5  Bitwise Logical Functions......................................27
  82.   3-6  Control Functions..............................................28
  83.   3-7  Arithmetic Functions...........................................28
  84.   3-8  String Functions...............................................29
  85.   3-9  Evaluation and Compilation Functions...........................32
  86.   3-10  Miscellaneous Functions.......................................33
  87.   3-11  Object Functions..............................................34
  88.   3-12  Disk Functions................................................36
  89.   3-13  System Functions..............................................41
  90.   3-14  Timer Functions...............................................44
  91.   3-15  Keyboard Functions............................................45
  92.   3-16  Mouse Functions...............................................47
  93.   3-17  Queue Functions...............................................48
  94.   3-18  Video Functions...............................................50
  95.   3-19  Text Buffer Functions.........................................53
  96.   3-20  Mark Functions................................................61
  97.   3-21  Window Functions..............................................70
  98.  
  99.   A-1  The Aurora Macro Language and The Aurora Editor................85
  100.  
  101.                                                        Introduction  iii
  102.  
  103.  
  104.   Warranty Disclaimer
  105.   ───────────────────
  106.  
  107.   Aurora Terra makes no warranty of any kind, either express or implied,
  108.   including but not limited to implied warranties of merchantability and
  109.   fitness for a particular purpose, with respect to this software and
  110.   accompanying documentation.
  111.  
  112.   IN NO EVENT SHALL AURORA TERRA BE LIABLE FOR ANY DAMAGES RESULTING
  113.   FROM THE USE OF THIS SOFTWARE, INCLUDING BUT NOT LIMITED TO, DAMAGES
  114.   FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
  115.   INFORMATION, INCIDENTAL OR CONSEQUENTIAL DAMAGES, OR OTHER FINANCIAL
  116.   LOSS ARISING OUT OF THE USE OF OR INABILITY TO USE THIS PROGRAM, EVEN
  117.   IF AURORA TERRA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  118.  
  119.  
  120.   I-1  Introduction
  121.   ─────────────────
  122.  
  123.   This is The Aurora Macro Language Guide. It describes all of the
  124.   features and native functions of The Aurora Macro Language. Prior
  125.   knowledge of another programming language such as C or Pascal may be
  126.   helpful in understanding this document.
  127.  
  128.   For information on how to install, configure, and use The Aurora
  129.   Editor, see "The Aurora Editor Users Guide".
  130.  
  131.   It is not necessary to understand all the details of the Aurora Macro
  132.   Language to use The Aurora Editor. However, experienced users may find
  133.   the macro language to be very useful for writing new editor functions,
  134.   or in configuring detailed aspects of the editor. Knowledge of the
  135.   macro language may also help you to better understand the keyboard
  136.   definition (AKBD.A), menu definition (AMEN.A), and configuration
  137.   (ACFG.A) files for The Aurora Editor.
  138.  
  139.   This document describes macro language "native" functions which are
  140.   built in to The Aurora Macro Language. The Aurora Editor also uses
  141.   many "library functions" which are built up from native functions and
  142.   are contained in the file ALIB.X. Library functions are documented in
  143.   The Aurora Editor Users Guide (A.DOC), and summarized in The Aurora
  144.   Editor Quick Reference (AREF.DOC).
  145.                                            The Aurora Macro Language   1
  146.  
  147.  
  148.   1-1  The Aurora Macro Language
  149.   ──────────────────────────────
  150.  
  151.   The Aurora Macro Language is a flexible, interpreted language, which
  152.   is simple in syntax, yet rich in function. A primary design goal was
  153.   to keep the macro language interpreter and compiler small enough so
  154.   they would fit in the same .EXE file as the rest of the editor. This
  155.   allows the editor to execute macro language expressions interactively
  156.   within an editor session, and greatly enhances the overall flexibility
  157.   of the editor. Both the interpreter and compiler are accessible as
  158.   native functions within the macro language itself.
  159.  
  160.   The Aurora Macro Language may appear somewhat similar to LISP in
  161.   syntax, but the resemblance ends there. The Aurora Macro Language is
  162.   primarily a "string-oriented" language with "the string" as the only
  163.   visible data type. All functions and data are viewed as character
  164.   strings and can be manipulated as character strings. Since there is
  165.   only one data type, no variable declarations are required.
  166.  
  167.   The Aurora Macro language is also "object-oriented". Functions and
  168.   data can be encapsulated into "objects", and object hierarchies can be
  169.   created with "inheritance" and "multiple inheritance". Inheritance
  170.   hierarchies can also be dynamically altered.
  171.  
  172.  
  173.   1-2  Macro Language Sentences
  174.   ─────────────────────────────
  175.  
  176.   Each program in written in The Aurora Macro Language is really just a
  177.   string composed of a series of macro language "sentences". Each
  178.   sentence is composed of a series of "words" separated by spaces, and
  179.   each sentence is usually terminated by a period. The first word in
  180.   each sentence is the name of a function to execute, and any words that
  181.   follow are arguments to the function. For example:
  182.  
  183.     abc 1 2 3.
  184.     xyz "foo" "bar" x.
  185.  
  186.   In the above example, two sentences are evaluated. The arguments "1",
  187.   "2", and "3" are passed to the function "abc", and the strings "foo",
  188.   "bar", and the variable "x" are passed to the function "xyz".
  189.  
  190.   Function names can be up to 255 characters in length and may contain
  191.   any characters. You can use "native" (built-in) functions, or define
  192.   your own functions.
  193.                                             Macro Language Sentences   2
  194.  
  195.  
  196.   A function can have up to 100 arguments, or no arguments at all.
  197.   Arguments to a function may be integers from -2147483647 to
  198.   +2147483647, strings enclosed in double quotes, variables, or even
  199.   other sentences.
  200.  
  201.   Hex integers can be specified by adding an "h" at the end of the
  202.   integer. A leading zero is required if the hex integer begins with an
  203.   alphabetic character. For example, "1h", "3CH", and "0FFFFh" are valid
  204.   hex integers.
  205.  
  206.   Strings may be up to 16000 characters in length, and variable names
  207.   may be up to 255 characters in length.
  208.  
  209.   If an argument to a function is another sentence, it must be enclosed
  210.   in parentheses:
  211.  
  212.     abc 1 (xyz "foo" "bar" x) 3.
  213.  
  214.   In the above example, the arguments "foo", "bar", and the value of the
  215.   variable "x" are passed to the function "xyz". The result of
  216.   evaluating "xyz" becomes the second argument to the function "abc".
  217.   Note that a terminating period is not required for the sentence
  218.   beginning with "xyz" since it is already terminated by a right
  219.   parenthesis.
  220.  
  221.   An argument may also be composed of more than one sentence. In this
  222.   case, the value of the argument is the value of the last sentence:
  223.  
  224.     abc 1 (alpha "foo" "bar". beta. gamma 5 6) 3.
  225.  
  226.   In the above example, the value of the second argument to "abc" is the
  227.   result of evaluating the sentence "gamma 5 6".
  228.  
  229.   A sentence may be spread out over more than one line and spaces may be
  230.   inserted anywhere in the sentence, as long as the words in the
  231.   sentence are not split. The above example could also be written as:
  232.  
  233.     abc 1 (
  234.       alpha "foo" "bar".
  235.       beta.
  236.       gamma 5 6
  237.     )  3.
  238.                                                             Comments   3
  239.  
  240.  
  241.   1-3  Comments
  242.   ─────────────
  243.  
  244.   Single line and multi-line comments can be inserted anywhere within a
  245.   macro language program. In a single line comment, any characters
  246.   located between two slashes (//) and the end of the line are ignored
  247.   (except if they are contained within a double quoted string). For
  248.   example:
  249.  
  250.     abc 1 2 3.           // this is a single line comment
  251.     xyz "foo" "bar" x.   // this is another single line comment
  252.  
  253.   Multi-line comments can span any number of lines. For multi-line
  254.   comments, any characters located between the comment delimiters "/*"
  255.   and "*/" are ignored. For example:
  256.  
  257.     abc 1 2 3.
  258.        /* this is a
  259.           multi-line comment */
  260.     xyz "foo" "bar" x.
  261.  
  262.  
  263.   1-4  Evaluating Arguments
  264.   ─────────────────────────
  265.  
  266.   When the interpreter evaluates a macro language sentence, each
  267.   argument in the sentence is evaluated from first to last. The
  268.   resulting values for each argument are passed to the function (the
  269.   first "word" in the sentence) and the function is evaluated. For
  270.   example:
  271.  
  272.     abc 1 "foo" x (xyz 5 6).
  273.  
  274.   In the above macro language sentence, the first argument evaluates
  275.   to "1", the second argument evaluates to "foo", the third argument
  276.   evaluates to value of the variable "x", and the fourth argument
  277.   evaluates to the value of the sentence "xyz 5 6".
  278.  
  279.   You can prevent the evaluation of an argument by prefixing it with
  280.   the "literal" operator (%). For example:
  281.  
  282.     abc 1 "foo" %x (xyz 5 6).
  283.  
  284.   The difference between the above example and the previous example is
  285.   that the third argument is now the string "x", not the variable "x" (x
  286.   is not evaluated). As you can see from the above example, using the
  287.   literal operator (%) can also be a convenient way to specify string
  288.   arguments (that contain no blanks), without enclosing the string in
  289.   double quotes.
  290.                                                 Evaluating Arguments   4
  291.  
  292.  
  293.   If all of the function arguments are prefixed with the literal (%)
  294.   operator, you can remove the literal operator from the arguments and
  295.   attach it to the end of the function name. For example:
  296.  
  297.     xyz %foo %bar %x.
  298.  
  299.       is equivalent to:
  300.  
  301.     xyz% foo bar x.
  302.  
  303.   In both the examples above, the strings "foo", "bar", and "x" are
  304.   passed to the function "xyz". Note that some native functions in the
  305.   macro language (such as the "fun" function) do not normally evaluate
  306.   their arguments. These functions automatically assume that all
  307.   arguments are "literal", without having to use the literal operator.
  308.  
  309.   The inverse of the literal operator is the "evaluation" operator (@).
  310.   This operator forces evaluation of an argument, even when the function
  311.   name is suffixed with the literal operator (%). For example:
  312.  
  313.     xyz% foo bar @x.
  314.  
  315.   In the example above, the third argument evaluates to the value of the
  316.   variable "x", not the string "x". The first and second arguments still
  317.   evaluate to the strings "foo" and "bar".
  318.  
  319.   Both the literal operator (%) and the evaluation operator (@) can be
  320.   used to specify "null" arguments (strings of zero length) when they
  321.   are specified by themselves. For example:
  322.  
  323.     xyz @ % %foobar.
  324.  
  325.   In the example above, the first and second arguments are "null"
  326.   strings, and the third argument is the string "foobar".
  327.  
  328.  
  329.   1-5  Function Call Series
  330.   ─────────────────────────
  331.  
  332.   In many programming languages, the situation often arises where the
  333.   same function is called many times in series, each time with different
  334.   arguments. The Aurora Macro Language provides a convenient way to
  335.   handle this situation: just specify the function name once and then
  336.   specify each set of arguments separated by commas. For example:
  337.  
  338.     abc 1 2 3.
  339.     abc 4 5 6.
  340.     abc 7 8 9.
  341.                                                 Function Call Series   5
  342.  
  343.  
  344.       is equivalent to:
  345.  
  346.     abc 1 2 3, 4 5 6, 7 8 9.
  347.  
  348.  
  349.   1-6  Variables
  350.   ──────────────
  351.  
  352.   The Aurora Macro Language allows you to assign values to variables
  353.   which are local to a function definition, or that reside in a macro
  354.   language "object" (see the "Defining Functions" and "Objects" sections
  355.   below for a description of function definitions and objects).
  356.  
  357.   Variables local to a function are referred to as "local" variables,
  358.   whereas variables that reside in an object are referred to as "object"
  359.   variables. There is no need to define either of these variables. Both
  360.   variable types are defined the first time a variable assignment is
  361.   made.
  362.  
  363.   The native function "=" is used to assign a value to a local variable.
  364.   For example:
  365.  
  366.     = %x 3.    // local variable x is assigned a value of "3"
  367.  
  368.   Note that in the example above, the argument "x" must be preceded by
  369.   the literal operator (%), otherwise the VALUE of the variable "x"
  370.   (instead of the variable "x") would be assigned the value "3".
  371.   The above example could also have been written as:
  372.  
  373.     = "x" 3.   // local variable x is assigned a value of "3"
  374.  
  375.   Local variable assignments exist until they are re-assigned or until
  376.   the function in which they are contained returns.
  377.  
  378.   To assign a value to a "object" variable, use the "set" native
  379.   function. The assignment will be made in the "default" object, unless
  380.   an object name is explicitly specified between two slash (/)
  381.   characters. For example:
  382.  
  383.     set %x 3.          // object variable x in the "default" object is
  384.                        //   assigned the value "3"
  385.     set %/aurora/x 3.  // object variable x in the object "aurora" is
  386.                        //   assigned the value "3"
  387.  
  388.   Object variable assignments exist until they are re-assigned or until
  389.   the object in which they are located is destroyed. Since object
  390.   variable assignments can remain in effect across function calls, they
  391.   are considered to be "global" variables.
  392.                                                            Variables   6
  393.  
  394.  
  395.   These are more examples of variable assignments:
  396.  
  397.     =% x foobar.            // assigns "foobar" to local variable x
  398.     = %i x.                 // assigns the value of x to local var i
  399.     = %i (abc 3 x).         // assigns the value of the expression
  400.                             //   "abc 3 x" to local variable i
  401.  
  402.     set% x foobar.          // assigns "foobar" to object variable x
  403.                             //   (in the default object)
  404.     set %x y.               // assigns the value of y to object var x
  405.     set %x (xyz).           // assigns the value of the function
  406.                             //   "xyz" to object variable x
  407.     set (xyz) %x.           // assigns "x" to the variable name which
  408.                             //   is the value of function "xyz"
  409.     set %/aurora/x y.       // assigns the value of y to object var x
  410.                             //   in the object "aurora"
  411.  
  412.   When a reference is made to a variable which has never been assigned a
  413.   value (a "non-existent" variable), the value of that variable is
  414.   always the "null" string (a string of length zero).
  415.  
  416.   Note that when variables are referenced, local variables have higher
  417.   precedence than object variables. For example:
  418.  
  419.     = %x 4.
  420.     set %x 5.
  421.     abc x.
  422.  
  423.   In the example above, the value "4" will be passed to the function
  424.   "abc". The argument "x" to function "abc" refers to the local variable
  425.   "x", not the object variable "x".
  426.  
  427.  
  428.   1-7  Native Functions
  429.   ─────────────────────
  430.  
  431.   The Aurora Macro Language has hundreds "native" functions, which are
  432.   pre-defined or "built-in". A few commonly used native functions may be
  433.   used in later examples and are worth mentioning briefly here:
  434.  
  435.  
  436.   Conditional:
  437.  
  438.     eq     returns "1" if all of its arguments are equal, otherwise
  439.            it returns the null string.
  440.  
  441.     ne     returns "1" if all of its arguments are not equal,
  442.            otherwise it returns the null string.
  443.                                                     Native Functions   7
  444.  
  445.  
  446.     >      returns "1" if each of its arguments is numerically
  447.            greater than the argument which follows, otherwise it
  448.            returns the null string.
  449.  
  450.     <      returns "1" if each of its arguments is numerically less
  451.            than the argument which follows, otherwise it returns the
  452.            null string.
  453.  
  454.  
  455.   Arithmetic:
  456.  
  457.     +      returns the numeric sum of all of its arguments.
  458.  
  459.     -      if only one argument is specified, it returns the numeric
  460.            negative of the argument, otherwise it returns the value of
  461.            the first argument minus all the arguments which follow.
  462.  
  463.     *      returns the numeric product of all of its arguments.
  464.  
  465.     /      returns the value of the first argument divided by all the
  466.            arguments which follow.
  467.  
  468.  
  469.   String:
  470.  
  471.     cat    concatenates all of its arguments and returns the result.
  472.  
  473.     sub    returns the substring of its first argument taken from the
  474.            position of the second argument and extending for the
  475.            length of the third argument.
  476.  
  477.     fin    searches for the second argument inside the first argument
  478.            and returns the position if found, otherwise it returns
  479.            null.
  480.  
  481.  
  482.   Other:
  483.  
  484.     beep   beeps the PC speaker at the frequency of the first argument
  485.            for the duration of the second argument.
  486.  
  487.  
  488.   Library:
  489.  
  490.     say    displays a message on the window title bar (this function is
  491.            documented in "The Aurora Editor Users Guide").
  492.                                                   Defining Functions   8
  493.  
  494.  
  495.   1-8  Defining Functions
  496.   ───────────────────────
  497.  
  498.   The Aurora Macro Language has many native functions which are
  499.   pre-defined when a macro language program is evaluated. No further
  500.   definitions are required to use native functions.
  501.  
  502.   To create your own functions, you must first define them with the
  503.   native function "fun". For example:
  504.  
  505.     fun  hello (
  506.       say "hello".
  507.       beep 300 300.
  508.     ).
  509.  
  510.   In the example above, the function "hello" is defined. Note that the
  511.   native function "fun" automatically assumes that both its arguments
  512.   are literal. The literal operator (%) is not required. Also note that
  513.   the definition of "hello" is a macro language "sentence", and
  514.   therefore requires a terminating period.
  515.  
  516.   Arguments passed to user-defined functions can be accessed with the
  517.   the "arg" and "qarg" native functions. The "arg" native function maps
  518.   any arguments passed to the function to local variables within the
  519.   function. For example:
  520.  
  521.     fun  hello (
  522.       arg s f.
  523.       say s.
  524.       beep f 300.
  525.     ).
  526.  
  527.   In the example above, the local variables "s" and "f" are mapped to
  528.   the first two arguments passed to "hello". The variables "s" and "f"
  529.   can then be used in any expression within the function. This does not
  530.   mean that exactly two arguments must always be passed to "hello". Any
  531.   number of arguments may be passed to any function. If only one
  532.   argument were passed to the function "hello" in the example above, the
  533.   value of the local variable "f" would be the null string. If three
  534.   arguments were passed to "hello", the third argument would not be
  535.   accessible as a local variable.
  536.  
  537.   The "qarg" native function allows you access function arguments by the
  538.   order in which they where passed. The "qarg" function takes one
  539.   argument: the relative position of the argument being passed to the
  540.   function. The following example is equivalent to the previous example:
  541.                                                   Defining Functions   9
  542.  
  543.  
  544.     fun  hello (
  545.       say (qarg 1).
  546.       beep (qarg 2) 300.
  547.     ).
  548.  
  549.   Note that "qarg 0" will return total number of arguments passed to the
  550.   function.
  551.  
  552.   Remember that you can call any function with any number of arguments
  553.   at any time. The number of arguments is always determined by the
  554.   function call, not the function.
  555.  
  556.   It is also possible to call non-existent or undefined functions.
  557.   Calling an undefined function will always return the value of the last
  558.   argument passed to the undefined function. Calling a defined function
  559.   returns the value of the last sentence in the function. For example:
  560.  
  561.     fun  abc (
  562.       arg x y.
  563.       dothis 1 x.
  564.       dothat 2 y.
  565.       hello x y.
  566.     ).
  567.  
  568.     abc "hello world" 300.
  569.  
  570.   In the example above, the function "abc" is defined and then called
  571.   with the arguments "hello world" and "300". The return value of the
  572.   call to "abc" would be the result of evaluating the last sentence
  573.   "hello x y". If the function "hello" is not defined, the return value
  574.   of "abc" would be "300".
  575.  
  576.   It is also possible to call the "null" function by using the literal
  577.   operator (%) or the evaluation operator (@) as the function name.
  578.   Since the null function is not defined, it always returns the value of
  579.   the last argument passed to it. This can be useful for returning
  580.   variables or constant values from a function. For example:
  581.  
  582.     fun  xyz (
  583.       = %x 3.
  584.       % x.
  585.     ).
  586.  
  587.     set %y (xyz).
  588.  
  589.   In the example above, the function "xyz" is defined and then called
  590.   with no arguments. The function "xyz" assigns "3" to the local
  591.   variable "x" and then returns the value of "x" (3). The object
  592.   variable "y" is then assigned a value of "3".
  593.                                                   Control Functions   10
  594.  
  595.  
  596.   1-9  Control Functions
  597.   ──────────────────────
  598.  
  599.   There are several native functions which can be used to control the
  600.   flow of execution of a macro language program. Note that no special
  601.   syntax is required to use control functions. They are treated just
  602.   like any other function. The difference between control functions and
  603.   other functions is that not all of the arguments to a control function
  604.   are always evaluated.
  605.  
  606.   Perhaps the most commonly-used control function is the "if" function.
  607.   The first argument of the "if" function is always evaluated. If the
  608.   first argument does not evaluate to zero or null, then the second
  609.   argument is evaluated, otherwise the third argument is evaluated. The
  610.   return value of the "if" function is the value of the second or third
  611.   argument, depending on which one is evaluated. For example:
  612.  
  613.     if x (abc) (xyz).
  614.  
  615.   In the example above, if the variable x is "0" or null, then the
  616.   function "xyz" is evaluated, otherwise the function "abc" is
  617.   evaluated.
  618.  
  619.   "Conditional" native functions such as "eq" are often used with the
  620.   "if" function. For example:
  621.  
  622.     if (eq s "yes") (
  623.       = %x 1.
  624.       beep 700 200.
  625.     )(
  626.       = %x 2.
  627.       beep 200 200.
  628.     ).
  629.  
  630.   In the example above, if the variable "s" is equal to "yes", the value
  631.   "1" is assigned to local variable "x" and a high-pitched beep is
  632.   heard. If "s" is not equal to "yes", the value "2" is assigned to "x"
  633.   and low-pitched beep is heard.
  634.  
  635.   The "if" function can be used anywhere that any other function can be
  636.   used. For example:
  637.  
  638.     = %x (if (eq s "no") "nope" "yup").
  639.  
  640.   In the example above, if "s" is equal to "no", then the value "nope"
  641.   is assigned to "x", otherwise the value "yup" is assigned to "x".
  642.                                                   Control Functions   11
  643.  
  644.  
  645.   The "while" and "dowhile" functions are control functions which can be
  646.   used to perform looping operations. The "while" function will evaluate
  647.   its first and second arguments repeatedly while its first argument
  648.   is "true" (non-null and non-zero). For example:
  649.  
  650.     = %x 1000.
  651.     while x (
  652.       beep x 200.
  653.       = %x (- x 100).
  654.     ).
  655.  
  656.   In the example above, the PC speaker will beep 10 times, each time
  657.   with decreasing frequency.
  658.  
  659.   The "dowhile" function is similar to the "while" function, except that
  660.   the first and second arguments are evaluated repeatedly until the
  661.   second argument evaluates to "false" (null or zero). The following
  662.   example is equivalent to the previous example:
  663.  
  664.     = %x 1000.
  665.     dowhile (
  666.       beep x 200.
  667.       = %x (- x 100).
  668.     ) x.
  669.  
  670.  
  671.   1-10  Logical Functions
  672.   ───────────────────────
  673.  
  674.   The logical functions test the logical values of their arguments to
  675.   return either "1" (true) or null (false). Like the control functions
  676.   (see above), not all of the arguments to a logical function are always
  677.   evaluated.
  678.  
  679.   The following logical functions are available:
  680.  
  681.     and    returns "1" if all its arguments evaluate to "true"
  682.            (non-null and non-zero). If an argument does not evaluate
  683.            to "true", then no more arguments are evaluated.
  684.  
  685.     or     returns "1" if at least one of its arguments evaluate to
  686.            "true". No more arguments are evaluated after the first
  687.            "true" argument is found.
  688.  
  689.     !      returns "1" if all of its arguments evaluate to "false",
  690.            otherwise it returns null. All arguments are evaluated.
  691.  
  692.   The following example demonstrates the use of logical functions:
  693.                                                   Logical Functions   12
  694.  
  695.  
  696.     if (and ((eq x 3) (or y z))) (beep 400 400).
  697.  
  698.   In the example above, a beep is heard only if the variable "x" is "3",
  699.   and at least one of the variables "y" or "z" are true (non-null and
  700.   non-zero).
  701.  
  702.  
  703.  
  704.   1-11  Objects
  705.   ─────────────
  706.  
  707.   In The Aurora Macro Language, an object is a user-defined group of
  708.   function definitions and variable assignments. Each object has a name
  709.   (up to 255 characters). By default, all object variables and functions
  710.   are placed in the pre-defined object "a". The object "a" is
  711.   automatically created by the interpreter whenever a macro language
  712.   program is evaluated.
  713.  
  714.   To create a new object, you must use the native function "objnew". For
  715.   example:
  716.  
  717.     objnew% aurora 17.
  718.  
  719.   In the example above, a new object called "aurora" will be created.
  720.   The object "aurora" will have an estimated size of 17 function
  721.   definitions and/or variable settings (this size estimate is used by
  722.   the interpreter to create an optimized internal index).
  723.  
  724.   To add functions or variable assignments to the object you created,
  725.   use the "obj" native function:
  726.  
  727.     obj  aurora  (
  728.  
  729.       set %x 1.        // assign 1 to variable x in object "aurora"
  730.       set %y 2.        // assign 2 to variable y in object "aurora"
  731.  
  732.       fun  abc (       // define function "abc" in object "aurora"
  733.         say "abc".
  734.       ).
  735.  
  736.       fun  xyz (       // define function "xyz" in object "aurora"
  737.         say "xyz".
  738.       ).
  739.  
  740.     ).
  741.  
  742.   In the example above, any variable assignments or function definitions
  743.   within the scope of the "obj" sentence will be added to the object
  744.   "aurora" (the default object is "aurora" inside the obj sentence).
  745.   Variable assignments or functions definitions made outside the scope
  746.   of the "obj" sentence would be added to the default object "a".
  747.                                                             Objects   13
  748.  
  749.  
  750.   Like the "fun" native function, the "obj" native function assumes that
  751.   all its arguments are literal. The literal operator (%) is not
  752.   required.
  753.  
  754.   An object can "inherit" the functions and variable assignments of
  755.   other objects by grouping them together in "inheritance paths". When a
  756.   reference to function or variable is made, and it is not found in the
  757.   current "default" object, then the object's inheritance path is
  758.   searched until the reference is found. This mechanism works similar to
  759.   the way the DOS "PATH" environment variable is searched when executing
  760.   DOS programs, except that it is also possible to create hierarchal
  761.   search paths.
  762.  
  763.   The searching of inheritance paths is performed automatically by the
  764.   macro language interpreter and is transparent to any function call or
  765.   variable reference. Note that "native" functions are always accessible
  766.   from within any object.
  767.  
  768.   The inheritance path or "ancestry" of an object can be defined when
  769.   the object is created with the "objnew" command. For example:
  770.  
  771.     objnew% aurora 17 obj1 obj2.
  772.  
  773.   In the example above, the object "aurora" is created and assigned the
  774.   inheritance path "obj1 obj2". When a reference to a function or
  775.   variable in the object "aurora" fails, the objects "obj1" and "obj2"
  776.   are searched for the reference (in the order they are specified). In
  777.   this way the object "aurora" is said to "inherit" the functions and
  778.   object variables of "obj1" and "obj2". Using inheritance, the object
  779.   "aurora" appears to contain all of the functions and variables of
  780.   "obj1" and "obj2". Note that the objects "obj1" and "obj2" may also
  781.   have inheritance paths. In this way, hierarchal inheritance paths can
  782.   be established.
  783.  
  784.   Consider the following example:
  785.  
  786.     objnew% obj1 1, obj2 1.
  787.     objnew% aurora 3 obj1 obj2.
  788.  
  789.     obj  obj1 (
  790.       set% s hello.
  791.     ).
  792.  
  793.     obj  obj2 (
  794.       fun  hello (
  795.         arg x y.
  796.         say x.
  797.         beep y 300.
  798.       ).
  799.     ).
  800.                                                             Objects   14
  801.  
  802.  
  803.     obj  aurora (
  804.       hello s 400.
  805.     ).
  806.  
  807.   In the example above, the function "hello" is called with the
  808.   arguments "s" and "400". Since there is no function "hello" in the
  809.   object "aurora", the inheritance path for "aurora" is searched and
  810.   "hello" is found in "obj2". Also, since object "aurora" has no
  811.   variable "s", the inheritance path is searched and "s" is found in
  812.   "obj1".
  813.  
  814.   Object inheritance paths can also be changed dynamically via the
  815.   "objpar" native function. For example:
  816.  
  817.     objpar% aurora obj3 obj4.
  818.  
  819.   In the example above, the inheritance path for the object "aurora" is
  820.   changed to "obj3 obj4".
  821.  
  822.  
  823.   Functions and variables in other objects can be referenced directly by
  824.   specifying the object name between slash (/) characters immediately
  825.   before the function name or variable name. For example:
  826.  
  827.     abc 1 2 /aurora/x.     // variable x in object "aurora"
  828.  
  829.     /obj2/xyz "foobar".    // function "xyz" in object "obj2"
  830.  
  831.  
  832.  
  833.   1-12  Handling Events
  834.   ─────────────────────
  835.  
  836.   Event Handling is a built-in feature of The Aurora Macro Language.
  837.   When an external or internal event occurs (a keystroke, mouse event,
  838.   or timer event), it is posted to the interpreter event queue. The next
  839.   time the interpreter is idle, it will read the event from the event
  840.   queue, translate it into a pre-defined function name (with arguments
  841.   if applicable), and attempt to call the function. If the user has
  842.   properly defined a function with the same pre-defined function name,
  843.   the user's function will be called automatically by the interpreter.
  844.  
  845.   When the interpreter calls the user's function, it will always look
  846.   for the function in the current "event object" (the event object is
  847.   not necessarily the same object as the default object). Only one
  848.   object can be the event object at any given time. When a macro
  849.   language program is initially evaluated, the event object is the
  850.   default object "a", but that can be changed at any time by the program
  851.   (see below).
  852.                                                     Handling Events   15
  853.  
  854.  
  855.   If the function is not found in the event object, the interpreter will
  856.   search the event object's inheritance path for the event function. In
  857.   this way, an object inherits the event-handling capabilities of its
  858.   ancestor objects.
  859.  
  860.   It is often useful to change the entire behavior of the keyboard and
  861.   mouse simply by making another object the event object. For example,
  862.   when you switch from a File Manager window to an Edit window, The
  863.   Aurora Editor simply changes current event object, and a whole
  864.   different set of keyboard functions and mouse functions become active.
  865.  
  866.   To change the current event object, use the native function "objeve":
  867.  
  868.     objeve %aurora2.
  869.  
  870.   In the example above, the object "aurora2" becomes the current event
  871.   object.
  872.  
  873.  
  874.   You can place your own user-generated events in the interpreter event
  875.   queue using the native function "que". For example:
  876.  
  877.     que% xyz 1 3.
  878.  
  879.   In the example above, the function call "xyz 1 3" is placed on the
  880.   interpreter event queue. The next time the interpreter is idle, it
  881.   will read "xyz 1 3" from the event queue and evaluate it in the
  882.   current event object, just like a keyboard or mouse event.
  883.  
  884.   User-generated events can also be directed to an explicitly specified
  885.   object (other than the event object), by using the native function
  886.   "queobj". For example:
  887.  
  888.     queobj% aurora xyz 1 3.
  889.  
  890.   In the example above, "xyz 1 3" is placed on the interpreter event
  891.   queue. However, when the interpreter later reads "xyz 1 3" from the
  892.   event queue, it will force the evaluation of "xyz 1 3" to occur in the
  893.   object "aurora", not in the current event object.
  894.  
  895.   The native functions "send" and "sendobj" work just like "que" and
  896.   "queobj" above, except that the interpreter event queue is bypassed.
  897.   The functions specified in "send" and "sendobj" are always called
  898.   immediately. For example:
  899.  
  900.     send% xyz 1 3.
  901.     sendobj% aurora abc 5 7.
  902.                                                     Handling Events   16
  903.  
  904.  
  905.   In the examples above, "xyz 1 3" is evaluated immediately in the
  906.   current event object, and "abc 5 7" is evaluated immediately in the
  907.   object "aurora".
  908.  
  909.  
  910.   1-13  The Interpreter and Compiler
  911.   ──────────────────────────────────
  912.  
  913.   The Aurora Macro Language contains native functions for compiling and
  914.   evaluating macro language code.
  915.  
  916.   To evaluate a string of macro language source code from within a macro
  917.   language program, use the "evl" function. For example:
  918.  
  919.     = %x "+ 4 5 6".
  920.     = %y (evl x).
  921.  
  922.   In the example above, the local variable "x" is assigned a string
  923.   which is a macro language expression. In the next sentence, the "evl"
  924.   function evaluates the value of "x" and assigns the result (15) to
  925.   "y".
  926.  
  927.   Since there are many native functions for manipulating strings, you
  928.   can actually construct code dynamically and execute it from within a
  929.   running macro language program using the "evl" function.
  930.  
  931.   To evaluate macro language code in a file on disk, use the native
  932.   function "objdsk". For example:
  933.  
  934.     objdsk %aurora "test.a" 3 4.
  935.  
  936.   In the example above, the contents of the file "test.a" are evaluated
  937.   and passed the arguments "3" and "4", with "aurora" as the default
  938.   object. The "objdsk" command will evaluate both macro language source
  939.   and compiled files (compiled files will execute faster).
  940.  
  941.   To compile a macro language source file on disk, use the native
  942.   function "comf". For example:
  943.  
  944.     comf "test.a" "test.x".
  945.  
  946.   In the example above, the file "test.a" is compiled and the result is
  947.   placed in the file "test.x".
  948.  
  949.   You can use any filenames you wish for source and compiled files. The
  950.   convention is to use the file extension ".A" for macro language source
  951.   files, and ".X" for compiled macro language files.
  952.                                                Native Function List   17
  953.  
  954.  
  955.   2-1  Native Function List
  956.   ─────────────────────────
  957.  
  958.   The following section summarizes all available native macro language
  959.   functions by category. Each native function is followed by a brief one
  960.   line description.
  961.  
  962.  
  963.   Definition Functions:
  964.  
  965.     =     - assign a value to a local variable
  966.     set   - assign a value to an object variable
  967.     ren   - rename an object variable or function
  968.     uns   - remove an object variable or function from an object
  969.  
  970.     fun   - define a function
  971.     arg   - map function arguments to local variables
  972.     qarg  - access function arguments by ordinal number
  973.  
  974.  
  975.   Conditional Functions:
  976.  
  977.     eq   - test strings for equality
  978.     eqi  - test strings for equality (ignoring case)
  979.     ne   - test strings for inequality
  980.     ==   - test integers for equality
  981.     !=   - test integers for inequality
  982.     <    - test if each argument is less than the next
  983.     >    - test if each argument is greater than the next
  984.     <=   - test if each argument is less than or equal to the next
  985.     >=   - test if each argument is greater than or equal to the next
  986.  
  987.  
  988.   Logical Functions:
  989.  
  990.     and  - test if all arguments are true
  991.     or   - test if one argument is true
  992.     !    - test if no arguments are true
  993.  
  994.  
  995.   Bitwise Functions:
  996.  
  997.     &    - return the "bitwise and" of two strings
  998.     |    - return the "bitwise or" of two strings
  999.     ^    - return the "bitwise exclusive or" of two strings
  1000.                                                Native Function List   18
  1001.  
  1002.  
  1003.   Control Flow Functions:
  1004.  
  1005.     if       - if-then-else structure
  1006.     while    - loop while first argument is true
  1007.     dowhile  - loop while second argument is true
  1008.  
  1009.  
  1010.   Arithmetic Functions:
  1011.  
  1012.     +    - add all arguments together
  1013.     -    - subtract arguments from first argument
  1014.     *    - multiply all arguments together
  1015.     /    - divide first argument by other arguments
  1016.     mod  - return modulus of first argument divided by second argument
  1017.  
  1018.  
  1019.   String Functions:
  1020.  
  1021.     cat  - concatenates all arguments
  1022.     sub  - get a substring of the first argument
  1023.     fin  - search for a string in another string, with optional replace
  1024.     siz  - return the total size (in bytes) of arguments
  1025.     dup  - duplicate a string any number of times
  1026.     wrd  - set the character set to define a "word"
  1027.     idx  - search for the first of a group of characters in a string
  1028.     vfy  - verify that a string is composed of specified characters
  1029.     chc  - change the case of a string
  1030.  
  1031.     byte - convert an integer to a 1-byte string
  1032.     word - convert an integer to a 2-byte string
  1033.     long - convert an integer to a 4-byte string
  1034.     hex  - convert a hex string to a normal string
  1035.     toh  - convert a normal string to a hex string
  1036.  
  1037.  
  1038.   Evaluation and Compilation Functions:
  1039.  
  1040.     evl  - evaluate a string as macro language code
  1041.     evla - evaluate a string as if it were a function argument
  1042.     comf - compile a macro language source file
  1043.     #get - include a macro language source or compiled file
  1044.     var  - evaluate a string as if it were a variable
  1045.     prs  - parse a string for input to evl or evla.
  1046.                                                Native Function List   19
  1047.  
  1048.  
  1049.   Miscellaneous Functions:
  1050.  
  1051.     asc  - return the ascii integer value of a character
  1052.     pat  - expand a filename to fully qualified name
  1053.     exe  - execute a DOS program
  1054.     wait - delay for a specified number of milliseconds
  1055.     beep - beep the PC speaker
  1056.  
  1057.  
  1058.   Object Functions:
  1059.  
  1060.     obj     - add functions and variables to an object
  1061.     objnew  - create a new object and establish object ancestry
  1062.     objdes  - destroy an object
  1063.     objsav  - save an object
  1064.     objnam  - rename an object
  1065.     objeve  - change the current event object
  1066.     objpar  - change the ancestry of an object
  1067.     objdsk  - evaluate macro language source or compiled code in a file
  1068.  
  1069.     qobj    - test for the existence of an object
  1070.     qobjsiz - return the size of an object (variables and functions)
  1071.     qobjexe - return the current object
  1072.     qobjeve - return the current event object
  1073.     qobjanc - test for the ancestry of an object
  1074.  
  1075.  
  1076.   Disk and File Functions:
  1077.  
  1078.     dskdel  - delete a file
  1079.     dskren  - rename a file
  1080.     dskloc  - search for a file in multiple directories
  1081.     dskfin  - search for a string in a file
  1082.     dskcpy  - copy a file
  1083.     dskcur  - change the current disk drive and/or path
  1084.     dskdir  - create a directory
  1085.     dsktch  - touch a file
  1086.     dskatt  - change file attributes
  1087.     dskopn  - open a file for reading or writing
  1088.     dskcls  - close a file
  1089.     dskrea  - read characters from a file
  1090.     dskwri  - write characters to a file
  1091.     dskpos  - change the current position in an open file
  1092.  
  1093.     qdskatt - test if a file has specified attributes
  1094.     qdskpat - return the current drive/path or boot path
  1095.     qdskdrv - return available disk drives
  1096.     qdskcap - return disk drive capacity (total and used)
  1097.  
  1098.  
  1099.   System Functions:
  1100.  
  1101.     sysmem  - define maximum XMS/EMS memory
  1102.                                                Native Function List   20
  1103.  
  1104.  
  1105.     sysswp  - define swap files
  1106.     sysprt  - define printer settings
  1107.     syssnd  - enable or disable sound
  1108.  
  1109.     qsysver - return the current version of The Aurora Editor
  1110.     qsysos  - return the current version of the operating system (DOS)
  1111.     qsyspgm - return the name of The Aurora Editor .EXE file
  1112.     qsysvar - return the value of an environment variable
  1113.  
  1114.  
  1115.   Timer Functions:
  1116.  
  1117.     timdes  - destroy a timer
  1118.     timint  - create a interval timer
  1119.     timalm  - create an alarm timer
  1120.  
  1121.     qtim    - return the current time
  1122.  
  1123.  
  1124.   Keyboard Functions:
  1125.  
  1126.     kbdenh  - enable/disable enhanced keyboard
  1127.     kbdrpt  - define keyboard event reporting mode
  1128.     kbdclr  - clear keyboard buffer
  1129.  
  1130.     qkbdshf - return keyboard shift status
  1131.     qkbdchr - wait for a character to be entered and return it
  1132.  
  1133.  
  1134.   Mouse Functions:
  1135.  
  1136.     mouini  - open and initialize the mouse
  1137.     moutrm  - close the mouse
  1138.     mousen  - adjust mouse sensitivity
  1139.     mourpt  - define mouse event reporting mode
  1140.     moupos  - set the mouse position
  1141.     mouvis  - show/hide the mouse
  1142.  
  1143.     qmoupos - return the mouse x or y position
  1144.  
  1145.  
  1146.   Queue Functions:
  1147.  
  1148.     que       - post an event to the event queue
  1149.     send      - send event directly to the event object (bypass queue)
  1150.     queobj    - post an event to an object
  1151.     sendobj   - send an event directly to any object (bypass queue)
  1152.     quedis    - read and dispatch the next event from the event queue
  1153.     quesiz    - set the size of the event queue
  1154.     quequi    - force quedis to return null
  1155.                                                Native Function List   21
  1156.  
  1157.  
  1158.   Video Functions Functions:
  1159.  
  1160.     vidcsz    - set the visible cursor size
  1161.     vidbli    - set the video blink mode
  1162.     vidfon    - set the video mode
  1163.     vidorg    - set the mapping of the virtual to physical screen
  1164.     vidpri    - print a string on the screen
  1165.     vidbor    - set the color of the screen overscan border
  1166.     vidoff    - turn video off
  1167.     vidon     - turn video on
  1168.  
  1169.     qvidmon   - test for monochrome
  1170.     qvidp     - return video info (mapping, size, and blink mode)
  1171.  
  1172.  
  1173.   Text Buffer Functions:
  1174.  
  1175.     texdra   - redraw all windows displaying the specified text buffer
  1176.     texcre   - create a new text buffer
  1177.     texmen   - create a menu text buffer
  1178.     texdes   - destroy a text buffer
  1179.     texloa   - create a text buffer from a file or directory on disk
  1180.     texnam   - rename a text buffer
  1181.     textop   - make a text buffer the current default text buffer
  1182.     texdty   - set or clear the text buffer dirty flag
  1183.     texdlm   - set text buffer line delimiter or binary line length
  1184.     texusz   - set text buffer undo/redo stack size
  1185.  
  1186.     texovl   - overlay a string at an [x,y] position in a text buffer
  1187.     texinsx  - insert a string at an [x,y] position in a text buffer
  1188.     texdelx  - delete a string at an [x,y] position in a text buffer
  1189.     texinsy  - insert one or more strings as lines in a text buffer
  1190.     texdely  - delete one or more lines in a text buffer
  1191.  
  1192.     qtex     - test for the existence of a text buffer
  1193.     qtexlin  - return a portion of a line in a text buffer
  1194.     qtexend  - return the number of lines in text buffer
  1195.     qtexpre  - return the previous text buffer in the text buffer list
  1196.     qtexdty  - return the value of the dirty flag
  1197.     qtextru  - return the value of the truncate flag
  1198.     qtexlen  - return the length of a line
  1199.     qtexbeg  - return the position of the first non-blank char in a line
  1200.     qtexfld  - return info about a text fold
  1201.     qtextop  - return the default text buffer
  1202.     qtexmrk  - return info about marks associated with a text buffer
  1203.  
  1204.     qtexbin  - return text buffer binary line length
  1205.     qtexmen  - return info about a menu text buffer
  1206.     qtexdir  - return info about a directory listing from texloa
  1207.                                                Native Function List   22
  1208.  
  1209.  
  1210.     undbeg   - start saving undo/redo information for a text buffer
  1211.     undend   - stop saving undo/redo information for a text buffer
  1212.     und      - undo or redo last text buffer change
  1213.  
  1214.  
  1215.   Mark Functions:
  1216.  
  1217.     mrkset  - create a new mark or modify an existing mark
  1218.     mrkdes  - destroy a mark
  1219.     mrknam  - rename a mark
  1220.     mrktop  - make a cursor mark the default mark
  1221.     mrkcol  - change the color of a mark
  1222.  
  1223.     mrkdel  - delete the text within a mark
  1224.     mrkins  - copy the text within a mark at a new location
  1225.     mrkmov  - move the text within a mark to a new location
  1226.     mrkovl  - overlay the text within a mark at a new location
  1227.  
  1228.     mrkshf  - shift the text within a mark left or right
  1229.  
  1230.     mrkfil  - fill a mark with a character
  1231.     mrkcas  - change the case of the text within a mark
  1232.     mrkjus  - justify the text within a mark (left, right, center)
  1233.     mrksrt  - sort the text within a mark
  1234.     mrktab  - expand the tab characters within a mark
  1235.  
  1236.     mrkrfl  - reflow the text within a mark
  1237.     mrksav  - save or print the text within a mark
  1238.     mrkfin  - search for and optionally replace text within a mark
  1239.     mrkrel  - relocate a mark to a new position or text buffer
  1240.     mrkfld  - create new text folds or remove existing text folds
  1241.  
  1242.     qmrk    - test for the existence of a mark
  1243.     qmrkpre - return the previous mark in the text buffer mark list
  1244.     qmrktex - return the text buffer name associated with a mark
  1245.     qmrkp   - return the mark coordinates, width, or height
  1246.     qmrkcol - return the column position of a mark (cursor marks)
  1247.     qmrklin - return the first line number of a mark (cursor marks)
  1248.     qmrkins - return the insert/overlay state of a mark (cursor marks)
  1249.     qmrktyp - return the type of mark
  1250.     qmrkbuf - return the contents of a column mark
  1251.     qmrkwin - return the window associated with a cursor mark
  1252.  
  1253.  
  1254.   Window Functions:
  1255.  
  1256.     windra  - redraw specified portion of a window
  1257.     winset  - create, hide, or show a window
  1258.                                                Native Function List   23
  1259.  
  1260.  
  1261.     windes  - destroy a window
  1262.     winnam  - rename a window
  1263.     winttl  - change a window title
  1264.     wineot  - change the window end-of-text line
  1265.     winmen  - set the menu bar for a window
  1266.     winmeh  - highlight a menu bar item for a window
  1267.     wintic  - set the title bar controls for a window
  1268.     winmrk  - set the cursor mark for a window
  1269.     winpar  - set the window parent
  1270.     winnex  - alter the placement of the window in the window list
  1271.     winpre  - alter the placement of the window in the window list
  1272.     winvib  - create a local video buffer for a window
  1273.  
  1274.     wincol  - set the window colors
  1275.     winbor  - set the window borders
  1276.     winfra  - set the window frame components
  1277.     winshd  - set the window shadow
  1278.     winsh2  - set the window shadow for dialog controls
  1279.  
  1280.     winscr  - scroll the contents of a window
  1281.     winadj  - scroll the contents of a window without moving cursor
  1282.     winbar  - set a window scroll bar thumb position
  1283.     winsiz  - resize a window
  1284.     winmov  - move a window
  1285.     wintil  - tile windows on the screen
  1286.  
  1287.     qwin    - test for the existence of a window
  1288.     qwinmrk - return the cursor mark name associated with a window
  1289.     qwintex - return the name of the text buffer displayed in a window
  1290.     qwinx   - return the left-most column number displayed in a window
  1291.     qwiny   - return the top-most line number number displayed in a window
  1292.     qwintop - return the top window
  1293.     qwinbot - return the bottom window
  1294.     qwinpre - return the previous window in the window list
  1295.     qwinnex - return the next window in the window list
  1296.     qwinchi - return the first/last child window of a specified window
  1297.     qwinttl - return a window title string
  1298.     qwinpar - return the parent window of a specified window
  1299.     qwintit - return a window title or title highlight position
  1300.     qwincol - return the color of a window component
  1301.     qwinbor - return window border info
  1302.     qwinp   - return the window coordinates, height, or width
  1303.     qwinfra - return info about the window frame components
  1304.     qwinrgn - return the window regions at specified coordinates
  1305.     qwinbar - return the position of a scroll bar thumb
  1306.     qwincnt - return the number of windows or child windows
  1307.     qwinmen - return window menu bar info
  1308.     qwintic - return window title bar control info
  1309.                                           Native Functions - Detail   24
  1310.  
  1311.  
  1312.   3-1  Native Functions - In Detail
  1313.   ─────────────────────────────────
  1314.  
  1315.   The following sections describe each of the macro language native
  1316.   functions in detail. The functions are listed in the following format:
  1317.  
  1318.     functionname  [arg 1]  [arg 2]  [arg 3] ...
  1319.  
  1320.   The function name is listed first, followed by its arguments in
  1321.   brackets. The argument and return value "types" are not given, since
  1322.   they are always character strings.
  1323.  
  1324.   The "..." indicates that a variable number of arguments (similar to
  1325.   the previous arguments) may follow. Note that function arguments are
  1326.   always optional in The Aurora Macro Language. In many cases, the
  1327.   function will supply a default value if an argument is not specified,
  1328.   or a null value is specified.
  1329.  
  1330.   Many functions take an [options] character string as an argument. An
  1331.   option is just a one character code that tells the function to do
  1332.   something in a specific way. Each function may have its own set of
  1333.   options, each with their own meaning. In many cases, multiple options
  1334.   can be specified in the [options] character string. For example:
  1335.  
  1336.     fin s "b" %ir.   // the options "i" and "r" are passed to the
  1337.                      // function "fin"
  1338.  
  1339.   Some native function names may include a 3-character prefix (such as
  1340.   "obj", "tex", mrk", etc.) which indicates the "group" of related
  1341.   functions that the function belongs to. For example, "objnew" is an
  1342.   "object" function, "mrkset" is "mark" function, and "texcre" is a
  1343.   "text buffer" function. Within these function groups, functions whose
  1344.   only purpose is to return information are also prefixed by a "q"
  1345.   (query). For example, "qtexend" returns the number of lines in a text
  1346.   buffer.
  1347.  
  1348.   In functions which test for "true" or "false" (such as "if" or "and"),
  1349.   a value of null or "0" is false. Any other value is true.
  1350.  
  1351.   Remember, the following section describes "low-level" native
  1352.   functions. Many other "library" functions are available in The Aurora
  1353.   Editor (see "The Aurora Editor User's Guide"). Library functions are
  1354.   "built up" from native functions in The Aurora Macro Language, and are
  1355.   easier to use for most "high-level" editing operations.
  1356.                                                Definition Functions   25
  1357.  
  1358.  
  1359.   3-2  Definition Functions
  1360.   ─────────────────────────
  1361.  
  1362.   =  [var name]  [value].
  1363.  
  1364.     Assigns the value [value] to the local variable [var name]. The
  1365.     local variable is defined only within the current function
  1366.     definition. Returns 1 if success or null if failure.
  1367.  
  1368.  
  1369.   set  [obj var name]  [value].
  1370.  
  1371.     Assigns the value [value] to the object variable [obj var name]. The
  1372.     assignment remains in effect until another assignment is made to the
  1373.     same variable name, or the variable is destroyed or renamed with the
  1374.     "uns" or "ren" functions (see below). The variable will also be
  1375.     destroyed if the object containing the variable is destroyed.
  1376.     Returns 1 if success or null if failure.
  1377.  
  1378.  
  1379.   ren  [obj var name]  [new obj var name].
  1380.  
  1381.     Renames the object variable [obj var name] to [new obj var name].
  1382.     Only the name of the variable changes, not the value. Returns 1 if
  1383.     success or null if failure.
  1384.  
  1385.  
  1386.   uns  [obj var name].
  1387.  
  1388.     Destroys or "un-sets" the object variable [obj var name]. Both the
  1389.     variable name and value are removed from the object in which they
  1390.     are contained. Returns 1 if success or null if failure.
  1391.  
  1392.  
  1393.   fun  [function name]  [function body]  [arg 1]  [arg 2] ...
  1394.  
  1395.     Defines the function [function name] by assigning the macro language
  1396.     expression [function body] to the function [function name].
  1397.  
  1398.     [arg 1], [arg 2], etc. arg seldom used. They tell the macro language
  1399.     compiler which arguments are to be compiled whenever they are
  1400.     encountered in a call to [function name]. This can speed up
  1401.     performance when an argument to a [function name] is a string
  1402.     containing a macro language expression which is to be evaluated
  1403.     within [function name]. [arg 1], [arg 2], etc. are integers
  1404.     specifying the relative position of the argument to be compiled.
  1405.  
  1406.     This function returns 1 if success or null if failure.
  1407.                                                Definition Functions   26
  1408.  
  1409.  
  1410.   arg  [var name 1]  [var name 2] ...
  1411.  
  1412.     Names the arguments passed to the function in which it is contained.
  1413.     After this call, the arguments can be accessed by name.
  1414.  
  1415.  
  1416.   qarg  [argument number n].
  1417.  
  1418.     Returns the "nth" argument passed to the function in which it is
  1419.     contained. If n is zero or null, the number of arguments passed to
  1420.     the function is returned.
  1421.  
  1422.  
  1423.  
  1424.   3-3  Conditional Functions
  1425.   ──────────────────────────
  1426.  
  1427.   eq  [string 1]  [string 2] ...
  1428.  
  1429.     Returns 1 if [string 1] is equal to any one of the arguments which
  1430.     follow it, otherwise it returns null.
  1431.  
  1432.  
  1433.   eqi  [string 1]  [string 2] ...
  1434.  
  1435.     Returns 1 if [string 1] is equal (ignoring case) to any one of the
  1436.     arguments which follow it, otherwise it returns null.
  1437.  
  1438.  
  1439.   ne  [string 1]  [string 2] ...
  1440.  
  1441.     Returns 1 if [string 1] is not equal to any of the arguments which
  1442.     follow it, otherwise it returns null.
  1443.  
  1444.  
  1445.   ==  [string 1]  [string 2] ...
  1446.  
  1447.     Returns 1 if [string 1] is numerically equal to any one of the
  1448.     arguments which follow it, otherwise it returns null.
  1449.  
  1450.  
  1451.   !=  [string 1]  [string 2] ...
  1452.  
  1453.     Returns 1 if [string 1] is not numerically equal to any one of the
  1454.     arguments which follow it, otherwise it returns null.
  1455.  
  1456.  
  1457.   <  [string 1]  [string 2] ...
  1458.  
  1459.     Returns 1 if each argument is numerically less than the next
  1460.     argument, otherwise it returns null.
  1461.                                               Conditional Functions   27
  1462.  
  1463.  
  1464.   >  [string 1]  [string 2] ...
  1465.  
  1466.     Returns 1 if each argument is numerically greater than the next
  1467.     argument, otherwise it returns null.
  1468.  
  1469.  
  1470.   <=  [string 1]  [string 2] ...
  1471.  
  1472.     Returns 1 if each argument is numerically less than or equal to the
  1473.     next argument, otherwise it returns null.
  1474.  
  1475.  
  1476.   >=  [string 1]  [string 2] ...
  1477.  
  1478.     Returns 1 if each argument is numerically greater than or equal to
  1479.     the next argument, otherwise it returns null.
  1480.  
  1481.  
  1482.  
  1483.   3-4  Logical Functions
  1484.   ──────────────────────
  1485.  
  1486.   and  [string 1]  [string 2] ...
  1487.  
  1488.     Evaluates all arguments until an argument returns "0" or null, in
  1489.     which case it returns null, otherwise it returns 1.
  1490.  
  1491.  
  1492.   or  [string 1]  [string 2] ...
  1493.  
  1494.     Evaluates all arguments until an argument does not return "0" or
  1495.     null, in which case it returns 1, otherwise it returns null.
  1496.  
  1497.  
  1498.   !  [string 1]  [string 2] ...
  1499.  
  1500.     Returns 1 if all arguments are either "0" or null, otherwise it
  1501.     returns null.
  1502.  
  1503.  
  1504.  
  1505.   3-5  Bitwise Logical Functions
  1506.   ──────────────────────────────
  1507.  
  1508.   &  [string 1]  [string 2].
  1509.  
  1510.     Returns [string 1] "and-ed bitwise" with [string 2].
  1511.                                           Bitwise Logical Functions   28
  1512.  
  1513.  
  1514.   |  [string 1]  [string 2].
  1515.  
  1516.     Returns [string 1] "or-ed bitwise" with [string 2].
  1517.  
  1518.  
  1519.   ^  [string 1]  [string 2].
  1520.  
  1521.     Returns [string 1] "xor-ed bitwise" with [string 2].
  1522.  
  1523.  
  1524.  
  1525.   3-6  Control Functions
  1526.   ──────────────────────
  1527.  
  1528.   if  [condition]  [then body]  [else body].
  1529.  
  1530.     Evaluates the expression [condition]. If it is not "0" or null, then
  1531.     the expression [then body] is evaluated, otherwise the expression
  1532.     [else body] is evaluated. Returns the value of the evaluated
  1533.     expression.
  1534.  
  1535.  
  1536.   while  [condition]  [while body].
  1537.  
  1538.     Evaluates the expression [while body] while the expression
  1539.     [condition] does not evaluate to "0" or null. [condition] is
  1540.     evaluated before the first evaluation of [while body]. Returns null.
  1541.  
  1542.  
  1543.   dowhile  [while body]  [condition].
  1544.  
  1545.     Evaluates the expression [while body] while the expression
  1546.     [condition] does not evaluate to "0" or null. [condition] is
  1547.     evaluated after the first evaluation of [while body]. Returns null.
  1548.  
  1549.  
  1550.  
  1551.   3-7  Arithmetic Functions
  1552.   ─────────────────────────
  1553.  
  1554.   +  [integer 1]  [integer 2] ...
  1555.  
  1556.     Returns the numeric sum of all arguments.
  1557.  
  1558.  
  1559.   -  [integer 1]  [integer 2] ...
  1560.  
  1561.     If only one argument is specified, this function returns the numeric
  1562.     negative of the argument, otherwise it returns the result of
  1563.     subtracting all arguments after the first argument, from the first
  1564.     argument.
  1565.                                                Arithmetic Functions   29
  1566.  
  1567.  
  1568.   *  [integer 1]  [integer 2] ...
  1569.  
  1570.     Returns the numeric product of all arguments.
  1571.  
  1572.  
  1573.   /  [integer 1]  [integer 2] ...
  1574.  
  1575.     Returns the result of dividing the first argument by all arguments
  1576.     after the first argument.
  1577.  
  1578.  
  1579.   mod  [integer 1]  [integer 2]
  1580.  
  1581.     Returns the modulus of dividing the first argument by the second
  1582.     argument.
  1583.  
  1584.  
  1585.   3-8  String Functions
  1586.   ─────────────────────
  1587.  
  1588.   cat  [string 1]  [string 2] ...
  1589.  
  1590.     Returns the concatenated string of all arguments. For example:
  1591.  
  1592.       cat "abc" "123" %xyz.        // returns "abc123xyz"
  1593.       cat "var" (+ 1 2).           // returns "var3"
  1594.  
  1595.  
  1596.   sub  [string]  [position]  [length].
  1597.  
  1598.     Returns the substring of [string] starting at character position
  1599.     [position] and extending for a length of [length] characters. If
  1600.     [length] is zero or not specified, then the length used is the
  1601.     length from position to the end of [string]. For example:
  1602.  
  1603.       sub "Aurora" 3.             // returns "rora"
  1604.       sub "Aurora" 3 2.           // returns "ro"
  1605.  
  1606.  
  1607.   fin  [string]  [search string]  [options]  [replace string].
  1608.  
  1609.     Searches for [search string] within [string]. Any combination of the
  1610.     following [options] may be specified:
  1611.  
  1612.       i - case insensitive search
  1613.       r - search in "reverse", starting from the end of the string
  1614.       w - search for "whole words" only
  1615.  
  1616.     If [replace string] is not specified, this function returns the
  1617.     character position where [search string] was found in [string]
  1618.     (returns "0" if not found).
  1619.                                                    String Functions   30
  1620.  
  1621.  
  1622.     If [replace string] is specified, this function returns a string
  1623.     where every occurrence of [search string] has been replaced with
  1624.     [replace string].
  1625.  
  1626.     Examples:
  1627.  
  1628.       fin "Aurora" %r.            // returns "3"
  1629.       fin "Aurora" %R %ri.        // returns "5"
  1630.       fin "Aurora" %r @ %XYZ.     // returns "AuXYZoXYZa"
  1631.       fin "Aurora" %k.            // returns "0"
  1632.  
  1633.  
  1634.   siz  [string 1]  [string 2] ...
  1635.  
  1636.     Returns the sum of the string lengths of all of its arguments.
  1637.     For example:
  1638.  
  1639.       siz "Aurora".               // returns "6"
  1640.       siz "xyz" %abc %Z.          // returns "7"
  1641.  
  1642.  
  1643.   dup  [size]  [fill string].
  1644.  
  1645.     Returns a string of length [size]. If [fill string] is specified,
  1646.     the string is filled by duplicating [fill string] enough times to
  1647.     fill the string. For example:
  1648.  
  1649.       dup 10 "abc".    returns "abcabcabca"
  1650.  
  1651.     If [fill string] is not specified, the contents of the return string
  1652.     are undefined. Returns null if failure.
  1653.  
  1654.  
  1655.   wrd  [char set].
  1656.  
  1657.     Sets the default character set for defining a "word" for the "whole
  1658.     words" only search option. The "whole words" only search option is
  1659.     used by the "fin" and "mrkfin" functions. [char set] is a string
  1660.     composed of all the characters in the character set. Character
  1661.     ranges can be indicated with a hyphen (-). For example:
  1662.  
  1663.       wrd "abcA-Z0".
  1664.  
  1665.     The example above sets the default character set to the characters
  1666.     a, b, c, 0, and the characters A through Z.
  1667.  
  1668.  
  1669.   idx  [string 1]  [string 2].
  1670.  
  1671.     Returns the position in [string 1] of the first character contained
  1672.     in [string 2]. Returns null if none are found. For example:
  1673.                                                    String Functions   31
  1674.  
  1675.  
  1676.       idx "abcde" %b.             // returns "2"
  1677.       idx "abcde" %tdv.           // returns "4"
  1678.       idx "abcde" %xyz.           // returns null
  1679.  
  1680.  
  1681.   vfy  [string 1]  [string 2].
  1682.  
  1683.     Returns the position in [string 1] of the first character not
  1684.     contained in [string 2]. Character ranges such as "a-zA-Z0-9" can be
  1685.     specified for [string 2]. Returns null if all characters in [string
  1686.     1] are contained in [string 2]. For example:
  1687.  
  1688.       vfy "Aurora" "auro".        // returns null
  1689.       vfy "Aurora" "aur".         // returns "4"
  1690.       vfy "Aurora" %a.            // returns "2"
  1691.  
  1692.  
  1693.   chc  [string]  [options].
  1694.  
  1695.     Changes the case of [string] and returns the result. The following
  1696.     [options] may be specified:
  1697.  
  1698.       l - change all characters to lower case
  1699.       u - change all characters to upper case
  1700.  
  1701.     If no options are specified, "u" is assumed. If options "u" and "l"
  1702.     are both specified, the case of each character in the string is
  1703.     toggled or "flipped". For example:
  1704.  
  1705.       chc "Aurora".               // returns "AURORA"
  1706.       chc "Aurora" %l.            // returns "aurora"
  1707.       chc "Aurora" %ul.           // returns "aURORA"
  1708.  
  1709.  
  1710.   byte  [integer 1]  [integer 2] ...
  1711.  
  1712.     Converts each integer argument to a string of length 1 (a 1-byte
  1713.     binary number) and returns the concatenated result. For example:
  1714.  
  1715.       byte 32 32 20h.
  1716.  
  1717.     The example above returns a string of 3 blanks.
  1718.  
  1719.  
  1720.   word  [integer 1]  [integer 2] ...
  1721.  
  1722.     Converts each integer argument to a string of length 2 (a 2-byte
  1723.     binary number) and returns the concatenated result.
  1724.  
  1725.  
  1726.   long  [integer 1]  [integer 2] ...
  1727.  
  1728.     Converts each integer argument to a string of length 4 (a 4-byte
  1729.     binary number) and returns the concatenated result.
  1730.                                Evaluation and Compilation Functions   32
  1731.  
  1732.  
  1733.   hex  [string 1]  [string 2] ...
  1734.  
  1735.     Converts every two hex characters in each argument string to 1
  1736.     character and returns the concatenated result. For example:
  1737.  
  1738.       hex "202020" "2020".
  1739.  
  1740.     The example above returns a string of 5 blanks.
  1741.  
  1742.  
  1743.   toh  [string 1]  [string 2] ...
  1744.  
  1745.     Converts every character in each argument string to 2 hex characters
  1746.     and returns the concatenated result. For example:
  1747.  
  1748.       toh "ABC" "12".
  1749.  
  1750.     The example above returns the string "4142433132".
  1751.  
  1752.  
  1753.   3-9  Evaluation and Compilation Functions
  1754.   ─────────────────────────────────────────
  1755.  
  1756.  
  1757.   evl   [expression]  [reps].
  1758.   evla  [expression]  [reps].
  1759.  
  1760.     These functions evaluate [expression] for [reps] number of times.
  1761.     [reps] defaults to "1" if not specified. These functions return the
  1762.     result of the last evaluation of [expression].
  1763.  
  1764.     The function "evla" evaluates [expression] as if it were an argument
  1765.     to a function, whereas "evl" evaluates [expression] as a macro
  1766.     language sentence.
  1767.  
  1768.     Note that [expression] is not "parsed" before it is evaluated. If
  1769.     [expression] must be parsed, use the "prs" function first. For
  1770.     example:
  1771.  
  1772.       = %e "beep    100    100".
  1773.       evl (prs e).
  1774.  
  1775.     The example above parses the value of the variable "e", evaluates it
  1776.     as a macro language sentence, and beeps the PC speaker.
  1777.  
  1778.  
  1779.   comf  [source file]  [compiled file].
  1780.  
  1781.     Compiles the macro language source code in the file [source file]
  1782.     and places the compiled code in the file [compiled file]. If
  1783.     [compiled file] already exists, then it is overwritten. Returns 1 if
  1784.     success, or null if failure.
  1785.                                Evaluation and Compilation Functions   33
  1786.  
  1787.  
  1788.   #get  [source or compiled file].
  1789.  
  1790.     Includes the specified macro language source or compiled file into
  1791.     the current macro source code when it is evaluated or compiled.
  1792.  
  1793.  
  1794.   var  [string].
  1795.  
  1796.     Evaluates [string] as a variable and returns the value of the
  1797.     variable. For example:
  1798.  
  1799.       var (cat "xy" "z").
  1800.  
  1801.     The example above returns the value of the variable "xyz".
  1802.  
  1803.  
  1804.   prs  [expression].
  1805.  
  1806.     Parses the macro language expression [expression] and returns the
  1807.     result. Parsing will remove comments and insignificant spaces from
  1808.     the expression.
  1809.  
  1810.     Parsing is normally done automatically by the "objdsk" function when
  1811.     source code is loaded and executed, or by the "comf" function when
  1812.     source code is compiled. However, if a string is constructed and
  1813.     evaluated while a macro language program is executing, it should
  1814.     first be parsed before being evaluated by the "evl" function. For
  1815.     example:
  1816.  
  1817.       prs "beep  100     100. // beep the speaker".
  1818.  
  1819.     The example above returns the string "beep 100 100", which can be
  1820.     then be evaluated by the "evl" function.
  1821.  
  1822.  
  1823.   3-10  Miscellaneous Functions
  1824.   ─────────────────────────────
  1825.  
  1826.   asc  [string].
  1827.  
  1828.     Returns the integer ascii value of the first character in [string].
  1829.     For example:
  1830.  
  1831.       asc "A".                         // returns "65"
  1832.  
  1833.  
  1834.   pat  [filename]  [filename2/path].
  1835.  
  1836.     Expands [filename] to a fully qualified filename if it is not fully
  1837.     qualified or ambiguous. The second argument [filename2/path] is used
  1838.     as the "template" to construct the fully qualified name. If
  1839.     [filename2/path] is not specified, then the current drive and
  1840.     directory are used as the template. For example:
  1841.  
  1842.       pat "xyz.c" "d:\a\*.*".         // returns "d:\a\xyz.c".
  1843.                                             Miscellaneous Functions   34
  1844.  
  1845.  
  1846.   exe  [command]  [options]  [memory].
  1847.  
  1848.     Executes the DOS command [command]. The string [command] is the DOS
  1849.     program name (.EXE or .COM file) and parameters exactly as you would
  1850.     type them on the DOS command line. The following [options] may be
  1851.     specified:
  1852.  
  1853.       k  - prompts the user to return when the command is completed
  1854.       c  - clears the screen before the command begins and restores
  1855.            the screen after the command is completed
  1856.  
  1857.  
  1858.     [memory] specifies the amount of memory (in k) to request from DOS
  1859.     for the program. If [memory] is -1, then the maximum available
  1860.     memory will be used. The interpreter may swap to XMS memory, EMS
  1861.     memory, or disk to satisfy this request.
  1862.  
  1863.     Note: If option "k" is specified, then option "c" is used
  1864.     internally, whether or not it is specified in the function call.
  1865.  
  1866.  
  1867.   wait  [milliseconds].
  1868.  
  1869.     Delays execution for the time period specified by [milliseconds].
  1870.  
  1871.  
  1872.   beep  [frequency]  [duration].
  1873.  
  1874.     "Beeps" the PC speaker for the specified frequency and duration. If
  1875.     [duration] is omitted or zero, the speaker sounds at the specified
  1876.     frequency until "beep" is called again with no arguments.
  1877.     [frequency] is in herz and [duration] is in milliseconds.
  1878.  
  1879.  
  1880.   3-11  Object Functions
  1881.   ──────────────────────
  1882.  
  1883.   Object functions are used to manipulate and return information about
  1884.   macro language objects. Objects can be used to logically group
  1885.   together related functions and variables. There are functions for
  1886.   creating and destroying objects, setting and querying an object's
  1887.   ancestry, and changing the current "event" handling object. Also, the
  1888.   "objdsk" function can evaluate macro code in a file on disk. Object
  1889.   function names use the prefix "obj".
  1890.  
  1891.  
  1892.   objnew  [obj name]  [estimated size]  [obj 1]  [obj 2] ...
  1893.  
  1894.     Creates a new object [obj name], and optionally establishes the
  1895.     ancestry of the object. [estimated size] is the estimated number of
  1896.     variables and functions which you believe the object may contain,
  1897.     and is used to optimize internal tables. [obj 1], [obj 2], etc are
  1898.     optional "ancestor" objects from which [obj name] may "inherit"
  1899.     functions and variable assignments. Returns 1 if success or null if
  1900.     failure.
  1901.                                                    Object Functions   35
  1902.  
  1903.  
  1904.   obj  [obj name]  [obj body].
  1905.  
  1906.     Adds functions and variables to the object [obj name]. When [obj
  1907.     body] is evaluated, any function definitions or object variable
  1908.     assignments within [obj body] are added to the object [obj name].
  1909.  
  1910.  
  1911.   objdes  [obj name].
  1912.  
  1913.     Destroys the object [obj name]. The object [obj name] is also
  1914.     removed from the inheritance path of other objects, if applicable.
  1915.  
  1916.  
  1917.   objsav  [obj name]  [filename]  [options].
  1918.  
  1919.     Saves the object [obj name] in the file [filename] as a compiled
  1920.     sequence of "set" function calls. The "objdsk" function can be used
  1921.     to reload the object from disk. The following options may be
  1922.     specified:
  1923.  
  1924.       a - append to the end of [filename]
  1925.  
  1926.     Returns 1 if success or null if failure.
  1927.  
  1928.  
  1929.   objnam  [obj name]  [new obj name].
  1930.  
  1931.     Renames the object [obj name] to [new obj name]. Returns 1 if
  1932.     success or null if failure.
  1933.  
  1934.  
  1935.   objeve  [obj name].
  1936.  
  1937.     Makes the object [obj name] the current "event" object. The event
  1938.     object is where the interpreter looks for event handler functions
  1939.     when dispatching events from the internal event queue.
  1940.  
  1941.  
  1942.   objpar  [obj name]  [obj 1]  [obj 2] ...
  1943.  
  1944.     Changes the "inheritance path" or ancestry of the object [obj name]
  1945.     to [obj 1], [obj 2], etc.
  1946.  
  1947.  
  1948.   objdsk  [obj name]  [filename]  [arg 1]  [arg 2] ...
  1949.  
  1950.     Evaluates the macro language source or compiled code in [filename],
  1951.     with the object [obj name] as the default object. [arg 1], [arg 2],
  1952.     etc. are arguments passed to the macro code in [filename]. This
  1953.     function returns the value of the last sentence evaluated in
  1954.     [filename].
  1955.                                                    Object Functions   36
  1956.  
  1957.  
  1958.   qobj  [obj name].
  1959.  
  1960.     Returns 1 if the object [obj name] exists, otherwise it returns
  1961.     null.
  1962.  
  1963.  
  1964.   qobjsiz  [obj name].
  1965.  
  1966.     Returns the number of functions and variables in the object [obj
  1967.     name].
  1968.  
  1969.  
  1970.   qobjexe.
  1971.  
  1972.     Returns the name of the currently executing or "default" object.
  1973.  
  1974.  
  1975.   qobjeve.
  1976.  
  1977.     Returns the name of the current "event" object.
  1978.  
  1979.  
  1980.   qobjanc  [obj name]  [obj 2].
  1981.  
  1982.     Returns 1 if the object [obj name] has the object [obj 2] as an
  1983.     ancestor object in its inheritance path, or if [obj name] equals
  1984.     [obj 2], otherwise it returns null.
  1985.  
  1986.  
  1987.   3-12  Disk Functions
  1988.   ────────────────────
  1989.  
  1990.   Disk functions are used to manipulate files on disk, and to return
  1991.   path and drive information. Disk function names use the prefix "dsk".
  1992.  
  1993.  
  1994.   dskdel  [filename]  [options].
  1995.  
  1996.     Deletes the file [filename] and returns 1 if success, or null if
  1997.     failure. Empty directories can also be deleted if option "d" is
  1998.     specified.
  1999.  
  2000.  
  2001.   dskren  [filename]  [new filename].
  2002.  
  2003.     Renames the file [filename] to [new filename]. Returns 1 if success,
  2004.     or null if failure.
  2005.  
  2006.  
  2007.   dskloc  [filename]  [path].
  2008.  
  2009.     Searches the path string [path] for the file [filename]. [path] can
  2010.     be a sequence of paths separated by semicolons (;) (as in the DOS
  2011.     "PATH" environment string). This function returns the fully
  2012.     qualified filename if found, otherwise it returns null.
  2013.                                                      Disk Functions   37
  2014.  
  2015.  
  2016.   dskfin  [filename]  [string]  [options].
  2017.  
  2018.     Searches for the string [string] in the file [filename]. The
  2019.     following search [options] can be specified:
  2020.  
  2021.       i - case insensitive search
  2022.       w - search for "whole words" only
  2023.  
  2024.     This function returns the position in the file where the string was
  2025.     found ("1" is the first position), or null if not found. If the
  2026.     search was interrupted via <Ctrl-Break>, this function returns -1.
  2027.  
  2028.  
  2029.   dskcpy  [source filename]  [dest filename]  [options].
  2030.  
  2031.     Copies the file [source filename] to [dest filename]. The following
  2032.     [options] may be specified:
  2033.  
  2034.       a - append the source file to the destination file
  2035.       k - the destination file will keep the source file date/time
  2036.  
  2037.     This function returns non-zero if successful, otherwise it returns
  2038.     null.
  2039.  
  2040.  
  2041.   dskcur  [path]  [options].
  2042.  
  2043.     Sets the current drive or the current path for the specified drive.
  2044.     The following [options] can be specified:
  2045.  
  2046.       d - set the current drive
  2047.       p - set the current path
  2048.  
  2049.     For example:
  2050.  
  2051.       dskcur "d:" %d.       // set current drive to "d:"
  2052.       dskcur "c:\xyz" %p.   // set current directory for "c:" to "xyz"
  2053.       dskcur "c:\xyz" %dp.  // set current drive and directory
  2054.  
  2055.     Returns 1 if success or null if failure.
  2056.  
  2057.  
  2058.   dskdir  [path].
  2059.  
  2060.     Creates the new directory specified by [path]. All elements of the
  2061.     path must exist (except the last element). Returns 1 if success or
  2062.     null if failure.
  2063.                                                      Disk Functions   38
  2064.  
  2065.  
  2066.   dsktch  [filename].
  2067.  
  2068.     "Touches" the file [filename] by setting the file's date and time to
  2069.     the current date and time. Returns 1 if success or null if failure.
  2070.  
  2071.  
  2072.   dskatt  [filename]  [attributes].
  2073.  
  2074.     Changes the attributes of the file [filename] to [attributes]. The
  2075.     attributes of a directory can also be changed. [attributes] may be
  2076.     any combination of the following:
  2077.  
  2078.       r - read only
  2079.       h - hidden
  2080.       s - system
  2081.       a - archive
  2082.  
  2083.     Returns 1 if success or null if failure.
  2084.  
  2085.  
  2086.   dskopn  [filename]  [options].
  2087.  
  2088.     Opens the file [filename] for reading and writing, and returns a
  2089.     "file handle" for use by the "dskrea", "dskwri", "dskpos", and
  2090.     "dskcls" functions (see below). The "current position" in the open
  2091.     file is at the first character in the file. The following [options]
  2092.     can be specified:
  2093.  
  2094.       c - create a new file or truncate the file if it already exists
  2095.       r - open the file for reading only
  2096.       w - open the file for reading and writing
  2097.  
  2098.     This function returns null if failure.
  2099.  
  2100.  
  2101.   dskcls  [file handle].
  2102.  
  2103.     Closes the file opened by the "dskopn" function above.
  2104.  
  2105.  
  2106.   dskrea  [file handle]  [length].
  2107.  
  2108.     Reads data from the current position in the open file specified by
  2109.     [file handle]. [length] specifies the number of characters to read,
  2110.     and may not exceed 16000. The current position in the file is
  2111.     advanced by the amount of characters actually read.
  2112.                                                      Disk Functions   39
  2113.  
  2114.  
  2115.     This function returns a string composed of the data read from the
  2116.     file, or null if failure. The amount of characters actually read
  2117.     from the file can be determined by using the "siz" function with the
  2118.     return string.
  2119.  
  2120.  
  2121.   dskwri  [file handle]  [string]  [options].
  2122.  
  2123.     Writes the string [string] at the current position in the open file
  2124.     specified by [file handle]. The current position in the file is
  2125.     advanced by the amount of characters actually written.
  2126.  
  2127.     If [option] "k" is specified, the file's date and time are not
  2128.     modified. This function returns the amount of characters written, or
  2129.     null if failure.
  2130.  
  2131.  
  2132.   dskpos  [file handle]  [offset]  [options].
  2133.  
  2134.     Changes the current position in the open file specified by [file
  2135.     handle]. The new position depends on the value of [offset] and
  2136.     [options]. The following [options] may be specified:
  2137.  
  2138.       a - [offset] specifies an absolute position in the file ("1" is
  2139.           the first position).
  2140.       c - [offset] specifies an offset from the current position.
  2141.       e - [offset] specifies an offset from the end of the file.
  2142.  
  2143.     If no [options] are specified, then "a" is assumed. This function
  2144.     returns the new absolute position in the file ("1" is the first
  2145.     position).
  2146.  
  2147.  
  2148.   qdskatt  [filename]  [attributes]
  2149.  
  2150.     Tests whether or not [filename] has the specified attributes. Any
  2151.     combination of the following [attributes] can be specified:
  2152.  
  2153.       a - archive
  2154.       d - directory
  2155.       h - hidden
  2156.       r - read only
  2157.       s - system
  2158.       v - volume
  2159.  
  2160.     This function returns a non-null value if the specified attributes
  2161.     are present, or null if none are present.
  2162.                                                      Disk Functions   40
  2163.  
  2164.  
  2165.   qdskpat  [options].
  2166.  
  2167.     Returns the fully qualified boot path or the current path. The
  2168.     following [options] may be specified:
  2169.  
  2170.       b - return the boot path where the interpreter was invoked
  2171.       c - return the current path
  2172.  
  2173.     If no options are specified, the default is "c".
  2174.  
  2175.  
  2176.   qdskdrv  [options].
  2177.  
  2178.     Returns a string consisting of all available disk drive letters.
  2179.     The following [options] may be specified:
  2180.  
  2181.       t - include network information. "1" after the drive letter
  2182.           indicates a local drive, "2" indicates a network drive.
  2183.  
  2184.     For example, for a computer system with 3 logical hard drives, 2
  2185.     floppies, and network drives F and G:
  2186.  
  2187.       qdskdrv.      // returns "ABCDEFG"
  2188.       qdskdrv %t.   // returns "A1B1C1D1E1F2G2"
  2189.  
  2190.  
  2191.   qdskcap  [drive]  [options].
  2192.  
  2193.     Returns the total or free amount of disk space available on disk
  2194.     drive [drive], in bytes. The following options may be specified.
  2195.  
  2196.       c - return the total capacity of the drive
  2197.       f - return the free space on the drive
  2198.  
  2199.     If no drive is specified, the current drive is assumed. If no
  2200.     options are specified, the default is "c".
  2201.                                                    System Functions   41
  2202.  
  2203.  
  2204.   3-13  System Functions
  2205.   ──────────────────────
  2206.  
  2207.   System functions are used to control and provide information about the
  2208.   interpreter's operating environment. There are functions to control
  2209.   the interpreter's use of memory and printer devices, and functions to
  2210.   return information such as environment strings and version numbers.
  2211.   System function names use the prefix "sys".
  2212.  
  2213.  
  2214.   sysmem  [options]  [limit].
  2215.  
  2216.     Allows the use of XMS or EMS memory. [limit] is the maximum amount
  2217.     of XMS or EMS to use, in k (a value 0 or -1 indicates that the
  2218.     maximum available amount should be used). One of the following
  2219.     [options] may be specified:
  2220.  
  2221.       e - use EMS memory
  2222.       x - use XMS memory
  2223.  
  2224.     To use both XMS and EMS memory, this function must be called twice.
  2225.     Note that an XMS or EMS driver must be installed before this
  2226.     function can be called successfully. This function returns a
  2227.     non-zero value if success, otherwise it returns null.
  2228.  
  2229.   sysswp  [swap file 1]  [swap file 2]  [swap file 3].
  2230.  
  2231.     Sets the swap files names for the interpreter to use in low memory
  2232.     situations. The interpreter will use [swap file 2] only when there
  2233.     is no more room on the drive containing [swap file 1], and [swap
  2234.     file 3] only when there is no more room on the drive containing
  2235.     [swap file 2]. All swap files should be on different drives. Returns
  2236.     non-zero if success or null if failure.
  2237.  
  2238.     EMS and XMS memory (if available) will be used before the swap
  2239.     files.
  2240.  
  2241.  
  2242.   sysprt  [id]  [options]  [page size]  [left margin]  [top margin]
  2243.           [right margin]  [bottom margin]  [line spacing]  [copies].
  2244.  
  2245.     Sets the current printer settings. The following printer settings
  2246.     can be specified:
  2247.  
  2248.     - [id]
  2249.  
  2250.       not used (reserved for future use).
  2251.                                                    System Functions   42
  2252.  
  2253.  
  2254.     - [page size]
  2255.  
  2256.       Specifies the "Lines per Page" of printed output. This includes
  2257.       the [top margin] and [bottom margin]. After the specified lines
  2258.       per page have been printed, a formfeed character (ascii 12) will
  2259.       be sent to the printer and a new page will be started.
  2260.  
  2261.       If PrtPag is zero, printing will be continuous (no formfeed
  2262.       characters will be sent to the printer). [top margin], [bottom
  2263.       margin], and the "page number" option will be ignored.
  2264.  
  2265.     - [line spacing]
  2266.  
  2267.       Specifies the number of lines to advance after printing each line
  2268.       of output. A value of 1 generates single-spaced output, 2
  2269.       generates double-spaced output, and so on.
  2270.  
  2271.     - [copies]
  2272.  
  2273.       Specifies the number of copies to print.
  2274.  
  2275.     - [top margin]
  2276.  
  2277.       Specifies the number of blank lines to precede the printed output
  2278.       at the top of each page. This value is included in [page size].
  2279.       [top margin] is ignored if [page size] is set to zero.
  2280.  
  2281.     - [bottom margin]
  2282.  
  2283.       Specifies the number of blank lines to follow the printed output
  2284.       at the bottom of each page. This value is included in [page size].
  2285.       [bottom margin] is ignored if [page size] is set to zero.
  2286.  
  2287.     - [left margin]
  2288.  
  2289.       Specifies the number of blank columns to precede the printed
  2290.       output on each line.
  2291.  
  2292.     - [right margin]
  2293.  
  2294.       Specifies the column position at which to truncate each printed
  2295.       line. This column position is relative to column zero of the
  2296.       printed output, NOT the file being printed. If zero is specified,
  2297.       lines are not truncated.
  2298.  
  2299.     - [options]
  2300.  
  2301.       The following [options] can be specified:
  2302.                                                    System Functions   43
  2303.  
  2304.  
  2305.       h - prints a "header" at the top of each page. The header is
  2306.           specified in the "mrksav" function when printing. This option
  2307.           is ignored if [page size] is zero.
  2308.  
  2309.       f - prints a "footer" at the top of each page. The footer is
  2310.           specified in the "mrksav" function when printing. This option
  2311.           is ignored if [page size] is zero.
  2312.  
  2313.       s - adds a separator line after the header line and before the
  2314.           footer line.
  2315.  
  2316.       p - prints a right-justified page number on the header and footer
  2317.           lines. If neither a header or footer was specified, a blank
  2318.           header line is assumed. This option is ignored if [page size]
  2319.           is zero.
  2320.  
  2321.       l - prints a line number at the beginning of each line.
  2322.  
  2323.       e - sends a formfeed character to the printer when printing is
  2324.           completed.
  2325.  
  2326.  
  2327.   syssnd  [0/1].
  2328.  
  2329.     Enables (1) or disables (0) sound from the PC speaker.
  2330.  
  2331.  
  2332.   qsysver.
  2333.  
  2334.     Returns the current version of The Aurora Editor.
  2335.  
  2336.  
  2337.   qsysos  [options].
  2338.  
  2339.     Returns the operating system name or the operating system version.
  2340.     The following [options] may be specified:
  2341.  
  2342.       v - return major OS version
  2343.       m - return minor OS version
  2344.  
  2345.     If no options are specified, the operation system name ("DOS") is
  2346.     returned.
  2347.  
  2348.  
  2349.   qsyspgm.
  2350.  
  2351.     Returns the name of The Aurora Editor .EXE file that is currently
  2352.     executing, without path information or the .EXE extension. For
  2353.     example:
  2354.  
  2355.       qsyspgm.           // returns "A" or "A3"
  2356.                                                    System Functions   44
  2357.  
  2358.  
  2359.   qsysvar  [var name].
  2360.  
  2361.     Returns the environment string for the specified environment
  2362.     variable [var name]. [var name] must be in upper case. For example:
  2363.  
  2364.       qsysvar "PATH".   // returns the DOS PATH string
  2365.  
  2366.     This function returns null if the environment variable is not found.
  2367.  
  2368.  
  2369.   3-14  Timer Functions
  2370.   ─────────────────────
  2371.  
  2372.   Timer functions are used to create and destroy system "timers". Timers
  2373.   are used to automatically call user-defined functions at a specified
  2374.   time and date, or at periodic intervals. The "qtim" function also
  2375.   returns date and time information. Timer function names use the prefix
  2376.   "tim".
  2377.  
  2378.  
  2379.   timint  [timerid]  [interval]  [obj]  [fun]  [arg 1]  [arg 2] ...
  2380.  
  2381.     Sets an interval timer to call the function [fun] in the object
  2382.     [obj] with arguments [arg 1], [arg 2], etc. The function is called
  2383.     for every time interval (in milliseconds) specified by [interval].
  2384.  
  2385.     If [obj] is null, then the current "event" object is used. The
  2386.     [timerid] can be 0-9, and uniquely identifies the timer. Note that
  2387.     the first call to [fun] will occur after the specified time
  2388.     interval, not after the call. For example:
  2389.  
  2390.       timint 3 1000 @ %timer3.
  2391.  
  2392.     The example above sets timer 3 to call the function "timer3" every
  2393.     second.
  2394.  
  2395.     This function returns 1 if success or null if failure.
  2396.  
  2397.  
  2398.   timalm  [timerid]  [year(YYYY)]  [month(MM)]  [day(DD)]
  2399.           [dayofweek (0-6)]  [hour(HH)]  [min(mm)]  [sec(ss)]
  2400.           [obj]  [fun]  [arg 1]  [arg 2] ...
  2401.  
  2402.     Sets an "alarm" timer to call the function [fun] in the object [obj]
  2403.     with arguments [arg 1], [arg 2], etc. The function is called at the
  2404.     specified time and date.
  2405.  
  2406.     If [obj] is null, then the current "event" object is used. The
  2407.     [timerid] can be 0-9, and uniquely identifies the timer.
  2408.  
  2409.     "-1" may be specified as a "wildcard" for any of the date or time
  2410.     parameters. For example:
  2411.                                                     Timer Functions   45
  2412.  
  2413.  
  2414.       timalm  2 -1 3 -1 -1 11 0 0 @ "march".
  2415.  
  2416.     The example above sets timer 2 to call the function "march" in the
  2417.     current event object at 11 o'clock for every day in the month of
  2418.     march.
  2419.  
  2420.     This function returns 1 if success or null if failure.
  2421.  
  2422.  
  2423.   timdes  [timerid].
  2424.  
  2425.     Stops and destroys the timer [timerid]. This function destroys both
  2426.     interval and alarm timers. Returns 1 if success or null if failure.
  2427.  
  2428.  
  2429.   qtim.
  2430.  
  2431.     Returns the date and time as a character string of length 17, with
  2432.     the following format:
  2433.  
  2434.       "YYYYMMDDWhhmmssuu"
  2435.  
  2436.       YYYY - year
  2437.       MM   - month (1-12)
  2438.       DD   - day (1-31)
  2439.       W    - day of the week (0-6, 0=sunday)
  2440.       hh   - hour (0-23)
  2441.       mm   - minutes (0-59)
  2442.       ss   - seconds (0-59)
  2443.       uu   - hundredths of a second (0-99)
  2444.  
  2445.  
  2446.  
  2447.   3-15  Keyboard Functions
  2448.   ────────────────────────
  2449.  
  2450.   Keyboard functions are used to control and return information about
  2451.   the keyboard. Keyboard function names use the prefix "kbd".
  2452.  
  2453.  
  2454.   kbdenh  [0/1].
  2455.  
  2456.     Turns checking for the enhanced keyboard ON (1) or OFF (0). "kbdenh
  2457.     1" enables the enhanced keyboard keys if the enhanced keyboard is
  2458.     detected. "kbdenh 0" disables the enhanced keyboard keys.
  2459.  
  2460.  
  2461.   kbdrpt  [report mode].
  2462.  
  2463.     Determines how the interpreter calls keyboard event handler
  2464.     functions.
  2465.                                                  Keyboard Functions   46
  2466.  
  2467.  
  2468.     If [report mode] is "1" and a key is typed in, the interpreter
  2469.     attempts to call the user function "key" in the current event object
  2470.     with the following arguments:
  2471.  
  2472.       key name - name of the key ("k_s_f1", "k_a_y", etc.)
  2473.       key code - a 2 byte code identifying the key
  2474.       key char - the character typed in (if not a function key)
  2475.  
  2476.     If [report mode] is "2" and a key is typed in, the interpreter
  2477.     attempts to call a user function in the current event object with
  2478.     the same name as the "key name" argument above, with the following
  2479.     arguments:
  2480.  
  2481.       key code - a 2 byte code identifying the key
  2482.       key char - the character typed in (if not a function key)
  2483.  
  2484.     The default keyboard reporting mode is "2". This function returns 1
  2485.     if successful or null if failure.
  2486.  
  2487.  
  2488.   kbdclr.
  2489.  
  2490.     Removes all keystrokes from the keyboard buffer.
  2491.  
  2492.  
  2493.   qkbdshf  [mask].
  2494.  
  2495.      Returns the current shift key state of the keyboard "and-ed
  2496.      bitwise" with the integer specified by [mask]. The following table
  2497.      lists each bit position and its corresponding shift key:
  2498.  
  2499.        01h - right shift key is down
  2500.        02h - left shift key is down
  2501.        04h - ctrl key is down
  2502.        08h - alt key is down
  2503.        10h - scroll lock is on
  2504.        20h - num lock is on
  2505.        40h - caps lock is on
  2506.        80h - insert state is on
  2507.  
  2508.      For example, the value of "qkbdshf 3" is non-zero if either shift
  2509.      key is currently pressed down.
  2510.  
  2511.  
  2512.   qkbdchr  [options].
  2513.  
  2514.     If [option] "h" is specified, this function returns "1" if a key has
  2515.     been pressed, otherwise it returns null. The key remains in the
  2516.     keyboard buffer.
  2517.                                                  Keyboard Functions   47
  2518.  
  2519.  
  2520.     If [option] "h" is not specified, this function waits for a
  2521.     character to be entered from the keyboard and returns the character
  2522.     as a string of length one. The interpreter event queue is bypassed.
  2523.  
  2524.  
  2525.  
  2526.   3-16  Mouse Functions
  2527.   ─────────────────────
  2528.  
  2529.   Mouse functions are used to control and return information about the
  2530.   mouse. Mouse function names use the prefix "mou".
  2531.  
  2532.  
  2533.   mouini.
  2534.  
  2535.     Initializes the mouse and returns the mouse driver version (or null
  2536.     if failure). This function also displays the mouse pointer at the
  2537.     center of the screen, and enables the interpreter event queue to
  2538.     receive mouse events.
  2539.  
  2540.     In order for this function to return successfully, a DOS mouse
  2541.     driver (such as "mouse.com" or "mouse.sys") must be installed before
  2542.     the interpreter is invoked.
  2543.  
  2544.  
  2545.   moutrm.
  2546.  
  2547.     Deactivates the mouse driver and removes the mouse pointer from the
  2548.     screen. No more mouse events will be received by the interpreter
  2549.     event queue. Returns 1 if success or null if failure.
  2550.  
  2551.  
  2552.   mousen  [horz]  [vert]  [double speed].
  2553.  
  2554.     Sets the mouse sensitivity by setting the horizontal mickey-to-pixel
  2555.     [horz] and vertical mickey-to-pixel [vert] ratios, and by setting
  2556.     the double speed threshold [double speed]. The default value of
  2557.     these settings after calling "mouini" are:
  2558.  
  2559.       Horz mickey-to-pixel ratio:   8
  2560.       Vert mickey-to-pixel ratio:  16
  2561.       Double speed threshold:      64
  2562.  
  2563.     Returns 1 if success or null if failure.
  2564.  
  2565.  
  2566.   mourpt  [report mode].
  2567.  
  2568.     Determines how the interpreter calls mouse event handler functions.
  2569.                                                  Keyboard Functions   48
  2570.  
  2571.  
  2572.     If [report mode] is "1" and a mouse event is read from the event
  2573.     queue, the interpreter attempts to call the user function "mouse" in
  2574.     the current event object with the following arguments:
  2575.  
  2576.       mouse event name - name of the mouse event ("m_l_down", etc.)
  2577.       mouse x position - x position of mouse (virtual coordinates)
  2578.       mouse y position - y position of mouse (virtual coordinates)
  2579.  
  2580.     If [report mode] is "2" and a mouse event is read from the event
  2581.     queue, the interpreter attempts to call a user function in the
  2582.     current event object with the same name as the "mouse event name"
  2583.     above, with the following arguments:
  2584.  
  2585.       mouse x position - x position of mouse (virtual coordinates)
  2586.       mouse y position - y position of mouse (virtual coordinates)
  2587.  
  2588.     The default mouse reporting mode is "2". This function returns 1 if
  2589.     successful or null if failure.
  2590.  
  2591.  
  2592.   moupos  [x position]  [y position].
  2593.  
  2594.     Sets the position of the mouse cursor on the physical screen (0,0 is
  2595.     the upper left corner). Returns 1 if success or null if failure.
  2596.  
  2597.  
  2598.   mouvis  [0/1].
  2599.  
  2600.     Shows (1) or hides (0) the mouse cursor.
  2601.  
  2602.  
  2603.   qmoupos  [options].
  2604.  
  2605.     Returns the current mouse position on the physical screen (0,0 is
  2606.     the upper left corner). The following options may be specified:
  2607.  
  2608.       x - return the x position of the mouse
  2609.       y - return the y position of the mouse
  2610.  
  2611.     If no options are specified, the default is "x".
  2612.  
  2613.  
  2614.  
  2615.   3-17  Queue Functions
  2616.   ─────────────────────
  2617.  
  2618.   Queue functions are used to control and return information about the
  2619.   interpreter event queue. Queue function names generally use the prefix
  2620.   "que".
  2621.                                                     Queue Functions   49
  2622.  
  2623.  
  2624.   que  [fun]  [arg 1]  [arg 2] ...
  2625.  
  2626.     Places the function [fun] and its arguments [arg 1], [arg 2],
  2627.     etc. on the interpreter event queue. The next time the interpreter
  2628.     is idle, it will read the event queue and attempt to call [fun] in
  2629.     the current event object. Returns 1 if success or null if failure.
  2630.  
  2631.  
  2632.   send  [fun]  [arg 1]  [arg 2] ...
  2633.  
  2634.     This function is similar to the "que" function above, except that
  2635.     the interpreter event queue is bypassed. The function [fun] in the
  2636.     current event object is called immediately. This function returns
  2637.     the result of evaluating [fun].
  2638.  
  2639.  
  2640.   queobj  [obj]  [fun]  [arg 1]  [arg 2] ...
  2641.  
  2642.     This function works similar to the "que" function above, except that
  2643.     the interpreter attempts to call the function [fun] in the object
  2644.     [obj], not in the current event object.
  2645.  
  2646.  
  2647.   sendobj  [obj]  [fun]  [arg 1]  [arg 2] ...
  2648.  
  2649.     This function is similar to the "queobj" function above, except that
  2650.     the interpreter event queue is bypassed. The function [fun] in the
  2651.     object [obj] is called immediately. This function returns the result
  2652.     of executing the function [fun].
  2653.  
  2654.  
  2655.   quedis.
  2656.  
  2657.     This function reads the next event from the queue and "dispatches"
  2658.     it by calling the user event handler function associated with the
  2659.     event. If there is no event on the event queue, it will wait for an
  2660.     event to appear in the queue. This function returns when the user
  2661.     event handler function returns.
  2662.  
  2663.     If the function "quequi" (see below) is called in the user event
  2664.     handler, this function returns "0", otherwise it returns "1". This
  2665.     feature can be used to implement a dispatch loop which is not
  2666.     terminated until the "quequi" function is called. For example:
  2667.  
  2668.       while (quedis).
  2669.  
  2670.     The loop above will continue to dispatch events from the event queue
  2671.     until a user function calls "quequi".
  2672.                                                     Queue Functions   50
  2673.  
  2674.  
  2675.   quequi.
  2676.  
  2677.     Forces the "quedis" function (see above) to return null.
  2678.  
  2679.  
  2680.   quesiz  [size].
  2681.  
  2682.     Sets the interpreter event queue size to [size] events. The default
  2683.     size is 20 when the interpreter is invoked. Returns 1 if successful
  2684.     or null if failure.
  2685.  
  2686.  
  2687.  
  2688.   3-18  Video Functions
  2689.   ─────────────────────
  2690.  
  2691.   Video functions are used to control and return information about the
  2692.   video device. Video function names use the prefix "vid".
  2693.  
  2694.  
  2695.   vidcsz  [start]  [end].
  2696.  
  2697.     Sets the physical cursor size on the screen. [start] and [end]
  2698.     indicate the distance of the top and bottom of the cursor from the
  2699.     top of the character cell, on a scale of 0 to 100. For example,
  2700.     "vidcsz 0 100" sets the cursor size to the entire character cell.
  2701.  
  2702.     Specifying -1 for both [start] and [end] hides the cursor.
  2703.  
  2704.  
  2705.   vidbli  [0/1].
  2706.  
  2707.     Turns the video blink mode ON (1), or OFF (0). The video blink mode
  2708.     determines whether or not color attributes above 127 blink on and
  2709.     off. The video blink mode is OFF by default.
  2710.  
  2711.  
  2712.   vidfon  [columns]  [rows]  [back attr]  [back fill]  [options].
  2713.  
  2714.     Changes the video mode and/or sets the background color attribute
  2715.     and background fill string. You can do either operation separately
  2716.     or together.
  2717.  
  2718.     If [option] "c" is specified, the screen is captured and restored
  2719.     when exiting the interpreter.
  2720.  
  2721.     When changing the video mode, both [columns] and [rows] must be
  2722.     non-zero. [columns] may be 40 or 80 and [rows] may be 12, 14, 21,
  2723.     25, 28, 43, or 50. If [columns] or [rows] are zero or null, the
  2724.     video mode is not changed.
  2725.                                                     Video Functions   51
  2726.  
  2727.  
  2728.     To change the background attribute or fill string, specify the
  2729.     background color attribute [back attr] and fill string [back fill].
  2730.     If [back attr] is not specified, a value of 0 (black) is used. If
  2731.     [back fill] is not specified, a blank (ascii 32) is used. If neither
  2732.     are specified, the current background remains unchanged.
  2733.  
  2734.     Note: the string [back fill] can be a maximum of 50 chars long.
  2735.  
  2736.     This function returns 1 if successful or null if failure.
  2737.  
  2738.  
  2739.   vidorg  [x]  [y]  [options].
  2740.  
  2741.     Changes the mapping of the physical video device (the screen) to the
  2742.     virtual video device (the virtual screen is 64k x 64k characters).
  2743.     [x] and [y] specify the left and top positions of the physical
  2744.     device within the virtual device. The following [options] may be
  2745.     specified:
  2746.  
  2747.       r - [x] and [y] specify a mapping relative to the current mapping
  2748.       a - [x] and [y] specify an absolute mapping. In this case, [x] and
  2749.           [y] are referred to as "virtual coordinates".
  2750.  
  2751.     For example, "vidorg 12000 17896 %a" maps the top left corner of the
  2752.     screen to (12000, 17896) on the virtual screen.
  2753.  
  2754.     If no [options] are specified, the default option is "r".
  2755.  
  2756.     When the editor is invoked, the default mapping is (16000,16000).
  2757.     This function returns 1 if success or null if failure.
  2758.  
  2759.  
  2760.   vidpri  [string]  [x]  [y]  [attr]  [options]
  2761.  
  2762.     Prints the string [string] on the screen background at position [x],
  2763.     [y] using the color attribute [attr]. The following [options] may be
  2764.     specified:
  2765.  
  2766.       a - [x] and [y] are in absolute virtual screen coordinates.
  2767.       d - [x] and [y] are in physical device coordinates, with (0,0)
  2768.           as the left and top.
  2769.  
  2770.     If no [options] are specified, the default is "d". This function
  2771.     returns 1 if successful or null if failure.
  2772.  
  2773.  
  2774.   vidbor  [attr].
  2775.  
  2776.     Sets the screen overscan border color to [attr].
  2777.                                                     Video Functions   52
  2778.  
  2779.  
  2780.   vidoff.
  2781.  
  2782.     Turns off the video device. All screen updates are deferred until
  2783.     the function "vidon" is called.
  2784.  
  2785.  
  2786.   vidon.
  2787.  
  2788.     Turns on the video device.
  2789.  
  2790.  
  2791.   qvidmon.
  2792.  
  2793.     Returns 1 if the video device is in monochrome mode, otherwise it
  2794.     returns null.
  2795.  
  2796.  
  2797.   qvidp  [options].
  2798.  
  2799.     Returns the video parameter specified in [options]. One of the
  2800.     following [options] may be specified:
  2801.  
  2802.       l - returns the left virtual coordinate of the physical screen
  2803.       t - returns the top virtual coordinate of the physical screen
  2804.       r - returns the right virtual coordinate of the physical screen
  2805.       b - returns the bottom virtual coordinate of the physical screen
  2806.       x - returns the width of the screen
  2807.       y - returns the height of the screen
  2808.       k - returns the video blink mode (0=off, 1=on)
  2809.                                               Text Buffer Functions   53
  2810.  
  2811.  
  2812.   3-19  Text Buffer Functions
  2813.   ───────────────────────────
  2814.  
  2815.   Text buffer functions are used to control and return information about
  2816.   text buffers. A text buffer is a group of one or more lines of text
  2817.   and is used for editing files. There are many functions for creating,
  2818.   modifying, and destroying text buffers. Text buffer function names
  2819.   generally use the prefix "tex".
  2820.  
  2821.   Any number of text buffers can be created. Text buffers are organized
  2822.   into a global "text buffer list". The "default" text buffer is always
  2823.   at the top of the list.
  2824.  
  2825.   Text buffers are identified by a "text buffer name". Specifying a null
  2826.   text buffer name for any of the text buffer functions indicates that
  2827.   the "default" text buffer should be used.
  2828.  
  2829.   Note that changes made to a text buffer with these functions are not
  2830.   automatically displayed in any windows which might be associated with
  2831.   the text buffer. You must use the "windra" or "texdra" functions to
  2832.   update the window (see "Window Functions").
  2833.  
  2834.  
  2835.   texcre  [text buffer]  [line 1]  [line 2] ...
  2836.  
  2837.     Creates a new text buffer with the name [text buffer]. The new text
  2838.     buffer becomes the default text buffer. The arguments [line 1],
  2839.     [line 2], etc are the initial lines to be placed in the text buffer.
  2840.     If no initial lines are specified, the text buffer is created with
  2841.     one blank line.
  2842.  
  2843.     Returns 1 if successful or 0 if failure.
  2844.  
  2845.  
  2846.   texmen  [text buffer]  [line 1]  [line 2] ...
  2847.  
  2848.     Creates a new menu text buffer with the name [text buffer]. The new
  2849.     text buffer becomes the default text buffer. The arguments [line 1],
  2850.     [line 2], etc are the initial lines to place on the menu (see the
  2851.     section "Defining Menus" in The Aurora Editor Users Guide).
  2852.  
  2853.     Returns 1 if successful or 0 if failure.
  2854.  
  2855.  
  2856.   texdes  [text buffer].
  2857.  
  2858.     Destroys [text buffer] and all marks and windows associated with
  2859.     [text buffer]. The previous text buffer becomes the default text
  2860.     buffer. Returns 1 if successful or 0 if failure.
  2861.                                               Text Buffer Functions   54
  2862.  
  2863.  
  2864.   texloa  [text buffer]  [filename]  [options]  [line number]
  2865.           [delimiter]  [trunc length].
  2866.  
  2867.     Creates a new text buffer from the file [filename], or inserts the
  2868.     file [filename] into an existing text buffer. If [filename] contains
  2869.     wildcards or specifies a directory, then a directory listing is
  2870.     loaded. The "qtexdir" function can be used to return information
  2871.     about the directory listing.
  2872.  
  2873.     If [text buffer] does not exist, then a new text buffer with the
  2874.     name [text buffer] is created, and the file [filename] is loaded
  2875.     into it. The new text buffer becomes the default text buffer.
  2876.  
  2877.     If [text buffer] is an existing text buffer, then the file
  2878.     [filename] is inserted into [text buffer] after the line [line
  2879.     number]. If [line number] is 0 then it is inserted before the first
  2880.     line. If [line number] is -1 then it is inserted after the last
  2881.     line.
  2882.  
  2883.     The following [options] may be specified:
  2884.  
  2885.       b - the [delimiter] argument specifies a 1-byte line delimiter
  2886.       w - the [delimiter] argument specifies a 2-byte line delimiter
  2887.       h - include hidden files when loading a directory listing
  2888.       d - include subdirectories when loading a directory listing
  2889.       k - convert file sizes to 1K increments when loading a directory
  2890.           listing
  2891.       a - ignore the argument [filename] and load an internal ascii
  2892.           chart
  2893.  
  2894.     If options "b" or "w" are specified then [delimiter] specifies a
  2895.     byte or word line delimiter used to define the end of each line
  2896.     when loading the file.
  2897.  
  2898.     If options "b" or "w" are not specified and [delimiter] is zero,
  2899.     then the line delimiter defaults to "0D0Ah" (carriage return -
  2900.     linefeed).
  2901.  
  2902.     If options "b" or "w" are not specified and [delimiter] is greater
  2903.     than zero, then [delimiter] specifies the binary line length, and
  2904.     the file is loaded in "binary mode".
  2905.  
  2906.     [trunc length] specifies the maximum line length that can be loaded
  2907.     before wrapping to the next line. The maximum line length can not
  2908.     exceed 16000. If [trunclength] is zero or not specified, then a
  2909.     maximum line length of 16000 is assumed.
  2910.  
  2911.     This function returns 1 if a file was loaded, 2 if a directory
  2912.     listing was loaded, or null if failure.
  2913.                                               Text Buffer Functions   55
  2914.  
  2915.  
  2916.   texnam  [text buffer]  [new text buffer].
  2917.  
  2918.     Renames the text buffer [text buffer] to [new text buffer]. Returns
  2919.     1 if success or null if failure.
  2920.  
  2921.  
  2922.   texdra  [text buffer]  [line number].
  2923.  
  2924.     Draws the client area of all windows which currently display the
  2925.     text buffer [text buffer].
  2926.  
  2927.     If [line number] is specified, only the specified line number is
  2928.     drawn (this is faster than drawing all lines of the text buffer). If
  2929.     [line number] is -1, the line drawn is the line at the default
  2930.     cursor mark for the text buffer.
  2931.  
  2932.     Returns 1 if successful or 0 if failure.
  2933.  
  2934.  
  2935.   textop  [text buffer].
  2936.  
  2937.     Makes the text buffer [text buffer] the default text buffer by
  2938.     moving it to the top of the text buffer list. The default text
  2939.     buffer can be easily referenced in any text buffer function by
  2940.     specifying "null" for the [text buffer] argument.
  2941.  
  2942.  
  2943.   texdty  [text buffer]  [options].
  2944.  
  2945.     Sets or clears the dirty flag for the text buffer [text buffer]. The
  2946.     dirty flag is set automatically by any function which modifies the
  2947.     text buffer, and can be retrieved with the "qtexdty" function (see
  2948.     below). The following options can be specified:
  2949.  
  2950.       c - clear the dirty flag
  2951.       s - set the dirty flag
  2952.  
  2953.     If no options are specified, the default is "s".
  2954.  
  2955.  
  2956.   texdlm  [text buffer]  [delimiter]  [options].
  2957.  
  2958.     Sets the default byte or word line delimiter associated with the
  2959.     text buffer [text buffer]. The following options can be specified:
  2960.  
  2961.       b - [delimiter] is a 1-byte delimiter.
  2962.       w - [delimiter] is a 2-byte delimiter.
  2963.  
  2964.     If no [options] are specified and [delimiter] is non-zero, then
  2965.     [text buffer] will have no delimiter.
  2966.                                               Text Buffer Functions   56
  2967.  
  2968.  
  2969.   texusz  [text buffer]  [size].
  2970.  
  2971.     Sets the size of the undo/redo stack associated with the text buffer
  2972.     [text buffer]. The default size is zero.
  2973.  
  2974.  
  2975.   texovl  [text buffer]  [x]  [y]  [string].
  2976.  
  2977.     Overlays the string [string] at column [x], line [y] of the text
  2978.     buffer [text buffer]. If [x] or [y] are null, then the column and
  2979.     line of the default cursor mark are assumed. Returns 1 if success or
  2980.     null if failure.
  2981.  
  2982.  
  2983.   texinsx  [text buffer]  [x]  [y]  [string].
  2984.  
  2985.     Inserts the string [string] horizontally at column [x], line [y] of
  2986.     the text buffer [text buffer]. If [x] or [y] are null, then the
  2987.     column and line of the default cursor mark are assumed. Returns 1 if
  2988.     success or null if failure.
  2989.  
  2990.  
  2991.   texinsy  [text buffer]  [x]  [y]  [string]  [reps].
  2992.  
  2993.     Inserts the string [string] vertically at column [x] after line [y]
  2994.     of the text buffer [text buffer]. If [x] or [y] are null, then the
  2995.     column and line of the default cursor mark are assumed. [reps]
  2996.     indicates the number of lines to be inserted (if 0 or null is
  2997.     specified, one line is inserted). Returns 1 if success or null
  2998.     if failure.
  2999.  
  3000.  
  3001.   texdelx   [text buffer]  [x]  [y]  [length].
  3002.  
  3003.     Deletes the 1-line text segment of length [length] at column [x],
  3004.     line [y] of the text buffer [text buffer]. If [x] or [y] are null,
  3005.     then the column and line of the default cursor mark are assumed.
  3006.     Returns 1 if success or null if failure.
  3007.  
  3008.  
  3009.   texdely  [text buffer]  [y]  [reps].
  3010.  
  3011.     Deletes [reps] number of lines starting with line [y] in the text
  3012.     buffer [text buffer]. If [reps] is null or zero, then one line is
  3013.     deleted. If [y] is null then the line number of the default cursor
  3014.     mark is assumed. Returns 1 if success or null if failure.
  3015.                                               Text Buffer Functions   57
  3016.  
  3017.  
  3018.   qtex  [text buffer].
  3019.  
  3020.     Returns 1 if the text buffer [text buffer] exists, or null if it
  3021.     does not exist.
  3022.  
  3023.  
  3024.   qtexlin  [text buffer]  [line number]  [a]  [b].
  3025.  
  3026.     Returns a copy of the line [line number] from column [a] through
  3027.     column [b] in the text buffer [text buffer]. If [line number] is
  3028.     null or zero, then the line number of the default cursor mark is
  3029.     assumed. If [a] is null or zero, then "1" is used for [a]. If [b] is
  3030.     null or zero, then the line length used for [b]. This function
  3031.     returns null if failure.
  3032.  
  3033.  
  3034.   qtexend  [text buffer].
  3035.  
  3036.     Returns the number of lines in the text buffer [text buffer].
  3037.  
  3038.  
  3039.   qtexpre  [text buffer].
  3040.  
  3041.     Returns the previous text buffer before [text buffer] in the text
  3042.     buffer list. Returns null if [text buffer] is the last text buffer
  3043.     in the list.
  3044.  
  3045.  
  3046.   qtexdty  [text buffer].
  3047.  
  3048.     Returns 1 if the text buffer [text buffer] has been modified, or
  3049.     null if it has not been modified.
  3050.  
  3051.  
  3052.   qtextru  [text buffer].
  3053.  
  3054.     Returns 1 if the text buffer [text buffer] has been truncated during
  3055.     execution of the function "texloa". This can occur by interrupting
  3056.     "texloa" with <Ctrl-Break>, or when the system is out of space. This
  3057.     function returns null if [text buffer] has not been truncated.
  3058.  
  3059.  
  3060.   qtexbeg  [text buffer]  [line number].
  3061.  
  3062.     Returns the column position of the first non-blank character of line
  3063.     [line number] in the text buffer [text buffer]. If [line number] is
  3064.     zero or null, the line number of the default cursor mark is assumed.
  3065.                                               Text Buffer Functions   58
  3066.  
  3067.  
  3068.   qtexlen  [text buffer]  [line number].
  3069.  
  3070.     Returns the length of line [line number] in the text buffer [text
  3071.     buffer]. If [line number] is zero or null, the line number of the
  3072.     default cursor mark is assumed.
  3073.  
  3074.  
  3075.   qtexfld  [text buffer]  [line number]  [rel]  [options].
  3076.  
  3077.     If [rel] is not specified, this function returns the number of lines
  3078.     in the text fold beginning or ending at the line [line number].
  3079.  
  3080.     If [rel] is specified, the value of [rel] may be a positive or
  3081.     negative integer. The following [options] may also be specified:
  3082.  
  3083.       a - returns the line number that is the "apparent" distance of
  3084.           [rel] lines away from [line number]. The "apparent" distance
  3085.           is the visible distance on the screen (text folds count as one
  3086.           line).
  3087.       v - returns the "apparent" line number that is the actual distance
  3088.           of [rel] lines away from [line number].
  3089.       r - this option can be specified with options "a" or "v". It
  3090.           indicates the relative distance away from [line number] is to
  3091.           be returned, not a line number.
  3092.  
  3093.     If no [options] are specified, the default is "a".
  3094.  
  3095.     If [line number] is zero or null, the line number of the default
  3096.     cursor mark is assumed.
  3097.  
  3098.  
  3099.   qtextop.
  3100.  
  3101.     Returns the default text buffer at the "top" of the text buffer
  3102.     list.
  3103.  
  3104.  
  3105.   qtexmrk  [text buffer]  [options].
  3106.  
  3107.     Returns the default mark or cursor mark at the "top" of the mark
  3108.     list associated with the text buffer [text buffer]. The following
  3109.     [options] may be specified:
  3110.  
  3111.       c - returns the first cursor mark on the mark list
  3112.       m - returns the first non-cursor mark on the mark list
  3113.  
  3114.     If no options are specified, then the first mark on the mark list is
  3115.     returned (cursor mark or non-cursor mark).
  3116.                                               Text Buffer Functions   59
  3117.  
  3118.  
  3119.     Note: if there are any cursor marks associated with the text buffer,
  3120.     the interpreter always places them "ahead" of non-cursor marks on
  3121.     the mark list, so that calling this function with no [options] will
  3122.     always return a cursor mark.
  3123.  
  3124.  
  3125.   qtexbin  [text buffer].
  3126.  
  3127.     Returns the binary line length associated with the text buffer [text
  3128.     buffer]. If [text buffer] was not loaded in "binary mode", then this
  3129.     function returns null.
  3130.  
  3131.  
  3132.   qtexmen  [text buffer]  [line number]  [options].
  3133.  
  3134.     Returns information about the menu text buffer [text buffer] created
  3135.     with the "texmen" function. If [line number] is null or zero, the
  3136.     line number of the default cursor mark is assumed. The following
  3137.     [options] may be specified:
  3138.  
  3139.       c - return the position of the highlight character at [line
  3140.           number]
  3141.       w - return the menu width
  3142.       n - return the menu item description at [line number]
  3143.       f - return the macro code for the menu item at [line number]
  3144.       y - return last cursor position on the menu text buffer
  3145.  
  3146.     (see also "Defining Menus" in The Aurora Editor Users Guide).
  3147.  
  3148.  
  3149.   qtexdir  [options].
  3150.  
  3151.     Returns information about the most recently loaded directory listing
  3152.     loaded with the "texloa" function. The following options may be
  3153.     specified:
  3154.  
  3155.       d - return the number of subdirectories in the directory listing
  3156.       f - return the number of files in the directory listing
  3157.       s - return the sum of all the file sizes in the directory listing
  3158.  
  3159.  
  3160.   undbeg.
  3161.  
  3162.     Marks the beginning of a series of "tex" and "mrk" function calls
  3163.     which are considered to be one "undoable/redoable" operation. The
  3164.     current cursor mark position, and window size and position (if
  3165.     applicable) will be saved with the "undoable" operation.
  3166.                                               Text Buffer Functions   60
  3167.  
  3168.  
  3169.     The "undend" function (see below) marks the end of the "undoable"
  3170.     series of function calls.
  3171.  
  3172.  
  3173.   undend.
  3174.  
  3175.     Marks the end of a series of "tex" and "mrk" function calls started
  3176.     by the "undbeg" function (see above) which are to be considered as
  3177.     one "undoable" operation. All of the information required to "undo"
  3178.     the function calls between "undbeg" and "undend" is pushed onto an
  3179.     internal undo/redo stack.
  3180.  
  3181.  
  3182.   und  [text buffer]  [options].
  3183.  
  3184.     Restores the most recent changes made to the text buffer [text
  3185.     buffer] that were recorded with the "undbeg" and "undend" functions
  3186.     (see above). The following options may be specified:
  3187.  
  3188.       u - restores the most recent modification to the text buffer
  3189.       r - reverses the effects of the last "und %u" function call
  3190.  
  3191.     If no [options] are specified, the default is "u". This function
  3192.     returns 1 if success or null if failure.
  3193.                                                      Mark Functions   61
  3194.  
  3195.  
  3196.   3-20  Mark Functions
  3197.   ────────────────────
  3198.  
  3199.   Mark functions are used to control and return information about
  3200.   "marks". A mark defines an area of text within a specific text buffer,
  3201.   or specifies a "cursor" position in a text buffer. There are many
  3202.   functions for creating, modifying, and destroying marks. Mark function
  3203.   names use the prefix "mrk".
  3204.  
  3205.   Any number of marks can be associated with a text buffer. Marks are
  3206.   organized into a "mark list" attached to the text buffer. The
  3207.   "default" mark is at the top of the list.
  3208.  
  3209.   Marks are identified by a "mark name". Specifying a null mark name for
  3210.   any of the mark functions indicates that the default mark should be
  3211.   used.
  3212.  
  3213.   Using the mark functions, operations on text buffers can be restricted
  3214.   to the areas of text defined by the marks. "Cursor marks" are a
  3215.   special type of mark used to specify movable cursor positions within a
  3216.   text buffer. A Window can be attached to a text buffer via cursor
  3217.   marks (see "Window Functions").
  3218.  
  3219.   Note that changes made to a text buffer with these functions are not
  3220.   automatically displayed in any windows associated with the text
  3221.   buffer. You must use the "windra" or "texdra" functions to update the
  3222.   window (see "Text Buffer Functions" and "Window Functions").
  3223.  
  3224.  
  3225.   mrkset  [mark]  [options]  [text buffer]  [l]  [t]  [r]  [b]
  3226.           [s]  [e].
  3227.  
  3228.     Creates a new mark with the name [mark] for the text buffer [text
  3229.     buffer], or modifies the mark if it already exists. If a new
  3230.     "cursor" mark is created, it becomes the default mark for the text
  3231.     buffer. Cursor marks are always placed ahead of non-cursor marks on
  3232.     text buffer's mark list.
  3233.  
  3234.     [l], [t], [r], [b] are the left, top, right, and bottom coordinates
  3235.     of the mark, relative to the top-left corner of the text buffer. [s]
  3236.     and [e] are the start and end positions on the first and last lines
  3237.     of the mark. [s] and [e] are currently used only by the "mrkfin"
  3238.     function.
  3239.  
  3240.     If [l] or [t] are null or zero, then the column and line of the
  3241.     default cursor mark in the text buffer are used. If [r] or [b] are
  3242.     null or zero, then [l] and [t] are used. If [s] or [e] are null or
  3243.     zero, then the left and right boundaries of the resulting mark are
  3244.     used.
  3245.                                                      Mark Functions   62
  3246.  
  3247.  
  3248.     The following [options] can be specified:
  3249.  
  3250.       c - the mark is a "cursor" mark, used to mark a movable position
  3251.           in a text buffer. The cursor mark becomes the default mark for
  3252.           the text buffer
  3253.       i - places the mark in "insert" mode if it is a cursor mark. If
  3254.           this option is not specified, the cursor mark is placed in
  3255.           "overlay" mode.
  3256.       r - the mark is a rectangular or "column" mark. If this option is
  3257.           not specified, the mark is a "line" mark.
  3258.       h - the mark is "hidden"
  3259.  
  3260.     This function returns 1 if success or null if failure.
  3261.  
  3262.  
  3263.   mrkdes  [mark].
  3264.  
  3265.     Destroys the mark [mark]. If [mark] was the default mark, then the
  3266.     previous mark in the mark list becomes the default mark. Returns 1
  3267.     if success or null if failure.
  3268.  
  3269.  
  3270.   mrknam  [mark]  [new mark].
  3271.  
  3272.     Renames the mark [mark] to [new mark]. Returns 1 if success or null
  3273.     if failure.
  3274.  
  3275.  
  3276.   mrktop  [mark].
  3277.  
  3278.     Makes the cursor mark [mark] the default mark by moving it to the
  3279.     top of the mark list. A non-cursor mark can only be made the default
  3280.     mark if no cursor mark exists for the text buffer.
  3281.  
  3282.  
  3283.   mrkcol  [mark]  [attr].
  3284.  
  3285.     Changes the display color for the mark [mark] to [attr]. If this
  3286.     function is not called, then the mark color is determined by the
  3287.     "wincol" function (see "Window Functions"). This call allows marks
  3288.     to have different colors. Returns 1 if success or null if failure.
  3289.  
  3290.  
  3291.   mrkdel  [mark].
  3292.  
  3293.     Deletes the text inside the mark [mark], and the mark itself. For
  3294.     "line" marks, this function deletes all lines in the mark. For
  3295.     rectangular or "column" marks, this function deletes all columns in
  3296.     the mark and shifts all columns to the right into the vacated area.
  3297.  
  3298.     Returns 1 if success or null if failure.
  3299.                                                      Mark Functions   63
  3300.  
  3301.  
  3302.   mrkins  [mark]  [text buffer]  [x]  [y].
  3303.  
  3304.     Copies the text inside the mark [mark] to column [x] line [y] in the
  3305.     text buffer [text buffer].
  3306.  
  3307.     If [text buffer] is not specified, then the text buffer associated
  3308.     with [mark] is assumed. If [x] or [y] is not specified, then the
  3309.     column and line of the default cursor mark for the text buffer are
  3310.     assumed.
  3311.  
  3312.     For "line" marks, the new text is inserted vertically into [text
  3313.     buffer] after line [y]. For rectangular or "column" marks the new
  3314.     text is inserted horizontally into [text buffer] at column [x], line
  3315.     [y].
  3316.  
  3317.     Returns 1 if success or null if failure.
  3318.  
  3319.  
  3320.   mrkmov  [mark]  [text buffer]  [x]  [y].
  3321.  
  3322.     Moves the text inside the mark [mark] to column [x] line [y] in the
  3323.     text buffer [text buffer]. The mark itself is moved along with the
  3324.     text.
  3325.  
  3326.     If [text buffer] is not specified, then the text buffer associated
  3327.     with [mark] is assumed. If [x] or [y] is not specified, then the
  3328.     column and line of the default cursor mark for the text buffer are
  3329.     assumed.
  3330.  
  3331.     For "line" marks, the text is moved vertically into [text buffer]
  3332.     after line [y]. For rectangular or "column" marks the text is moved
  3333.     horizontally into [text buffer] at column [x], line [y].
  3334.  
  3335.     Returns 1 if success or null if failure.
  3336.  
  3337.  
  3338.   mrkovl  [mark]  [text buffer]  [x]  [y].
  3339.  
  3340.     Overlays the text inside the mark [mark] at column [x] line [y] in
  3341.     the text buffer [text buffer].
  3342.  
  3343.     If [text buffer] is not specified, then the text buffer associated
  3344.     with [mark] is assumed. If [x] or [y] is not specified, then the
  3345.     column and line of the default cursor mark for the text buffer are
  3346.     assumed.
  3347.  
  3348.     Returns 1 if success or null if failure.
  3349.                                                      Mark Functions   64
  3350.  
  3351.  
  3352.   mrkshf  [mark]  [shift]  [fill character].
  3353.  
  3354.     Shifts the text in the mark [mark] left or right by [shift] columns
  3355.     and fills the vacated columns with [fill character]. If the value of
  3356.     [shift] is negative, then the text is shifted left, otherwise the
  3357.     text is shifted right. If [fill character] is null then blanks are
  3358.     used. Returns 1 if success or null if failure.
  3359.  
  3360.  
  3361.   mrkfil  [mark]  [fillchar]  [a]  [b].
  3362.  
  3363.     Fills the text within the mark [mark] with the character [fill
  3364.     character]. If the mark is a "line" mark, then [a] and [b] are used
  3365.     as the left and right columns for the fill. [a] and [b] are ignored
  3366.     for "column" marks.
  3367.  
  3368.     Returns 1 if success or null if failure.
  3369.  
  3370.  
  3371.   mrkcas  [mark]  [options]  [a]  [b].
  3372.  
  3373.     Changes the case of the text within the mark [mark]. If the mark is
  3374.     a "line" mark, then [a] and [b] are used as the left and right
  3375.     columns for the case change. [a] and [b] are ignored for "column"
  3376.     marks. The following [options] can be specified:
  3377.  
  3378.       l - change the text to lower case
  3379.       u - change the text to upper case
  3380.  
  3381.     Specifying both options "l" and "u" will toggle the case of each
  3382.     character in the text. If no [options] are specified, the default is
  3383.     "u".
  3384.  
  3385.     This function returns 1 if success or null if failure.
  3386.  
  3387.  
  3388.   mrkjus  [mark]  [options]  [a]  [b].
  3389.  
  3390.     Right justifies, centers, or left justifies the text within the mark
  3391.     [mark]. If the mark is a "line" mark, then [a] and [b] are used as
  3392.     the left and right columns for the justification. [a] and [b] are
  3393.     ignored for "column" marks. The following [options] can be
  3394.     specified:
  3395.  
  3396.       l - left justifies the text in the mark
  3397.       c - centers the text in the mark
  3398.       r - right justifies the text in the mark
  3399.  
  3400.     If no [options] are specified, the default is "l". This function
  3401.     returns 1 if success or null if failure.
  3402.                                                      Mark Functions   65
  3403.  
  3404.  
  3405.   mrksrt  [mark]  [options].
  3406.  
  3407.     Sorts the lines in the mark [mark]. All portions of each line are
  3408.     included in the sort, even if the mark is a "column" mark. The
  3409.     portion of each line within the mark is the sort key. The following
  3410.     options may be specified:
  3411.  
  3412.       a - ascending sort
  3413.       d - descending sort
  3414.  
  3415.     If no [options] are specified, then the default is "a". This
  3416.     function returns 1 if success or null if failure.
  3417.  
  3418.  
  3419.   mrktab  [mark]  [tab width].
  3420.  
  3421.     Expands any tab characters (ascii 9) in the mark [mark]. If the mark
  3422.     is a "column" mark, the left and right edges the mark are ignored.
  3423.     [tab width] determines how much each tab character is expanded. [tab
  3424.     width] may be 2, 4 or 8.
  3425.  
  3426.     Returns 1 if success or null if failure.
  3427.  
  3428.  
  3429.   mrkrfl  [mark]  [text buffer]  [l]  [t]  [r]  [options]  [indent].
  3430.  
  3431.     Reflows the lines in the mark [mark]. All the text within each line
  3432.     is reflowed, even if the mark is a "column" mark. The reflowed text
  3433.     is inserted into the text buffer [text buffer] after line [t]. The
  3434.     original text within the mark remains unchanged. The reflowed text
  3435.     is formatted to fit between columns [l] and [r] in [text buffer].
  3436.     [indent] specifies the number of columns to indent the first line of
  3437.     the reflowed text.
  3438.  
  3439.     If [text buffer] has been loaded in "binary mode", it cannot be
  3440.     reflowed.
  3441.  
  3442.     If [text buffer] is not specified, then the text buffer of the
  3443.     default cursor mark is assumed. If [l], [t], or [r] are not
  3444.     specified, then the column and line of the default cursor mark are
  3445.     assumed.
  3446.  
  3447.     The following [options] may be specified:
  3448.  
  3449.       b - blank lines are preserved.
  3450.       r - justifies the reflowed text on both the left and right
  3451.           boundaries.
  3452.  
  3453.     This function returns the number of lines inserted in [text buffer],
  3454.     or null if failure.
  3455.                                                      Mark Functions   66
  3456.  
  3457.  
  3458.   mrksav  [mark]  [filename]  [options]  [delimiter]  [header]  [prtini].
  3459.  
  3460.     Saves the text within mark [mark] to the file [filename]. Specifying
  3461.     a filename such as PRN, LPT1, LPT2, etc. prints the text within the
  3462.     mark. The following [options] may be specified:
  3463.  
  3464.       a - the text is appended to [filename]
  3465.       b - the argument [delimiter] specifies a byte delimiter to be
  3466.           saved after each line.
  3467.       w - the argument [delimiter] specifies a word delimiter to be
  3468.           saved after each line.
  3469.       f - each line is saved without a delimiter.
  3470.       p - specifies that the saved file is to be formatted for printing
  3471.           using the print settings specified with the "sysprt" function,
  3472.           called before this function.
  3473.       i - specifies that only the string [prtini] is to be saved. The
  3474.           text within the mark is ignored. This can be used to send an
  3475.           initialization string to the printer.
  3476.       z - saves an end-of-file (ascii 26) character at the end of
  3477.           [filename]. If option "p" is specified, then a formfeed
  3478.           character (ascii 12) is sent to the printer when printing is
  3479.           completed.
  3480.  
  3481.     If [delimiter] is not specified, the delimiter associated with the
  3482.     mark's text buffer is used (text buffers loaded in binary mode have
  3483.     no delimiter).
  3484.  
  3485.     When option "p" is specified, the argument [header] can be used to
  3486.     print a header and/or footer string. The "sysprt" function must be
  3487.     called before this function and must specify the header or footer
  3488.     options.
  3489.  
  3490.     This function returns 1 if success or null if failure.
  3491.  
  3492.  
  3493.   mrkfin  [mark]  [search string]  [replace string]  [options]
  3494.           [cursor mark].
  3495.  
  3496.     Searches the text within the mark [mark] for [search string]. If
  3497.     [replace string] is specified, then [search string] is replaced with
  3498.     [replace string]. If the cursor mark [cursor mark] is specified and
  3499.     the search string is found, then the cursor mark is moved to the
  3500.     location where the search string was found.
  3501.  
  3502.     The following [options] may be specified:
  3503.  
  3504.       i - ignore case during the search
  3505.       r - search in "reverse" from the bottom to the top of the mark
  3506.                                                      Mark Functions   67
  3507.  
  3508.  
  3509.       a - replace all occurrences of [search string] with [replace
  3510.           string]
  3511.       w - search for "whole words" only
  3512.       x - search for the first character which also occurs in the search
  3513.           string
  3514.       y - search for the first character which does not occur in the
  3515.           search string
  3516.       z - force replace, even if the replace string is null
  3517.  
  3518.     If [replace string] or option "z" was specified, the number of
  3519.     replacements is returned, otherwise the column where the search
  3520.     string was found is returned. If nothing was found then null is
  3521.     returned.
  3522.  
  3523.  
  3524.   mrkrel  [mark]  [x]  [y]  [options]  [text buffer].
  3525.  
  3526.     Relocates the mark [mark] to a new location in the text buffer [text
  3527.     buffer]. If no text buffer is specified, then the text buffer
  3528.     associated with [mark] is assumed. The following [options] may be
  3529.     specified:
  3530.  
  3531.       a - [x] and [y] specify an absolute column and line position in
  3532.           the text buffer
  3533.       r - [x] and [y] specify a relative offset from the current left
  3534.           and top coordinates of [mark].
  3535.  
  3536.     If no [options] are specified, then "r" is assumed. This function
  3537.     returns 1 if success or null if failure.
  3538.  
  3539.  
  3540.   mrkfld  [mark]  [options].
  3541.  
  3542.     Folds or unfolds the lines of text contained within the mark [mark].
  3543.     The following [options] may be specified:
  3544.  
  3545.       f - creates a new text fold containing all lines within the mark.
  3546.       u - removes text folds contained within the mark. If option "a" is
  3547.           not specified, only "top-level" text folds are removed.
  3548.       a - removes all text folds contained within the mark when
  3549.           specified with the option "u".
  3550.  
  3551.     If options "u" and "f" are both specified, existing text folds are
  3552.     removed before the new text fold is created.
  3553.  
  3554.     If no [options] are specified, then "f" is assumed. This function
  3555.     returns 1 if success or null if failure.
  3556.                                                      Mark Functions   68
  3557.  
  3558.  
  3559.   qmrk  [mark].
  3560.  
  3561.     Returns 1 if the mark [mark] exists, or null if it does not exist.
  3562.  
  3563.  
  3564.   qmrkpre  [mark]  [options].
  3565.  
  3566.     Returns a previous mark before [mark] in the mark list. The
  3567.     following [options] may be specified:
  3568.  
  3569.       c - return the previous cursor mark before [mark]
  3570.       m - return the previous non-cursor mark before [mark]
  3571.  
  3572.     If no [options] are specified, then the previous mark (cursor or
  3573.     non-cursor) is returned. This function returns null if no previous
  3574.     mark is found.
  3575.  
  3576.  
  3577.   qmrktex  [mark].
  3578.  
  3579.     Returns the text buffer in which the mark [mark] is located.
  3580.  
  3581.  
  3582.   qmrkp    [mark]  [options].
  3583.  
  3584.     Returns a coordinate of the mark [mark], or the width or height of
  3585.     the mark [mark]. The following [options] may be specified:
  3586.  
  3587.       l - returns the left-most column of the mark
  3588.       t - returns the top line number of the mark
  3589.       r - returns the right-most column of the mark
  3590.       b - returns the bottom line number of the mark
  3591.  
  3592.       x - returns the width of the mark
  3593.       y - returns the height of the mark
  3594.  
  3595.  
  3596.   qmrkcol  [mark].
  3597.  
  3598.     Returns the column position of the cursor mark [mark].
  3599.  
  3600.  
  3601.   qmrklin  [mark].
  3602.  
  3603.     Returns the line number of the cursor mark [mark].
  3604.                                                      Mark Functions   69
  3605.  
  3606.  
  3607.   qmrkins  [mark].
  3608.  
  3609.     Returns the "insert mode" of the cursor mark [mark]. Returns "i" if
  3610.     the cursor mark is in insert mode, or "o" if the cursor mark is in
  3611.     overlay mode.
  3612.  
  3613.  
  3614.   qmrktyp  [mark].
  3615.  
  3616.     Returns "l" if [mark] is a "line" mark, or "r" if [mark] is a
  3617.     rectangular or "column" mark.
  3618.  
  3619.  
  3620.   qmrkbuf  [mark].
  3621.  
  3622.     Returns a string composed of the text within the "column" mark
  3623.     [mark]. This function is ignored for "line" marks.
  3624.  
  3625.     This function will return null if the area of the column mark
  3626.     exceeds 16000.
  3627.  
  3628.  
  3629.   qmrkwin  [mark].
  3630.  
  3631.     Returns the window name associated with the cursor mark [mark].
  3632.                                                    Window Functions   70
  3633.  
  3634.  
  3635.   3-21  Window Functions
  3636.   ──────────────────────
  3637.  
  3638.   Window functions are used to control and return information about
  3639.   windows. A window is a rectangular area of the screen which can used
  3640.   to display text buffers and marks, or to display other "child"
  3641.   windows. Window function names use the prefix "win".
  3642.  
  3643.   Any number of windows can be created. Windows are organized into a
  3644.   global "window list". The "default" window is at the top of the list.
  3645.  
  3646.   Windows are identified by a "window name". Specifying a null window
  3647.   name for any of the window functions indicates that the default window
  3648.   should be used.
  3649.  
  3650.   To display a text buffer in a window, the window must be attached to a
  3651.   cursor mark associated with the text buffer. Since a text buffer may
  3652.   have any number of cursor marks, any number of windows can used to
  3653.   display different areas of the same text buffer.
  3654.  
  3655.   Note that most window functions will not actually update windows on
  3656.   the screen, unless the function description explicitly specifies that
  3657.   they do. In this case, you must use the "windra" or "texdra" functions
  3658.   to update the window (see also "Text Buffer Functions").
  3659.  
  3660.  
  3661.   winset  [window]  [options].
  3662.  
  3663.     Creates a new window with the name [window], or hides/shows an
  3664.     existing window. The following [options] may be specified:
  3665.  
  3666.       h - hide the window
  3667.       d - show the window
  3668.  
  3669.     Windows can be created as "hidden". For example:
  3670.  
  3671.       winset "abc" %h.   // creates the hidden window "abc"
  3672.  
  3673.     If no [options] are specified, the default is "d". This function
  3674.     returns 1 if success of null if failure.
  3675.  
  3676.  
  3677.   windes  [window].
  3678.  
  3679.     Destroys the window [window] and removes it from the screen. Returns
  3680.     1 if success or null if failure.
  3681.                                                    Window Functions   71
  3682.  
  3683.  
  3684.   winnam  [window]  [new window].
  3685.  
  3686.     Renames the window [window] to [new window]. Returns 1 if success or
  3687.     null if failure.
  3688.  
  3689.  
  3690.   winttl  [window]  [title]  [options]  [title id].
  3691.  
  3692.     Sets a window title to the string [title] for the window [window].
  3693.     Each window can have up to 5 titles. The argument [title id]
  3694.     specifies which title is being set. [title id] can be 1 - 5 (if the
  3695.     title id is zero, null, or not specified, then "1" is assumed). Any
  3696.     combination of the following [options] can be specified:
  3697.  
  3698.       n - sets the title on north title bar.
  3699.       s - sets the title on south title bar.
  3700.       e - sets the title on east title bar.
  3701.       w - sets the title on west title bar.
  3702.  
  3703.       l - the title is left-justified in the title bar.
  3704.       c - the title is centered in the title bar.
  3705.       r - the title is right-justified in the title bar.
  3706.  
  3707.       d - draws the window title bar containing the title immediately
  3708.           after setting the title. "windra" is not needed.
  3709.  
  3710.       x - sets the title to the "default status line". The default
  3711.           status line has the following format:
  3712.  
  3713.              [HH]  C XXXXX L YYYYY of TTTTT
  3714.  
  3715.           The status line displays information about the text buffer
  3716.           associated with the window (if any). [HH] is the hex value of
  3717.           the character at the cursor, XXXXX and YYYYY are the column
  3718.           and line positions of the cursor mark, and TTTTT is the total
  3719.           number of lines in the text buffer.
  3720.  
  3721.       h - checks for the highlight character "&". Specifying "&" before
  3722.           a character in the title indicates that it is to be
  3723.           highlighted when displayed. The "&" character itself is not
  3724.           displayed.
  3725.  
  3726.       1 - the title is not padded with any spaces (left or right).
  3727.           Normally the title is padded with one space if it is left of
  3728.           right justified.
  3729.  
  3730.       z - hides the title. This can be used to specify a title for the
  3731.           end-of-text line (see the "wineot" function).
  3732.  
  3733.     This function returns 1 if success or null if failure.
  3734.                                                    Window Functions   72
  3735.  
  3736.  
  3737.   wineot  [window]  [title id].
  3738.  
  3739.     Sets the "end-of-text" line for the window [window] to the window
  3740.     title [title id] which was previously set with the "winttl" function
  3741.     (see above). The title should be hidden with option "z" when calling
  3742.     the winttl function.
  3743.  
  3744.     If [title id] is -1, then the following default end-of-text line is
  3745.     used: "≡≡≡≡≡≡ End of Text ≡≡≡≡≡≡".
  3746.  
  3747.  
  3748.   winmen  [window]  [menu bar id]  [item 1]  [item 2] ...
  3749.  
  3750.     Defines a menu bar for the window [window]. Up to five menu bars can
  3751.     be defined for one window. [item 1], [item 2], etc. are the items to
  3752.     be placed on the menu bar. [menu bar id] specifies which of the five
  3753.     menu bars is being defined, and can be any of the following values:
  3754.  
  3755.       0 - the primary menu bar at the top of the window, under the
  3756.           north title bar (if any)
  3757.       1 - menu bar 1 underneath the primary menu bar
  3758.       2 - menu bar 2 underneath menu bar 1
  3759.       3 - menu bar 3 at the bottom of the window, above the south
  3760.           title bar (if any)
  3761.       4 - vertical menu bar 4 at the left edge of the client area
  3762.  
  3763.     Each menu bar item may contain one ampersand character (&) which is
  3764.     not displayed, but indicates that the character following it is to
  3765.     be highlighted when displayed.
  3766.  
  3767.     This function returns 1 if success or null if failure.
  3768.  
  3769.  
  3770.   winmeh  [window]  [menu bar id]  [item number].
  3771.  
  3772.     Highlights or un-highlights the menu bar item [item number] on
  3773.     menu bar [menu bar id] on the window [window]. There can only be one
  3774.     highlighted item per menu bar. [item number] is the relative
  3775.     position of the menu bar item from the beginning of the menu bar (1
  3776.     for first item, 2 for the second, and so on).
  3777.  
  3778.     If [item number] is null or zero, then the highlight is removed from
  3779.     any currently highlighted item in the menu bar.
  3780.  
  3781.     This function returns the offset (in character positions) of the
  3782.     specified menu item from the beginning of the menu bar, or null if
  3783.     failure.
  3784.                                                    Window Functions   73
  3785.  
  3786.  
  3787.   wintic  [window]  [char]  [attr]  [char]  [attr] ...
  3788.  
  3789.     Defines one-character title bar icon controls for the window
  3790.     [window]. [char] specifies the character to be displayed for each
  3791.     control and [attr] specifies the color attribute of each control. If
  3792.     [attr] is null, then the default window control color is used.
  3793.  
  3794.     Controls are normally left-justified on the title bar. If any
  3795.     control is preceded by an (@) character, then that control and any
  3796.     controls following it will be right justified on the title bar. For
  3797.     example:
  3798.  
  3799.       wintic @ "≡" @ "@" @ "".
  3800.  
  3801.     In the example above, title bar controls are defined for the default
  3802.     window using the default control colors. The control "≡" is left
  3803.     justified, while the controls "" and "" are right justified.
  3804.  
  3805.     This function returns 1 if success or null if failure.
  3806.  
  3807.  
  3808.   windra  [window]  [options]  [line number].
  3809.  
  3810.     Draws the window components specified by [options]. [line number] is
  3811.     ignored for all options except the "l" and "a" options. Any
  3812.     combination of the following [options] may be specified:
  3813.  
  3814.       b - draws the window border
  3815.       p - draws the primary menu bar only
  3816.       m - draws all window menu bars
  3817.       w - draws the west title bar
  3818.       n - draws the north title bar
  3819.       e - draws the east title bar
  3820.       s - draws the south title bar
  3821.       h - draws the horizontal scroll bar
  3822.       v - draws the vertical scroll bar
  3823.       l - draws the line [line number] in the window. If this option is
  3824.           specified and [line number] is null or zero, then the line
  3825.           number of the default cursor mark is assumed.
  3826.       t - draws the client area of the window
  3827.       a - draws the client area of all windows with the same text buffer
  3828.           as [window]. If [line number] is specified, then only
  3829.           the specified line is drawn.
  3830.       c - draws the cursor
  3831.       u - draws the cursor and updates the client area if needed
  3832.       f - draws the frame (every part of the window except the client
  3833.           area)
  3834.                                                    Window Functions   74
  3835.  
  3836.  
  3837.     This function returns 1 if success or null if failure. If option "c"
  3838.     is specified, and the client area needs updating, then 2 is
  3839.     returned.
  3840.  
  3841.  
  3842.   winmrk  [window]  [mark].
  3843.  
  3844.     Associates the cursor mark [mark] with the window [window]. Only one
  3845.     cursor mark may be associated with a window at one time. The window
  3846.     will display the text buffer associated with the cursor mark.
  3847.     Windows that are not associated with a text buffer (such as message
  3848.     boxes or dialog box windows) do not need to use this call. This
  3849.     function returns 1 if success or null if failure.
  3850.  
  3851.  
  3852.   winpar  [parent]  [child].
  3853.  
  3854.     Makes the window [parent] the "parent" window of the window [child].
  3855.  
  3856.  
  3857.   winnex  [window 1]  [window 2].
  3858.  
  3859.     Changes the order of the windows on the screen by placing [window 2]
  3860.     on top of [window 1].
  3861.  
  3862.  
  3863.   winpre  [window 1]  [window 2].
  3864.  
  3865.     Changes the order of the windows on the screen by placing [window 1]
  3866.     on top of [window 2].
  3867.  
  3868.  
  3869.   winvib  [window].
  3870.  
  3871.     Creates a local video buffer for the window [window]. This is only
  3872.     needed for windows that have child windows (such as dialog boxes).
  3873.     Creating a local video buffer for the parent window will eliminate
  3874.     screen flicker when moving the window. Returns 1 if success or null
  3875.     if failure.
  3876.  
  3877.  
  3878.   wincol  [window]  [element]  [attr]  [element]  [attr] ...
  3879.  
  3880.     Sets the colors of specific window elements for the window [window].
  3881.     [element] is a one character code specifying a part of the window,
  3882.     and can be one of the following:
  3883.                                                    Window Functions   75
  3884.  
  3885.  
  3886.       b - border
  3887.       e - border corner
  3888.       0 - north title bar
  3889.       1 - south title bar
  3890.       c - window title bar controls (default color)
  3891.       m - menus
  3892.       i - menu character highlight
  3893.       x - menu bar item highlight
  3894.       d - menu disable
  3895.       s - scroll bars
  3896.       z - end-of-text line
  3897.       t - text or client area
  3898.       h - mark (default color)
  3899.       f - text folds
  3900.  
  3901.     [attr] is the color attribute (0-255). Using negative values from -1
  3902.     to -6 for [attr] have a special meaning:
  3903.  
  3904.       -1 - do not change the current value of this attribute
  3905.       -2 - use the default value for this attribute
  3906.       -3 - increment the value of this attribute
  3907.       -4 - decrement the value of this attribute
  3908.       -5 - increment the background color for this attribute
  3909.       -6 - decrement the background color for this attribute
  3910.  
  3911.  
  3912.   winbor  [window]  [x]  [y]  [xo]  [yo]  [options].
  3913.  
  3914.     Sets the border for the window [window]. [x] is the thickness for
  3915.     the left and right borders. [y] is the thickness for the top and
  3916.     bottom borders. [xo] and [yo] are the amount of horizontal and
  3917.     vertical overlap on the border corners. The following [options] are
  3918.     available:
  3919.  
  3920.       s - changes the size of other parts of the window to accommodate
  3921.           the new border sizes. If this option is not specified, the
  3922.           entire window may grow or shrink.
  3923.  
  3924.     For the following [options], the borders are drawn using the text
  3925.     graphics characters. [x], [y], [xo], and [yo] are ignored, the
  3926.     horizontal and vertical border thickness is always 1, and there is
  3927.     no overlap on the border corners:
  3928.  
  3929.       1 - single line
  3930.       2 - double horizontal
  3931.       3 - double vertical
  3932.       4 - double line
  3933.       5 - blank
  3934.                                                    Window Functions   76
  3935.  
  3936.  
  3937.   winfra  [window]  [options]  [west title width]  [east title width]
  3938.           [west menu width]  [control location].
  3939.  
  3940.     Defines the window frame components to be displayed for the window
  3941.     [window]. [options] determine which window frame components are
  3942.     displayed. You can choose any combination of the following options:
  3943.  
  3944.       b - borders
  3945.       m - primary menu
  3946.       w - west title bar
  3947.       n - north title bar
  3948.       e - east title bar
  3949.       s - south title bar
  3950.       h - horizontal scroll bar
  3951.       v - vertical scroll bar
  3952.       1 - menu bar 1
  3953.       2 - menu bar 2
  3954.       3 - menu bar 3 (south)
  3955.       4 - menu bar 4 (west)
  3956.       z - south title controls
  3957.       > - place north title bar in the window border
  3958.  
  3959.       + - add specified options to existing window
  3960.       - - remove specified options from existing window
  3961.  
  3962.  
  3963.     The following arguments to "winfra" can also be specified:
  3964.  
  3965.       [west title width] - the width of the west title (if present)
  3966.       [east title width] - the width of the east title (if present)
  3967.       [west menu width]  - the width of the west menu bar (if present)
  3968.       [control location] - the location of the window title bar controls
  3969.                            (n=north title bar, s=south title bar)
  3970.  
  3971.  
  3972.   winshd  [window]  [bot]  [right]  [bot indent]  [right indent].
  3973.  
  3974.     Adds or removes the shadow on the right and bottom sides of the
  3975.     window [window]. [bot] and [right] specify the shadow thickness on
  3976.     the bottom and right borders. If [bot] and [right] are zero or null,
  3977.     the shadow is removed. [bot lead] and [right lead] specify the
  3978.     amount of indentation for the bottom and right shadows. Returns 1 if
  3979.     success or null if failure.
  3980.  
  3981.  
  3982.   winsh2  [window]  [attr]  [bot indent]  [right indent]
  3983.  
  3984.     Adds or removes a one-half width shadow on the right and bottom
  3985.     sides of the window [window]. This function is intended for use with
  3986.                                                    Window Functions   77
  3987.  
  3988.  
  3989.     stationary windows on a blank background (such as dialog box
  3990.     controls). [attr] is the shadow color. [bot lead] and [right lead]
  3991.     specify the amount of indentation for the bottom and right shadows.
  3992.     Returns 1 if success or null if failure.
  3993.  
  3994.  
  3995.   winscr  [window]  [x]  [y]  [options]  [reps].
  3996.  
  3997.     Scrolls the text buffer displayed in the window [window] to the
  3998.     position [x], [y]. The following [options] can be specified:
  3999.  
  4000.       r - [x] and [y] are relative to the current position (default)
  4001.       a - [x] and [y] designate the absolute column and line number
  4002.           to scroll to.
  4003.       d - the window contents are redrawn immediately after each scroll.
  4004.           There is no need to call "windra" or "texdra".
  4005.       c - the window cursor mark (if any) is moved to same extent that
  4006.           the window is scrolled.
  4007.       p - [y] is ignored and the window is scrolled up or down by the
  4008.           window height minus one line. If [y] is less than zero, the
  4009.           window is scrolled up. If [y] is greater than zero, the window
  4010.           is scrolled down.
  4011.  
  4012.     Note that this function will only redraw the window contents if the
  4013.     "d" option is specified. If the "d" option is not specified, use the
  4014.     "windra" and "texdra" functions to redraw.
  4015.  
  4016.     [reps] specifies the amount of scroll "repetitions" to occur (the
  4017.     default is 1). A value of [reps] greater than 1 used with the "d"
  4018.     option can provide for a "smooth scroll" effect.
  4019.  
  4020.     This function returns 1 if success or null if failure.
  4021.  
  4022.  
  4023.   winadj  [window]  [x]  [y].
  4024.  
  4025.     Scrolls the window [window] relative to the position of the cursor
  4026.     mark associated with the window. The cursor mark is not moved. The
  4027.     window is scrolled so that the cursor is [x] columns away from the
  4028.     left edge of the client area and [y] lines away from the top edge of
  4029.     the client area.
  4030.  
  4031.     If zero is specified for [x] or [y], the window is not scrolled in
  4032.     that dimension. If -1 is specified for [x] or [y], the window view
  4033.     is adjusted so that the cursor is placed in the center of the window
  4034.     for the specified dimension.
  4035.  
  4036.     Note that this call will not automatically redraw the text buffer in
  4037.     the window. Use the "windra" or "texdra" function to redraw the
  4038.     window.
  4039.                                                    Window Functions   78
  4040.  
  4041.  
  4042.     This function returns 1 if success or null if failure.
  4043.  
  4044.  
  4045.   winbar  [window]  [value]  [limit]  [options].
  4046.  
  4047.     Sets the thumb position on the horizontal or vertical scroll bars
  4048.     for the window [window]. If option "v" is not specified, then
  4049.     [limit] specifies the scroll bar range and [value] is the thumb
  4050.     position to set within that range. The following options may be
  4051.     specified:
  4052.  
  4053.       x - sets the thumb position on the horizontal scroll bar
  4054.       y - sets the thumb position on the vertical scroll bar
  4055.       d - draws the scroll bar immediately after setting the thumb.
  4056.           If this option is not specified, then "windra" must be used.
  4057.       v - [value] and [limit] specify the virtual x and y coordinates
  4058.           on the screen where the thumb should be set. The coordinates
  4059.           must be inside the scroll bar thumb ranges. This option can be
  4060.           used to allow the mouse to drag the scroll bar thumb.
  4061.  
  4062.     This function returns 1 if success or null if failure.
  4063.  
  4064.  
  4065.   winsiz  [window]  [l]  [t]  [r]  [b]  [reps]  [options]  [rel window].
  4066.  
  4067.     Changes the size and position of the window [window]. [l], [t], [r],
  4068.     and [t] specify the new window coordinates. The following [options]
  4069.     can be specified:
  4070.  
  4071.       r - coordinates are relative to the current window position
  4072.       a - coordinates are absolute (relative the "origin" - see below)
  4073.       c - coordinates specify the size of the client area, not the
  4074.           whole area of the window
  4075.       s - scrolls the window to keep the cursor mark visible, if
  4076.           necessary
  4077.  
  4078.     If option "a" is specified, the following options may also be
  4079.     specified:
  4080.  
  4081.       d - origin is at the top left corner of the screen
  4082.       w - origin is at the top left corner of the window [rel window]
  4083.       1 - origin is at the top left corner of the client area of the
  4084.           window [rel window]
  4085.       z - origin is at the virtual coordinates 0, 0
  4086.  
  4087.     If option "r" is specified, [reps] specifies the number of sizing
  4088.     repetitions (the default is 1).
  4089.                                                    Window Functions   79
  4090.  
  4091.  
  4092.     When a window is resized, all parts of the window are automatically
  4093.     redrawn ("windra" or "texdra" are not required). This function
  4094.     returns 1 if successful or null if failure.
  4095.  
  4096.  
  4097.   winmov  [window]  [l]  [t]  [reps]  [options]  [rel window].
  4098.  
  4099.     Moves the window [window] to the coordinates [l], [t]. This call is
  4100.     nearly identical to the function "winsiz" (see above), except that
  4101.     only the position of the window can be changed, not its relative
  4102.     size.
  4103.  
  4104.  
  4105.   wintil  [window]  [options]  [split thresh]  [limit].
  4106.  
  4107.     Tiles all windows on the screen, or "splits" the window [window]
  4108.     into tiles. [limit] specifies the maximum number of tiles. If
  4109.     [limit] is null or zero, then all windows will be tiled.
  4110.  
  4111.     [split thresh] specifies the number of splits that can occur in one
  4112.     direction before the next split occurs in a perpendicular direction.
  4113.     If [split thresh] is null or zero, then the default is 2.
  4114.  
  4115.     The following [options] may be specified:
  4116.  
  4117.       h - favor horizontal splits
  4118.       v - favor vertical splits
  4119.       l - tile only the window [window], and any windows which display
  4120.           the same text buffer as [window].
  4121.       b - reverse the tiling order by starting with the window on the
  4122.           bottom
  4123.  
  4124.     This function returns 1 if success or null if failure.
  4125.  
  4126.  
  4127.   qwin  [window].
  4128.  
  4129.     Returns 1 if the window [window] exists or null if it does not
  4130.     exist.
  4131.  
  4132.  
  4133.   qwinmrk  [window].
  4134.  
  4135.     Returns the cursor mark associated with the window [window], or null
  4136.     if failure.
  4137.  
  4138.  
  4139.   qwintex  [window].
  4140.  
  4141.     Returns the text buffer associated with the window [window], or null
  4142.     if failure.
  4143.                                                    Window Functions   80
  4144.  
  4145.  
  4146.   qwinx  [window]  [virtual x-coordinate].
  4147.  
  4148.     If [virtual x-coordinate] is specified:
  4149.       Returns the visible column number in the window [window] at the
  4150.       specified virtual x-coordinate, or null if failure.
  4151.  
  4152.     otherwise:
  4153.       Returns the left-most column number shown in the window [window].
  4154.  
  4155.  
  4156.   qwiny  [window]  [virtual y-coordinate].
  4157.  
  4158.     If [virtual y-coordinate] is specified:
  4159.       Returns the visible line number in the window [window] at the
  4160.       specified virtual y-coordinate, or null if failure.
  4161.  
  4162.     otherwise:
  4163.       Returns the top-most line number shown in the window [window].
  4164.  
  4165.  
  4166.   qwinbot.
  4167.  
  4168.     Returns the bottom-most window on the screen.
  4169.  
  4170.  
  4171.   qwintop  [options].
  4172.  
  4173.     Returns the top-most window on the screen. If no options are
  4174.     specified, the top-most "parent-less" window is returned. If option
  4175.     "z" is specified, the top-most window is returned, whether or not
  4176.     the window has a parent window (this is the "default" window at the
  4177.     top of the window list).
  4178.  
  4179.  
  4180.   qwinpre  [window]  [options].
  4181.  
  4182.     Returns the previous window in the window list before the window
  4183.     [window]. If option "z" is specified, then a child window may be
  4184.     returned, otherwise the closest window before [window] at the same
  4185.     level as [window] is returned. Returns null if failure.
  4186.  
  4187.  
  4188.   qwinnex  [window]  [options].
  4189.  
  4190.     Returns the next window in the window list after the window
  4191.     [window]. If option "z" is specified, then a child window may be
  4192.     returned, otherwise the closest window after [window] at the same
  4193.     level as [window] is returned. Returns null if failure.
  4194.                                                    Window Functions   81
  4195.  
  4196.  
  4197.   qwinpar  [window].
  4198.  
  4199.     Returns the parent window of [window] or null if failure.
  4200.  
  4201.  
  4202.   qwinchi  [window]  [options].
  4203.  
  4204.     Returns a child window of the window [window]. The following
  4205.     [options] may be specified:
  4206.  
  4207.       b - returns the bottom-most child window
  4208.       t - returns the top-most child window
  4209.  
  4210.     This function returns null if [window] has no child windows.
  4211.  
  4212.  
  4213.   qwinttl  [window]  [title id]  [options].
  4214.  
  4215.     Returns the title string specified by [title id] for the window
  4216.     [window]. if option "h" is specified, then this function returns the
  4217.     highlighted position within the title string (if any).
  4218.  
  4219.  
  4220.   qwincol  [window]  [element].
  4221.  
  4222.     Returns the numeric color attribute of the element [element] for the
  4223.     window [window]. See the function "wincol" for a list of one
  4224.     character element codes.
  4225.  
  4226.  
  4227.   qwinbor  [window]  [options].
  4228.  
  4229.     Returns the border thickness or border type for the window [window].
  4230.     One of the following [options] can be specified:
  4231.  
  4232.       x - returns the width of the left and right borders
  4233.       y - returns the height of the top and bottom borders
  4234.       t - returns the border type (see the "winbor" function)
  4235.  
  4236.  
  4237.   qwinp  [window]  [options].
  4238.  
  4239.     Returns the virtual coordinates, width, or height of [window]
  4240.     [options] can be any of the following:
  4241.  
  4242.       0 - returns a main window coordinate
  4243.       1 - returns a client window coordinate
  4244.                                                    Window Functions   82
  4245.  
  4246.  
  4247.       l - returns the left coordinate of the window
  4248.       t - returns the top coordinate of the window
  4249.       r - returns the right coordinate of the window
  4250.       b - returns the bottom coordinate of the window
  4251.  
  4252.       x - returns the width of the window (the width of the client area
  4253.           if option "1" is specified)
  4254.       y - returns the height of the window (the height of the client
  4255.           area if option "1" is specified)
  4256.       d - returns the height or width of the "visible" portion of the
  4257.           the window on the screen, when used with the "x" or "y"
  4258.           options above
  4259.  
  4260.  
  4261.   qwinfra  [window]  [component].
  4262.  
  4263.     Tests for the presence of the frame component [component] in the
  4264.     window [window]. See the function "winfra" for a list of one
  4265.     character component codes. This function returns a non-zero value if
  4266.     the specified [component] is present, otherwise null is returned.
  4267.  
  4268.  
  4269.   qwinrgn  [window]  [x]  [y].
  4270.  
  4271.     Returns an integer code identifying the region of the window
  4272.     [window] containing the virtual coordinates [x] and [y]. This
  4273.     function is useful for determining the window region on which a
  4274.     mouse click occurred. The following table shows the integer codes
  4275.     and the corresponding window regions.
  4276.                                                    Window Functions   83
  4277.  
  4278.  
  4279.       code         region
  4280.       ────         ──────
  4281.  
  4282.         0          [x], [y] are not in the window
  4283.         1          client area
  4284.  
  4285.         2          north border
  4286.         3          east border
  4287.  
  4288.         4          south border
  4289.         5          west border
  4290.         6          northwest border corner
  4291.         7          northeast border corner
  4292.         8          southeast border corner
  4293.         9          southwest border corner
  4294.  
  4295.        11          north title bar
  4296.        12          south title bar
  4297.        13          west title
  4298.        14          east title
  4299.  
  4300.        19          vertical & horizontal scroll bar intersection
  4301.  
  4302.        21          vert scroll bar up arrow
  4303.        22          vert scroll bar down arrow
  4304.        23          vert scroll bar page-up bar
  4305.        24          vert scroll bar page-down bar
  4306.        25          vert scroll bar thumb
  4307.  
  4308.        31          horz scroll bar left arrow
  4309.        32          horz scroll bar right arrow
  4310.        33          horz scroll bar page-left bar
  4311.        34          horz scroll bar page-right bar
  4312.        35          horz scroll bar thumb
  4313.  
  4314.        51 - 100    window title bar controls from left to right
  4315.  
  4316.        101- 200    primary menu bar items from left to right
  4317.        201- 300    menu bar 1 items from left to right
  4318.        301- 400    menu bar 2 items from left to right
  4319.        401- 500    menu bar 3 items from left to right
  4320.        501- 600    menu bar 4 items from top to bottom
  4321.  
  4322.  
  4323.   qwinbar  [window]  [limit]  [options].
  4324.  
  4325.     Returns the current position of the scroll bar thumb in the range
  4326.     0 - [limit] for the window [window]. The following [options] can be
  4327.     specified:
  4328.                                                    Window Functions   84
  4329.  
  4330.  
  4331.       x - horizontal scroll bar
  4332.       y - vertical scroll bar
  4333.  
  4334.     If no [options] are specified, the default is "y".
  4335.  
  4336.  
  4337.   qwincnt  [window].
  4338.  
  4339.     Returns the number of child windows for the parent window [window].
  4340.     If [window] is null, this function returns the total number of
  4341.     "parent-less" windows in the window list.
  4342.  
  4343.  
  4344.   qwinmen  [window]  [menu bar id]  [options]  [item].
  4345.  
  4346.     Returns information about the menu bar [menu bar id] on the window
  4347.     [window]. [item] is an integer specifying the relative position of a
  4348.     menu bar item from the beginning of the menu bar. If [item] is not
  4349.     specified, the currently highlighted menu bar item (if any) is
  4350.     assumed. The following [options] may be specified:
  4351.  
  4352.       s - returns the menu bar item string for [item]
  4353.       o - returns the offset (in columns) of [item] from the beginning
  4354.           of the menu bar
  4355.       c - returns the highlighted character for [item]
  4356.       n - returns the total number of menu bar items
  4357.  
  4358.  
  4359.   qwintic  [window]  [n].
  4360.  
  4361.     This function returns the "[n]th" one-character title bar control
  4362.     that was specified with the "wintic" function. For the left-most
  4363.     title bar control, n is "1".
  4364.                     The Aurora Macro Language and The Aurora Editor   85
  4365.  
  4366.  
  4367.   A-1  The Aurora Macro Language and The Aurora Editor
  4368.   ────────────────────────────────────────────────────
  4369.  
  4370.   This section describes some aspects of The Aurora Editor from the
  4371.   point of view of The Aurora Macro Language.
  4372.  
  4373.  
  4374.   The Aurora Editor is itself a compiled macro language program
  4375.   contained in the file A.X. The programs A.EXE and A3.EXE are macro
  4376.   language interpreters which execute A.X.
  4377.  
  4378.   The main macro source file for A.X is the file A.A. The file A.A does
  4379.   very little except to include ACFG.A (configuration settings), AMEN.A
  4380.   (menu definitions), ALIB.X, (compiled editor library functions), and
  4381.   AKBD.A (keyboard and mouse definitions). When A.A is compiled, all of
  4382.   the above files are combined and A.X is generated.
  4383.  
  4384.   When The Aurora Editor is initially started from the DOS command line,
  4385.   A.X is executed and the following things happen:
  4386.  
  4387.   - The configuration settings (in ACFG.A) are placed in the object
  4388.     "prf" via the "set" native function.
  4389.  
  4390.   - The editor menus (in AMEN.A) are created via the "winmen" and
  4391.     "texmen" native functions.
  4392.  
  4393.   - All editor library functions are included from the file ALIB.X.
  4394.     Library functions are the editor commands described in The Aurora
  4395.     Editor Users Guide.
  4396.  
  4397.   - The keyboard and mouse definition functions (in AKBD.A) are added to
  4398.     event handler objects such as "edit", "fmgr", "prompt", etc.
  4399.  
  4400.   - The history file (A.HIS) and saved key macros are loaded (if
  4401.     configured).
  4402.  
  4403.   - Edit windows and/or File Manager windows are created, depending
  4404.     on what was entered on the DOS command line or remembered from
  4405.     a previous edit session.
  4406.  
  4407.  
  4408.   It is important to keep the following things in mind when writing your
  4409.   own macro commands for The Aurora Editor:
  4410.  
  4411.   1) The top-most window displayed on the screen is always the "default"
  4412.      window, and can be referenced with a null window name in any of the
  4413.      "win" native functions.
  4414.                     The Aurora Macro Language and The Aurora Editor   86
  4415.  
  4416.  
  4417.      Likewise, the text buffer and cursor mark displayed in the top-most
  4418.      window are the "default" text buffer and the "default" mark. They
  4419.      can also be referenced with null text buffer and null mark names in
  4420.      the "tex" and "mrk" native functions.
  4421.  
  4422.   2) The file name displayed in an Edit window is the first title (title
  4423.      id "1") for the window, and can be accessed with the "qwinttl"
  4424.      function.
  4425.  
  4426.   2) When the user creates a marked block for use with the "block"
  4427.      functions (such as copy, move, delete, etc.), that mark can be
  4428.      referenced with the mark name "*". This mark cannot be referenced
  4429.      with a null mark name, since that would refer to the cursor mark.
  4430.  
  4431.   3) The Aurora Editor uses timer id's 6, 7, 8, and 9. This leaves timer
  4432.      id's 0 through 5 available.
  4433.  
  4434.   4) The Aurora Editor creates the following "event" objects:
  4435.  
  4436.        "edit"   - edit windows
  4437.        "fmgr"   - file manager windows
  4438.        "menu"   - menu windows
  4439.        "prompt" - prompt windows and edit fields
  4440.  
  4441.      The Aurora Editor sets the current event object based on the window
  4442.      type of the top-most window. For example, if the top-most window is
  4443.      a File Manager window, then the current event object is "fmgr".
  4444.  
  4445.      Other "ancestor" objects created by The Aurora Editor are:
  4446.  
  4447.        "a"          - all windows
  4448.        "mon"        - all windows
  4449.        "win"        - movable or sizable windows
  4450.        "edit-fmgr"  - edit and file manger windows
  4451.        "dlg"        - dialog boxes
  4452.  
  4453.  
  4454.