TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class Example_WidgetDialog in Tinman.Demo.Examples

This example shows how to implement a custom WidgetDialog.

sealed class Example_WidgetDialog implements IEventListenerGeneric<Component>
  extends WidgetDialog

See also:

TutorialBrowser

Public / Attributes

Action

The input click of the default action of this component.

public property Action { get set }
type InputClick
value The input click or None.
inherited Component.Action

Remarks:

Defaults to None.

ActualLayoutBaseline

The actual layout baseline, as computed by ComputeLayoutBaseline.

public property ActualLayoutBaseline { get }
type int32
value The actual layout baseline.
inherited Component.ActualLayoutBaseline

ActualLayoutInsets

The actual layout insets, as computed by ComputeLayoutInsets.

public property ActualLayoutInsets { get }
type Edging
value The actual layout insets.
inherited Container.ActualLayoutInsets

ActualLayoutMargin

The actual layout margin, as computed by ComputeLayoutMargin.

public property ActualLayoutMargin { get }
type Edging
value The actual layout margin.
inherited Component.ActualLayoutMargin

ActualLayoutSize

The actual layout size, as computed by ComputeLayoutSize.

public property ActualLayoutSize { get }
type Vec2I
value The actual layout size.
inherited Component.ActualLayoutSize

Bounds

Returns the bounds of this component in the client area of its parent container.

public property Bounds { get }
type Box2I
value The component bounds.
inherited Component.Bounds

ClientArea

Returns the client area of this container.

public virtual property ClientArea { get }
type Box2I
value The client area.
inherited Container.ClientArea

ClientAreaCorners

Containers with a round client rectangle can override this property in order to return proper information.

public virtual property ClientAreaCorners { get }
type Pair<Corner, int32>
value The round corners of this containers client rectangle.
inherited Container.ClientAreaCorners

Components

Returns the list of child components.

public virtual property Components { get }
type IVectorConst<Component>
value [not-null] The list of child components.
inherited Container.Components

Focusable

Can this component receive the input focus?

public property Focusable { get set }
type bool
value true if the component can receive the input focus, false if not.
inherited Component.Focusable

Remarks:

Defaults to false.

Graphics

The current graphics object.

public property Graphics { get }
type Graphics
value The graphics object or null if not attached.
inherited Component.Graphics

See also:

Component.GraphicsAttach
Component.GraphicsDetach

Height

Height of this component in its parent containers client area.

public property Height { get }
type int32
value The current component height, in pixels.
inherited Component.Height

HelpId

A machine-readable unique identifier for the user help of this component.

public virtual property HelpId { get }
type string
value The help ID or null if none.
inherited Component.HelpId

Identifier

The dialog identifier that has been passed to DialogShow.

public property Identifier { get }
type string
value The dialog identifier or null
inherited WidgetDialog.Identifier

IsFocussed

Does this component have the input focus?

public override property IsFocussed { get }
type bool
value true if this component has the input focus, false if not.
inherited Container.IsFocussed

IsHighlighted

Is this component being highlighted?

public virtual property IsHighlighted { get }
type bool
value true if the component shall be highlighted,
false if not.
inherited Component.IsHighlighted

IsHovered

Does the mouse cursor currently hover above this component?

public property IsHovered { get }
type bool
value true if the mouse cursor hovers above this component, false if not.
inherited Component.IsHovered

IsSoleOwnership

Will this object be disposed upon the next call to Dispose?

[ThreadSafe]
public property IsSoleOwnership { get }
type bool
value true if the object will be disposed when Dispose is called,
false if the object will not be disposed, because some other code is still holding shared ownership (see AcquireBase).
inherited Disposable.IsSoleOwnership

IsVisible

Is this component currently visible?

public property IsVisible { get }
type bool
value true if this component is visible, false if it is not.
inherited Component.IsVisible

Remarks:

A component is visible if its state is not Hidden and its parent is also visible.

LayoutAlign

The alignment anchor of this component.

public property LayoutAlign { get set }
type Anchor
value The anchor.
inherited Component.LayoutAlign

