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

LibUI::Draw::Brush - TODO

SYNOPSIS

    TODO

DESCRIPTION

A LibUI::Button object represents a control that visually represents a button to be clicked by the user to trigger an action.

Functions

Not a lot here but... well, it's just a button.

new( ... )

    my $btn = LibUI::Button->new( 'Click me!' );

Creates a new button.

onClicked( ... )

    $btn->onClicked(
    sub {
        my ($ctrl, $data) = @_;
        ...;
    }, undef);

Registers a callback for when the button is clicked.

Expected parameters include:

$callback - CodeRef that should expect the following:
$btn - backreference to the instance that initiated the callback
$data - user data registered with the sender instance
$data - user data to be passed to the callback

setText( ... )

    $btn->setText( 'Scan' );

Sets the button label text.

text( )

    my $txt = $btn->text;

Sets the button label text.

Enumerations

Brush Type

This enum is defined as LibUI::Draw::BrushType.

Values include:

Solid
LinerGradient
RadialGradient
Image

LICENSE

Copyright (C) Sanko Robinson.

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

AUTHOR

Sanko Robinson <sanko@cpan.org>