Chapter 3. Methods


method: (activate inst)
method: (send inst activate)
returns: unspecified

Redisplays the button using the "active-foreground" color (so it looks as it would if the mouse were over the widget). At present it has no effect if the button has been disabled. (This seems to be of pretty limited usefulness).

classes: <button>, <checkbutton>, and <radiobutton>



method: (activate inst menu)
method: (send inst activate menu)
returns: unspecified

Activate menu.

classes: <cascade-menu-item>, <check-menu-item>, <command-menu-item>, <radio-menu-item>, and <separator-menu-item>



method: (add-follower inst widget)
method: (send inst add-follower widget)
returns: unspecified

Adds the specified widget to the list of widgets following this widget. When the show, hide, or destroy message is sent to this instance, the message is also forwarded to each of the followers.

classes: <toplevel>



method: (add-offset inst pos disp)
method: (send inst add-offset pos disp)
returns: see below

Returns a new pair scheme(column . line) that refers to a new position whose character offset relative to pos is given by disp. Negative offsets are permitted. pos is either a pair or an instance of <fixed-mark> or <floating-mark>.

classes: <text>



method: (apply-markup inst txt index1 index2)
method: (send inst apply-markup txt index1 index2)
returns: unspecified

applies the given markup to the range of text beginning at index1 and ending at index2 within the text widget txt. Subsequent operations on the markup affect this region of text until the markup is removed, or that text is deleted from the widget.

classes: <markup>



method: (bounding-box inst)
method: (send inst bounding-box)
returns: list

Returns a list of the coordinates giving the bounding box of this figure on the canvas.

classes: <arc>, <canvas-image>, <canvas-sub-window>, <canvas-text>, <line>, <oval>, <polygon>, and <rectangle>



method: (bounding-box inst pos)
method: (send inst bounding-box pos)
returns: see below

Returns a list of four values describing the bounding box of the character at the position pos, or #f if the character is not visible on screen. The first two values give the x- and y- coordinates of the top left corner of the area occupied by the character. The last two values describe the width and height of that area.

classes: <text>



method: (claim-selection inst selection notify-proc)
method: (send inst claim-selection selection notify-proc)
returns: unspecified

Make this widget the owner of the specified selection and notify the previous owner of that selection (if any) that it has lost ownership. When this widget loses the selection, invoke the given notify thunk. When a widget claims ownership of the primary selection, the currently (or subsequently) selected contents of the widget are then available via swl:get-selection. See also swl:clear-selection.

classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <option-button>, <radiobutton>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (clear-selection inst)
method: (send inst clear-selection)
returns: unspecified

clears the selection if anything in this widget is selected.

classes: <text> De-selects all items in the listbox. classes: <listbox> clears the selection if anything in this widget is selected. classes: <entry>



method: (clear-selection inst index)
method: (send inst clear-selection index)
returns: unspecified

De-selects the item at the given index

classes: <listbox>



method: (clear-selection inst index1 index2)
method: (send inst clear-selection index1 index2)
returns: unspecified

De-selects the items between index1 and index2 inclusive

classes: <listbox>



method: (configure inst width height)
method: (send inst configure width height)
returns: unspecified

When resized, a widget is notified of its width and height by this method.

classes: <arc>, <button>, <canvas-image>, <canvas-sub-window>, <canvas-text>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <line>, <listbox>, <menu>, <option-button>, <oval>, <polygon>, <radiobutton>, <rectangle>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (cursor-bof? inst)
method: (send inst cursor-bof?)
returns: boolean

Returns true if the insertion cursor is at the beginning of the text buffer.

classes: <text>



method: (cursor-bol inst)
method: (send inst cursor-bol)
returns: unspecified

Moves the insertion cursor to the beginning of the line.

classes: <text> Moves the insertion cursor to the beginning of the entry. classes: <entry>



method: (cursor-bol? inst)
method: (send inst cursor-bol?)
returns: boolean

Returns true if the insertion cursor is at the beginning of a line.

classes: <text> Returns true if the insertion cursor is at the beginning of the string displayed in the entry. classes: <entry>



method: (cursor-eof? inst)
method: (send inst cursor-eof?)
returns: boolean

Returns true if the insertion cursor is at the end of the text buffer.

classes: <text> Returns true if the insertion cursor is at the end of the text buffer. classes: <entry>



method: (cursor-eol inst)
method: (send inst cursor-eol)
returns: unspecified

Moves the insertion cursor to the end of the line.

classes: <text> Moves the insertion cursor to the end of the entry. classes: <entry>



method: (cursor-eol? inst)
method: (send inst cursor-eol?)
returns: boolean

Returns true if the insertion cursor is at the end of a line.

classes: <text> Returns true if the insertion cursor is at the end of the string displayed in the entry. classes: <entry>



method: (deactivate inst)
method: (send inst deactivate)
returns: unspecified

Redisplays the button using the "normal-foreground" color (so it looks as it would if the mouse were not over the widget). At present it has no effect if the button has been disabled. (This seems to be of pretty limited usefulness).

classes: <button>, <checkbutton>, and <radiobutton>



method: (deactivate inst menu)
method: (send inst deactivate menu)
returns: unspecified

Deactivates the menu item.

classes: <cascade-menu-item> Deactivate menu. classes: <check-menu-item>, <command-menu-item>, <radio-menu-item>, and <separator-menu-item>



method: (delete inst index1)
method: (send inst delete index1)
returns: unspecified

Deletes the character at index1.

