Source

Kephra / lib / paintbar.pl

Full commit
use strict;
use warnings;

package Kephra::App::Window;
use Wx;
use Wx::AUI;
use Wx::STC;
use Kephra::API;
use Kephra::App::Editor;
use Kephra::File;
use base qw(Wx::App);

sub OnInit {
	my $app   = shift;
	$Kephra::Log::test_mode = 1; 
	my $win = Wx::Frame->new( undef, -1, 'Pixelbar Demo',[-1, -1],[600, 600]);


	my $ed  = Kephra::App::Editor->new($win)->unmount_events();
	my $left = Bar->new($win);
	my $right = Bar->new($win);

	Kephra::App::Focus::set($ed);

	my $sizer = Wx::BoxSizer->new( &Wx::wxHORIZONTAL );
	#my $sizer = Wx::BoxSizer->new( &Wx::wxVERTICAL );
	$sizer->Add($left,  0, &Wx::wxGROW);
	$sizer->Add($ed,    1, &Wx::wxGROW);
	$sizer->Add($right, 0, &Wx::wxGROW);
	$win->SetSizer($sizer);


	$win->Center();
	$win->Show(1);
	$app->SetTopWindow($win);
	1;
}

package Bar;
our @ISA = 'Wx::Panel';

sub new {
	my $class = shift;
	my $parent = shift;
	my $self = $class->SUPER::new( $parent, -1, [-1,-1], [30, -1]);
	$self;
}

package main;
Kephra::App::Window->new->MainLoop;