Documentation added
This commit is contained in:
@@ -10,7 +10,7 @@ The package exports one procedure:
|
||||
|
||||
(rkdt "notes.rkt")
|
||||
```
|
||||
|
||||
|
||||
By default `rkdt` shows the editor and returns immediately. Use `#:wait? #t`
|
||||
when execution should continue only after the editor is closed:
|
||||
|
||||
@@ -22,7 +22,12 @@ The initial window geometry can be specified with `#:width`, `#:height`, `#:x`,
|
||||
and `#:y`. Window positions and sizes are remembered per internal editor number
|
||||
and per screen configuration.
|
||||
|
||||
The frame can be customized with `#:frame-cb`. For example:
|
||||
The frame can be observed or customized with `#:frame-cb`. The callback receives
|
||||
an event symbol and the editor frame. It is called at the lifecycle points
|
||||
`'before-show`, `'after-show`, `'wait-for-close`, and `'on-close`.
|
||||
`'wait-for-close` is emitted only when `#:wait? #t` is used.
|
||||
|
||||
For example, the window title can be changed before the frame becomes visible:
|
||||
|
||||
```racket
|
||||
(require racket/class
|
||||
@@ -30,8 +35,9 @@ The frame can be customized with `#:frame-cb`. For example:
|
||||
|
||||
(rkdt "notes.rkt"
|
||||
#:frame-cb
|
||||
(λ (frame)
|
||||
(send frame set-label "Notes")))
|
||||
(λ (event frame)
|
||||
(when (eq? event 'before-show)
|
||||
(send frame set-label "Notes"))))
|
||||
```
|
||||
|
||||
The standard File menu does not contain the Exit/Quit command, so closing one
|
||||
|
||||
Reference in New Issue
Block a user