-
This commit is contained in:
@@ -86,7 +86,6 @@
|
||||
(write-json (menu->hash menu) o)
|
||||
(get-output-string o)))
|
||||
|
||||
|
||||
(define (find-menu-item menu id)
|
||||
(let ((items (ww-menu-items menu)))
|
||||
(letrec ((f (λ (items)
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
gregor-utils
|
||||
net/sendurl
|
||||
racket/path
|
||||
xml
|
||||
)
|
||||
|
||||
(provide ww-element%
|
||||
@@ -606,6 +607,10 @@
|
||||
(define/public (connect-menu! id cb)
|
||||
(hash-set! menu-cbs id cb))
|
||||
|
||||
(define/public (popup-menu menu-def)
|
||||
(ww-popup-menu win-id menu-def)
|
||||
)
|
||||
|
||||
; files and directories
|
||||
(define/public (file-open caption base-dir filters)
|
||||
(let ((r (ww-file-open win-id caption base-dir filters)))
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
ww-set-icon
|
||||
|
||||
ww-set-menu
|
||||
ww-popup-menu
|
||||
|
||||
ww-set-html-file
|
||||
ww-set-url
|
||||
@@ -805,7 +806,12 @@
|
||||
(def-cmd ww-set-menu
|
||||
set-menu ((win-id ww-win?)
|
||||
(menu is-menu?)) [] -> void)
|
||||
|
||||
|
||||
|
||||
;; Popup a menu
|
||||
(def-cmd ww-popup-menu
|
||||
popup-menu ((win-id ww-win?)
|
||||
(menu is-menu?)) [] -> void)
|
||||
|
||||
(define (new-handle)
|
||||
#t)
|
||||
|
||||
Reference in New Issue
Block a user