wDirDialog

This class represents the directory chooser dialog. Only modal dialog is supported.

Superclass:wDialog
Styles:
StylesDescription
wDdDirMustExistThe dialog will allow the user to choose only an existing folder.
wDdChangeDirChange the current working directory to the directory chosen by the user.

Procs

proc init(self: wDirDialog; owner: wWindow = nil; message = ""; defaultPath = "";
         style: wStyle = 0) {...}{.raises: [wWindowError, wCursorError, IndexDefect,
                                  wFontError], tags: [RootEffect].}
Initializer.
proc DirDialog(owner: wWindow = nil; message = ""; defaultPath = ""; style: wStyle = 0): wDirDialog {...}{.
    inline, discardable,
    raises: [wWindowError, wCursorError, IndexDefect, wFontError], tags: [RootEffect].}
Constructor.
proc getPath(self: wDirDialog): string {...}{.inline, raises: [], tags: [].}
Returns the default or user-selected path.
proc getMessage(self: wDirDialog): string {...}{.inline, raises: [], tags: [].}
Returns the message that will be displayed on the dialog.
proc setPath(self: wDirDialog; path: string) {...}{.inline, raises: [], tags: [].}
Sets the default path.
proc setMessage(self: wDirDialog; message: string) {...}{.inline, raises: [], tags: [].}
Sets the message that will be displayed on the dialog.
proc showModal(self: wDirDialog): wId {...}{.discardable, raises: [Exception],
                                    tags: [RootEffect].}
Shows the dialog, returning wIdOk if the user pressed OK, and wIdCancel otherwise.
proc display(self: wDirDialog): string {...}{.inline, discardable, raises: [Exception],
                                     tags: [RootEffect].}
Shows the dialog in modal mode, returning the selected path or nil.