Public Member Functions | |
this (WindowBase p, string[2][] flt, cstring defaultExtension) | |
Construts a new FileDialog. | |
string | showOpen () |
Displays the dialog box to open a file. | |
string | showSave () |
Displays the dialog box to save a file. | |
Properties | |
void | filters (string[2][] flt) |
The filename filters to display in the "Files of type" or "Save as type" drop-down list. | |
void | openFilters (string[2][] flt) |
The filename filters to display when opening a file. | |
void | saveFilters (string[2][] flt) |
The filename filters to display when opening a file. | |
string | filePath () |
string | filePath (string fp) |
string | fileName () |
string | fileName (string fp) |
Public Attributes | |
OFN | openFlags |
Flags to use when opening a file. Default is OFN.TYPICAL_OPEN. | |
OFN | saveFlags |
Flags to use when saving a file. Default is OFN.TYPICAL_SAVE. | |
char[] | openFilterString |
Internal representation of the filter list to use when opening a file. | |
char[] | saveFilterString |
Internal representation of the filter list to use when saving a file. | |
uint | _structSize = OPENFILENAMEA.sizeof |
HWND | _parentHandle = null |
HINSTANCE | _instanceHandle = null |
LPCTSTR | _filters = null |
LPTSTR | _customFilter = null |
uint | _maxCustomFilterLength = 40 |
uint | filterIndex = 1 |
One-based index of selected filter, or zero if a custom filter has been specified. | |
LPTSTR | _filePath = null |
uint | _maxFilePathLength = 260 |
LPTSTR | _fileName = null |
uint | _maxFileNameLength = 260 |
LPCTSTR | _initialDir = null |
LPCTSTR | _dialogTitle = null |
OFN | flags = cast(OFN) 0 |
A bitwise combination of flags to customise the file dialog. | |
ushort | _fileNameOffset = 0 |
ushort | _fileExtensionOffset = 0 |
LPCTSTR | _defaultExtension = null |
uint | _customHookData = 0 |
LPOFNHOOKPROC | _hookFunction = null |
LPCTSTR | _templateName = null |
OPENFILENAMEA | spec |
This dialog specification as a Windows OPENFILENAMEA structure. | |
Static Protected Member Functions | |
static char[] | filterString (string[2][] flt) |
The same FileDialog instance can be used for both purposes, meaning that such things as the current filename and certain parameters can remain synchronised.
smjg.libs.sdwf.commondialog.FileDialog.this | ( | WindowBase | p, | |
string | flt[2][], | |||
cstring | defaultExtension | |||
) |
Construts a new FileDialog.
p | the parent window of the dialog. | |
flt | the list of file filters. See the FileDialog.filters property. | |
defaultExtension | the extension that will be automatically applied to filenames if omitted, excluding the '.' character. |
string smjg.libs.sdwf.commondialog.FileDialog.showOpen | ( | ) |
Displays the dialog box to open a file.
null
if the operation was cancelled. string smjg.libs.sdwf.commondialog.FileDialog.showSave | ( | ) |
Displays the dialog box to save a file.
null
if the operation was cancelled. void smjg.libs.sdwf.commondialog.FileDialog.filters | ( | string | flt[2][] | ) |
The filename filters to display in the "Files of type" or "Save as type" drop-down list.
Each element of this array specifies a filter. For each filter, the first element is the textual description of the filter, and the second is the wildcard pattern.
Setting this property is equivalent to setting FileDialog.openFilters and FileDialog.saveFilters simultaneously. Separate FileDialog.openFilters and FileDialog.saveFilters properties are also provided in case an application can read file formats that it cannot save, or (less commonly) vice versa.
This property, FileDialog.openFilters and FileDialog.saveFilters are currently write-only, although you can read the internal representation in FileDialog.openFilterString and FileDialog.saveFilterString.
void smjg.libs.sdwf.commondialog.FileDialog.openFilters | ( | string | flt[2][] | ) |
The filename filters to display when opening a file.
void smjg.libs.sdwf.commondialog.FileDialog.saveFilters | ( | string | flt[2][] | ) |
The filename filters to display when opening a file.
string smjg.libs.sdwf.commondialog.FileDialog.filePath | ( | ) |
string smjg.libs.sdwf.commondialog.FileDialog.filePath | ( | string | fp | ) |
string smjg.libs.sdwf.commondialog.FileDialog.fileName | ( | ) |
string smjg.libs.sdwf.commondialog.FileDialog.fileName | ( | string | fp | ) |
static char [] smjg.libs.sdwf.commondialog.FileDialog.filterString | ( | string | flt[2][] | ) | [static, protected] |
uint smjg.libs.sdwf.commondialog.FileDialog._structSize = OPENFILENAMEA.sizeof |
HINSTANCE smjg.libs.sdwf.commondialog.FileDialog._instanceHandle = null |
LPCTSTR smjg.libs.sdwf.commondialog.FileDialog._filters = null |
LPTSTR smjg.libs.sdwf.commondialog.FileDialog._customFilter = null |
One-based index of selected filter, or zero if a custom filter has been specified.
LPTSTR smjg.libs.sdwf.commondialog.FileDialog._filePath = null |
LPTSTR smjg.libs.sdwf.commondialog.FileDialog._fileName = null |
LPCTSTR smjg.libs.sdwf.commondialog.FileDialog._initialDir = null |
LPCTSTR smjg.libs.sdwf.commondialog.FileDialog._dialogTitle = null |
OFN smjg.libs.sdwf.commondialog.FileDialog.flags = cast(OFN) 0 |
A bitwise combination of flags to customise the file dialog.
LPCTSTR smjg.libs.sdwf.commondialog.FileDialog._defaultExtension = null |
LPOFNHOOKPROC smjg.libs.sdwf.commondialog.FileDialog._hookFunction = null |
LPCTSTR smjg.libs.sdwf.commondialog.FileDialog._templateName = null |
OPENFILENAMEA smjg.libs.sdwf.commondialog.FileDialog.spec |
This dialog specification as a Windows OPENFILENAMEA structure.
Flags to use when opening a file. Default is OFN.TYPICAL_OPEN.
Flags to use when saving a file. Default is OFN.TYPICAL_SAVE.
Internal representation of the filter list to use when opening a file.
Internal representation of the filter list to use when saving a file.