App-Chart

 view release on metacpan or  search on metacpan

lib/App/Chart/Gtk2/Ex/ListStore/DragByCopy.pm  view on Meta::CPAN

# really should have a way to say what kinds of models are compatible
#     - same num columns
#     - same class, or subclass
# drop text to one column ...


# Copyright 2008, 2009, 2010 Kevin Ryde

# This file is part of Chart.
#
# Chart is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3, or (at your option) any later
# version.
#
# Chart is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

package App::Chart::Gtk2::Ex::ListStore::DragByCopy;
use 5.008;
use strict;
use warnings;

# uncomment this to run the ### lines
#use Smart::Comments;


#------------------------------------------------------------------------------
# drag source

# gtk_tree_drag_source_row_draggable ($self, $src_path)
sub ROW_DRAGGABLE {
  my ($self, $src_path) = @_;
  ### DragByCopy ROW_DRAGGABLE
  ### path: $src_path->to_string
  ### result per get_iter(): $self->get_iter($src_path)

  return $self->get_iter ($src_path);
}

# gtk_tree_drag_source_drag_data_get ($self, $src_path, $sel)
sub DRAG_DATA_GET {
  my ($self, $src_path, $sel) = @_;
  ### DragByCopy DRAG_DATA_GET
  ### src_path: $src_path->to_string
  ### sel type: $sel->type->name

  my $ret = $sel->set_row_drag_data ($self, $src_path);
  ### result: $ret
  return $ret;
}

# gtk_tree_drag_source_drag_data_delete ($self, $src_path)
sub DRAG_DATA_DELETE {
  my ($self, $src_path) = @_;
  ### DragByCopy DRAG_DATA_DELETE



( run in 0.457 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )