Class InputStateHistory
Record a history of state changes applied to one or more controls.
Inheritance
InputStateHistory
Syntax
public class InputStateHistory : IDisposable, IEnumerable<InputStateHistory.Record>, IEnumerable, IInputStateChangeMonitor
Constructors
InputStateHistory(IEnumerable<InputControl>)
Declaration
public InputStateHistory(IEnumerable<InputControl> controls)
Parameters
InputStateHistory(Int32)
Declaration
public InputStateHistory(int maxStateSizeInBytes)
Parameters
Type |
Name |
Description |
Int32 |
maxStateSizeInBytes |
|
InputStateHistory(String)
Declaration
public InputStateHistory(string path)
Parameters
Type |
Name |
Description |
String |
path |
|
InputStateHistory(InputControl)
Declaration
public InputStateHistory(InputControl control)
Parameters
Properties
controls
Declaration
public ReadOnlyArray<InputControl> controls { get; }
Property Value
Count
Total number of state records currently captured in the history.
Declaration
public int Count { get; }
Property Value
Type |
Description |
Int32 |
Number of records in the collection.
|
See Also
Declaration
public int extraMemoryPerRecord { get; set; }
Property Value
historyDepth
Maximum number of records that can be recorded in the history.
Declaration
public int historyDepth { get; set; }
Property Value
Type |
Description |
Int32 |
Upper limit on number of records.
|
Exceptions
Item[Int32]
Declaration
public InputStateHistory.Record this[int index] { get; set; }
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Property Value
onRecordAdded
Declaration
public Action<InputStateHistory.Record> onRecordAdded { get; set; }
Property Value
onShouldRecordStateChange
Declaration
public Func<InputControl, double, InputEventPtr, bool> onShouldRecordStateChange { get; set; }
Property Value
updateMask
Declaration
public InputUpdateType updateMask { get; set; }
Property Value
version
Current version stamp. Every time a record is stored in the history,
this is incremented by one.
Declaration
public uint version { get; }
Property Value
Type |
Description |
UInt32 |
Version stamp that indicates the number of mutations.
|
See Also
Methods
AddRecord(InputStateHistory.Record)
Declaration
public InputStateHistory.Record AddRecord(InputStateHistory.Record record)
Parameters
Returns
AllocateRecord(out Int32)
Declaration
protected InputStateHistory.RecordHeader*AllocateRecord(out int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Returns
Clear()
Declaration
Destroy()
Declaration
Dispose()
Declaration
Implements
Finalize()
Declaration
protected void Finalize()
GetEnumerator()
Declaration
public IEnumerator<InputStateHistory.Record> GetEnumerator()
Returns
Implements
GetRecord(Int32)
Declaration
protected InputStateHistory.RecordHeader*GetRecord(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Returns
Declaration
protected TValue ReadValue<TValue>(InputStateHistory.RecordHeader*data)
where TValue : struct
Parameters
Returns
Type Parameters
Declaration
protected object ReadValueAsObject(InputStateHistory.RecordHeader*data)
Parameters
Returns
RecordIndexToUserIndex(Int32)
Declaration
protected int RecordIndexToUserIndex(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Returns
RecordStateChange(InputControl, Void*, Double)
Declaration
public InputStateHistory.Record RecordStateChange(InputControl control, void *statePtr, double time)
Parameters
Returns
RecordStateChange(InputControl, InputEventPtr)
Declaration
public InputStateHistory.Record RecordStateChange(InputControl control, InputEventPtr eventPtr)
Parameters
Returns
StartRecording()
Declaration
public void StartRecording()
StopRecording()
Declaration
public void StopRecording()
UserIndexToRecordIndex(Int32)
Declaration
protected int UserIndexToRecordIndex(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Returns
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Implements
IInputStateChangeMonitor.NotifyControlStateChanged(InputControl, Double, InputEventPtr, Int64)
Declaration
void IInputStateChangeMonitor.NotifyControlStateChanged(InputControl control, double time, InputEventPtr eventPtr, long monitorIndex)
Parameters
Implements
IInputStateChangeMonitor.NotifyTimerExpired(InputControl, Double, Int64, Int32)
Declaration
void IInputStateChangeMonitor.NotifyTimerExpired(InputControl control, double time, long monitorIndex, int timerIndex)
Parameters
Implements