racket/gui/base: fix menu-bar%'
get-frame' to return 'root
Return 'root istead of exposing the (hidden) root frame for a menu bar that is shown when no frames are visible. original commit: d0cfc34a77c23c8b5fd61b341dc6c446c3deae96
This commit is contained in:
parent
d580a45928
commit
014fbe20b3
|
@ -441,7 +441,7 @@
|
|||
(define wx-parent #f)
|
||||
(define shown? #f)
|
||||
(public*
|
||||
[get-frame (lambda () prnt)]
|
||||
[get-frame (lambda () (if (eq? root-menu-frame prnt) 'root prnt))]
|
||||
[get-items (entry-point (lambda () (send wx get-items)))]
|
||||
[enable (entry-point (lambda (on?) (send wx enable-all on?)))]
|
||||
[is-enabled? (entry-point (lambda () (send wx all-enabled?)))]
|
||||
|
|
|
@ -41,9 +41,10 @@ Enables or disables the menu bar (i.e., all of its menus). Each
|
|||
|
||||
|
||||
@defmethod[(get-frame)
|
||||
(is-a?/c frame%)]{
|
||||
(or/c (is-a?/c frame%) 'root)]{
|
||||
|
||||
Returns the menu bar's frame.
|
||||
Returns the menu bar's frame, or returns @racket['root] if the menu
|
||||
bar is shown when no other frames are shown.
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user