How to implement custom interfaces in derived TreeModelSort ?
- From: Gaëtan Frenoy <gaetan frenoy net>
- To: gtk-perl-list gnome org
- Subject: How to implement custom interfaces in derived TreeModelSort ?
- Date: Fri, 29 May 2020 12:16:12 +0200
Hi,
What is the proper way to implement my own custom interface on top of
Gtk3::TreeModelSort ?
Inspired by what is described in Glib::Object::Subclass[1], I tried the
following:
---------------------------------------------------------------------------------------
package MyTreeModelSort;
use strict;
use Gtk3 -init;
use Glib::Object::Subclass
'Gtk3::TreeModelSort',
interfaces => [ 'Gtk3::TreeDragDest' ];
sub DRAG_DATA_RECEIVED {
my ($dest_path, $selection_data) = @_;
print("drag data received : $dest_path ; $selection_data ;\n");
return 1;
}
sub ROW_DROP_POSSIBLE {
my ($dest_path, $selection_data) = @_;
print("row drop possible : $dest_path ; $selection_data ;\n");
return 1;
}
---------------------------------------------------------------------------------------
But my custom methods are never called so there's something I do not do
right ; for sure. Any tip or suggestion will be warmly welcome.
Thanks for your help and collaboration :)
Gaëtan
[1] https://metacpan.org/pod/Glib::Object::Subclass
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]