Gtk2-Ex-ComboBoxBits
view release on metacpan or search on metacpan
lib/Gtk2/Ex/Menu/EnumRadio.pm view on Meta::CPAN
=item C<< $menu->set_active_nick($str) >>
Set the enum value selected, by its nick, or C<undef> to select nothing.
This is the C<active-nick> property.
In the current code if C<$str> is not a nick in the current C<enum-type>
then C<set_active_nick> (and the property setting) quietly set to nothing
selected. Perhaps this will change.
=back
=head1 PROPERTIES
=over 4
=item C<enum-type> (type name, default C<undef>)
The enum type to display and select from. Until this is set the Menu is
empty.
When changing C<enum-type> if the current selected C<active-nick> also
exists in the new type then it remains selected (possibly a different menu
item). If the C<active-nick> doesn't exist in the new type then the menu
changes to nothing selected.
This property is a C<Glib::Param::GType> when possible or
C<Glib::Param::String> otherwise. In both cases at the Perl level the value
is a type name string, but a GType will check the given type really is an
enum.
=item C<active-nick> (string or C<undef>, default C<undef>)
The nick of the selected enum value. The nick is the usual way an enum
value appears at the Perl level.
If there's no active row in the menu or no C<enum-type> has been set
then C<active-nick> is C<undef>.
There's no default for C<active-nick>, so when creating an Enum menu it's
usual to set the desired initial selection.
=back
=head1 BUGS
The C<enum-type> paramspec default is not the actual default C<undef> (in
particular when it's a C<GType> it's C<"Glib::Enum"> instead).
# this should be undef, usually isn't
$menu->find_property('enum-type')->get_default_value
=head1 SEE ALSO
L<Gtk2::Menu>,
L<Glib::Ex::EnumBits>,
L<Gtk2::Ex::ComboBox::Enum>
=head1 HOME PAGE
L<http://user42.tuxfamily.org/gtk2-ex-comboboxbits/index.html>
=head1 LICENSE
Copyright 2010, 2011 Kevin Ryde
Gtk2-Ex-ComboBoxBits 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-ComboBoxBits 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-ComboBoxBits. If not, see L<http://www.gnu.org/licenses/>.
=cut
# =head1 SIGNALS
#
# =over 4
#
# =item C<nick-to-display> (parameters: menu, nick -- return: string)
#
# Emitted to turn an enum nick into a text display string. The default is
# the C<to_display> of C<Glib::Ex::EnumBits>.
#
# =back
( run in 0.675 second using v1.01-cache-2.11-cpan-8dfa8b56332 )