WidgetDialogBuilder

Description

sealed class Tinman.Engine.Widgets.WidgetDialogBuilder

Derived from

Disposable abstract

Builder for WidgetDialog instances.

Public / Constants

Label​Cancel


[Localized]
public constant LabelCancel → ("Cancel":string)

Label of the CANCEL button.

Label​No


[Localized]
public constant LabelNo → ("No":string)

Label of the NO button.

Label​Ok


[Localized]
public constant LabelOk → ("Ok":string)

Label of the OK button.

Label​Yes


[Localized]
public constant LabelYes → ("Yes":string)

Label of the YES button.

Public / Constructors

Build


[OwnerReturn] [OwnerThis]
public method Build → ()

returns → WidgetDialog

The built object.

Builds a WidgetDialog from the current settings.

Public / Methods

Button


[OwnerReturn] [OwnerThis]
public method Button → (4)

result in : DialogResultCode

The result code of the button. Must not be DialogResultCode.None.

text in : string

[not-empty]
The button text.

icon opt : IResourceHandle = null

The button or or null for none.

action opt : InputClick = default(InputClick)

The button keyboard shortcut.

returns → WidgetDialogBuilder

this

Specifies a dialog button.

Button​Cancel


[OwnerReturn] [OwnerThis]
public method ButtonCancel → ()

returns → WidgetDialogBuilder

this

Specifies the default dialog button for DialogResultCode.Cancel:
'Cancel' with KeyboardKey.Backspace + InputModifiers.Control

Button​No


[OwnerReturn] [OwnerThis]
public method ButtonNo → ()

returns → WidgetDialogBuilder

this

Specifies the default dialog button for DialogResultCode.Cancel:
'No' with KeyboardKey.Backspace + InputModifiers.Control

Button​Ok


[OwnerReturn] [OwnerThis]
public method ButtonOk → ()

returns → WidgetDialogBuilder

this

Specifies the default dialog button for DialogResultCode.Ok:
'Ok' with KeyboardKey.Backspace + InputModifiers.Control

Button​Yes


[OwnerReturn] [OwnerThis]
public method ButtonYes → ()

returns → WidgetDialogBuilder

this

Specifies the default dialog button for DialogResultCode.Ok:
'Yes' with KeyboardKey.Backspace + InputModifiers.Control

Content

3 overloads


[OwnerReturn] [OwnerThis]
public method Content1 → (1)

content in : Component own

[not-null]
The component that represents the dialog content.

returns → WidgetDialogBuilder

this

Specifies content for the dialog.

Multiple content components may be specified for a dialog. They will be stacked vertically.


[OwnerReturn] [OwnerThis]
public method Content2 → (2)

content in : string

[not-null]
The text document (see TextDocument) that represents the dialog content.

callback opt : IDocumentViewCallback = null

The document view callback or null.

returns → WidgetDialogBuilder

this

Specifies content for the dialog.

Multiple content components may be specified for a dialog. They will be stacked vertically.

ValidatingException

If one or more parsing errors have occurred.


[OwnerReturn] [OwnerThis]
public method Content3 → (2)

content in : TextDocument

[not-null]
The text document that represents the dialog content.

callback opt : IDocumentViewCallback = null

The document view callback or null.

returns → WidgetDialogBuilder

this

Specifies content for the dialog.

Multiple content components may be specified for a dialog. They will be stacked vertically.

Event​Delegate


[OwnerReturn] [OwnerThis]
public method EventDelegate → (1)

listener in : EventDelegateGeneric<DialogEventArgs>

[not-null]
The listener.

returns → WidgetDialogBuilder

this

Adds a dialog result listener.

Event​Listener


[OwnerReturn] [OwnerThis]
public method EventListener → (1)

listener in : IEventListenerGeneric<DialogEventArgs>

[not-null]
The listener.

returns → WidgetDialogBuilder

this

Adds a dialog result listener.

Result


public method Result → (1)

result in : object

The result value or null.

returns → WidgetDialogBuilder

this

Specifies the result value that will be passed to DialogEventArgs.ResultValue for DialogResultCode.Ok.

The default result value is null.

Show


[OwnerThis]
public method Show → (3)

gui in : IWidgetGui

[not-null]
The widget GUI to use.

flags in : WidgetDialogFlags

The widget dialog flags.

identifier opt : string = null

Optional dialog identifier.

Builds the widget dialog and shows it in the given GUI.

Title


[OwnerReturn] [OwnerThis]
public method Title → (1)

title in : string

[not-empty]
The dialog title.

returns → WidgetDialogBuilder

this

Specifies the dialog title.

User​Data


[OwnerReturn] [OwnerThis]
public method UserData → (1)

userData in : object

The user data object or null.

returns → WidgetDialogBuilder

this

Specifies the value for WidgetDialog.UserData.