Dialog CATDlgStdFile

Usage: you must use this class as is. You should never derive it.


public class CATDlgStdFile

Class delivering a file or folder selection box.
Role: Enables a file or folder selection. This window offers a file selection box with a filter to apply to search for files or a folder selection box.

Under Windows, a standard Windows file or folder selection box is displayed.
As so, the box texts follow the installation language of the Operatings System and not the language selected for V6.
Under Unix, a window partly emulating a Windows file or folder selection box is displayed.

This window is used to list, select, open or save files or to list and select folders.

The purpose of most methods below is to initialize the file/folder selection box. Once the box ended, the application will have to interfere only when the following events occur:

In the meantime, all the dialog is managed by this software.


Constructor and Destructor Index


o CATDlgStdFile(CATDialog*,CATString&,CATDlgStyle)
Constructs a folder selection box.
o CATDlgStdFile(CATDialog*,CATString&,CATDlgStyle,CATListOfCATUnicodeString&)
Constructs a Save file selection box.
o CATDlgStdFile(CATDialog*,CATString&,CATDlgStyle,CATDlgStyle,CATListOfCATUnicodeString&)
Constructs an Open file selection box.

Method Index


o GetActiveFilterIndex()
Gets the active item in the type filter combo.
o GetDirectoriesLabel()
Gets the directories label.
o GetDirectory(CATUnicodeString&)
Gets the directory whose contents is currently displayed.
o GetFilesLabel()
Gets the files label.
o GetFilterLabel()
Gets the filter label.
o GetFilterPattern(CATUnicodeString&)
Gets the current filter (open context and save context).
o GetFilterStrings(CATUnicodeString*,CATString*,int)
Gets the type filter combo strings.
o GetReadOnlyState()
Gets the file access type (open context only).
o GetSelection(CATUnicodeString*,int)
Gets the selected files or the selected folder.
o GetSelection(CATUnicodeString&)
Gets the selected file or folder.
o GetSelectionCount()
Gets the selected files count or the selected folder count.
o GetSelectionLabel()
Gets the selection label.
o SetActiveFilterIndex(int)
Sets the active item in the type filter combo.
o SetDirectoriesLabel(CATUnicodeString&)
Overwrites the default directories label.
o SetDirectory(CATUnicodeString&)
Sets the directory whose contents is currently displayed.
o SetFileName(CATUnicodeString&)
Sets the file name field contents.
o SetFilesLabel(CATUnicodeString&)
Overwrites the default files label.
o SetFilterLabel(CATUnicodeString&)
Overwrites the default filter label.
o SetFilterPattern(CATUnicodeString&)
Sets the filter string (open context and save context).
o SetFilterStrings(CATUnicodeString*,CATString*,int)
Sets the type filter combo strings.
o SetListAvailableExtensions(CATListOfCATUnicodeString&)
nodoc not implemented on Windows.
o SetReadOnlyState(int)
Sets the file access to the read only value (open context only).
o SetSelectionLabel(CATUnicodeString&)
Overwrites the default selection label.

Constructor and Destructor


o CATDlgStdFile
public CATDlgStdFile( iParent,
const iDialogObjectName,
iStyle)
Constructs a folder selection box.
Role: Constructs a folder selection box.
Parameters:
iParent
The parent of the CATDlgStdFile object. The parent must be an instance of a class that derives from CATDlgDocument.
iDialogObjectName
The dialog object name.
iStyle
The application window style. .
Legal values: NULL (default) or CATDlgWndModal if the file window is modal (that is, no interaction is possible outside this window as long as it is displayed). Under Windows, the window is always modal.
o CATDlgStdFile
public CATDlgStdFile( iParent,
const iDialogObjectName,
iStyle,
const iavailableExtensions)
Constructs a Save file selection box.
Role: Constructs a file selection box dedicated to saving files.
Parameters:
iParent
The parent of the CATDlgStdFile object. The parent must be an instance of a class that derives from CATDlgDocument. * @param iDialogObjectName The dialog object name.
iStyle
The application window style.
Legal values: NULL (default) or CATDlgWndModal if the file window is modal (that is, no interaction is possible outside this window as long as it is displayed). Under Windows, the window is always modal.
iavailableExtensions
Defines a list of filters for the open context. You may pass an empty list and define the types of files using
.
o CATDlgStdFile
public CATDlgStdFile( iParent,
const iDialogObjectName,
iStyle,
iStdStyle,
const iavailableExtensions)
Constructs an Open file selection box.
Role: Constructs a file selection box dedicated to opening files.
Parameters:
iParent
The parent of the CATDlgStdFile object. The parent must be an instance of a class that derives from CATDlgDocument.
iDialogObjectName
The dialog object name.
iStyle
The application window style.
Legal values: NULL (default) or CATDlgWndModal if the file window is modal (that is, no interaction is possible outside this window as long as it is displayed). Under Windows the window is always modal.
iStdStyle
Defines the activity of differents check buttons. You can cumulate several styles using a logical or.
Legal values: CATDlgStdFileMultisel if the file window enables the file multiple selection, or CATDlgStdFileReadOnly so that the file window contains a check button for the read mode. Under Windows, the check button is available whatever the style.
iavailableExtensions
Defines a list of filters for the open context. You may pass an empty list and define the types of files using
.

