1Prima::EditDialog(3)  User Contributed Perl Documentation Prima::EditDialog(3)
2
3
4

NAME

6       Prima::FindDialog, Prima::ReplaceDialog - standard interface dialogs to
7       find and replace options selection.
8

SYNOPSIS

10               use Prima qw(StdDlg Application);
11
12               my $dlg = Prima::FindDialog-> create( findStyle => 0);
13               my $res = $dlg-> execute;
14               if ( $res == mb::Ok) {
15                       print $dlg-> findText, " is to be found\n";
16               } elsif ( $res == mb::ChangeAll) {
17                       print "all occurences of ", $dlg-> findText,
18                               " is to be replaced by ", $dlg-> replaceText;
19               }
20
21       The "mb::ChangeAll" constant, one of possible results of "execute"
22       method, is defined in Prima::StdDlg module. Therefore it is recommended
23       to include this module instead.
24

DESCRIPTION

26       The module provides two classes - Prima::FindDialog and
27       Prima::ReplaceDialog; Prima::ReplaceDialog is exactly same as
28       Prima::FindDialog except that its default findStyle property value is
29       set to 0. One can use a dialog-caching technique, arbitrating between
30       findStyle value 0 and 1, and use only one instance of
31       Prima::FindDialog.
32
33       The module does not provide the actual search algorithm; this must be
34       implemented by the programmer. The toolkit currently include some
35       facilitation to the problem - the part of algorithm for "Prima::Edit"
36       class is found in "find" in Prima::Edit, and the another part - in
37       examples/editor.pl example program. Prima::HelpWindow also uses the
38       module, and realizes its own searching algorithm.
39

API

41   Properties
42       All the properties select the user-assigned values, except findStyle.
43
44       findText STRING
45           Selects the text string to be found.
46
47           Default value: ''
48
49       findStyle BOOLEAN
50           If 1, the dialog provides only 'find text' interface. If 0, the
51           dialog provides also 'replace text' interface.
52
53           Default value: 1 for "Prima::FindDialog", 0 for
54           "Prima::ReplaceDialog".
55
56       options INTEGER
57           Combination of "fdo::" constants. For the detailed description see
58           "find" in Prima::Edit.
59
60                   fdo::MatchCase
61                   fdo::WordsOnly
62                   fdo::RegularExpression
63                   fdo::BackwardSearch
64                   fdo::ReplacePrompt
65
66           Default value: 0
67
68       replaceText STRING
69           Selects the text string that is to replace the found text.
70
71           Default value: ''
72
73       scope
74           One of "fds::" constants. Represents the scope of the search: it
75           can be started from the cursor position, of from the top or of the
76           bottom of the text.
77
78                   fds::Cursor
79                   fds::Top
80                   fds::Bottom
81
82           Default value: "fds::Cursor"
83

AUTHOR

85       Dmitry Karasik, <dmitry@karasik.eu.org>.
86

SEE ALSO

88       Prima, Prima::Window, Prima::StdDlg, Prima::Edit, Prima::HelpWindow,
89       examples/editor.pl
90
91
92
93perl v5.30.0                      2019-08-21              Prima::EditDialog(3)
Impressum