--------------------------------------------------------------------------------
-- |
-- Module      :  Mouse
-- Copyright   :  (c) Vladimir Lopatin 2022
-- License     :  BSD-3-Clause
--
-- Maintainer  :  Vladimir Lopatin <madjestic13@gmail.com>
-- Stability   :  provisional
-- Portability :  portable
--
-- A basic mouse control structure.
--
--------------------------------------------------------------------------------


{-# LANGUAGE TemplateHaskell, Arrows #-}

module Graphics.RedViz.Input.Mouse
  ( Mouse (..)
  , pos
  , rpos
  , mmov
  ) where

import Control.Lens

import Linear.V3

data Mouse
  =  Mouse
  { -- | Mouse State
    Mouse -> Maybe (Double, Double)
_lmb   :: Maybe (Double, Double)
  --, mmb
  , Mouse -> Maybe (Double, Double)
_rmb   :: Maybe (Double, Double)
  , Mouse -> (Double, Double)
_pos  ::       (Double, Double)
  , Mouse -> (Double, Double)
_rpos ::       (Double, Double)
  , Mouse -> Bool
_mmov ::        Bool
  , Mouse -> [V3 Double]
mVecs ::       [V3 Double]
  } deriving Int -> Mouse -> ShowS
[Mouse] -> ShowS
Mouse -> String
(Int -> Mouse -> ShowS)
-> (Mouse -> String) -> ([Mouse] -> ShowS) -> Show Mouse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Mouse] -> ShowS
$cshowList :: [Mouse] -> ShowS
show :: Mouse -> String
$cshow :: Mouse -> String
showsPrec :: Int -> Mouse -> ShowS
$cshowsPrec :: Int -> Mouse -> ShowS
Show

$(makeLenses ''Mouse)