Expand description
Image message handlers for Avestruz.
A view that needs a picture asks the ImageStore,
which sends the address here as a LoadImage. This is where it is decided
whether to fetch it, and where the fetched picture comes back to.
A picture is copied from here as well: a click on one with the right button puts it on the clipboard. What is kept of a picture is as many pixels as it is shown with, which may be far fewer than it has, so what is copied is the picture itself, fetched again from where it is.
That takes a moment, and something copied is on its way somewhere
else: the popup may be gone before the picture is here, and only what
has the keyboard may put anything on the clipboard. So the clipboard
is given the picture at once, as something that is still to arrive
(CopiedPicture): what it is asked for when it is pasted, it waits
for then.
sequenceDiagram
actor person as Someone
participant model as AppModel
participant clipboard as The clipboard
participant web as Where the picture is
person->>model: a right click on a picture
model->>clipboard: a picture, yet to arrive, and its address as text
model->>web: fetch it
web-->>model: the picture: made a PNG, the way up it says it is
person->>clipboard: paste, somewhere else
clipboard-->>person: the picture, once it is here, or what was shown of it if it never cameStructsยง
- Arrived ๐
- What there is of a copied picture so far.
- Copied
Picture - A picture on the clipboard, which may be still on its way from where it is: as a PNG, to whatever takes pictures, and as its address, to whatever takes text.
Constantsยง
- PASTE_
WAITS ๐ - How long a paste waits for a picture that is still on its way: a little longer than a fetch may take.
- PICTURE ๐
- What a picture is on the clipboard as: what takes a picture from one anywhere.
- TEXTS ๐
- What text is on the clipboard as.