Curses-UI-Grid
view release on metacpan or search on metacpan
lib/Curses/UI/Grid/Cell.pm view on Meta::CPAN
sub focus($;) {
my $this=shift;
# Let the parent focus this object.
my $parent = $this->parent;
$parent->focus($this) if defined $parent;
$this->draw(1);
return $this;
}
sub bg() {
my $this = shift;
my $bg=shift;
$this->{-bg_}=$bg if(defined $bg);
return $this->{-bg_} ? $this->{-bg_} : exists( $this->{-bg} ) && $this->{-bg} ? $this->{-bg} : $this->row->bg;
}
sub fg() {
my $this = shift;
my $fg=shift;
$this->{-fg_}=$fg if(defined $fg);
return $this->{-fg_} ? $this->{-fg_} : exists( $this->{-fg} ) && $this->{-bg} ? $this->{-fg} : $this->row->fg;
}
sub row() {
my ($this, $row) = @_;
$this->{-row} = $row
if defined $row;
lib/Curses/UI/Grid/Row.pm view on Meta::CPAN
foreach my $x (@{$grid->vertical_lines}) {
$this->canvasscr->move($this->y,$x);
$this->canvasscr->vline(ACS_VLINE,1);
}
$grid->color_off($pair, $this->canvasscr);
$this;
}
sub bg() {
my $this = shift;
my $bg= shift;
$this->{-bg_}=$bg if(defined $bg);
return $this->{-bg_} ? $this->{-bg_} : exists( $this->{-bg} ) ? $this->{-bg} : $this->parent()->{-bg};
}
sub fg() {
my $this = shift;
my $fg= shift;
$this->{-fg_}=$fg if(defined $fg);
return $this->{-fg_} ? $this->{-fg_} :exists( $this->{-fg} ) ? $this->{-fg} : $this->parent()->{-fg};
}
sub event_onfocus() {
my $this = shift;
my $p=$this->parent;
return $p->focus($this) unless($this->focusable);
( run in 1.752 second using v1.01-cache-2.11-cpan-5b529ec07f3 )