Gtk2::Ex::ComboBox::PixbufType -- combobox for Gdk Pixbuf file format types
use Gtk2::Ex::ComboBox::PixbufType; my $ptypecombo = Gtk2::Ex::ComboBox::PixbufType->new;
Gtk2::Ex::ComboBox::PixbufType is a subclass of
Gtk2::Widget Gtk2::Container Gtk2::Bin Gtk2::ComboBox Gtk2::Ex::ComboBox::PixbufType
PixbufType combobox displays file format types available for
+------+ | PNG | +------+ ...
active-type property is the type displayed and updated with the user's selection, eg "png".
Currently the types shown are the writable formats in alphabetical order. Writability is checked in
Gtk2::Gdk::PixbufFormat under new enough Perl-Gtk2 (some time post 1.223), or for older Perl-Gtk2 there's a hard-coded list of "png", "jpeg", "tiff", "ico" and "bmp" (less any not applicable under an older Gtk).
$ptypecombo = Gtk2::Ex::ComboBox::PixbufType->new (key=>value,...)
Create and return a new combobox object. Optional key/value pairs set initial properties as per
Glib::Object->new. For example,
my $ptypecombo = Gtk2::Ex::ComboBox::PixbufType->new (active_type => 'png');
The format type selected in the ComboBox. This is the user's combobox choice, or setting it programmatically changes that choice.
The value is a format type name string such as "png", as in the
name field of
Gtk2::Gdk::PixbufFormat and as taken by
There's no default for
active-type, just as there's no default for the ComboBox
active. When creating a PixbufType combobox a desired initial selection can be set. "png" or "jpeg" are always available.
for-width(integer 0 up, default 0)
for-height(integer 0 up, default 0)
Show only those file format types which support an image of this size. For example "ico" format only goes up to 255x255, so if
for-height are 300x150 then ico is not offered. The default size 0 means no size restriction.
These properties are
int type the same as Pixbuf width/height.
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 http://www.gnu.org/licenses/.