ContentsIndex
Barracuda.GUI.ChatView
MaintainerHenning Guenther, Oliver Mielentz
Description
The central gui widget displaying the messages of the channels.
Synopsis
data ChatView
data ChatContent
chatViewNew :: IO ChatView
chatContentNew :: WidgetClass w => w -> IO ChatContent
chatViewSetChatContent :: ChatView -> ChatContent -> IO ()
chatViewGetWidget :: ChatView -> Widget
chatViewScroll :: ChatView -> IO ()
chatContentInsert :: UTCTime -> Maybe UserID -> String -> [Attachment] -> Bool -> ChatContent -> IO ()
chatContentWantAuth :: UTCTime -> UserID -> ChatContent -> IO ()
chatContentError :: UTCTime -> String -> ChatContent -> IO ()
onDownload :: ChatContent -> ([Attachment] -> IO ()) -> IO ()
onAuth :: ChatContent -> (UserID -> IO ()) -> IO ()
Documentation
data ChatView
A ChatView is a Widget that displays the content of a ChatContent
data ChatContent
A ChatContent represents a buffer with messages, e.g. for a specific channel
chatViewNew :: IO ChatView
Creates a ChatView Widget without any content.
chatContentNew :: WidgetClass w => w -> IO ChatContent
Creates an empty ChatContent(no messages in it).
chatViewSetChatContent :: ChatView -> ChatContent -> IO ()
Sets the content of a ChatView.
chatViewGetWidget :: ChatView -> Widget
Retrieves the main Widget of a ChatView. Can be used to insert the ChatView into another Widget.
chatViewScroll :: ChatView -> IO ()
chatContentInsert :: UTCTime -> Maybe UserID -> String -> [Attachment] -> Bool -> ChatContent -> IO ()
Inserts a message with timestamp, text and attachments into a ChatContent.
chatContentWantAuth :: UTCTime -> UserID -> ChatContent -> IO ()
chatContentError :: UTCTime -> String -> ChatContent -> IO ()
onDownload :: ChatContent -> ([Attachment] -> IO ()) -> IO ()
Sets a callback function to be called whenever the user wants to save specific attachments.
onAuth :: ChatContent -> (UserID -> IO ()) -> IO ()
Sets a callback function to be called whenever the user wants to allow another user into the channel.
Produced by Haddock version 0.8