All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

Dialog Class CATDlgFile

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---System.CATEventSubscriber
        |
        +---System.CATCommand
          |
          +---Dialog.CATDialog
            |
            +---Dialog.CATDlgWindow
              |
              +---CATDlgFile
 

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


public class CATDlgFile

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
Under Unix, a standard Motif file selection dialog box is displayed
As so, the box texts follow the installation language of the Operatings System and not the language selected for V5.

Specific to Unix:There are three kinds of file windows: default, apply, and help. Apply and help file windows feature an Apply and Help push button respectively, in addition to the OK, Filter and Cancel push buttons. In addition, a file window can be set to modal. The modal file window locks the dialog to this window as long as it 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 selection box. Once the box ended, the application will have to interfere only when the the following events occur:

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


Constructor and Destructor Index


o CATDlgFile(CATDialog*,CATString&,CATDlgStyle)
Constructs a file selection box.
o CATDlgFile(CATInteractiveApplication*,CATString&,CATDlgStyle)
Constructs a file selection box.

Method Index


o GetAPPLYSensitivity()
Gets the APPLY button sensitivity.
o GetAPPLYTitle()
Gets the APPLY button title.
o GetActiveFilterIndex()
Gets the active item in the type filter combo (Windows only).
o GetCANCELSensitivity()
Gets the CANCEL button sensitivity.
o GetCANCELTitle()
Gets the CANCEL button title.
o GetDiaAPPLYNotification()
Returns the CATDiaAPPLYNotification event notification.
o GetDiaCANCELNotification()
Returns the CATDiaCANCELNotification event notification.
o GetDiaHELPNotification()
Returns the CATDiaHELPNotification event notification.
o GetDiaOKNotification()
Returns the CATDiaOKNotification event notification.
o GetDirectoriesLabel()
Gets the directories label.
o GetDirectory(CATUnicodeString&)
Gets the directory whose contents is currently displayed.
o GetFILTERSensitivity()
Gets the FILTER button sensitivity.
o GetFILTERTitle()
Gets the FILTER button title.
o GetFilesLabel()
Gets the files label.
o GetFilterLabel()
Gets the filter label.
o GetFilterPattern(CATUnicodeString&)
Gets the current filter (UNIX only).
o GetFilterStrings(CATUnicodeString*,CATString*,int)
Gets the type filter combo strings (Windows only).
o GetHELPSensitivity()
Gets the HELP button sensitivity.
o GetHELPTitle()
Gets the HELP button title.
o GetOKSensitivity()
Gets the OK button sensitivity.
o GetOKTitle()
Gets the OK button title.
o GetReadOnlyState()
Gets the file access type (Windows only).
o GetSelection(CATUnicodeString&)
Gets the selected file.
o GetSelection(CATUnicodeString*,int)
Gets the selected files.
o GetSelectionCount()
Gets the selected files count.
o GetSelectionLabel()
Gets the selection label.
o SetAPPLYSensitivity(CATULong)
Sets the APPLY button sensitivity.
o SetAPPLYTitle(CATUnicodeString&)
Sets the APPLY button title.
o SetActiveFilterIndex(int)
Sets the active item in the type filter combo (Windows only).
o SetCANCELSensitivity(CATULong)
Sets the CANCEL button sensitivity.
o SetCANCELTitle(CATUnicodeString&)
Sets the CANCEL button title.
o SetDirectoriesLabel(CATUnicodeString&)
Sets the directories label.
o SetDirectory(CATUnicodeString&)
Sets the directory whose contents is currently displayed.
o SetFILTERSensitivity(CATULong)
Sets the FILTER button sensitivity.
o SetFILTERTitle(CATUnicodeString&)
Sets the FILTER button title.
o SetFileName(CATUnicodeString&)
Sets the file name field contents.
o SetFilesLabel(CATUnicodeString&)
Sets the files label.
o SetFilterLabel(CATUnicodeString&)
Sets the filter label.
o SetFilterPattern(CATUnicodeString&)
Sets the filter string.
o SetFilterStrings(CATUnicodeString*,CATString*,int)
Sets the type filter combo strings (Windows only).
o SetHELPSensitivity(CATULong)
Sets the HELP button sensitivity.
o SetHELPTitle(CATUnicodeString&)
Sets the HELP button title.
o SetOKSensitivity(CATULong)
Sets the OK button sensitivity.
o SetOKTitle(CATUnicodeString&)
Sets the OK button title.
o SetReadOnlyState(int)
Sets the file access to the read only value (Windows only).
o SetSelectionLabel(CATUnicodeString&)
Sets the selection label.

