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::ComboBox,
Gtk2::Ex::ComboBox::PixbufType
Gtk2::ComboBox
Gtk2::Widget Gtk2::Container Gtk2::Bin Gtk2::ComboBox Gtk2::Ex::ComboBox::PixbufType
A PixbufType combobox displays file format types available for Gtk2::Gdk::Pixbuf.
PixbufType
Gtk2::Gdk::Pixbuf
+------+ | PNG | +------+ ...
The active-type property is the type displayed and updated with the user's selection, eg "png".
active-type
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).
Gtk2::Gdk::PixbufFormat
$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,
Glib::Object->new
my $ptypecombo = Gtk2::Ex::ComboBox::PixbufType->new (active_type => 'png');
undef
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 $pixbuf->save.
name
$pixbuf->save
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.
active
for-width
for-height
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-width and 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.
int
Gtk2::ComboBox, Gtk2::Ex::ComboBox::Enum
http://user42.tuxfamily.org/gtk2-ex-comboboxbits/index.html
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/.
To install Gtk2::Ex::ComboBoxBits, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gtk2::Ex::ComboBoxBits
CPAN shell
perl -MCPAN -e shell install Gtk2::Ex::ComboBoxBits
For more information on module installation, please visit the detailed CPAN module installation guide.