-- DEPRECATED
-- keeping around because we use the types for testing

{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
module Potato.Flow.Deprecated.TestStates (
  folderStart
  , folderEnd
  , someSEltLabel
  , someSCanvas
  , defaultCanvasLBox
  , pFState_fromSElts
  , pfstate_someValidState1
  , pfstate_someInvalidState1
  , pfstate_someInvalidState2
  , pfstate_basic0
  , pfstate_basic1
  , pfstate_basic2
  , pfstate_attachments1
  , pfstate_attachments2
  , pfstate_zero
) where

import           Relude

import           Data.Default
import qualified Data.IntMap   as IM
import qualified Data.Sequence as Seq
import           Potato.Flow
import           Potato.Flow.Deprecated.State
--import           Potato.Flow.OwlItem
import Potato.Flow.OwlState
--import           Potato.Flow.OwlItem
import Potato.Flow.Owl

folderStart :: SEltLabel
folderStart :: SEltLabel
folderStart = Text -> SElt -> SEltLabel
SEltLabel Text
"folder" SElt
SEltFolderStart

folderEnd :: SEltLabel
folderEnd :: SEltLabel
folderEnd = Text -> SElt -> SEltLabel
SEltLabel Text
"folder (end)" SElt
SEltFolderEnd

someSEltLabel :: SEltLabel
someSEltLabel :: SEltLabel
someSEltLabel = Text -> SElt -> SEltLabel
SEltLabel Text
"some elt" SElt
SEltNone

defaultCanvasLBox :: LBox
defaultCanvasLBox :: LBox
defaultCanvasLBox = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
0 REltId
0) (forall a. a -> a -> V2 a
V2 REltId
50 REltId
25)

someSCanvas :: SCanvas
someSCanvas :: SCanvas
someSCanvas = LBox -> SCanvas
SCanvas  LBox
defaultCanvasLBox

pFState_fromSElts :: [SElt] -> LBox -> PFState
pFState_fromSElts :: [SElt] -> LBox -> PFState
pFState_fromSElts [SElt]
selts LBox
lbox = PFState {
    _pFState_layers :: Seq REltId
_pFState_layers = forall a. [a] -> Seq a
Seq.fromList [REltId
1..forall (t :: * -> *) a. Foldable t => t a -> REltId
length [SElt]
selts]
    , _pFState_directory :: REltIdMap SEltLabel
_pFState_directory = forall a. [(REltId, a)] -> IntMap a
IM.fromList forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\(REltId
i,SElt
selt) -> (REltId
i, Text -> SElt -> SEltLabel
SEltLabel (forall b a. (Show a, IsString b) => a -> b
show REltId
i) SElt
selt)) forall a b. (a -> b) -> a -> b
$ forall a b. [a] -> [b] -> [(a, b)]
zip [REltId
1..] [SElt]
selts
    , _pFState_canvas :: SCanvas
_pFState_canvas = LBox -> SCanvas
SCanvas LBox
lbox
  }

pfstate_someValidState1 :: PFState
pfstate_someValidState1 :: PFState
pfstate_someValidState1 = PFState {
      _pFState_layers :: Seq REltId
_pFState_layers = forall a. [a] -> Seq a
Seq.fromList [REltId
0..REltId
5]
      , _pFState_directory :: REltIdMap SEltLabel
_pFState_directory = forall a. [(REltId, a)] -> IntMap a
IM.fromList [(REltId
0, SEltLabel
folderStart), (REltId
1, SEltLabel
folderEnd), (REltId
2, SEltLabel
someSEltLabel), (REltId
3, SEltLabel
someSEltLabel), (REltId
4, SEltLabel
someSEltLabel), (REltId
5, SEltLabel
someSEltLabel)]
      , _pFState_canvas :: SCanvas
_pFState_canvas = LBox -> SCanvas
SCanvas LBox
defaultCanvasLBox
  }

