renaming interface

original commit: 0b8cd6852f839deb897be729adeab521d275e4c2
This commit is contained in:
Mike MacHenry 2003-12-15 20:24:35 +00:00
parent db663a8865
commit e16d80b9f9
5 changed files with 10 additions and 10 deletions

View File

@ -82,7 +82,7 @@
;; a snip that can contain an aligned-pasteboard<%> and also be stretched within an aligned-pasteboard<%>
(define aligned-editor-snip%
(class* editor-snip% (aligned-pasteboard-parent<%> aligned-snip<%>)
(class* editor-snip% (aligned-pasteboard-parent<%> stretchable-snip<%>)
(inherit get-editor get-margin set-min-width set-min-height)
(init

View File

@ -54,7 +54,7 @@
(dynamic-let ([ignore-resizing? true])
(for-each-snip
(lambda (s)
(if (is-a? s aligned-snip<%>)
(if (is-a? s stretchable-snip<%>)
(send s set-aligned-min-sizes)))
(find-first-snip))
(set!-values (aligned-min-width aligned-min-height)

View File

@ -7,7 +7,7 @@
(provide
aligned-pasteboard<%>
aligned-pasteboard-parent<%>
aligned-snip<%>)
stretchable-snip<%>)
;; the interface that must be implemented for a pasteboard to be contained in an aligned-pasteboard-parent<%>
(define aligned-pasteboard<%>
@ -69,8 +69,8 @@
;; the interface that must be implemented by a class to be inserted into an aligned-pasteboard<%> and
;; be stretched and shrunk according to the geometry managment. note: any snip may be insert... those
;; that do not implement aligned-snip<%> will simply not be stretched.
(define aligned-snip<%>
;; that do not implement stretchable-snip<%> will simply not be stretched.
(define stretchable-snip<%>
(interface ()
;; get-aligned-min-width (-> positive?)
;; get the minimum width of the snip

View File

@ -52,14 +52,14 @@
;; the minimum width of the snip
(define (snip-min-width snip)
(cond
[(is-a? snip aligned-snip<%>)
[(is-a? snip stretchable-snip<%>)
(send snip get-aligned-min-width)]
[else (snip-width snip)]))
;; the minimum height of the snip
(define (snip-min-height snip)
(cond
[(is-a? snip aligned-snip<%>)
[(is-a? snip stretchable-snip<%>)
(send snip get-aligned-min-height)]
[else (snip-height snip)]))
@ -104,14 +104,14 @@
;; true if the snip can be resized in the x dimention
(define (stretchable-width? snip)
(cond
[(is-a? snip aligned-snip<%>)
[(is-a? snip stretchable-snip<%>)
(send snip stretchable-width)]
[else false]))
;; true if the snip can be resized in the y dimention
(define (stretchable-height? snip)
(cond
[(is-a? snip aligned-snip<%>)
[(is-a? snip stretchable-snip<%>)
(send snip stretchable-height)]
[else false]))
)

View File

@ -70,7 +70,7 @@
(new aligned-editor-snip% (editor pb))))
;; a text field fit to be in a test-case (no borders or margins etc.)
;;STATUS: this should really return an aligned-snip<%> not an editor-snip% of fixed size.
;;STATUS: this should really return a stretchable-snip<%> not an editor-snip% of fixed size.
(define (text-field text)
(new editor-snip% (editor text)))