User Input

// Keyboard, mouse and SpaceMouse input.
class RVAPI Input
{
public:
    // Hardware cursor shapes.
    enum class CursorShape
    {
        // Arrow.
        ARROW,

        // Insert beam. 
        IBEAM,

        // Crosshair.
        CROSSHAIR,

        // Hand.
        HAND,

        // Horzizontal resize.
        HRESIZE,

        // Vertical resize.
        VRESIZE
    };

    // Check if [key] is in a pressed state.
    static bool IsKey(Key key);

    // Check what modifier keys [modKeys] are in a pressed state using modifier key flags. Modifier key flags 
    // can be or'd together. Pressed modifier keys must match the flags exactly.
    static bool IsModKeys(uint modKeys);

    // Check if mouse button [btn] is currently in pressed state. 
    static bool IsMseBtn(int btn = -1);

    // Get position of 3D mouse.
    static S3f Get3DMsePos();

    // Get rotation axis vector of 3D mouse.
    static S3f Get3DMseRot();

    // Get currently pressed 3D mouse button.
    static int  Get3DMseBtn();

    // Get mouse position. 
    static S2i GetMsePos();

    // Get distance in pixels the mouse has moved since last polling.
    static S2i GetMseMove();

    // Get [wheel] move amount.
    static bool GetWheel(S2i &wheel);

    // Check if mouse button [btn] matches next event on queue. Pop event from queue if match.
    static bool PopMseBtn(uint btn);

    // Get next mouse button [btn] event from queue. Pop event from queue if found.
    static bool GetMseBtn(uint &btn);

    // Check if character [ch] matches next event on queue. Pop event from queue if match.
    static bool PopChar(wchar ch);

    // Get next character [ch] event from queue. Pop event from queue if found.
    static bool GetChar(wchar &ch);

    // Check if [key] matches next event on queue. Pop event from queue if match.
    static bool PopKey(Key key);

    // Get next [key] event from queue. Pop key from queue if found.
    static bool GetKey(Key &key);

    // Save clipboard text to [string].
    static wcstr GetClipboardText(String &string);

    // Set clipboard text.
    static void SetClipboardText(wcstr text);

    // Set cursor shape.
    static void SetCursor(CursorShape shape);

    // Show/Hide cursor.
    static void ShowCursor(bool show = true);
};