@database ReqTooller.guide

@$VER: ReqTooller V1.01 - (C)Amiga Foundation Classes

This guide file has been created using AutoGuide V1.05 - By Fabio Rotondo (fsoft@intercom.it).

@node Main "Amiga Foundation Classes: ReqTooller"



                    ** ReqTooller - Original By Fabio Rotondo **

                       * Part of the Amiga Foundation Classes *

        @{" Introduction " link "ReqTooller_introduction"}             @{" Author's Info " link "author"}        @{" Amiga Foundation Classes " LINK "AFC.Guide/main"}

   Requires:

   Class Base: $000A0000

   NEW COMMANDS                          BRIEF DESCRIPTION
   -------------------------------------------------------------------------
   @{" reqtooller(libver=0)                " link "ReqTooller_reqtooller"} Initailizes the class.
   @{" setattrs(tags)                      " link "ReqTooller_SetAttrs"} Sets class attributes.
   @{" get(tag)                            " link "ReqTooller_Get"} Gets class attributes.
   @{" req(mode, tags=0)                   " link "ReqTooller_Req"} Opens a requester.
   @{" version()                           " link "ReqTooller_version"} Returns class version.

   @{" Error Table " LINK ReqTooller_ErrorTable}
@endnode

@node "ReqTooller_Introduction" "Introduction"

    INTRODUCTION

    This class handles reqtools requesters.
    It is incredibly easy to use and it is completely tags-driven.
    With this class you can create professional requester without having to
    worry about how to allocate and deallocate reqtools structures: it minds
    all about it.


@endnode

@node "author" "Author's Info"

    Original By:  Fabio Rotondo  (fsoft@intercom.it)

    E Version By: Fabio Rotondo



    Address:

            Fabio Rotondo
            C.so Vercelli 9
            28100 Novara
            ITALY

            e-mail: fsoft@intercom.it
                    Fabio.Rotondo@deagostini.it

            Phone:  (ITA) - (0)321 -   459676  (home)
                    (ITA) - (0)2   - 38086520  (office)
                    (ITA) - (0)338 -  7336477  (GSM Phone)

            Fax:    (ITA) - (0)2   - 38086278

            Web:    http://www.intercom.it/~fsoft               (my home page)

                    http://www.intercom.it/~fsoft/ablast.html   (Amiga Blast Home Page)

@endnode

@node ReqTooller_ErrorTable "ReqTooller /  Error Table "

VALUE           | DESCRIPTION
----------------+----------------------------------
$0000           | No Memory


@endnode

@node "ReqTooller_reqtooller" "Amiga Foundation Classes: ReqTooller /  reqtooller()"

           NAME: reqtooller(libver=0)

    DESCRIPTION: This method initializes the class.

          INPUT: libver     - (Optional) Pass this param if you want a specific
                              version of reqtools.library to open. Default is 0
                              which means "any version".

        RESULTS: NONE.

       SEE ALSO:
@endnode

@node "ReqTooller_setattrs" "Amiga Foundation Classes: ReqTooller / setattrs()"

           NAME: setattrs(tags:PTR TO LONG)

    DESCRIPTION: This method is used to set class behaviours.

          INPUT: tags           - a taglist. Avaible tags are:

            COMMON TAGS:

                   RT_TITLE       - Requester title.

                   RT_WIN         - Window where to open the requester on.
                                    Pass a *valid* window pointer expecially if
                                    you are using a custom screen and you don't
                                    want the requester to open on the Workbench
                                    screen.

                   RT_LOCK        - Set this tag to TRUE if you want the window
                                    (set by RT_WIN) to be locked when the
                                    requester appears.

                   RT_UCHAR       - Use this tag to define the "Underscore Char".
                                    Default char is "_".

            FILE REQUESTER TAGS:

                   RT_PATH        - File Requester default path.

                   RT_FILENAME    - File Requester default file name.

                   RT_PATTERN     - File Requester default pattern.

                   RT_OKGAD       - String (max 4 chars) for the "OK" gadget
                                    in the File Requester. You can, for example,
                                    set "Load" or "Save" as "OK" gadget.

                   RT_FULLNAME    - Set this flag to TRUE if you want the full
                                    path returned along with the file name.

            EASY, STRING and NUMBER  REQUESTERS TAGS:

                   RT_TEXT        - You can specify a text inside the requester using
                                    this tag. If you are opening an Easy requester, then
                                    you can specify some "params", like strings and 
                                    numbers to be "dinamically" linked using the RT_ARGS
                                    tags (see below). To specify strings use the usual
                                    "\s" chars for E programs and "%s" for C++ programs.
                                    Example:

                                    ...
                                    RT_TEXT, "Your Name is: \s\nYou are \d years old.",
                                    RT_ARGS, [name, age],
                                    ...



                   RT_GADS        - You can specify all the gads to appear with this
                                    tag. The string you pass *must* contain all the
                                    gads divided by a "|" char. The last gad is
                                    always the "Cancel" gadget. Example:

                                    "Ok|Great|No way!"

                                    Will show three gads: "Ok", "Great" and "No way!"

                                    If you pass a null string, will be just shown an
                                    "Ok" gadget.

                   RT_ARGS        - Here you can specify a list of arguments to
                                    pass to the Easy Requester.
                                    NOTE: This tags only works with EASY requester.

                   RT_INVISIBLE   - Set this tag to TRUE if you want the text being
                                    hidden (shadowed).

                   RT_CHOICE      - Default gadget that will be selected if the user
                                    just presses RETURN key. If you want the default
                                    gadget to be the "Cancel" button, then pass 0 as
                                    value. The other gads are ordinally numbered
                                    from 1 to n, from left to right.

            STRING REQUESTER TAGS:

                   RT_MAXCHARS    - Max chars that can be typed by the user.

                   RT_DEFSTR      - Default string requester string.

            NUMBER REQUESTER TAGS:

                   RT_MINVAL      - Minumum value the user can insert.

                   RT_MAXVAL      - Maximum value the user can insert.

                   RT_NUM         - Default number (please, use RT_DEFVAL).

                   RT_DEFVAL      - Default value in the Number requester.

            FONT REQUESTER TAGS:

                   RT_FONTNAME    - Default font name.

                   RT_FONTSIZE    - Default font size.

                   RT_FONTFLAGS   - Flags for the font requester. See reqtools.library
                                    documentation for further info.

                   RT_FONTSTYLE   - Font style requester flags. See reqtools.library
                                    documentation for further info.

            SCREEN MODE REQUESTER TAGS:

                   RT_SCRID       - Default Screen ID.

                   RT_SCRWIDTH    - Default Screen width.

                   RT_SCRHEIGHT   - Default Screen height.

                   RT_SCRDEPTH    - Default Screen depth.

                   RT_SCROSCAN    - Default Screen Overscan flag (TRUE/FALSE).

                   RT_SCRASCROLL  - Default Screen AutoScroll flag (TRUE/FALSE).

            PALETTE REQUESTER TAGS:

                   RT_COLOR       - Default selected color.

           NOTE: all these tags can be set also when you invoke a @{" req() " LINK "ReqTooller_req"} method.

        RESULTS:

       SEE ALSO: @{" get() " LINK "ReqTooller_get"}
                 @{" req() " LINK "ReqTooller_req"}
