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

Download:
AAC-Pvoice-0.91.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 1.15   Source  

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, 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.

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.

itemspacing

This is the spacing used between the rows that are appended.

selectionborderwidth

This is the width of the border around a selected row or a selected 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.

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...

xsize

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

ysize

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

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.

lastrow

This retrieves the index of the last row that was added to the panel.

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.

BackgroundColour(Wx::Colour)

This gets or 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. By default it uses the Comic Sans MS font at a size of 18pt. You can change this using TitleFont.

TitleFont(Wx::Font)

This method gets or sets the Wx::Font used to write the Title.

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'. In scalar context it returns it as one string, in listcontext it returns the array of text as it was added.

SpeechRetrieveText

This method returns the text that is added to the Speechtext since the last 'ClearText'. In scalar context it returns it as one string, in listcontext it returns the array of text as it was added.

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.

PauseInput($bool)

This method makes sure that the timers that are used for the input (using AAC::Pvoice::Input) are paused if $bool is set to 1. If $bool is 0, they're restarted.

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: