Fl::Widget - Base Class for All Widgets




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.


Fl::Widget exposes the following methods...

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.


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