OO interface growing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user