Arguments: window
Returns a string that is considered to be selected in window and which may be acted upon by arbitrary commands that require a string.
Note: this function will return true both when text is selected and highlighted (after, perhaps, the left mouse button is depressed and dragged over the text) and when the cursor is within text but no text is highlighted. Thus, if the cursor is between the `f' and the first `o' of `foo', "foo" will be returned by selected-string even though no text is highlighted. Further, if only part of a word is highlighted (say just the `o' in `foo', "foo" will again be returned.
While some menu commands work on text selected by grabbing the whole word when no text is actually selected, others, Cut for example, do not work in that case. Also, there are cases when you want the exact text selected (when some text is selected) rather than the whole enclosing word. In tehse cases, you should use get-selection rather than selected-text.
The function get-selection returns two integers indicating the beginning and the end of highlighted text. If the two values returned by that function are equal, no text is highlighted and commands that only work on highlighted text should not be invoked. The values can also be used to get the precise text selected rather than the enclosing word.
Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.
The documentation is described in introduction.htm and the index is in index.htm.
Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.
Created 2000.10.5.