Commits

Herbert Breunung  committed 198749f

first layout of the iounit

  • Participants
  • Parent commits 0a1d6ee

Comments (0)

Files changed (2)

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

 
 package Kephra::App::Panel::FileBrowser;
 our @ISA = 'Wx::ListCtrl';
-
 use Cwd;
 use File::Find;
 
     $fb->InsertColumn( 0, "File       " );
     $fb->SetItemCount( 200);
 
-    for my $nr ( 0 .. $#lib ) {
-        #my $item = Wx::ListItem->new();
-        #$item->SetText( $lib );
-        #$fb->InsertItem( $item );
-        $fb->InsertStringItem( $nr, $lib[ $nr ] );
+    for my $nr ( reverse 0 .. $#lib ) {
+        my $item = Wx::ListItem->new();
+        $item->SetText(  $lib[ $nr ] );
+        $fb->InsertItem( $item );
+        #$fb->InsertStringItem( $nr, $lib[ $nr ] );
     }
 
     Wx::Event::EVT_LIST_ITEM_ACTIVATED( $fb, -1, sub {
 sub get_modules {
     my $dir = shift;
     return 0 unless -d $dir;
-    #my $cwd = Cwd::cwd();  #chdir $dir; #my @mods = <*.pm>;
     my @libs;
     find( sub {
         return if not -f $_ or $_ !~ /\.pm$/;

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

 use Wx::RichText;
 
 package Kephra::App::Panel::IOUnit;
-#our @ISA = 'Wx::Panel';
-our @ISA = 'Wx::RichTextCtrl';
+our @ISA = 'Wx::Panel';
+
+my $input;
+my %output;
+# shell perl kephra
 
 sub new {
     my( $class, $parent) = @_;
     my $op = $class->SUPER::new($parent, -1);
+    
+    $input = Wx::RichTextCtrl->new($op, -1, '', [-1,-1], [-1, 29]);
+    $output{'all'}  = Wx::RichTextCtrl->new(
+        $op, -1, '', [-1,-1], [-1,-1], &Wx::wxRE_MULTILINE
+    );
+
+
+    my $sizer = Wx::BoxSizer->new( &Wx::wxVERTICAL );
+    $sizer->Add( $output{'all'}, 1, &Wx::wxGROW);
+    $sizer->Add( $input,         0, &Wx::wxGROW);
+    $op->SetSizer( $sizer );
 
     return $op;
 }