pfstate_someInvalidState1 :: PFState
pfstate_someInvalidState1 :: PFState
pfstate_someInvalidState1 = PFState {
      _pFState_layers :: Seq REltId
_pFState_layers = forall a. [a] -> Seq a
Seq.fromList [REltId
0..REltId
5]
      -- missing REltId 5
      , _pFState_directory :: REltIdMap SEltLabel
_pFState_directory = forall a. [(REltId, a)] -> IntMap a
IM.fromList [(REltId
0, SEltLabel
folderStart), (REltId
1, SEltLabel
folderEnd), (REltId
2, SEltLabel
someSEltLabel), (REltId
3, SEltLabel
someSEltLabel), (REltId
4, SEltLabel
someSEltLabel)]
      , _pFState_canvas :: SCanvas
_pFState_canvas = LBox -> SCanvas
SCanvas LBox
defaultCanvasLBox
  }

pfstate_someInvalidState2 :: PFState
pfstate_someInvalidState2 :: PFState
pfstate_someInvalidState2 = PFState {
      -- folder mismatch
      _pFState_layers :: Seq REltId
_pFState_layers = forall a. [a] -> Seq a
Seq.fromList [REltId
0..REltId
5]
      , _pFState_directory :: REltIdMap SEltLabel
_pFState_directory = forall a. [(REltId, a)] -> IntMap a
IM.fromList [(REltId
0, SEltLabel
folderStart), (REltId
1, SEltLabel
folderStart), (REltId
2, SEltLabel
someSEltLabel), (REltId
3, SEltLabel
someSEltLabel), (REltId
4, SEltLabel
someSEltLabel)]
      , _pFState_canvas :: SCanvas
_pFState_canvas = LBox -> SCanvas
SCanvas LBox
defaultCanvasLBox
  }

pfstate_basic0 :: PFState
pfstate_basic0 :: PFState
pfstate_basic0 = PFState {
    _pFState_layers :: Seq REltId
_pFState_layers = forall a. [a] -> Seq a
Seq.fromList [REltId
0..REltId
2]
    , _pFState_directory :: REltIdMap SEltLabel
_pFState_directory = forall a. [(REltId, a)] -> IntMap a
IM.fromList [
        (REltId
0, Text -> SElt -> SEltLabel
SEltLabel Text
"box" (SBox -> SElt
SEltBox forall a. Default a => a
def {
            _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
1 REltId
1) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
          }))
        , (REltId
1, Text -> SElt -> SEltLabel
SEltLabel Text
"line" (SAutoLine -> SElt
SEltLine forall a. Default a => a
def {
            _sAutoLine_start :: XY
_sAutoLine_start = forall a. a -> a -> V2 a
V2 REltId
7 REltId
2
            , _sAutoLine_end :: XY
_sAutoLine_end = forall a. a -> a -> V2 a
V2 REltId
20 REltId
18
          }))
        , (REltId
2, Text -> SElt -> SEltLabel
SEltLabel Text
"text" (SBox -> SElt
SEltBox forall a. Default a => a
def {
            _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
0 REltId
10) (forall a. a -> a -> V2 a
V2 REltId
15 REltId
5)
            , _sBox_boxType :: SBoxType
_sBox_boxType = SBoxType
SBoxType_NoBoxText
          }))
      ]
    , _pFState_canvas :: SCanvas
_pFState_canvas = LBox -> SCanvas
SCanvas LBox
defaultCanvasLBox
  }

pfstate_basic1 :: PFState
pfstate_basic1 :: PFState
pfstate_basic1 = PFState {
    _pFState_layers :: Seq REltId
_pFState_layers = forall a. [a] -> Seq a
Seq.fromList [REltId
0..REltId
5]
    , _pFState_directory :: REltIdMap SEltLabel
_pFState_directory = forall a. [(REltId, a)] -> IntMap a
IM.fromList [
        -- 4 boxes in a grid
        (REltId
0, Text -> SElt -> SEltLabel
SEltLabel Text
"b1" (SBox -> SElt
SEltBox forall a. Default a => a
def {
            _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
0 REltId
0) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
          }))
        , (REltId
1, Text -> SElt -> SEltLabel
SEltLabel Text
"b2" (SBox -> SElt
SEltBox forall a. Default a => a
def {
            _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
10 REltId
10) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
          }))
        , (REltId
2, Text -> SElt -> SEltLabel
SEltLabel Text
"b3" (SBox -> SElt
SEltBox forall a. Default a => a
def {
            _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
0 REltId
10) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
          }))
        , (REltId
3, Text -> SElt -> SEltLabel
SEltLabel Text
"b4" (SBox -> SElt
SEltBox forall a. Default a => a
def {
            _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
10 REltId
0) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
          }))

        -- 2 lines sharing a start point at (0,100)
        , (REltId
4, Text -> SElt -> SEltLabel
SEltLabel Text
"sl1" (SAutoLine -> SElt
SEltLine forall a. Default a => a
def {
            _sAutoLine_start :: XY
_sAutoLine_start = forall a. a -> a -> V2 a
V2 REltId
0 REltId
100
            , _sAutoLine_end :: XY
_sAutoLine_end = forall a. a -> a -> V2 a
V2 REltId
0 REltId
110
          }))
        , (REltId
5, Text -> SElt -> SEltLabel
SEltLabel Text
"sl2" (SAutoLine -> SElt
SEltLine forall a. Default a => a
def {
            _sAutoLine_start :: XY
_sAutoLine_start = forall a. a -> a -> V2 a
V2 REltId
0 REltId
100
            , _sAutoLine_end :: XY
_sAutoLine_end = forall a. a -> a -> V2 a
V2 REltId
10 REltId
100
          }))

      ]
    , _pFState_canvas :: SCanvas
