added support for specifying the modifier prefix to the standard menus class and then used it for cmd-shift-z in the redo menu (on the mac)

svn: r10599
This commit is contained in:
Robby Findler 2008-07-04 15:59:44 +00:00
parent 6d2e46fcff
commit c7e2c34b81
5 changed files with 1537 additions and 2388 deletions

View File

@ -1,118 +1,206 @@
#reader scribble/reader
#lang scheme
(module gen-standard-menus mzscheme (require scheme/pretty
(require mzlib/pretty) scheme/runtime-path)
(require mzlib/list) (require "standard-menus-items.ss")
(require "standard-menus-items.ss")
;; build-before-super-item-clause : an-item -> (listof clause) (define-runtime-path here ".")
(define build-before-super-item-clause
(λ (item) ;; build-before-super-item-clause : an-item -> (listof clause)
(define build-before-super-item-clause
(λ (item)
(list
`[define/public ,(an-item->callback-name item) ,(an-item-proc item)]
`(define/public (,(an-item->get-item-name item))
,(an-item->item-name item))
`(define/public (,(an-item->string-name item))
,(an-item-menu-string item))
`(define/public (,(an-item->help-string-name item))
,(an-item-help-string item))
`(define/public ,(an-item->on-demand-name item) ,(an-item-on-demand item))
`(define/public (,(an-item->create-menu-item-name item))
,(an-item-create item)))))
;; build-before-super-clause : ((X -> sym) (X sexp) -> X -> (listof clause))
(define build-before-super-clause
(λ (->name -procedure)
(λ (obj)
(list `(define/public ,(->name obj)
,(case (-procedure obj)
[(nothing) '(λ (menu) (void))]
[(separator) '(λ (menu) (make-object separator-menu-item% menu))]
[(nothing-with-standard-menus)
'(λ (menu)
(unless (current-eventspace-has-standard-menus?)
(make-object separator-menu-item% menu)))]
[else (error 'gen-standard-menus "unknown between sym: ~e" (-procedure obj))]))))))
;; build-before-super-between-clause : between -> (listof clause)
(define build-before-super-between-clause
(build-before-super-clause
between->name
between-procedure))
;; build-before-super-before/after-clause : before/after -> (listof clause)
(define build-before-super-before/after-clause
(build-before-super-clause
before/after->name
before/after-procedure))
;; build-after-super-item-clause : an-item -> (list clause)
(define (build-after-super-item-clause item)
(let* ([callback-name (an-item->callback-name item)]
[create-menu-item-name (an-item->create-menu-item-name item)]
[callback-name-string (symbol->string callback-name)]
[key (an-item-shortcut item)])
(list `(define
,(an-item->item-name item)
(and (,create-menu-item-name)
,(if (a-submenu-item? item)
`(new (get-menu%)
(label (,(an-item->string-name item)))
(parent ,(menu-item-menu-name item))
(help-string (,(an-item->help-string-name item)))
(demand-callback (λ (menu-item) (,(an-item->on-demand-name item) menu-item))))
`(new (get-menu-item%)
(label (,(an-item->string-name item)))
(parent ,(menu-item-menu-name item))
(callback (let ([,callback-name (λ (item evt) (,callback-name item evt))])
,callback-name))
(shortcut ,key)
(shortcut-prefix ,(an-item-shortcut-prefix item))
(help-string (,(an-item->help-string-name item)))
(demand-callback (λ (menu-item) (,(an-item->on-demand-name item) menu-item))))))))))
;; build-after-super-clause : ((X -> symbol) -> X -> (listof clause))
(define build-after-super-clause
(λ (->name)
(λ (between/after)
(list (list
`[define/public ,(an-item->callback-name item) ,(an-item-proc item)] `(,(->name between/after)
`(define/public (,(an-item->get-item-name item)) (,(menu-name->get-menu-name between/after)))))))
,(an-item->item-name item))
`(define/public (,(an-item->string-name item))
,(an-item-menu-string item))
`(define/public (,(an-item->help-string-name item))
,(an-item-help-string item))
`(define/public ,(an-item->on-demand-name item) ,(an-item-on-demand item))
`(define/public (,(an-item->create-menu-item-name item))
,(an-item-create item)))))
;; build-before-super-clause : ((X -> sym) (X sexp) -> X -> (listof clause)) ;; build-after-super-between-clause : between -> (listof clause)
(define build-before-super-clause (define build-after-super-between-clause (build-after-super-clause between->name))
(λ (->name -procedure) ;; build-after-super-before/after-clause : before/after -> (listof clause)
(λ (obj) (define build-after-super-before/after-clause (build-after-super-clause before/after->name))
(list `(define/public ,(->name obj)
,(case (-procedure obj)
[(nothing) '(λ (menu) (void))]
[(separator) '(λ (menu) (make-object separator-menu-item% menu))]
[(nothing-with-standard-menus)
'(λ (menu)
(unless (current-eventspace-has-standard-menus?)
(make-object separator-menu-item% menu)))]
[else (error 'gen-standard-menus "unknown between sym: ~e" (-procedure obj))]))))))
;; build-before-super-between-clause : between -> (listof clause) ;; build-after-super-generic-clause : generic -> (listof clause)
(define build-before-super-between-clause (define (build-after-super-generic-clause x)
(build-before-super-clause (cond
between->name [(generic-private-field? x)
between-procedure)) (list `(define
,(generic-name x)
,(generic-initializer x)))]
[(generic-override? x)
(list)]
[(generic-augment? x)
(list)]
[(generic-method? x)
null]))
;; build-before-super-before/after-clause : before/after -> (listof clause) ;; build-before-super-generic-clause : generic -> (listof clause)
(define build-before-super-before/after-clause (define (build-before-super-generic-clause generic)
(build-before-super-clause (cond
before/after->name [(generic-private-field? generic)
before/after-procedure)) null]
[(generic-override? generic)
(list `(define/override ,(generic-name generic)
,(generic-initializer generic)))]
[(generic-augment? generic)
(list `(define/augment ,(generic-name generic)
,(generic-initializer generic)))]
[(generic-method? generic)
(list `(define/public ,(generic-name generic)
,(generic-initializer generic)))]))
;; build-after-super-item-clause : an-item -> (list clause) (define standard-menus.ss-filename (build-path here "standard-menus.ss"))
(define (build-after-super-item-clause item) (define docs-menus.ss-filename (simplify-path (build-path here 'up 'up "scribblings" "framework" "standard-menus.scrbl")))
(let* ([callback-name (an-item->callback-name item)]
[create-menu-item-name (an-item->create-menu-item-name item)]
[callback-name-string (symbol->string callback-name)]
[key (an-item-key item)])
(list `(define
,(an-item->item-name item)
(and (,create-menu-item-name)
,(if (a-submenu-item? item)
`(instantiate (get-menu%) ()
(label (,(an-item->string-name item)))
(parent ,(menu-item-menu-name item))
(help-string (,(an-item->help-string-name item)))
(demand-callback (λ (menu-item) (,(an-item->on-demand-name item) menu-item))))
`(instantiate (get-menu-item%) ()
(label (,(an-item->string-name item)))
(parent ,(menu-item-menu-name item))
(callback (let ([,callback-name (λ (item evt) (,callback-name item evt))])
,callback-name))
(shortcut ,key)
(help-string (,(an-item->help-string-name item)))
(demand-callback (λ (menu-item) (,(an-item->on-demand-name item) menu-item))))))))))
;; build-after-super-clause : ((X -> symbol) -> X -> (listof clause)) (define (main)
(define build-after-super-clause (write-standard-menus.ss)
(λ (->name) (write-docs))
(λ (between/after)
(list
`(,(->name between/after)
(,(menu-name->get-menu-name between/after)))))))
;; build-after-super-between-clause : between -> (listof clause) (define (write-docs)
(define build-after-super-between-clause (build-after-super-clause between->name)) (printf "writing to ~a~n" docs-menus.ss-filename)
;; build-after-super-before/after-clause : before/after -> (listof clause) (call-with-output-file docs-menus.ss-filename
(define build-after-super-before/after-clause (build-after-super-clause before/after->name)) (λ (port)
(define (pop-out sexp)
(display "@" port)
(write sexp port)
(newline port)
(newline port))
(display docs-header-text port)
(for-each (λ (x)
(cond
[(generic/docs? x)
(for-each
(λ (x) (unless (string? x) (pop-out x)))
(generic/docs-documentation x))]
[(before/after? x)
(pop-out
`@defmethod[(,(before/after->name x) [menu (is-a?/c menu-item%)]) void?]{
This method is called @,(if (before? x) "before" "after") the addition of the
@tt[,(format "~a" (before/after-name x))] menu-item. Override it to add additional
menu items at that point. })]
[(between? x)
(pop-out
`@defmethod[(,(between->name x) [menu (is-a?/c menu-item%)]) void?]{
This method is called between the addition of the
@tt[,(format "~a" (between-before x))] and the @tt[,(format "~a" (between-after x))] menu-item.
Override it to add additional menu items at that point. })]
[(an-item? x)
(pop-out
`@defmethod[(,(an-item->get-item-name x)) (or/c false/c (is-a?/c menu-item%))]{
This method returns the @scheme[menu-item%] object corresponding
to this menu item, if it has been created (as controlled by
@method[frame:standard-menus<%> ,(an-item->create-menu-item-name x)]).})
;; build-after-super-generic-clause : generic -> (listof clause) (pop-out
(define (build-after-super-generic-clause x) `@defmethod[(,(an-item->create-menu-item-name x)) boolean?]{
(cond The result of this method determines if the corresponding
[(generic-private-field? x) menu item is created. Override it to control the creation of the menu item.
(list `(define
,(generic-name x)
,(generic-initializer x)))]
[(generic-override? x)
(list)]
[(generic-augment? x)
(list)]
[(generic-method? x)
null]))
;; build-before-super-generic-clause : generic -> (listof clause) Defaults to @scheme[,(an-item-create x)].})
(define (build-before-super-generic-clause generic)
(cond
[(generic-private-field? generic)
null]
[(generic-override? generic)
(list `(define/override ,(generic-name generic)
,(generic-initializer generic)))]
[(generic-augment? generic)
(list `(define/augment ,(generic-name generic)
,(generic-initializer generic)))]
[(generic-method? generic)
(list `(define/public ,(generic-name generic)
,(generic-initializer generic)))]))
(match (an-item-proc x)
[`(λ (,item-name ,evt-name) ,bodies ...)
(pop-out
`@defmethod[(,(an-item->callback-name x)
[,item-name (is-a?/c menu-item%)]
[,evt-name (is-a?/c control-event%)])
void?]{
Defaults to @schemeblock[,(if (= 1 (length bodies))
(car bodies)
`(begin ,@bodies))] })])
(define standard-menus.ss-filename (build-path (collection-path "framework" "private") "standard-menus.ss")) (match (an-item-on-demand x)
[`(λ (,item-name) ,body)
(pop-out
`@defmethod[(,(an-item->on-demand-name x) [,item-name (is-a?/c menu-item%)]) void?]{
The menu item's on-demand proc calls this method.
Defaults to @schemeblock[,body]})])
(pop-out
`@defmethod[(,(an-item->string-name x)) string?]{
The result of this method is used as the name of the @scheme[menu-item%].
Defaults to @scheme[,(an-item-menu-string x)].})
(pop-out
`@defmethod[(,(an-item->help-string-name x)) string?]{
The result of this method is used as the help string
when the @scheme[menu-item%] object is created.
Defaults to @scheme[,(an-item-help-string x)].})]))
items)
(display docs-footer-text port))
#:exists 'truncate))
(define (write-standard-menus.ss)
(printf "writing to ~a~n" standard-menus.ss-filename) (printf "writing to ~a~n" standard-menus.ss-filename)
(call-with-output-file standard-menus.ss-filename (call-with-output-file standard-menus.ss-filename
@ -182,5 +270,16 @@
items)) items))
(reorder-menus this))) (reorder-menus this)))
port)) port))
'text #:mode 'text
'truncate)) #:exists 'truncate))
(define docs-footer-text "}")
(define docs-header-text #<<--
;; THIS FILE IS GENERATED. DO NOT EDIT.
@definterface[frame:standard-menus<%> (frame:basic<%>)]{
--
)

View File

@ -1,387 +1,399 @@
(module standard-menus-items mzscheme #reader scribble/reader
#lang scheme/base
(provide (provide
(struct generic (name initializer)) (struct-out generic)
(struct generic/docs (documentation)) (struct-out generic/docs)
(struct generic-override ()) (struct-out generic-override)
(struct generic-augment ()) (struct-out generic-augment)
(struct generic-method ()) (struct-out generic-method)
(struct generic-private-field ()) (struct-out generic-private-field)
(struct menu-item (menu-name)) (struct-out menu-item)
menu-name->get-menu-name ;; : menu-item -> symbol menu-name->get-menu-name ;; : menu-item -> symbol
(struct before/after (name procedure)) (struct-out before/after)
(struct before ()) (struct-out before)
(struct after ()) (struct-out after)
(struct between (before after procedure)) (struct-out between)
(struct an-item (item-name help-string proc key menu-string on-demand create)) (struct-out an-item)
(struct a-submenu-item ()) (struct-out a-submenu-item)
;; an-item -> symbol ;; an-item -> symbol
;; calcualates the names of various identifiers associated with the item. ;; calcualates the names of various identifiers associated with the item.
an-item->callback-name an-item->callback-name
an-item->create-menu-item-name an-item->create-menu-item-name
an-item->get-item-name an-item->get-item-name
an-item->item-name an-item->item-name
an-item->on-demand-name an-item->on-demand-name
an-item->string-name an-item->string-name
an-item->help-string-name an-item->help-string-name
before/after->name before/after->name
between->name between->name
items) items)
(define-struct generic (name initializer)) (define-struct generic (name initializer))
(define-struct (generic/docs generic) (documentation)) (define-struct (generic/docs generic) (documentation))
(define-struct (generic-override generic/docs) ()) (define-struct (generic-override generic/docs) ())
(define-struct (generic-augment generic/docs) ()) (define-struct (generic-augment generic/docs) ())
(define-struct (generic-method generic/docs) ()) (define-struct (generic-method generic/docs) ())
(define-struct (generic-private-field generic) ()) (define-struct (generic-private-field generic) ())
(define-struct menu-item (menu-name)) (define-struct menu-item (menu-name))
(define (menu-name->get-menu-name menu-item) (define (menu-name->get-menu-name menu-item)
(string->symbol (string->symbol
(format "get-~a" (menu-item-menu-name menu-item)))) (format "get-~a" (menu-item-menu-name menu-item))))
(define-struct (before/after menu-item) (name procedure)) (define-struct (before/after menu-item) (name procedure))
(define-struct (before before/after) ()) (define-struct (before before/after) ())
(define-struct (after before/after) ()) (define-struct (after before/after) ())
(define (before/after->name before/after) (define (before/after->name before/after)
(string->symbol (format "~a:~a-~a" (string->symbol (format "~a:~a-~a"
(menu-item-menu-name before/after) (menu-item-menu-name before/after)
(if (before? before/after) (if (before? before/after)
"before" "before"
"after") "after")
(before/after-name before/after)))) (before/after-name before/after))))
(define-struct (between menu-item) (before after procedure)) (define-struct (between menu-item) (before after procedure))
(define (between->name between) (define (between->name between)
(string->symbol (format "~a:between-~a-and-~a" (string->symbol (format "~a:between-~a-and-~a"
(menu-item-menu-name between) (menu-item-menu-name between)
(between-before between) (between-before between)
(between-after between)))) (between-after between))))
(define-struct (an-item menu-item) (define-struct (an-item menu-item)
(item-name (item-name
help-string help-string
proc proc
key shortcut
menu-string shortcut-prefix
on-demand menu-string
create)) on-demand
(define-struct (a-submenu-item an-item) ()) create))
(define-struct (a-submenu-item an-item) ())
(define (an-item->callback-name item) (define (an-item->callback-name item)
(string->symbol (string->symbol
(format "~a:~a-callback" (menu-item-menu-name item) (an-item-item-name item)))) (format "~a:~a-callback" (menu-item-menu-name item) (an-item-item-name item))))
(define (an-item->create-menu-item-name item) (define (an-item->create-menu-item-name item)
(string->symbol (string->symbol
(format "~a:create-~a?" (menu-item-menu-name item) (an-item-item-name item)))) (format "~a:create-~a?" (menu-item-menu-name item) (an-item-item-name item))))
(define (an-item->get-item-name item) (define (an-item->get-item-name item)
(string->symbol (string->symbol
(format "~a:get-~a-item" (menu-item-menu-name item) (an-item-item-name item)))) (format "~a:get-~a-item" (menu-item-menu-name item) (an-item-item-name item))))
(define (an-item->item-name item) (define (an-item->item-name item)
(string->symbol (string->symbol
(format "~a:~a-item" (menu-item-menu-name item) (an-item-item-name item)))) (format "~a:~a-item" (menu-item-menu-name item) (an-item-item-name item))))
(define (an-item->on-demand-name item) (define (an-item->on-demand-name item)
(string->symbol (string->symbol
(format "~a:~a-on-demand" (menu-item-menu-name item) (an-item-item-name item)))) (format "~a:~a-on-demand" (menu-item-menu-name item) (an-item-item-name item))))
(define (an-item->string-name item) (define (an-item->string-name item)
(string->symbol (string->symbol
(format "~a:~a-string" (menu-item-menu-name item) (an-item-item-name item)))) (format "~a:~a-string" (menu-item-menu-name item) (an-item-item-name item))))
(define (an-item->help-string-name item) (define (an-item->help-string-name item)
(string->symbol (string->symbol
(format "~a:~a-help-string" (menu-item-menu-name item) (an-item-item-name item)))) (format "~a:~a-help-string" (menu-item-menu-name item) (an-item-item-name item))))
(define (edit-menu:do const) (define (edit-menu:do const)
`(λ (menu evt) `(λ (menu evt)
(let ([edit (get-edit-target-object)]) (let ([edit (get-edit-target-object)])
(when (and edit (when (and edit
(is-a? edit editor<%>)) (is-a? edit editor<%>))
(send edit do-edit-operation ',const))) (send edit do-edit-operation ',const)))
#t)) #t))
(define (edit-menu:can-do-on-demand const) (define (edit-menu:can-do-on-demand const)
`(λ (item) `(λ (item)
(let* ([editor (get-edit-target-object)] (let* ([editor (get-edit-target-object)]
[enable? [enable?
(and editor (and editor
(is-a? editor editor<%>) (is-a? editor editor<%>)
(send editor can-do-edit-operation? ',const))]) (send editor can-do-edit-operation? ',const))])
(send item enable enable?)))) (send item enable enable?))))
(define edit-menu:edit-target-on-demand (define edit-menu:edit-target-on-demand
`(λ (item) `(λ (item)
(send item enable (send item enable
(let ([target (get-edit-target-object)]) (let ([target (get-edit-target-object)])
(and target (is-a? target editor<%>)))))) (and target (is-a? target editor<%>))))))
(define on-demand-do-nothing '(λ (menu-item) (void))) (define on-demand-do-nothing '(λ (menu-item) (void)))
(define items (define items
(list (make-generic-augment (list (make-generic-augment
'on-close 'on-close
'(lambda () '(λ ()
(remove-prefs-callback) (remove-prefs-callback)
(inner (void) on-close)) (inner (void) on-close))
'("@return : void" (list
"Removes the preferences callbacks for the menu items")) '@defmethod[(on-close) void?]{
(make-generic-method Removes the preferences callbacks for the menu items
'get-menu% '(λ () menu:can-restore-underscore-menu%) }))
'("The result of this method is used as the class" (make-generic-method
"for creating the result of these methods:" 'get-menu% '(λ () menu:can-restore-underscore-menu%)
"@ilink frame:standard-menus get-file-menu %" (list
", " '@defmethod[(get-menu%)
"@ilink frame:standard-menus get-edit-menu %" (is-a?/c menu:can-restore-underscore-menu%)]{
", " The result of this method is used as the class
"@ilink frame:standard-menus get-help-menu %" for creating the result of these methods:
". " @method[frame:standard-menus get-file-menu],
"" @method[frame:standard-menus get-edit-menu], and
"@return : (derived-from \\iscmclass{menu:can-restore-underscore-menu})" @method[frame:standard-menus get-help-menu].}))
"" (make-generic-method
"defaultly returns" 'get-menu-item% '(λ () menu:can-restore-menu-item%)
"@link menu")) (list
(make-generic-method '@defmethod[(get-menu-item%) (is-a?/c menu:can-restore-menu-item%)]{
'get-menu-item% '(λ () menu:can-restore-menu-item%) The result of this method is used as the class for creating
'("The result of this method is used as the class for creating" the menu items in this frame.
"the menu items in this frame (see "
"@link frame:standard-menus"
"for a list)."
""
"@return : (derived-from \\iscmclass{menu-item})"
""
"defaultly returns"
"@link menu:can-restore-menu-item %"
"."))
(make-generic-method
'get-checkable-menu-item% '(λ () menu:can-restore-checkable-menu-item%)
'("The result of this method is used as the class for creating"
"checkable menu items in this class (see "
"@link frame:standard-menus"
"for a list)."
""
"@return : (derived-from \\iscmclass{checkable-menu-item})"
""
"defaultly returns"
"@link menu:can-restore-checkable-menu-item %"
"."))
(make-generic-method Defaultly returns @scheme[menu:can-restore-menu-item].}))
'get-file-menu (make-generic-method
'(λ () file-menu) 'get-checkable-menu-item% '(λ () menu:can-restore-checkable-menu-item%)
'("Returns the file menu" (list
"See also" '@defmethod[(get-checkable-menu-item%) (is-a?/c menu:can-restore-checkable-menu-item%)]{
"@ilink frame:standard-menus get-menu\\%" The result of this method is used as the class for creating
"" checkable menu items in this class.
"@return : (instance (derived-from \\iscmclass{menu}))"))
(make-generic-private-field
'file-menu
'(make-object (get-menu%)
(string-constant file-menu-label)
(get-menu-bar)))
(make-generic-method
'get-edit-menu
'(λ () edit-menu)
'("Returns the edit menu" Defaultly returns @scheme[menu:can-restore-checkable-menu-item].}))
"See also"
"@ilink frame:standard-menus get-menu\\%"
""
"@return : (instance (derived-from \\iscmclass{menu}))"))
(make-generic-private-field
'edit-menu
'(make-object (get-menu%) (string-constant edit-menu-label) (get-menu-bar)))
(make-generic-method
'get-help-menu
'(λ () help-menu)
'("Returns the help menu" (make-generic-method
"See also" 'get-file-menu
"@ilink frame:standard-menus get-menu\\%" '(λ () file-menu)
"" (list
"@return : (instance (derived-from \\iscmclass{menu}))")) '@defmethod[(get-file-menu) (is-a?/c menu%)]{
(make-generic-private-field Returns the file menu.
'help-menu See also @method[frame:standard-menus<%> get-menu%].}))
'(make-object (get-menu%) (string-constant help-menu-label) (get-menu-bar)))
(make-an-item 'file-menu 'new (make-generic-private-field
'(string-constant new-info) 'file-menu
'(λ (item control) (handler:edit-file #f) #t) '(make-object (get-menu%)
#\n (string-constant file-menu-label)
'(string-constant new-menu-item) (get-menu-bar)))
on-demand-do-nothing (make-generic-method
#t) 'get-edit-menu
(make-between 'file-menu 'new 'open 'nothing) '(λ () edit-menu)
(make-an-item 'file-menu 'open '(string-constant open-info) (list
'(λ (item control) (handler:open-file) #t) '@defmethod[(get-edit-menu) (is-a?/c menu%)]{
#\o Returns the edit menu.
'(string-constant open-menu-item) See also @method[frame:standard-menus<%> get-menu%].}))
on-demand-do-nothing (make-generic-private-field
#t) 'edit-menu
(make-a-submenu-item 'file-menu 'open-recent '(make-object (get-menu%) (string-constant edit-menu-label) (get-menu-bar)))
'(string-constant open-recent-info) (make-generic-method
'(λ (x y) (void)) 'get-help-menu
#f '(λ () help-menu)
'(string-constant open-recent-menu-item) (list
'(λ (menu) '@defmethod[(get-help-menu) (is-a?/c menu%)]{
(handler:install-recent-items menu)) Returns the help menu.
#t) See also @method[frame:standard-menus<%> get-menu%].}))
(make-between 'file-menu 'open 'revert 'nothing) (make-generic-private-field
(make-an-item 'file-menu 'revert 'help-menu
'(string-constant revert-info) '(make-object (get-menu%) (string-constant help-menu-label) (get-menu-bar)))
'(λ (item control) (void))
#f
'(string-constant revert-menu-item)
on-demand-do-nothing
#f)
(make-between 'file-menu 'revert 'save 'nothing)
(make-an-item 'file-menu 'save
'(string-constant save-info)
'(λ (item control) (void))
#\s
'(string-constant save-menu-item)
on-demand-do-nothing
#f)
(make-an-item 'file-menu 'save-as
'(string-constant save-as-info)
'(λ (item control) (void))
#f
'(string-constant save-as-menu-item)
on-demand-do-nothing
#f)
(make-between 'file-menu 'save-as 'print 'nothing)
(make-an-item 'file-menu 'print
'(string-constant print-info)
'(λ (item control) (void))
#\p
'(string-constant print-menu-item)
on-demand-do-nothing
#f)
(make-between 'file-menu 'print 'close 'separator)
(make-an-item 'file-menu 'close
'(string-constant close-info)
'(λ (item control) (when (can-close?) (on-close) (show #f)) #t)
#\w
'(string-constant close-menu-item)
on-demand-do-nothing
#t)
(make-between 'file-menu 'close 'quit 'nothing)
(make-an-item 'file-menu 'quit
'(string-constant quit-info)
'(λ (item control)
(when (exit:user-oks-exit)
(exit:exit)))
#\q
'(if (eq? (system-type) 'windows)
(string-constant quit-menu-item-windows)
(string-constant quit-menu-item-others))
on-demand-do-nothing
'(not (current-eventspace-has-standard-menus?)))
(make-after 'file-menu 'quit 'nothing)
(make-an-item 'edit-menu 'undo (make-an-item 'file-menu 'new
'(string-constant undo-info) '(string-constant new-info)
(edit-menu:do 'undo) '(λ (item control) (handler:edit-file #f) #t)
#\z #\n
'(string-constant undo-menu-item) '(get-default-shortcut-prefix)
(edit-menu:can-do-on-demand 'undo) '(string-constant new-menu-item)
#t) on-demand-do-nothing
(make-an-item 'edit-menu 'redo #t)
'(string-constant redo-info) (make-between 'file-menu 'new 'open 'nothing)
(edit-menu:do 'redo) (make-an-item 'file-menu 'open '(string-constant open-info)
#\y '(λ (item control) (handler:open-file) #t)
'(string-constant redo-menu-item) #\o
(edit-menu:can-do-on-demand 'redo) '(get-default-shortcut-prefix)
#t) '(string-constant open-menu-item)
(make-between 'edit-menu 'redo 'cut 'separator) on-demand-do-nothing
(make-an-item 'edit-menu 'cut '(string-constant cut-info) #t)
(edit-menu:do 'cut) (make-a-submenu-item 'file-menu 'open-recent
#\x '(string-constant open-recent-info)
'(string-constant cut-menu-item) '(λ (x y) (void))
(edit-menu:can-do-on-demand 'cut) #f
#t) '(get-default-shortcut-prefix)
(make-between 'edit-menu 'cut 'copy 'nothing) '(string-constant open-recent-menu-item)
(make-an-item 'edit-menu 'copy '(λ (menu)
'(string-constant copy-info) (handler:install-recent-items menu))
(edit-menu:do 'copy) #t)
#\c (make-between 'file-menu 'open 'revert 'nothing)
'(string-constant copy-menu-item) (make-an-item 'file-menu 'revert
(edit-menu:can-do-on-demand 'copy) '(string-constant revert-info)
#t) '(λ (item control) (void))
(make-between 'edit-menu 'copy 'paste 'nothing) #f
(make-an-item 'edit-menu 'paste '(get-default-shortcut-prefix)
'(string-constant paste-info) '(string-constant revert-menu-item)
(edit-menu:do 'paste) on-demand-do-nothing
#\v #f)
'(string-constant paste-menu-item) (make-between 'file-menu 'revert 'save 'nothing)
(edit-menu:can-do-on-demand 'paste) (make-an-item 'file-menu 'save
#t) '(string-constant save-info)
(make-between 'edit-menu 'paste 'clear 'nothing) '(λ (item control) (void))
(make-an-item 'edit-menu 'clear #\s
'(string-constant clear-info) '(get-default-shortcut-prefix)
(edit-menu:do 'clear) '(string-constant save-menu-item)
#f on-demand-do-nothing
'(if (eq? (system-type) 'windows) #f)
(string-constant clear-menu-item-windows) (make-an-item 'file-menu 'save-as
(string-constant clear-menu-item-windows)) '(string-constant save-as-info)
(edit-menu:can-do-on-demand 'clear) '(λ (item control) (void))
#t) #f
(make-between 'edit-menu 'clear 'select-all 'nothing) '(get-default-shortcut-prefix)
(make-an-item 'edit-menu 'select-all '(string-constant save-as-menu-item)
'(string-constant select-all-info) on-demand-do-nothing
(edit-menu:do 'select-all) #f)
#\a (make-between 'file-menu 'save-as 'print 'nothing)
'(string-constant select-all-menu-item) (make-an-item 'file-menu 'print
(edit-menu:can-do-on-demand 'select-all) '(string-constant print-info)
#t) '(λ (item control) (void))
(make-between 'edit-menu 'select-all 'find 'separator) #\p
'(get-default-shortcut-prefix)
'(string-constant print-menu-item)
on-demand-do-nothing
#f)
(make-between 'file-menu 'print 'close 'separator)
(make-an-item 'file-menu 'close
'(string-constant close-info)
'(λ (item control) (when (can-close?) (on-close) (show #f)) #t)
#\w
'(get-default-shortcut-prefix)
'(string-constant close-menu-item)
on-demand-do-nothing
#t)
(make-between 'file-menu 'close 'quit 'nothing)
(make-an-item 'file-menu 'quit
'(string-constant quit-info)
'(λ (item control)
(when (exit:user-oks-exit)
(exit:exit)))
#\q
'(get-default-shortcut-prefix)
'(if (eq? (system-type) 'windows)
(string-constant quit-menu-item-windows)
(string-constant quit-menu-item-others))
on-demand-do-nothing
'(not (current-eventspace-has-standard-menus?)))
(make-after 'file-menu 'quit 'nothing)
(make-an-item 'edit-menu 'find (make-an-item 'edit-menu 'undo
'(string-constant find-info) '(string-constant undo-info)
'(λ (item control) (void)) (edit-menu:do 'undo)
#\f #\z
'(string-constant find-menu-item) '(get-default-shortcut-prefix)
edit-menu:edit-target-on-demand '(string-constant undo-menu-item)
#f) (edit-menu:can-do-on-demand 'undo)
(make-an-item 'edit-menu 'find-again #t)
'(string-constant find-again-info) (make-an-item 'edit-menu 'redo
'(λ (item control) (void)) '(string-constant redo-info)
#\g (edit-menu:do 'redo)
'(string-constant find-again-menu-item) '(if (eq? (system-type) 'macosx)
edit-menu:edit-target-on-demand #\z
#f) #\y)
(make-an-item 'edit-menu 'replace-and-find-again '(if (eq? (system-type) 'macosx)
'(string-constant replace-and-find-again-info) (cons 'shift (get-default-shortcut-prefix))
'(λ (item control) (void)) (get-default-shortcut-prefix))
'(if (eq? (system-type) 'macosx) #f #\h) '(string-constant redo-menu-item)
'(string-constant replace-and-find-again-menu-item) (edit-menu:can-do-on-demand 'redo)
edit-menu:edit-target-on-demand #t)
#f) (make-between 'edit-menu 'redo 'cut 'separator)
(make-an-item 'edit-menu 'cut '(string-constant cut-info)
(edit-menu:do 'cut)
#\x
'(get-default-shortcut-prefix)
'(string-constant cut-menu-item)
(edit-menu:can-do-on-demand 'cut)
#t)
(make-between 'edit-menu 'cut 'copy 'nothing)
(make-an-item 'edit-menu 'copy
'(string-constant copy-info)
(edit-menu:do 'copy)
#\c
'(get-default-shortcut-prefix)
'(string-constant copy-menu-item)
(edit-menu:can-do-on-demand 'copy)
#t)
(make-between 'edit-menu 'copy 'paste 'nothing)
(make-an-item 'edit-menu 'paste
'(string-constant paste-info)
(edit-menu:do 'paste)
#\v
'(get-default-shortcut-prefix)
'(string-constant paste-menu-item)
(edit-menu:can-do-on-demand 'paste)
#t)
(make-between 'edit-menu 'paste 'clear 'nothing)
(make-an-item 'edit-menu 'clear
'(string-constant clear-info)
(edit-menu:do 'clear)
#f
'(get-default-shortcut-prefix)
'(if (eq? (system-type) 'windows)
(string-constant clear-menu-item-windows)
(string-constant clear-menu-item-windows))
(edit-menu:can-do-on-demand 'clear)
#t)
(make-between 'edit-menu 'clear 'select-all 'nothing)
(make-an-item 'edit-menu 'select-all
'(string-constant select-all-info)
(edit-menu:do 'select-all)
#\a
'(get-default-shortcut-prefix)
'(string-constant select-all-menu-item)
(edit-menu:can-do-on-demand 'select-all)
#t)
(make-between 'edit-menu 'select-all 'find 'separator)
(make-between 'edit-menu 'find 'preferences 'nothing-with-standard-menus) (make-an-item 'edit-menu 'find
(make-an-item 'edit-menu 'preferences '(string-constant find-info)
'(string-constant preferences-info) '(λ (item control) (void))
'(λ (item control) (preferences:show-dialog) #t) #\f
'(case (system-type) '(get-default-shortcut-prefix)
[(macosx) #\,] '(string-constant find-menu-item)
[else #\;]) edit-menu:edit-target-on-demand
'(string-constant preferences-menu-item) #f)
on-demand-do-nothing (make-an-item 'edit-menu 'find-again
'(not (current-eventspace-has-standard-menus?))) '(string-constant find-again-info)
(make-after 'edit-menu 'preferences 'nothing) '(λ (item control) (void))
#\g
'(get-default-shortcut-prefix)
'(string-constant find-again-menu-item)
edit-menu:edit-target-on-demand
#f)
(make-an-item 'edit-menu 'replace-and-find-again
'(string-constant replace-and-find-again-info)
'(λ (item control) (void))
'(if (eq? (system-type) 'macosx) #f #\h)
'(get-default-shortcut-prefix)
'(string-constant replace-and-find-again-menu-item)
edit-menu:edit-target-on-demand
#f)
(make-before 'help-menu 'about 'nothing) (make-between 'edit-menu 'find 'preferences 'nothing-with-standard-menus)
(make-an-item 'help-menu 'about (make-an-item 'edit-menu 'preferences
'(string-constant about-info) '(string-constant preferences-info)
'(λ (item control) (void)) '(λ (item control) (preferences:show-dialog) #t)
#f '(case (system-type)
'(string-constant about-menu-item) [(macosx) #\,]
on-demand-do-nothing [else #\;])
#f) '(get-default-shortcut-prefix)
(make-after 'help-menu 'about 'nothing)))) '(string-constant preferences-menu-item)
on-demand-do-nothing
'(not (current-eventspace-has-standard-menus?)))
(make-after 'edit-menu 'preferences 'nothing)
(make-before 'help-menu 'about 'nothing)
(make-an-item 'help-menu 'about
'(string-constant about-info)
'(λ (item control) (void))
#f
'(get-default-shortcut-prefix)
'(string-constant about-menu-item)
on-demand-do-nothing
#f)
(make-after 'help-menu 'about 'nothing)))

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,304 @@
;; THIS FILE IS GENERATED. DO NOT EDIT.
@definterface[frame:standard-menus<%> (frame:basic<%>)]{
@(defmethod (on-close) void? "Removes the preferences callbacks for the menu items")
@(defmethod (get-menu%) (is-a?/c menu:can-restore-underscore-menu%) "The result of this method is used as the class" "\n" " " "for creating the result of these methods:" "\n" " " (method frame:standard-menus get-file-menu) "," "\n" " " (method frame:standard-menus get-edit-menu) ", and" "\n" " " (method frame:standard-menus get-help-menu) ".")
@(defmethod (get-menu-item%) (is-a?/c menu:can-restore-menu-item%) "The result of this method is used as the class for creating" "\n" "the menu items in this frame." "\n" "\n" "Defaultly returns " (scheme menu:can-restore-menu-item) ".")
@(defmethod (get-checkable-menu-item%) (is-a?/c menu:can-restore-checkable-menu-item%) "The result of this method is used as the class for creating" "\n" "checkable menu items in this class." "\n" "\n" "Defaultly returns " (scheme menu:can-restore-checkable-menu-item) ".")
@(defmethod (get-file-menu) (is-a?/c menu%) "Returns the file menu." "\n" "See also " (method frame:standard-menus<%> get-menu%) ".")
@(defmethod (get-edit-menu) (is-a?/c menu%) "Returns the edit menu." "\n" "See also " (method frame:standard-menus<%> get-menu%) ".")
@(defmethod (get-help-menu) (is-a?/c menu%) "Returns the help menu." "\n" "See also " (method frame:standard-menus<%> get-menu%) ".")
@(defmethod (file-menu:get-new-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> file-menu:create-new?) ").")
@(defmethod (file-menu:create-new?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #t) ".")
@(defmethod (file-menu:new-callback (item (is-a?/c menu-item%)) (control (is-a?/c control-event%))) void? "Defaults to " (schemeblock (begin (handler:edit-file #f) #t)) " ")
@(defmethod (file-menu:new-on-demand (menu-item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (void)))
@(defmethod (file-menu:new-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant new-menu-item)) ".")
@(defmethod (file-menu:new-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant new-info)) ".")
@(defmethod (file-menu:between-new-and-open (menu (is-a?/c menu-item%))) void? "This method is called between the addition of the" "\n" (tt "new") " and the " (tt "open") " menu-item." "\n" "Override it to add additional menu items at that point. ")
@(defmethod (file-menu:get-open-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> file-menu:create-open?) ").")
@(defmethod (file-menu:create-open?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #t) ".")
@(defmethod (file-menu:open-callback (item (is-a?/c menu-item%)) (control (is-a?/c control-event%))) void? "Defaults to " (schemeblock (begin (handler:open-file) #t)) " ")
@(defmethod (file-menu:open-on-demand (menu-item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (void)))
@(defmethod (file-menu:open-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant open-menu-item)) ".")
@(defmethod (file-menu:open-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant open-info)) ".")
@(defmethod (file-menu:get-open-recent-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> file-menu:create-open-recent?) ").")
@(defmethod (file-menu:create-open-recent?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #t) ".")
@(defmethod (file-menu:open-recent-callback (x (is-a?/c menu-item%)) (y (is-a?/c control-event%))) void? "Defaults to " (schemeblock (void)) " ")
@(defmethod (file-menu:open-recent-on-demand (menu (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (handler:install-recent-items menu)))
@(defmethod (file-menu:open-recent-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant open-recent-menu-item)) ".")
@(defmethod (file-menu:open-recent-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant open-recent-info)) ".")
@(defmethod (file-menu:between-open-and-revert (menu (is-a?/c menu-item%))) void? "This method is called between the addition of the" "\n" (tt "open") " and the " (tt "revert") " menu-item." "\n" "Override it to add additional menu items at that point. ")
@(defmethod (file-menu:get-revert-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> file-menu:create-revert?) ").")
@(defmethod (file-menu:create-revert?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #f) ".")
@(defmethod (file-menu:revert-callback (item (is-a?/c menu-item%)) (control (is-a?/c control-event%))) void? "Defaults to " (schemeblock (void)) " ")
@(defmethod (file-menu:revert-on-demand (menu-item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (void)))
@(defmethod (file-menu:revert-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant revert-menu-item)) ".")
@(defmethod (file-menu:revert-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant revert-info)) ".")
@(defmethod (file-menu:between-revert-and-save (menu (is-a?/c menu-item%))) void? "This method is called between the addition of the" "\n" (tt "revert") " and the " (tt "save") " menu-item." "\n" "Override it to add additional menu items at that point. ")
@(defmethod (file-menu:get-save-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> file-menu:create-save?) ").")
@(defmethod (file-menu:create-save?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #f) ".")
@(defmethod (file-menu:save-callback (item (is-a?/c menu-item%)) (control (is-a?/c control-event%))) void? "Defaults to " (schemeblock (void)) " ")
@(defmethod (file-menu:save-on-demand (menu-item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (void)))
@(defmethod (file-menu:save-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant save-menu-item)) ".")
@(defmethod (file-menu:save-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant save-info)) ".")
@(defmethod (file-menu:get-save-as-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> file-menu:create-save-as?) ").")
@(defmethod (file-menu:create-save-as?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #f) ".")
@(defmethod (file-menu:save-as-callback (item (is-a?/c menu-item%)) (control (is-a?/c control-event%))) void? "Defaults to " (schemeblock (void)) " ")
@(defmethod (file-menu:save-as-on-demand (menu-item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (void)))
@(defmethod (file-menu:save-as-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant save-as-menu-item)) ".")
@(defmethod (file-menu:save-as-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant save-as-info)) ".")
@(defmethod (file-menu:between-save-as-and-print (menu (is-a?/c menu-item%))) void? "This method is called between the addition of the" "\n" (tt "save-as") " and the " (tt "print") " menu-item." "\n" "Override it to add additional menu items at that point. ")
@(defmethod (file-menu:get-print-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> file-menu:create-print?) ").")
@(defmethod (file-menu:create-print?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #f) ".")
@(defmethod (file-menu:print-callback (item (is-a?/c menu-item%)) (control (is-a?/c control-event%))) void? "Defaults to " (schemeblock (void)) " ")
@(defmethod (file-menu:print-on-demand (menu-item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (void)))
@(defmethod (file-menu:print-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant print-menu-item)) ".")
@(defmethod (file-menu:print-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant print-info)) ".")
@(defmethod (file-menu:between-print-and-close (menu (is-a?/c menu-item%))) void? "This method is called between the addition of the" "\n" (tt "print") " and the " (tt "close") " menu-item." "\n" "Override it to add additional menu items at that point. ")
@(defmethod (file-menu:get-close-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> file-menu:create-close?) ").")
@(defmethod (file-menu:create-close?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #t) ".")
@(defmethod (file-menu:close-callback (item (is-a?/c menu-item%)) (control (is-a?/c control-event%))) void? "Defaults to " (schemeblock (begin (when (can-close?) (on-close) (show #f)) #t)) " ")
@(defmethod (file-menu:close-on-demand (menu-item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (void)))
@(defmethod (file-menu:close-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant close-menu-item)) ".")
@(defmethod (file-menu:close-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant close-info)) ".")
@(defmethod (file-menu:between-close-and-quit (menu (is-a?/c menu-item%))) void? "This method is called between the addition of the" "\n" (tt "close") " and the " (tt "quit") " menu-item." "\n" "Override it to add additional menu items at that point. ")
@(defmethod (file-menu:get-quit-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> file-menu:create-quit?) ").")
@(defmethod (file-menu:create-quit?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme (not (current-eventspace-has-standard-menus?))) ".")
@(defmethod (file-menu:quit-callback (item (is-a?/c menu-item%)) (control (is-a?/c control-event%))) void? "Defaults to " (schemeblock (when (exit:user-oks-exit) (exit:exit))) " ")
@(defmethod (file-menu:quit-on-demand (menu-item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (void)))
@(defmethod (file-menu:quit-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (if (eq? (system-type) (quote windows)) (string-constant quit-menu-item-windows) (string-constant quit-menu-item-others))) ".")
@(defmethod (file-menu:quit-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant quit-info)) ".")
@(defmethod (file-menu:after-quit (menu (is-a?/c menu-item%))) void? "This method is called " "after" " the addition of the" "\n" (tt "quit") " menu-item. Override it to add additional" "\n" "menu items at that point. ")
@(defmethod (edit-menu:get-undo-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> edit-menu:create-undo?) ").")
@(defmethod (edit-menu:create-undo?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #t) ".")
@(defmethod (edit-menu:undo-callback (menu (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void? "Defaults to " (schemeblock (begin (let ((edit (get-edit-target-object))) (when (and edit (is-a? edit editor<%>)) (send edit do-edit-operation (quote undo)))) #t)) " ")
@(defmethod (edit-menu:undo-on-demand (item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (let* ((editor (get-edit-target-object)) (enable? (and editor (is-a? editor editor<%>) (send editor can-do-edit-operation? (quote undo))))) (send item enable enable?))))
@(defmethod (edit-menu:undo-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant undo-menu-item)) ".")
@(defmethod (edit-menu:undo-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant undo-info)) ".")
@(defmethod (edit-menu:get-redo-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> edit-menu:create-redo?) ").")
@(defmethod (edit-menu:create-redo?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #t) ".")
@(defmethod (edit-menu:redo-callback (menu (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void? "Defaults to " (schemeblock (begin (let ((edit (get-edit-target-object))) (when (and edit (is-a? edit editor<%>)) (send edit do-edit-operation (quote redo)))) #t)) " ")
@(defmethod (edit-menu:redo-on-demand (item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (let* ((editor (get-edit-target-object)) (enable? (and editor (is-a? editor editor<%>) (send editor can-do-edit-operation? (quote redo))))) (send item enable enable?))))
@(defmethod (edit-menu:redo-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant redo-menu-item)) ".")
@(defmethod (edit-menu:redo-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant redo-info)) ".")
@(defmethod (edit-menu:between-redo-and-cut (menu (is-a?/c menu-item%))) void? "This method is called between the addition of the" "\n" (tt "redo") " and the " (tt "cut") " menu-item." "\n" "Override it to add additional menu items at that point. ")
@(defmethod (edit-menu:get-cut-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> edit-menu:create-cut?) ").")
@(defmethod (edit-menu:create-cut?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #t) ".")
@(defmethod (edit-menu:cut-callback (menu (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void? "Defaults to " (schemeblock (begin (let ((edit (get-edit-target-object))) (when (and edit (is-a? edit editor<%>)) (send edit do-edit-operation (quote cut)))) #t)) " ")
@(defmethod (edit-menu:cut-on-demand (item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (let* ((editor (get-edit-target-object)) (enable? (and editor (is-a? editor editor<%>) (send editor can-do-edit-operation? (quote cut))))) (send item enable enable?))))
@(defmethod (edit-menu:cut-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant cut-menu-item)) ".")
@(defmethod (edit-menu:cut-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant cut-info)) ".")
@(defmethod (edit-menu:between-cut-and-copy (menu (is-a?/c menu-item%))) void? "This method is called between the addition of the" "\n" (tt "cut") " and the " (tt "copy") " menu-item." "\n" "Override it to add additional menu items at that point. ")
@(defmethod (edit-menu:get-copy-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> edit-menu:create-copy?) ").")
@(defmethod (edit-menu:create-copy?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #t) ".")
@(defmethod (edit-menu:copy-callback (menu (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void? "Defaults to " (schemeblock (begin (let ((edit (get-edit-target-object))) (when (and edit (is-a? edit editor<%>)) (send edit do-edit-operation (quote copy)))) #t)) " ")
@(defmethod (edit-menu:copy-on-demand (item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (let* ((editor (get-edit-target-object)) (enable? (and editor (is-a? editor editor<%>) (send editor can-do-edit-operation? (quote copy))))) (send item enable enable?))))
@(defmethod (edit-menu:copy-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant copy-menu-item)) ".")
@(defmethod (edit-menu:copy-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant copy-info)) ".")
@(defmethod (edit-menu:between-copy-and-paste (menu (is-a?/c menu-item%))) void? "This method is called between the addition of the" "\n" (tt "copy") " and the " (tt "paste") " menu-item." "\n" "Override it to add additional menu items at that point. ")
@(defmethod (edit-menu:get-paste-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> edit-menu:create-paste?) ").")
@(defmethod (edit-menu:create-paste?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #t) ".")
@(defmethod (edit-menu:paste-callback (menu (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void? "Defaults to " (schemeblock (begin (let ((edit (get-edit-target-object))) (when (and edit (is-a? edit editor<%>)) (send edit do-edit-operation (quote paste)))) #t)) " ")
@(defmethod (edit-menu:paste-on-demand (item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (let* ((editor (get-edit-target-object)) (enable? (and editor (is-a? editor editor<%>) (send editor can-do-edit-operation? (quote paste))))) (send item enable enable?))))
@(defmethod (edit-menu:paste-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant paste-menu-item)) ".")
@(defmethod (edit-menu:paste-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant paste-info)) ".")
@(defmethod (edit-menu:between-paste-and-clear (menu (is-a?/c menu-item%))) void? "This method is called between the addition of the" "\n" (tt "paste") " and the " (tt "clear") " menu-item." "\n" "Override it to add additional menu items at that point. ")
@(defmethod (edit-menu:get-clear-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> edit-menu:create-clear?) ").")
@(defmethod (edit-menu:create-clear?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #t) ".")
@(defmethod (edit-menu:clear-callback (menu (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void? "Defaults to " (schemeblock (begin (let ((edit (get-edit-target-object))) (when (and edit (is-a? edit editor<%>)) (send edit do-edit-operation (quote clear)))) #t)) " ")
@(defmethod (edit-menu:clear-on-demand (item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (let* ((editor (get-edit-target-object)) (enable? (and editor (is-a? editor editor<%>) (send editor can-do-edit-operation? (quote clear))))) (send item enable enable?))))
@(defmethod (edit-menu:clear-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (if (eq? (system-type) (quote windows)) (string-constant clear-menu-item-windows) (string-constant clear-menu-item-windows))) ".")
@(defmethod (edit-menu:clear-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant clear-info)) ".")
@(defmethod (edit-menu:between-clear-and-select-all (menu (is-a?/c menu-item%))) void? "This method is called between the addition of the" "\n" (tt "clear") " and the " (tt "select-all") " menu-item." "\n" "Override it to add additional menu items at that point. ")
@(defmethod (edit-menu:get-select-all-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> edit-menu:create-select-all?) ").")
@(defmethod (edit-menu:create-select-all?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #t) ".")
@(defmethod (edit-menu:select-all-callback (menu (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void? "Defaults to " (schemeblock (begin (let ((edit (get-edit-target-object))) (when (and edit (is-a? edit editor<%>)) (send edit do-edit-operation (quote select-all)))) #t)) " ")
@(defmethod (edit-menu:select-all-on-demand (item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (let* ((editor (get-edit-target-object)) (enable? (and editor (is-a? editor editor<%>) (send editor can-do-edit-operation? (quote select-all))))) (send item enable enable?))))
@(defmethod (edit-menu:select-all-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant select-all-menu-item)) ".")
@(defmethod (edit-menu:select-all-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant select-all-info)) ".")
@(defmethod (edit-menu:between-select-all-and-find (menu (is-a?/c menu-item%))) void? "This method is called between the addition of the" "\n" (tt "select-all") " and the " (tt "find") " menu-item." "\n" "Override it to add additional menu items at that point. ")
@(defmethod (edit-menu:get-find-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> edit-menu:create-find?) ").")
@(defmethod (edit-menu:create-find?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #f) ".")
@(defmethod (edit-menu:find-callback (item (is-a?/c menu-item%)) (control (is-a?/c control-event%))) void? "Defaults to " (schemeblock (void)) " ")
@(defmethod (edit-menu:find-on-demand (item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (send item enable (let ((target (get-edit-target-object))) (and target (is-a? target editor<%>))))))
@(defmethod (edit-menu:find-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant find-menu-item)) ".")
@(defmethod (edit-menu:find-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant find-info)) ".")
@(defmethod (edit-menu:get-find-again-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> edit-menu:create-find-again?) ").")
@(defmethod (edit-menu:create-find-again?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #f) ".")
@(defmethod (edit-menu:find-again-callback (item (is-a?/c menu-item%)) (control (is-a?/c control-event%))) void? "Defaults to " (schemeblock (void)) " ")
@(defmethod (edit-menu:find-again-on-demand (item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (send item enable (let ((target (get-edit-target-object))) (and target (is-a? target editor<%>))))))
@(defmethod (edit-menu:find-again-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant find-again-menu-item)) ".")
@(defmethod (edit-menu:find-again-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant find-again-info)) ".")
@(defmethod (edit-menu:get-replace-and-find-again-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> edit-menu:create-replace-and-find-again?) ").")
@(defmethod (edit-menu:create-replace-and-find-again?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #f) ".")
@(defmethod (edit-menu:replace-and-find-again-callback (item (is-a?/c menu-item%)) (control (is-a?/c control-event%))) void? "Defaults to " (schemeblock (void)) " ")
@(defmethod (edit-menu:replace-and-find-again-on-demand (item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (send item enable (let ((target (get-edit-target-object))) (and target (is-a? target editor<%>))))))
@(defmethod (edit-menu:replace-and-find-again-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant replace-and-find-again-menu-item)) ".")
@(defmethod (edit-menu:replace-and-find-again-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant replace-and-find-again-info)) ".")
@(defmethod (edit-menu:between-find-and-preferences (menu (is-a?/c menu-item%))) void? "This method is called between the addition of the" "\n" (tt "find") " and the " (tt "preferences") " menu-item." "\n" "Override it to add additional menu items at that point. ")
@(defmethod (edit-menu:get-preferences-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> edit-menu:create-preferences?) ").")
@(defmethod (edit-menu:create-preferences?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme (not (current-eventspace-has-standard-menus?))) ".")
@(defmethod (edit-menu:preferences-callback (item (is-a?/c menu-item%)) (control (is-a?/c control-event%))) void? "Defaults to " (schemeblock (begin (preferences:show-dialog) #t)) " ")
@(defmethod (edit-menu:preferences-on-demand (menu-item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (void)))
@(defmethod (edit-menu:preferences-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant preferences-menu-item)) ".")
@(defmethod (edit-menu:preferences-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant preferences-info)) ".")
@(defmethod (edit-menu:after-preferences (menu (is-a?/c menu-item%))) void? "This method is called " "after" " the addition of the" "\n" (tt "preferences") " menu-item. Override it to add additional" "\n" "menu items at that point. ")
@(defmethod (help-menu:before-about (menu (is-a?/c menu-item%))) void? "This method is called " "before" " the addition of the" "\n" (tt "about") " menu-item. Override it to add additional" "\n" "menu items at that point. ")
@(defmethod (help-menu:get-about-item) (or/c false/c (is-a?/c menu-item%)) "This method returns the " (scheme menu-item%) " object corresponding" "\n" "to this menu item, if it has been created (as controlled by" "\n" (method frame:standard-menus<%> help-menu:create-about?) ").")
@(defmethod (help-menu:create-about?) boolean? "The result of this method determines if the corresponding" "\n" "menu item is created. Override it to control the creation of the menu item." "\n" "\n" "Defaults to " (scheme #f) ".")
@(defmethod (help-menu:about-callback (item (is-a?/c menu-item%)) (control (is-a?/c control-event%))) void? "Defaults to " (schemeblock (void)) " ")
@(defmethod (help-menu:about-on-demand (menu-item (is-a?/c menu-item%))) void? "The menu item's on-demand proc calls this method." "\n" "\n" "Defaults to " (schemeblock (void)))
@(defmethod (help-menu:about-string) string? "The result of this method is used as the name of the " (scheme menu-item%) "." "\n" "\n" "Defaults to " (scheme (string-constant about-menu-item)) ".")
@(defmethod (help-menu:about-help-string) string? "The result of this method is used as the help string" "\n" "when the " (scheme menu-item%) " object is created." "\n" "\n" "Defaults to " (scheme (string-constant about-info)) ".")
@(defmethod (help-menu:after-about (menu (is-a?/c menu-item%))) void? "This method is called " "after" " the addition of the" "\n" (tt "about") " menu-item. Override it to add additional" "\n" "menu items at that point. ")
}