@endnode

@node "ReqTooller_get" "Amiga Foundation Classes: ReqTooller / get()"

           NAME: get(tagname)

    DESCRIPTION: Use this method to get avaible values from the class.

          INPUT: tagname        - Tag indicating the value you want.
                                  Avaible value are:

             COMMOND TAGS:

                 RT_TITLE       - Returns default title.


             FILE REQUESTER TAGS:

                 RT_PATH        - Returns actual path.

                 RT_FILENAME    - Return actual file name.


             MULTIFILE REQUESTER TAGS:

                 RT_MULTIFIRST  - First file name selected by the user.

                 RT_MULTINEXT   - Next file name selected by the user.


             FONT REQUESTER TAGS:

                 RT_FONTNAME    - Font name choosen by the user.

                 RT_FONTSIZE    - Font size choosen by the user.

                 RT_FONTSTYLE   - Font style choosen by the user.

                 RT_FONTFLAGS   - Font flags choosen by the user.


             SCREEN REQUESTER TAGS:

                 RT_SCRID       - Screen Display ID value.

                 RT_SCRWIDTH    - Screen width.

                 RT_SCRHEIGHT   - Screen height.

                 RT_SCRDEPTH    - Screen depth.

                 RT_SCROSCAN    - Screen overscan value.

                 RT_SCRASCROLL  - Screen auto scroll.


             STRING REQUESTER TAGS:

                 RT_STRING      - User inserted string.


             NUMBER REQUESTER TAGS:

                 RT_NUM         - User inserted value.


             PALETTE REQUESTER TAGS:

                 RT_COLOR       - User selected color.


        RESULTS: the requested value is returned.

       SEE ALSO: @{" setattrs() " LINK "ReqTooller_SetAttrs"}
                 @{" req()      " LINK "ReqTooller_Req"}

@endnode

@node "ReqTooller_req" "Amiga Foundation Classes: ReqTooller / req()"

           NAME: req(type, tags=NIL:PTR TO LONG)

    DESCRIPTION: This method opens a requester.

          INPUT: type       - Type of requester. Avaible values:

                  RTREQ_FILE        - File requester.

                  RTREQ_SAVE        - Save file requester.

                  RTREQ_PATH        - Path requester.

                  RTREQ_VOLUMES     - Volumes requester.

                  RTREQ_MULTI       - Multi file requester.

                  RTREQ_FONT        - Font requester.

                  RTREQ_COLFONT     - Color font requester.

                  RTREQ_SCREEN      - Screen requester.

                  RTREQ_ALLSCREEN   - Screen requester showing ALL avaible screens
                                      (also HAM and EHB modes).

                  RTREQ_STRING      - String requester.

                  RTREQ_NUMBER      - Number requester.

                  RTREQ_EASY        - Easy Requester.

                  RTREQ_PALETTE     - Palette requester.

                  RTREQ_MESSAGE     - Message requester. This is a very special
                                      requester. It does not have *any* gadget:
                                      you have to mind about opening and closing it.
                                      This is just like an Easy requester, but with
                                      no gadgets, so all the Easy requester tags will
                                      work.
                                      To close this requester, open a RTREQ_MESSAGE
                                      with no text.
                                      Example:

                                      req(RTREQ_MESSAGE, [RT_TEXT, 'Hi world!',0,0])
                                      Delay(100)
                                      req(RTREQ_MESSAGE, [RT_TEXT, '',0,0])

        RESULTS: this method returns the same thing that the corresponding
                 reqtools' requester should return. So, for example, the EasyRequester
                 returns the ordinal number of the pressed gadget.

       SEE ALSO: @{" setattrs() " LINK "ReqTooller_setattrs"}
                 @{" get()      " LINK "ReqTooller_get"}
@endnode

@node "ReqTooller_version" "Amiga Foundation Classes: ReqTooller / version()"

           NAME: version()

    DESCRIPTION: This method returns class version AND revision.

          INPUT: NONE.

        RESULTS: This method returns *two* values: version and revision.

       SEE ALSO:
@endnode

