Module: environment-framework
Synopsis: Environment Framework
Author: Andy Armstrong, Chris Page
Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc.
All rights reserved.
License: Functional Objects Library Public License Version 1.0
Dual-license: GNU Lesser General Public License
Warranty: Distributed WITHOUT WARRANTY OF ANY KIND
/// Searching commands
define constant $asynchronous-timeout = 10;
// Return whether the frame can issue Find/Replace commands at this time.
// These are used to determine when the relavent commands should be enabled.
define open generic frame-can-find? (frame :: ) => (can? :: );
define open generic frame-can-replace? (frame :: ) => (can? :: );
// Open a frame to display/change the Find/Replace strings and other options.
define open generic frame-edit-search-options (frame :: ) => ();
// Return the class to instantiate for the search options frame. This allows
// client libraries to subclass the frame.
define open generic frame-search-frame-class (frame :: ) => (class :: );
// Find the next/previous match, using the current search options.
define open generic frame-find-next (frame :: ) => ();
define open generic frame-find-previous (frame :: ) => ();
// Find the next/previous match in the next/previous target. This skips over
// any matches in the current target.
define open generic frame-find-in-next-target (frame :: ) => ();
define open generic frame-find-in-previous-target (frame :: ) => ();
// Copy the selected text in the frame to the Find/Replace string.
define open generic frame-copy-selection-to-search (frame :: ) => ();
define open generic frame-copy-selection-to-replace (frame :: ) => ();
// Copy the selected text in the frame to the Find/Replace string, then
// search for the next/previous match. This is the same as calling
// frame-copy-selection-to-search followed by frame-find-next/previous.
define open generic frame-find-selection-next (frame :: ) => ();
define open generic frame-find-selection-previous (frame :: ) => ();
// Replace the selected text in the current target if it is a match.
define open generic frame-replace-selection (frame :: ) => ();
// Replace the selected text in the current target if it is a match. Then
// search for the next/previous match. The search is performed whether or
// not the current selection is replaced.
define open generic frame-replace-and-find-next (frame :: ) => ();
define open generic frame-replace-and-find-previous (frame :: ) => ();
// Find and replace all matches. Depending on the current search options,
// this may replace from the selection or throughout the current target,
// and it may replace only in the current target, or throughout all targets.
define open generic frame-replace-all (frame :: ) => ();
// Notify the frame that the searching options have been changed. This is
// usually used to update command enabling.
define open generic note-frame-searching-updated (frame :: ) => ();
// Default methods
define method frame-can-find? (frame :: ) => (can? :: )
#f
end method frame-can-find?;
define method frame-can-replace? (frame :: ) => (can? :: )
#f
end method frame-can-replace?;
define method note-frame-searching-updated (frame :: ) => ()
// Do nothing
end method note-frame-searching-updated;
/// Searching in a sheet/gadget
define open generic can-find-in-sheet? (sheet :: ) => (can? :: );
define open generic can-replace-in-sheet? (sheet :: ) => (can? :: );
define open generic find-in-sheet
(sheet :: ,
search-string :: ,
#key from-selection? :: ,
backwards? :: ,
wrap? :: ,
match-case? :: ,
match-word? :: ,
match-regexp? :: ,
progress-callback :: false-or())
=> (object ::