1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
/*
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <gtkmm/box.h>
_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 Statusbar : public HBox //Note: The C object derives from GtkBox.
{
_CLASS_GTKOBJECT(Statusbar,GtkStatusbar,GTK_STATUSBAR,Gtk::HBox,GtkHBox)
_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
|