Class InputFocusHandler
- Namespace
- RichHudFramework.UI
- Assembly
- RichHudClient.dll
Default implementation of IFocusHandler. Handles acquiring and releasing global input focus through HudMain and raises the appropriate events.
public class InputFocusHandler : IFocusHandler
- Inheritance
-
InputFocusHandler
- Implements
Constructors
InputFocusHandler(IFocusableElement)
public InputFocusHandler(IFocusableElement inputOwner)
Parameters
inputOwnerIFocusableElement
Properties
GainedInputFocusCallback
Invoked when this UI element gains input focus. Event initializer.
public EventHandler GainedInputFocusCallback { set; }
Property Value
HasFocus
True if this element currently holds global input focus.
public bool HasFocus { get; }
Property Value
InputOwner
The UI element that owns this handler. Used as the sender for all focus-related events.
public IFocusableElement InputOwner { get; set; }
Property Value
LostInputFocusCallback
Invoked when this UI element loses input focus. Event initializer.
public EventHandler LostInputFocusCallback { set; }
Property Value
Methods
GetInputFocus()
Requests global input focus for the owning element. Automatically called on mouse click for most elements. Does nothing if already focused.
public virtual void GetInputFocus()
ReleaseFocus()
Releases global input focus from this element. Called automatically when clicking outside a focused element.
public virtual void ReleaseFocus()
Events
GainedInputFocus
Invoked when taking focus
public event EventHandler GainedInputFocus
Event Type
LostInputFocus
Invoked when focus is lost
public event EventHandler LostInputFocus