Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
GUI toolkit
Synopsis
- newtype WinID = WinID Int
- data GuiEvent = GuiEvent {
- client :: DisplayClient
- trigger :: TriggerName
- body :: Value
- newtype TriggerName = TriggerName Text
- data HtmxEvent = HtmxEvent {}
- decodeTriggerName :: Text -> Maybe (WinID, TriggerName)
- renderOnChange :: MonadIO m => HtmlT STM () -> (HtmlT STM () -> m ()) -> m Void
- wid_ :: WinID -> Text -> _
- withTrigger :: With a => Text -> WinID -> TriggerName -> [Pair] -> a -> [Attribute] -> a
- withTrigger_ :: With a => Text -> WinID -> TriggerName -> a -> [Attribute] -> a
- withoutWID :: TriggerName -> TriggerName
- withWID :: WinID -> Text -> Text
- with' :: With a => a -> Text -> a
- hyper_ :: Text -> Attribute
- wsSend :: Attribute
- encodeVal :: [Pair] -> Attribute
- topRightMenu :: Monad m => [HtmlT m ()] -> HtmlT m ()
- hideScript :: Text -> Text
- showScript :: Text -> Text
- websocketHtml :: Text -> SessionID -> Html ()
- splashHtml :: Monad m => HtmlT m () -> HtmlT m ()
- loginForm :: Text -> Text -> [Pair] -> Html ()
- renderToggle :: Text -> [Attribute] -> Bool -> Text -> Text -> HtmlT STM ()
- inputClass :: Text
- btnGreenClass :: Text
- btnRedClass :: Text
- btnBlueClass :: Text
- makeAttribute :: Text -> Text -> Attribute
Documentation
Instances
FromJSON WinID # | |
ToJSON WinID # | |
Defined in Butler.Display.GUI | |
Show WinID # | |
Eq WinID # | |
Ord WinID # | |
Serialise WinID # | |
From WinID SoundChannelID # | |
Defined in Butler.Service.SoundBlaster from :: WinID -> SoundChannelID # | |
From WinID Natural # | |
Defined in Butler.Display.GUI | |
From SoundChannelID WinID # | |
Defined in Butler.Service.SoundBlaster from :: SoundChannelID -> WinID # |
GuiEvent | |
|
Instances
ToJSON GuiEvent # | |
Defined in Butler.Display.GUI |
newtype TriggerName #
Instances
decodeTriggerName :: Text -> Maybe (WinID, TriggerName) #
Remove winID from trigger name
>>>
decodeTriggerName "toggle"
Nothing>>>
decodeTriggerName "toggle-1"
Just (1,"toggle")
renderOnChange :: MonadIO m => HtmlT STM () -> (HtmlT STM () -> m ()) -> m Void #
Callback when the html change, e.g. on TVar update.
triggers
withTrigger :: With a => Text -> WinID -> TriggerName -> [Pair] -> a -> [Attribute] -> a #
withTrigger_ :: With a => Text -> WinID -> TriggerName -> a -> [Attribute] -> a #
withoutWID :: TriggerName -> TriggerName #
helpers
topRightMenu :: Monad m => [HtmlT m ()] -> HtmlT m () #
hideScript :: Text -> Text #
showScript :: Text -> Text #
websocketHtml :: Text -> SessionID -> Html () #
Create the htmx websocket root element
splashHtml :: Monad m => HtmlT m () -> HtmlT m () #
Display the content in a splash screen
Widget
CSS class
inputClass :: Text #
btnGreenClass :: Text #
btnRedClass :: Text #
btnBlueClass :: Text #