NAME
iPodDB::Playlist - listing of songs in your database
SYNOPSIS
my $playlist = iPodDB::Playlist->new( $frame );
$playlist->load_songs( $database );
DESCRIPTION
This module provides a listing of the songs in the iPod database. It has a few events attached to it such as: sorting the column on click, and poping up the File menu when you right-click a row.
METHODS
new( $frame )
This creates the list widget and tries to automatically load the database attached to the parent frame.
load_songs( $database )
This will add the songs found in the database to the listing as well as update the status bar.
as_songobject( [ @items ] )
This function returns an array of Mac::iPod::DB::Song objects based on a list of items. If no list is provided the currently selected items are used.
as_filedataobject( [ @items ] )
Return a Wx::FileDataObject from a list of items suitable for sending to the clipboard or for processing in a drag and drop event. If no list is provided, the currently selected items are used.
cmp_songs( $column, $a, $b )
This is the sorting function.
song_to_path( $directory, $song )
This utility function takes a directory (Path::Class object) and then the a song object. It then translates the stored path to a path relative to the $directory. This method is available for export.
EVENTS
on_column_click( )
This event will sort the listing based on which column was clicked. It will flip between ascending order and descending order on every click.
on_row_right_click( )
This event will pop up the File menu as long as at least one song is selected.
on_select( )
This event enables or disables options on the File menu when items are selected or deselected.
on_drag()
This event allows a user to drag files to a destination.
AUTHOR
Brian Cassidy <bricas@cpan.org>
COPYRIGHT AND LICENSE
Copyright 2004 by Brian Cassidy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.