proc init(self: wFileDialog; owner: wWindow = nil; message = ""; defaultDir = "";
defaultFile = ""; wildcard = "*.*"; style: wStyle = wFdOpen) {...}{.
raises: [wWindowError, wCursorError, IndexDefect, wFontError], tags: [RootEffect].}
-
Initializer.
proc FileDialog(owner: wWindow = nil; message = ""; defaultDir = ""; defaultFile = "";
wildcard = "*.*"; style: wStyle = wFdOpen): wFileDialog {...}{.inline,
discardable, raises: [wWindowError, wCursorError, IndexDefect, wFontError],
tags: [RootEffect].}
-
Constructor.
proc getMessage(self: wFileDialog): string {...}{.inline, raises: [], tags: [].}
-
Returns the message that will be displayed on the dialog.
proc getDirectory(self: wFileDialog): string {...}{.inline, raises: [], tags: [].}
-
Returns the default directory.
proc getFilename(self: wFileDialog): string {...}{.inline, raises: [], tags: [].}
-
Returns the default filename.
proc getWildcard(self: wFileDialog): string {...}{.inline, raises: [], tags: [].}
-
Returns the file dialog wildcard.
proc getFilterIndex(self: wFileDialog): int {...}{.inline, raises: [], tags: [].}
-
Returns the index into the list of filters supplied. Before the dialog is shown, this is the index which will be used. After the dialog is shown, this is the index selected by the user.
proc getPath(self: wFileDialog): string {...}{.inline, raises: [], tags: [].}
-
Returns the full path (directory and filename) of the selected file. If the user selects multiple files, this only return the directory. If the dialog is cancelled, the return value is nil.
proc getPaths(self: wFileDialog): seq[string] {...}{.inline, raises: [], tags: [].}
-
Returns a seq to full paths of the files chosen. If the dialog is cancelled, the return value is empty seq (@[]).
proc setMessage(self: wFileDialog; message: string) {...}{.inline, raises: [], tags: [].}
-
Sets the message that will be displayed on the dialog.
proc setDirectory(self: wFileDialog; defaultDir: string) {...}{.inline, raises: [], tags: [].}
-
Sets the default directory.
proc setFilename(self: wFileDialog; defaultFile: string) {...}{.inline, raises: [], tags: [].}
-
Sets the default filename.
proc setWildcard(self: wFileDialog; wildcard: string) {...}{.inline, raises: [], tags: [].}
-
Sets the wildcard, which can contain multiple file types, for example: "BMP files (*.bmp)|*.bmp|JPEG files (*.jpg, *.jpeg)|*.jpg;*.jpeg".
proc setFilterIndex(self: wFileDialog; index: int) {...}{.inline, raises: [], tags: [].}
-
Sets the default filter index, starting from one.
proc showModal(self: wFileDialog): wId {...}{.discardable,
raises: [IndexDefect, Exception],
tags: [RootEffect].}
-
Shows the dialog, returning wIdOk if the user pressed OK, and wIdCancel otherwise.
proc display(self: wFileDialog): seq[string] {...}{.inline, discardable,
raises: [IndexDefect, Exception], tags: [RootEffect].}
-
Shows the dialog in modal mode, returning the selected files or @[].