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). It may also have a resize
grip (a triangular area in the lower right corner) which can be clicked
on to resize the window containing the statusbar.
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
getContextID(String), given a message.
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
push(int,String).
The message at the top of the stack can be removed using
pop(int).
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
remove(int,int).
fireStatusBarEvent
protected void fireStatusBarEvent(StatusBarEvent event)
getContextID
public int getContextID(String description)
Returns a new context identifier, given a description of the actual
context.
description - textual description of what context the new message
is being used in.
StatusBar
getEventListenerClass
public Class getEventListenerClass(String signal)
- getEventListenerClass in interface Container
getEventType
public EventType getEventType(String signal)
- getEventType in interface Container
getHasResizeGrip
public boolean getHasResizeGrip()
Returns whether the statusbar has a resize grip.
- TRUE if the statusbar has a resize grip.
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
- getType in interface HBox
gtk_statusbar_get_context_id
protected static final int gtk_statusbar_get_context_id(Handle statusbar,
String contextDescription)
gtk_statusbar_get_has_resize_grip
protected static final boolean gtk_statusbar_get_has_resize_grip(Handle statusbar)
gtk_statusbar_get_type
protected static final int gtk_statusbar_get_type()
gtk_statusbar_new
protected static final Handle gtk_statusbar_new()
gtk_statusbar_pop
protected static final void gtk_statusbar_pop(Handle statusbar,
int contextId)
gtk_statusbar_push
protected static final int gtk_statusbar_push(Handle statusbar,
int contextId,
String text)
gtk_statusbar_remove
protected static final void gtk_statusbar_remove(Handle statusbar,
int contextId,
int messageId)
gtk_statusbar_set_has_resize_grip
protected static final void gtk_statusbar_set_has_resize_grip(Handle statusbar,
boolean setting)
pop
public void pop(int contextID)
Removes the message at the top of the statusbar's stack.
contextID - a context identifier.
push
public int push(int contextID,
String text)contextID - The message's context id, as returned bytext - The message to add to the statusbar.
- The message's new message id for use with
remove(int,int)
remove
public void remove(int contextID,
int messageID) Forces the removal of a message from a statusbar's stack.
The exact contextID and messageID must be specified.
contextID - A context identifier.messageID - A message identifier, as returned by push(int,String).
setHasResizeGrip
public void setHasResizeGrip(boolean setting)
Sets whether the statusbar has a resize grip. TRUE by default.
setting - TRUE to have a resize grip.