The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

AAC::Pvoice::Panel - The base where a pVoice application consists of

SYNOPSIS

  use AAC::Pvoice::Panel;

DESCRIPTION

USAGE

new(parent, id, size, position, style, disabletextrow)

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.

The last parameter, disabletextrow, is 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.

xsize

This returns the x-size of the panel in pixels.

ysize

This returns the y-size of the panel in pixels.

SelectColour

This returns the colour that indicates a selected row or selected item.

BackgroundColour(colour)

This sets the normal backgroundcolour. It takes a Wx::Colour (or a predefined colour constant) as a parameter.

AddTitle(title)

This method sets the title of the page and draws it on the AAC::Pvoice::Panel. It uses the Comic Sans MS font at a size of 18pt.

Append(row, unselectable)

This method adds a row (AAC::Pvoice::Row or any subclass of Wx::Window) to the panel. If this row shouldn't be selectable by the user, you should set unselectable to 1. Omitting this parameter, or setting it to 0 makes the row selectable.

Clear

This method clears the panel completely and destroys all objects on it.

Finalize

This method 'finalizes' the panel by creating the textinput row (if appliccable) and setting up the selection of the first row. You always need to call this method before being able to let the user interact with the pVoice panel.

Next

This method normally won't be called directly. It will highlight the 'next' row (when we're in 'rowselection') or the next item inside a row (when we're in 'columnselection')

Select

This method normally won't be called directly either. It will either 'select' the row that is highlighted and thus go into columnselection, or, when we're in columnselection, invoke the callback associated with that item and go into rowselection again.

ToRowSelection

This method will remove the highlighting of an item (if nessecary) and highlight the entire current row again and set rowselection back on.

DisplayAddText(text_

In pVoice-like applications there's a difference between 'displaytext' (which is the text that the user actually is writing and which should be displayed on the textrow) and the speech (phonetical) text (which is not displayed, but -if nessecary- differs from the text as we would write it, so a speechsynthesizer sounds better.

This method adds text to the displaytext. It is saved internally and displayed on the textrow

SpeechAddText(text)

This method add text to the speechtext. It is saved internally and not displayed on the textrow. See DisplayAddText for more information.

RetrieveText

This method returns the text that is added to the Displaytext since the last 'ClearText'.

SpeechRetrieveText

This method returns the text that is added to the Speechtext since the last 'ClearText'.

ClearText

This method clears both the displaytext and the speechtext. It also updates the textrow to show nothing.

BackspaceText

This method removes the last text added to the speech *and* displaytext. Make sure that both speechtext and displaytext have the same amount of text added, because it just pops off the last item from both lists and updates the textrow.

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