.
original commit: 55762592e29b112799ebd19a708017df5f10dc29
This commit is contained in:
parent
8aeb526779
commit
bd0fccce18
|
@ -657,6 +657,15 @@
|
|||
""
|
||||
"See section \\ref{selecting-a-filename} for more information.")
|
||||
|
||||
(frame:setup-size-pref
|
||||
(symbol? number? number? . -> . void)
|
||||
(size-pref-sym width height)
|
||||
"Initializes a preference for the"
|
||||
"@mixin-link frame:size-pref"
|
||||
"mixin."
|
||||
""
|
||||
"The first argument should be the preferences symbol, and the second an third"
|
||||
"should be the default width and height, respectively.")
|
||||
(frame:add-snip-menu-items
|
||||
((is-a?/c menu%) (subclass?/c menu-item%) . -> . void?)
|
||||
(menu menu-item%)
|
||||
|
|
|
@ -222,6 +222,16 @@
|
|||
(let ([lst (preferences:get size-preferences-key)])
|
||||
(super-new [width (car lst)] [height (cadr lst)]))))
|
||||
|
||||
(define (setup-size-pref size-preferences-key w h)
|
||||
(preferences:set-default size-preferences-key
|
||||
(list w h)
|
||||
(lambda (x)
|
||||
(and (pair? x)
|
||||
(pair? (cdr x))
|
||||
(null? (cddr x))
|
||||
(number? (car x))
|
||||
(number? (cadr x))))))
|
||||
|
||||
(define register-group<%> (interface ()))
|
||||
(define register-group-mixin
|
||||
(mixin (basic<%>) (register-group<%>)
|
||||
|
|
|
@ -412,7 +412,8 @@
|
|||
pasteboard-info-mixin))
|
||||
(define-signature framework:frame-fun^
|
||||
(reorder-menus
|
||||
add-snip-menu-items))
|
||||
add-snip-menu-items
|
||||
setup-size-pref))
|
||||
(define-signature framework:frame^
|
||||
((open framework:frame-class^)
|
||||
(open framework:frame-fun^)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user