@database "getfile_gc"
@master "AMIDEV:NDK/Autodocs/getfile_gc.doc"

@Node Main "getfile_gc.doc"
@toc "Autodocs/AG/INDEX/Main"
    @{" --datasheet--() " Link "--datasheet--()"}
    @{" GETFILE_GetClass() " Link "GETFILE_GetClass()"}
@EndNode

@Node "--datasheet--()" "getfile.gadget/--datasheet--"

@{b}   NAME@{ub}
       getfile_gc -- create getfile BOOPSI objects

@{b}   SUPERCLASS@{ub}
       gadgetclass

@{b}   DESCRIPTION@{ub}
       The getfile gadget class is used to get files and drawers from a file
       requester in an easy and consistent way.  It consists of two button
       gadgets, one read-only and one popfile/popdrawer button, that are
       used to select the file(s)/drawer and show the result.

       Advantages that this class provides:

       > Consistent behaviour and look in all applications using this class
         instead of doing their own file and drawer routines.

       > Easy to use.


@{b}    METHODS@{ub}
       @{"OM_NEW" Link "tabs_gc/OM_NEW"} -- Passed to superclass, defaults set, then @{"OM_SET" Link "tabs_gc/OM_SET"}. Children
                 created.

       @{"OM_SET" Link "tabs_gc/OM_SET"} -- Passed to superclass, custom tags set.

       @{"OM_GET" Link "tabs_gc/OM_GET"} -- @{"Custom" Link "INCLUDE:hardware/custom.h/Main" 23} tag returned or passed to superclass.

       OM_UPDATE -- Passed to superclass, options set then rendered.

       OM_DISPOSE -- Children disposed of, then passed to superclass.

       @{"GM_RENDER" Link "tabs_gc/GM_RENDER"} -- Passed to superclass, then children are rendered.

       @{"GM_HITTEST" Link "tabs_gc/GM_HITTEST"} -- Overrides superclass, returns GMR_GADGETHIT if within
                 the popfile/drawer button.

       GM_HELPTEST -- Overrides superclass, returns GMR_HELPHIT if within
                 the domain of the gadget.

       @{"GM_GOACTIVE" Link "tabs_gc/GM_GOACTIVE"} -- Passed to superclass, passed to popfile/drawer button.

       GM_HANDLEINPUT -- Overrides superclass, all input processed.

       GM_GOINACTIVE -- Passed to superclass, popfile/drawer button deactivat
ed.

       GM_DOMAIN -- Returns GDOMAIN_MINIMUM and GDOMAIN_MAXIMUM dimensions.

       GM_KEYACTIVE -- Private method for keyboard control.

       GM_KEYINACTIVE -- Private method for keyboard control.

       GFILE_REQUEST -- getfile gadget method for invoking the file requester
.

       GFILE_FREELIST -- getfile gadget method for freeing allocated list
                   of files.

@{b}    ATTRIBUTES@{ub}
       Most of these tags operate the same as the ASLFR_#? tags in ASL librar
y.
       See <asl.library/AslRequest> for detailed descriptions.

       GETFILE_TitleText (STRPTR)
	       @{"Requester" Link "INCLUDE:intuition/intuition.h/Main" 142} title text.

          Defaults to @{"NULL" Link "rexxsupport/NULL"}.

          Applicability is (OM_NEW, OM_SET).

       GETFILE_LeftEdge (WORD)
       GETFILE_TopEdge  (WORD)
          @{"Requester" Link "INCLUDE:intuition/intuition.h/Main" 142} placement coordinates.

          Default to ~0, meaning use default ASL placement.

          Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_GET).

       GETFILE_Width  (WORD)
       GETFILE_Height (WORD)
          @{"Requester" Link "INCLUDE:intuition/intuition.h/Main" 142} dimensions.

          Default to ~0, meaning use default ASL size.

          Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_GET).

       GETFILE_File (STRPTR)
          Contents of file gadget.

          Defaults to @{"NULL" Link "rexxsupport/NULL"}.

          Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, @{"OM_GET" Link "tabs_gc/OM_GET"}, OM_NOTIFY).

       GETFILE_Drawer (STRPTR)
          Contents of drawer gadget.

          Defaults to @{"NULL" Link "rexxsupport/NULL"}.

          Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, @{"OM_GET" Link "tabs_gc/OM_GET"}, OM_NOTIFY).

       GETFILE_FullFile (STRPTR)
          Complete qualified file name. Replaces GETFILE_Drawer and GETFILE_F
