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:

OS/2 Considerations

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


IFileDialog::Settings - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


[view class]
~Settings
public:
~Settings()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
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.


[view class]
isDialogTemplateSet
public:
bool isDialogTemplateSet() const

Returns true if the dialog template was set.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isPositionSet
public:
bool isPositionSet() const

Returns true if the dialog position was set.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
okButtonText
public:
IString okButtonText() const

Returns the text of the OK push button.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
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


[view class]
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


[view class]
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


[view class]
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


[view class]
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


[view class]
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.


[view class]
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


[view class]
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.

[view class]
fileName
public:
IString fileName() const

Returns the default file name selection.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
initialDrive
public:
IString initialDrive() const

Returns the drive for which initial information is displayed.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored


[view class]
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


[view class]
isOpenDialog
public:
bool isOpenDialog() const

Returns true if dialog is an open dialog.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
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.


[view class]
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


[view class]
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


[view class]
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


[view class]
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

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data