wTextEntryDialog

This class represents a dialog that requests a one-line text string from the user. Both modal or modaless dialog are supported.

Superclass:wDialog
Subclass:wPasswordEntryDialog
Events:wDialogEvent
wDialogEventDescription
wEvent_DialogCreatedWhen the dialog is created but not yet shown.
wEvent_DialogClosedWhen the dialog is being closed.

Procs

proc getValue(self: wTextEntryDialog): string {...}{.inline, raises: [], tags: [].}
Returns the text that the user has entered if the user has pressed OK, or the original value if the user has pressed Cancel.
proc setValue(self: wTextEntryDialog; value: string) {...}{.inline, raises: [], tags: [].}
Sets the default text value.
proc getMaxLength(self: wTextEntryDialog): int {...}{.inline, raises: [], tags: [].}
Returns the maximum number of characters.
proc setMaxLength(self: wTextEntryDialog; length: int) {...}{.inline, raises: [], tags: [].}
Sets the maximum number of characters the user can enter into this dialog.
proc getMessage(self: wTextEntryDialog): string {...}{.inline, raises: [], tags: [].}
Returns the message that will be displayed on the dialog.
proc setMessage(self: wTextEntryDialog; message: string) {...}{.inline, raises: [], tags: [].}
Sets the message that will be displayed on the dialog.
proc getCaption(self: wTextEntryDialog): string {...}{.inline, raises: [], tags: [].}
Gets the caption that will be displayed on the dialog.
proc setCaption(self: wTextEntryDialog; caption: string) {...}{.inline, raises: [], tags: [].}
Sets the caption that will be displayed on the dialog.
proc getStyle(self: wTextEntryDialog): wStyle {...}{.inline, raises: [], tags: [].}
Gets the window style of the dialog.
proc setStyle(self: wTextEntryDialog; style: wStyle) {...}{.inline, raises: [], tags: [].}
Sets the window style of the dialog. The styles for wWindow and wFrame can be use here.
proc getPosition(self: wTextEntryDialog): wPoint {...}{.inline, raises: [], tags: [].}
Gets the initial position of the dialog.
proc setPosition(self: wTextEntryDialog; pos: wPoint) {...}{.inline, raises: [], tags: [].}
Sets the position of the dialog. Using wDefaultPoint to centre the dialog.
proc setOKCancelLabels(self: wTextEntryDialog; ok: string; cancel: string) {...}{.inline,
    raises: [], tags: [].}
Overrides the default labels of the OK and Cancel buttons.
proc init(self: wTextEntryDialog; owner: wWindow = nil; message = "Input text";
         caption = ""; value = ""; style: wStyle = wDefaultDialogStyle;
         pos = wDefaultPoint) {...}{.raises: [wWindowError, wCursorError, IndexDefect,
                                     wFontError], tags: [RootEffect].}
Initializer.
proc TextEntryDialog(owner: wWindow = nil; message = "Input text"; caption = "";
                    value = ""; style: wStyle = wDefaultDialogStyle;
                    pos = wDefaultPoint): wTextEntryDialog {...}{.inline, discardable,
    raises: [wWindowError, wCursorError, IndexDefect, wFontError], tags: [RootEffect].}
Constructor.
proc showModal(self: wTextEntryDialog): wId {...}{.discardable, raises: [wWindowError,
    wCursorError, wBrushError, Exception, IndexDefect, wFontError, wNilAccess,
    DuplicateEditVariableException, RequiredFailureException,
    DuplicateConstraintException, UnsatisfiableConstraintException, KeyError,
    UnknownEditVariableException], tags: [RootEffect].}
Shows the dialog, returning wIdOk if the user pressed OK, and wIdCancel otherwise.
proc display(self: wTextEntryDialog): string {...}{.inline, discardable, raises: [
    wWindowError, wCursorError, wBrushError, Exception, IndexDefect, wFontError,
    wNilAccess, DuplicateEditVariableException, RequiredFailureException,
    DuplicateConstraintException, UnsatisfiableConstraintException, KeyError,
    UnknownEditVariableException], tags: [RootEffect].}
Shows the dialog in modal mode, returning the user-entered text or empty string.
proc showModaless(self: wTextEntryDialog) {...}{.raises: [wWindowError, wCursorError,
    wBrushError, Exception, IndexDefect, wFontError, wNilAccess,
    DuplicateEditVariableException, RequiredFailureException,
    DuplicateConstraintException, UnsatisfiableConstraintException, KeyError,
    UnknownEditVariableException], tags: [RootEffect].}
Shows the dialog in modaless mode. The dialog will recieve wEvent_DialogClosed event when the dialog is closed.
proc close(self: wTextEntryDialog) {...}{.inline, raises: [], tags: [].}
Close a modaless dialog.
proc getReturnCode(self: wTextEntryDialog): wId {...}{.inline, raises: [], tags: [].}
Gets the return code for a modaless dialog. Returning wIdOk if the user pressed OK, and wIdCancel otherwise.
proc getReturnId(self: wTextEntryDialog): wId {...}{.inline, raises: [], tags: [].}
The same as getReturnCode().