Introduction
This library is a replacement for the original intuition requesters, just like asl.
ReqTools features the following requesters: a query requester, a string requester, a number requester, a file requester, a font requester, a palette requester and new in release 2.0 of ReqTools a volume requester and a screen mode requester.
AROS recommends Zune (Mui rewrite) as the default requesters and ReqTools and ASL is for backwards compatibility.
Examples
...
{
ULONG tags[] = { RTEZ_ReqTitle, (ULONG)"mytitle", TAG_END };
rtEZRequest ("String, num: %s, %ld", NULL, "Ok", (struct TagItem *)tags, "six", 6);
}
...
References
Found a problem, though - I use an environment variable to set up my prefs, as I expect is normal. When I open the library manually, all works fine (the GetVar() is in the LibOpen() code). When I use mount, it crashes solidly.
Is there a safe version of GetVar() which I can use which will work in the Mount command?
If you can test this under AROS hosted such crashes are usually easy to debug with gdb. There are other libs which use GetVar() in libopen, like reqtools.library (workbench/libs/reqtools).
How does the part of the code using GetVar() look like?
I tried just now to use exactly the same code as reqtools.library in my code... and as before it crashes when run from a Mount command (i.e. "Mount TD0:") and works when run from my own program.
Presumably something in the mount command spawns a task or something? Have yet to look into creating a process, but it's worth noting that that means reqtools.library probably can't be safely opened from within a task either....
APTR rtAllocRequestA(ULONG type, struct TagItem *taglist) (D0, A0) void rtFreeRequest(APTR req) (A1) void rtFreeReqBuffer(APTR req) (A1) LONG rtChangeReqAttrA(APTR req, struct TagItem *taglist) (A1, A0) APTR rtFileRequestA(struct rtFileRequester *filereq, char *file, char *title, struct TagItem *taglist) (A1, A2, A3, A0) void rtFreeFileList(struct rtFileList *selfile) (A0) ULONG rtEZRequestA(char *bodyfmt, char *gadfmt, struct rtReqInfo *reqinfo, APTR argarray, struct TagItem *taglist) (A1, A2, A3, A4, A0) ULONG rtGetStringA(UBYTE *buffer, ULONG maxchars, char *title, struct rtReqInfo *reqinfo, struct TagItem *taglist) (A1, D0, A2, A3, A0) ULONG rtGetLongA(ULONG *longptr, char *title, struct rtReqInfo *reqinfo, struct TagItem *taglist) (A1, A2, A3, A0) BOOL rtInternalGetPasswordA(UBYTE *buffer, ULONG checksum, PWCALLBACKFUNPTR pwcallback, struct rtReqInfo *reqinfo, struct TagItem *taglist) (A1, D1, D2, A3, A0) BOOL rtInternalEnterPasswordA(UBYTE *buffer, PWCALLBACKFUNPTR pwcallback, struct rtReqInfo *reqinfo, struct TagItem *taglist) (A1, D2, A3, A0) ULONG rtFontRequestA(struct rtFontRequester *fontreq, char *title, struct TagItem *taglist) (A1, A3, A0) LONG rtPaletteRequestA(char *title, struct rtReqInfo *reqinfo, struct TagItem *taglist) (A2, A3, A0) IPTR rtReqHandlerA(struct rtHandlerInfo *handlerinfo, ULONG sigs, struct TagItem *taglist) (A1, D0, A0) void rtSetWaitPointer(struct Window *window) (A0) ULONG rtGetVScreenSize(struct Screen *screen, ULONG *widthptr, ULONG *heightptr) (A0, A1, A2) void rtSetReqPosition(ULONG reqpos, struct NewWindow *nw, struct Screen *scr, struct Window *win) (D0, A0, A1, A2) void rtSpread(ULONG *posarray, ULONG *sizearray, ULONG totalsize, ULONG min, ULONG max, ULONG num) (A0, A1, D0, D1, D2, D3) void rtScreenToFrontSafely(struct Screen *screen) (A0) ULONG rtScreenModeRequestA(struct rtScreenModeRequester *screenmodereq, char *title, struct TagItem *taglist) (A1, A3, A0) void rtCloseWindowSafely(struct Window *window) (A0) APTR rtLockWindow(struct Window *window) (A0) void rtUnlockWindow(struct Window *window, APTR windowlock) (A0, A1) struct ReqToolsPrefs *rtLockPrefs() () void rtUnlockPrefs() ()
TAGS for the file requester
RTFI_Dir - (char *)
Name of new directory to position file requester
in. The requester's buffer will be deallocated.
RTFI_MatchPat - (char *)
New pattern string to match files on.
RTFI_AddEntry - (BPTR)
THIS *MUST* BE THE LAST TAG (just before TAG_END)!
Tagdata must hold a lock on a file or directory
you want to add to the file requester's buffer.
The lock should have been obtained using Lock(),
and you must unlock this lock yourself.
It is your responsibility to make sure the file
or directory is indeed in the directory the file
requester is in.
If the entry is already in the file requester's
buffer it will simply be updated.
It is harmless to use this tag if the requester's
buffer is not initialized. rtChangeReqAttr() will
return a boolean to indicate success or failure
(out of memory).
RTFI_RemoveEntry - (char *)
Name of file or directory you want to remove from
the file requester's buffer.
It is your responsibility to make sure the file
or directory is indeed in the directory the file
requester is in.
It is harmless use this tag if the requester's
buffer is not initialized.
for the font requester:
RTFO_FontName - (char *)
Set the name of the currently selected font.
RTFO_FontHeight - (UWORD)
Set the fontsize of the currently selected font.
RTFO_FontStyle - (UBYTE)
Set the style of the current font.
RTFO_FontFlags - (UBYTE)
Set the flags of the current font.
for the screenmode requester [V38]:
RTSC_ModeFromScreen - (struct Screen *)
Screen to get mode attributes from.
NOTE: You must make sure the mode this screen
is in will be accepted by the screen
mode requester. Otherwise it will auto-
matically cancel. For example, you use
RTDI_ModeFromScreen on a HAM screen and
you haven't set the SCREQF_NONSTDMODES
flag.
Note that you must use this tag _before_ the
four tags below because this tag will set the
width, height, depth and autoscroll.
RTSC_DisplayID - (ULONG)
Set 32-bit mode id of selected mode. The width
and height will be set to the default (visible)
width and height, and the depth will be set to
maximum. Also read note above. Note that you
must use this tag _before_ the three tags below
because this tag will set the width, height and
depth to default values.
RTSC_DisplayWidth - (UWORD)
Set width of display. Must come after
RTSC_DisplayID or RTSC_ModeFromScreen tags.
RTSC_DisplayHeight - (UWORD)
Set height of display. Must come after
RTSC_DisplayID or RTSC_ModeFromScreen tags.
RTSC_DisplayDepth - (UWORD)
Set depth of display. Must come after
RTSC_DisplayID or RTSC_ModeFromScreen tags.
RTSC_AutoScroll - (BOOL)
Boolean state of autoscroll checkbox.
Must come after RTSC_ModeFromScreen tag.
RTSC_OverscanType - (ULONG)
Set type of overscan. Set to 0 for regular
size, otherwise use OSCAN_... constants.
See 'intuition/screens.[h|i]'.
TAGS for ezREQUEST and rtFileRequest
RT_Window - (struct Window *)
Window that will be used to find the screen to put the
requester on.
If you supply this tag ReqTools will see if this window
is active. If it is not the requester will also be
opened in inactive state.
You *MUST* supply this if you are a task calling this
function and not a process! This is because tasks
don't have a pr_WindowPtr.
RT_IDCMPFlags - (ULONG)
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.
RT_ReqPos - (ULONG)
One of the following:
REQPOS_POINTER - requester appears where the mouse
pointer is (default).
REQPOS_CENTERSCR - requester is centered on the
screen.
REQPOS_CENTERWIN - requester is centered in the
window (only works if the
pr_WindowPtr of your process is
valid or if you use RT_Window).
If RT_Window is NULL the
requester will be centered on
the screen.
REQPOS_TOPLEFTSCR - requester appears at the top left
of the screen.
REQPOS_TOPLEFTWIN - requester appears at the top left
of the window (only works if the
pr_WindowPtr of your process is
valid or if you use RT_Window).
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.
REQPOS_CENTERSCR and REQPOS_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.
REQPOS_CENTERWIN and REQPOS_TOPLEFTWIN fall back to
REQPOS_CENTERSCR or REQPOS_TOPLEFTSCR respectively
when there is no parent window. So you can safely use
these without worrying about the existence of a window.
RT_LeftOffset - (ULONG)
Offset of left edge of requester relative to position
specified with RT_ReqPos (does not offset the requester
when RT_ReqPos is REQPOS_POINTER).
RT_TopOffset - (ULONG)
Offset of top edge of requester relative to position
specified with RT_ReqPos (does not offset the requester
when RT_ReqPos is REQPOS_POINTER).
RT_PubScrName - (char *)
Name of public screen requester should appear on. When
this tag is used the RT_Window tag will be ignored.
If the public screen is not found the requester will
open on the default public screen.
Only works on Kickstart 2.0! reqtools.library does
not check this, it is up to you *NOT* to use this tag
on Kickstart 1.3 or below!
Note that the 1.3 version of reqtools.library also
understands and supports this tag (on 2.0).
RT_Screen - (struct Screen *)
Address of screen to put requester on. You should
never use this, use RT_Window or RT_PubScrName.
RT_ReqHandler - (struct rtHandlerInfo **)
Using this tag you can start an "asynchronous"
requester. ti_TagData of the tag must hold the address
of a pointer variable to a rtHandlerInfo structure.
The requester will initialize this pointer and will
return immediately after its normal initialization.
The return code will not be what you would normally
expect. If the return code is _not_ equal to
CALL_HANDLER an error occurred and you should take
appropriate steps. If the return code was CALL_HANDLER
everything went ok and the requester will still be up!
See the explanation for rtReqHandlerA() below for the
following steps you have to take.
RT_WaitPointer - (BOOL)
If this is TRUE the window calling the requester will
get a standard wait pointer set while the requester is
up. This will happen if you used the RT_Window tag or
if your process's pr_WindowPtr is valid. Note that
after the requester has finished your window will be
ClearPointer()-ed. If you used a custom pointer in
your window you will have to re-set it, or not use the
RT_WaitPointer tag and put up a wait pointer yourself.
If your program requires ReqTools V38 it is advised you
use RT_LockWindow instead. Defaults to FALSE.
RT_LockWindow - (BOOL) [V38]
If this is TRUE the window calling the requester will
get locked. It will no longer accept any user input
and it will get standard wait pointer set. This will
happen only if you used the RT_Window tag or if your
process's pr_WindowPtr is valid. RT_LockWindow will
restore a custom pointer if you have used one (unlike
RT_WaitPointer). So you do not have to worry about
having to restore it yourself. It is advised you use
this tag as much as possible. Defaults to FALSE.
Under Kickstart V39 the original window pointer will
not be restored if it was set using SetWindowPointer().
You will have to restore the pointer yourself in this
case.
RT_ScreenToFront - (BOOL) [V38]
Boolean indicating whether to pop the screen the
requester will appear on to the front. Default is TRUE.
RT_ShareIDCMP - (BOOL) [V38]
Boolean indicating whether to share the IDCMP port of
the parent window. Use this tag together with the
RT_Window tag to indicate the window to share IDCMP
with. Sharing the IDCMP port produces less overhead,
so it is advised you use this tag. Defaults to FALSE.
RT_Locale - (struct Locale *) [V38]
Locale to determine what language to use for the
requester text. If this tag is not used or its data
is NULL, the system's current default locale will be
used. Default NULL.
RT_IntuiMsgFunc - (struct Hook *) [V38]
The requester will call this hook for each IDCMP
message it gets that doesn't belong to its window.
Only applies if you used the RT_ShareIDCMP tag to share
the IDCMP port with the parent window. Parameters are
as follows:
A0 - (struct Hook *) your hook
A2 - (struct rtReqInfo *) your requester info
A1 - (struct IntuiMessage *) the message
After you have finished examining the message and your
hook returns, ReqTools will reply the message. So do
not reply the message yourself!
RT_Underscore - (char) [V38]
Indicates the symbol that precedes the character in the
gadget label to be underscored. This is to define a
keyboard shortcut for this gadget. Example: to define
the key 'Q' as a keyboard shortcut for "Quit" and 'N'
for "Oh, No!" you would use the tag RT_Underscore, '_'
and pass as gadfmt "_Quit|Oh, _No!". Do not use the
symbol '%' as it is used for string formatting. The
usual character to use is '_' like in the example.
IMPORTANT: the shortcuts defined using RT_Underscore
take precedence of the default shortcuts! It is for
example not wise to use a 'N' for a positive response!
Pick your shortcuts carefully!
RT_TextAttr - (struct TextAttr *) [V38]
Use this font for the requester. Default is to use the
screen font. Note that the font must already be
opened by you. ReqTools will call OpenFont() on this
TextAttr, _not_ OpenDiskFont()! If the font cannot be
opened using OpenFont() the default screen font will
be used.
RTEZ_ReqTitle - (char *)
Title of requester window, default is "Request" unless
the requester has less than 2 responses, then the
default title is "Information".
RTEZ_Flags - (ULONG)
Flags for rtEZRequestA():
EZREQF_NORETURNKEY - turn off the RETURN key as
shortcut for positive response.
EZREQF_LAMIGAQUAL - keyboard shortcuts are limited
to Left Amiga 'V' and 'B', ESC
and RETURN.
EZREQF_CENTERTEXT - centers each line of body text
in the requester window. Useful
for about requesters.
RTEZ_DefaultResponse - (ULONG)
Response value that will be returned when the user
presses the return key. Will be ignored if the
EZREQF_NORETURNKEY flag is set. The text for this
response will be printed in bold. Default is 1.
TAGS for File Requests
RT_Window - see rtEZRequestA()
RT_ReqPos - see rtEZRequestA()
RT_LeftOffset - see rtEZRequestA()
RT_TopOffset - see rtEZRequestA()
RT_PubScrName - see rtEZRequestA()
RT_Screen - see rtEZRequestA()
RT_ReqHandler - see rtEZRequestA()
RT_WaitPointer - see rtEZRequestA()
RT_LockWindow - [V38] see rtEZRequestA()
RT_ScreenToFront - [V38] see rtEZRequestA()
RT_ShareIDCMP - [V38] see rtEZRequestA()
RT_Locale - [V38] see rtEZRequestA()
RT_IntuiMsgFunc - (struct Hook *) [V38]
The requester will call this hook for each IDCMP
message it gets that doesn't belong to its window.
Only applies if you used the RT_ShareIDCMP tag to
share the IDCMP port with the parent window.
Parameters are as follows:
A0 - (struct Hook *) your hook
A2 - (struct rtFileRequester *) your requester
A1 - (struct IntuiMessage *) the message
After you have finished examining the message and
your hook returns, ReqTools will reply the message.
So do not reply the message yourself!
RT_Underscore - (char) [V38]
Indicates the symbol that precedes the character in
a gadget's label to be underscored. This will also
define the keyboard shortcut for this gadget.
Currently only needed for RTFI_OkText. Usually set
to '_'.
RT_DefaultFont - (struct TextFont *)
This tag allows you to specify the font to be used
in the requester when the screen font is
proportional. Default is GfxBase->DefaultFont.
RT_TextAttr - (struct TextAttr *) [V38]
Use this font for the requester. Must be a fixed
width font, _not_ a proportional one. Default is to
use the screen font or the default font (if the
screen font is proportional). Note that the font
must already be opened by you. ReqTools will call
OpenFont() on this TextAttr, _not_ OpenDiskFont()!
If the font cannot be opened using OpenFont() or if
the font is proportional the default screen font
will be used (or the font set with RT_DefaultFont).
RTFI_Flags - (ULONG)
Several flags:
FREQF_NOBUFFER - do _not_ use a buffer to
remember directory contents
for the next time the file
requester is used.
FREQF_MULTISELECT - allow multiple files to be
selected. rtFileRequest() will
return a pointer to an
rtFileList structure which
will contain all selected
files. Use rtFreeFileList()
to free the memory used by
this file list.
FREQF_SELECTDIRS - set this flag if you wish to
enable the selecting of dirs
as well as files. You *must*
also set FREQF_MULTISELECT.
Directories will be returned
together with files in
rtFileList, but with StrLen
equal to -1. If you need the
length of the directory's name
use strlen().
FREQF_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 directory
should be created.
FREQF_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 FREQF_MULTISELECT
and FREQF_SELECTDIRS.
FREQF_PATGAD - When this is set a pattern
gadget will be added to the
requester.
RTFI_Height - (ULONG)
Suggested height of file requester window.
RTFI_OkText - (char *)
Replacement text for "Ok" gadget, max 6 chars long.
RTFI_VolumeRequest - (ULONG) [V38]
The presence of this tag turns the file requester
into a volume/assign disk requester. This requester
can be used to get a device name ("DF0:", "DH1:",..)
or an assign ("C:", "FONTS:",...) from the user.
The result of this requester can be found in the
filereq->Dir field. The volume can also be changed
with rtChangeReqAttrA() and the RTFI_Dir tag. 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. For example "DH1:", not "Hard1:".
The tag data (ULONG) is used to set following flags:
VREQF_NOASSIGNS - Do not include the assigns in
the list, only the real devices.
VREQF_NODISKS - Do not include devices, just
show the assigns.
VREQF_ALLDISKS - Show _all_ devices. Default
behavior is to show 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.
NOTE: Do *NOT* use { RTFI_VolumeRequest, TRUE }!
You are then setting the VREQF_NOASSIGNS flag!
Use { RTFI_VolumeRequest, 0 } for a normal
volume requester.
NOTE: If you use the RTFI_FilterFunc described
below the third parameter will be a pointer
to a rtVolumeEntry structure rather than a
pointer to a FileInfoBlock structure!
Tech note: the DOS device list has been
unlocked, so it is safe to e.g. Lock() this
device and call Info() on this lock.
NOTE: A file requester structure allocated with
rtAllocRequest() should not be used for both
a file and a volume requester. Allocate two
requester structures if you need both a file
and a volume requester in your program!
RTFI_FilterFunc - (struct Hook *) [V38]
Call this hook for each file in the directory being
read (or for each entry in the volume requester).
Parameters are as follows:
A0 - (struct Hook *) your hook
A2 - (struct rtFileRequester *) your filereq
A1 - (struct FileInfoBlock *) fib of file OR
(struct rtVolumeEntry *) device or assign
in case of a volume requester.
If your hook returns TRUE the file will be accepted.
If it returns FALSE the file will be skipped and
will not appear in the requester.
IMPORTANT NOTE: If you change your hook's behavior
you _MUST_ purge the requester's
buffer (using rtFreeReqBuffer())!
IMPORTANT NOTE: When this callback hook is called
from a volume requester the
pr_WindowPtr of your process will
be set to -1 so *no* DOS requesters
will appear when an error occurs!
RTFI_AllowEmpty - (BOOL) [V38]
If RTFI_AllowEmpty is TRUE an empty file string will
also be accepted and returned. Defaults to FALSE,
meaning that if the user enters no filename the
requester will be canceled. You should use this tag
as little as possible!
TAGS for FontRequest
RT_Window - see rtEZRequestA()
RT_ReqPos - see rtEZRequestA()
RT_LeftOffset - see rtEZRequestA()
RT_TopOffset - see rtEZRequestA()
RT_PubScrName - see rtEZRequestA()
RT_Screen - see rtEZRequestA()
RT_ReqHandler - see rtEZRequestA()
RT_WaitPointer - see rtEZRequestA()
RT_LockWindow - [V38] see rtEZRequestA()
RT_ScreenToFront - [V38] see rtEZRequestA()
RT_ShareIDCMP - [V38] see rtEZRequestA()
RT_Locale - [V38] see rtEZRequestA()
RT_IntuiMsgFunc - (struct Hook *) [V38]
The requester will call this hook for each IDCMP
message it gets that doesn't belong to its window.
Only applies if you used the RT_ShareIDCMP tag to
share the IDCMP port with the parent window.
Parameters are as follows:
A0 - (struct Hook *) your hook
A2 - (struct rtFontRequester *) your requester
A1 - (struct IntuiMessage *) the message
After you have finished examining the message and
your hook returns, ReqTools will reply the message.
So do not reply the message yourself!
RT_Underscore - (char) [V38]
Indicates the symbol that precedes the character in
a gadget's label to be underscored. This will also
define the keyboard shortcut for this gadget.
Currently only needed for RTFO_OkText. Usually set
to '_'.
RT_DefaultFont - (struct TextFont *)
This tag allows you to specify the font to be used in
the requester when the screen font is proportional.
Default is GfxBase->DefaultFont.
RT_TextAttr - [V38] see rtFileRequestA()
Remember: font cannot be proportional!
RTFO_Flags - (ULONG)
Several flags:
FREQF_NOBUFFER - do not buffer the font list
for subsequent calls to
rtFontRequestA().
FREQF_FIXEDWIDTH - only show fixed-width fonts.
FREQF_COLORFONTS - show color fonts also.
FREQF_CHANGEPALETTE - change the screen's palette
to match that of a selected
color font.
FREQF_LEAVEPALETTE - leave the palette as it is
when exiting rtFontRequestA()
Useful in combination with
FREQF_CHANGEPALETTE.
FREQF_SCALE - allow fonts to be scaled
when they don't exist in the
requested size.
(works on Kickstart 2.0 only,
has no effect on 1.2/1.3).
FREQF_STYLE - include gadgets so the user
may select the font's style.
RTFO_Height - (ULONG)
Suggested height of font requester window.
RTFO_OkText - (char *)
Replacement text for "Ok" gadget. Maximum 6 chars.
(7 is still ok, but not esthetically pleasing)
RTFO_SampleHeight - (ULONG)
Height of font sample display in pixels (default 24).
RTFO_MinHeight - (ULONG)
Minimum font size displayed.
RTFO_MaxHeight - (ULONG)
Maximum font size displayed.
RTFO_FilterFunc - (struct Hook *) [V38]
Call this hook for each available font.
Parameters are as follows:
A0 - (struct Hook *) your hook
A2 - (struct rtFontRequester *) your filereq
A1 - (struct TextAttr *) textattr of font
If your hook returns TRUE the font will be accepted.
If it returns FALSE the font will be skipped and
will not appear in the requester.
IMPORTANT NOTE: If you change your hook's behavior
you _MUST_ purge the requester's buffer (using
rtFreeReqBuffer())!
TAGS for GetString
RT_Window - see rtEZRequestA()
RT_IDCMPFlags - see rtEZRequestA()
RT_ReqPos - see rtEZRequestA()
RT_LeftOffset - see rtEZRequestA()
RT_TopOffset - see rtEZRequestA()
RT_PubScrName - see rtEZRequestA()
RT_Screen - see rtEZRequestA()
RT_ReqHandler - see rtEZRequestA()
RT_WaitPointer - see rtEZRequestA()
RT_Underscore - [V38] see rtEZRequestA()
Only when you also use the RTGS_GadFmt tag.
RT_LockWindow - [V38] see rtEZRequestA()
RT_ScreenToFront - [V38] see rtEZRequestA()
RT_ShareIDCMP - [V38] see rtEZRequestA()
RT_Locale - [V38] see rtEZRequestA()
RT_IntuiMsgFunc - [V38] see rtEZRequestA()
RT_TextAttr - [V38] see rtEZRequestA()
Note that under 1.2/1.3 the string gadget's font
will remain the screen font.
RTGS_Width - (ULONG)
Width of requester window in pixels. This is only a
suggestion. rtGetStringA() will not go below a certain
width.
RTGS_AllowEmpty - (BOOL)
If RTGS_AllowEmpty is TRUE an empty string will also
be accepted and returned. Defaults to FALSE, meaning
that if the user enters an empty string the requester
will be canceled.
RTGS_GadFmt - (char *) [V38]
Using this tag you can offer the user several
responses. See rtEZRequestA() for more information.
Note that selecting this gadget is considered a
positive response so the string in the gadget is
copied to 'buffer'.
RTGS_GadFmtArgs - (APTR) [V38]
If you used formatting codes with RTGS_GadFmt use this
tag to pass the arguments.
RTGS_Invisible - (BOOL) [V38]
Using this tag you can switch on invisible typing.
Very useful if you need to get something like a
password from the user. It is strongly advised to use
an empty initial string or the user may get very
confused! Default is FALSE.
RTGS_BackFill - (BOOL) [V38]
Backfill requester window with pattern. Default TRUE.
RTGS_TextFmt - (char *) [V38]
Print these lines of text above the gadget in the
requester. Very useful to inform the user of what
he should enter. Most of the time you will also want
to set the GSREQF_CENTERTEXT flag. If you set the
RTGS_BackFill tag to FALSE _no_ recessed border will
be placed around the text. Formatting codes may be
used in the string (see RTGS_TextFmtArgs tag).
RTGS_TextFmtArgs - (APTR) [V38]
If you used formatting codes with RTGS_TextFmt use
this tag to pass the arguments.
RTGS_Flags - (ULONG) [V38]
GSREQF_CENTERTEXT - centers each line of text
above the gadget in the
requester window. Should
be generally set.
GSREQF_HIGHLIGHTTEXT - Highlight text above the
gadget. You will normally
only want to use this if you
also turned off the window
backfilling.
TAGS for PaletteRequest
RT_Window - see rtEZRequestA()
RT_ReqPos - see rtEZRequestA()
RT_LeftOffset - see rtEZRequestA()
RT_TopOffset - see rtEZRequestA()
RT_PubScrName - see rtEZRequestA()
RT_Screen - see rtEZRequestA()
RT_ReqHandler - see rtEZRequestA()
RT_WaitPointer - see rtEZRequestA()
RT_LockWindow - [V38] see rtEZRequestA()
RT_ScreenToFront - [V38] see rtEZRequestA()
RT_ShareIDCMP - [V38] see rtEZRequestA()
RT_Locale - [V38] see rtEZRequestA()
RT_IntuiMsgFunc - [V38] see rtEZRequestA()
RT_DefaultFont - (struct TextFont *)
This tag allows you to specify the font to be used in
the requester when the screen font is proportional.
Default is GfxBase->DefaultFont.
RT_TextAttr - [V38] see rtFileRequestA()
Remember: font cannot be proportional!
RTPA_Color - (ULONG)
Initially selected color of palette. Default is 1.
TAGS for ScreenModeRequest
RT_Window - see rtEZRequestA()
RT_ReqPos - see rtEZRequestA()
RT_LeftOffset - see rtEZRequestA()
RT_TopOffset - see rtEZRequestA()
RT_PubScrName - see rtEZRequestA()
RT_Screen - see rtEZRequestA()
RT_ReqHandler - see rtEZRequestA()
RT_WaitPointer - see rtEZRequestA()
RT_LockWindow - see rtEZRequestA()
RT_ScreenToFront - see rtEZRequestA()
RT_ShareIDCMP - see rtEZRequestA()
RT_Locale - see rtEZRequestA()
RT_IntuiMsgFunc - (struct Hook *) [V38]
The requester will call this hook for each IDCMP
message it gets that doesn't belong to its window.
Only applies if you used the RT_ShareIDCMP tag to
share the IDCMP port with the parent window.
Parameters are as follows:
A0 - (struct Hook *) your hook
A2 - (struct rtScreenModeRequester *) your req
A1 - (struct IntuiMessage *) the message
After you have finished examining the message and
your hook returns, ReqTools will reply the message.
So do not reply the message yourself!
RT_Underscore - (char) [V38]
Indicates the symbol that precedes the character in
a gadget's label to be underscored. This will also
define the keyboard shortcut for this gadget.
Currently only needed for RTSC_OkText. Usually set
to '_'.
RT_DefaultFont - (struct TextFont *)
This tag allows you to specify the font to be used
in the requester when the screen font is
proportional. Default is GfxBase->DefaultFont.
RT_TextAttr - [V38] see rtFileRequestA()
Remember: font cannot be proportional!
RTSC_Flags - (ULONG)
Several flags:
SCREQF_OVERSCANGAD - Add an overscan cycle
gadget to the requester.
After the requester returns
you may read the overscan
type in 'rq->OverscanType'
If this is 0 no overscan is
selected (Regular Size), if
non-zero it holds one of
the OSCAN_... values
defined in the include file
'intuition/screens.[h|i]'.
SCREQF_AUTOSCROLLGAD - Add an autoscroll checkbox
gadget to the requester.
After the requester returns
read 'smreq->AutoScroll' to
see if the user prefers
autoscroll to be on or off.
SCREQF_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 width and height
for the selected overscan
type.
SCREQF_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.
SCREQF_NONSTDMODES - Include all modes. Unless
this flag is set
rtScreenModeRequestA()
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.
SCREQF_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 SCREQF_NONSTDMODES
flag is ignored.
RTSC_Height - (ULONG)
Suggested height of screenmode requester window.
RTSC_OkText - (char *)
Replacement text for "Ok" gadget, max 6 chars long.
RTSC_MinWidth - (UWORD)
The minimum display width allowed.
RTSC_MaxWidth - (UWORD)
The maximum display width allowed.
RTSC_MinHeight - (UWORD)
The minimum display height allowed.
RTSC_MaxHeight - (UWORD)
The maximum display height allowed.
RTSC_MinDepth - (UWORD)
The minimum display depth allowed. Modes with a
minimum display depth lower than this value will not
be included in the list.
RTSC_MaxDepth - (UWORD)
The maximum display depth allowed.
RTSC_PropertyFlags - (ULONG)
A mode must have these property flags to be
included. Only bits set in RTSC_PropertyMask are
considered.
RTSC_PropertyMask - (ULONG)
Mask to apply to RTSC_PropertyFlags to determine
which bits to consider. See use of 'newsignals' and
'signalmask' in exec.library/SetSignal(). Default
is to consider all bits in RTSC_PropertyFlags as
significant.
RTSC_FilterFunc - (struct Hook *)
Call this hook for each display mode id in the
system's list.
Parameters are as follows:
A0 - (struct Hook *) your hook
A2 - (struct rtScreenModeRequester *) your req
A1 - (ULONG) 32-bit extended mode id
If your hook returns TRUE the mode will be accepted.
If it returns FALSE the mode will be skipped and
will not appear in the requester.