frame callback perfectioned
This commit is contained in:
@@ -1,3 +1,41 @@
|
||||
# rackedit
|
||||
|
||||
Starts a simple racket editor window from DrRacket or the racket command line, given a file to edit.
|
||||
`rackedit` opens a simple Racket editor window for a file. It can be used from
|
||||
DrRacket, from a Racket program, or from the Racket command line.
|
||||
|
||||
The package exports one procedure:
|
||||
|
||||
```racket
|
||||
(require rackedit)
|
||||
|
||||
(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:
|
||||
|
||||
```racket
|
||||
(rkdt "notes.rkt" #:wait? #t)
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
```racket
|
||||
(require racket/class
|
||||
rackedit)
|
||||
|
||||
(rkdt "notes.rkt"
|
||||
#:frame-cb
|
||||
(λ (frame)
|
||||
(send frame set-label "Notes")))
|
||||
```
|
||||
|
||||
The standard File menu does not contain the Exit/Quit command, so closing one
|
||||
editor window does not imply exiting the application that opened it.
|
||||
|
||||
Full API documentation is included as Scribble documentation in
|
||||
`scrbl/rkdt.scrbl`.
|
||||
|
||||
Reference in New Issue
Block a user