IWidgetGui

Description

interface Tinman.Engine.Widgets.IWidgetGui

Provides a graphical user interface for IWidgets.

The widget GUI covers the whole screen and provides two collapsible work areas: WidgetGuiSlot.Controls and WidgetGuiSlot.Editors. These are placed at the right resp. left edge of the screen. The center part of the widget GUI may be used to present dialogs (both modal and non-modal), for example: confirmation dialogs (modal), file chooser (modal), help browser (non-modal). Toolbar button may be added to the top edge of the screen.

+---------------------------------------------+
| .---------.  _______ _______   .----------. |
| | Editors | |Button1|Button2|  | Controls | |
| |=========|                    |==========| |
| | panel 1 |    .----------.    | panel A  | |
| |---------|    |  Dialog  |    |----------| |
| | panel 2 |    |==========|    | panel B  | |
| |---------|    | This OK? |    |----------| |
| | ...     |    |----------|    | ...      | |
| |---------|    | yes | no |    |----------| |
| | panel 9 |    °----------°    | panel Z  | |
| °---------°                    °----------° |
+---------------------------------------------+

The methods of ILocalizable will delegate to the root container of the GUI, see Root.

Public / Methods

Button​Add


public method ButtonAdd → (1)

button in : PushButton own

[not-null]
The button to add to the toolbar.

Adds a toolbar button to the widget GUI.

Button​Remove


public method ButtonRemove → (1)

button in : PushButton

[not-null]
The button to remove from the toolbar.

Removes a toolbar button from the widget GUI.

Dialog​Hide


public method DialogHide → (1)

identifier opt : string = null

The identifier of the current dialog. If equal to the value that has been passed to DialogShow, the dialog will be cancelled. If null, the current dialog will be cancelled regardless of its identifier.

returns → string

The dialog identifier of the dialog that has been cancelled or null.

Hides the current dialog by cancelling it.

Dialog​Show


public method DialogShow → (3)

dialog in : WidgetDialog own

[not-null]
The widget dialog to show.

flags in : WidgetDialogFlags

The widget dialog flags.

identifier opt : string = null

Optional dialog identifier. If null, 'dialog' will be used.

Shows a dialog in the center part of the widget GUI.

Focus​Clear


public method FocusClear → ()

Clears the input focus of the widget GUI.

Help​Setup


public method HelpSetup → (3)

documentIndex in : Path

The document index of the help system content. See DocumentBrowser.Content1 for details. If null, the help system will be disabled.

helpAction opt : InputClick = default(InputClick)

The input action for triggering the help system.

provider opt : IHelpProvider = null

Optional IHelpProvider object.

Sets up the help system.

Panel​Add


public method PanelAdd → (5)

slot in : WidgetGuiSlot

The widget GUI slot where the given panel will be put.

panel in : Panel own

[not-null]
The panel to add.

size opt : int32 = 0

[>=0]
The minimum width of panel in in the widget GUI slot.

limit opt : int32 = 0

[>=0]
The maximum width of panel in in the widget GUI slot or 0 for no limit.

action opt : InputClick = default(InputClick)

The input action of the panel.

returns → Panel

panel in

Adds a panel to the widget GUI.

Panel​Remove


public method PanelRemove → (1)

panel in : Panel

[not-null]
The panel to remove.

Removes a panel from the widget GUI.

Panel​State


public method PanelState → (2)

slot in : WidgetGuiSlot

The widget GUI slot.

collapsed opt : int32 = 0

The requested action:
< 0 : collapse the slot
= 0 : query the collapsed state of the slot
> 0 : expand the slot

returns → bool

true if the slot is collapsed,
false if the slot is expanded.

Modifies and/or queries the collapsed state of the given widget GUI slot.

Widget GUI slots are expanded by default, see Panel.Collapsed.

Public / Attributes

Bounds


public attribute Bounds → (get)

value : Box2I

[not-null]
The pixel bounds.

The pixel bounds of the widget GUI.

Dialog​Identifier


public attribute DialogIdentifier → (get)

value : string

The dialog identifier or null iff there is no current dialog.

Returns the identifier of the current dialog.

Has​Dialog


public attribute HasDialog → (get)

value : bool

true if there is a current dialog, false if not.

Is there a current dialog?

Is​Focussed


public attribute IsFocussed → (get)

value : bool

true if the widget GUI has input focus, false if not.

Does the widget GUI have input focus?

Root


public attribute Root → (get)

value : Component

[not-null]
The root container.

Returns the root container of the widget GUI.

Visible


public attribute Visible → (get,set)

value : bool

true to show the widget GUI,
false to hide the widget GUI.

Toggles visibility of the widget GUI.

Defaults to true.