The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

IWL::Widget - the base widget object

INHERITANCE

IWL::Object -> IWL::Widget

DESCRIPTION

The Widget package provides basic methods that every widget inherits.

CONSTRUCTOR

IWL::Widget->new ([%ARGS])

Where %ARGS is an optional hash parameter with with key-value options.

IWL::Widget->newMultiple (ARGS, ARGS, ...)

Returns an array of multiple widgets, one for each ARGS.

Parameters: ARGS - a hash ref of arguments, or a integer, specifying how many widgets to create without any arguments

SIGNALS

click

Fires when the pointing device button is clicked over an element. A click is defined as a mousedown and mouseup over the same screen location. The sequence of these events is:

  - mousedown
  - mouseup
  - click
dblclick

Fires when the pointing device button is double clicked over an element

mousedown

Fires when the pointing device button is pressed over an element

mouseup

Fires when the pointing device button is released over an element

mouseover

Fires when the pointing device is moved onto an element. Note that it is also fired when the pointing device enters the element, after leaving a child element

mousemove

Fires when the pointing device is moved while it is over an element

mouseout

Fires when the pointing device is moved away from an element. Note that it is also fired when the mouse goes over a child of the element

mouseenter

Fires when the pointing device is moved onto an element. Unlike mouseover, this signal is not fired again if the pointing device enters a child of the element.

mouseleave

Fires when the pointing device is moved away from an element. Unlike mouseout, this signal is not fired again if the pointing device leaves a child of the element.

mousewheel

Fires when the pointing device's scroll wheel has been turned

keypress

Fires when a key on the keyboard is "clicked". A keypress is defined as a keydown and keyup on the same key. The sequence of these events is:

  - keydown
  - keyup
  - keypress
keydown

Fires when a key on the keyboard is pressed

keyup

Fires when a key on the keyboard is released

METHODS

signalConnect (SIGNAL, EXPR)

Registers a javascript expression to be evaluated on each emission of the SIGNAL from the widget.

Parameters: SIGNAL - the signal string, EXPR - the javascript expression to be invoked

Returns: returns false if the signal is invalid

signalDisconnect (SIGNAL, EXPR)

Disconnects the expression from the signal handler

Parameters: SIGNAL - the signal, EXPR - the javascript expression to be disconnected

signalDisconnectAll (SIGNAL)

Disconnects all of the expressions from the signal handler

Parameters: SIGNAL - the signal

setStyle (STYLE)

setStyle sets the given style attributes for the current widget.

Parameters: STYLE - the given style, in a hash format.

getStyle ([ATTR])

Returns the given value for the style attribute, or the whole hash if no style was specified.

Parameters: ATTR - the attribute style property to be returned

deleteStyle (ATTR)

Deletes the given style attribute

Parameters: ATTR - the style attribute name to be deleted

setId (ID)

setId sets the given id for the current widget. It overwrites any previous id set for the widget.

Parameters: ID - the given id

getId

Returns the id of the current widget

setClass (CLASS)

setClass sets the given class for the current widget. It overwrites any previous class set for the widget.

Parameters: CLASS - the given class

appendClass (CLASS)

Appends a class to the current list of classes for the widget

Parameters: CLASS - the given class

prependClass (CLASS)

Prepends a class to the current list of classes for the widget

Parameters: CLASS - the given class

hasClass (CLASS)

Returns true if the widget belongs to the given class

Parameters: CLASS - the class to be checked

removeClass (CLASS)

Removes the given class from the class list

Parameters: CLASS - the class to remove

getClass

Returns the class of the current widget

setName (NAME)

Sets the name of the current widget to the given name.

Parameters: NAME - the given name

getName

Gets the name of the current widget

setTitle (TITLE)

Sets the given title for the current widget. It overwrites any previous title set for the widget.

Parameters: TITLE - the given title

getTitle

Gets the title of the current widget.

LICENCE AND COPYRIGHT

Copyright (c) 2006-2007 Viktor Kojouharov. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perldoc perlartistic.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 583:

You forgot a '=back' before '=head1'