[racket] Racket gui

From: Kieron Hardy (kieron.hardy at gmail.com)
Date: Fri Sep 28 12:18:52 EDT 2012


Most of the GUI is defined in the directories starting at <racket
installation directory>/collects/mred.

I'm not sure what kind of extensions you're looking at doing, but the
frame% class is defined in collects/mred/private/mrtop.rkt.

And you would extend (sub-class) this and the other GUI classes in the
normal way, e.g.

(define my-frame%
  (class frame%
    (init [my-init-field <some default value>])
    ; other definitions etc
    (define/public (new-method x y z)
      ; my-method implementation
    (define/override (old-method x y z)
      ; override implementation
    ; other definitions etc.

(define f (new my-frame% [my-init-field <some value>] ... ))

(send f show #t)

Hope this helps,


On Fri, Sep 28, 2012 at 8:46 AM, <heraklea at gmx.de> wrote:

> Hello,
> where can I find the source to the gui modul. I would like to see how the
> gui framework is implemented.
> Is it possible to extend it with custom frames?
> Yours,
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120928/37f17711/attachment.html>

Posted on the users mailing list.