module Chiasma.Ui.Data.ViewGeometry where import Data.Data (Data) import Prettyprinter (Doc, Pretty (..), emptyDoc, space, (<+>)) data ViewGeometry = ViewGeometry { ViewGeometry -> Maybe Float minSize :: Maybe Float, ViewGeometry -> Maybe Float maxSize :: Maybe Float, ViewGeometry -> Maybe Float fixedSize :: Maybe Float, ViewGeometry -> Maybe Float minimizedSize :: Maybe Float, ViewGeometry -> Maybe Float weight :: Maybe Float, ViewGeometry -> Maybe Float position :: Maybe Float } deriving stock (ViewGeometry -> ViewGeometry -> Bool (ViewGeometry -> ViewGeometry -> Bool) -> (ViewGeometry -> ViewGeometry -> Bool) -> Eq ViewGeometry forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: ViewGeometry -> ViewGeometry -> Bool == :: ViewGeometry -> ViewGeometry -> Bool $c/= :: ViewGeometry -> ViewGeometry -> Bool /= :: ViewGeometry -> ViewGeometry -> Bool Eq, Int -> ViewGeometry -> ShowS [ViewGeometry] -> ShowS ViewGeometry -> String (Int -> ViewGeometry -> ShowS) -> (ViewGeometry -> String) -> ([ViewGeometry] -> ShowS) -> Show ViewGeometry forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a $cshowsPrec :: Int -> ViewGeometry -> ShowS showsPrec :: Int -> ViewGeometry -> ShowS $cshow :: ViewGeometry -> String show :: ViewGeometry -> String $cshowList :: [ViewGeometry] -> ShowS showList :: [ViewGeometry] -> ShowS Show, Typeable ViewGeometry Typeable ViewGeometry -> (forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ViewGeometry -> c ViewGeometry) -> (forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ViewGeometry) -> (ViewGeometry -> Constr) -> (ViewGeometry -> DataType) -> (forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ViewGeometry)) -> (forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ViewGeometry)) -> ((forall b. Data b => b -> b) -> ViewGeometry -> ViewGeometry) -> (forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ViewGeometry -> r) -> (forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ViewGeometry -> r) -> (forall u. (forall d. Data d => d -> u) -> ViewGeometry -> [u]) -> (forall u. Int -> (forall d. Data d => d -> u) -> ViewGeometry -> u) -> (forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> ViewGeometry -> m ViewGeometry) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> ViewGeometry -> m ViewGeometry) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> ViewGeometry -> m ViewGeometry) -> Data ViewGeometry ViewGeometry -> Constr ViewGeometry -> DataType (forall b. Data b => b -> b) -> ViewGeometry -> ViewGeometry forall a. Typeable a -> (forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> a -> c a) -> (forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c a) -> (a -> Constr) -> (a -> DataType) -> (forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c a)) -> (forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a)) -> ((forall b. Data b => b -> b) -> a -> a) -> (forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r) -> (forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r) -> (forall u. (forall d. Data d => d -> u) -> a -> [u]) -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u) -> (forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> a -> m a) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a) -> Data a forall u. Int -> (forall d. Data d => d -> u) -> ViewGeometry -> u forall u. (forall d. Data d => d -> u) -> ViewGeometry -> [u] forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ViewGeometry -> r forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ViewGeometry -> r forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> ViewGeometry -> m ViewGeometry forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> ViewGeometry -> m ViewGeometry forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ViewGeometry forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ViewGeometry -> c ViewGeometry forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ViewGeometry) forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ViewGeometry) $cgfoldl :: forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ViewGeometry -> c ViewGeometry gfoldl :: forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ViewGeometry -> c ViewGeometry $cgunfold :: forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ViewGeometry gunfold :: forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ViewGeometry $ctoConstr :: ViewGeometry -> Constr toConstr :: ViewGeometry -> Constr $cdataTypeOf :: ViewGeometry -> DataType dataTypeOf :: ViewGeometry -> DataType $cdataCast1 :: forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ViewGeometry) dataCast1 :: forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ViewGeometry) $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ViewGeometry) dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ViewGeometry) $cgmapT :: (forall b. Data b => b -> b) -> ViewGeometry -> ViewGeometry gmapT :: (forall b. Data b => b -> b) -> ViewGeometry -> ViewGeometry $cgmapQl :: forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ViewGeometry -> r gmapQl :: forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ViewGeometry -> r $cgmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ViewGeometry -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ViewGeometry -> r $cgmapQ :: forall u. (forall d. Data d => d -> u) -> ViewGeometry -> [u] gmapQ :: forall u. (forall d. Data d => d -> u) -> ViewGeometry -> [u] $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ViewGeometry -> u gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ViewGeometry -> u $cgmapM :: forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> ViewGeometry -> m ViewGeometry gmapM :: forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> ViewGeometry -> m ViewGeometry $cgmapMp :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> ViewGeometry -> m ViewGeometry gmapMp :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> ViewGeometry -> m ViewGeometry $cgmapMo :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> ViewGeometry -> m ViewGeometry gmapMo :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> ViewGeometry -> m ViewGeometry Data, (forall x. ViewGeometry -> Rep ViewGeometry x) -> (forall x. Rep ViewGeometry x -> ViewGeometry) -> Generic ViewGeometry forall x. Rep ViewGeometry x -> ViewGeometry forall x. ViewGeometry -> Rep ViewGeometry x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cfrom :: forall x. ViewGeometry -> Rep ViewGeometry x from :: forall x. ViewGeometry -> Rep ViewGeometry x $cto :: forall x. Rep ViewGeometry x -> ViewGeometry to :: forall x. Rep ViewGeometry x -> ViewGeometry Generic) deriving anyclass (ViewGeometry ViewGeometry -> Default ViewGeometry forall a. a -> Default a $cdef :: ViewGeometry def :: ViewGeometry Default) mayPretty :: Text -> Maybe Float -> Doc a mayPretty :: forall a. Text -> Maybe Float -> Doc a mayPretty Text prefix (Just Float a) = Doc a forall ann. Doc ann space Doc a -> Doc a -> Doc a forall a. Semigroup a => a -> a -> a <> Text -> Doc a forall ann. Text -> Doc ann forall a ann. Pretty a => a -> Doc ann pretty Text prefix Doc a -> Doc a -> Doc a forall a. Semigroup a => a -> a -> a <> Doc a ":" Doc a -> Doc a -> Doc a forall ann. Doc ann -> Doc ann -> Doc ann <+> Float -> Doc a forall ann. Float -> Doc ann forall a ann. Pretty a => a -> Doc ann pretty Float a mayPretty Text _ Maybe Float Nothing = Doc a forall ann. Doc ann emptyDoc instance Pretty ViewGeometry where pretty :: forall ann. ViewGeometry -> Doc ann pretty (ViewGeometry Maybe Float minSize Maybe Float maxSize Maybe Float fixedSize Maybe Float _ Maybe Float _ Maybe Float _) = forall (t :: * -> *) b a. Foldable t => (b -> a -> b) -> b -> t a -> b foldl @[] Doc ann -> Doc ann -> Doc ann forall a. Semigroup a => a -> a -> a (<>) Doc ann forall ann. Doc ann emptyDoc ((Text -> Maybe Float -> Doc ann) -> (Text, Maybe Float) -> Doc ann forall a b c. (a -> b -> c) -> (a, b) -> c uncurry Text -> Maybe Float -> Doc ann forall a. Text -> Maybe Float -> Doc a mayPretty ((Text, Maybe Float) -> Doc ann) -> [(Text, Maybe Float)] -> [Doc ann] forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> [(Text "min", Maybe Float minSize), (Text "max", Maybe Float maxSize), (Text "fixed", Maybe Float fixedSize)])