Source

Kephra / lib / Kephra / App / Bar / Status.pm

use strict;
use warnings;
use Wx;
use Kephra::App::Util;

package Kephra::App::Bar::Status;
our @ISA = 'Wx::Panel';

my $color = Kephra::App::Util::get('create_color');

sub new {
	my( $class, $parent) = @_;
	my $self = $class->SUPER::new($parent, -1, [-1,-1],[-1, 30]);
	my $sizer = Wx::BoxSizer->new( &Wx::wxHORIZONTAL );
	my $grey = $color->('#aaaaaa');
	for my $type (qw(cursorpos mode tabs EOL info)){
		my $label = $self->{'label'}{$type} = Wx::TextCtrl->new($self, -1, $type);
		$label->SetEditable(0);
		$label->SetForegroundColour($grey);
		$sizer->Add( $label, 0, &Wx::wxLEFT | &Wx::wxTOP | &Wx::wxBOTTOM, 5 );
		#$sizer->SetSizeHints($label);
		Wx::Event::EVT_SET_FOCUS($label, sub { Kephra::App::Focus::stay() });
	}
	$self->SetSizer($sizer);
	return $self;
}


1;