AAC-Pvoice
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/AAC/Pvoice/Panel.pm view on Meta::CPAN
{
my $self = shift;
$self->{displaytextsave}=[];
$self->{speechtextsave}=[];
$self->{text}->SetValue('');
$self->{text}->Refresh(); # Added to test it on the Mercury...added text
# isn't visible there...
}
sub BackspaceText
{
my $self = shift;
pop @{$self->{displaytextsave}};
pop @{$self->{speechtextsave}};
$self->{text}->SetValue(my $x = $self->RetrieveText);
$self->{text}->SetStyle(0, length($self->{text}->GetValue), $self->{ta});
$self->{text}->Refresh(); # Added to test it on the Mercury...added text
# isn't visible there...
}
sub SpeechRetrieveText
{
my $self = shift;
return wantarray ? @{$self->{speechtextsave}} : join('', @{$self->{speechtextsave}});
}
1;
__END__
=pod
=head1 NAME
AAC::Pvoice::Panel - The base where a pVoice application consists of
=head1 SYNOPSIS
use AAC::Pvoice::Panel;
=head1 DESCRIPTION
=head1 USAGE
=head2 new(parent, id, size, position, style, disabletextrow, itemspacing, selectionborderwidth, disabletitle)
This is the constructor for a new AAC::Pvoice::Panel. The first 5 parameters are
equal to the parameters for a normal Wx::Panel, see the wxPerl documentation
for those parameters.
=over 4
=item disabletextrow
This is s a boolean (1 or 0), which determines
if the text-input field at the bottom of the screen should be hidden or
not. Normally this inputfield will be shown (for an application like pVoice
this is normal, because that will contain the text the user is writing),
but for an application like pMusic this row is not nessecary, so it can be
disabled.
=item itemspacing
This is the spacing used between the rows that are appended.
=item selectionborderwidth
This is the width of the border around a selected row or a selected item.
=item disabletitle
This is also a boolean (1 or 0), which determines if the panel should
reserve space for a title. If disabletitle is set to 1, AddTitle won't have
any effect at all.
=back
=head2 SetEditmode($onoff)
This sets Editmode on or off (depending on $onoff to be a true or false value).
Editmode means that the typical pVoice input doesn't work anymore, and is
typically used in combination with AAC::Pvoice::EditableRow...
=head2 xsize
This returns the x-size of the panel in pixels.
=head2 ysize
This returns the y-size of the panel in pixels.
=head2 RoundCornerRadius
This sets the radius for the round corners that are used to draw the panel
background and to draw the selectionborder around rows and buttons.
=head2 lastrow
This retrieves the index of the last row that was added to the panel.
=head2 SelectColour(Wx::Colour)
This gets or sets the colour that indicates a selected row or selected item. It
takes a Wx::Colour (or a predefined colour constant) as a parameter.
=head2 BackgroundColour(Wx::Colour)
This gets or sets the normal backgroundcolour. It
takes a Wx::Colour (or a predefined colour constant) as a parameter.
=head2 AddTitle(title)
This method sets the title of the page and draws it on the AAC::Pvoice::Panel.
By default it uses the Comic Sans MS font at a size of 18pt. You can change
this using TitleFont.
=head2 TitleFont(Wx::Font)
view all matches for this distributionview release on metacpan - search on metacpan
( run in 5.857 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-f5108d614456 )