!7 p-subst { final RGBImage img = shootScreenBW().toRGB(); final L rects = autoSegment(img); final ImageSurface is = showImageWithSelections(img, rects); final Var highlighted = showImageWithSelections_highlighted; is.specialPurposed = true; componentPopupMenu(is, voidfunc(JPopupMenu menu) { //Pt p = is.pointFromEvent(componentPopupMenu_mouseEvent!); Rect r = highlighted!; if (r != null) { final RGBImage clip = img.clip(r); fS md5 = rgbMD5(clip); addMenuItem(menu, "Comment... [MD5: " + md5 + "]", r { SS comments = thingsOnScreenDefinitions(); final JTextField tf = jtextfield(comments.get(md5)); showFormTitled("Comment image " + md5, "Image", new ImageChooser(clip), "Comment", tf, r { S text = getTextTrim(tf); addThingOnScreenDefinition(md5, text); }); }); } }); }