ContentsIndex
Barracuda.GUI.ChannelList
MaintainerHenning Guenther
Description
A widget listing channels of a network, including their join and privacy status.
Synopsis
data ChannelList
data Channel = Chan {
name :: String
channelName :: ChannelName
channelID :: ChannelID
private :: Bool
joined :: Bool
}
channelListNew :: IO ChannelList
channelListGetWidget :: ChannelList -> Widget
channelListSetChannels :: ChannelList -> [Channel] -> Maybe (ChannelName, ChannelID) -> IO ()
onChannelSelect :: ChannelList -> (Channel -> IO ()) -> IO ()
onChannelJoin :: ChannelList -> (Channel -> IO ()) -> IO ()
onChannelLeave :: ChannelList -> (Channel -> IO ()) -> IO ()
onChannelCreate :: ChannelList -> IO () -> IO ()
Documentation
data ChannelList
Discribes a ChannelList. In this datatype are the inner TreeView and the outer ScrolledWindow defined. Also there is the list of channels and some callbacks for user interaction.
data Channel
This datatype stores the name of a channel and the information if the user has joined and if it is a private or non private channel.
Constructors
Chan
name :: String
channelName :: ChannelName
channelID :: ChannelID
private :: Bool
joined :: Bool
channelListNew :: IO ChannelList
Creates a new ChannelList with a list of Channels, the inner TreeView and the outer ScrolledWindow. Also there are some callbacks for the user interaction.
channelListGetWidget :: ChannelList -> Widget
Returns the ChannelList as a Widget
channelListSetChannels :: ChannelList -> [Channel] -> Maybe (ChannelName, ChannelID) -> IO ()
This function deletes all the channels in the given Channellist and replaces them with the given one.
onChannelSelect :: ChannelList -> (Channel -> IO ()) -> IO ()
Gives a callback if a user selects a channel in the list.
onChannelJoin :: ChannelList -> (Channel -> IO ()) -> IO ()
Gives a callback if a user clicks on Join in the context menu.
onChannelLeave :: ChannelList -> (Channel -> IO ()) -> IO ()
Gives a callback if a user clicks on Leave in the context menu.
onChannelCreate :: ChannelList -> IO () -> IO ()
Gives a callback if a user clicks on the add Channel button in the context menu.
Produced by Haddock version 0.8