Package limn.backend
Enum Class PointerMode
- All Implemented Interfaces:
Serializable,Comparable<PointerMode>,Constable
How the window treats the mouse pointer: visibility and capture. Set via
NativeWindow.setPointerMode(limn.backend.PointerMode); NORMAL is the default.
These are per-window states, not per-widget: a widget-level interaction
(a color picker hiding the cursor, a 3D viewport capturing it while
orbiting) sets the mode on ENTER/press and restores NORMAL on
EXIT/release; see the cursors demo scene for the pattern.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionVisible but confined to the window's content area; the pointer cannot leave until the mode is reset.Invisible while over this window's content area, but free to move and still delivering positions: video playback, drawing surfaces where the app paints its own cursor, screensaver-style scenes.Visible cursor, free to move.Captured: the cursor is hidden, locked to the window, and motion arrives as unbounded deltas,WindowInput.mouseDelta(float, float)instead ofWindowInput.mouseMoved(float, float)(the scene delivers them asMouseEvent.Type.MOTIONto the focused widget). -
Method Summary
Modifier and TypeMethodDescriptionstatic PointerModeReturns the enum constant of this class with the specified name.static PointerMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NORMAL
Visible cursor, free to move. The default. -
HIDDEN
Invisible while over this window's content area, but free to move and still delivering positions: video playback, drawing surfaces where the app paints its own cursor, screensaver-style scenes. -
CONFINED
Visible but confined to the window's content area; the pointer cannot leave until the mode is reset. Windowed games that must not let a click land on another window. Best effort: platforms without confinement keepNORMALbehavior. -
RELATIVE
Captured: the cursor is hidden, locked to the window, and motion arrives as unbounded deltas,WindowInput.mouseDelta(float, float)instead ofWindowInput.mouseMoved(float, float)(the scene delivers them asMouseEvent.Type.MOTIONto the focused widget). Raw, unaccelerated motion is used where the platform supports it. This is the FPS-camera / trackball mode: position stops meaning anything, movement is everything.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-