NAME
App::MathImage::Gtk2::Ex::ToolItem::EnumCombo -- toolitem with enum values in a combobox
SYNOPSIS
use App::MathImage::Gtk2::Ex::ToolItem::EnumCombo;
my $toolitem = 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::ToolItem
. Gtk2::ToolItem
is new in Gtk 2.4.
Gtk2::Widget
Gtk2::Container
Gtk2::Bin
Gtk2::ToolItem
App::MathImage::Gtk2::Ex::ToolItem::EnumCombo
DESCRIPTION
App::MathImage::Gtk2::Ex::ToolItem::EnumCombo
puts a Gtk2::Ex::ComboBox::Enum
in a ToolItem. The active-nick
property is the user's selection.
A toolbar overflow menu item is provided offering the same enum choices in a Gtk2::Ex::Menu::EnumRadio
.
FUNCTIONS
$toolitem = App::MathImage::Gtk2::Ex::ToolItem::EnumCombo->new (key=>value,...)
-
Create and return a new
EnumCombo
toolitem widget. Optional key/value pairs set initial properties perGlib::Object->new
.my $toolitem = 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.
This property is a
Glib::Param::GType
when possible, or aGlib::Param::String
otherwise. In both cases at the Perl level the value is a type name string, but the GType will check a setting really is an enum. Currently in both cases the pspecget_default_value
does not give the actual defaultundef
. 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 a ToolItem::EnumCombo it's usual to set the desired initial selection.
SEE ALSO
Gtk2::ToolItem, Glib::Ex::ComboBox::Enum, Gtk2::Ex::Menu::EnumRadio
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/.