FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

pop-up-replace-dialog

Arguments: window-or-screen initial-find-string initial-replace-string search-backwards-p match-exactly-p &key (allow-replace-all t) (allow-match-exactly t) (allow-search-backwards t)

Displays a modal dialog asking the user to specify a search string and a replacement string, plus a few options for doing the search and replace. This function does not do an actual search or replace, and instead simply returns the values specified by the user in the dialog. It is then up to the application to perform a search and replace in some application-defined way.

window-or-screen is typically the window in which the search will be done, though it can actually be an arbitrary window or nil. If nil, then the stream returned by selected-window-or-screen is used. It is used in two ways: (1) The modal dialog is positioned with respect to this window according to the usual internal call to position-utility-dialog, and (2) the top-level-window of window will be passed as the stream argument to pop-up-modal-dialog, to disable user gestures on that window and all of its other owned windows while the modal dialog is present.

initial-find-string should be a string to be displayed in the search-string widget when the dialog appears. Use the null string to cause the widget initially to be empty.

initial-replace-string should be a string to be displayed in the replacement-string widget when the dialog appears. Use the null string to cause the widget initially to be empty.

search-backwards-p determines whether the check-box on the dialog for requesting a backward search will be initially checked. If true, then the widget will be checked, and if nil it will not be.

match-exactly-p determines whether the check-box on the dialog for requesting an "exact match" will be initially checked. If true, then the widget will be checked, and if nil it will not be. This option is typically used to specify whether the search will be case-sensitive or case-insensitive.

allow-replace-all determines whether the button on the dialog for requesting that all search matches be replaced will be available so that the user may press it to exit the dialog. If true, then it will be available; if nil, then it will not be. (This button is an option for exiting the dialog, as an alternative to pressing the "Replace" button to request replacing a single match.)

allow-match-exactly determines whether the check-box on the dialog for requesting an "exact match" will be available so that the user may change its value. If true, then it will be available; if nil, then it will not be.

allow-search-backwards determines whether the check-box on the dialog for requesting a backward search will be available. If true, then it will be available; if nil, then it will not be.

Five values are returned when the user exits the dialog. If the user cancels the dialog, then the first four values will be nil, and the fifth value will be the keyword :cancel. Otherwise the values are (1) the string in the search-string widget, (2) the string in the replacement-string widget, (3) the value of the search-backwards check-box (true or nil), (4) the value of the match-exactly check-box (true or nil), and (5) the name of the button that was pressed by the user to exit the dialog. If the fifth value is the keyword :replace-all, then the user has requested that all matches of the search-string be replaced; otherwise the user has requested that a single match be replaced.


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version