home *** CD-ROM | disk | FTP | other *** search
-
-
- TABLE OF CONTENTS
-
- --background--
- rexx_reqtools.library/RqtEasyReq
- rexx_reqtools.library/RqtFileReq
- rexx_reqtools.library/RqtFontReq
- rexx_reqtools.library/RqtLongReq
- rexx_reqtools.library/RqtPaletteReq
- rexx_reqtools.library/RqtScreenReq
- rexx_reqtools.library/RqtStringReq
-
-
- --background-- --background--
-
- $(C): (1996, Rocco Coluccelli, Bologna)
- $VER: rexx_reqtools.library 38.0 (25.02.97)
-
- rexx_reqtools.library
-
- This sub-library of the rexxMOOS.library let ARexx programmers
- use the requesters created with the reqtools.library
-
- RqtEasyReq()
- RqtFileReq()
- RqtFontReq()
- RqtLongReq()
- RqtPaletteReq()
- RqtScreenReq()
- RqtStringReq()
-
- NOTES
-
- Is part of the MOOS package.
-
- TODO
-
- Support for IoErr() returning error conditions.
-
- BUGS
-
- rexx_reqtools.library/RqtEasyReq rexx_reqtools.library/RqtEasyReq
-
- NAME
-
- RqtEasyReq -- Open the reqtools easy requester.
-
- SYNOPSIS
-
- ret = RqtEasyReq(bodytext,options)
-
- FUNCTION
-
- This function puts up a requester for you and waits for a response
- from the user. The function may also return an IDCMP flag or a
- value corresponding with one of other possible responses. You can
- satisfy the requester with the following keyboard shortcuts: "Y"
- or Left Amiga "V" for a positive response, ESC, "N", "R" or Left
- Amiga "B" for a negative response.
-
- INPUTS
-
- bodytext - Is the text block that will be showed into the
- requester window. It can contain newlines ('0a'x) so
- the text will appear on multiple lines.
-
- options - "Gads,Title/K,Pub/K,IDCMP/K,
- ReqPos/K,Xoff/K/N,Yoff/K/N,
- Flags/K,Default=Def/K/N"
-
- "Gads" - All the possible responses, separated by a "|".
- The character "_" can be used to define keyboard
- shortcuts for each gadget. Eg: "_Ok|M_aybe|_No".
- Is not required to define any gadget for the
- requester until some IDCMP flags have been
- specified. The reason is that the requester
- can be closed only if the user chooses one of
- the possible responses, or if any IDCMP event
- occur. By default is created the gadget "Ok".
-
- IMPORTANT: the shortcuts defined in this way take
- precedence of the default shortcuts! It is for
- example not wise to use a 'N' for a positive
- response! Pick your shortcuts carefully!
-
- "Title" - Title of requester window, default is "Request"
- unless the requester has less than 2 responses,
- then the default title is "Information". The
- given text might be always included beetween
- quotes (',") also if it doesn't contain spaces.
-
- "Pub" - Preferred public screen to open the requester
- window in.
-
- "IDCMP" - Extra IDCMP flags to return on. If one these
- IDCMP flags causes the requester to abort the
- return code will equal the flag in question.
- In this version are supported the following:
-
- DISKINSERTED
- DISKREMOVED
- INACTIVEWINDOW
- MOUSEBUTTONS
- NEWPREFS
- RAWKEY
- VANILLAKEY
-
- More flags may be specified at the same time
- if separated by "|".
-
- "ReqPos" - The requester will always remain in the visible
- part of the screen, so if you use the Workbench
- 2.0 ScreenMode preferences editor to enlarge your
- Workbench screen and you scroll around, the
- requester will always appear in the part you can
- see. One of the following:
-
- POINTER - Requester appears where the
- mouse pointer is (default).
- CENTERSCR - Requester is centered on the
- screen.
- CENTERWIN - Requester is centered in the
- window associated with your
- process.
- TOPLEFTSCR - Requester appears at the top
- left of the screen.
- TOPLEFTWIN - Requester appears at the top
- left of the window.
-
- CENTERSCR and TOPLEFTSCR also apply to the visible
- part of the screen. So if you use one of these the
- requester will be appear in the center or the top
- left off what you can see of the screen as opposed
- to the entire screen.
-
- CENTERWIN and TOPLEFTWIN fall back to CENTERSCR or
- TOPLEFTSCR respectively when there is no parent
- window. So you can safely use these without
- worrying about the existence of a window.
-
- "Xoff" - Offset of left edge of requester relative to
- position specified with "ReqPos" (does not
- offset the requester when "ReqPos=pointer").
-
- "Yoff" - Offset of top edge of requester relative to
- position specified with "ReqPos" (does not
- offset the requester when "ReqPos=pointer").
-
- "Flags" - More flags can be specified if separated by "|".
- For the Easy requester are supported:
-
- NORETURNKEY - turn off the RETURN key as
- shortcut for positive response.
- LAMIGAQUAL - keyboard shortcuts are limited
- to Left Amiga "V" and "B", ESC
- and RETURN.
- CENTERTEXT - centers each line of body text
- in the requester window. Useful
- for about requesters.
-
- If NORETURNKEY is not set the RETURN key is also
- accepted as a shortcut for the positive response
- (can be changed using "Default", see below). The
- response that will be selected when you press
- RETURN will be printed in bold.
-
- The LAMIGAQUAL flag should be used when you put up
- a requester for a destructive action (to delete
- something, for example). When it is set the
- keyboard shortcuts are limited to Left Amiga "V"
- and "B" so it is harder to accidently select
- something you will regret. Note that the RETURN
- and ESC key remain active! To disable the RETURN
- key use the NORETURNKEY flag. The ESC key cannot
- be disabled.
-
- "Default" - Response value that will be returned when the
- user presses the return key. Will be ignored if
- the NORETURNKEY flag is set. The text for this
- response will be printed in bold. (default is 1)
-
- RESULT
-
- ret - The value "1" (TRUE) for leftmost (positive) response, then
- each consecutive response will return 1 more, the rightmost
- response will return 0 (FALSE), so 1,2,3,...,num-1,0.
- If any IDCMP flag has been specified and the corresponding
- event happens then its value will be returned.
-
- EXAMPLE
-
- SAY RqtEasyReq("Insert a disk",'IDCMP DiskInserted')
-
- SEE ALSO
-
- reqtools.library/rtEZRequest()
-
- rexx_reqtools.library/RqtFileReq rexx_reqtools.library/RqtFileReq
-
- NAME
-
- RqtFileReq -- Open the reqtools file requester.
-
- SYNOPSIS
-
- ret = RqtFileReq(filename,directory,options)
-
- FUNCTION
-
- Get a directory and filename(s), or just a directory from the user.
-
- INPUTS
-
- filename - The initial value for the file gadget content.
-
- directory - The initial value for the drawer gadget content.
-
- options - "Dir/K,Pat/K,Ok/K,Title/K,Pub/K,
- ReqPos/K,Xoff/K/N,Yoff/K/N,Hei/K/N,
- Stem/K,Flags/K,VolReq/K"
-
- "Dir" - Initial drawer from which open the requester.
-
- "Pat" - The accepted pattern. It will be showed into the
- pattern gadget specifying the flag PATGAD.
-
- "Ok" - A raplacement string for the "Ok" gadget. It can
- be 6 characters long.
-
- "Title" - Title of requester window.
-
- "Pub" - See RqtEasyReq()
-
- "ReqPos" - See RqtEasyReq()
-
- "Xoff" - See RqtEasyReq()
-
- "Yoff" - See RqtEasyReq()
-
- "Hei" - Suggested height of file requester window.
-
- "Stem" - The function may fill any given output stem with
- the following fields:
-
- <stem.>FileName
-
- <stem.>Drawer
-
- <stem.>Pattern
-
- <stem.>n
- Nth selected file. (See MULTI below)
-
- This function support only "#" and "*" compound
- symbol's types (read the rexxMOOS documentation
- for details).
-
- "Flags" - More flags can be specified if separated by "|".
- For this requester are supported:
-
- MULTI - Allow multiple files to be selected.
- This option flag is usefull only
- giving a stem where the selected
- files/dirs will be written in.
- SELDIRS - Set this flag if you wish to enable
- the selecting of dirs as well as files.
- SAVE - Set this if you are using the
- requester to save or delete something.
- Double-clicking will be disabled so it
- is harder to make a mistake and select
- the wrong file. If the user enters a
- non-existent directory in the drawer
- string gadget, a requester will appear
- asking if the dir should be created.
- NOFILES - Set this if you want to use the
- requester to allow the user to select a
- directory rather than a file. Ideal for
- getting a destination dir. May be used
- with the flags MULTI and SELDIRS.
- PATGAD - When this is set a pattern gadget will
- be added to the requester.
-
- "VolReq" - Use this option keyword to turn the file
- requester into a volume/assign disk requester.
- It can be used to get a device name ("DF0:",
- "DH1:",...) or an assign ("C:", "FONTS:",...) from
- the user. Note that the user may edit the
- disk/assign names, or enter a new one. Note also
- that the real device name is returned, not the
- name of the volume in the device. The following
- flags can be specified (separated by "|"):
-
- NOASSIGNS - Do not include the assigns in
- the list, only the real devices.
- NODISKS - Do not include devices, just
- show the assigns.
- ALLDISKS - Show all devices. By default are
- showed only those devices which have
- valid disks inserted into them. So if
- you have no disk in drive DF0: it will
- not show up. Set this flag if you do
- want these devices included.
- RESULT
-
- ret - The function always returns the last selected dir/file or
- an empty string if the user has deleted the requester.
- Note that the user may enter manually a filename and it
- couldn't exists.
-
- EXAMPLE
-
- SAY RqtFileReq()
-
- SEE ALSO
-
- reqtools.library/rtFileRequest()
-
- rexx_reqtools.library/RqtFontReq rexx_reqtools.library/RqtFontReq
-
- NAME
-
- RqtFontReq -- Open the reqtools font requester.
-
- SYNOPSIS
-
- ret = RqtFontReq(options)
-
- FUNCTION
-
- Let the user select a font and a style (optional).
-
- INPUTS
-
- options - "Ok/K,Title/K,Pub/K,
- ReqPos/K,Xoff/K/N,Yoff/K/N,Hei/K/N,
- Stem/K,Flags/K,SampleH/K/N,MinH/K/N,MaxH/K/N"
-
- "Ok" - See RqtFileReq()
-
- "Title" - Title of requester window.
-
- "Pub" - See RqtEasyReq()
-
- "ReqPos" - See RqtEasyReq()
-
- "Xoff" - See RqtEasyReq()
-
- "Yoff" - See RqtEasyReq()
-
- "Hei" - Suggested height of file requester window.
-
- "Stem" - The function may fill any given output stem with
- the following fields:
-
- <stem.>Name
-
- <stem.>YSize
-
- <stem.>Style
-
- <stem.>Flags
-
- "Flags" - More flags can be specified if separated by "|".
- For this requester are supported:
-
- FIXEDWID - Only show fixed-width fonts.
- COLORS - Show color fonts also.
- PALETTE - Change the screen's palette
- to match that of a selected
- color font.
- SCALEGAD - Allow fonts to be scaled
- when they don't exist in the
- requested size.
- STYLEGAD - Include gadgets so the user
- may select the font's style.
-
- "SampleH" - Height of font sample display in pixels.
- (default 24)
-
- "MinH" - Minimum font size displayed.
-
- "MaxH" - Maximum font size displayed.
-
- RESULT
-
- ret - The function always returns the selected font/size or
- an empty string if the user has deleted the requester.
- Note that the user may enter manually a font/size that
- don't exists in the system.
-
- EXAMPLE
-
- SAY RqtFontReq('Flags=Scale|Size')
-
- SEE ALSO
-
- reqtools.library/rtFontRequest()
-
- rexx_reqtools.library/RqtLongReq rexx_reqtools.library/RqtLongReq
-
- NAME
-
- RqtLongReq -- Open the reqtools getlong requester.
-
- SYNOPSIS
-
- ret = RqtLongReq(bodytext,options)
-
- FUNCTION
-
- Puts up a requester to get a signed number from the user.
-
- INPUTS
-
- bodytext - See RqtEasyReq()
-
- options - "Number/N,Gads,Title/K,Pub/K,IDCMP/K,
- ReqPos/K,Xoff/K/N,Yoff/K/N,Wid/K/N,
- Flags/K,Min/K/N,Max/K/N,Hidden/S"
-
- "Number" - The initial value showed into the input gadget.
-
- "Gads" - See RqtEasyReq()
-
- "Title" - See RqtEasyReq()
-
- "Pub" - See RqtEasyReq()
-
- "IDCMP" - See RqtEasyReq()
-
- "ReqPos" - See RqtEasyReq()
-
- "Xoff" - See RqtEasyReq()
-
- "Yoff" - See RqtEasyReq()
-
- "Wid" - Width of requester window in pixels. This is only
- a suggestion. Requester's window can't go below a
- certain width.
-
- "Flags" - More flags can be specified if separated by "|".
- For the Easy requester are supported:
-
- HIGHLIGHT - Highlight text above the gadget.
- You will normally only want to use
- this if you also turned off the
- window backfilling.
- CENTERTEXT - See RqtEasyReq()
-
- "Min" - Minimum allowed value. If the user tries to enter
- a smaller value the requester will refuse it.
-
- "Max" - Maximum allowed value, higher values are refused.
-
- "Hidden" - Use this to switch on invisible typing. Very
- useful if you need to get something like a code
- number from the user.
-
- RESULT
-
- ret - The number entered. See RqtEasyReq() for the returned values
- in case of any IDCMP flag or other gadgets added.
-
- EXAMPLE
-
- SAY RqtLongReq("Insert a number",100)
-
- SEE ALSO
-
- reqtools.library/rtGetLong()
-
- rexx_reqtools.library/RqtPaletteReq rexx_reqtools.library/RqtPaletteReq
-
- NAME
-
- RqtPaletteReq -- Open the reqtools palette requester.
-
- SYNOPSIS
-
- ret = RqtPaletteReq(options)
-
- FUNCTION
-
- Put up a palette requester so the user can change the screen's
- colors. The colors are changed in the viewport of the screen the
- requester will appear on, so that is where you will find them
- after the palette requester returns. The selected color is
- returned, so you can also use this requester to let the user
- select a color.
-
- INPUTS
-
- options - "Color/N,Title/K,Pub/K,IDCMP/K,
- ReqPos/K,Xoff/K/N,Yoff/K/N"
-
- "Color" - Initially selected color of palette.
- (default is 1)
-
- "Title" - See RqtEasyReq()
-
- "Pub" - See RqtEasyReq()
-
- "IDCMP" - See RqtEasyReq()
-
- "ReqPos" - See RqtEasyReq()
-
- "Xoff" - See RqtEasyReq()
-
- "Yoff" - See RqtEasyReq()
-
- RESULT
-
- ret - The color number of the selected color or -1 if the user
- canceled the requester. See RqtEasyReq() for the returned
- values in case of any IDCMP flag or other gadgets added.
-
- EXAMPLE
-
- SAY RqtPaletteReq()
-
- SEE ALSO
-
- reqtools.library/rtPaletteRequest()
-
- rexx_reqtools.library/RqtScreenReq rexx_reqtools.library/RqtScreenReq
-
- NAME
-
- RqtScreenReq -- Open the reqtools screen mode requester.
-
- SYNOPSIS
-
- ret = RqtScreenReq(options)
-
- FUNCTION
-
- The user will be able to pick a screen mode by name, enter the
- size and the number of colors (bitplane depth).
-
- INPUTS
-
- options - "Ok/K,Title/K,Pub/K,
- ReqPos/K,Xoff/K/N,Yoff/K/N,Hei/K/N,
- Stem/K,Flags/K,MinW/K/N,MaxW/K/N,
- MinH/K/N,MaxH/K/N,MinD/K/N,MaxD/K/N"
-
- "Ok" - See RqtFileReq()
-
- "Title" - Title of requester window.
-
- "Pub" - See RqtEasyReq()
-
- "ReqPos" - See RqtEasyReq()
-
- "Xoff" - See RqtEasyReq()
-
- "Yoff" - See RqtEasyReq()
-
- "Hei" - Suggested height of file requester window.
-
- "Stem" - The function may fill any given output stem with
- the following fields:
-
- <stem.>DisplayID
-
- <stem.>DisplayWidth
-
- <stem.>DisplayHeight
-
- <stem.>DisplayDepth
-
- <stem.>OverscanType
-
- <stem.>AutoScroll
-
- "Flags" - More flags can be specified if separated by "|".
- For this requester are supported:
-
- OVERSCANGAD - Add an overscan cycle gadget to
- the requester.
- ASCROLLGAD - Add an autoscroll checkbox gadget
- to the requester.
- SIZEGADS - Add width and height gadgets to the
- requester. If you do not add these
- gadgets the width and height
- returned will be the default values
- for the selected overscan type.
- DEPTHGAD - Add a depth slider gadget to the
- requester. If you do not add a
- depth gadget, the depth returned
- will be the maximum depth this
- mode can be opened in.
- NONSTDMODES - Include all modes. Unless this flag
- is set the function will exclude
- nonstandard modes. Nonstandard modes
- are presently HAM and EHB
- (ExtraHalfBrite). So unless you are
- picking a mode to do some rendering
- in leave this flag unset. Without
- this flag set the mode returned will
- be a normal bitplaned mode.
- GUIMODES - Set this flag if you are getting
- a screen mode to open a user
- interface screen in. The modes
- shown will be standard modes with
- a high enough resolution (minumum
- 640 pixels). If this flag is set
- the NONSTDMODES flag is ignored.
- ALLGADS - Add all gadgets. Is the same as
- specifying ASCROLLGAD, DEPTHGAD,
- OVERSCANGAD and SIZEGADS.
-
- "MinW" - The minimum display width allowed.
-
- "MaxW" - The maximum display width allowed.
-
- "MinH" - The minimum display height allowed.
-
- "MaxH" - The maximum display height allowed.
-
- "MinD" - The minimum display depth allowed. Modes with
- a minimum display depth lower than this value
- will not be included in the list.
-
- "MaxD" - The maximum display depth allowed.
-
- RESULT
-
- ret - The function returns the displayID of the selected screen
- mode or 0 if the user has deleted requester.
-
- EXAMPLE
-
- SAY RqtScreenReq()
-
- SEE ALSO
-
- reqtools.library/rtScreenModeRequester()
-
- rexx_reqtools.library/RqtStringReq rexx_reqtools.library/RqtStringReq
-
- NAME
-
- RqtStringReq -- Open the reqtools getstring requester.
-
- SYNOPSIS
-
- ret = RqtStringReq(bodytext,string,options)
-
- FUNCTION
-
- Puts up a string requester to get a line of text from the user.
-
- INPUTS
-
- bodytext - See RqtEasyReq()
-
- string - The initial string ready to be edited.
-
- options - "Gads,Title/K,Pub/K,IDCMP/K,
- ReqPos/K,Xoff/K/N,Yoff/K/N,Wid/K/N,
- Flags/K,MaxL/K/N,Hidden/S"
-
- "Gads" - See RqtEasyReq()
-
- "Title" - See RqtEasyReq()
-
- "Pub" - See RqtEasyReq()
-
- "IDCMP" - See RqtEasyReq()
-
- "ReqPos" - See RqtEasyReq()
-
- "Xoff" - See RqtEasyReq()
-
- "Yoff" - See RqtEasyReq()
-
- "Wid" - See RqtLongReq()
-
- "Flags" - See RqtLongReq()
-
- "MaxL" - Maximum accepted length for the entered string.
-
- "Hidden" - See RqtLongReq()
-
- RESULT
-
- ret - The string entered. See RqtEasyReq() for the returned values
- in case of any IDCMP flag or other gadgets added.
-
- EXAMPLE
-
- SAY RqtStringReq("Edit the following:","edit me...")
-
- SEE ALSO
-
- reqtools.library/rtGetString()
-
-
-