module FudExtras where import AllFudgets --longTextPopupF = longTextPopupF' okButtonF longTextPopupF = stripEither >^=< popupsF >=^< route where popupsF = messagePopupF >+< longTextPopupF' okButtonF route msg = (if length msg <= 1 then Left else Right) msg longTextConfirmPopupF = longTextPopupF' buttonsF where buttonsF = post>^=+^=< longTextPopupF'' buttonsF (concatMapSP pre) where post ((txt,(lbl1,lbl2)),choice) = either (const lbl1) (const lbl2) choice pre (txt,(lbl1,lbl2)) = [Right (Left lbl1),Right (Right lbl2),Left txt] buttonsF = hBoxF (dynButtonF "Yes" >+< dynButtonF "No") dynButtonF lbl = buttonF'' standard lbl >=^< Left . setLabel --- longTextPopupF' buttonsF = longTextPopupF'' buttonsF (mapSP Left) longTextPopupF'' buttonsF pre = popupShellF "Confirm" Nothing (filterRightSP>^^=< vBoxF (moreF>+=^^^=< oldPopupMenuF bgColor True menuFont (Button button) [] [] (pre alts) sndEqSnd f >=^< mapEither pre id where pre = map (`pair` []) . toEqSnd newtype NoEq a = NoEq a instance Eq (NoEq a) where _==_ = True staticHyperGraphicsF' pm initD = post >^=< hyperGraphicsF' pm initD>=^