Name

StatusBar —

GtkStatusbar -- report messages of minor importance to the user.

Synopsis

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)

Introduction

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.

Datatypes

type ContextId

ContextId(CUInt)

type MessageId

MessageId(CUInt)

Constructors

statusbarNew

Create a new Statusbar.

statusbarNew

Methods

statusbarGetContextId

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
sbdescription

statusbarGetHasResizeGrip

Query the displaying of the resize grip.

statusbarGetHasResizeGrip:: sb:: IO Bool
sb

statusbarPop

Pops the topmost message that has the correct context.

statusbarPop:: sb:: ContextId:: IO ()
sbcontext

statusbarPush

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
sbcontextmsg

statusbarRemove

Remove an entry within the stack.

statusbarRemove:: sb:: ContextId:: MessageId:: IO ()
sbcontextmessage

statusbarSetHasResizeGrip

Toggle the displaying of a resize grip.

statusbarSetHasResizeGrip:: sb:: Bool:: IO ()
sbset

Signals

onTextPopped

Called if a message is removed.

onTextPopped:: sb:: (ContextId -> String -> IO ()):: IO (ConnectId sb)

onTextPushed

Called if a message is pushed on top of the stack.

onTextPushed:: sb:: (ContextId -> String -> IO ()):: IO (ConnectId sb)