classes: <text> Deletes the item with index item. classes: <listbox> deletes the character if any at index first in the entry. classes: <entry>



method: (delete inst index1 index2)
method: (send inst delete index1 index2)
returns: unspecified

Deletes characters in the range specified by index1 and index2 (inclusive).

classes: <text> Deletes the elements in the range from first to last. classes: <listbox> deletes the characters in the range of first to last (inclusive). classes: <entry>



method: (delete-all inst)
method: (send inst delete-all)
returns: unspecified

Deletes all characters in the widget.

classes: <text> deletes all the items in the listbox. classes: <listbox> Deletes all characters in the widget. classes: <entry>



method: (delete-char inst disp)
method: (send inst delete-char disp)
returns: unspecified

Deletes the characters between the cursor position and the given displacement.

classes: <text> Deletes the character at the given offset in the <entry>. classes: <entry>



method: (delete-eol inst)
method: (send inst delete-eol)
returns: unspecified

Deletes characters from current cursor position to the end of the line.

classes: <text> Deletes characters from current insert position to end of line. classes: <entry>



method: (delete-selection-at-cursor inst)
method: (send inst delete-selection-at-cursor)
returns: unspecified

Deletes the selected text, if any, surrounding the cursor.

classes: <text> Deletes the selected text, if any, surrounding the cursor. classes: <entry>



method: (deselect inst)
method: (send inst deselect)
returns: unspecified

deselects the widget.

classes: <checkbutton> and <radiobutton>



method: (destroy inst)
method: (send inst destroy)
returns: unspecified

Destroys the menu and any sub-menus.

classes: <menu> Destroys this toplevel window if destroy-request-handler returns a non-false value. classes: <toplevel> Destroys the widget and its children. classes: <canvas> destroys the canvas figure classes: <arc>, <canvas-image>, <canvas-sub-window>, <canvas-text>, <line>, <oval>, <polygon>, and <rectangle> Destroys the widget and its children. classes: <frame> Destroys the object. classes: <bitmap>, <button>, <cascade-menu-item>, <check-menu-item>, <checkbutton>, <command-menu-item>, <entry>, <fixed-mark>, <floating-mark>, <font>, <label>, <listbox>, <markup>, <option-button>, <photo>, <radio-menu-item>, <radiobutton>, <rgb>, <scale>, <scrollbar>, <separator-menu-item>, <tab-stop>, and <text>



method: (find-closest inst x y)
method: (send inst find-closest x y)
returns: see below

Returns the topmost canvas item closest to the canvas coordinates x and y or #f if none.

classes: <canvas>



method: (find-enclosed inst x1 y1 x2 y2)
method: (send inst find-enclosed x1 y1 x2 y2)
returns: see below

Returns a list of the items completely enclosed by the rectangular region defined by x1, y1, x2, and y2.

classes: <canvas>



method: (find-item inst relpos item)
method: (send inst find-item relpos item)
returns: see below

Returns the canvas item above or below item in the display list or #f if none. relpos is either above or below.

classes: <canvas>



method: (find-overlapping inst x1 y1 x2 y2)
method: (send inst find-overlapping x1 y1 x2 y2)
returns: see below

Returns a list of the items overlapped by the rectangular region defined by x1, y1, x2, and y2.

classes: <canvas>



method: (fixed-mark inst where)
method: (send inst fixed-mark where)
returns: an instance of <fixed-mark>

Returns a fixed mark for the position described by where. A fixed mark moves only when text is inserted or deleted somewhere before its current position. It remains fixed when text is inserted at its current position.

classes: <text>



method: (flash inst)
method: (send inst flash)
returns: unspecified

flashes the button briefly. expect this to go away.

classes: <button>, <checkbutton>, and <radiobutton>



method: (floating-mark inst where)
method: (send inst floating-mark where)
returns: an instance of <floating-mark>

Returns a floating mark for the position described by where. A floating mark moves when text is inserted or deleted before its current position and moves when text is inserted at its current position. For example, the insertion cursor behaves as a floating mark.

classes: <text>



method: (focus-next inst who)
method: (send inst focus-next who)
returns: unspecified

Set keyboard focus to the widget after who.

classes: <canvas>, <frame>, and <toplevel>



method: (focus-prev inst who)
method: (send inst focus-prev who)
returns: unspecified

Set keyboard focus to the widget before who.

classes: <canvas>, <frame>, and <toplevel>



method: (get-above-paragraph-space inst)
method: (send inst get-above-paragraph-space)
returns: see below

Returns in pixels the amount of extra space to insert above each paragraph in the text.

classes: <text> Returns in pixels the amount of extra space to insert above each paragraph in the text, or #f. classes: <markup>



method: (get-accept-focus inst)
method: (send inst get-accept-focus)
returns: boolean

Returns a boolean indicating whether or not this widget accepts focus when offered by the keyboard traversal mechanism. See the description of set-accept-focus!.

classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <menu>, <option-button>, <radiobutton>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (get-action inst)
method: (send inst get-action)
returns: procedure

Returns the procedure that is called when the widget is manipulated by dragging or clicking the mouse, or pressing arrow keys when the widget has input focus. See set-action! for more details.

classes: <scale> and <scrollbar> Returns the procedure of no arguments to be invoked when the widget is clicked or pressed. classes: <button>, <checkbutton>, and <radiobutton> Returns a procedure of one argument (self) that is invoked when this menu item is chosen with the keyboard or mouse. classes: <cascade-menu-item>, <check-menu-item>, <command-menu-item>, and <radio-menu-item> returns a procedure of one argument (self) evaluated for effect when return or newline is pressed in an <entry>. classes: <entry>



