Gtk2::Ex::TreeModelFilter::Draggable - draggable subclass of TreeModelFilter


Gtk2-Ex-TreeModelFilter-DragDest documentation  | view source Contained in the Gtk2-Ex-TreeModelFilter-DragDest distribution.

Index


NAME

Top

Gtk2::Ex::TreeModelFilter::Draggable -- draggable subclass of TreeModelFilter

SYNOPSIS

Top

 use Gtk2::Ex::TreeModelFilter::Draggable;
 my $filter = Gtk2::Ex::TreeModelFilter::Draggable->new ($child_model);

OBJECT HIERARCHY

Top

Gtk2::Ex::TreeModelFilter::Draggable is a subclass of Gtk2::TreeModelFilter

    Glib::Object
      Gtk2::TreeModelFilter
        Gtk2::Ex::TreeModelFilter::Draggable

and adds the interface

    Gtk2::TreeDragDest

DESCRIPTION

Top

Gtk2::Ex::TreeModelFilter::Draggable subclasses Gtk2::TreeModelFilter to add a Gtk2::TreeDragDest interface, making rows draggable when displayed for instance in a Gtk2::TreeView. Everything else in TreeModelFilter is unchanged. Basically to get a draggable filtered model use

    Gtk2::Ex::TreeModelFilter::Draggable->new

wherever you would have had Gtk2::TreeModelFilter->new. See Gtk2::Ex::TreeModelFilter::DragDest for the drop details, and for getting DragDest on some other subclass or sub-sub-class of TreeModelFilter.

FUNCTIONS

Top

Gtk2::Ex::TreeModelFilter::Draggable->new ($child_model)
Gtk2::Ex::TreeModelFilter::Draggable->new ($child_model, $virtual_root)

Create and return a new TreeModelFilter::Draggable. The parameters are like the core Gtk2::TreeModelFilter->new. $child_model is the underlying model to present (any object implementing Gtk2:TreeModel), and the optional $virtual_root is a Gtk2::TreePath which is a subtree of $child_model to present.

If you subclass further from TreeModelFilter::Draggable using Glib::Object::Subclass then note that module will fiddle with your @ISA to have Glib::Object::new() ahead of the new above. Often this is a good thing if you've got additional properties in your subclass you want to set from new; but you can unfiddle or elevate TreeModelFilter::Draggable if you want the new above (it knows to use the $class argument when run from a subclass, unlike the various C code class-specific new functions).

OTHER NOTES

Top

As of Gtk 2.12 the core Gtk2::TreeModelFilter is a TreeDragSource, but not a TreeDragDest. Perhaps by the time you read this that will have changed. TreeModelFilter::Draggable is setup to watch out for that and omit its own DragDest, on the assumption the core will be equal or better. You can decide whether this is prudently forward-looking, or naively optimistic.

SEE ALSO

Top

Gtk2::TreeModelFilter, Gtk2::Ex::TreeModelFilter::DragDest, Gtk2::TreeModel

HOME PAGE

Top

http://user42.tuxfamily.org/gtk2-ex-treemodelfilter-dragdest/

COPYRIGHT

Top


Gtk2-Ex-TreeModelFilter-DragDest documentation  | view source Contained in the Gtk2-Ex-TreeModelFilter-DragDest distribution.