Class UiEvent¶
Namespace: Apogee.UI
Assembly: Apogee.UI.dll
An event that reached a listener (
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¶
Current¶
The element whose listener is running.
public UiElement? Current { get; }
Property Value¶
Phase¶
1 going down (capture), 2 at the target, 4 going up.
public int Phase { get; }
Property Value¶
Target¶
The element the event is about (the one that was hit, or that has the focus).
public UiElement? Target { get; }
Property Value¶
Type¶
The kind of event: click, mousedown, keydown, change...
public string Type { get; }
Property Value¶
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¶
GetString(string)¶
A parameter as text (value of a change), or nothing.
public string? GetString(string key)
Parameters¶
key string
Returns¶
Has(string)¶
public bool Has(string key)
Parameters¶
key string
Returns¶
StopPropagation()¶
Keeps the event from reaching the elements above (or, in the capture phase, below) this one.
public void StopPropagation()