/* Copyright (C) 1998-2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see .
*/
#include
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/hvbox_p.h)
namespace Gtk
{
/** Text status indicator
* This widget is used to display status information.
* Messages are pushed and poped onto a message stack.
* When text is pushed it replaces the old contents.
* The old text is restored when popped.
*
* It derives from Gtk::HBox so that additional information can be added
* easily.
*
* The Statusbar widget looks like this:
* @image html statusbar1.png
*
* @ingroup Widgets
*/
class GTKMM_API Statusbar : public HBox //Note: The C object derives from GtkBox.
{
_CLASS_GTKOBJECT(Statusbar,GtkStatusbar,GTK_STATUSBAR,Gtk::HBox,GtkHBox,,,GTKMM_API)
_IGNORE(gtk_statusbar_push)
public:
_CTOR_DEFAULT
_WRAP_METHOD(guint get_context_id(const Glib::ustring& context_description), gtk_statusbar_get_context_id)
//TODO: Remove the default 0 context_id values in all these methods?
/** Pushes a new message onto a statusbar's stack.
* @param text The message to add to the statusbar.
* @param context_id The message's context id, as returned by get_context_id()
*/
guint push(const Glib::ustring& text, guint context_id = 0);
_WRAP_METHOD(void pop(guint context_id = 0), gtk_statusbar_pop)
/** Forces the removal of a message from a statusbar's stack.
* The exact context_id and message_id must be specified.
* @param message_id A message identifier, as returned by push().
* @param context_id A context identifier.
*/
void remove_message(guint message_id, guint context_id = 0);
_IGNORE(gtk_statusbar_remove)
_WRAP_METHOD(void remove_all_messages(guint context_id = 0), gtk_statusbar_remove_all)
//This actually returns a GtkFrame, though the documentation describes it as "box".
//I'm not generally happy about API that returns an unknown type. murrayc.
_WRAP_METHOD(Gtk::Widget* get_message_area(), gtk_statusbar_get_message_area)
_WRAP_METHOD(const Gtk::Widget* get_message_area() const, gtk_statusbar_get_message_area, constversion)
#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
_WRAP_SIGNAL(void text_pushed(guint context_id, const Glib::ustring& text), "text_pushed")
_WRAP_SIGNAL(void text_popped(guint context_id, const Glib::ustring& text), "text_popped")
};
} //namespace Gtk