method: (get-active-background-color inst)
method: (send inst get-active-background-color)
returns: see below

Returns the foreground color used when the mouse cursor is over the widget. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>.

classes: <scale> and <scrollbar> Returns the background color used when the mouse cursor is over the widget. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <button>, <checkbutton>, and <radiobutton> Returns the background color used when the mouse cursor is over the widget. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <cascade-menu-item>, <check-menu-item>, <command-menu-item>, and <radio-menu-item> Returns the background color used when the mouse cursor is over the widget. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <menu> Returns the background color used when the mouse cursor is over the widget. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <option-button>



method: (get-active-foreground-color inst)
method: (send inst get-active-foreground-color)
returns: see below

Returns the foreground color used when the mouse cursor is over the widget. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>.

classes: <button>, <checkbutton>, and <radiobutton> Returns the foreground color used when the mouse cursor is over the widget. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <cascade-menu-item>, <check-menu-item>, <command-menu-item>, and <radio-menu-item> Returns the foreground color used when the mouse cursor is over the widget. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <menu> Returns the foreground color used when the mouse cursor is over the widget. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <option-button>



method: (get-actual-values inst)
method: (send inst get-actual-values)
returns: see below

Returns, as multiple values, the actual family, size, and style used by the display engine when rendering this font.

classes: <font>



method: (get-anchor inst)
method: (send inst get-anchor)
returns: symbol

Returns a symbol describing where information in the widget is displayed.

classes: <button>, <checkbutton>, <label>, <option-button>, and <radiobutton> Returns a symbol describing where the figure is displayed relative to its coordinates. classes: <canvas-image>, <canvas-sub-window>, and <canvas-text>



method: (get-arrow-shape inst)
method: (send inst get-arrow-shape)
returns: see below

Returns a list of three numbers describing the shape of the arrowhead see set-arrow-shape! for details.

classes: <line>



method: (get-arrow-style inst)
method: (send inst get-arrow-style)
returns: see below

Returns a symbol describing where on the line the arrowheads should be drawn.

classes: <line>



method: (get-aspect-ratio-bounds inst)
method: (send inst get-aspect-ratio-bounds)
returns: see below

Returns the contraints on the aspect ratio for this toplevel as minumum and maximum ratios of width to height. The values returned are #f if no constraints are in effect.

classes: <toplevel>



method: (get-background-color inst)
method: (send inst get-background-color)
returns: see below

Returns the default background color for the instance. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>.

classes: <cascade-menu-item>, <check-menu-item>, <command-menu-item>, and <radio-menu-item> Returns the default background color for the instance. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <separator-menu-item> Returns the background color for text with this markup. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt, an instance of <rgb>, or #f. classes: <markup> Returns the background color for the bitmap. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <bitmap> Returns the default background color for the instance. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <menu>, <option-button>, <radiobutton>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (get-below-paragraph-space inst)
method: (send inst get-below-paragraph-space)
returns: see below

Returns in pixels the amount of extra space to insert below each paragraph in the text.

classes: <text> Returns in pixels the amount of extra space to insert below each paragraph in the text, or #f. classes: <markup>



method: (get-blank inst)
method: (send inst get-blank)
returns: see below

Returns #f if the entry displays its contents without translation else returns the character used in the translation. (see set-blank!)

classes: <entry>



method: (get-border-width inst)
method: (send inst get-border-width)
returns: see below

Returns the width in pixels of the border drawn around text with this markup, or #f if none.

classes: <markup> Returns the width in pixels of the border drawn around the instance. classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <menu>, <option-button>, <radiobutton>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (get-cap-style inst)
method: (send inst get-cap-style)
returns: see below

Returns a symbol describing how caps are drawn at the endpoints of the line.

classes: <line>



method: (get-char inst)
method: (send inst get-char)
returns: see below

Returns the character at cursor position or #f if none but does not advance the cursor.

classes: <text>



method: (get-char inst index)
method: (send inst get-char index)
returns: see below

Returns the character at index, #f if none.

classes: <text>



method: (get-close-enough inst)
method: (send inst get-close-enough)
returns: a floating point number

Returns a floating-point value indicating how close the mouse cursor must be before it is considered to be inside an item.

classes: <canvas>



method: (get-confine inst)
method: (send inst get-confine)
returns: boolean

Returns a boolean indicating whether or not the canvas is prevented from scrolling the view of the canvas outside the region defined by set-scroll-region!.

classes: <canvas>



method: (get-coords inst)
method: (send inst get-coords)
returns: list

Returns a list of the coordinates defining the canvas figure.

classes: <arc>, <canvas-image>, <canvas-sub-window>, <canvas-text>, <line>, <oval>, <polygon>, and <rectangle>



method: (get-cursor-pos inst)
method: (send inst get-cursor-pos)
returns: integer

Returns the position of insertion cursor within the widget as a pair of character position and line number.

classes: <text> Returns the index of the item currently under the cursor. classes: <listbox> Returns the position of insertion cursor within the widget. classes: <entry>



method: (get-data inst)
method: (send inst get-data)
returns: see below

Returns a base64-encoded string representing the image data.

classes: <photo> No idea if this will really work reliably. classes: <bitmap>



method: (get-desired-height inst)
method: (send inst get-desired-height)
returns: integer

Returns the height, in pixels, that the widget requests from its window manager.

classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <menu>, <option-button>, <radiobutton>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (get-desired-width inst)
method: (send inst get-desired-width)
returns: integer

