package Hexed::Fixed;

use strict;
use warnings;
use include;

use Cursed::Window;
our @ISA = ("Cursed::Window");

use Curses;

# Create and return a new fixed window... we don't have anything to set up yet.
sub spawn {
  my $self = shift;
}

# Print a nice title somewhere
sub title {
  my ($self, $y, $title) = @_;
  croak "title is too long!" if length($title) > $self->{Width};
  $self->{Win}->standend;
  $self->{Win}->attron(A_REVERSE);
  # Center the title.
  $self->{Win}->addstr($self->{Y1} + $y, $self->{X1} + center($title, $self->{Width}), $title);
  $self->draw;
}

42;
