1. Herbert Breunung
  2. Kephra

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 );
	$self->{label} = my %label;
	#my $tyle = Wx::TextAttr->new( $color->('#bbbbbb'), $color->('#bbbbbb') );
	my $grey = $color->('#aaaaaa');
	for my $type (qw(cursorpos mode tabs EOL info)){
		$label{$type} = Wx::TextCtrl->new($self, -1, '');
		$label{$type}->SetEditable(0);
		$label{$type}->SetForegroundColour($grey);
		#$label{$type}->SetDefaultStyle($tyle);
		$label{$type}->AppendText($type);
		$sizer->Add( $label{$type}, 0, &Wx::wxGROW | &Wx::wxLEFT | &Wx::wxTOP | &Wx::wxBOTTOM, 5 );
		Wx::Event::EVT_SET_FOCUS($label{$type}, sub { $_[0]->SelectItem( $_[0]->GetSelection, 1) });
	}
	#$text{$_} = Wx::StaticText->new($self, -1, '') for @label;
	#$text{$_}->SetLabel('<span foreground="blue">'."$_</span>") for @label;
	$self->SetSizer($sizer);
	return $self;
}


1;