See also:

Component.LayoutInfo

LayoutDefault

Returns the default Layout settings that are recommended for this component.

public override property LayoutDefault { get }
type Layout
value The default layout settings.
inherited WidgetDialog.LayoutDefault

Remarks:

Subclasses may override this method, in order to define custom default layout settings. If they do so, the documentation of the declaring class should list these values.

The default implementation returns Default.

See also:

Container.ChildAdd

LayoutFill

The fill mode of this component.

public virtual property LayoutFill { get set }
type Axis
value The fill mode.
inherited Component.LayoutFill

See also:

Component.LayoutInfo

LayoutGrid

The bounds of this component in its parent containers layout grid.

public property LayoutGrid { get set }
type Box2I
value The layout grid bounds.
inherited Component.LayoutGrid

See also:

Component.LayoutInfo

LayoutGrow

Defines how the layout grid column resp. row in the components parent container grows.

public property LayoutGrow { get set }
type Axis
value The axes that will grow.
inherited Component.LayoutGrow

See also:

Component.LayoutInfo

LayoutInfo

The current layout settings of this component.

public override property LayoutInfo { get set }
type Layout
value The Layout info object.
inherited Container.LayoutInfo

Remarks:

Defaults to LayoutDefault.

LayoutInsets

The insets of this container.

public property LayoutInsets { get set }
type Edging
value The edge insets.
inherited Container.LayoutInsets

See also:

Container.LayoutInfo

LayoutLimit

The maximum size of this component, in pixels.

public property LayoutLimit { get set }
type Vec2I
value The maximum size. A value equal to 0 means no maximum size limit.
inherited Component.LayoutLimit

See also:

Component.LayoutInfo

LayoutMargin

The outer margin of this component.

public property LayoutMargin { get set }
type Edging
value The outer margin.
inherited Component.LayoutMargin

See also:

Component.LayoutInfo

LayoutShrink

Defines how the layout grid column resp. row in the components parent container grows.

public property LayoutShrink { get set }
type Axis
value The axes that will shrink.
inherited Component.LayoutShrink

See also:

Component.LayoutInfo

LayoutSize

The minimum size of this component, in pixels.

public property LayoutSize { get set }
type Vec2I
value The minimum size.
inherited Component.LayoutSize

See also:

Component.LayoutInfo

LifecycleState

Returns the lifecycle state of this object.

public property LifecycleState { get }
type LifecycleState
value The lifecycle state.
inherited Disposable.LifecycleState

OnAction

The components default action has been triggered.

public property OnAction { get }
type IEventGeneric<Component>
value [not-null] The event object.
inherited Component.OnAction

OnDialogEvent

Event for dialog events.

public property OnDialogEvent { get }
type IEventGeneric<DialogEventArgs>
value [not-null] The event object.
inherited WidgetDialog.OnDialogEvent

Parent

The parent container of this component.

public property Parent { get }
type Container
value The parent container or null if this component is the root.
inherited Component.Parent

ParentCorners

Returns the corners that this component shares with the client area of its parent container.

public property ParentCorners { get }
type Corner
value The shared client area corners.
inherited Component.ParentCorners

ParentEdges

Returns the edges that this component shares with the client area of its parent container.

public property ParentEdges { get }
type Anchor
value The shared client area edges.
inherited Component.ParentEdges

ScrollHeight

Scroll height of this component.

public property ScrollHeight { get }
type int32
value The current scroll height, in pixels.
inherited Component.ScrollHeight

ScrollTick

Returns the size of a single scroll tick.

public virtual property ScrollTick { get }
type int32
value The scroll tick size, in pixels.
inherited Component.ScrollTick

ScrollWidth

Scroll width of this component.

public property ScrollWidth { get }
type int32
value The current scroll width, in pixels.
inherited Component.ScrollWidth

ScrollX

The horizontal scroll position of this component.

public property ScrollX { get set }
type int32
value The current scroll position.
inherited Component.ScrollX

ScrollY

The vertical scroll position of this component.