Returns the width, in pixels, that the widget requests from its window manager.

classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <menu>, <option-button>, <radiobutton>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (get-destroy-request-handler inst)
method: (send inst get-destroy-request-handler)
returns: procedure

Returns the destroy request handler for this toplevel window.

classes: <toplevel>



method: (get-digits inst)
method: (send inst get-digits)
returns: see below

Returns the number of significant digits in the value of the scale. If zero, then the scale chooses the smallest value that distinguishes each position of the slider.

classes: <scale>



method: (get-disabled-background-color inst)
method: (send inst get-disabled-background-color)
returns: see below

Returns the background color used when the widget is disabled. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>.

classes: <entry> and <text>



method: (get-disabled-foreground-color inst)
method: (send inst get-disabled-foreground-color)
returns: see below

Returns the foreground color used when the widget is disabled. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>.

classes: <button>, <checkbutton>, and <radiobutton> Returns the foreground color used when the widget is disabled. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <entry> and <text> Returns the foreground color used when the widget is disabled. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <menu> Returns the foreground color used when the widget is disabled. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <option-button>



method: (get-draw-indicator inst)
method: (send inst get-draw-indicator)
returns: see below

Returns a boolean value indicating whether or not the state of the widget is depicted by drawing a small square or diamond filled or not filled.

classes: <checkbutton> and <radiobutton> Returns a boolean value indicating whether or not the state of the item is depicted by drawing a small square or diamond filled or not filled. classes: <check-menu-item> and <radio-menu-item>



method: (get-draw-spline inst)
method: (send inst get-draw-spline)
returns: boolean

Returns a boolean that indicates whether or not the outline of the figure is drawn as a spline.

classes: <line> and <polygon>



method: (get-enabled inst)
method: (send inst get-enabled)
returns: boolean

Returns a boolean value indicating whether or not the widget is enabled and responsive to user interaction.

classes: <button>, <checkbutton>, and <radiobutton> Returns a boolean value indicating whether or not the widget is enabled and responsive to user interaction. classes: <entry> and <text> Always returns false. Always #f for separator-menu-items. classes: <separator-menu-item> Returns a boolean value indicating whether or not the widget is enabled and responsive to user interaction. classes: <cascade-menu-item>, <check-menu-item>, <command-menu-item>, and <radio-menu-item> Returns a boolean value indicating whether or not the widget is enabled and responsive to user interaction. classes: <option-button>



method: (get-export-selection inst)
method: (send inst get-export-selection)
returns: boolean

Returns a boolean that indicates whether or not selection in the widget is also the X selection.

classes: <entry>, <listbox>, and <text>



method: (get-extent inst)
method: (send inst get-extent)
returns: see below

Returns the extent in degrees of the arc.

classes: <arc>



method: (get-family inst)
method: (send inst get-family)
returns: a symbol

Returns the family requested when the instance was created.

classes: <font>



method: (get-filename inst)
method: (send inst get-filename)
returns: string

Returns the name of the file associated with the <photo>.

classes: <photo> Returns the name of the file associated with the instance. classes: <bitmap>



method: (get-fill-color inst)
method: (send inst get-fill-color)
returns: see below

Returns the color with which the interior of the figure is filled. The value returned is either the symbol transparent, a symbol naming a color in rgb.txt, or an instance of <rgb>.

classes: <canvas-text> Returns the color with which the interior of the figure is filled. The value returned is either the symbol transparent, a symbol naming a color in rgb.txt, or an instance of <rgb>. classes: <line> and <polygon> Returns the color with which the interior of the figure is filled. The value returned is either the symbol transparent, a symbol naming a color in rgb.txt, or an instance of <rgb>. classes: <arc>, <oval>, and <rectangle>



method: (get-font inst)
method: (send inst get-font)
returns: see below

Returns an instance of <font> describing the default font for text displayed by the scale.

classes: <scale> Returns an instance of <font> describing the font for text displayed in the widget. classes: <button>, <checkbutton>, <entry>, <label>, <listbox>, <option-button>, <radiobutton>, and <text> Returns an instance of <font> describing the font for text displayed in the widget. classes: <cascade-menu-item>, <check-menu-item>, <command-menu-item>, and <radio-menu-item> Returns an instance of <font> describing the font for text displayed in the widget. classes: <menu> Returns an instance of <font> describing the font for text with this markup or #f to indicate that this markup does not override the text font. classes: <markup> Returns an instance of <font> describing the font for text displayed by the figure. classes: <canvas-text>



method: (get-foreground-color inst)
method: (send inst get-foreground-color)
returns: see below

Returns the default foreground color for the scale. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>.

classes: <scale> Returns the foreground color for the instance. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <button>, <checkbutton>, <entry>, <label>, <listbox>, <option-button>, <radiobutton>, and <text> Returns the foreground color for the instance. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <cascade-menu-item>, <check-menu-item>, <command-menu-item>, and <radio-menu-item> Returns the foreground color for the instance. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <menu> Returns the foreground color for text with this markup. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt, an instance of <rgb>, or #f. classes: <markup> Returns the foreground color for the bitmap. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>. classes: <bitmap>



method: (get-geometry inst)
method: (send inst get-geometry)
returns: string

Returns a string describing the current geometry of the toplevel.

classes: <toplevel>



method: (get-grid inst)
method: (send inst get-grid)
returns: boolean

Returns a boolean indicating whether or not the text widget should strive to keep its dimensions in even multiples of the dimensions of a character in its current font.

