module Monomer.Graph.GraphState
    ( GraphState(..)
    ) where

import Data.Default
import Monomer.Common.BasicTypes
import Monomer.Core.WidgetTypes

import Monomer.Graph.GraphData

data GraphState s e = GraphState
    { forall s e. GraphState s e -> Point
_gsTranslation :: Point
    , forall s e. GraphState s e -> Point
_gsScale :: Point
    , forall s e. GraphState s e -> Point
_gsUnit :: Point
    , forall s e. GraphState s e -> Point
_gsSections :: Point
    , forall s e. GraphState s e -> Maybe Point
_gsMousePosition :: Maybe Point
    , forall s e. GraphState s e -> Maybe (Int, Int)
_gsHoverPoint :: Maybe (Int, Int)
    , forall s e. GraphState s e -> Maybe (Int, Int)
_gsActivePoint :: Maybe (Int, Int)
    , forall s e. GraphState s e -> Rect
_gsViewport :: Rect
    , forall s e. GraphState s e -> [GraphData s e]
_gsGraphDatas :: [GraphData s e]
    , forall s e. GraphState s e -> [GraphData s e]
_gsPrevGraphDatas :: [GraphData s e]
    , forall s e. GraphState s e -> [(Bool, Millisecond)]
_gsAnimationStates :: [(Bool, Millisecond)]
    }

instance Default (GraphState s e) where
    def :: GraphState s e
def = GraphState
        { _gsTranslation :: Point
_gsTranslation = Double -> Double -> Point
Point Double
0 Double
0
        , _gsScale :: Point
_gsScale = Double -> Double -> Point
Point Double
1 Double
1
        , _gsUnit :: Point
_gsUnit = Double -> Double -> Point
Point Double
1 Double
1
        , _gsSections :: Point
_gsSections = Double -> Double -> Point
Point Double
5 Double
5
        , _gsMousePosition :: Maybe Point
_gsMousePosition = forall a. Maybe a
Nothing
        , _gsHoverPoint :: Maybe (Int, Int)
_gsHoverPoint = forall a. Maybe a
Nothing
        , _gsActivePoint :: Maybe (Int, Int)
_gsActivePoint = forall a. Maybe a
Nothing
        , _gsViewport :: Rect
_gsViewport = Double -> Double -> Double -> Double -> Rect
Rect Double
0 Double
0 Double
100 Double
100
        , _gsGraphDatas :: [GraphData s e]
_gsGraphDatas = []
        , _gsPrevGraphDatas :: [GraphData s e]
_gsPrevGraphDatas = []
        , _gsAnimationStates :: [(Bool, Millisecond)]
_gsAnimationStates = []
        }