Commits

Herbert Breunung  committed 271feb2

layout stands, simpified and all panel stubs i think i need

  • Participants
  • Parent commits 3091652

Comments (0)

Files changed (5)

File lib/Kephra/App/EditBar.pm

+use strict;
+use warnings;
+
+package Kephra::App::EditBarBar;
+
+
+1;

File lib/Kephra/App/Panel/IOUnit.pm

+use strict;
+use warnings;
+use Wx::RichText;
+
+package Kephra::App::Panel::IOUnit;
+#our @ISA = 'Wx::Panel';
+our @ISA = 'Wx::RichTextCtrl';
+
+sub new {
+    my( $class, $parent) = @_;
+    my $op = $class->SUPER::new($parent, -1);
+
+    return $op;
+}
+
+
+1;

File lib/Kephra/App/Panel/TextIO.pm

-use strict;
-use warnings;
-use Wx::RichText;
-
-package Kephra::App::Panel::TextIO;
-#our @ISA = 'Wx::Panel';
-our @ISA = 'Wx::RichTextCtrl';
-
-sub new {
-    my( $class, $parent) = @_;
-    my $op = $class->SUPER::new($parent, -1);
-
-    return $op;
-}
-
-
-1;

File lib/Kephra/App/StatusBar.pm

 use warnings;
 
 package Kephra::App::StatusBar;
+our @ISA = 'Wx::Panel';
+
+sub new {
+    my( $class, $parent) = @_;
+    my $op = $class->SUPER::new($parent, -1, [-1,-1],[-1, 30]);
+
+    return $op;
+}
 
 
 1;

File lib/Kephra/App/Window.pm

 use warnings;
 use Wx;
 use Kephra::App::Menu;
+use Kephra::App::ToolBar;
 use Kephra::App::TabBar;
+use Kephra::App::SearchBar;
+use Kephra::App::EditBar;
 use Kephra::App::StatusBar;
 use Kephra::App::Panel::FileBrowser;
 use Kephra::App::Panel::ProjectManager;
-use Kephra::App::Panel::TextIO;
+use Kephra::App::Panel::IOUnit;
 use Kephra::App::Panel::TreeLib;
+use Kephra::App::Panel::OrgPad;
 use Kephra::App::Panel::NotePad;
-use Kephra::App::Panel::OrgPad;
 
 package Kephra::App::Window;
 our @ISA = 'Wx::Frame';
 
     # some pabel and sizers 
     my (%panel, %sizer, %splitter);
-    $panel{'main'}    = Wx::Panel->new( $win );
-    $splitter{'left'}  = Wx::SplitterWindow->new( $panel{'main'}, -1 );
+    $splitter{'left'}  = Wx::SplitterWindow->new( $win,              -1 );
     $splitter{'right'} = Wx::SplitterWindow->new( $splitter{'left'}, -1 );
-    $splitter{'below'} = Wx::SplitterWindow->new( $splitter{'right'}, -1 );
-    $splitter{'edit'}  = Wx::SplitterWindow->new( $splitter{'below'}, -1 );
+    $splitter{'below'} = Wx::SplitterWindow->new( $splitter{'right'},-1 );
+    $splitter{'edit'}  = Wx::SplitterWindow->new( $splitter{'below'},-1 );
 
-    for my $name (qw /main left right edit below/) {
-        $panel{ $name } = Wx::Panel->new( $splitter{ $name } ) unless $name eq 'main';
+    for my $name (qw /left right edit below/) {
+        $panel{ $name } = Wx::Panel->new( $splitter{ $name } );
         $sizer{ $name } = Wx::BoxSizer->new( &Wx::wxHORIZONTAL );
         $sizer{ $name } = Wx::BoxSizer->new( &Wx::wxVERTICAL ) if $name eq 'below';
         $panel{ $name }->SetSizer( $sizer{ $name } );
     }
 
-    my $nbl = Kephra::App::TabBar->new( $panel{'edit'} );
-    $sizer{'edit'}->Add( $nbl, 1, &Wx::wxGROW );
-    my $fb = Kephra::App::Panel::FileBrowser->new( $panel{'left'} );
-    $sizer{'left'}->Add( $fb, 1, &Wx::wxGROW );
-    my $tl = Kephra::App::Panel::TreeLib->new( $panel{'right'} );
-    $sizer{'right'}->Add( $tl, 1, &Wx::wxGROW );
-    my $io = Kephra::App::Panel::TextIO->new( $panel{'below'} );
-    $sizer{'below'}->Add( $io, 1, &Wx::wxGROW );
+    my $tabbar = Kephra::App::TabBar->new( $panel{'edit'} );
+    $sizer{'edit'}->Add( $tabbar, 1, &Wx::wxGROW );
+    my $filebrowser = Kephra::App::Panel::FileBrowser->new( $panel{'left'} );
+    $sizer{'left'}->Add( $filebrowser, 1, &Wx::wxGROW );
+    my $treelib = Kephra::App::Panel::TreeLib->new( $panel{'right'} );
+    $sizer{'right'}->Add( $treelib, 1, &Wx::wxGROW );
+    my $iounit = Kephra::App::Panel::IOUnit->new( $panel{'below'} );
+    $sizer{'below'}->Add( $iounit, 1, &Wx::wxGROW );
+    my $statusbar = Kephra::App::StatusBar->new( $win );
 
     $splitter{'left'}->SplitVertically( $panel{'left'}, $splitter{'right'}, 200);
     $splitter{'left'}->SetSashGravity(0);
 
     #Wx::Event::EVT_SPLITTER_DCLICK( ,sub {});
     #&Wx::wxSP_NOBORDER  );
-
-    Wx::Event::EVT_MENU( $win, 1000, sub { $nbl->add_edit_page() } );
-
+    Wx::Event::EVT_MENU( $win, 1000, sub { $tabbar->add_edit_page() } );
     #Wx::Event::EVT_CLOSE($frame, sub{$frame->Close; $_[1]->Skip });
 
 
+    $sizer{'main'} = Wx::BoxSizer->new( &Wx::wxVERTICAL );
     $sizer{'main'}->Add( $splitter{'left'}, 1, &Wx::wxGROW);
-    $sizer{'win'} = Wx::BoxSizer->new( &Wx::wxHORIZONTAL );
-    $sizer{'win'}->Add( $panel{'main'}, 1, &Wx::wxGROW );
-    $win->SetSizer( $sizer{'win'});
+    $sizer{'main'}->Add( $statusbar,        0, &Wx::wxGROW);
+    $win->SetSizer( $sizer{'main'} );
     return $win;
 }