AAC::Pvoice::Row - A row of selectable items
use AAC::Pvoice::Row; use Wx; my $panel = Wx::Panel->new($self, -1); my $items = [ [Wx::NewId, $SomeWxBitmap, sub{ print "do something useful here"} ], [Wx::NewId, $SomeOtherWxBitmap, sub{ print "do something else here"} ]]; my $row = AAC::Pvoice::Row->new($panel, # parent scalar(@$items), # max $items, # items wxDefaultPosition,# pos wxDefaultSize, # size 50, # maxX 75, # maxY 5, # spacing wxWHITE) # background colour
AAC::Pvoice::Row is a subclass of Wx::Panel. It will typically be placed on an AAC::Pvoice::Panel, and contains selectable Wx::Bitmap-s, which, when selected, will invoke a callback.
This constructor is the only overridden function in AAC::Pvoice::Row. It takes quite a number of parameters
The parent on which this row will be placed. Typically you'll be using an instance of AAC::Pvoice::Panel for this, but it can be any Wx::Window subclass
The maximum number of items (images) in this row. If the supplied number of items (next parameter) is lower than maxitems, the row will be filled up with (unselectable) WxNullBitmap-s.
This parameter is a reference to a list of lists. Each item in the listref contains three items: a unique id, a Wx::Bitmap (or AAC::Pvoice::Bitmap for that matter), and a callback that will be invoked when the item is selected.
This parameter is passed on to the SUPER's constructor directly. See the documentation for Wx::Panel.
This is the maximum X size in pixels for an item (a Bitmap) in this row
This is the maximum Y size in pixels for an item (a Bitmap) in this row
This is the spacing between the items in pixels in this row
This is the backgroundcolour of the panel, defined as a Wx::Colour, or one of the constants defined by Wx (like wxWHITE)
probably a lot, patches welcome!
Jouke Visser jouke@pvoice.org http://jouke.pvoice.org
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl(1), Wx
1 POD Error
The following errors were encountered while parsing the POD:
Unknown directive: =head
To install AAC::Pvoice, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AAC::Pvoice
CPAN shell
perl -MCPAN -e shell install AAC::Pvoice
For more information on module installation, please visit the detailed CPAN module installation guide.