_pFState_canvas = LBox -> SCanvas
SCanvas LBox
defaultCanvasLBox
  }

-- | same as pfstate_basic1 except with folders
pfstate_basic2 :: PFState
pfstate_basic2 :: PFState
pfstate_basic2 = PFState {
    _pFState_layers :: Seq REltId
_pFState_layers = forall a. [a] -> Seq a
Seq.fromList [REltId
0..REltId
11]
    , _pFState_directory :: REltIdMap SEltLabel
_pFState_directory = forall a. [(REltId, a)] -> IntMap a
IM.fromList [
        (REltId
0, Text -> SElt -> SEltLabel
SEltLabel Text
"fstart1" SElt
SEltFolderStart)
          , (REltId
1, Text -> SElt -> SEltLabel
SEltLabel Text
"fstart2" SElt
SEltFolderStart)
            -- 4 boxes in a grid
            , (REltId
2, Text -> SElt -> SEltLabel
SEltLabel Text
"b1" (SBox -> SElt
SEltBox forall a. Default a => a
def {
                _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
0 REltId
0) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
              }))
            , (REltId
3, Text -> SElt -> SEltLabel
SEltLabel Text
"b2" (SBox -> SElt
SEltBox forall a. Default a => a
def {
                _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
10 REltId
10) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
              }))
            , (REltId
4, Text -> SElt -> SEltLabel
SEltLabel Text
"b3" (SBox -> SElt
SEltBox forall a. Default a => a
def {
                _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
0 REltId
10) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
              }))
            , (REltId
5, Text -> SElt -> SEltLabel
SEltLabel Text
"b4" (SBox -> SElt
SEltBox forall a. Default a => a
def {
                _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
10 REltId
0) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
              }))
            , (REltId
6, Text -> SElt -> SEltLabel
SEltLabel Text
"fend2" SElt
SEltFolderEnd)
        , (REltId
7, Text -> SElt -> SEltLabel
SEltLabel Text
"fstart3" SElt
SEltFolderStart)
          -- 2 lines sharing a start point at (0,100)
          , (REltId
8, Text -> SElt -> SEltLabel
SEltLabel Text
"sl1" (SAutoLine -> SElt
SEltLine forall a. Default a => a
def {
              _sAutoLine_start :: XY
_sAutoLine_start = forall a. a -> a -> V2 a
V2 REltId
0 REltId
100
              , _sAutoLine_end :: XY
_sAutoLine_end = forall a. a -> a -> V2 a
V2 REltId
0 REltId
110
            }))
          , (REltId
9, Text -> SElt -> SEltLabel
SEltLabel Text
"sl2" (SAutoLine -> SElt
SEltLine forall a. Default a => a
def {
              _sAutoLine_start :: XY
_sAutoLine_start = forall a. a -> a -> V2 a
V2 REltId
0 REltId
100
              , _sAutoLine_end :: XY
_sAutoLine_end = forall a. a -> a -> V2 a
V2 REltId
10 REltId
100
            }))
          , (REltId
10, Text -> SElt -> SEltLabel
SEltLabel Text
"fend3" SElt
SEltFolderEnd)
        , (REltId
11, Text -> SElt -> SEltLabel
SEltLabel Text
"fend1" SElt
SEltFolderEnd)
      ]
    , _pFState_canvas :: SCanvas
_pFState_canvas = LBox -> SCanvas
SCanvas LBox
defaultCanvasLBox
  }

pfstate_attachments1 :: PFState
pfstate_attachments1 :: PFState
pfstate_attachments1 = PFState {
    _pFState_layers :: Seq REltId
_pFState_layers = forall a. [a] -> Seq a
Seq.fromList [REltId
0..REltId
5]
    , _pFState_directory :: REltIdMap SEltLabel
_pFState_directory = forall a. [(REltId, a)] -> IntMap a
IM.fromList [
      -- 4 boxes in a grid
      (REltId
0, Text -> SElt -> SEltLabel
SEltLabel Text
"b1" (SBox -> SElt
SEltBox forall a. Default a => a
def {
          _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
0 REltId
0) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
        }))
      , (REltId
1, Text -> SElt -> SEltLabel
SEltLabel Text
"b2" (SBox -> SElt
SEltBox forall a. Default a => a
def {
          _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
10 REltId
10) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
        }))
      , (REltId
2, Text -> SElt -> SEltLabel
SEltLabel Text
"b3" (SBox -> SElt
SEltBox forall a. Default a => a
def {
          _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
0 REltId
10) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
        }))
      , (REltId
3, Text -> SElt -> SEltLabel
SEltLabel Text
"b4" (SBox -> SElt
SEltBox forall a. Default a => a
def {
          _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
10 REltId
0) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
        }))

      -- 2 lines sharing a start point at (0,100)
      , (REltId
4, Text -> SElt -> SEltLabel
SEltLabel Text
"b1-> <-b3" (SAutoLine -> SElt
SEltLine forall a. Default a => a
def {
          _sAutoLine_start :: XY
_sAutoLine_start = forall a. a -> a -> V2 a
V2 REltId
0 REltId
100
          , _sAutoLine_end :: XY
_sAutoLine_end = forall a. a -> a -> V2 a
V2 REltId
0 REltId
110
          , _sAutoLine_attachStart :: Maybe Attachment
_sAutoLine_attachStart = forall a. a -> Maybe a
Just (Attachment {
              _attachment_target :: REltId
_attachment_target = REltId
0
              , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Right
            })
          , _sAutoLine_attachEnd :: Maybe Attachment
_sAutoLine_attachEnd = forall a. a -> Maybe a
Just (Attachment {
              _attachment_target :: REltId
_attachment_target = REltId
2
              , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Left
            })
        }))
      , (REltId
5, Text -> SElt -> SEltLabel
SEltLabel Text
"b2v ^b4" (SAutoLine -> SElt
SEltLine forall a. Default a => a
def {
          _sAutoLine_start :: XY
_sAutoLine_start = forall a. a -> a -> V2 a
V2 REltId
0 REltId
100
          , _sAutoLine_end :: XY
_sAutoLine_end = forall a. a -> a -> V2 a
V2 REltId
0 REltId
110
          , _sAutoLine_attachStart :: Maybe Attachment
_sAutoLine_attachStart = forall a. a -> Maybe a
Just (Attachment {
              _attachment_target :: REltId
_attachment_target = REltId
2
              , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Bot
            })

          , _sAutoLine_attachEnd :: Maybe Attachment
_sAutoLine_attachEnd = forall a. a -> Maybe a
Just (Attachment {
              _attachment_target :: REltId
_attachment_target = REltId
3
              , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Top
            })
        }))
      ]
    , _pFState_canvas :: SCanvas
_pFState_canvas = LBox -> SCanvas
SCanvas LBox
defaultCanvasLBox
  }

