Prima::...ndDialog(3)
π Prima::...ndDialog(3) β Prima::Dialog::FindDialog π
okay bestie, welcome to the Prima::...ndDialog(3) page from User Contributed Perl Documentation. this is all about the standard FindDialog and ReplaceDialog for finding and replacing text. no cap, the manual name is folded in right here so we can get to the good stuff π«Ά
β¨ NAME β¨
Prima::Dialog::FindDialog β the standard dialogs FindDialog and ReplaceDialog to find and replace text.
π SYNOPSIS π
use Prima qw(Dialog::FindDialog Application);
my $dlg = Prima::Dialog::FindDialog-> new( findStyle => 0);
my $res = $dlg-> execute;
if ( $res == mb::Ok) {
print $dlg-> findText, " is to be found\n";
} elsif ( $res == mb::ChangeAll) {
print "all occurrences of ", $dlg-> findText,
" are to be replaced by ", $dlg-> replaceText;
}
π¦ DESCRIPTION π¦
This module gives you two classes: Prima::Dialog::FindDialog and Prima::Dialog::ReplaceDialog. The Prima::Dialog::ReplaceDialog class is exactly the same as Prima::Dialog::FindDialog except that its default findStyle property value is set to 0. You can cache and reuse the dialog object, changing its findStyle value to 0 and 1, so that only one instance of Prima::Dialog::FindDialog is used in the program. iconic behavior, honestly π
Important, bestie: this module does not provide the actual search algorithm β that must be implemented by the programmer. The toolkit includes some help: part of the algorithm for the Prima::Edit class is implemented in the Prima::Edit/find method, and another part in the examples/editor.pl example program. The Prima::HelpWindow class also uses the module but implements its own searching algorithm.
π₯ API π₯
πΈ Properties πΈ
All these properties reflect values that the user can change interactively β except findStyle.
findTextSTRING β selects the text string to be found. Default value:''.findStyleBOOLEAN β if1, the dialog provides only the'find text'interface. If0, the dialog provides also the'replace text'interface. Default value:1forPrima::Dialog::FindDialog,0forPrima::Dialog::ReplaceDialog.optionsINTEGER β a combination of thefdo::constants:fdo::MatchCase,fdo::WordsOnly,fdo::RegularExpression,fdo::BackwardSearch,fdo::ReplacePrompt. For the detailed description, see"find" in Prima::Edit. Default value:0.replaceTextSTRING β selects the text string to replace the found text. Default value:''.scopeβ one of thefds::constants:fds::Cursor,fds::Top,fds::Bottom. Represents the scope of the search: it can be started from the cursor position, from the top of the text, or from the bottom. Default value:fds::Cursor.
π AUTHOR π
Dmitry Karasik, <dmitry@karasik.eu.org>.
π«Ά SEE ALSO π«Ά
Prima, Prima::Window, Prima::Edit, Prima::HelpWindow, examples/editor.pl
okay that's the whole page, bestie π it's from perl v5.42.0, dated 2024-08-20, and it's the Prima::...ndDialog(3) page. mwah π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms