Skip to content

Class UiEvent

Namespace: Apogee.UI
Assembly: Apogee.UI.dll

An event that reached a listener (). It is only good inside the handler: afterwards its calls do nothing.

public sealed class UiEvent : EngineObject

Inheritance

object ← EngineObject ← UiEvent

Inherited Members

EngineObject.IsAdopted, EngineObject.Handle, EngineObject.IsDestroyed, EngineObject.Class, EngineObject.Adopt(), EngineObject.TryGet(SlotHandle, out EngineObject), EngineObject.Destroy(), object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Properties

Class

What the registry knows about this object's class.

public override ClassInfo Class { get; }

Property Value

ClassInfo

Current

The element whose listener is running.

public UiElement? Current { get; }

Property Value

UiElement?

Phase

1 going down (capture), 2 at the target, 4 going up.

public int Phase { get; }

Property Value

int

Target

The element the event is about (the one that was hit, or that has the focus).

public UiElement? Target { get; }

Property Value

UiElement?

Type

The kind of event: click, mousedown, keydown, change...

public string Type { get; }

Property Value

string

Methods

GetNumber(string, double)

A parameter as a number (mouse_x, key_identifier, wheel_delta_y), or fallback.

public double GetNumber(string key, double fallback = 0)

Parameters

key string

fallback double

Returns

double

GetString(string)

A parameter as text (value of a change), or nothing.

public string? GetString(string key)

Parameters

key string

Returns

string?

Has(string)

public bool Has(string key)

Parameters

key string

Returns

bool

StopPropagation()

Keeps the event from reaching the elements above (or, in the capture phase, below) this one.

public void StopPropagation()