View on
MetaCPAN
Jouke Visser > AAC-Pvoice-0.91 > AAC::Pvoice::Row

Download:
AAC-Pvoice-0.91.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 1.05   Source  

NAME ^

AAC::Pvoice::Row - A row of selectable items

SYNOPSIS ^

  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

DESCRIPTION ^

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.

USAGE ^

This constructor is the only overridden function in AAC::Pvoice::Row. It takes quite a number of parameters

parent

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

maxitems

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.

items

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.

position

This parameter is passed on to the SUPER's constructor directly. See the documentation for Wx::Panel.

size

This parameter is passed on to the SUPER's constructor directly. See the documentation for Wx::Panel.

maxX

This is the maximum X size in pixels for an item (a Bitmap) in this row

maxY

This is the maximum Y size in pixels for an item (a Bitmap) in this row

spacing

This is the spacing between the items in pixels in this row

backgroundcolour

This is the backgroundcolour of the panel, defined as a Wx::Colour, or one of the constants defined by Wx (like wxWHITE)

BUGS ^

probably a lot, patches welcome!

AUTHOR ^

        Jouke Visser
        jouke@pvoice.org
        http://jouke.pvoice.org

COPYRIGHT ^

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.

SEE ALSO ^

perl(1), Wx

syntax highlighting: