Table of Contents

Class Mouse

Namespace
Bonsai.Shaders.Input
Assembly
Bonsai.Shaders.dll

Represents an operator that generates a sequence with the current state of the specified mouse device.

public class Mouse : Source<MouseState>
Inheritance
Mouse
Inherited Members

Remarks

The position and wheel values are defined in a hardware-specific coordinate system.

Properties

Index

Gets or sets the index of the mouse device. If it is not specified, the combined state of all devices is retrieved.

public int? Index { get; set; }

Property Value

int?

Methods

Generate()

Generates an observable sequence where each element represents the current state of the specified mouse device.

public override IObservable<MouseState> Generate()

Returns

IObservable<MouseState>

A sequence of MouseState values representing the current state of the mouse device.

Generate<TSource>(IObservable<TSource>)

Generates an observable sequence where each element represents the current state of the specified mouse device, at the time the source sequence emits a notification.

public IObservable<MouseState> Generate<TSource>(IObservable<TSource> source)

Parameters

source IObservable<TSource>

The sequence containing the notifications indicating when to check for the current state of the mouse device.

Returns

IObservable<MouseState>

A sequence of MouseState values representing the current state of the mouse device, at the time the source sequence emits a notification.

Type Parameters

TSource

The type of the elements in the source sequence.