1
+ module Web.UIEvent.InputEvent.InputType where
2
+
3
+ import Prelude
4
+
5
+ data InputType
6
+ = InsertText
7
+ | InsertReplacementText
8
+ | InsertLineBreak
9
+ | InsertParagraph
10
+ | InsertOrderedList
11
+ | InsertUnorderedList
12
+ | InsertHorizontalRule
13
+ | InsertFromYank
14
+ | InsertFromDrop
15
+ | InsertFromPaste
16
+ | InsertFromPasteAsQuotation
17
+ | InsertTranspose
18
+ | InsertCompositionText
19
+ | InsertLink
20
+ | DeleteWordBackward
21
+ | DeleteWordForward
22
+ | DeleteSoftLineBackward
23
+ | DeleteSoftLineForward
24
+ | DeleteEntireSoftLine
25
+ | DeleteHardLineBackward
26
+ | DeleteHardLineForward
27
+ | DeleteByDrag
28
+ | DeleteByCut
29
+ | DeleteContent
30
+ | DeleteContentBackward
31
+ | DeleteContentForward
32
+ | HistoryUndo
33
+ | HistoryRedo
34
+ | FormatBold
35
+ | FormatItalic
36
+ | FormatUnderline
37
+ | FormatStrikeThrough
38
+ | FormatSuperscript
39
+ | FormatSubscript
40
+ | FormatJustifyFull
41
+ | FormatJustifyCenter
42
+ | FormatJustifyRight
43
+ | FormatJustifyLeft
44
+ | FormatIndent
45
+ | FormatOutdent
46
+ | FormatRemove
47
+ | FormatSetBlockTextDirection
48
+ | FormatSetInlineTextDirection
49
+ | FormatBackColor
50
+ | FormatFontColor
51
+ | FormatFontName
52
+ | Other String
53
+
54
+ derive instance eqInputType :: Eq InputType
55
+ derive instance ordInputType :: Ord InputType
56
+
57
+ instance showInputType :: Show InputType where
58
+ show = print
59
+
60
+ parse :: String -> InputType
61
+ parse " insertText" = InsertText
62
+ parse " insertReplacementText" = InsertReplacementText
63
+ parse " insertLineBreak" = InsertLineBreak
64
+ parse " insertParagraph" = InsertParagraph
65
+ parse " insertOrderedList" = InsertOrderedList
66
+ parse " insertUnorderedList" = InsertUnorderedList
67
+ parse " insertHorizontalRule" = InsertHorizontalRule
68
+ parse " insertFromYank" = InsertFromYank
69
+ parse " insertFromDrop" = InsertFromDrop
70
+ parse " insertFromPaste" = InsertFromPaste
71
+ parse " insertFromPasteAsQuotation" = InsertFromPasteAsQuotation
72
+ parse " insertTranspose" = InsertTranspose
73
+ parse " insertCompositionText" = InsertCompositionText
74
+ parse " insertLink" = InsertLink
75
+ parse " deleteWordBackward" = DeleteWordBackward
76
+ parse " deleteWordForward" = DeleteWordForward
77
+ parse " deleteSoftLineBackward" = DeleteSoftLineBackward
78
+ parse " deleteSoftLineForward" = DeleteSoftLineForward
79
+ parse " deleteEntireSoftLine" = DeleteEntireSoftLine
80
+ parse " deleteHardLineBackward" = DeleteHardLineBackward
81
+ parse " deleteHardLineForward" = DeleteHardLineForward
82
+ parse " deleteByDrag" = DeleteByDrag
83
+ parse " deleteByCut" = DeleteByCut
84
+ parse " deleteContent" = DeleteContent
85
+ parse " deleteContentBackward" = DeleteContentBackward
86
+ parse " deleteContentForward" = DeleteContentForward
87
+ parse " historyUndo" = HistoryUndo
88
+ parse " historyRedo" = HistoryRedo
89
+ parse " formatBold" = FormatBold
90
+ parse " formatItalic" = FormatItalic
91
+ parse " formatUnderline" = FormatUnderline
92
+ parse " formatStrikeThrough" = FormatStrikeThrough
93
+ parse " formatSuperscript" = FormatSuperscript
94
+ parse " formatSubscript" = FormatSubscript
95
+ parse " formatJustifyFull" = FormatJustifyFull
96
+ parse " formatJustifyCenter" = FormatJustifyCenter
97
+ parse " formatJustifyRight" = FormatJustifyRight
98
+ parse " formatJustifyLeft" = FormatJustifyLeft
99
+ parse " formatIndent" = FormatIndent
100
+ parse " formatOutdent" = FormatOutdent
101
+ parse " formatRemove" = FormatRemove
102
+ parse " formatSetBlockTextDirection" = FormatSetBlockTextDirection
103
+ parse " formatSetInlineTextDirection" = FormatSetInlineTextDirection
104
+ parse " formatBackColor" = FormatBackColor
105
+ parse " formatFontColor" = FormatFontColor
106
+ parse " formatFontName" = FormatFontName
107
+ parse s = Other s
108
+
109
+ print :: InputType -> String
110
+ print InsertText = " insertText"
111
+ print InsertReplacementText = " insertReplacementText"
112
+ print InsertLineBreak = " insertLineBreak"
113
+ print InsertParagraph = " insertParagraph"
114
+ print InsertOrderedList = " insertOrderedList"
115
+ print InsertUnorderedList = " insertUnorderedList"
116
+ print InsertHorizontalRule = " insertHorizontalRule"
117
+ print InsertFromYank = " insertFromYank"
118
+ print InsertFromDrop = " insertFromDrop"
119
+ print InsertFromPaste = " insertFromPaste"
120
+ print InsertFromPasteAsQuotation = " insertFromPasteAsQuotation"
121
+ print InsertTranspose = " insertTranspose"
122
+ print InsertCompositionText = " insertCompositionText"
123
+ print InsertLink = " insertLink"
124
+ print DeleteWordBackward = " deleteWordBackward"
125
+ print DeleteWordForward = " deleteWordForward"
126
+ print DeleteSoftLineBackward = " deleteSoftLineBackward"
127
+ print DeleteSoftLineForward = " deleteSoftLineForward"
128
+ print DeleteEntireSoftLine = " deleteEntireSoftLine"
129
+ print DeleteHardLineBackward = " deleteHardLineBackward"
130
+ print DeleteHardLineForward = " deleteHardLineForward"
131
+ print DeleteByDrag = " deleteByDrag"
132
+ print DeleteByCut = " deleteByCut"
133
+ print DeleteContent = " deleteContent"
134
+ print DeleteContentBackward = " deleteContentBackward"
135
+ print DeleteContentForward = " deleteContentForward"
136
+ print HistoryUndo = " historyUndo"
137
+ print HistoryRedo = " historyRedo"
138
+ print FormatBold = " formatBold"
139
+ print FormatItalic = " formatItalic"
140
+ print FormatUnderline = " formatUnderline"
141
+ print FormatStrikeThrough = " formatStrikeThrough"
142
+ print FormatSuperscript = " formatSuperscript"
143
+ print FormatSubscript = " formatSubscript"
144
+ print FormatJustifyFull = " formatJustifyFull"
145
+ print FormatJustifyCenter = " formatJustifyCenter"
146
+ print FormatJustifyRight = " formatJustifyRight"
147
+ print FormatJustifyLeft = " formatJustifyLeft"
148
+ print FormatIndent = " formatIndent"
149
+ print FormatOutdent = " formatOutdent"
150
+ print FormatRemove = " formatRemove"
151
+ print FormatSetBlockTextDirection = " formatSetBlockTextDirection"
152
+ print FormatSetInlineTextDirection = " formatSetInlineTextDirection"
153
+ print FormatBackColor = " formatBackColor"
154
+ print FormatFontColor = " formatFontColor"
155
+ print FormatFontName = " formatFontName"
156
+ print (Other s) = s
0 commit comments