Herbert Breunung avatar Herbert Breunung committed aeb1437

no panel under editor

Comments (0)

Files changed (3)

     qw/File::Find File::Spec File::UserConfig Config::General YAML/,
     qw/PPI Moo/,
     qw/Wx Wx::Scintilla Wx::Perl::ProcessStream/,
-    
 );
 our @used_wx_modules = qw/Wx::AUI Wx::DND Wx::RichText/; # Wx::STC
 

lib/Kephra/App/Bar/Document.pm

     $pos = $tb->GetPageCount unless defined $pos;
     $active = 1              unless defined $active;
 
-    my $panel = Wx::Panel->new( $tb );
-    my $ed = Kephra::App::Editor->new($panel);
+    #my $panel = Wx::Panel->new( $tb );
+    my $ed = Kephra::App::Editor->new($tb);
     my $doc = Kephra::Document->new(editor => $ed);
     Kephra::DocumentStash::add( $doc );
 
 
     #  sane frame for the editor widget to fit into surrounding structure
-    my $sizer = Wx::BoxSizer->new( &Wx::wxVERTICAL );
-    $sizer->Add( $ed, 1, &Wx::wxGROW );
-    $panel->SetSizer( $sizer );
+    #my $sizer = Wx::BoxSizer->new( &Wx::wxVERTICAL );
+    #$sizer->Add( $ed, 1, &Wx::wxGROW );
+    #$panel->SetSizer( $sizer );
 
-    $tb->InsertPage( $pos, $panel, '<untitled>', $active );
+    $tb->InsertPage( $pos, $ed, '<untitled>', $active );
     $ed->set_focus() if $active;
 
     return $tb;

lib/Kephra/Document.pm

 has editor => (
     is  => 'ro',
     isa => sub {die "$_[0] is no editor" unless ref $_[0] eq 'Kephra::App::Editor'},
-    required => 1,
+    #default => sub { },
+    required => 1
 );
-has content      => ( is  => 'rw', );
+has content      => ( is  => 'rw' );
 has notes        => ( is  => 'rw', );
 has file_path    => ( is  => 'rw', );
 
-has syntax_mode  => ( is  => 'rw', );
+has syntax_mode  => ( is  => 'rw', default => sub { 'perl' } );
 has readonly     => ( is  => 'rw', );
 has active_config=> ( is  => 'rw', );
 has caret_pos    => ( is  => 'rw', );
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.