Gtk2
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
examples/offscreen_rotation.pl view on Meta::CPAN
my ($xb,$yb)=$matrix->transform_point($x+$w,$y);
my ($xc,$yc)=$matrix->transform_point($x, $y+$h);
my ($xd,$yd)=$matrix->transform_point($x+$w,$y+$h);
$x= min($xa,$xb,$xc,$xd);
$y= min($ya,$yb,$yc,$yd);
$w= max($xa,$xb,$xc,$xd) -$x;
$h= max($ya,$yb,$yc,$yd) -$y;
return Gtk2::Gdk::Rectangle->new($x,$y,$w,$h);
}
sub update_matrix {
my $self=shift;
my ($x,$y,$w,$h)= $self->allocation->values;
my $border= $self->get_border_width;
$x+=$border; $w-=2*$border;
$y+=$border; $h-=2*$border;
my $angle= $self->{angle}*PI/180;
my $matrix0=Cairo::Matrix->init_rotate($angle);
my ($xa,$ya)=$matrix0->transform_distance(0,0);
my ($xb,$yb)=$matrix0->transform_distance($w,0);
my ($xc,$yc)=$matrix0->transform_distance(0,$h);
gtk-demo/appwindow.pl view on Meta::CPAN
my $icon_set = Gtk2::IconSet->new_from_pixbuf ($transparent);
$factory->add ("demo-gtk-logo", $icon_set);
};
warn "failed to load GTK logo for toolbar"
if $@;
}
# $factory goes out of scope here, but GTK will hold a reference on it.
}
}
sub update_statusbar {
my ($buffer, $statusbar) = @_;
$statusbar->pop (0); # clear any previous message, underflow is allowed
my $count = $buffer->get_char_count;
my $iter = $buffer->get_iter_at_mark ($buffer->get_insert);
my $row = $iter->get_line;
my $col = $iter->get_line_offset;
t/GtkFileChooser.t view on Meta::CPAN
#
use Gtk2::TestHelper
at_least_version => [2, 4, 0, 'GtkFileChooser is new in 2.4'],
tests => 43,
skip_all => 'this test is unreliable',
;
use File::Spec;
use Cwd;
sub update {
Gtk2->main_iteration while Gtk2->events_pending;
}
my $file_chooser = Gtk2::FileChooserWidget->new ('save');
isa_ok ($file_chooser, 'Gtk2::FileChooser');
is ($file_chooser->get_action, 'save', 'mode option from construction');
# Filename manipulation
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.970 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )