From f07274df5ad5ac9bbc873231ea13166b2f8257a5 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 14 Jan 2009 20:29:37 +0000 Subject: [PATCH] size-cache-invalid for editor<%> svn: r13120 original commit: cf2e98eb921d2e0f7c6acb87e19d966af933a72c --- collects/mred/private/kernel.ss | 3 +++ collects/scribblings/gui/editor-intf.scrbl | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/collects/mred/private/kernel.ss b/collects/mred/private/kernel.ss index e21bfd92..f448c678 100644 --- a/collects/mred/private/kernel.ss +++ b/collects/mred/private/kernel.ss @@ -240,6 +240,7 @@ can-save-file? on-new-box on-new-image-snip + size-cache-invalid invalidate-bitmap-cache on-paint write-footers-to-file @@ -921,6 +922,7 @@ can-save-file? on-new-box on-new-image-snip + size-cache-invalid invalidate-bitmap-cache on-paint write-footers-to-file @@ -1133,6 +1135,7 @@ can-save-file? on-new-box on-new-image-snip + size-cache-invalid invalidate-bitmap-cache on-paint write-footers-to-file diff --git a/collects/scribblings/gui/editor-intf.scrbl b/collects/scribblings/gui/editor-intf.scrbl index 3b4cff2d..0b4e7714 100644 --- a/collects/scribblings/gui/editor-intf.scrbl +++ b/collects/scribblings/gui/editor-intf.scrbl @@ -1015,7 +1015,7 @@ The default implementation triggers a redraw of the editor, either immediately or at the end of the current edit sequence (if any) started by @method[editor<%> begin-edit-sequence]. -} +See also @method[editor<%> size-cache-invalid].} @defmethod[(is-locked?) @@ -2322,6 +2322,20 @@ Setting the style list is disallowed when the editor is internally } +@defmethod[(size-cache-invalid) + void?]{ + +This method is called when the drawing context given to the editor by +its administrator changes in a way that makes cached size information +(such as the width of a string) invalid. + +The default implementation eventually propagates the message to snips, +and, more generally, causes @tech{location} information to be +recalculated on demand. + +See also @method[editor<%> invalidate-bitmap-cache].} + + @defmethod[(style-has-changed [style (or/c (is-a?/c style<%>) false/c)]) void?]{