Safe Haskell | None |
---|---|
Language | Haskell98 |
- type AttributeMap = Map String String
- data El t = El {}
- class Attributes m a where
- addAttributes :: IsElement e => a -> e -> m ()
- buildEmptyElement :: (MonadWidget t m, Attributes m attrs) => String -> attrs -> m HTMLElement
- buildElement :: (MonadWidget t m, Attributes m attrs) => String -> attrs -> m a -> m (HTMLElement, a)
- namedNodeMapGetNames :: IsNamedNodeMap self => self -> IO (Set String)
- text :: MonadWidget t m => String -> m ()
- text' :: MonadWidget t m => String -> m Text
- dynText :: MonadWidget t m => Dynamic t String -> m ()
- display :: (MonadWidget t m, Show a) => Dynamic t a -> m ()
- dyn :: MonadWidget t m => Dynamic t (m a) -> m (Event t a)
- widgetHold :: MonadWidget t m => m a -> Event t (m a) -> m (Dynamic t a)
- listWithKey :: (Ord k, MonadWidget t m) => Dynamic t (Map k v) -> (k -> Dynamic t v -> m a) -> m (Dynamic t (Map k a))
- listWithKey' :: forall t m k v a. (Ord k, MonadWidget t m) => Map k v -> Event t (Map k (Maybe v)) -> (k -> v -> Event t v -> m a) -> m (Dynamic t (Map k a))
- listViewWithKey :: (Ord k, MonadWidget t m) => Dynamic t (Map k v) -> (k -> Dynamic t v -> m (Event t a)) -> m (Event t (Map k a))
- listViewWithKey' :: (Ord k, MonadWidget t m) => Dynamic t (Map k v) -> (k -> Dynamic t v -> m a) -> m (Behavior t (Map k a))
- selectViewListWithKey_ :: forall t m k v a. (MonadWidget t m, Ord k) => Dynamic t k -> Dynamic t (Map k v) -> (k -> Dynamic t v -> Dynamic t Bool -> m (Event t a)) -> m (Event t k)
- deleteBetweenExclusive :: (IsNode start, IsNode end) => start -> end -> IO ()
- deleteBetweenInclusive :: (IsNode start, IsNode end) => start -> end -> IO ()
- wrapDomEvent :: (Functor (Event t), MonadIO m, MonadSample t m, MonadReflexCreateTrigger t m, Reflex t, HasPostGui t h m) => e -> (e -> EventM event e () -> IO (IO ())) -> EventM event e a -> m (Event t a)
- wrapDomEventMaybe :: (Functor (Event t), MonadIO m, MonadSample t m, MonadReflexCreateTrigger t m, Reflex t, HasPostGui t h m) => e -> (e -> EventM event e () -> IO (IO ())) -> EventM event e (Maybe a) -> m (Event t a)
- data EventTag
- = AbortTag
- | BlurTag
- | ChangeTag
- | ClickTag
- | ContextmenuTag
- | DblclickTag
- | DragTag
- | DragendTag
- | DragenterTag
- | DragleaveTag
- | DragoverTag
- | DragstartTag
- | DropTag
- | ErrorTag
- | FocusTag
- | InputTag
- | InvalidTag
- | KeydownTag
- | KeypressTag
- | KeyupTag
- | LoadTag
- | MousedownTag
- | MouseenterTag
- | MouseleaveTag
- | MousemoveTag
- | MouseoutTag
- | MouseoverTag
- | MouseupTag
- | ScrollTag
- | SelectTag
- | SubmitTag
- | BeforecutTag
- | CutTag
- | BeforecopyTag
- | CopyTag
- | BeforepasteTag
- | PasteTag
- | ResetTag
- | SearchTag
- | SelectstartTag
- | TouchstartTag
- | TouchmoveTag
- | TouchendTag
- | TouchcancelTag
- data EventName :: EventTag -> * where
- Abort :: EventName AbortTag
- Blur :: EventName BlurTag
- Change :: EventName ChangeTag
- Click :: EventName ClickTag
- Contextmenu :: EventName ContextmenuTag
- Dblclick :: EventName DblclickTag
- Drag :: EventName DragTag
- Dragend :: EventName DragendTag
- Dragenter :: EventName DragenterTag
- Dragleave :: EventName DragleaveTag
- Dragover :: EventName DragoverTag
- Dragstart :: EventName DragstartTag
- Drop :: EventName DropTag
- Error :: EventName ErrorTag
- Focus :: EventName FocusTag
- Input :: EventName InputTag
- Invalid :: EventName InvalidTag
- Keydown :: EventName KeydownTag
- Keypress :: EventName KeypressTag
- Keyup :: EventName KeyupTag
- Load :: EventName LoadTag
- Mousedown :: EventName MousedownTag
- Mouseenter :: EventName MouseenterTag
- Mouseleave :: EventName MouseleaveTag
- Mousemove :: EventName MousemoveTag
- Mouseout :: EventName MouseoutTag
- Mouseover :: EventName MouseoverTag
- Mouseup :: EventName MouseupTag
- Scroll :: EventName ScrollTag
- Select :: EventName SelectTag
- Submit :: EventName SubmitTag
- Beforecut :: EventName BeforecutTag
- Cut :: EventName CutTag
- Beforecopy :: EventName BeforecopyTag
- Copy :: EventName CopyTag
- Beforepaste :: EventName BeforepasteTag
- Paste :: EventName PasteTag
- Reset :: EventName ResetTag
- Search :: EventName SearchTag
- Selectstart :: EventName SelectstartTag
- Touchstart :: EventName TouchstartTag
- Touchmove :: EventName TouchmoveTag
- Touchend :: EventName TouchendTag
- Touchcancel :: EventName TouchcancelTag
- type family EventType en
- onEventName :: IsElement e => EventName en -> e -> EventM (EventType en) e () -> IO (IO ())
- newtype EventResult en = EventResult {
- unEventResult :: EventResultType en
- type family EventResultType en :: *
- wrapDomEventsMaybe :: (Functor (Event t), IsElement e, MonadIO m, MonadSample t m, MonadReflexCreateTrigger t m, Reflex t, HasPostGui t h m) => e -> (forall en. EventName en -> EventM (EventType en) e (Maybe (f en))) -> m (EventSelector t (WrapArg f EventName))
- getKeyEvent :: EventM UIEvent e Int
- getMouseEventCoords :: EventM MouseEvent e (Int, Int)
- defaultDomEventHandler :: IsElement e => e -> EventName en -> EventM (EventType en) e (Maybe (EventResult en))
- wrapElement :: forall t h m. (Functor (Event t), MonadIO m, MonadSample t m, MonadReflexCreateTrigger t m, Reflex t, HasPostGui t h m) => HTMLElement -> m (El t)
- elDynAttr' :: forall t m a. MonadWidget t m => String -> Dynamic t (Map String String) -> m a -> m (El t, a)
- elAttr :: forall t m a. MonadWidget t m => String -> Map String String -> m a -> m a
- el' :: forall t m a. MonadWidget t m => String -> m a -> m (El t, a)
- elAttr' :: forall t m a. MonadWidget t m => String -> Map String String -> m a -> m (El t, a)
- elDynAttr :: forall t m a. MonadWidget t m => String -> Dynamic t (Map String String) -> m a -> m a
- el :: forall t m a. MonadWidget t m => String -> m a -> m a
- elClass :: forall t m a. MonadWidget t m => String -> String -> m a -> m a
- list :: (MonadWidget t m, Ord k) => Dynamic t (Map k v) -> (Dynamic t v -> m a) -> m (Dynamic t (Map k a))
- simpleList :: MonadWidget t m => Dynamic t [v] -> (Dynamic t v -> m a) -> m (Dynamic t [a])
- elDynHtml' :: MonadWidget t m => String -> Dynamic t String -> m (El t)
- elDynHtmlAttr' :: MonadWidget t m => String -> Map String String -> Dynamic t String -> m (El t)
- data Link t = Link {
- _link_clicked :: Event t ()
- class HasDomEvent t a where
- domEvent :: EventName en -> a -> Event t (EventResultType en)
- linkClass :: MonadWidget t m => String -> String -> m (Link t)
- link :: MonadWidget t m => String -> m (Link t)
- button :: MonadWidget t m => String -> m (Event t ())
- newtype Workflow t m a = Workflow {
- unWorkflow :: m (a, Event t (Workflow t m a))
- workflow :: forall t m a. MonadWidget t m => Workflow t m a -> m (Dynamic t a)
- workflowView :: forall t m a. MonadWidget t m => Workflow t m a -> m (Event t a)
- divClass :: forall t m a. MonadWidget t m => String -> m a -> m a
- dtdd :: forall t m a. MonadWidget t m => String -> m a -> m a
- blank :: forall t m. MonadWidget t m => m ()
- tableDynAttr :: forall t m r k v. (MonadWidget t m, Show k, Ord k) => String -> [(String, k -> Dynamic t r -> m v)] -> Dynamic t (Map k r) -> (k -> m (Dynamic t (Map String String))) -> m (Dynamic t (Map k (El t, [v])))
- tabDisplay :: forall t m k. (MonadFix m, MonadWidget t m, Show k, Ord k) => String -> String -> Map k (String, m ()) -> m ()
- unsafePlaceElement :: MonadWidget t m => HTMLElement -> m (El t)
- _el_clicked :: Reflex t => El t -> Event t ()
- _el_keypress :: Reflex t => El t -> Event t Int
- _el_scrolled :: Reflex t => El t -> Event t Int
Documentation
type AttributeMap = Map String String Source
Reflex t => HasDomEvent t (El t) Source |
class Attributes m a where Source
addAttributes :: IsElement e => a -> e -> m () Source
MonadIO m => Attributes m AttributeMap Source | |
MonadWidget t m => Attributes m (Dynamic t AttributeMap) Source |
buildEmptyElement :: (MonadWidget t m, Attributes m attrs) => String -> attrs -> m HTMLElement Source
buildElement :: (MonadWidget t m, Attributes m attrs) => String -> attrs -> m a -> m (HTMLElement, a) Source
namedNodeMapGetNames :: IsNamedNodeMap self => self -> IO (Set String) Source
text :: MonadWidget t m => String -> m () Source
text' :: MonadWidget t m => String -> m Text Source
dynText :: MonadWidget t m => Dynamic t String -> m () Source
display :: (MonadWidget t m, Show a) => Dynamic t a -> m () Source
dyn :: MonadWidget t m => Dynamic t (m a) -> m (Event t a) Source
widgetHold :: MonadWidget t m => m a -> Event t (m a) -> m (Dynamic t a) Source
listWithKey :: (Ord k, MonadWidget t m) => Dynamic t (Map k v) -> (k -> Dynamic t v -> m a) -> m (Dynamic t (Map k a)) Source
listWithKey' :: forall t m k v a. (Ord k, MonadWidget t m) => Map k v -> Event t (Map k (Maybe v)) -> (k -> v -> Event t v -> m a) -> m (Dynamic t (Map k a)) Source
listViewWithKey :: (Ord k, MonadWidget t m) => Dynamic t (Map k v) -> (k -> Dynamic t v -> m (Event t a)) -> m (Event t (Map k a)) Source
listViewWithKey' :: (Ord k, MonadWidget t m) => Dynamic t (Map k v) -> (k -> Dynamic t v -> m a) -> m (Behavior t (Map k a)) Source
selectViewListWithKey_ :: forall t m k v a. (MonadWidget t m, Ord k) => Dynamic t k -> Dynamic t (Map k v) -> (k -> Dynamic t v -> Dynamic t Bool -> m (Event t a)) -> m (Event t k) Source
deleteBetweenExclusive :: (IsNode start, IsNode end) => start -> end -> IO () Source
s and e must both be children of the same node and s must precede e
deleteBetweenInclusive :: (IsNode start, IsNode end) => start -> end -> IO () Source
s and e must both be children of the same node and s must precede e
wrapDomEvent :: (Functor (Event t), MonadIO m, MonadSample t m, MonadReflexCreateTrigger t m, Reflex t, HasPostGui t h m) => e -> (e -> EventM event e () -> IO (IO ())) -> EventM event e a -> m (Event t a) Source
wrapDomEventMaybe :: (Functor (Event t), MonadIO m, MonadSample t m, MonadReflexCreateTrigger t m, Reflex t, HasPostGui t h m) => e -> (e -> EventM event e () -> IO (IO ())) -> EventM event e (Maybe a) -> m (Event t a) Source
data EventName :: EventTag -> * where Source
type family EventType en Source
newtype EventResult en Source
type family EventResultType en :: * Source
EventResultType ClickTag = () | |
EventResultType DblclickTag = () | |
EventResultType KeypressTag = Int | |
EventResultType ScrollTag = Int | |
EventResultType MousemoveTag = (Int, Int) | |
EventResultType MousedownTag = (Int, Int) | |
EventResultType MouseupTag = (Int, Int) | |
EventResultType MouseenterTag = () | |
EventResultType MouseleaveTag = () | |
EventResultType FocusTag = () | |
EventResultType BlurTag = () |
wrapDomEventsMaybe :: (Functor (Event t), IsElement e, MonadIO m, MonadSample t m, MonadReflexCreateTrigger t m, Reflex t, HasPostGui t h m) => e -> (forall en. EventName en -> EventM (EventType en) e (Maybe (f en))) -> m (EventSelector t (WrapArg f EventName)) Source
getKeyEvent :: EventM UIEvent e Int Source
getMouseEventCoords :: EventM MouseEvent e (Int, Int) Source
defaultDomEventHandler :: IsElement e => e -> EventName en -> EventM (EventType en) e (Maybe (EventResult en)) Source
wrapElement :: forall t h m. (Functor (Event t), MonadIO m, MonadSample t m, MonadReflexCreateTrigger t m, Reflex t, HasPostGui t h m) => HTMLElement -> m (El t) Source
elDynAttr' :: forall t m a. MonadWidget t m => String -> Dynamic t (Map String String) -> m a -> m (El t, a) Source
el' :: forall t m a. MonadWidget t m => String -> m a -> m (El t, a) Source
elAttr' :: forall t m a. MonadWidget t m => String -> Map String String -> m a -> m (El t, a) Source
elDynAttr :: forall t m a. MonadWidget t m => String -> Dynamic t (Map String String) -> m a -> m a Source
el :: forall t m a. MonadWidget t m => String -> m a -> m a Source
elClass :: forall t m a. MonadWidget t m => String -> String -> m a -> m a Source
list :: (MonadWidget t m, Ord k) => Dynamic t (Map k v) -> (Dynamic t v -> m a) -> m (Dynamic t (Map k a)) Source
simpleList :: MonadWidget t m => Dynamic t [v] -> (Dynamic t v -> m a) -> m (Dynamic t [a]) Source
elDynHtml' :: MonadWidget t m => String -> Dynamic t String -> m (El t) Source
elDynHtmlAttr' :: MonadWidget t m => String -> Map String String -> Dynamic t String -> m (El t) Source
Link | |
|
class HasDomEvent t a where Source
domEvent :: EventName en -> a -> Event t (EventResultType en) Source
Reflex t => HasDomEvent t (El t) Source |
link :: MonadWidget t m => String -> m (Link t) Source
button :: MonadWidget t m => String -> m (Event t ()) Source
workflow :: forall t m a. MonadWidget t m => Workflow t m a -> m (Dynamic t a) Source
workflowView :: forall t m a. MonadWidget t m => Workflow t m a -> m (Event t a) Source
divClass :: forall t m a. MonadWidget t m => String -> m a -> m a Source
dtdd :: forall t m a. MonadWidget t m => String -> m a -> m a Source
blank :: forall t m. MonadWidget t m => m () Source
tableDynAttr :: forall t m r k v. (MonadWidget t m, Show k, Ord k) => String -> [(String, k -> Dynamic t r -> m v)] -> Dynamic t (Map k r) -> (k -> m (Dynamic t (Map String String))) -> m (Dynamic t (Map k (El t, [v]))) Source
tabDisplay :: forall t m k. (MonadFix m, MonadWidget t m, Show k, Ord k) => String -> String -> Map k (String, m ()) -> m () Source
unsafePlaceElement :: MonadWidget t m => HTMLElement -> m (El t) Source
Place an element into the DOM and wrap it with Reflex event handlers. Note: undefined behavior may result if the element is placed multiple times, removed from the DOM after being placed, or in other situations. Don't use this unless you understand the internals of MonadWidget.
_el_clicked :: Reflex t => El t -> Event t () Source
Deprecated: Use `domEvent Click` instead