ile.

          Defaults to @{"NULL" Link "rexxsupport/NULL"}.

          Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, @{"OM_GET" Link "tabs_gc/OM_GET"}, OM_NOTIFY).

       GETFILE_FullFileExpand (BOOL)
          GETFILE_FullFile will give complete file name(s) expanded with
          @{"NameFromLock()" Link "dos/NameFromLock()"} to remove relative paths.

          Defaults to TRUE.

          Applicability is (OM_NEW, OM_SET).

       GETFILE_Pattern (STRPTR)
          Contents of pattern gadget.

          Defaults to "#?".

          Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_GET).

       GETFILE_DoSaveMode (BOOL)
          Being used for saving?

          Defaults to FALSE.

          Applicability is (OM_NEW, OM_SET).

       GETFILE_DoMultiSelect (BOOL)
          Do multi-select of files?

          Defaults to FALSE.

          Applicability is (OM_NEW, OM_SET).

       GETFILE_DoPatterns (BOOL)
          Display a Pattern gadget?

          Defaults to FALSE.

          Applicability is (OM_NEW, OM_SET).

       GETFILE_DrawersOnly	(BOOL)
          Don't display files?

          Defaults to FALSE.

          Applicability is (OM_NEW, OM_SET).

       GETFILE_FilterFunc (struct @{"Hook" Link "INCLUDE:utility/hooks.h/Main" 26} *)
          Function to filter files.

          Defaults to none.

          Applicability is (OM_NEW, OM_SET).

       GETFILE_RejectIcons	(BOOL)
          Display .info files?

          Defaults to FALSE.

          Applicability is (OM_NEW, OM_SET).

       GETFILE_RejectPattern	(UBYTE *)
          Don't display files matching pattern.

          Defaults to none.

          Applicability is (OM_NEW, OM_SET).

       GETFILE_AcceptPattern (UBYTE *)
          Accept only files matching pattern.

          Defaults to none.

          Applicability is (OM_NEW, OM_SET).

       GETFILE_FilterDrawers (BOOL)
          Also filter drawers with pattern.

          Defaults to FALSE.

          Applicability is (OM_NEW, OM_SET).

       GETFILE_Filelist (struct @{"List" Link "INCLUDE:exec/lists.h/Main" 19} *)
          If the GETFILE_DoMultiSelect tags was used, you can get a pointer
          to the list of selected files/drawers using this tag. The ln_Name
          part of each node will contain the filename/drawername for each
          selected file with a fully qualified path, even if you didn't use
          the GETFILE_FullFileExpand.
          In single-selected mode, the list will contain the single selected
          file for notification purposes. Don't forget to free the list using
          the GFILE_FREELIST method! This list is not suitable to be shown
          directly in a listbrowser gadget without conversion as default, use
          GETFILE_LBNodeStruct for that.

          Applicability is (OM_GET, OM_NOTIFY).

       GETFILE_LBNodeStruct (BOOL)
          GETFILE_Filelist will give a list with ListBrowserNodes instead of
          normal struct @{"Node" Link "INCLUDE:exec/nodes.h/Main" 21} node structures. NOTE: This tag requires that
          listbrowser.gadget is installed.

          Defaults to FALSE.

          Applicability is (OM_NEW).

       GETFILE_ReadOnly (BOOL)
          If TRUE, a read-only recessed button gadget is used to present the
          file/drawer information. If FALSE, an editable string gadget is use
d.
          The gadget will send the supported attributes in a OM_NOTIFY when a
          this tag is FALSE and the user is finished editing the content of t
he
          string gadget. The application can be aware of all changes to the
          string gadget by setting ICA_TARGET to TARGET_IDCMP for this
          getfile gadget instance and watching IDCMP_IDCMPUPDATE messages.
          See the provided example program for an example on how this can be
          done. V44 - note, IDCMP Code will be set equal to the GadgetID if
          the popup button was clicked, and zero if the string was active.

          Defaults to FALSE.

          Applicability is (OM_NEW).

@EndNode

@Node "GETFILE_GetClass()" "getfile.gadget/GETFILE_GetClass"

@{b}   NAME@{ub}
       GETFILE_GetClass -- Gets the pointer to the file requester class

@{b}   SYNOPSIS@{ub}
       getfile_class = GETFILE_GetClass();
       D0

       Class * GETFILE_GetClass( void );

@{b}   FUNCTION@{ub}
       Obtains the pointer to the getfile gadget class for use with
       @{"NewObject()" Link "intuition/NewObject()"}.  This function always returns a valid pointer so
       you do not need to check it.  The reason is that if the library
       opens fine, then the pointer returned is already setup.  (Of course
       this implies that if opening the library fails, you shouldn't be
       calling this.)

       Note that this function does not create the class, that is done
       when the class library is opened.

@{b}   INPUTS@{ub}

@{b}   RESULT@{ub}
       getfile_class - Pointer to the getfile gadget class.

@{b}   EXAMPLE@{ub}

@{b}   NOTES@{ub}
       The GFILE_REQUEST method will return 0 if no file is selected and
       the GETFILE_DrawersOnly tag is not used, even is the user selected
       the positive response in the requester. If a file is selected (the
       file gadget in the file requester is not empty), it will return 1.

@{b}   BUGS@{ub}

@{b}   SEE ALSO@{ub}

@EndNode

