{"size": 1959, "ext": "scrbl", "max_stars_repo_path": "gui-doc/scribblings/gui/editor-wordbreak-map-class.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/editor-wordbreak-map-class.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/editor-wordbreak-map-class.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": 31.0952380952, "max_line_length": 82, "alphanum_fraction": 0.729453803}
#lang scribble/doc
@(require "common.rkt")

@defclass/title[editor-wordbreak-map% object% ()]{

An @racket[editor-wordbreak-map%] objects is used with a
 @racket[text%] objects to specify word-breaking criteria for the
 default wordbreaking function.  See also @method[text%
 set-wordbreak-map], @method[text% get-wordbreak-map], @method[text%
 find-wordbreak], and @method[text% set-wordbreak-func].

A global object @racket[the-editor-wordbreak-map] is created
 automatically and used as the default map for all @racket[text%]
 objects.

A wordbreak objects implements a mapping from each character to a list
  of symbols. The following symbols are legal elements of the list:

@itemize[
@item{@indexed-racket['caret]}
@item{@indexed-racket['line]}
@item{@indexed-racket['selection]}
@item{@indexed-racket['user1]}
@item{@indexed-racket['user2]}
]

The presence of a flag in a character's value indicates that the
 character does not break a word when searching for breaks using the
 corresponding reason. For example, if @racket['caret] is present,
 then the character is a non-breaking character for caret-movement
 words. (Each stream of non-breaking characters is a single word.)



@defconstructor[()]{

All ASCII alpha-numeric characters are initialized with
 @racket['(caret line selection)]. All other ASCII non-whitespace
 characters except @litchar{-} are initialized with
 @racket['(line)]. All ASCII whitespace characters and @litchar{-} are
 initialized with @racket[null].

}

@defmethod[(get-map [char char?])
           (listof (or/c 'caret 'line 'selection 'user1 'user2))]{

Gets the mapping value for @racket[char].  See
@racket[editor-wordbreak-map%] for more information.

}

@defmethod[(set-map [char char?]
                    [value (listof (or/c 'caret 'line 'selection 'user1 'user2))])
           void?]{


Sets the mapping value for @racket[char] to @racket[value].  See
@racket[editor-wordbreak-map%] for more information.

}}

