On this page:
comment-box: snip%
make-editor
make-snip
get-corner-bitmap
get-position
get-text
get-menu
comment-box: snipclass

8 Comment Box

class

comment-box:snip% : class?

  superclass: editor-snip:decorated%

  extends: readable-snip<%>
This snip implements the comment boxes that you see in DrRacket.

method

(send a-comment-box:snip make-editor)  (is-a?/c text%)

Makes an instance of

method

(send a-comment-box:snip make-snip)  (is-a?/c comment-snip%)

Returns an instance of the comment-snip% class.

method

(send a-comment-box:snip get-corner-bitmap)

  (is-a?/c bitmap%)
Returns the semicolon bitmap from the file

(build-path (collection-path "icons") "semicolon.gif")

method

(send a-comment-box:snip get-position)

  (symbols 'left-top  'top-right)
Returns 'left-top

method

(send a-comment-box:snip get-text)  string

Overrides get-text in snip%.
Returns the same string as the super method, but with newlines replaced by newline-semicolon-space.

method

(send a-comment-box:snip get-menu)  (is-a?/c popup-menu%)

Returns a menu with a single item to change the box into semicolon comments.

The snip-class% object used by comment-box:snip%.