-- TODO DELETE ME
pfstate_attachments2 :: PFState
pfstate_attachments2 :: PFState
pfstate_attachments2 = PFState {
    _pFState_layers :: Seq REltId
_pFState_layers = forall a. [a] -> Seq a
Seq.fromList [REltId
0..REltId
9]
    , _pFState_directory :: REltIdMap SEltLabel
_pFState_directory = forall a. [(REltId, a)] -> IntMap a
IM.fromList [
      -- 4 boxes in a grid
      (REltId
0, Text -> SElt -> SEltLabel
SEltLabel Text
"b1" (SBox -> SElt
SEltBox forall a. Default a => a
def {
          _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
0 REltId
0) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
        }))
      , (REltId
1, Text -> SElt -> SEltLabel
SEltLabel Text
"b2" (SBox -> SElt
SEltBox forall a. Default a => a
def {
          _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
10 REltId
0) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
        }))
      , (REltId
2, Text -> SElt -> SEltLabel
SEltLabel Text
"b3" (SBox -> SElt
SEltBox forall a. Default a => a
def {
          _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
0 REltId
10) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
        }))
      , (REltId
3, Text -> SElt -> SEltLabel
SEltLabel Text
"b4" (SBox -> SElt
SEltBox forall a. Default a => a
def {
          _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
10 REltId
10) (forall a. a -> a -> V2 a
V2 REltId
5 REltId
5)
        }))



      -- 2 lines sharing a start point at (0,100)
      , (REltId
4, Text -> SElt -> SEltLabel
SEltLabel Text
"b1-> <-b4" (SAutoLine -> SElt
SEltLine forall a. Default a => a
def {
          _sAutoLine_start :: XY
_sAutoLine_start = forall a. a -> a -> V2 a
V2 REltId
0 REltId
100
          , _sAutoLine_end :: XY
_sAutoLine_end = forall a. a -> a -> V2 a
V2 REltId
0 REltId
110
          , _sAutoLine_attachStart :: Maybe Attachment
_sAutoLine_attachStart = forall a. a -> Maybe a
Just (Attachment {
              _attachment_target :: REltId
_attachment_target = REltId
0
              , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Right
            })
          , _sAutoLine_attachEnd :: Maybe Attachment
_sAutoLine_attachEnd = forall a. a -> Maybe a
Just (Attachment {
              _attachment_target :: REltId
_attachment_target = REltId
3
              , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Left
            })
        }))
      , (REltId
5, Text -> SElt -> SEltLabel
SEltLabel Text
"<-b1 b2->" (SAutoLine -> SElt
SEltLine forall a. Default a => a
def {
          _sAutoLine_start :: XY
_sAutoLine_start = forall a. a -> a -> V2 a
V2 REltId
0 REltId
100
          , _sAutoLine_end :: XY
_sAutoLine_end = forall a. a -> a -> V2 a
V2 REltId
0 REltId
110
          , _sAutoLine_attachStart :: Maybe Attachment
_sAutoLine_attachStart = forall a. a -> Maybe a
Just (Attachment {
              _attachment_target :: REltId
_attachment_target = REltId
0
              , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Left
            })

          , _sAutoLine_attachEnd :: Maybe Attachment
_sAutoLine_attachEnd = forall a. a -> Maybe a
Just (Attachment {
              _attachment_target :: REltId
_attachment_target = REltId
1
              , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Right
            })
        }))
      , (REltId
6, Text -> SElt -> SEltLabel
SEltLabel Text
"<-b1 b4->" (SAutoLine -> SElt
SEltLine forall a. Default a => a
def {
          _sAutoLine_start :: XY
_sAutoLine_start = forall a. a -> a -> V2 a
V2 REltId
0 REltId
100
          , _sAutoLine_end :: XY
_sAutoLine_end = forall a. a -> a -> V2 a
V2 REltId
0 REltId
110
          , _sAutoLine_attachStart :: Maybe Attachment
_sAutoLine_attachStart = forall a. a -> Maybe a
Just (Attachment {
              _attachment_target :: REltId
_attachment_target = REltId
0
              , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Left
            })

          , _sAutoLine_attachEnd :: Maybe Attachment
_sAutoLine_attachEnd = forall a. a -> Maybe a
Just (Attachment {
              _attachment_target :: REltId
_attachment_target = REltId
3
              , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Right
            })
        }))
      , (REltId
7, Text -> SElt -> SEltLabel
SEltLabel Text
"b1-> b4->" (SAutoLine -> SElt
SEltLine forall a. Default a => a
def {
          _sAutoLine_start :: XY
_sAutoLine_start = forall a. a -> a -> V2 a
V2 REltId
0 REltId
100
          , _sAutoLine_end :: XY
_sAutoLine_end = forall a. a -> a -> V2 a
V2 REltId
0 REltId
110
          , _sAutoLine_attachStart :: Maybe Attachment
_sAutoLine_attachStart = forall a. a -> Maybe a
Just (Attachment {
              _attachment_target :: REltId
_attachment_target = REltId
0
              , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Right
            })

          , _sAutoLine_attachEnd :: Maybe Attachment
_sAutoLine_attachEnd = forall a. a -> Maybe a
Just (Attachment {
              _attachment_target :: REltId
_attachment_target = REltId
3
              , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Right
            })
        }))
        , (REltId
8, Text -> SElt -> SEltLabel
SEltLabel Text
"b1-> b2->" (SAutoLine -> SElt
SEltLine forall a. Default a => a
def {
            _sAutoLine_start :: XY
_sAutoLine_start = forall a. a -> a -> V2 a
V2 REltId
0 REltId
100
            , _sAutoLine_end :: XY
_sAutoLine_end = forall a. a -> a -> V2 a
V2 REltId
0 REltId
110
            , _sAutoLine_attachStart :: Maybe Attachment
_sAutoLine_attachStart = forall a. a -> Maybe a
Just (Attachment {
                _attachment_target :: REltId
_attachment_target = REltId
0
                , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Right
              })

            , _sAutoLine_attachEnd :: Maybe Attachment
_sAutoLine_attachEnd = forall a. a -> Maybe a
Just (Attachment {
                _attachment_target :: REltId
_attachment_target = REltId
1
                , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Right
              })
          }))
      , (REltId
9, Text -> SElt -> SEltLabel
SEltLabel Text
"b1v ^b3" (SAutoLine -> SElt
SEltLine forall a. Default a => a
def {
          _sAutoLine_start :: XY
_sAutoLine_start = forall a. a -> a -> V2 a
V2 REltId
0 REltId
100
          , _sAutoLine_end :: XY
_sAutoLine_end = forall a. a -> a -> V2 a
V2 REltId
0 REltId
110
          , _sAutoLine_attachStart :: Maybe Attachment
_sAutoLine_attachStart = forall a. a -> Maybe a
Just (Attachment {
              _attachment_target :: REltId
_attachment_target = REltId
0
              , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Bot
            })

          , _sAutoLine_attachEnd :: Maybe Attachment
_sAutoLine_attachEnd = forall a. a -> Maybe a
Just (Attachment {
              _attachment_target :: REltId
_attachment_target = REltId
2
              , _attachment_location :: AttachmentLocation
_attachment_location = AttachmentLocation
AL_Top
            })
        }))
      ]
    , _pFState_canvas :: SCanvas
