summaryrefslogtreecommitdiff
path: root/tex/context/base/scrn-nav.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/scrn-nav.mkiv')
-rw-r--r--tex/context/base/scrn-nav.mkiv258
1 files changed, 0 insertions, 258 deletions
diff --git a/tex/context/base/scrn-nav.mkiv b/tex/context/base/scrn-nav.mkiv
deleted file mode 100644
index 7b8fbdfa7..000000000
--- a/tex/context/base/scrn-nav.mkiv
+++ /dev/null
@@ -1,258 +0,0 @@
-%D \module
-%D [ file=scrn-nav,
-%D version=1998.01.15,
-%D title=\CONTEXT\ Screen Macros,
-%D subtitle=Navigation,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\writestatus{loading}{ConTeXt Screen Macros / Navigation}
-
-\unprotect
-
-%D Support for interactive document is very present in
-%D \CONTEXT\ and interwoven in many modules. This means that in
-%D this module, where we deal with some common navigational
-%D features, there will be quite some forward references.
-%D
-%D The current support in \MKIV\ is mostly the same as in
-%D \MKII\ and the old files have some more detailed
-%D (sometimes historic) information.
-
-%D There is no interaction at all unless enabled by saying:
-%D
-%D \starttyping
-%D \setupinteraction[state=start]
-%D \stoptyping
-%D
-%D The other settings are:
-%D
-%D \showsetup{setupinteraction}
-
-% use with care, no checking done
-
-\def\setinteractionparameter#1#2%
- {\expandafter\def\csname\??ia#1\endcsname{#2}}
-
-\def\resetinteractionparameter#1%
- {\expandafter\let\csname\??ia#1\endcsname\empty}
-
-\newtoks\everysetupinteraction
-
-\unexpanded\def\setupinteraction
- {\dosingleargument\dodosetupinteraction}
-
-\def\dodosetupinteraction[#1]% % \dosetupinteraction == special
- {\getparameters[\??ia][#1]%
- \the\everysetupinteraction}
-
-% todo, move partial append to where the action happens
-
-\appendtoks
- \doifelse\@@iastate\v!start
- {\iflocation\else
- \showmessage\m!interactions2{(page mode: \@@iapage)}%
- \global\locationtrue
- \fi}%
- {\iflocation
- \showmessage\m!interactions3{(page mode: \@@iapage)}%
- \global\locationfalse
- \fi}%
- \iflocation
- \setsystemmode \v!interaction
- \else
- \resetsystemmode\v!interaction
- \fi
- \doifsomething\@@iacalculate
- {\doregistercalculationset\@@iacalculate}%
- \doifelse\@@iastrut \v!yes \settrue \setfalse \uselocationstrut
- \doifelse\@@iaclick \v!yes \settrue \setfalse \highlighthyperlinks
- \doifelse\@@iadisplay\v!new \settrue \setfalse \gotonewwindow
- \doifnot \@@iapage \v!no \dosetpagedestinations
-\to \everysetupinteraction
-
-\def\dosetpagedestinations
- {\ctxlua{structures.references.setinnermethod("\@@iapage")}}
-
-\def\synchronizebackendidentity
- {\ctxlua{backends.codeinjections.setupidentity{
- title = \!!bs\@@iatitle\!!es,
- subject = \!!bs\@@iasubtitle\!!es,
- author = \!!bs\@@iaauthor\!!es,
- creator = \!!bs ConTeXt - \contextversion\!!es,
- date = \!!bs\@@iadate\!!es,
- keywords = \!!bs\@@iakeyword\!!es,
- }}}
-
-\appendtoks
- \synchronizebackendidentity
-\to \everyfirstshipout
-
-%D We have to make sure of some settings:
-
-\def\dolocationstartup
- {\iflocation
- \donefalse
- \ifx\@@iaopenaction\empty \else \donetrue
- \ctxlua{structures.references.checkopendocumentactions("\@@iaopenaction")}%
- \ctxlua{structures.references.expandcurrent()}%
- \fi
- \ifx\@@iacloseaction\empty \else \donetrue
- \ctxlua{structures.references.checkclosedocumentactions("\@@iacloseaction")}%
- \ctxlua{structures.references.expandcurrent()}%
- \fi
- \ifdone
- \ctxlua{structures.references.flushdocumentactions()}%
- \fi
- \global\let\dolocationstartup\relax
- \fi}
-
-\def\dolocationpagecheck
- {\iflocation
- \donefalse
- \ifx\@@iaopenpageaction\empty \else \donetrue
- \ctxlua{structures.references.checkopenpageactions("\@@iaopenpageaction")}%
- \ctxlua{structures.references.expandcurrent()}%
- \fi
- \ifx\@@iaclosepageaction\empty \else \donetrue
- \ctxlua{structures.references.checkclosepageactions("\@@iaclosepageaction")}%
- \ctxlua{structures.references.expandcurrent()}%
- \fi
- \ifdone
- \ctxlua{structures.references.flushpageactions()}%
- \fi
- \fi}
-
-\appendtoks \dolocationstartup \to \everyshipout
-\appendtoks \dolocationpagecheck \to \everyshipout
-
-%D As long as there a natural feeling of what can be considered
-%D hyper active or not, we have to tell users where they can
-%D possibly click. We've already seen a few macros that deal
-%D with this visualization, something we definitely do not let
-%D up to the viewer. One way of telling is using a distinctive
-%D typeface, another way is using color.
-%D
-%D There are two colors involved: one for normal hyperlinks,
-%D and one for those that point to the currentpage, the
-%D contrast color.
-
-\definecolor [interactioncolor] [r=0, g=.6, b=0]
-\definecolor [interactioncontrastcolor] [r=.8, g=0, b=0]
-
-\definecolor [interactiekleur] [interactioncolor]
-\definecolor [interactiecontrastkleur] [interactioncontrastcolor]
-
-%D The next few macros are responsible for highlighting hyper
-%D links. The first one, \type{\showlocation}, is used in those
-%D situations where the typeface is handled by the calling
-%D macro.
-
-%D When we're dealing with pure page references, contrast
-%D colors are used when we are already at the page mentioned.
-
-\def\setlocationcolor#1% not grouped !
- {\ifnum\referencepagestate=\plusone
- \edef\askedcontrastcolor{\csname#1\c!contrastcolor\endcsname}%
- \ifx\askedcontrastcolor\empty
- \dosetcolorattribute{#1}\c!color
- \else
- \dosetcolorattribute{#1}\c!contrastcolor
- \fi
- \else % we could just set and if > 0 set again
- \dosetcolorattribute{#1}\c!color
- \fi}
-
-\def\setlocationfont#1%
- {\dosetfontattribute{#1}\c!style}
-
-\def\setlocationattributes#1%
- {\ifnum\referencepagestate=\plusone
- \edef\askedcontrastcolor{\csname#1\c!contrastcolor\endcsname}%
- \ifx\askedcontrastcolor\empty
- \dosetcolorattribute{#1}\c!color
- \else
- \dosetcolorattribute{#1}\c!contrastcolor
- \fi
- \else % we could just set and if > 0 set again
- \dosetcolorattribute{#1}\c!color
- \fi
- \dosetfontattribute{#1}\c!style}
-
-\def\setlocationcolorspec#1% \resolver
- {\ifnum\referencepagestate=\plusone
- \edef\askedcontrastcolor{#1\c!contrastcolor}%
- \ifx\askedcontrastcolor\empty
- \doactivatecolor{#1\c!color}%
- \else
- \doactivatecolor\askedcontrastcolor
- \fi
- \else
- \doactivatecolor{#1\c!color}%
- \fi}
-
-%D delayed ...
-
-\def\enableinteractivereferences
- {\ifproductionrun
- \ctxlua{structures.references.enableinteraction()}%
- \globallet\enableinteractivereferences\relax
- \fi}
-
-\appendtoks
- \enableinteractivereferences
-\to \everysetupinteraction
-
-%D More tokens are spend when we want both typeface and color
-%D highlighting.
-
-\def\@@iatimestamp
- {\the\normalyear
- \ifnum\normalmonth<10 0\fi\the\normalmonth
- \ifnum\normalday <10 0\fi\the\normalday}
-
-\setupinteraction % start fit page and reset form
- [\c!state=\v!stop,
- \c!page=\v!no,
- \c!click=\v!yes,
- \c!openaction=,
- \c!closeaction=,
- \c!openpageaction=,
- \c!closepageaction=,
- \c!display=\v!normal,
- \c!focus=\v!fit,
- \c!menu=\v!off,
- \c!style=\v!bold,
- \c!calculate=,
- \c!strut=\v!yes,
- \c!split=\v!yes,
- \c!color=interactioncolor,
- \c!contrastcolor=interactioncontrastcolor,
- \c!symbolset=,
- \c!width=1em,
- \c!height=\!!zeropoint,
- \c!depth=\!!zeropoint,
- \c!title=\jobname, % needed for fdf/x
- \c!subtitle=,
- \c!author=,
- \c!keyword=,
- \c!date=\@@iatimestamp]
-
-%D XMP support:
-
-\setupinteraction
- [xmpfile=]
-
-\appendtoks
- % this will move as it is a backend issue
- \doifsomething\@@iaxmpfile
- {\ctxlua{if lpdf then lpdf.setxmpfile("\@@iaxmpfile") end}%
- \globallet\@@iaxmpfile\empty}%
-\to \everysetupinteraction
-
-\protect \endinput