27 Oct 2012 00:35:57 UTC
- Distribution: Gtk2-Ex-WidgetBits
- Module version: 48
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (2330 / 50 / 0)
- KwaliteeBus factor: 1
- 42.85% Coverage
- License: open_source
- Perl: v5.8.0
- Activity24 month
- Download (136.17KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionKRYDE Kevin Rydeand 1 contributors
- Kevin Ryde
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::Messageis a subclass of
This is an object-oriented approach to a message in a
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_idfrom the statusbar and remember to pop or remove when a job object or similar ends or is destroyed.
$msg = Gtk2::Ex::Statusbar::Message->new (key=>value, ...)
Create and return a new Message object. Optional key/value pairs set initial properties as per
my $msg = Gtk2::Ex::Statusbar::Message->new (statusbar => $statusbar, message => 'Hello World');
Set the message string to display, as per the
The Statusbar widget to display, or undef not to display anywhere.
The Message object only keeps a weak reference to this statusbar.
message(string or undef)
The message string to display, or
undefnot to add anything to the Statusbar.
Currently an empty string is treated the same as
undef, meaning it's not added to the Statusbar.
statusbarproperty changes to becomes
undefdue to the statusbar weakening away then a
notifysignal is not emitted for the property change.
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.
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/.
Module Install Instructions
To install Gtk2::Ex::WidgetBits, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Gtk2::Ex::WidgetBits
For more information on module installation, please visit the detailed CPAN module installation guide.