Gtk2HsContentsIndex
Graphics.UI.Gtk.Display.Statusbar
Description

Report messages of minor importance to the user.

  • A Statusbar is usually placed along the bottom of an application's main Window. It may provide a regular commentary of the application's status (as is usually the case in a web browser, for example), or may be used to simply output a message when the status changes, (when an upload is complete in an FTP client, for example).
  • Status bars in Gtk+ maintain a stack of messages. The message at the top of the each bar's stack is the one that will currently be displayed. Any messages added to a statusbar's stack must specify a ContextId that is used to uniquely identify the source of a message. This ContextId can be generated by statusbarGetContextId, given a message and the statusbar that it will be added to. Note that messages are stored in a stack, and when choosing which message to display, the stack structure is adhered to, regardless of the context identifier of a message. Messages are added to the bar's stack with statusbarPush. The message at the top of the stack can be removed using statusbarPop. A message can be removed from anywhere in the stack if it's MessageId was recorded at the time it was added. This is done using statusbarRemove.
Synopsis
data Statusbar
class HBoxClass o => StatusbarClass o
castToStatusbar :: GObjectClass obj => obj -> Statusbar
statusbarNew :: IO Statusbar
statusbarGetContextId :: StatusbarClass sb => sb -> String -> IO ContextId
statusbarPush :: StatusbarClass sb => sb -> ContextId -> String -> IO MessageId
statusbarPop :: StatusbarClass sb => sb -> ContextId -> IO ()
statusbarRemove :: StatusbarClass sb => sb -> ContextId -> MessageId -> IO ()
statusbarSetHasResizeGrip :: StatusbarClass sb => sb -> Bool -> IO ()
statusbarGetHasResizeGrip :: StatusbarClass sb => sb -> IO Bool
onTextPopped :: StatusbarClass sb => sb -> (ContextId -> String -> IO ()) -> IO (ConnectId sb)
afterTextPopped :: StatusbarClass sb => sb -> (ContextId -> String -> IO ()) -> IO (ConnectId sb)
onTextPushed :: StatusbarClass sb => sb -> (ContextId -> String -> IO ()) -> IO (ConnectId sb)
afterTextPushed :: StatusbarClass sb => sb -> (ContextId -> String -> IO ()) -> IO (ConnectId sb)
Documentation
data Statusbar
Instances
StatusbarClass Statusbar
HBoxClass Statusbar
BoxClass Statusbar
ContainerClass Statusbar
WidgetClass Statusbar
ObjectClass Statusbar
GObjectClass Statusbar
class HBoxClass o => StatusbarClass o
Instances
StatusbarClass Statusbar
castToStatusbar :: GObjectClass obj => obj -> Statusbar
statusbarNew :: IO Statusbar
Create a new Statusbar.
statusbarGetContextId :: StatusbarClass sb => sb -> String -> IO ContextId
Given a context description, this function returns a ContextId. This id can be used to later remove entries form the Statusbar.
statusbarPush :: StatusbarClass sb => sb -> ContextId -> String -> IO MessageId
Push a new message on the Statusbar stack. It will be displayed as long as it is on top of the stack.
statusbarPop :: StatusbarClass sb => sb -> ContextId -> IO ()
Pops the topmost message that has the correct context.
statusbarRemove :: StatusbarClass sb => sb -> ContextId -> MessageId -> IO ()
Remove an entry within the stack.
statusbarSetHasResizeGrip :: StatusbarClass sb => sb -> Bool -> IO ()
Toggle the displaying of a resize grip.
statusbarGetHasResizeGrip :: StatusbarClass sb => sb -> IO Bool
Query the displaying of the resize grip.
onTextPopped :: StatusbarClass sb => sb -> (ContextId -> String -> IO ()) -> IO (ConnectId sb)
Called if a message is removed.
afterTextPopped :: StatusbarClass sb => sb -> (ContextId -> String -> IO ()) -> IO (ConnectId sb)
onTextPushed :: StatusbarClass sb => sb -> (ContextId -> String -> IO ()) -> IO (ConnectId sb)
Called if a message is pushed on top of the stack.
afterTextPushed :: StatusbarClass sb => sb -> (ContextId -> String -> IO ()) -> IO (ConnectId sb)
Produced by Haddock version 0.6