>The event box can then be added to the textview widget.
How, exactly?
We have Gtk2::TextBuffer->insert for inserting text, Gtk2::TextBuffer->insert_pixbuf for inserting pixbufs, but no equivalent method for inserting an event box (something like Gtk2::TextBuffer->insert_event_box ).
Perhaps you meant: put the pixbuf in an event box, ->insert_pixbuf as before, and monitor signals for the event box. Something like:
$pixbuf = Gtk2::Gdk::Pixbuf->new_from_file($path);
$image = Gtk2::Image->new_from_pixbuf($pixbuf);
$ebox = Gtk2::EventBox->new();
$ebox->add($image);
$ebox->add($image);
$buffer = $textView->get_buffer();
$buffer->insert_pixbuf(
$buffer->get_end_iter(),
$pixbuf,
);
$buffer->insert_pixbuf(
$buffer->get_end_iter(),
$pixbuf,
);
...
$ebox->signal_connect(motion_notify_event => sub {
# Some stuff here
});...but that doesn't seem to be the right approach, either.
_______________________________________________ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list