Package limn.backend

Enum Class PointerMode

java.lang.Object
java.lang.Enum<PointerMode>
limn.backend.PointerMode
All Implemented Interfaces:
Serializable, Comparable<PointerMode>, Constable

public enum PointerMode extends Enum<PointerMode>
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.

  • Enum Constant Details

    • NORMAL

      public static final PointerMode NORMAL
      Visible cursor, free to move. The default.
    • HIDDEN

      public static final PointerMode 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

      public static final PointerMode 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 keep NORMAL behavior.
    • RELATIVE

      public static final PointerMode RELATIVE
      Captured: the cursor is hidden, locked to the window, and motion arrives as unbounded deltas, WindowInput.mouseDelta(float, float) instead of WindowInput.mouseMoved(float, float) (the scene delivers them as MouseEvent.Type.MOTION to 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

      public static PointerMode[] 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

      public static PointerMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null