{"size": 1330, "ext": "scrbl", "max_stars_repo_path": "gui-doc/scribblings/gui/readable-snip-intf.scrbl", "max_stars_repo_name": "jjsimpso/gui", "max_stars_repo_stars_event_min_datetime": "2015-03-17T22:11:52.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-12T15:09:34.000Z", "max_issues_repo_path": "gui-doc/scribblings/gui/readable-snip-intf.scrbl", "max_issues_repo_name": "jjsimpso/gui", "max_issues_repo_issues_event_min_datetime": "2015-01-09T15:53:25.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T16:21:29.000Z", "max_forks_repo_path": "gui-doc/scribblings/gui/readable-snip-intf.scrbl", "max_forks_repo_name": "jjsimpso/gui", "max_forks_repo_forks_event_min_datetime": "2015-01-08T13:03:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-26T21:49:09.000Z"}
{"max_stars_count": 65, "max_issues_count": 231, "max_forks_count": 89, "avg_line_length": 38.0, "max_line_length": 73, "alphanum_fraction": 0.6917293233}
#lang scribble/doc
@(require "common.rkt")

@definterface/title[readable-snip<%> ()]{

A @racket[readable-snip<%>] object is treated specially by the port
 generated by @racket[open-input-text-editor]: When a
 @racket[readable-snip<%>] object is encountered for the input stream,
 its @method[readable-snip<%> read-special] method is called to
 generate the read result for the snip, which is returned from the
 port as a ``special'' value in the sense of
 @racket[read-char-or-special].

Since @racket[read] and @racket[read-syntax] build on
 @racket[read-char-or-special], a snip can implement
 @racket[readable-snip<%>] so that it produces a whole S-expression or
 some other kind of value when @racket[read] is used on a stream
 containing the snip.

@defmethod[(read-special [source any/c]
                         [line (or/c exact-nonnegative-integer? #f)]
                         [column (or/c exact-nonnegative-integer? #f)]
                         [position (or/c exact-nonnegative-integer? #f)])
           any/c]{

The arguments are the same as the arguments to a procedure returned by
 a custom input port's @racket[_read-in]; see @secref[#:doc '(lib
 "scribblings/reference/reference.scrbl") "customport"] for
 details. The result is also the same as the result from a
 @racket[_read-in]-produced procedure.


}}

