summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/spec-win.mkii
blob: 73db8830e9c58c66723d0338b00c6cf9ee742a74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
%D \module
%D   [       file=spec-win,
%D        version=1996.01.25,
%D          title=\CONTEXT\ Special Macros,
%D       subtitle=\YandY's \DVIWINDO,
%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.

\unprotect

%D Remark: chained references are not yet implemented.

%D \macros
%D   {dosetupinteraction,
%D    dostartthisislocation,
%D    dostartthisisrealpage,
%D    dostartgotolocation,
%D    dostartgotorealpage,
%D    dostartrunprogram,
%D    usepagedestinations}
%D   {}
%D
%D As told before, these were the first interactive specials.
%D In those days, these kind of specials were still elegant
%D and straightforward.

\startspecials[dviwindo]

\definespecial\dosetupinteraction%
  {\showmessage\m!interactions{21}{dviwindo}}

\definespecial\dostartgotolocation#1#2#3#4#5#6%
  {\bgroup
   \doifelsenothing{#3}
     {\doifelsenothing{#4}
        {\!!doneafalse}
        {\doifparentfileelse{#4}
           {\!!doneafalse}
           {\!!doneatrue}}%
      \setreferencefilename#4\to\DVIfile
      \scratchdimen#1\edef\width {\the\scratchdimen\space}%
      \scratchdimen#2\edef\height{\the\scratchdimen\space}%
      \special
        {button:
           \width \height
           \if!!donea
             file: \DVIfile,
           \fi
           "#5"}}
     {}% nog uri afhandelen
   \egroup}

\definespecial\dostartgotorealpage#1#2#3#4#5%
  {\bgroup
   \doifelsenothing{#3}
     {\doifelsenothing{#4}
        {\!!doneafalse}
        {\doifparentfileelse{#4}
           {\!!doneafalse}
           {\!!doneatrue}}%
      \setreferencefilename#4\to\DVIfile
      \scratchdimen#1\edef\width {\the\scratchdimen\space}%
      \scratchdimen#2\edef\height{\the\scratchdimen\space}%
      \special
        {button:
           \width \height
           \if!!donea
             file: \DVIfile,
           \fi
           \ifnum0#5=0 \else
             page: #5
           \fi}}
     {}% nog uri afhandelen
   \egroup}

\definespecial\dostartthisislocation#1%
  {\special{mark: "#1"}}

\definespecial\dostartthisisrealpage#1%
  {}

\definespecial\dostartrunprogram#1#2#3#4%
  {\bgroup
   \scratchdimen#1\edef\width {\the\scratchdimen\space}%
   \scratchdimen#2\edef\height{\the\scratchdimen\space}%
   \special{button: \width \height launch: #3 #4}%
   \egroup}

\let\doyandyinsertmov = \docommoninsertmov
\let\dotrinsertmov    = \docommoninsertmov

\stopspecials

\protect \endinput