% % acceptance vectors for Epic % page@sel < % % Epic Markdown % %%%------------------ |Epid % % evaluate commands from the special editors % wireop( < |Initial " Unmarked ======== " false "Mark" *settings pop sel@ _\ !Edits "EpicValue" Url.(esc) _\\ *entervan ^ ^"SetVed(false,false);" Help.! *taskbket help@ true Mep.Window "InitEpid" *xhelperx pop |Accept wired( &; yml "Mark" \! wirex( &; yml "Marked" \! nod@ empty !Edits "AcceptEpid" *xhelperx { "=" x! *xhelnorm } if |Reject % % reject edits message % empty !Edits "RejectEpid" *xhelperx { "=" x! *xhelnorm } if > pop |EpView % % Epic editor viewing vector operations % Ent._E3 < |Initial % % this is the starting point for viewing the html version % *taskbket |Startup % % record the window descriptions derived from document title info (E4) % also supplied at startup is the name of the Flash receptor (E5) for the browser % % startup for Epic viewer % false !Ent.Editing % % establish EpView(not reserved comm), as the Util comm tx % (defaults to Util) % % save the document title for the browser % *coneidnt !Epic.Title 0 !Epic.Win _Epic.Title "IEFrame" *indymons { !Epic.Win % % save the receptor's identity % Ent._E5 *receptor dup !Epic.Ident second !Epic.Page % % initiate a transmitter socket for talking to Epic % *starcomm sel@ *epictova( } if |Reply % % handle the message/reply from the special editor % responding to our requests or a special editor initiated message % % distribute the message/reply to the requestee/requestor % Ent._E5 unescape "|" Str.Left "doing> " log() < |Reject % % reject edits message % "Shut" empty send |Accept % % accept edits to original spot message % true !originator _Ent.Editing { % % switch to preview only % false !Ent.Editing "Exec" "EpicPmode();" send } { "Current" empty send } ifelse |Here % % accept edits here message % false !originator _Ent.Editing { % % switch to preview only % false !Ent.Editing "Exec" "EpicPmode();" send } { "Current" empty send } ifelse |Current % % done viewing message, shut down the page in response % Ent._E6 unescape _originator % % always save at the selected node even if we got the model % of the markdown at ancestor node % false and { true "Mark" *settings sel@ pop2 } { trim catcr "Mark" \! } ifelse % % request the html version of the displayed markdown % "Get" "html" send |Get Ent._E6 unescape entdec dup "_test" html ofbin write _originator { trim catcr true "Marked" *settings sel@ pop2 } { sel@ trim catcr "Marked" \! } ifelse Tree.Changed "Shut" empty send |Shut % % page is going away, end our transmitter to it % "NoUtil" "StartComm" dance) |Preview % % switch to preview only % false !Ent.Editing "Exec" "EpicPmode();" send |Edit % % switch to raw editor % true !Ent.Editing "Exec" "EpicEmode();" send |ExitFs % % switch to raw editor % true !Ent.Editing "Exec" "EpicEmode();" send |Dual % % switch to full-screen dual window mode % false !Ent.Editing "Exec" "EpicDual();" send > pop > pop > *acceptun % % stack: found %