Padre::Wx::Dialog::Find - Find and Replace widget
Padre::Wx:Main implements Padre's Find and Replace dialogs. Inherits from Padre::Wx::Dialog.
Padre::Wx:Main
Padre::Wx::Dialog
Create and return a Padre::Wx::Dialog::Find object. Takes dialog type (find or replace) as a parameter. If none given assumes the type is find. Stores dialog type in dialog_type.
Padre::Wx::Dialog::Find
find
replace
dialog_type
my $find_dialog = Padre::Wx::Dialog::Find->new('find');
$self->relocale;
Delete and re-create dialog on locale (language) change.
$self->delete_dialog;
Delete dialog.
$self->create_dialog;
Create Find or Replace dialog depending on dialog_type value.
TODO: Maybe create methods for Find and Replace dialogs should be separated?
$self->update_dialog;
Fetch recent search and replace strings from history and place them in find and replace combo boxes respectively for re-use.
$self->find;
Grab currently selected text, if any, and place it in find combo box. Bring up the dialog or perform search for strings' next occurence if dialog is already displayed.
TODO: if selection is more than one line then consider it as the limit of the search and replace and not as the string to be used.
$self->find_next;
Search for given string's next occurence. If no string is available (either as a selected text in editor, if Quick Find is on, or from search history) run find method.
$self->find_previous;
Perform backward search for string fetched from search history or run find method if search history is empty.
$self->cancel_clicked;
Hide dialog when pressed cancel button.
$self->replace_all_clicked;
Executed when Replace all button is clicked. Replace all appearances of given string.
$self->replace_clicked;
Executed when Replace button is clicked. Replace one appearance of given strings. If search window is still open, run search on the whole text, again.
search
$self->find_clicked;
Executed when Find button is clicked. Perform search on the term specified in the dialog.
$self->get_data_from_dialog;
Gather search and optionaly replace strings from the dialog and store them in search history. Set search options based on the check boxes values.
$self->search;
Perform actual search. Highlight (set as selected) found string.
Copyright 2008-2009 The Padre development team as listed in Padre.pm.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
To install Padre, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Padre
CPAN shell
perl -MCPAN -e shell install Padre
For more information on module installation, please visit the detailed CPAN module installation guide.