NAME
App::MathImage::Gtk2::Ex::ToolItem::EnumCombo -- toolitem with enum values in a combobox
SYNOPSIS
use App::MathImage::Gtk2::Ex::ToolItem::EnumCombo;
my $menu = App::MathImage::Gtk2::Ex::ToolItem::EnumCombo->new
(enum_type => 'Glib::UserDirectory',
active_nick => 'home'); # initial selection
WIDGET HIERARCHY
App::MathImage::Gtk2::Ex::ToolItem::EnumCombo
is a subclass of Gtk2::Menu
,
Gtk2::Widget
Gtk2::Container
Gtk2::MenuShell
Gtk2::Menu
App::MathImage::Gtk2::Ex::ToolItem::EnumCombo
DESCRIPTION
App::MathImage::Gtk2::Ex::ToolItem::EnumCombo
displays a combobox of Glib::Enum
values. The active-nick
property is the user's selection.
A toolbar overflow menu item is provided when necessary offering the same enum choices in a radio button sub-menu.
FUNCTIONS
-
Create and return a new
EnumCombo
toolitem widget. Optional key/value pairs set initial properties perGlib::Object->new
.my $menu = App::MathImage::Gtk2::Ex::ToolItem::EnumCombo->new (enum_type => 'Gtk2::TextDirection', active_nick => 'ltr');
PROPERTIES
enum-type
(type name, defaultundef
)-
The enum type to display and select from. Until this is set the child combobox is blank.
active-nick
(string orundef
, defaultundef
)-
The nick of the selected enum value. The nick is the usual way an enum value appears at the Perl level.
There's no default for
active-nick
, so when creating an Enum menu it's usual to set the desired initial selection, either by nick or perhaps justactive
row 0 for the first value.
SEE ALSO
Gtk2::ToolItem, Glib::Ex::ComboBox::Enum
HOME PAGE
http://user42.tuxfamily.org/math-image/index.html
LICENSE
Copyright 2010 Kevin Ryde
Math-Image 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.
Math-Image 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 Math-Image. If not, see http://www.gnu.org/licenses/.