add 'no-focus style to `editor-canvas%'

original commit: f13a669d056358ac2b50e6a8a2907e40045593a6
This commit is contained in:
Matthew Flatt 2011-07-25 11:03:38 -04:00
parent 7556774742
commit 63501f5363
4 changed files with 11 additions and 4 deletions

View File

@ -258,7 +258,8 @@
(check-container-parent cwho parent)
(check-instance cwho internal-editor<%> "text% or pasteboard%" #t editor)
(check-style cwho #f '(hide-vscroll hide-hscroll no-vscroll no-hscroll auto-vscroll auto-hscroll
deleted control-border combo transparent no-border resize-corner)
deleted control-border combo transparent no-border resize-corner
no-focus)
style)
(check-gauge-integer cwho scrolls-per-page)
(check-label-string/false cwho label)

View File

@ -215,7 +215,8 @@
'(no-autoclear))
(keep-style style 'control-border)
(keep-style style 'combo)
(keep-style style 'resize-corner))
(keep-style style 'resize-corner)
(keep-style style 'no-focus))
name
gl-config)

View File

@ -64,7 +64,7 @@ The @racket[style] argument indicates one or more of the following styles:
@racket['no-autoclear]}
@item{@racket['no-focus] --- prevents the canvas from accepting the
keyboard focus when the canvas is clicked, or when the
keyboard focus when the canvas is clicked or when the
@method[window<%> focus] method is called}
@item{@racket['deleted] --- creates the canvas as initially hidden and without affecting

View File

@ -14,7 +14,8 @@ An @racket[editor-canvas%] object manages and displays a
'no-hscroll 'no-vscroll
'hide-hscroll 'hide-vscroll
'auto-vscroll 'auto-hscroll
'resize-corner 'deleted 'transparent)) null]
'resize-corner 'no-focus 'deleted
'transparent)) null]
[scrolls-per-page (integer-in 1 10000) 100]
[label (or/c label-string? false/c) #f]
[wheel-step (or/c (integer-in 1 10000) false/c) 3]
@ -65,6 +66,10 @@ The @racket[style] list can contain the following flags:
@item{@racket['resize-corner] --- leaves room for a resize control at the canvas's
bottom right when only one scrollbar is visible}
@item{@racket['no-focus] --- prevents the canvas from accepting the
keyboard focus when the canvas is clicked or when the
@method[window<%> focus] method is called}
@item{@racket['deleted] --- creates the canvas as initially hidden and without affecting
@racket[parent]'s geometry; the canvas can be made active
later by calling @racket[parent]'s @method[area-container<%> add-child]