| Copyright | (C) Frank Staals |
|---|---|
| License | see the LICENSE file |
| Maintainer | Frank Staals |
| Safe Haskell | None |
| Language | GHC2024 |
Ipe.Writer
Description
Synopsis
- writeIpeFile :: IpeWriteText r => OsPath -> IpeFile r -> IO ()
- writeIpeFile' :: IpeWrite t => t -> OsPath -> IO ()
- writeIpePage :: IpeWriteText r => OsPath -> IpePage r -> IO ()
- toIpeXML :: IpeWrite t => t -> Maybe ByteString
- printAsIpeSelection :: IpeWrite t => t -> IO ()
- toIpeSelectionXML :: IpeWrite t => t -> Maybe ByteString
- class IpeWrite t where
- class IpeWriteText t where
- ipeWriteText :: t -> Maybe Text
- ipeWriteAttrs :: forall (rs :: [AttributeUniverse]) (f :: TyFun AttributeUniverse Type -> Type). (RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, AllConstrained IpeAttrName rs, RecAll (Attr f) rs IpeWriteText) => Attributes f rs -> [(Text, Text)]
- writeAttrValues :: forall {u} (rs :: [u]) (f :: u -> Type). (RMap rs, ReifyConstraint IpeWriteText f rs, RecAll f rs IpeWriteText) => Rec f rs -> Rec (Const (Maybe Text) :: u -> Type) rs
Documentation
writeIpeFile :: IpeWriteText r => OsPath -> IpeFile r -> IO () Source #
Write an IpeFiele to file.
writeIpeFile' :: IpeWrite t => t -> OsPath -> IO () Source #
Convert to ipe XML and write the output to a file.
writeIpePage :: IpeWriteText r => OsPath -> IpePage r -> IO () Source #
Creates a single page ipe file with the given page
printAsIpeSelection :: IpeWrite t => t -> IO () Source #
Convert the input to ipeXml, and prints it to standard out in such a way that the copied text can be pasted into ipe as a geometry object.
toIpeSelectionXML :: IpeWrite t => t -> Maybe ByteString Source #
Convert input into an ipe selection.
class IpeWrite t where Source #
Types that correspond to an XML Element. All instances should produce an
Element. If the type should produce a Node with the Text constructor, use
the IpeWriteText typeclass instead.
Instances
class IpeWriteText t where Source #
For types that can produce a text value
Methods
ipeWriteText :: t -> Maybe Text Source #
Instances
ipeWriteAttrs :: forall (rs :: [AttributeUniverse]) (f :: TyFun AttributeUniverse Type -> Type). (RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, AllConstrained IpeAttrName rs, RecAll (Attr f) rs IpeWriteText) => Attributes f rs -> [(Text, Text)] Source #
Functon to write all attributes in a Rec
writeAttrValues :: forall {u} (rs :: [u]) (f :: u -> Type). (RMap rs, ReifyConstraint IpeWriteText f rs, RecAll f rs IpeWriteText) => Rec f rs -> Rec (Const (Maybe Text) :: u -> Type) rs Source #
Writing the attribute values