### IFileDialog::Settings

  The IFileDialog::Settings class contains input for an IFileDialog object. If you do not specify a Settings object on the IFileDialog constructor, a default Settings object is created for you. This default object provides an open dialog with no other settings in effect.

  You can pass the following information within an IFileDialog::Settings object to an IFileDialog:

  - The dialog's title
  - The text to appear on the OK push button
  - The position of the dialog
  - Whether the dialog is an Open or Save As dialog
  - An initial file specification

#### OS/2 Considerations

  You can also specify the following items within a Settings object:

  - An initial file type extended attribute
  - An initial drive specification
  - A dialog template to use in place of the system default

### IFileDialog::Settings - Member Functions and Data by Group

### Constructors & Destructor

You can construct and destruct objects of this class.

~Settings

      public:
      ~Settings()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

Settings

      public:
      Settings()

  Provides the default constructor, which accepts no parameters.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Dialog Customization

Use these members to customize the file dialog presented to the user. The file dialog includes the dialog's title, OK push button's text, dialog position, and the dialog template to use.

isDialogTemplateSet

      public:
      bool isDialogTemplateSet() const

  Returns true if the dialog template was set.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

isPositionSet

      public:
      bool isPositionSet() const

  Returns true if the dialog position was set.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

okButtonText

      public:
      IString okButtonText() const

  Returns the text of the OK push button.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

position

      public:
      IPoint position() const

  Returns the initial placement of the dialog within the parent window.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setDialogTemplate

      public:
      Settings& setDialogTemplate(const IResourceId& resId)

  Sets a dialog template resource to use in place of the supplied default file dialog.

  resId
    The resource ID of the dialog template to use.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

setOKButtonText

  Sets the text that appears on the OK push button. The parameters are one of the following:

  newText
    A character string to appear on the OK push button.
  resId
    The resource ID of a string to appear on the OK push button.

  Overload 1

      public:
      Settings& setOKButtonText(const char* newText)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      Settings& setOKButtonText(const IResourceId& resId)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setPosition

      public:
      Settings& setPosition(const IPoint& position)

  Sets the initial placement of the dialog within the parent window.

  position
    The initial position for the dialog.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setTitle

  Sets the dialog's title. The parameters are one of the following:

  newTitle
    A character string to use as the dialog title.
  resId
    The resource ID of a string to use as the dialog title.

  Overload 1

      public:
      Settings& setTitle(const char* newTitle)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      Settings& setTitle(const IResourceId& resId)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

title

      public:
      IString title() const

  Returns the dialog's title.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Setting Information about the Initial Dialog

Use these members to set and query the initial information that appears in the dialog.

addDrive

      public:
      Settings& addDrive(const char* drive)

  Adds a drive or network identifier to the Drive list in the initial dialog. If you call this function, the Drive list is limited to the drives you specify in drive.

  drive
    The drive or network identifier to add to the Drive list.

Supported Platforms

  Windows | OS/2 | AIX
  Ignored | Yes | Ignored

addFileType

      public:
      Settings&
        addFileType( const char* fileType,
                     const char* filter = 0 )

  Adds the specified type to the drop-down list box of extended-attribute types in OS/2, or adds a description and file filter to the file types list box in Windows.

  fileType
    The extended-attribute type to add in OS/2, or the file type description in Windows.
  filter
    The file filter for the type description. Ignored in OS/2.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

OS/2 Considerations
  The second parameter is ignored, and the first parameter is interpreted as an extended-attribute type.

Windows Considerations
  The first parameter is a description that appears in the file type list box, and the second parameter is the file filter to match the description.

fileName

      public:
      IString fileName() const

  Returns the default file name selection.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

initialDrive

      public:
      IString initialDrive() const

  Returns the drive for which initial information is displayed.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

initialFileType

      public:
      IString initialFileType() const

  Returns the file type that is used to filter the initial list of files.

Supported Platforms

  Windows | OS/2 | AIX
  Ignored | Yes | Ignored

isOpenDialog

      public:
      bool isOpenDialog() const

  Returns true if dialog is an open dialog.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setFileName

      public:
      Settings&
        setFileName( const char* fileName,
                     bool fileNameIsFilter = true )

  Sets a default file name selection.

  fileName
    The file name to use as the default. If you want to specify global (or wildcard) characters or path information for the dialog defaults, include this information in this parameter's string. If you do not specify the path with the file name, the current directory is used.
  fileNameIsFilter
    Whether or not the file name given is a filter (wildcard). In AIX, if you specify that the file name is a filter, it is used to initialize the Filter field, and the current directory is used to initialize the Selection field. If you specify that the file name is not a filter, it is used to initialize the Selection field, and the Filter field is initialized with the system default filter. This parameter is ignored in OS/2 and Windows.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

OS/2 Considerations

  The second parameter is ignored.

Windows Considerations

  The second parameter is ignored.

setInitialDrive

      public:
      Settings& setInitialDrive(const char* drive)

  Sets the drive for which initial information is displayed. If you do not call this function, the dialog displays the information for the current drive. If you specify a drive for this function, you do not have to specify it again when calling addDrive.

  drive
    The initial drive to display.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

setInitialFileType

      public:
      Settings& setInitialFileType(const char* fileType)

  Sets the extended attribute that filters the initial display of files. If you do not call this function, the default is . If you specify a type for this function, you do not have to specify it again when calling addFileType.

  fileType
    The initial extended attribute.

Supported Platforms

  Windows | OS/2 | AIX
  Ignored | Yes | Ignored

setOpenDialog

      public:
      Settings& setOpenDialog()

  Creates an Open File dialog. An Open File dialog has the list of files enabled for selection, while a Save As dialog has this list disabled. An Open File dialog is the default.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setSaveAsDialog

      public:
      Settings& setSaveAsDialog()

  Creates a Save As dialog. An Open File dialog is the default. By default, an Open File dialog has the list of files enabled for selection, while a Save As dialog has this list disabled. You can use the style IFileDialog::selectableListbox to force the list of files to be selectable on a Save As dialog.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IFileDialog::Settings - Inherited Member Functions and Data

#### Inherited Public Functions

  - None

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None