aligned-pasteboard and cue-text% repairs
svn: r14463
This commit is contained in:
parent
406d0774c9
commit
52d6fb4e1d
|
@ -19,7 +19,8 @@
|
||||||
|
|
||||||
(define cue-text-mixin
|
(define cue-text-mixin
|
||||||
(mixin ((class->interface text%)) ()
|
(mixin ((class->interface text%)) ()
|
||||||
(inherit insert change-style erase clear-undos)
|
(inherit insert change-style erase clear-undos
|
||||||
|
copy-self-to get-line-spacing)
|
||||||
(init [cue-text ""]
|
(init [cue-text ""]
|
||||||
[color "gray"])
|
[color "gray"])
|
||||||
(init-field
|
(init-field
|
||||||
|
@ -47,6 +48,13 @@
|
||||||
(when (member 'on-char behavior)
|
(when (member 'on-char behavior)
|
||||||
(clear-cue-text))
|
(clear-cue-text))
|
||||||
(super on-local-char akeyevent))
|
(super on-local-char akeyevent))
|
||||||
|
|
||||||
|
(define/override (copy-self)
|
||||||
|
(let ([m (new cue-text%
|
||||||
|
[behavior behavior]
|
||||||
|
[line-spacing (get-line-spacing)])])
|
||||||
|
(copy-self-to m)
|
||||||
|
m))
|
||||||
|
|
||||||
;; Insert the cue text into the text% on instantiation
|
;; Insert the cue text into the text% on instantiation
|
||||||
(super-new)
|
(super-new)
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
(define/public (realign-to-alloted)
|
(define/public (realign-to-alloted)
|
||||||
(when (and alloted-width alloted-height)
|
(when (and alloted-width alloted-height)
|
||||||
(when (not (and (positive? alloted-width) (positive? alloted-height)))
|
(when (not (and (positive? alloted-width) (positive? alloted-height)))
|
||||||
(error 'here "I am"))
|
(error "allotted width or height is not positive"))
|
||||||
(dynamic-let ([ignore-resizing? true])
|
(dynamic-let ([ignore-resizing? true])
|
||||||
(let* ([first-snip (find-first-snip)]
|
(let* ([first-snip (find-first-snip)]
|
||||||
[aligned-rects
|
[aligned-rects
|
||||||
|
|
Loading…
Reference in New Issue
Block a user