butler-0.0.1.0: At your service.
Safe HaskellSafe-Inferred
LanguageGHC2021

Butler.Display.GUI

Description

GUI toolkit

Synopsis

Documentation

newtype WinID #

Constructors

WinID Int 

Instances

Instances details
FromJSON WinID # 
Instance details

Defined in Butler.Display.GUI

ToJSON WinID # 
Instance details

Defined in Butler.Display.GUI

Show WinID # 
Instance details

Defined in Butler.Display.GUI

Methods

showsPrec :: Int -> WinID -> ShowS #

show :: WinID -> String #

showList :: [WinID] -> ShowS #

Eq WinID # 
Instance details

Defined in Butler.Display.GUI

Methods

(==) :: WinID -> WinID -> Bool #

(/=) :: WinID -> WinID -> Bool #

Ord WinID # 
Instance details

Defined in Butler.Display.GUI

Methods

compare :: WinID -> WinID -> Ordering #

(<) :: WinID -> WinID -> Bool #

(<=) :: WinID -> WinID -> Bool #

(>) :: WinID -> WinID -> Bool #

(>=) :: WinID -> WinID -> Bool #

max :: WinID -> WinID -> WinID #

min :: WinID -> WinID -> WinID #

Serialise WinID # 
Instance details

Defined in Butler.Display.GUI

From WinID SoundChannelID # 
Instance details

Defined in Butler.Service.SoundBlaster

Methods

from :: WinID -> SoundChannelID #

From WinID Natural # 
Instance details

Defined in Butler.Display.GUI

Methods

from :: WinID -> Natural #

From SoundChannelID WinID # 
Instance details

Defined in Butler.Service.SoundBlaster

Methods

from :: SoundChannelID -> WinID #

data GuiEvent #

Constructors

GuiEvent 

Instances

Instances details
ToJSON GuiEvent # 
Instance details

Defined in Butler.Display.GUI

newtype TriggerName #

Constructors

TriggerName Text 

data HtmxEvent #

Constructors

HtmxEvent 

Fields

Instances

Instances details
FromJSON HtmxEvent # 
Instance details

Defined in Butler.Display.GUI

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

wid_ :: WinID -> Text -> _ #

withTrigger :: With a => Text -> WinID -> TriggerName -> [Pair] -> a -> [Attribute] -> a #

withTrigger_ :: With a => Text -> WinID -> TriggerName -> a -> [Attribute] -> a #

helpers

with' :: With a => a -> Text -> a #

topRightMenu :: Monad m => [HtmlT m ()] -> HtmlT m () #

websocketHtml :: Text -> SessionID -> Html () #

Create the htmx websocket root element

splashHtml :: Monad m => HtmlT m () -> HtmlT m () #

Display the content in a splash screen

loginForm :: Text -> Text -> [Pair] -> Html () #

Widget

renderToggle :: Text -> [Attribute] -> Bool -> Text -> Text -> HtmlT STM () #

CSS class

Re-exports

makeAttribute #

Arguments

:: Text

Attribute name.

-> Text

Attribute value.

-> Attribute 

Make an attribute builder.