NAME

Tk::IDElayout::DropBox - IDElayout Helper class for Drag Drop Operations

DESCRIPTION

This is a simple Singleton class that implements a simple DropBox to help in drag-drop operations for the Tk::IDElayout and Tk::IDEtabFrame widgets. This dropbox is similar to a global hash for temporary storage of objects that are dragged, so that the drop location can pickup the dropped object perform any processing.

It only makes sense to have one instance of this object per process, so this class implements the Singleton design pattern to keep only one instance. Therefore, there is no new method, only an instance method used to gain access to the one instance of the class.

METHODS

_new

Internal method used to create the object.

instance

Access the single instance of this class

Usage:

my $dropbox = Tk::IDElayout::DropBox->instance;

set

Set a location in the dropbox to a value. This is similar to setting the value of a hash

Usage:

$DropBox->set($key, $value)

 where:
    $key: Location (i.e. key) in the dropbox to store
    $value: Data to store in the dropbox.
    

get

Get the data in a location in the dropbox. This is similar to getting the value of a hash

Usage:

my $value = $DropBox->get($key);

 where:
    $key: Location (i.e. key) in the dropbox to store
    $value: Data to retreived in the dropbox.
    

delete

Delete the data in a location in the dropbox. This is similar to deleting the value of a hash.

Usage:

my $value = $DropBox->delete($key);

 where:
    $key: Location (i.e. key) in the dropbox to store
    $value: Data deleted in the dropbox.