StatusBar —
GtkStatusbar -- report messages of minor importance to the user.
type
ContextId |
type
MessageId |
statusbarNew:: IO Statusbar |
statusbarGetContextId:: StatusbarClass sb => sb -> String -> IO ContextId |
statusbarGetHasResizeGrip:: StatusbarClass sb => sb -> IO Bool |
statusbarPop:: StatusbarClass sb => sb -> ContextId -> IO () |
statusbarPush:: StatusbarClass sb => sb -> ContextId -> String -> IO MessageId |
statusbarRemove:: StatusbarClass sb => sb -> ContextId -> MessageId -> IO () |
statusbarSetHasResizeGrip:: StatusbarClass sb => sb -> Bool -> IO () |
onTextPopped:: StatusbarClass sb => sb -> (ContextId -> String -> IO ()) -> IO (ConnectId sb) |
onTextPushed:: StatusbarClass sb => sb -> (ContextId -> String -> IO ()) -> IO (ConnectId sb) |
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.
Given a context description, this function returns a ContextId. This id can be used to later remove entries form the Statusbar.
| statusbarGetContextId | :: sb | :: String | :: IO ContextId |
| sb | description |
Query the displaying of the resize grip.
| statusbarGetHasResizeGrip | :: sb | :: IO Bool |
| sb |
Pops the topmost message that has the correct context.
| statusbarPop | :: sb | :: ContextId | :: IO () |
| sb | context |
Push a new message on the Statusbar stack. It will be displayed as long as it is on top of the stack.
| statusbarPush | :: sb | :: ContextId | :: String | :: IO MessageId |
| sb | context | msg |