public property ScrollY { get set }
type int32
value The current scroll position.
inherited Component.ScrollY

State

The component state.

public virtual property State { get set }
type ComponentState
value The component state.
inherited Component.State

StyleClassType

Returns the style class for this component type.

public override property StyleClassType { get }
type StyleClass
value The style class (e.g. 'InputField' for InputField).
inherited Container.StyleClassType

StyleClassVariant

Optional style class variant of this component.

public property StyleClassVariant { get set }
type string
value The variant name or null.
inherited Component.StyleClassVariant

Stylesheet

The stylesheet object to use for this user interface element.

public property Stylesheet { get set }
type Stylesheet
value The stylesheet object to use or null.
inherited Component.Stylesheet

Text

The text value.

public property Text { get set }
type string
value The text value. Will be replaced with the empty string when null.
inherited WidgetDialog.Text

Remarks:

Defaults to the empty string ''.

See also:

StringUtil.IsEmptyOrWhitespace

UserData

Optional user data object of this widget dialog.

public property UserData { get set }
type object
value The user data object or null.
inherited WidgetDialog.UserData

Width

Width of this component in its parent containers client area.

public property Width { get }
type int32
value The current component width, in pixels.
inherited Component.Width

Public / Constructors

Example_WidgetDialog

Creates a new instance of Example_WidgetDialog.

public constructor Example_WidgetDialog (IVectorConst<TutorialInfoBase> tutorials)
params tutorials [not-null] The list of tutorials to choose from.

Public / Methods

AcquireBase

Acquires a strong reference to this disposable object.

[OwnerReturn, Pure]
public method AcquireBase (bool allowNull = false)
type IDisposable
params allowNull Depicts what to do when this object is no longer valid:
true: return null
false: throw an exception
returns The strong reference to this disposable object or null iff allowNull is true and this object is no longer valid.
inherited Disposable.AcquireBase

Remarks:

The object will not be actually disposed by calls to IDisposable when there is at least one strong reference left. Code that calls this method is responsible for calling the IDisposable method accordingly.

This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.

Using this method usually requires type casting. Subclasses may additionally implement IDisposableGeneric, in order to provide some syntactic sugar for that.

Exceptions:

ChildAdd

Adds a child component to this container, using its current layout settings.

public virtual method ChildAdd ([Owner] Component component)
params component [not-null] The child component.
inherited Container.ChildAdd

Remarks:

Use this method if you have configured the layout settings of component earlier (see LayoutInfo) and want those to be used when adding component as a child of this container.


Adds a child component to this container, using the given layout settings.

public virtual method ChildAdd ([Owner] Component component, Layout layout)
params component [not-null] The child component.
  layout The layout settings to use; will replace LayoutInfo. Unspecified settings will be taken from LayoutDefault. Usually, you may want to start with At in order to create a new Layout value.
inherited Container.ChildAdd

Remarks:

This is the usual way of constructing a hierarchy of components: create new components, adjust their default layout settings and put into the layout grid of the parent container.

Use this method if the current layout settings of component shall be discarded (e.g. it is a newly created Component object with zero layout settings).

ChildAny

Checks if this container has any children.

[Pure]
public virtual method ChildAny (bool onlyVisible)
type bool
params onlyVisible true to test for non-hidden (see Hidden) children only, false to test for existing children.
returns true if there are one or more children (according to onlyVisible), false if not.
inherited Container.ChildAny

ChildBounds

Returns the bounds of the given child (or descendant) in this container.

public method ChildBounds (Component component)
type Box2I
params component [not-null] The child (or descendant) component.
returns The bounds of component, relative to this container.
inherited Container.ChildBounds

Translate the given child (or descendant) bounds so that they are relative to this container.

public method ChildBounds (Component component, Box2I bounds)
type Box2I
params component [not-null] The child (or descendant) component.
  bounds The bounds, relative to component.
returns The bounds of component, relative to this container.
inherited Container.ChildBounds

ChildRemove

Removes a child component from this container.

