Herbert Breunung avatar Herbert Breunung committed 16fe055

stubs for next functions

Comments (0)

Files changed (2)

lib/Kephra/App/Editor.pm

 		my ($ed, $event) = @_;
 		my $key = Kephra::App::Util::keycode_from_event($event);
 		Kephra::API::log("pressed key $key");
-		if    ($key ==  &Wx::WXK_LEFT   + 4000){$self->dedent_level() }
-		elsif ($key ==  &Wx::WXK_LEFT   + 5000){$self->move_sel_or_word_left() }
-		elsif ($key ==  &Wx::WXK_RIGHT  + 4000){$self->indent_level() }
-		elsif ($key ==  &Wx::WXK_RIGHT  + 5000){$self->move_sel_or_word_right() }
-		elsif ($key ==  &Wx::WXK_UP     + 2000){$self->ParaUp() }
-		elsif ($key ==  &Wx::WXK_UP     + 3000){$self->ParaUpExtend() }
-		elsif ($key ==  &Wx::WXK_UP     + 4000){$self->move_sel_or_line_up() }
-		elsif ($key ==  &Wx::WXK_DOWN   + 2000){$self->ParaDown() }
-		elsif ($key ==  &Wx::WXK_DOWN   + 3000){$self->ParaDownExtend() }
-		elsif ($key ==  &Wx::WXK_DOWN   + 4000){$self->move_sel_or_line_down() }
-		elsif ($key ==  &Wx::WXK_PAGEUP + 2000){Kephra::App::Panel::Editor::select_tab_left()}
-		elsif ($key ==  &Wx::WXK_PAGEUP + 3000){Kephra::App::Panel::Editor::select_tab_leftmost()  }
-		elsif ($key ==  &Wx::WXK_PAGEUP + 4000){Kephra::App::Panel::Editor::move_tab_left()  }
-		elsif ($key ==  &Wx::WXK_PAGEUP + 5000){Kephra::App::Panel::Editor::move_tab_leftmost()  }
-		elsif ($key ==  &Wx::WXK_PAGEDOWN+2000){Kephra::App::Panel::Editor::select_tab_right()}
-		elsif ($key ==  &Wx::WXK_PAGEDOWN+3000){Kephra::App::Panel::Editor::select_tab_rightmost()}
-		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_HOME   + 4000){ }
-		elsif ($key ==  &Wx::WXK_END    + 4000){ }
-		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)       {Kephra::App::Panel::IOUnit::focus_on_input() } 
-		elsif ($key ==  &Wx::WXK_TAB    + 2000){ } # rotate focus
-		elsif ($key ==      ord('#')    + 2000){$self->next_comment() }
-		elsif ($key ==      ord('#')    + 3000){$self->prev_comment() }
-		elsif ($key ==      ord('#')    + 4000){$self->toggle_comment() }
-		#elsif ($key ==      ord('#')    + 5000){$self->decomment() }
-		elsif ($key ==      ord('G')    + 3000){$self->goto_last_edit() } # last selection?
-		elsif ($key ==      ord('G')    + 5000){ }
-		elsif ($key ==      ord('Q')    + 2000){Kephra::File::close_active() }
-		elsif ($key ==      ord('Q')    + 4000){Kephra::API::app()->close_save }
-		elsif ($key ==      ord('Y')    + 2000){$self->select_form() }
-		elsif ($key ==      ord('Y')    + 3000){$self->select_content() }
-		elsif ($key ==      ord('Z')    + 3000){$self->redo() }
+		if    ($key ==  &Wx::WXK_LEFT     + 4000){$self->dedent_level() }
+		elsif ($key ==  &Wx::WXK_LEFT     + 5000){$self->move_sel_or_word_left() }
+		elsif ($key ==  &Wx::WXK_RIGHT    + 4000){$self->indent_level() }
+		elsif ($key ==  &Wx::WXK_RIGHT    + 5000){$self->move_sel_or_word_right() }
+		elsif ($key ==  &Wx::WXK_UP       + 2000){$self->ParaUp() }
+		elsif ($key ==  &Wx::WXK_UP       + 3000){$self->ParaUpExtend() }
+		elsif ($key ==  &Wx::WXK_UP       + 4000){$self->move_sel_or_line_up() }
+		elsif ($key ==  &Wx::WXK_DOWN     + 2000){$self->ParaDown() }
+		elsif ($key ==  &Wx::WXK_DOWN     + 3000){$self->ParaDownExtend() }
+		elsif ($key ==  &Wx::WXK_DOWN     + 4000){$self->move_sel_or_line_down() }
+		#elsif ($key ==  &Wx::WXK_NUMPAD_LEFT+2000){$self->()} # brace nav
+		elsif ($key ==  &Wx::WXK_PAGEUP   + 2000){Kephra::App::Panel::Editor::select_tab_left()}
+		elsif ($key ==  &Wx::WXK_PAGEUP   + 3000){Kephra::App::Panel::Editor::select_tab_leftmost()  }
+		elsif ($key ==  &Wx::WXK_PAGEUP   + 4000){Kephra::App::Panel::Editor::move_tab_left()  }
+		elsif ($key ==  &Wx::WXK_PAGEUP   + 5000){Kephra::App::Panel::Editor::move_tab_leftmost()  }
+		elsif ($key ==  &Wx::WXK_PAGEDOWN + 2000){Kephra::App::Panel::Editor::select_tab_right()}
+		elsif ($key ==  &Wx::WXK_PAGEDOWN + 3000){Kephra::App::Panel::Editor::select_tab_rightmost()}
+		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_HOME     + 4000){ }
+		elsif ($key ==  &Wx::WXK_END      + 4000){ }
+		elsif ($key ==  &Wx::WXK_F2)             {Kephra::App::Panel::FileBrowser::focus() } 
+		#elsif ($key ==  &Wx::WXK_F3)            {$self->find_next} 
+		#elsif ($key ==  &Wx::WXK_F3     + 1000) {$self->find_prev} 
+		#elsif ($key ==  &Wx::WXK_F3     + 2000) {$self->search_for_selection} 
+		#elsif ($key ==  &Wx::WXK_F3     + 3000) {$self->replace_with_selection} 
+		#elsif ($key ==  &Wx::WXK_F3     + 4000) {$self->replace_next} 
+		#elsif ($key ==  &Wx::WXK_F3     + 5000) {$self->replace_prev} 
+		elsif ($key ==  &Wx::WXK_F11)            {Kephra::API::widget('win')->toggle_fullscreen() } 
+		elsif ($key ==  &Wx::WXK_ESCAPE)         {Kephra::App::Panel::IOUnit::focus_on_input() } 
+		elsif ($key ==  &Wx::WXK_TAB      + 2000){ } # rotate focus
+		elsif ($key ==      ord('#')      + 2000){$self->next_comment() }
+		elsif ($key ==      ord('#')      + 3000){$self->prev_comment() }
+		elsif ($key ==      ord('#')      + 4000){$self->toggle_comment() }
+		#elsif ($key ==      ord('#')     + 5000){$self->decomment() }
+		elsif ($key ==      ord('G')      + 3000){$self->goto_last_edit() } # last selection?
+		elsif ($key ==      ord('G')      + 5000){ }
+		elsif ($key ==      ord('Q')      + 2000){Kephra::File::close_active() }
+		elsif ($key ==      ord('Q')      + 4000){Kephra::API::app()->close_save }
+		elsif ($key ==      ord('Y')      + 2000){$self->select_form() }
+		elsif ($key ==      ord('Y')      + 3000){$self->select_content() }
+		elsif ($key ==      ord('Z')      + 3000){$self->redo() }
 		else {$event->Skip}
 	});
 	#Wx::Event::EVT_STC_STYLENEEDED($self, sub{}) 

lib/Kephra/Edit.pm

 	$self->GotoPos( $self->{'edit_pos'} ) if exists $self->{'edit_pos'};
 }
 
+sub search_for_selection {} 
+sub replace_with_selection {} 
+sub find_next {}
+sub find_prev {} 
+sub replace_next {}
+sub replace_prev {}
+
 sub select_form {}
 sub select_content {}
 
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.