Gtk2::Ex::Statusbar::Message -- message displayed in a Statusbar
use Gtk2::Ex::Statusbar::Message; my $msg = Gtk2::Ex::Statusbar::Message->new (statusbar => $statusbar); $msg->set_message ('Hello World'); $msg->set_message (undef);
Gtk2::Ex::Statusbar::Message is a subclass of Glib::Object,
Gtk2::Ex::Statusbar::Message
Glib::Object
Glib::Object Gtk2::Ex::Statusbar::Message
This is an object-oriented approach to a message in a Gtk2::Statusbar.
Gtk2::Statusbar
Statusbar Message object +--------------------+ "hello" -----> | hello | +--------------------+
A Message object holds a string and a target statusbar widget which is where it should display. If the Message object is destroyed the string is removed from the statusbar.
The idea is that it can be easier to manage the lifespan of an object than to keep a $message_id from the statusbar and remember to pop or remove when a job object or similar ends or is destroyed.
$message_id
$msg = Gtk2::Ex::Statusbar::Message->new (key=>value, ...)
Create and return a new Message object. Optional key/value pairs set initial properties as per Glib::Object->new.
Glib::Object->new
my $msg = Gtk2::Ex::Statusbar::Message->new (statusbar => $statusbar, message => 'Hello World');
$msg->set_message($str)
Set the message string to display, as per the message property below.
message
statusbar
The Statusbar widget to display, or undef not to display anywhere.
The Message object only keeps a weak reference to this statusbar.
The message string to display, or undef not to add anything to the Statusbar.
undef
Currently an empty string is treated the same as undef, meaning it's not added to the Statusbar.
Gtk2::Ex::Statusbar::DynamicContext, Gtk2::Ex::Statusbar::MessageUntilKey
If the statusbar property changes to becomes undef due to the statusbar weakening away then a notify signal is not emitted for the property change.
notify
Changing the Message object string raises the message to the top of the statusbar stack. Sometimes this is good, but it might be better to keep the same position, if that could be done easily.
http://user42.tuxfamily.org/gtk2-ex-widgetbits/index.html
Copyright 2008, 2009, 2010, 2011, 2012 Kevin Ryde
Gtk2-Ex-WidgetBits is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
Gtk2-Ex-WidgetBits 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with Gtk2-Ex-WidgetBits. If not, see http://www.gnu.org/licenses/.
To install Gtk2::Ex::WidgetBits, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gtk2::Ex::WidgetBits
CPAN shell
perl -MCPAN -e shell install Gtk2::Ex::WidgetBits
For more information on module installation, please visit the detailed CPAN module installation guide.