on 9c8dfd9 help sign in
60 lines 1.4 kB history raw
2module Graphics.Text where
4import Native.Graphics.Text as T
7-- Convert a string into text which can be styled and displayed.
8toText : String -> Text
10-- Set the typeface of some text. The first argument should be a comma separated listing of the desired typefaces
11-- "helvetica, arial, sans-serif"
12-- Works the same as the CSS font-family property.
13typeface : String -> Text -> Text
15-- Switch to a monospace typeface. Good for code snippets.
16monospace : Text -> Text
18-- Make text big and noticable.
19header : Text -> Text
21-- Create a link.
22href : String -> Text -> Text
24-- Set the height of text in \"ems\". 1em is the normal height of text. 2ems is twice that height.
25height : Float -> Text -> Text
27-- Set the color of a string.
28color : Color -> Text -> Text
30-- Make a string bold.
31bold : Text -> Text
33-- Italicize a string.
34italic : Text -> Text
36-- Draw a line above a string.
37overline : Text -> Text
39-- Underline a string.
40underline : Text -> Text
42-- Draw a line through a string.
43strikeThrough : Text -> Text
45-- Display justified, styled text.
46justified : Text -> Element
48-- Display centered, styled text.
49centered : Text -> Element
51-- Display right justified, styled text.
52righted : Text -> Element
54-- Display styled text.
55text : Text -> Element
57-- Convert anything to it's textual representation and make it displayable in browser
58-- asText = text . monospace . show
59-- Excellent for debugging
60asText : a -> Element