|
OWLNext 7.0
Borland's Object Windows Library for the modern age
|
TOpenSaveDialog structure contains information about the user's file open or save selection. More...
#include <owl/opensave.h>
Public Member Functions | |
| TData (uint32 flags=0, LPCTSTR filter=nullptr, TCHAR *customFilter=nullptr, LPCTSTR initialDir=nullptr, LPCTSTR defExt=nullptr, int maxPath=0, int filterIndex=0, uint32 flagsEx=0) | |
| Constructs a TOpenSaveDialog::TData structure. | |
| TData (uint32 flags, const tstring &filter, TCHAR *customFilter=nullptr, LPCTSTR initialDir=nullptr, LPCTSTR defExt=nullptr, int maxPath=0, int filterIndex=0, uint32 flagsEx=0) | |
| String-aware overload TODO: Add string support for all parameters. | |
| TData (const TData &src) | |
| ~TData () | |
| Destructs a TOpenSaveDialog::TData structure. | |
| TData & | operator= (const TData &src) |
| void | SetFilter (LPCTSTR filter=nullptr) |
| Makes a copy of the filter list used to display the file names. | |
| void | SetFilter (const tstring &filter) |
| void | Write (opstream &os) |
| void | Read (ipstream &is) |
| auto | GetFileNames () const -> std::vector< tstring > |
| Returns a vector containing the full paths of every file entry in member FileName. | |
Public Attributes | |
| uint32 | Flags |
| Flag contains one or more of the following constants: | |
| uint32 | Error |
| This is the return value from calling CommDlgExtendedError after executing the dialog in the implementation of TOpenSaveDialog::Execute. | |
| TCHAR * | FileName |
| Holds the name of the file to be saved or opened. | |
| TCHAR * | Filter |
| Filter holds the filter to use initially when displaying file names. | |
| int | FilterIndex |
| FilterIndex indicates which filter to use initially when displaying file names. | |
| LPCTSTR | InitialDir |
| Directory to use initially when displaying file names. | |
| LPCTSTR | DefExt |
| Default extension to use when saving file names. | |
| int | MaxPath |
| uint32 | FlagsEx |
TOpenSaveDialog structure contains information about the user's file open or save selection.
Specifically, this structure stores a user-specified file name filter, file extension, file name, the initial directory to use when displaying file names, any error codes, and various file attributes that determine, for example, if the file is a read-only file. The classes TFileOpenDialog and TFileSaveDialog use the information stored in this structure when a file is opened or saved.
Definition at line 44 of file opensave.h.
| owl::TOpenSaveDialog::TData::TData | ( | uint32 | flags = 0, |
| LPCTSTR | filter = nullptr, | ||
| TCHAR * | customFilter = nullptr, | ||
| LPCTSTR | initialDir = nullptr, | ||
| LPCTSTR | defExt = nullptr, | ||
| int | maxPath = 0, | ||
| int | filterIndex = 0, | ||
| uint32 | flagsEx = 0 ) |
Constructs a TOpenSaveDialog::TData structure.
| filter | Note: Copied; the string is stored in an internal buffer. |
| customFilter | Note: Not used; dummy for backward compatibility. |
| initialDir | Note: Not copied; the string pointed to must outlive this object. |
| defExt | Note: Not copied; the string pointed to must outlive this object. |
Definition at line 21 of file opensave.cpp.
References FileName, Flags, MaxPath, and SetFilter().
| owl::TOpenSaveDialog::TData::TData | ( | uint32 | flags, |
| const tstring & | filter, | ||
| TCHAR * | customFilter = nullptr, | ||
| LPCTSTR | initialDir = nullptr, | ||
| LPCTSTR | defExt = nullptr, | ||
| int | maxPath = 0, | ||
| int | filterIndex = 0, | ||
| uint32 | flagsEx = 0 ) |
String-aware overload TODO: Add string support for all parameters.
| customFilter | Note: Not used; dummy for backward compatibility. |
| initialDir | Note: Not copied; the string pointed to must outlive this object. |
| defExt | Note: Not copied; the string pointed to must outlive this object. |
Definition at line 55 of file opensave.cpp.
References FileName, Flags, MaxPath, and SetFilter().
| owl::TOpenSaveDialog::TData::TData | ( | const TData & | src | ) |
Definition at line 84 of file opensave.cpp.
References FileName, MaxPath, SetFilter(), and strnewdup().
| owl::TOpenSaveDialog::TData::~TData | ( | ) |
Destructs a TOpenSaveDialog::TData structure.
Definition at line 102 of file opensave.cpp.
Returns a vector containing the full paths of every file entry in member FileName.
This function is only useful in conjunction with a multi-selection TFileOpenDialog using the Explorer style.
Usage:
Definition at line 513 of file opensave.cpp.
References _T, CHECK, and PRECONDITION.
| TOpenSaveDialog::TData & owl::TOpenSaveDialog::TData::operator= | ( | const TData & | src | ) |
Definition at line 112 of file opensave.cpp.
References strnewdup().
Definition at line 415 of file opensave.cpp.
References _A2W, _USES_CONVERSION, DefExt, FileName, Filter, FilterIndex, Flags, FlagsEx, InitialDir, and strnewdup().
Definition at line 158 of file opensave.h.
References SetFilter().
Makes a copy of the filter list used to display the file names.
Set the file list box filter strings. Translates '|'s into 0s so that the string can be kept as a resource with imbeded '|'s like:
Can also handle already processed filter strings.
Definition at line 141 of file opensave.cpp.
Definition at line 459 of file opensave.cpp.
References _USES_CONVERSION, and _W2A.
| LPCTSTR owl::TOpenSaveDialog::TData::DefExt |
Default extension to use when saving file names.
Note: This is an external reference; the string pointed to must outlive this object.
Definition at line 127 of file opensave.h.
| uint32 owl::TOpenSaveDialog::TData::Error |
This is the return value from calling CommDlgExtendedError after executing the dialog in the implementation of TOpenSaveDialog::Execute.
Usage:
Definition at line 108 of file opensave.h.
| TCHAR* owl::TOpenSaveDialog::TData::FileName |
Holds the name of the file to be saved or opened.
Note: This member points to an internal buffer. Do not modify!
Definition at line 112 of file opensave.h.
| TCHAR* owl::TOpenSaveDialog::TData::Filter |
Filter holds the filter to use initially when displaying file names.
Note: This member points to an internal buffer. Do not modify!
Definition at line 116 of file opensave.h.
| int owl::TOpenSaveDialog::TData::FilterIndex |
FilterIndex indicates which filter to use initially when displaying file names.
Definition at line 119 of file opensave.h.
| uint32 owl::TOpenSaveDialog::TData::Flags |
Flag contains one or more of the following constants:
OFN_HIDEREADONLY Hides the read-only check box.OFN_FILEMUSTEXIST Lets the user enter only names of existing files in the File Name entry field. If an invalid file name is entered, a warning message is displayed.OFN_PATHMUSTEXIST Lets the user enter only valid path names. If an invalid path name is entered, a warning message is displayed.OFN_NOVALIDATE Performs no check of the file name and requires the owner of a derived class to perform validation.OFN_NOCHANGEDIR Sets the current directory back to what it was when the dialog was initiated.OFN_ALLOWMULTISELECT Allows multiple selections in the File Name list box.OFN_CREATEPROMPT Asks if the user wants to create a file that does not currently exist.OFN_EXTENSIONDIFFERENT Idicates the user entered a file name different from the specified in DefExt. This message is returned to the caller.OFN_NOREADONLYRETURN The returned file does not have the Read Only attribute set and is not in a write-protected directory. This message is returned to the caller.OFN_NOTESTFILECREATE The file is created after the dialog box is closed. If the application sets this flag, there is no check against write protection, a full disk, an open drive door, or network protection. For certain network environments, this flag should be set.OFN_OVERWRITEPROMPT The Save As dialog box displays a message asking the user if it's OK to overwrite an existing file.OFN_SHAREAWARE If this flag is set and a call to open a file fails because of a sharing violation, the error is ignored and the dialog box returns the given file name. If this flag is not set, the virtual function ShareViolation is called, which returns OFN_SHAREWARN (by default) or one of the following values: – OFN_SHAREFALLTHROUGH - File name is returned from the dialog box. – OFN_SHARENOWARN - No further action is taken. – OFN_SHAREWARN - User receives the standard warning message for this type of error.OFN_SHOWHELP Shows the Help button in the dialog box. Definition at line 80 of file opensave.h.
| uint32 owl::TOpenSaveDialog::TData::FlagsEx |
Definition at line 130 of file opensave.h.
| LPCTSTR owl::TOpenSaveDialog::TData::InitialDir |
Directory to use initially when displaying file names.
Note: This is an external reference; the string pointed to must outlive this object.
Definition at line 123 of file opensave.h.
| int owl::TOpenSaveDialog::TData::MaxPath |
Definition at line 129 of file opensave.h.