NAME

TUI::Gadgets::ClockView - view displaying the current time

HIERARCHY

TObject
  TView
    TClockView

SYNOPSIS

use TUI::Gadgets;

my $clock = new_TClockView(
  $bounds
);

DESCRIPTION

TClockView implements a view that displays the current system time.

The view periodically updates its display to reflect changes in the current time and renders a textual clock representation. It is intended as a small informational gadget and is typically embedded in status views or diagnostic layouts.

CONSTRUCTOR

new

my $view = TClockView->new(
  bounds => $bounds
);

Creates a new clock view.

bounds

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

new_TClockView

my $view = new_TClockView($bounds);

Factory-style constructor using positional arguments.

METHODS

draw

$view->draw();

Renders the current time.

update

$view->update();

Updates the internal time state and refreshes the display if the time has changed.

SEE ALSO

TUI::Views::View, TUI::Views::DrawBuffer

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