1. Herbert Breunung
  2. Kephra

Commits

Herbert Breunung  committed f628d73

adding fullscreen(f11) and closing app with alt+q

  • Participants
  • Parent commits b4fa086
  • Branches default

Comments (0)

Files changed (3)

File lib/Kephra/API.pm

View file
 	document_bar => sub { Kephra::App::Panel::Editor::_active_docbar() },
 );
 
+sub app { $Kephra::App::_ref }
 # gui parts of main window
 sub widget { # widget names are same as in the config
 	my $name = shift;

File lib/Kephra/App/Editor.pm

View file
 		elsif ($key ==  &Wx::WXK_PAGEDOWN+4000){Kephra::App::Panel::Editor::move_tab_right()}
 		elsif ($key ==  &Wx::WXK_PAGEDOWN+5000){Kephra::App::Panel::Editor::move_tab_rightmost()}
 		elsif ($key ==  &Wx::WXK_F2)           {Kephra::App::Panel::FileBrowser::focus() } 
+		elsif ($key ==  &Wx::WXK_F11)          {Kephra::API::widget('win')->toggle_fullscreen() } 
 		elsif ($key ==  &Wx::WXK_ESCAPE)       { } 
 		elsif ($key ==  ord('Q') + 2000)       {Kephra::File::close_active() }
+		elsif ($key ==  ord('Q') + 4000)       {Kephra::API::app()->close_save }
 		else {$event->Skip}
 		#print " $key- \n";
 	});

File lib/Kephra/App/Window.pm

View file
 	$self->set_title($title);
 }
 
+sub toggle_fullscreen {
+	my ($self) = @_;
+	$self->{fullscreen} ^= 1;
+	$self->ShowFullScreen ( 
+		$self->{fullscreen}, 
+		&Wx::wxFULLSCREEN_NOCAPTION | &Wx::wxFULLSCREEN_NOBORDER
+	);
+}
 
 1;