public virtual method ChildRemove (Component component)
params component [not-null] The child component.
inherited Container.ChildRemove

ChildRemoveAll

Removes all child components from this container.

public method ChildRemoveAll ()
inherited Container.ChildRemoveAll

ConsumeInput

Consumes the given user input event.

public method ConsumeInput (InputEvent inputEvent)
type bool
params inputEvent The user input event.
returns true if the input event has been consumed, false if not.
inherited Component.ConsumeInput

Remarks:

Input events are provided to an IInputConsumer object only if it has the input focus (see FocusGained and FocusLost). Mouse events are provided when the mouse cursor is inside of the input bounds (MouseEnter and MouseLeave). The Closing event can be provided at any time.

  1. FocusGained: gained input focus
  2. Keyboard events:
  3. Mouse events:
    1. MouseEnter
    2. Mouse events:
    3. MouseLeave
  4. FocusLost: lost input focus
  5. Closing: user request to shut down

Dispose

Releases all resources held by this object if there are no more strong references to it, decrements the reference counter by one otherwise.

[Dispose, OwnerThis, ThreadSafe]
public method Dispose ()
inherited Disposable.Dispose

Remarks:

The Dispose method silently returns if the object has already been disposed.

Implementing methods must not throw any exceptions.

Focus

Transfers the input focus to this component.

public method Focus ()
returns [not-null] this
inherited Component.Focus

FocusClear

Clears the input focus from this component.

public method FocusClear ()
inherited Component.FocusClear

Remarks:

If this component does not have the input focus, the method returns silently.

FocusLeaf

Returns the bottom-most component in the hierarchy that has the input focus.

public override method FocusLeaf ()
type Component
returns The focussed component or null.
inherited Container.FocusLeaf

GraphicsAttach

Attaches this component to the given Graphics context.

public override method GraphicsAttach (Graphics graphics)
params graphics [not-null] The graphics context.
inherited Container.GraphicsAttach

Remarks:

All graphics-related resources should be created here.

Do not use the screen size of graphics here, as it may not be valid (see Graphics for details). Instead, use the screen size that is provided by GraphicsResize.

GraphicsDetach

Detaches this user interface component from its Graphics context.

public override method GraphicsDetach ()
inherited Container.GraphicsDetach

Remarks:

All graphics-related resources should be disposed here.

GraphicsResize

The screen size has changed.

public virtual method GraphicsResize (Vec2I screenSize)
params screenSize The new screen size, in pixels.
inherited Component.GraphicsResize

HoveredLeaf

Returns the bottom-most component in the hierarchy that is hovered by the mouse.

public override method HoveredLeaf ()
type Component
returns The hovered component or null.
inherited Container.HoveredLeaf

NotifyEvent

The event has been triggered.

public method NotifyEvent (Component argument)
params argument The event argument.
implements IEventListenerGeneric.NotifyEvent

OverlayAdd

Adds an overlay to this component.

public method OverlayAdd (ComponentOverlayDelegate overlay)
params overlay [not-null] The overlay to add.
inherited Component.OverlayAdd

OverlayRemove

Removes the given component overlay.

public method OverlayRemove (ComponentOverlayDelegate overlay)
params overlay [not-null] The overlay to remove.
inherited Component.OverlayRemove

Render2D

Performs 2D rendering.

public method Render2D (Graphics g)
params g [not-null] The graphics object to use.
inherited Component.Render2D

Remarks:

When this method is called, the given Graphics object has already been initialized for 2D rendering:

Usually, Render2D is called from within Render.

UpdateFrameTime

This method is called once per application frame.

public override method UpdateFrameTime (float32 time)
type bool
params time [>0] The amount of time that has elapsed since the last frame, in seconds.
returns true if the object needs to be presented again, false if the current presentation is still valid.
inherited Container.UpdateFrameTime

ValidateLayout

Validates the layout of this component.

public method ValidateLayout ()
type bool
returns true if a layout action has been performed, false if not.
inherited Container.ValidateLayout

Logging

Logger

The logger object of this class.

public static readonly field Logger
type ILogger