classes: <text> Returns a boolean indicating whether or not the listbox should strive to keep its dimensions in even multiples of the dimensions of a character in its current font. classes: <listbox>



method: (get-height inst)
method: (send inst get-height)
returns: integer

Returns the height, in pixels, of the given image.

classes: <bitmap> and <photo> Returns the height in pixels of the sub-window. classes: <canvas-sub-window> Returns the current height, in pixels, of the widget. classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <menu>, <option-button>, <radiobutton>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (get-height/char inst)
method: (send inst get-height/char)
returns: integer

Returns the height of the widget in lines of text. If zero then the widget is determining its own size.

classes: <button>, <checkbutton>, <entry>, <label>, <listbox>, <option-button>, <radiobutton>, and <text>



method: (get-horizontal-view inst)
method: (send inst get-horizontal-view)
returns: see below

Returns a list of two floating-point values describing what part of the widget's content is in view horizontally. The first number indicates what fraction of the widget's content is out of view to the left and the second number indicates what fraction of the widget's content is not out of view to the right.

classes: <entry>, <listbox>, and <text>



method: (get-hpad inst)
method: (send inst get-hpad)
returns: see below

Returns in pixels the extra horizontal distance to add around the widget.

classes: <text>



method: (get-hscroll-increment inst)
method: (send inst get-hscroll-increment)
returns: integer

Returns the value set by set-hscroll-increment!.

classes: <canvas>



method: (get-hscroll-notify inst)
method: (send inst get-hscroll-notify)
returns: see below

