NAME

TUI::Gadgets::EventViewer - terminal window for displaying received events

HIERARCHY

TObject
  TView
    TGroup
      TWindow
        TEventViewer

SYNOPSIS

use TUI::Gadgets;

my $viewer = new_TEventViewer(
  $bounds,
  $bufSize
);

$deskTop->insert($viewer);

DESCRIPTION

TEventViewer implements a terminal-style window that displays the attributes of TEvent objects received by the application.

The window captures incoming events and renders them in textual form, allowing developers to observe and debug event flow during program execution. It is intended as a diagnostic gadget and is typically used during development or testing.

The implementation is inspired by the Turbo Vision C++ event viewer and by the TTYWindow concept.

CONSTRUCTOR

new

my $viewer = TEventViewer->new(
  bounds  => $bounds,
  bufSize => $bufSize
);

Creates a new event viewer window.

bounds

Bounding rectangle defining the position and size of the window (TRect).

bufSize

Size of the internal event buffer (Int).

new_TEventViewer

my $viewer = new_TEventViewer($bounds, $bufSize);

Factory-style constructor using positional arguments.

METHODS

handleEvent

$viewer->handleEvent($event);

Processes incoming events and records them for display.

print

$viewer->print($event);

Formats and appends the specified TEvent to the internal output buffer.

toggle

$viewer->toggle();

Enables or disables event recording.

shutDown

$viewer->shutDown();

Releases window resources and stops event recording.

SEE ALSO

TUI::Drivers::Event, TUI::Views::Window, TUI::Gadgets::HeapView

AUTHORS

  • Borland International (original Turbo Vision design)

  • J. Schneider <brickpool@cpan.org> (Perl implementation and maintenance)

CONTRIBUTORS

  • magiblot <magiblot@hotmail.com>

COPYRIGHT AND LICENSE

Copyright (c) 1990-1994, 1997 by Borland International

Copyright (c) 2019-2026 the "AUTHORS" and "CONTRIBUTORS" as listed above.

This software is licensed under the MIT license (see the LICENSE file, which is part of the distribution).