NAME
TUI::Gadgets::ClickTester - mouse click test gadget
HIERARCHY
TObject
TView
TStaticText
TClickTester
SYNOPSIS
use TUI::Objects::Rect;
use TUI::Gadgets::ClickTester;
my $bounds = TRect->new( 0, 0, 20, 3 );
my $view = TClickTester->new(
bounds => $bounds,
text => 'Double-click here',
);
$dialog->insert( $view );
DESCRIPTION
TClickTester is a small diagnostic view used for testing mouse support.
The view displays a text label and changes its visual state whenever it receives a double-click mouse event. It can be used to verify that mouse events are delivered correctly by the application and terminal backend.
CONSTRUCTOR
new
my $view = TClickTester->new(
bounds => $bounds,
text => 'Double-click here',
);
Creates a new click tester view.
- bounds
-
Bounding rectangle defining the position and size of the view (TRect).
- text
-
Text displayed by the view (Str).
new_TClickTester
my $view = new_TClickTester( $bounds, 'Double-click here' );
Factory-style constructor using positional arguments.
METHODS
draw
$view->draw();
Draws the view using a color that reflects the current click state.
handleEvent
$view->handleEvent($event);
Processes mouse events and toggles the visual state when a double-click is received.
SEE ALSO
AUTHORS
Borland International (original Turbo Vision design)
J. Schneider <brickpool@cpan.org> (Perl implementation and maintenance)
COPYRIGHT AND LICENSE
Copyright (c) 1990-1994, 1997 by Borland International
Copyright (c) 2026 the "AUTHORS" as listed above.
This software is licensed under the MIT license (see the LICENSE file, which is part of the distribution).