Commits

Herbert Breunung  committed 64e5412

jump focus between docbars

  • Participants
  • Parent commits 4934928
  • Branches sp2

Comments (0)

Files changed (3)

 ced              N    comfort editing, formating, converting, commenting for keyboard and mouse
 ted              N    tool lib extention, input & output extentions, more internal logging, notes
 fed              N    file sessions, closed file menu, file browser, project browser, project functions
-nedit            N    searchbar
-fed              N    selfmade find and replace, marker, bookmarks
+ned              N    text navigartion, selfmade find and replace, 
+                      marker, bookmarks, searchbar, text factory panel
 acme             N    advanced mouse controls
 vim              N    vim like command line
 orgpad           N    minimal effective emacs orgmode clone

File lib/ded/Kephra/App/DocBar.pm

 use Kephra::App::Editor;
 
 my $max_title_width = 22;
-
+#right  AdvanceSelection 1
+#left   AdvanceSelection 0
 sub new {
 	my( $class, $parent) = @_;
 	my $self = $class->SUPER::new( $parent, -1, [-1,-1], [-1,-1],

File lib/ded/Kephra/App/Part/Main.pm

 our @ISA = 'Kephra::App::Panel';
 
 use Scalar::Util qw(looks_like_number);
-use Kephra::API qw(:log focus focus_back);
+use Kephra::API qw(:log focus focus_back editor);
 use Kephra::App::DocBar;
 use Kephra::App::Panel;
 use Kephra::App::Splitter;
 }
 sub unsplit {
 	my ($self) = @_;
-	if ($self->{'number'} > 1){
-		Kephra::DocumentStash::remove_doc_bar( $self->{'doc_bar'}[ $self->{'number'}-1 ] );
-		$self->{'number'}--
+
+	if ($self->{'number'} == 2){
+		$self->{'splitter'}[0]->unsplit();
+		$self->{'doc_bar'}[ 0 ]->Update;
+		#$self->{'splitter'}[0]->set({'left' => $self->{'doc_bar'}[0]});
+		#$self->{'splitter'}[0]->unsplit() if $self->{'splitter'}[0]->is_split();
+		#
+	} elsif ($self->{'number'} == 3){
+	} elsif ($self->{'number'} == 4){
 	}
 
-	if ($self->{'number'} == 1){
-		$self->{'splitter'}[0]->unsplit();
-		#$self->{'splitter'}[0]->set({'left' => $self->{'doc_bar'}[0]});
-		#$self->{'doc_bar'}[ $self->{'number'} ]->Destroy;
-	} elsif ($self->{'number'} == 2){
-	} elsif ($self->{'number'} == 3){
+	if ($self->{'number'} > 1){
+		$self->{'number'}--;
+		Kephra::DocumentStash::remove_doc_bar( $self->{'doc_bar'}[ $self->{'number'} ] );
+		$self->{'doc_bar'}[ $self->{'number'} ]->Destroy;
 	}
 
-	#$self->{'splitter'}[0]->unsplit() if $self->{'splitter'}[0]->is_split();
 	focus_back();
 }
 
 sub switch_focus {
 	my ($self) = @_;
 	$self->{'active'} = $self->{'active'} == 0 ? 1 : 0;
+	my $bar = $self->active_doc_bar();
+	Kephra::DocumentStash::set_active_doc_by_panel( $bar->GetPage( $bar->GetSelection() ) );
+	focus( editor() );
 	#$self->active_doc_bar()->raise_page();
 }