3D PLM Enterprise Architecture |
User Interface - Dialogs |
CATDlgFileThe window to list, select, open, and save files |
Quick Reference |
CATDialog | +---CATDlgWindow | +---CATDlgFile
The file window are used to list, select, open, and save files. |
Use the message window when you want to give an information feedback to the end user.
The parent of a instance of the CATDlgFile class must be an instance of a class that derives from CATInteractiveApplication or CATDlgDocument. |
[Top]
Name | Example | Description |
---|---|---|
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 file multiple selection |
The default file window shown in the figure above includes a filter editor to navigate in the directory tree, two multiline editors, one for directories and the other for files, and a selection editor. In addition, it includes three push buttons: OK, Filter and Cancel. Other styles are CADlgWndModal which is similar to default, but in addition makes the window modal, that is requests the user to answer and exit the window before going ahead, and meanwhile preventing to perform any interaction in another window of the application (The default window is modeless.), CATDlgWndApply which includes in addition to the default an Apply push button, and CATDlgHelp which includes a Help push button.
[Top]
Notification | Method | Sent when |
---|---|---|
CATDlgDiaOKNotification | GetDiaOKNotification |
Whenever the OK push button is pressed |
CATDlgDiaCANCELNotification | GetDiaCANCELNotification |
Whenever the Cancel push button is pressed |
CATDlgDiaHELPNotification | GetDiaHELPNotification |
Whenever the Help push button is pressed |
CATDlgDiaAPPLYNotification | GetDiaAPPLYNotification |
Whenever the Apply push button is pressed |
[Top]
By default, a CATDlgFile instance should be used with the File Open command and features a Read Only check button. Use the CATDlgFileSave style for the File Save command.
For example, for a help message window:
_pFileWindow = new CATDlgFile(iApplication, iName, CATDlgWndModal); |
[Top]
You can set or get the Filter and Directories fields values, set the Files field value, and get the selected file(s) as follows:
CATUnicodeString ucPattern = ... ; _pFileWindow->SetFilterPattern(ucPattern); |
The SetDirectory, and SetFileName methods apply to the Directories and Files field values respectively.
CATUnicodeString ucPattern; ucPattern = _pFileWindow->GetFilterPattern(); |
The GetDirectory method apply to the Directories field value.
CATUnicodeString ucSelectedFile; _pFileWindow->GetSelection(ucSelectedFile); |
CATUnicodeString * ucSelectedFiles; int Size; // Size of the CATUnicodeString table returned _pFileWindow->GetSelection(ucSelectedFiles, Size); |
int Count; Count = _pFileWindow->GetSelectionCount(); |
[Top]
You can set or get the Filter, Directories, Files, and Selection labels as follows:
CATUnicodeString ucLabel = ... ; _pFileWindow->SetFilterLabel(ucLabel); |
The SetDirectoriesLabel, SetFilesLabel, and SetSelectionLabel methods apply to the Directories, Files, and Selection labels respectively.
CATUnicodeString ucLabel; ucLabel = _pFileWindow->GetFilterLabel(); |
The GetDirectoriesLabel, GetFilesLabel, and GetSelectionLabel methods apply to the Directories, Files, and Selection labels respectively.
[Top]
You can set or get the filter list along with the associated extensions as follows:
CATUnicodeString * pucFileTypes = ... ; // Table of file types CATSting * psFileExtensions = ... ; // Table of associated file extensions int nbFileTypes = ... ; // Number of file types _pFileWindow->SetFilterStrings(pucFileTypes, psFileExtensions, nbFileTypes); |
CATUnicodeString * pucFileTypes; CATSting * psFileExtensions; int nbFileTypes; _pFileWindow->GetFilterStrings(pucFileTypes, psFileExtensions, nbFileTypes); |
You can set or get the active filter index as follows:
int Index = ... ; _pFileWindow->SetActiveFilterIndex(Index); |
int Index; Index = _pFileWindow->SetActiveFilterIndex(); |
You can set or get the read only push button state as follows:
int State = ... ; // =0 unckecked, and checked otherwise _pFileWindow->SetReadOnlyState(State); |
int State; State = _pFileWindow->GetReadOnlyState(); |
[Top]
You can set or get the OK, Apply, Filter, Cancel, or Help push button title and sensitivity as follows:
CATUnicodeString ucTitle = ... ; _pFileWindow->SetOKTitle(ucTitle); |
The SetAPPLYTitle, SetFILTERTitle, SetCANCELTitle, and SetHELPTitle methods apply to the APPLY, FILTER, CANCEL, and HELP push button respectively.
CATUnicodeString ucTitle; ucTitle = _pFileWindow->GetOKTitle(); |
The GetAPPLYTitle, GetFILTERTitle, GetCANCELTitle, and GetHELPTitle methods apply to the APPLY, FILTER, CANCEL, and HELP push button respectively.
_pFileWindow->SetOKSensitivity(CATDlgEnable); |
Setting the sensitivity to CATDlgDisable
displays the push
button as grayed and disable its sensitivity. The SetAPPLYSensitivity,
SetFILTERSensitivity, SetCANCELSensitivity, and SetHELPSensitivity methods
apply to the APPLY, FILTER, CANCEL, and HELP push button respectively.
CATULONG Sensitivity; Sensitivity= _pFileWindow->GetOKSensitivity(); |
The GetAPPLYSensitivity, GetFILTERSensitivity, GetCANCELSensitivity, and GetHELPSensitivity methods apply to the APPLY, FILTER, CANCEL, and HELP push button respectively.
[Top]
The file window title should be set by the resource file using a key built with the identifier you declare as the second parameter of the file window constructor.
[Top]
Version: 1 [Jan 2000] | Document created |
[Top] |
Copyright © 2000, Dassault Systèmes. All rights reserved.