OO interface growing

This commit is contained in:
2026-03-09 18:04:08 +01:00
parent d45dade325
commit 587c306218
5 changed files with 125 additions and 46 deletions

View File

@@ -2,36 +2,18 @@
(require "racket-webview.rkt"
racket/class
simple-ini/class
"wv-window.rkt"
)
(provide wv-window%
(provide (all from out "wv-window.rkt")
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Classes
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define wv-window%
(define wv-element%
(class object%
(init-field profile
base-dir
[settings #f]
[parent #f]
[title "Racket Webview Window"]
[file-not-found-handler (λ (file base-path path) path)]
)
(define wv #f)
(define (event-handler wv evt)
(displayln evt))
(super-new)
(begin
(set! wv (webview-create
profile
(webview-standard-file-getter base-dir
file-not-found-handler)
event-handler)))
)
)
(init-field element-id