The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

iPodDB::Songlist - listing of songs in a playlist

SYNOPSIS

    my $songlist = iPodDB::Songlist->new( $frame );
    $songlist->populate( $playlist );

DESCRIPTION

This module provides a listing of the songs in an iPod playlist. 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.

PROPERTIES

songs

An list of Mac::iPod::DB::Song objects

METHODS

new( $frame )

This creates the list widget.

populate( @songs )

This will add the list of songs 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.