Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Gtk::Statusbar Class Reference

A GtkStatusbar C++ wrapper class. More...

#include <xfc/gtk/statusbar.hh>

Inheritance diagram for Xfc::Gtk::Statusbar:

Xfc::Gtk::HBox Xfc::Gtk::Box Xfc::Gtk::Container Xfc::Gtk::Widget Xfc::Gtk::Object Xfc::Atk::Implementor Xfc::G::Object Xfc::G::TypeInterface Xfc::G::TypeInstance Xfc::G::TypeInstance Xfc::Trackable Xfc::Trackable List of all members.

Signal Prototypes

Public Member Functions

Constructors
Accessors
Methods
Signal Proxies

Protected Member Functions

Constructors

Detailed Description

A GtkStatusbar C++ wrapper class.

A Statusbar is usually placed along the bottom of an application's main Gtk::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.

Statusbars 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 context_id that is used to uniquely identify the source of a message. This context_id can be generated by get_context_id(), 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 push(). The message at the top of the stack can be removed using pop(). A message can be removed from anywhere in the stack if it's message_id was recorded at the time it was added. This is done using remove().

See also: the Statusbar HOWTO and example.


Constructor & Destructor Documentation

Xfc::Gtk::Statusbar::Statusbar GtkStatusbar *  statusbar,
bool  owns_reference = false
[explicit, protected]
 

Construct a new Statusbar from an existing GtkStatusbar.

Parameters:
statusbar A pointer to a GtkStatusbar.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The statusbar can be a newly created GtkStatusbar or an existing GtkStatusbar(see G::Object::Object).


Member Function Documentation

unsigned int Xfc::Gtk::Statusbar::get_context_id const String context_description  )  const
 

Returns a new context identifier, given a description of the actual context.

Parameters:
context_description A textual description of what context the new message is being used in.
Returns:
An integer id.

void Xfc::Gtk::Statusbar::pop unsigned int  context_id = 0  ) 
 

Removes the message at the top of the statusbar's stack.

Parameters:
context_id A context identifier.

unsigned int Xfc::Gtk::Statusbar::push const String text,
unsigned int  context_id = 0
 

Pushes a new message onto a statusbar's stack.

Parameters:
context_id The message's context id, as returned by get_context_id().
text The message to add to the statusbar.
Returns:
The message's new message id for use with remove().

void Xfc::Gtk::Statusbar::remove unsigned int  message_id,
unsigned int  context_id = 0
 

Forces the removal of a message from the statusbar's stack.

Parameters:
context_id A context identifier.
message_id A message identifier, as returned by push()
The exact context_id and message_id must be specified.

void Xfc::Gtk::Statusbar::set_has_resize_grip bool  setting  ) 
 

Sets whether the statusbar has a resize grip; true by default.

Parameters:
setting true to have a resize grip.


Member Data Documentation

const TextPoppedSignalType Xfc::Gtk::Statusbar::text_popped_signal [static, protected]
 

Text popped signal (see signal_text_popped()).

Calls a slot with the signature:

             void function(unsigned int context_id, const String& text);
             // context_id: The context id of the relevant message.
             // text: The message that was just popped.

const TextPushedSignalType Xfc::Gtk::Statusbar::text_pushed_signal [static, protected]
 

Text pushed signal (see signal_text_pushed()).

Calls a slot with the signature:

             void function(unsigned int context_id, const String& text);
             // context_id: The context id of the relevant message.
             // text: The message that was pushed.


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3