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

NAME

Fl::Widget - Base Class for All Widgets

Synopsis

    ...
    $widget->activate();

Description

You are not meant to create Fl::Widget objects directly, however you can subclass it.

All "property" accessing methods, such as color(), parent(), or argument() are implemented as trivial inline functions and thus are as fast and small as accessing fields in a structure. Unless otherwise noted, the property setting methods such as color(n) or label(s) are also trivial inline functions, even if they change the widget's appearance. It is up to the user code to call redraw() after these.

Methods

Fl::Widget exposes the following methods...

activate( )

    $widget->activate();

Activates the widget.

Changing this value will send FL_ACTIVATE to the widget if active_r() is true.

active( )

    my $in_focus = $widget->active();

Returns whether the widget is active.

active_r( )

Recursive version of active() that checks if the widget or any of its parents are active.

align( ... )

    my $pos = $widget->align( );

Gets the label alignment.

    $widget->align(FL_ALIGN_TOP);

Sets the label alignment.

This controls how the label is displayed next to or inside the widget. The default value is FL_ALIGN_CENTER, which centers the lable inside the widget.

See Fl::Enumerations for more values.

align( ... )