Constructor and Destructor


o CATDlgFile
public CATDlgFile(CATDialog* iParent,
const CATString& iDialogObjectName,
CATDlgStyle iStyle=NULL)
Constructs a file selection box.
Role: Constructs a file selection box.
Parameters:
iParent
The parent of the CATDlgFile. The parent must be an instance of a class that derives from CATDlgDocument.
iDialogObjectName
The dialog object name.
iStyle
The application window styles. You can cumulate several styles using a logical or.
Legal values:
  • NULL (default):The file window features the OK and Cancel push buttons (it is dedicated to opening files),
  • CATDlgWndModal:In addition to the default style, the file window is modal (that is, no interaction is possible outside this window as long as it is displayed). Under Windows, the file window is modal whatever the style specified.
  • CATDlgWndAPPLY: In addition to the default style, the file window features the Apply push button. This style is ignored under Windows.
  • CATDlgWndHELP: In addition to the default style, the file window features the Help push button. This style is ignored under Windows.
  • CATDlgFileSave: The file window is dedicated to saving files. (the Open push button is replaced by the Save push button),
  • CATDlgFileMultisel: The file window enables the file multiple selection.
  • CATDlgFolderChooser: The file window is dedicated to select a folder
o CATDlgFile
public CATDlgFile(CATInteractiveApplication* iParent,
const CATString& iDialogObjectName,
CATDlgStyle iStyle=NULL)
Constructs a file selection box.
Role: Constructs a file selection box.
Parameters:
iParent
The parent of the CATDlgFile.
iDialogObjectName
The dialog object name.
iStyle
The application window styles. You can cumulate several styles using a logical or.
Legal values:
  • NULL(default):The file window features the OK and Cancel push buttons (it is dedicated to opening files),
  • CATDlgWndModal:In addition to the default style, the file window is modal (that is, no interaction is possible outside this window as long as it is displayed). Under Windows, the file window is modal whatever the style specified.
  • CATDlgWndAPPLY: In addition to the default style, the file window features the Apply push button. This style is ignored under Windows.
  • CATDlgWndHELP: In addition to the default style, the file window features the Help push button. This style is ignored under Windows.
  • CATDlgFileSave: The file window is dedicated to saving files. (the Open push button is replaced by the Save push button),
  • CATDlgFileMultisel: The file window enables the file multiple selection,
  • CATDlgFolderChooser: The file window is dedicated to select a folder.

Methods