Methods


o GetActiveFilterIndex
public GetActiveFilterIndex()
Gets the active item in the type filter combo.
Returns:
The active item.
o GetDirectoriesLabel
public GetDirectoriesLabel()
Gets the directories label.
Returns:
iLabel The directories label.
o GetDirectory
public GetDirectory( oCurrentDirectory)
Gets the directory whose contents is currently displayed.
Parameters:
oCurrentDirectory
The current directory path.
o GetFilesLabel
public GetFilesLabel()
Gets the files label.
Returns:
iLabel The files label.
o GetFilterLabel
public GetFilterLabel()
Gets the filter label.
Returns:
iLabel The filter label.
o GetFilterPattern
public GetFilterPattern( oCurrentFilter)
Gets the current filter (open context and save context).
Parameters:
oCurrentFilter
The current filter.
o GetFilterStrings
public GetFilterStrings( oTypeDescriptionList,
oTypeExtensionsList,
iInputAllocatedSize)
Gets the type filter combo strings.
Parameters:
oTypeDescriptionList
The type filter descriptions array.
oTypeExtensionsList
The type filter extensions array.
iInputAllocatedSize
The size you allocated for oTypeDescriptionList and oTypeExtensionsList.
o GetReadOnlyState
public GetReadOnlyState()
Gets the file access type (open context only).
Returns:
The boolean value specifying if the access is read only.
o GetSelection
public GetSelection( oSelections,
iInputAllocatedSize)
Gets the selected files or the selected folder.
Parameters:
oSelections
The selected files names or the selected folder name.
iInputAllocatedSize
The size you allocated for the oSelections parameter.
o GetSelection
public GetSelection( oSelection)
Gets the selected file or folder.
Parameters:
oSelection
The selected file or folder.
o GetSelectionCount
public GetSelectionCount()
Gets the selected files count or the selected folder count.
Returns:
The selected files count or the selected folder count.
o GetSelectionLabel
public GetSelectionLabel()
Gets the selection label.
Returns:
iLabel The selection label.
o SetActiveFilterIndex
public SetActiveFilterIndex( iActiveItem)
Sets the active item in the type filter combo.
Parameters:
iActiveItem
The active item.
o SetDirectoriesLabel
public SetDirectoriesLabel( const iLabel)
Overwrites the default directories label. Ignored on Windows.
Parameters:
iLabel
The label for the directories.
o SetDirectory
public SetDirectory( const iCurrentDirectory)
Sets the directory whose contents is currently displayed.
Under Windows, the method is ignored if called after window is displayed.
Parameters:
iCurrentDirectory
The directory path to be made current
o SetFileName
public SetFileName( const )
Sets the file name field contents.
Parameters:
iFileName
The file name field contents.
o SetFilesLabel
public SetFilesLabel( const iLabel)
Overwrites the default files label. Ignored on Windows.
Parameters:
iLabel
The label for the files.
o SetFilterLabel
public SetFilterLabel( const iLabel)
Overwrites the default filter label. Ignored on Windows.
Parameters:
iLabel
The label for the filter.
o SetFilterPattern
public SetFilterPattern( const iCurrentFilter)
Sets the filter string (open context and save context).
Parameters:
iCurrentFilter
The current filter.
o SetFilterStrings
public SetFilterStrings( iTypeDescriptionList,
iTypeExtensionsList,
iTypeFilterCount)
Sets the type filter combo strings.
Parameters:
iTypeDescriptionList
The type filter descriptions array.
iTypeExtensionsList
The type filter extensions array.
iTypeFilterCount
The type filter count.
o SetListAvailableExtensions
public SetListAvailableExtensions( const iavailableExtensions)
nodoc not implemented on Windows. Is an alternative to SetFilterStrings Sets the list of available extensions (open context and save context).
Parameters:
iavailableExtensions
The current list.
o SetReadOnlyState
public SetReadOnlyState( iFlag)
Sets the file access to the read only value (open context only).
Parameters:
iFlag
The boolean value.
o SetSelectionLabel
public SetSelectionLabel( const iLabel)
Overwrites the default selection label. Ignored on Windows.
Parameters:
iLabel
The label for the selection.

This object is included in the file: CATDlgStdFile.h
If needed, your Imakefile.mk should include the module: CATDlgStandard

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.