Skip to main content

MaterialStateMouseCursor

Type Alias MaterialStateMouseCursor 

Source
pub type MaterialStateMouseCursor = WidgetStateMouseCursor;
👎Deprecated:

Use WidgetStateMouseCursor instead. Moved to the Widgets layer to make code available outside of Material. This feature was deprecated after v3.19.0-0.3.pre.

Expand description

Defines a MouseCursor whose value depends on a set of MaterialStates which represent the interactive state of a component.

This kind of MouseCursor is useful when the set of interactive actions a widget supports varies with its state. For example, a mouse pointer hovering over a disabled ListTile should not display SystemMouseCursors.click, since a disabled list tile doesn’t respond to mouse clicks. ListTile’s default mouse cursor is a WidgetStateMouseCursor::clickable, which resolves to SystemMouseCursors.basic when the button is disabled.

This class should only be used for parameters which are documented to take MaterialStateMouseCursor, otherwise only the default state will be used.

See also:

  • WidgetStateMouseCursor, the non-Material version that can be used interchangeably with MaterialStateMouseCursor.
  • MouseCursor for introduction on the mouse cursor system.
  • SystemMouseCursors, which defines cursors that are supported by native platforms.

Aliased Type§

pub struct MaterialStateMouseCursor { /* private fields */ }