23 Number Snip
|
superclass: snip-class% |
method
→ (or/c (is-a?/c snip%) #f) f : (is-a?/c editor-stream-in%) Overrides read in snip-class%.Constructs a number snip from its input.
procedure
(number-snip:make-repeating-decimal-snip num show-prefix?) → number-snip:is-number-snip? num : real? show-prefix? : boolean?
Makes a number snip that shows the decimal expansion for number.
The boolean indicates if a #e prefix appears on the number.
See also number-snip:make-fraction-snip.
procedure
(number-snip:make-fraction-snip num show-prefix-in-decimal-view?) → number-snip:is-number-snip? num : real? show-prefix-in-decimal-view? : boolean?
Makes a number snip that shows a fractional view of number.
The boolean indicates if a #e prefix appears on the number, when
shown in the decimal state.
See also number-snip:make-repeating-decimal-snip.
procedure
v : any/c
Determines if v is a number snip, i.e., created
by number-snip:make-fraction-snip
or number-snip:make-repeating-decimal-snip.
All values that answer #t to this predicate are also snip%s.
procedure
(number-snip:get-number ns) → real?
ns : number-snip:is-number-snip?
Returns the number that this number snip displays.
procedure
(number-snip:remove-decimal-looking-number-snips-on-insertion-mixin text%)
→ (subclass?/c text%) text% : (subclass?/c text%)
Overrides the on-insert and
after-insert to replace number-snip%
objects that look like ASCII with their corresponding ASCII
text.