doc.txt

Widgets

_Widgets_
_widgets_

This collection currently provides two files:

 _progress.ss_: a Windows XP-style progress meter widget.
 _text.ss_: a read-only editor widget.
 _widgets.ss_: provides all widgets defined in this library.

PROGRESS METER WIDGET ================================================

The progress meter widget is accessible from the progress.ss module.

> (percent? x) : any -> boolean

Does `x' represent a percentage, i.e., is it a number between 0.0
(inclusive) and 1.0 (inclusive)?

> tick/small  : bitmap%
> tick/medium : bitmap%
> tick/large  : bitmap%

Progress meter tick graphics of various sizes in the style of standard
Windows XP progress meters. These are suitable for use as an argument
to the progress-meter% constructor.

> (interface progress-meter<%>)

Methods:

> (send a-pm update-progress x) : percent -> void

Updates the progress meter widget to reflect the given percent.

> (new progress-meter% (parent _) [(width _)] [(enabled _)] [(vert-margin _)] [(horiz-margin _)] [(stretchable-width _)] [(progress _)] [(tick _)]) -> progress-meter% object
parent: frame%, dialog%, panel%, or pane% object
width=256: exact integer in [0, 10000]
enabled=#t: boolean
vert-margin=0: exact integer in [0, 10000]
horiz-margin=0: exact integer in [0, 10000]
stretchable-width=#t: boolean
progress=0.0: real in [0.0, 1.0]
tick=tick/windows-xp: bitmap%

A progress meter widget, probably only really aesthetically
appropriate for Windows XP programs.

READ-ONLY EDITOR WIDGET ==============================================

The read-only editor widget is accessible from the text.ss module.

> (new read-only-text% [(line-spacing _)] [(tab-stops _)] [(auto-wrap _)]) -> read-only-text% object

line-spacing=1.0: non-negative real number
tab-stops=null: list of real numbers
auto-wrap=#f: boolean

A read-only-text% object is a text editor similar to text%, except
that its `insert' and `delete' methods are disabled. This prevents
user interactions from changing the contents of the editor. The class
provides new methods `delete/programmatic' and `insert/programmatic',
which permits programmatic modifications of the contents of the
editor.

Methods:

> (send a-rotext delete/programmatic start end scroll-ok?) -> void

start: exact non-negative integer or 'start
end='back: exact non-negative integer or 'back
scroll-ok?=#t: boolean

Deletes text from the editor exactly as `delete' would.

> (send a-rotext insert/programmatic str start end scroll-ok?) -> void

str: string
start: exact non-negative integer
end='same: exact non-negative integer or 'same
scroll-ok?=#t: boolean

Inserts text into the editor exactly as `insert' would.