NAME Astro::Montenbruck::Utils::Theme - console theme

SYNOPSIS

use Astro::Montenbruck::Utils::Theme;

my $theme = Astro::Montenbruck::Utils::Theme->create('dark');
$theme->print_data('Some Title', 'Some text');
say $theme->decorate( sprintf('%-8s', 'Moon'), $sheme->scheme->{table_row_title} );

DESCRIPTION

Base class for a console theme.

SUBROUTINES/METHODS

$self->print_data($title, $text, %options)

Prints title and some data in a row, colon-delimited, which is suitable for tabular data, e.g.:

Dawn   :  07:25:56

Options

  • title_width width of title column, default: 20.

  • highlited if true, the data column is displayed using $self->scheme->{data_row_selected} color. Otherwise, $scheme->{data_row_data} is used.

$self->decorate($text, $color)

In all the classes, except Astro::Montenbruck::Utils::Theme::Colorless, colorizes the $text using Ansi color symbols. $color argument is one of th constants, defined in the mentioned package.

AUTHOR

Sergey Krushinsky, <krushi at cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2009-2022 by Sergey Krushinsky

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