Gtk2-Ex-Xor
view release on metacpan or search on metacpan
devel/lasso-entry.pl view on Meta::CPAN
$button->signal_connect (clicked => sub { $lasso->swap_corners; });
$vbox->pack_start ($button, 0, 0, 0);
}
{
my $button = Gtk2::Button->new_with_label ('Redraw');
$button->signal_connect (clicked => sub { $entry->queue_draw; });
$vbox->pack_start ($button, 0, 0, 0);
}
{
my $combobox = Gtk2::ComboBox->new_text;
$vbox->pack_start ($combobox, 0,0,0);
$combobox->append_text ('invisible');
$combobox->append_text ('undef');
$combobox->append_text ('boat');
$combobox->append_text ('umbrella');
$combobox->append_text ('cross');
$combobox->set_active (0);
$combobox->signal_connect
(changed => sub {
my $type = $combobox->get_active_text;
if ($type eq 'undef') { $type = undef; }
$lasso->set (cursor => $type);
});
}
$vbox->pack_start (Gtk2::Label->new(<<'HERE'),0,0,0);
Drag button 1 for lasso
Press: S - start lasso.
E - end.
R - redraw Entry.
devel/lasso.pl view on Meta::CPAN
$button->signal_connect (clicked => sub {
Glib::Timeout->add (2000, # milliseconds
sub {
$toplevel->iconify;
return 0; # Glib::SOURCE_REMOVE
});
});
$vbox->pack_start ($button, 0, 0, 0);
}
{
my $combobox = Gtk2::ComboBox->new_text;
$vbox->pack_start ($combobox, 0,0,0);
$combobox->append_text ('hand1');
$combobox->append_text ('invisible');
$combobox->append_text ('undef');
$combobox->append_text ('boat');
$combobox->append_text ('umbrella');
$combobox->append_text ('cross');
$combobox->set_active (0);
$combobox->signal_connect
(changed => sub {
my $type = $combobox->get_active_text;
if ($type eq 'undef') { $type = undef; }
$lasso->set (cursor => $type);
});
$lasso->signal_connect ('notify::cursor' => sub {
my $cursor = $lasso->get ('cursor');
print "$progname: lasso cursor '$cursor'\n";
});
}
{
my $timer_id;
( run in 3.154 seconds using v1.01-cache-2.11-cpan-8dfa8b56332 )