{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
module Potato.Flow.TestStates (
folderStart
, folderEnd
, someSEltLabel
, someSCanvas
, defaultCanvasLBox
, someOwlItem
, pFState_to_owlPFState
, owlPFState_fromSElts
, owlpfstate_someValidState1
, owlpfstate_someInvalidState1
, owlpfstate_someInvalidState2
, owlpfstate_basic0
, owlpfstate_basic1
, controllermeta_basic1_lockandhidestuff1
, controllermeta_basic2_expandEverything
, owlpfstate_basic2
, owlpfstate_attachments1
, owlpfstate_attachments2
, owlpfstate_zero
, owlpfstate_newProject
) where
import Relude
import Potato.Flow
import Potato.Flow.Deprecated.TestStates
import Potato.Flow.Deprecated.State
import qualified Data.IntMap as IM
someOwlItem :: OwlItem
someOwlItem :: OwlItem
someOwlItem = OwlInfo -> OwlSubItem -> OwlItem
OwlItem (Text -> OwlInfo
OwlInfo Text
"some elt") OwlSubItem
OwlSubItemNone
makeLayerMeta :: Bool -> Bool -> Bool -> LayerMeta
makeLayerMeta :: Bool -> Bool -> Bool -> LayerMeta
makeLayerMeta Bool
isLocked Bool
isHidden Bool
isCollapsed = LayerMeta {
_layerMeta_isLocked :: Bool
_layerMeta_isLocked = Bool
isLocked
, _layerMeta_isHidden :: Bool
_layerMeta_isHidden = Bool
isHidden
, _layerMeta_isCollapsed :: Bool
_layerMeta_isCollapsed = Bool
isCollapsed
}
pFState_to_owlPFState :: PFState -> OwlPFState
pFState_to_owlPFState :: PFState -> OwlPFState
pFState_to_owlPFState pfs :: PFState
pfs@PFState {REltIdMap SEltLabel
Seq Int
SCanvas
_pFState_canvas :: PFState -> SCanvas
_pFState_directory :: PFState -> REltIdMap SEltLabel
_pFState_layers :: PFState -> Seq Int
_pFState_canvas :: SCanvas
_pFState_directory :: REltIdMap SEltLabel
_pFState_layers :: Seq Int
..} = OwlPFState {
_owlPFState_owlTree :: OwlTree
_owlPFState_owlTree = SEltTree -> OwlTree
owlTree_fromSEltTree forall b c a. (b -> c) -> (a -> b) -> a -> c
. SPotatoFlow -> SEltTree
_sPotatoFlow_sEltTree forall b c a. (b -> c) -> (a -> b) -> a -> c
. PFState -> SPotatoFlow
pFState_to_sPotatoFlow forall a b. (a -> b) -> a -> b
$ PFState
pfs
, _owlPFState_canvas :: SCanvas
_owlPFState_canvas = SCanvas
_pFState_canvas
}
owlPFState_fromSElts :: [SElt] -> LBox -> OwlPFState
owlPFState_fromSElts :: [SElt] -> LBox -> OwlPFState
owlPFState_fromSElts [SElt]
selts LBox
lbox = PFState -> OwlPFState
pFState_to_owlPFState forall a b. (a -> b) -> a -> b
$ [SElt] -> LBox -> PFState
pFState_fromSElts [SElt]
selts LBox
lbox
owlpfstate_someValidState1 :: OwlPFState
owlpfstate_someValidState1 :: OwlPFState
owlpfstate_someValidState1 = PFState -> OwlPFState
pFState_to_owlPFState PFState
pfstate_someValidState1
owlpfstate_someInvalidState1 :: OwlPFState
owlpfstate_someInvalidState1 :: OwlPFState
owlpfstate_someInvalidState1 = PFState -> OwlPFState
pFState_to_owlPFState PFState
pfstate_someInvalidState1
owlpfstate_someInvalidState2 :: OwlPFState
owlpfstate_someInvalidState2 :: OwlPFState
owlpfstate_someInvalidState2 = PFState -> OwlPFState
pFState_to_owlPFState PFState
pfstate_someInvalidState2
owlpfstate_basic0 :: OwlPFState
owlpfstate_basic0 :: OwlPFState
owlpfstate_basic0 = PFState -> OwlPFState
pFState_to_owlPFState PFState
pfstate_basic0
owlpfstate_basic1 :: OwlPFState
owlpfstate_basic1 :: OwlPFState
owlpfstate_basic1 = PFState -> OwlPFState
pFState_to_owlPFState PFState
pfstate_basic1
controllermeta_basic1_lockandhidestuff1 :: ControllerMeta
controllermeta_basic1_lockandhidestuff1 :: ControllerMeta
controllermeta_basic1_lockandhidestuff1 = ControllerMeta {
_controllerMeta_pan :: XY
_controllerMeta_pan = XY
0
, _controllerMeta_layers :: LayerMetaMap
_controllerMeta_layers = forall a. [(Int, a)] -> IntMap a
IM.fromList [
(Int
0, Bool -> Bool -> Bool -> LayerMeta
makeLayerMeta Bool
True Bool
False Bool
False)
, (Int
2, Bool -> Bool -> Bool -> LayerMeta
makeLayerMeta Bool
False Bool
True Bool
False)
]
}
owlpfstate_basic2 :: OwlPFState
owlpfstate_basic2 :: OwlPFState
owlpfstate_basic2 = PFState -> OwlPFState
pFState_to_owlPFState PFState
pfstate_basic2
controllermeta_basic2_expandEverything :: ControllerMeta
controllermeta_basic2_expandEverything :: ControllerMeta
controllermeta_basic2_expandEverything = ControllerMeta {
_controllerMeta_pan :: XY
_controllerMeta_pan = XY
0
, _controllerMeta_layers :: LayerMetaMap
_controllerMeta_layers = forall a. [(Int, a)] -> IntMap a
IM.fromList [
(Int
0, Bool -> Bool -> Bool -> LayerMeta
makeLayerMeta Bool
False Bool
False Bool
False)
, (Int
1, Bool -> Bool -> Bool -> LayerMeta
makeLayerMeta Bool
False Bool
False Bool
False)
, (Int
7, Bool -> Bool -> Bool -> LayerMeta
makeLayerMeta Bool
False Bool
False Bool
False)
]
}
owlpfstate_attachments1 :: OwlPFState
owlpfstate_attachments1 :: OwlPFState
owlpfstate_attachments1 = PFState -> OwlPFState
pFState_to_owlPFState PFState
pfstate_attachments1
owlpfstate_attachments2 :: OwlPFState
owlpfstate_attachments2 :: OwlPFState
owlpfstate_attachments2 = PFState -> OwlPFState
pFState_to_owlPFState PFState
pfstate_attachments2
owlpfstate_zero :: OwlPFState
owlpfstate_zero :: OwlPFState
owlpfstate_zero = PFState -> OwlPFState
pFState_to_owlPFState PFState
pfstate_zero
owlpfstate_newProject :: OwlPFState
owlpfstate_newProject :: OwlPFState
owlpfstate_newProject = OwlPFState {
_owlPFState_owlTree :: OwlTree
_owlPFState_owlTree = OwlTree
emptyOwlTree
, _owlPFState_canvas :: SCanvas
_owlPFState_canvas = LBox -> SCanvas
SCanvas (XY -> XY -> LBox
LBox XY
0 (forall a. a -> a -> V2 a
V2 Int
50 Int
20))
}