IWL::DND - a Perl interface to Javascript Drag & Drop
The DND helper class is an abstract class, inherited by IWL::Widget, which provides configuration for Drag & Drop functionality.
In JavaScript, the following signals are prefixed. Example: 'iwl:SIGNAL_NAME'
The following signals are emitted by the drag source
Fires when a draggable widget begins its movement. Receives the draggable object as a second parameter
Fires during the motion of a draggable widget. Receives the draggable object as a second parameter
Fires when a draggable widget ends its movement. Receives the draggable object as a second parameter
The following signals are emitted by the drag destination
Fires when an acceptable draggable widget is hovering over a draggable destination. Receives the draggable widget and droppable widget as second and third parameter
Fires when an acceptable draggable widget is dropped over a draggable destination. Receives the draggable widget and droppable widget as second and third parameter
Registers an IWL::Widget as a drag source.
Parameters: OPTIONS - a hash reference of options:
If true, an outline of the widget will be moved, instead of the widget itself
If a helper widget it given, it will be moved on drag, instead of the actual widget
If true, the actual widget will be returned to its original position, when dropped
An IWL::Widget or an ID of a widget, which is a descendant of the draggable widget. The widget will move, only if the handle is dragged
A 2-element array of integers, specifying the amount, in pixels, for snapping
An integer, defining the CSS z-index of the widget during a drag.
If set to either horizontal or vertical, it will constraint the drag in only that direction
If true, a copy of the object will be dragged, while the original object stays in place
Unsets the IWL::Widget as a drag source
Registers the IWL::Widget as a drag destination (drop)
A CSS class, or an array of such classes, which belong to elements, that will be accepted by the destination
If set to an IWL::Widget, or an ID, the destination will only accept the target, if the target is either the containment widget, or a child of that widget.
If specificed, the CSS class will be added to the destination, while an accepted target is on dragged on it
Unsets the IWL::Widget as a drag destination
Associates the given data to the draggable source.
Parameters: DATA - a string, or hash/array reference
Copyright (c) 2006-2008 Viktor Kojouharov. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perldoc perlartistic.
This program 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.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install IWL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IWL
CPAN shell
perl -MCPAN -e shell install IWL
For more information on module installation, please visit the detailed CPAN module installation guide.