IComponent Interface
Definition
Section titled “Definition”A component that can be added to a IScreenObject.
public interface IComponentProperties
Section titled “Properties”SortOrder
Section titled “SortOrder”Indicates priority to other components.
uint SortOrder { get; }IsUpdate
Section titled “IsUpdate”When true, indicates that this component calls the Update(IScreenObject, TimeSpan) method.
bool IsUpdate { get; }IsRender
Section titled “IsRender”When true, indicates that this component calls the Render(IScreenObject, TimeSpan) method.
bool IsRender { get; }IsMouse
Section titled “IsMouse”When true, indicates that this component calls the ProcessMouse(IScreenObject, MouseScreenObjectState, out bool) method.
bool IsMouse { get; }IsKeyboard
Section titled “IsKeyboard”When true, indicates that this component calls the ProcessKeyboard(IScreenObject, Keyboard, out bool) method.
bool IsKeyboard { get; }Methods
Section titled “Methods”Update(IScreenObject, TimeSpan)
Section titled “Update(IScreenObject, TimeSpan)”Called by a host on the update frame.
void Update(IScreenObject host, TimeSpan delta)Parameters
Section titled “Parameters”host IScreenObject
The host calling the component.
delta TimeSpan
The time that has elapsed from the last call to this component.
Render(IScreenObject, TimeSpan)
Section titled “Render(IScreenObject, TimeSpan)”Called by a host on the render frame.
void Render(IScreenObject host, TimeSpan delta)Parameters
Section titled “Parameters”host IScreenObject
The host calling the component.
delta TimeSpan
The time that has elapsed from the last call to this component.
ProcessMouse(IScreenObject, MouseScreenObjectState, out bool)
Section titled “ProcessMouse(IScreenObject, MouseScreenObjectState, out bool)”Called by a host when the mouse is being processed.
void ProcessMouse(IScreenObject host, MouseScreenObjectState state, out bool handled)Parameters
Section titled “Parameters”host IScreenObject
The host console.
state MouseScreenObjectState
The mouse state.
handled bool
When set to true informs the host caller that we handled the mouse and to stop others from handling.
ProcessKeyboard(IScreenObject, Keyboard, out bool)
Section titled “ProcessKeyboard(IScreenObject, Keyboard, out bool)”Called by a host when the keyboard is being processed.
void ProcessKeyboard(IScreenObject host, Keyboard keyboard, out bool handled)Parameters
Section titled “Parameters”host IScreenObject
The host that added this component.
keyboard Keyboard
The keyboard state.
handled bool
When set to true informs the host caller that we handled the mouse and to stop others from handling.
OnAdded(IScreenObject)
Section titled “OnAdded(IScreenObject)”Called when the component is added to a host.
void OnAdded(IScreenObject host)Parameters
Section titled “Parameters”host IScreenObject
The host that added the component.
OnRemoved(IScreenObject)
Section titled “OnRemoved(IScreenObject)”Called when the component is removed from the host.
void OnRemoved(IScreenObject host)Parameters
Section titled “Parameters”host IScreenObject
The host that removed the component.
OnHostUpdated(IScreenObject)
Section titled “OnHostUpdated(IScreenObject)”Called when various states in the host change.
void OnHostUpdated(IScreenObject host)Parameters
Section titled “Parameters”host IScreenObject
The host that uses this component.