_pFState_canvas = LBox -> SCanvas
SCanvas LBox
defaultCanvasLBox
  }


-- contains SElts of size 0
pfstate_zero :: PFState
pfstate_zero :: PFState
pfstate_zero = PFState {
    _pFState_layers :: Seq REltId
_pFState_layers = forall a. [a] -> Seq a
Seq.fromList [REltId
0..REltId
1]
    , _pFState_directory :: REltIdMap SEltLabel
_pFState_directory = forall a. [(REltId, a)] -> IntMap a
IM.fromList [
        (REltId
0, Text -> SElt -> SEltLabel
SEltLabel Text
"b1" (SBox -> SElt
SEltBox forall a. Default a => a
def {
            _sBox_box :: LBox
_sBox_box = XY -> XY -> LBox
LBox (forall a. a -> a -> V2 a
V2 REltId
0 REltId
0) (forall a. a -> a -> V2 a
V2 REltId
0 REltId
0)
          }))
        , (REltId
1, Text -> SElt -> SEltLabel
SEltLabel Text
"sl1" (SAutoLine -> SElt
SEltLine forall a. Default a => a
def {
            _sAutoLine_start :: XY
_sAutoLine_start = forall a. a -> a -> V2 a
V2 REltId
10 REltId
10
            , _sAutoLine_end :: XY
_sAutoLine_end = forall a. a -> a -> V2 a
V2 REltId
10 REltId
10
          }))
      ]
    , _pFState_canvas :: SCanvas
_pFState_canvas = LBox -> SCanvas
SCanvas LBox
defaultCanvasLBox
  }