Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 770 Bytes

mouse.md

File metadata and controls

33 lines (25 loc) · 770 Bytes

Mouse

struct Mouse {
    /// Standard mouse buttons to distinguish input.
    enum class Button { Left, Middle, Right, ScrollUp, ScrollDown };

    /// The mouse button that created the event.
    Button button;

    /// Keyboard modifiers
    struct Modifiers {
        bool shift = false;
        bool ctrl  = false;
        bool alt   = false;
    } modifiers;

    /// The terminal screen global coordinate of the input event.
    /** Top left of screen is (x:0, y:0). */
    Point global;

    /// The Widget local coordinate of the input event.
    /** Top left of Widget is (x:0, y:0). */
    Point local;

    /// Input device's ID.
    short device_id;
};

See Also