Commits

Herbert Breunung committed fe78f9b

started use Moo in Document

Comments (0)

Files changed (3)

lib/Kephra/App/Helper.pm

 }
 
 1;
+
+__END__
+
+    #my $normal_font = Wx::Font->new (
+        #12, 
+        #&Wx::wxFONTFAMILY_DEFAULT,
+        #&Wx::wxFONTSTYLE_NORMAL,
+        #&Wx::wxFONTWEIGHT_NORMAL,
+        #0,
+    #);
+    #my $highlight_font = Wx::Font->new (
+        #12, 
+        #&Wx::wxFONTFAMILY_TELETYPE,
+        #&Wx::wxFONTSTYLE_NORMAL,
+        #&Wx::wxFONTWEIGHT_BOLD,
+        #1,
+    #);

lib/Kephra/App/Panel/IOUnit.pm

 use strict;
 use warnings;
 use Wx::AUI;
+use Kephra::App::Helper;
 
 package Kephra::App::Panel::IOUnit;
 our @ISA = 'Wx::Panel';
 
 my ($input, $output, %outputtext);
-my @slot = qw/output perl shell drum log all/;
+my @slot = qw/drum log perl output shell all/;
 
 sub new {
     my( $class, $parent) = @_;
             $output, -1, '', [-1,-1], [-1,-1],
             &Wx::wxTE_MULTILINE | &Wx::wxTE_READONLY
         );
-        #$outputtext{ $slot }->SetDefaultStyle(
-        #    
-        #);
         $output->AddPage ( $outputtext{ $slot }, $slot, 0 );
 
-        #Wx::Event::EVT_TEXT_ENTER(id, func);
+        Wx::Event::EVT_TEXT_ENTER($outputtext{ $slot }, -1, sub {
+            
+        });
     }
 
+    Wx::Event::EVT_AUINOTEBOOK_BEGIN_DRAG  ( $output, -1, sub { });
+    Wx::Event::EVT_AUINOTEBOOK_END_DRAG    ( $output, -1, sub { });
+    Wx::Event::EVT_AUINOTEBOOK_PAGE_CHANGED( $output, -1, sub { });
+
+
     my $sizer = Wx::BoxSizer->new( &Wx::wxVERTICAL );
     $sizer->Add( $output, 1, &Wx::wxGROW);
     $sizer->Add( $input,  0, &Wx::wxGROW);

lib/Kephra/Document.pm

 use warnings;
 
 package Kephra::Document;
+use Moo;
 
+has edit_panel => (
+    is  => 'rw',
+    isa => sub {die "$_[0] is no editpanel" unless ref $_[0] eq 'Kephra::App::EditPanel'},
+);
+
+has syntax_mode => ( is  => 'rw', );
+has content   =>  ( is  => 'rw', );
+has readonly  =>  ( is  => 'rw', );
+has active_config => ( is  => 'rw', );
+has file_path =>  ( is  => 'rw', );
+has caret_pos => ( is  => 'rw', );
+has edit_pos => ( is  => 'rw', );
+has coding   => ( is  => 'rw', );
+has EOL      => ( is  => 'rw', );
+has tab_size => ( is  => 'rw', );
+has tab_use  => ( is  => 'rw', );
+has folded_lines  => ( is  => 'rw', );
+has marked_lines  => ( is  => 'rw', );
 
 1;