Returns the procedure (or #f if none) that is notified when the horizontal view or content of the widget is changed.

classes: <entry>, <listbox>, and <text> Returns the procedure (or #f if none) that is notified when the horizontal view or content of the widget is changed. classes: <canvas>



method: (get-icon-title inst)
method: (send inst get-icon-title)
returns: string

Returns the string displayed by the toplevel when it is iconified.

classes: <toplevel>



method: (get-image inst)
method: (send inst get-image)
returns: see below

Returns the image to displayed by this canvas item.

classes: <canvas-image>



method: (get-insert-border-width inst)
method: (send inst get-insert-border-width)
returns: integer

Returns the width in pixels of the 3-D border drawn around the insertion cursor for the widget.

classes: <entry> and <text>



method: (get-insert-color inst)
method: (send inst get-insert-color)
returns: see below

Returns the color for the insertion cursor of the widget The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>.

classes: <entry> and <text>



method: (get-insert-off-time inst)
method: (send inst get-insert-off-time)
returns: integer

Returns the number of milliseconds the insertion cursor for this widget will be hidden during each blink cycle.

classes: <entry> and <text>



method: (get-insert-on-time inst)
method: (send inst get-insert-on-time)
returns: integer

Returns the number of milliseconds the insertion cursor for this widget will be visible during each blink cycle.

classes: <entry> and <text>



method: (get-insert-width inst)
method: (send inst get-insert-width)
returns: integer

Returns the width in pixels of the insertion cursor for the widget.

classes: <entry> and <text>



method: (get-item inst index)
method: (send inst get-item index)
returns: see below

Returns the string in the listbox at the given index.

classes: <listbox>



method: (get-items inst)
method: (send inst get-items)
returns: list

Returns a list of canvas items contained in this canvas.

classes: <canvas>



method: (get-join-style inst)
method: (send inst get-join-style)
returns: see below

Returns a symbol describing how the joints between line segments are drawn.

classes: <line>



method: (get-jump-scroll inst)
method: (send inst get-jump-scroll)
returns: see below

Returns a boolean that indicates whether or not the scrollbar waits until it is released before notifying the associated widget.

classes: <scrollbar>



method: (get-justify inst)
method: (send inst get-justify)
returns: symbol

Returns a symbol describing how lines are to be justified when multiple lines are displayed.

classes: <button>, <checkbutton>, <label>, <option-button>, and <radiobutton> Returns a symbol indicating where where the the insertion cursor begins and how the text is displayed when it all fits in the widget. classes: <entry> Returns a symbol describing how lines are to be justified when multiple lines are displayed. classes: <canvas-text>



method: (get-key-press-method inst)
method: (send inst get-key-press-method)
returns: see below

returns the method that is notified when a key is pressed while the mouse is over a range of text with this markup.

classes: <markup>



method: (get-key-release-method inst)
method: (send inst get-key-release-method)
returns: see below

returns the method that is notified when a key is released while the mouse is over a range of text with this markup.

classes: <markup>



method: (get-left-margin inst)
method: (send inst get-left-margin)
returns: see below

Returns the left margin in pixels for text with this markup, or #f if none.

classes: <markup>



method: (get-length inst)
method: (send inst get-length)
returns: see below

returns the length in pixels of the long dimension of the scale.

classes: <scale>



method: (get-line-space inst)
method: (send inst get-line-space)
returns: see below

Returns in pixels the amount of extra space to insert between each line in the text.

classes: <text> Returns in pixels the amount of extra space to insert between each line in the text, or #f. classes: <markup>



method: (get-line-thickness inst)
method: (send inst get-line-thickness)
returns: see below

Returns the thickness in pixels of the outline drawn around the figure.

classes: <line> and <polygon> Returns the thickness in pixels of the outline drawn around the figure. classes: <arc>, <oval>, and <rectangle>



method: (get-mask-data inst)
method: (send inst get-mask-data)
returns: see below

No idea if this will really work reliably.

classes: <bitmap>



method: (get-max inst)
method: (send inst get-max)
returns: see below

returns the high value of the range represented by the scale.

classes: <scale>



method: (get-max-size inst)
method: (send inst get-max-size)
returns: see below

returns multiple values corresponding to the arguments to set-max-size!

classes: <toplevel>



method: (get-menu inst)
method: (send inst get-menu)
returns: see below

Returns the menu to be posted when this item is chosen to menu which must be an instance of <menu>. Returns #f if none.

classes: <cascade-menu-item> Returns the menu instance associated with this toplevel, or #f if none. classes: <toplevel>



method: (get-menu-items inst)
method: (send inst get-menu-items)
returns: see below

Returns a copy of the list of menu items contained in this menu.

classes: <cascade-menu-item> Returns a copy of the list of menu items contained in this menu. classes: <menu>



method: (get-min inst)
method: (send inst get-min)
returns: see below

returns the low value of the range represented by the scale.

classes: <scale>



method: (get-min-size inst)
method: (send inst get-min-size)
returns: see below

returns multiple values corresponding to the arguments to set-min-size!

classes: <toplevel>



method: (get-mouse-cursor inst)
method: (send inst get-mouse-cursor)
returns: see below

Returns the mouse cursor displayed when the mouse pointer is in the widget. The return value is in one of the forms accepted by set-mouse-cursor!.

classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <menu>, <option-button>, <radiobutton>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (get-mouse-enter-method inst)
method: (send inst get-mouse-enter-method)
returns: see below

returns the procedure that is notified when the mouse enters a range of text with this markup.

classes: <markup>



method: (get-mouse-leave-method inst)
method: (send inst get-mouse-leave-method)
returns: see below

returns the procedure that is notified when the mouse leaves a range of text with this markup.

classes: <markup>



method: (get-mouse-motion-method inst)
method: (send inst get-mouse-motion-method)
returns: see below

returns the procedure that is notified when the mouse moves over a range of text with this markup.

classes: <markup>



method: (get-mouse-press-method inst)
method: (send inst get-mouse-press-method)
returns: see below

returns the procedure that is notified when a mouse button is pressed over a range of text with this markup.

classes: <markup>



method: (get-mouse-release-method inst)
method: (send inst get-mouse-release-method)
returns: see below

returns the procedure that is notified when a mouse button is released over a range of text with this markup.

classes: <markup>



method: (get-options inst)
method: (send inst get-options)
returns: option list (see set-options!)

The behavior when the list is mutated is undefined.

classes: <option-button>



method: (get-orientation inst)
method: (send inst get-orientation)
returns: symbol

Returns the orientation of the widget, either horizontal or vertical.

classes: <scale> and <scrollbar>



method: (get-outline-color inst)
method: (send inst get-outline-color)
returns: see below

Returns the color in which the outline of the figure is drawn. The value returned is either a symbol naming a color in rgb.txt or an instance of <rgb>.

classes: <polygon> Returns the color in which the outline of the figure is drawn. The value returned is either a symbol naming a color in rgb.txt or an instance of <rgb>. classes: <arc>, <oval>, and <rectangle>



method: (get-override-redirect inst)
method: (send inst get-override-redirect)
returns: boolean

Indicates whether this toplevel window is to be ignored by the window manager (ie. displayed without decorative border, etc.).

classes: <toplevel>



method: (get-overstrike inst)
method: (send inst get-overstrike)
returns: see below

Returns a boolean indicating whether or not text with this markup is overstricken.

classes: <markup>



method: (get-paragraph-indent inst)
method: (send inst get-paragraph-indent)
returns: see below

Returns the number of pixels that the first line of a paragraph with this markup is indented, or #f if none.

classes: <markup>



method: (get-parent inst)
method: (send inst get-parent)
returns: see below

This method returns #f since a toplevel has no parent.

classes: <toplevel> Returns the canvas on which the figure is drawn. classes: <arc>, <canvas-image>, <canvas-sub-window>, <canvas-text>, <line>, <oval>, <polygon>, and <rectangle> Returns the parent of the widget. classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <option-button>, <radiobutton>, <scale>, <scrollbar>, and <text> Returns the parent of the widget or #f if the widget has no parent. classes: <bitmap>, <cascade-menu-item>, <check-menu-item>, <command-menu-item>, <fixed-mark>, <floating-mark>, <font>, <markup>, <menu>, <photo>, <radio-menu-item>, <rgb>, <separator-menu-item>, and <tab-stop>



method: (get-pos inst)
method: (send inst get-pos)
returns: see below

Returns a pair containing the current line and character position of the mark.

classes: <fixed-mark> and <floating-mark>



method: (get-pref inst key default)
method: (send inst get-pref key default)
returns: preference value associated with key, or default if none

A warning is signaled in the latter case.

classes: <arc>, <bitmap>, <button>, <canvas-image>, <canvas-sub-window>, <canvas-text>, <canvas>, <cascade-menu-item>, <check-menu-item>, <checkbutton>, <command-menu-item>, <entry>, <fixed-mark>, <floating-mark>, <font>, <frame>, <label>, <line>, <listbox>, <markup>, <menu>, <option-button>, <oval>, <photo>, <polygon>, <radio-menu-item>, <radiobutton>, <rectangle>, <rgb>, <scale>, <scrollbar>, <separator-menu-item>, <tab-stop>, <text>, and <toplevel>



method: (get-prefs-key inst)
method: (send inst get-prefs-key)
returns: symbol or #f

Returns the preferences key for this menu item.

classes: <check-menu-item> and <radio-menu-item>



method: (get-relief inst)
method: (send inst get-relief)
returns: see below

Returns a symbol describing how the border of the widget is drawn, or #f.

classes: <markup> Returns a symbol describing how the border of the widget is drawn. classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <menu>, <option-button>, <radiobutton>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (get-repeat-delay inst)
method: (send inst get-repeat-delay)
returns: integer

Returns the number of milliseconds a button or key must be held down before it begins to autorepeat.

classes: <scale> and <scrollbar>



method: (get-repeat-interval inst)
method: (send inst get-repeat-interval)
returns: integer

Returns the number of milliseconds to delay between auto-repeats.

classes: <scale> and <scrollbar>



method: (get-resizable inst)
method: (send inst get-resizable)
returns: see below

returns multiple values corresponding to the arguments to set-resizable!

classes: <toplevel>



method: (get-resolution inst)
method: (send inst get-resolution)
returns: see below

returns the resolution of the scale's value.

classes: <scale>



method: (get-right-margin inst)
method: (send inst get-right-margin)
returns: see below

Returns the right margin in pixels for text with this markup, or #f if none.

classes: <markup>



method: (get-root-x inst)
method: (send inst get-root-x)
returns: integer

Returns the x-coordinate of the widget relative to the root window.

classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <menu>, <option-button>, <radiobutton>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (get-root-y inst)
method: (send inst get-root-y)
returns: integer

Returns the y-coordinate of the widget relative to the root window.

classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <menu>, <option-button>, <radiobutton>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (get-saved-text inst)
method: (send inst get-saved-text)
returns: string

returns, as a Scheme string, the text preserved by save-text! this is the yank operation.

classes: <entry> and <text>



method: (get-scroll-region inst)
method: (send inst get-scroll-region)
returns: list

Returns a list of the coordinates defining the boundary of the information on the canvas.

classes: <canvas>



method: (get-select-background-color inst)
method: (send inst get-select-background-color)
returns: see below

Returns the background color for selected items in the widget. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>.

classes: <entry>, <listbox>, and <text>



method: (get-select-border-width inst)
method: (send inst get-select-border-width)
returns: integer

Returns the width in pixels of the raised 3-D border drawn around selected items.

classes: <entry>, <listbox>, and <text>



method: (get-select-color inst)
method: (send inst get-select-color)
returns: see below

Returns the color used to show when the widget is selected (see set-select-color!).

classes: <checkbutton> and <radiobutton> Returns the color used to show when the item is selected (see set-select-color!). classes: <check-menu-item> and <radio-menu-item> Returns the color used to show when the item is selected (see set-select-color!). classes: <menu>



method: (get-select-foreground-color inst)
method: (send inst get-select-foreground-color)
returns: see below

Returns the foreground color for selected items in the widget. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>.

classes: <entry>, <listbox>, and <text>



method: (get-select-image inst)
method: (send inst get-select-image)
returns: see below

Returns the image displayed when this item is selected.

classes: <checkbutton> and <radiobutton> Returns the image displayed when this item is selected. classes: <check-menu-item> and <radio-menu-item>



method: (get-select-mode inst)
method: (send inst get-select-mode)
returns: see below

Returns a symbol describing the current selection mode. See set-select-mode! for more details.

classes: <listbox>



method: (get-selected inst)
method: (send inst get-selected)
returns: boolean

Returns the selected status of the item.

classes: <check-menu-item> and <radio-menu-item>



method: (get-selected-items inst)
method: (send inst get-selected-items)
returns: see below

Returns the index of the item currently selected, a list of such indices if more than one is selected, or #f if none is selected.

classes: <listbox>



method: (get-selected-range inst)
method: (send inst get-selected-range)
returns: see below

Returns a pair of the start and end points of the selected region or #f if nothing is selected.

classes: <text> Returns a pair of the start and end points of the selected region or #f if nothing is selected. classes: <entry>



method: (get-selected-string inst)
method: (send inst get-selected-string)
returns: see below

Returns the string selected in the entry or #f if none. Very tempted to eliminate this

classes: <entry>



method: (get-show-value inst)
method: (send inst get-show-value)
returns: see below

returns a boolean indicating whether or not the scale shows its current value beside the slider.

classes: <scale>



method: (get-size inst)
method: (send inst get-size)
returns: an integer

Returns the size requested when the instance was created. Positive values indicate size in points; negative values indicate size in pixels.

classes: <font>



method: (get-skip-increment inst)
method: (send inst get-skip-increment)
returns: see below

returns the size of the skips made when the scale is clicked on in a way that jumps.

classes: <scale>



method: (get-slider-length inst)
method: (send inst get-slider-length)
returns: see below

returns the length in pixels of the slider along its long dimension.

classes: <scale>



method: (get-spline-steps inst)
method: (send inst get-spline-steps)
returns: integer

Returns the number of steps to be used when drawing the spline. If zero the figure is not drawn as a spline.

classes: <line> and <polygon>



method: (get-start inst)
method: (send inst get-start)
returns: see below

Returns the position in degrees where the arc begins.

classes: <arc>



method: (get-stipple inst)
method: (send inst get-stipple)
returns: see below

(unimplemented)

classes: <canvas-text> (currently unimplemented) classes: <line> and <polygon> (currently unimplemented) classes: <arc>, <oval>, and <rectangle>



method: (get-string inst)
method: (send inst get-string)
returns: string

returns the contents of the entry as a Scheme string.

classes: <entry>



method: (get-string inst index1 index2)
method: (send inst get-string index1 index2)
returns: see below

Returns the string defined by the range index1 index2.

classes: <text>



method: (get-style inst)
method: (send inst get-style)
returns: see below

Returns a list of the other properties ( normal, bold, roman, italic, underline, or overstrike) requested when the instance was created.

classes: <font> Returns a symbol describing how the arc is displayed. The value returns is either arc, chord, or pieslice. classes: <arc>



method: (get-tabs inst)
method: (send inst get-tabs)
returns: see below

Returns a list of the default tab stops in effect for this text widget.

classes: <text> Returns a list of the tab stops in effect for text with this markup or #f if none. classes: <markup>



method: (get-title inst)
method: (send inst get-title)
returns: see below

Returns the string, <bitmap>, or <photo> displayed by the widget.

classes: <button>, <checkbutton>, <label>, <option-button>, and <radiobutton> Always the empty string for separator-menu-items. classes: <separator-menu-item> Returns the string displayed by the widget. classes: <cascade-menu-item>, <check-menu-item>, <command-menu-item>, and <radio-menu-item> Returns the string displayed by the toplevel when it is not iconified. classes: <toplevel> Returns the string displayed by the figure. classes: <canvas-text>



method: (get-transient inst)
method: (send inst get-transient)
returns: see below

Returns the <toplevel> for which this <toplevel> is serving as a transient, or #f if none.

classes: <toplevel>



method: (get-traversal-background-color inst)
method: (send inst get-traversal-background-color)
returns: see below

Returns the color for the traversal highlight region when the widget does not have input focus. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>.

classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <option-button>, <radiobutton>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (get-traversal-color inst)
method: (send inst get-traversal-color)
returns: see below

Returns the color for the traversal highlight region when the widget has input focus. The value returned is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>.

classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <option-button>, <radiobutton>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (get-traversal-thickness inst)
method: (send inst get-traversal-thickness)
returns: integer

Returns the width in pixels of the traversal highlight region.

classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <option-button>, <radiobutton>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (get-trough-color inst)
method: (send inst get-trough-color)
returns: see below

Returns the color for the trough (in which the slider of the widget moves) to val, which is either a symbol naming a color in /usr/lib/X11/rgb.txt or an instance of <rgb>.

classes: <scale> and <scrollbar>



method: (get-underline inst)
method: (send inst get-underline)
returns: see below

Returns a boolean indicating whether or not text with this markup is underlined.

classes: <markup>



method: (get-underline-index inst)
method: (send inst get-underline-index)
returns: integer

Returns the zero-based index of a character to be underline when the string is displayed. If #f the underline is disabled.

classes: <button>, <checkbutton>, <label>, <option-button>, and <radiobutton>



method: (get-value inst)
method: (send inst get-value)
returns: see below

returns the current value of the scale.

classes: <scale>



method: (get-values inst)
method: (send inst get-values)
returns: see below

Returns, as multiple values, the family, size, and style requested when the instance was created.

classes: <font>



method: (get-vertical-view inst)
method: (send inst get-vertical-view)
returns: list

Returns a list of two floating-point values describing what part of the widget's content is in view vertically. The first number indicates what fraction of the widget's content is out of view to the top and the second number indicates what fraction of the widget's content is not out of view to the bottom.

classes: <listbox> and <text> Because entries cannot be scrolled vertically, this always returns the list (0 1) to indicate that no part of the widget's content is out of view to the top, and all of the content is in view above the bottom. classes: <entry>



method: (get-view inst)
method: (send inst get-view)
returns: see below

Returns the values set in the most recent call to set-view!.

classes: <scrollbar>



method: (get-vpad inst)
method: (send inst get-vpad)
returns: see below

Returns in pixels the extra vertical distance to add around the widget.

classes: <text>



method: (get-vscroll-increment inst)
method: (send inst get-vscroll-increment)
returns: integer

Returns the value set by set-vscroll-increment!.

classes: <canvas>



method: (get-vscroll-notify inst)
method: (send inst get-vscroll-notify)
returns: see below

Returns the procedure (or #f if none) that is notified when the vertical view or content of the widget is changed.

classes: <entry>, <listbox>, and <text> Returns the procedure (or #f if none) that is notified when the vertical view or content of the widget is changed. classes: <canvas>



method: (get-width inst)
method: (send inst get-width)
returns: integer

Returns the width, in pixels, of the given image.

classes: <bitmap> and <photo> Returns the width in pixels of the sub-window. classes: <canvas-sub-window> Returns the width of the canvas text used in line breaking. classes: <canvas-text> Returns the current width, in pixels, of the widget. classes: <button>, <canvas>, <checkbutton>, <entry>, <frame>, <label>, <listbox>, <menu>, <option-button>, <radiobutton>, <scale>, <scrollbar>, <text>, and <toplevel>



method: (get-width/char inst)
method: (send inst get-width/char)
returns: integer

Returns the width of the widget in characters. If zero then the widget is determining its own size.

classes: <button>, <checkbutton>, <entry>, <label>, <listbox>, <option-button>, <radiobutton>, and <text>



method: (get-window inst)
method: (send inst get-window)
returns: see below

Returns the widget placed on the canvas in this sub-window.

classes: <canvas-sub-window>



method: (get-wrap inst)
method: (send inst get-wrap)
returns: see below

Returns a symbol indicating how long lines are wrapped.

classes: <text> Returns a symbol indicating how long lines are wrapped, or #f if none. classes: <markup>



method: (get-wrap-length inst)
method: (send inst get-wrap-length)
returns: integer

Returns the wrap limit for the widget. See set-wrap-length!.

classes: <button>, <c