o GetAPPLYSensitivity
public CATULong GetAPPLYSensitivity()
Gets the APPLY button sensitivity. The sensitivity specifies the access to the user through selection.
Returns:
The APPLY button sensitivity.
Legal values: CATDlgEnable if the OK button can be selected, or CATDlgDisable otherwise.
o GetAPPLYTitle
public CATUnicodeString GetAPPLYTitle()
Gets the APPLY button title.
Parameters:
iTitle
The APPLY button title.
o GetActiveFilterIndex
public int GetActiveFilterIndex()
Gets the active item in the type filter combo (Windows only).
Returns:
The active item.
o GetCANCELSensitivity
public CATULong GetCANCELSensitivity()
Gets the CANCEL button sensitivity. The sensitivity specifies the access to the user through selection.
Returns:
The CANCEL button sensitivity.
Legal values: CATDlgEnable if the OK button can be selected, or CATDlgDisable otherwise.
o GetCANCELTitle
public CATUnicodeString GetCANCELTitle()
Gets the CANCEL button title.
Parameters:
iTitle
The CANCEL button title.
o GetDiaAPPLYNotification
public CATNotification * GetDiaAPPLYNotification()const
Returns the CATDiaAPPLYNotification event notification. It is sent by CATDlgFile whenever the APPLY push button is pressed.
o GetDiaCANCELNotification
public CATNotification * GetDiaCANCELNotification()const
Returns the CATDiaCANCELNotification event notification. It is sent by CATDlgFile whenever the CANCEL push button is pressed.
o GetDiaHELPNotification
public CATNotification * GetDiaHELPNotification()const
Returns the CATDiaHELPNotification event notification. It is sent by CATDlgFile whenever the HELP push button is pressed.
o GetDiaOKNotification
public CATNotification * GetDiaOKNotification()const
Returns the CATDiaOKNotification event notification. It is sent by CATDlgFile whenever the OK push button is pressed.
o GetDirectoriesLabel
public CATUnicodeString GetDirectoriesLabel()
Gets the directories label.
Returns:
iLabel The directories label.
o GetDirectory
public void GetDirectory(CATUnicodeString& oCurrentDirectory)
Gets the directory whose contents is currently displayed.
Parameters:
oCurrentDirectory
The current directory path.
o GetFILTERSensitivity
public CATULong GetFILTERSensitivity()
Gets the FILTER button sensitivity. The sensitivity specifies the access to the user through selection.
Returns:
The FILTER button sensitivity.
Legal values: CATDlgEnable if the OK button can be selected, or CATDlgDisable otherwise.
o GetFILTERTitle
public CATUnicodeString GetFILTERTitle()
Gets the FILTER button title.
Parameters:
iTitle
The FILTER button title.
o GetFilesLabel
public CATUnicodeString GetFilesLabel()
Gets the files label.
Returns:
iLabel The files label.
o GetFilterLabel
public CATUnicodeString GetFilterLabel()
Gets the filter label.
Returns:
iLabel The filter label.
o GetFilterPattern
public void GetFilterPattern(CATUnicodeString& oCurrentFilter)
Gets the current filter (UNIX only).
Parameters:
oCurrentFilter
The current filter.
o GetFilterStrings
public int GetFilterStrings(CATUnicodeString* oTypeDescriptionList,
CATString* oTypeExtensionsList,
int iInputAllocatedSize)
Gets the type filter combo strings (Windows only).
Parameters:
oTypeDescriptionList
The type filter descriptions array.
oTypeExtensionsList
The type filter extensions array.
iInputAllocatedSize
The size you allocated for oTypeDescriptionList and oTypeExtensionsList.
o GetHELPSensitivity
public CATULong GetHELPSensitivity()
Gets the HELP button sensitivity. The sensitivity specifies the access to the user through selection.
Returns:
The HELP button sensitivity.
Legal values: CATDlgEnable if the OK button can be selected, or CATDlgDisable otherwise.
o GetHELPTitle
public CATUnicodeString GetHELPTitle()
Gets the HELP button title.
Parameters:
iTitle
The HELP button title.
o GetOKSensitivity
public CATULong GetOKSensitivity()
Gets the OK button sensitivity. The sensitivity specifies the access to the user through selection.
Returns:
The OK button sensitivity.
Legal values: CATDlgEnable if the OK button can be selected, or CATDlgDisable otherwise.
o GetOKTitle
public CATUnicodeString GetOKTitle()
Gets the OK button title.
Parameters:
iTitle
The OK button title.
o GetReadOnlyState
public int GetReadOnlyState()
Gets the file access type (Windows only).
Returns:
The boolean value specifying if the access is read only.
o GetSelection
public void GetSelection(CATUnicodeString& oSelectedFile)
Gets the selected file.
Parameters:
oSelectedFile
The selected file.
o GetSelection
public int GetSelection(CATUnicodeString* oSelectedFiles,
int iInputAllocatedSize)
Gets the selected files.
Parameters:
oSelectedFiles
The selected files names.
iInputAllocatedSize
The size you allocated for the oSelectedFiles parameter.
o GetSelectionCount
public int GetSelectionCount()
Gets the selected files count.
Returns:
The selected files count.
o GetSelectionLabel
public CATUnicodeString GetSelectionLabel()
Gets the selection label.
Returns:
iLabel The selection label.
o SetAPPLYSensitivity
public void SetAPPLYSensitivity(CATULong iSensitivity)
Sets the APPLY button sensitivity. The sensitivity specifies the access to the user through selection.
Parameters:
iSensitivity
The APPLY button sensitivity.
Legal values: CATDlgEnable so that the OK button can be selected, or CATDlgDisable otherwise.
o SetAPPLYTitle
public void SetAPPLYTitle( const CATUnicodeString& iTitle)
Sets the APPLY button title. Ignored on Windows.
Parameters:
iTitle
The APPLY button title.
o SetActiveFilterIndex
public void SetActiveFilterIndex(int iActiveItem)
Sets the active item in the type filter combo (Windows only).
Parameters:
iActiveItem
The active item.
o SetCANCELSensitivity
public void SetCANCELSensitivity(CATULong iSensitivity)
Sets the CANCEL button sensitivity. The sensitivity specifies the access to the user through selection.
Parameters:
iSensitivity
The CANCEL button sensitivity.
Legal values: CATDlgEnable so that the OK button can be selected, or CATDlgDisable otherwise.
o SetCANCELTitle
public void SetCANCELTitle( const CATUnicodeString& iTitle)
Sets the CANCEL button title. Ignored on Windows.
Parameters:
iTitle
The CANCEL button title.
o SetDirectoriesLabel
public void SetDirectoriesLabel( const CATUnicodeString& )
Sets the directories label. Ignored on Windows.
Parameters:
iLabel
The label for the directories.
o SetDirectory
public void SetDirectory( const CATUnicodeString& iCurrentDirectory)
Sets the directory whose contents is currently displayed.
Under Windows, the method is ignored if called after window is displayed.
Parameters:
iCurrentDirectory
The current directory path.
o SetFILTERSensitivity
public void SetFILTERSensitivity(CATULong iSensitivity)
Sets the FILTER button sensitivity. The sensitivity specifies the access to the user through selection.
Parameters:
iSensitivity
The FILTER button sensitivity.
Legal values: CATDlgEnable so that the OK button can be selected, or CATDlgDisable otherwise.
o SetFILTERTitle
public void SetFILTERTitle( const CATUnicodeString& iTitle)
Sets the FILTER button title. Ignored on Windows.
Parameters:
iTitle
The FILTER button title.
o SetFileName
public void SetFileName( const CATUnicodeString& )
Sets the file name field contents.
Parameters:
iFileName
The file name field contents.
o SetFilesLabel
public void SetFilesLabel( const CATUnicodeString& )
Sets the files label. Ignored on Windows.
Parameters:
iLabel
The label for the files.
o SetFilterLabel
public void SetFilterLabel( const CATUnicodeString& iLabel)
Sets the filter label. Ignored on Windows.
Parameters:
iLabel
The label for the filter.
o SetFilterPattern
public void SetFilterPattern( const CATUnicodeString& iCurrentFilter)
Sets the filter string.
Parameters:
iCurrentFilter
The current filter.
o SetFilterStrings
public void SetFilterStrings(CATUnicodeString* iTypeDescriptionList,
CATString* iTypeExtensionsList,
int iTypeFilterCount)
Sets the type filter combo strings (Windows only).
Parameters:
iTypeDescriptionList
The type filter descriptions array.
iTypeExtensionsList
The type filter extensions array.
iTypeFilterCount
The type filter count.
o SetHELPSensitivity
public void SetHELPSensitivity(CATULong iSensitivity)
Sets the HELP button sensitivity. The sensitivity specifies the access to the user through selection.
Parameters:
iSensitivity
The HELP button sensitivity.
Legal values: CATDlgEnable so that the OK button can be selected, or CATDlgDisable otherwise.
o SetHELPTitle
public void SetHELPTitle( const CATUnicodeString& iTitle)
Sets the HELP button title. Ignored on Windows.
Parameters:
iTitle
The HELP button title.
o SetOKSensitivity
public void SetOKSensitivity(CATULong iSensitivity)
Sets the OK button sensitivity. The sensitivity specifies the access to the user through selection.
Parameters:
iSensitivity
The OK button sensitivity.
Legal values: CATDlgEnable so that the OK button can be selected, or CATDlgDisable otherwise.
o SetOKTitle
public void SetOKTitle( const CATUnicodeString& iTitle)
Sets the OK button title. Ignored on Windows.
Parameters:
iTitle
The OK button title.
o SetReadOnlyState
public void SetReadOnlyState(int iFlag)
Sets the file access to the read only value (Windows only).
Parameters:
iFlag
The boolean value.
o SetSelectionLabel
public void SetSelectionLabel( const CATUnicodeString& )
Sets the selection label. Ignored on Windows.
Parameters:
iLabel
The label for the selection.

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

Copyright © 2003, Dassault Systèmes. All rights reserved.