create context-beginner-vi
[cuteobr.git] / context-beginner-vi / ma-cb-screen.tex
blob2f883119f185b1fa0b0d743001fa01d721ad83a0
1 \startenvironment ma-cb-screen
3 % This setups adds some functionality as well as redefines
4 % some of the previously defined layout.
6 \unprotect
8 \definepapersize
9 [LocalPaperFormat]
10 [\c!width=28cm,
11 \c!height=21cm]
13 \setuppapersize
14 [LocalPaperFormat]
15 [LocalPaperFormat]
17 \setuplayout
18 [\c!location=\v!middle,
19 \c!topspace=.5cm,
20 \c!header=1.5cm,
21 \c!height=20cm,
22 \c!rightedge=5cm,
23 \c!rightedgedistance=1cm]
25 \setupinteractionscreen
26 [\c!width=28cm,
27 \c!height=21cm,
28 \c!option=\v!max]
30 % We place the pagenumber (not that useful in an interactive
31 % document) somewhere else and the chapter number in the
32 % footer.
34 \setuppagenumbering
35 [\c!alternative=\v!singlesided,
36 \c!location=,
37 \c!command=\NummerCommando]
39 \unexpanded\def\NummerCommando#1% uitlijnen op onderkant voet
40 {\hbox to \rightedgewidth
41 {\scratchcounter=\lastpage
42 \advance\scratchcounter by -\realpageno
43 \hskip0pt plus \realpageno cm
44 \framed
45 [\c!background=NummerAchtergrond,
46 \c!frame=\v!off,
47 \c!offset=4pt]%
48 {\lower.5\dp\strutbox\hbox spread 60pt{\hss\tx#1\hss}}% {\hss#1\hss}}%
49 \hskip0pt plus \scratchcounter cm}}
51 \setupfootertexts
52 [\v!edge]
53 [][\v!pagenumber]
55 \unexpanded\def\PlaatsHoofdstukStatus
56 {\determineheadnumber[\v!chapter]%
57 \ifnum\currentheadnumber>0
58 \hbox to \hsize
59 {\hss
60 \framed
61 [\c!background=NummerAchtergrond,
62 \c!frame=\v!off,
63 \c!offset=6pt]
64 {\lower.5\dp\strutbox\hbox spread 60pt
65 {\hss\getmarking[\v!chapter\v!number]\hss}}%
66 \hss}
67 \fi}
69 \setupfootertexts
70 [\v!margin]
71 [][]
73 \setupfootertexts
74 [\v!text]
75 [][\PlaatsHoofdstukStatus]
77 \setupinteraction
78 [\c!state=\v!start,
79 \c!color=,
80 \c!menu=\v!on]
82 % We let users click on the whole table of contents line and
83 % provide some menus.
85 \setuplist
86 [\v!chapter]
87 [\c!interaction=\v!all]
89 \setupinteractionmenu
90 [\v!right]
91 [\c!state=\v!start,
92 \c!color=,
93 \c!offset=4pt,
94 \c!background=MenuAchtergrond,
95 \c!frame=\v!off]
97 \startmode[**nl]
99 \setupinteractionmenu
100 [\v!right]
101 [ {inhoud[contents]},
102 {index[subind]},
103 {commando's[comind]},
104 {definities[comdefs]},
105 {colofon[colofon]},
106 {\vfill},
107 {stoppen[\v!CloseDocument]},
108 {\ZoekEnZoek{zoeken}},
109 {terug[\v!PreviousJump]},
110 {\HeenEnWeer}]
112 \stopmode
114 \startmode[**en,**uk]
116 \setupinteractionmenu
117 [\v!right]
118 [ {contents[contents]},
119 {index[subind]},
120 {commands[comind]},
121 {definitions[comdefs]},
122 {colofon[colofon]},
123 {\vfill},
124 {exit[\v!CloseDocument]},
125 {\ZoekEnZoek{search}},
126 {go back[\v!PreviousJump]},
127 {\HeenEnWeer}]
129 \stopmode
131 \startmode[**cz]
133 \setupinteractionmenu
134 [\v!right]
135 [ {obsah[contents]},
136 {rejst\rcaron\iacute k[subind]},
137 {seznam p\rcaron\iacute kaz\uring[comind]},
138 {definice p\rcaron\iacute kaz\uring[comdefs]},
139 {tir\aacute\zcaron[colofon]},
140 {\vfill},
141 {konec[\v!CloseDocument]},
142 {\ZoekEnZoek{vyhledej}},
143 {krok zp\ecaron t[\v!PreviousJump]},
144 {\HeenEnWeer}]
146 \stopmode
148 \startmode[**fr]
150 \setupinteractionmenu
151 [\v!right]
152 [ {table des mati\egrave res[contents]},
153 {index[subind]},
154 {commandes[comind]},
155 {d\eacute finitions[comdefs]},
156 {colophon[colofon]},
157 {\vfill},
158 {quitter[\v!CloseDocument]},
159 {\ZoekEnZoek{recherche}},
160 {retour[\v!PreviousJump]},
161 {\HeenEnWeer}]
163 \stopmode
165 % This not that \TEX nical definition deals with the two sets
166 % of buttons. Someday I'll make a general macro for this.
168 \def\TwoMenuButtons#1[#2]#3[#4]%
169 {\hbox to \hsize
170 {\dimen0=\hsize
171 \advance\hsize by -12pt
172 \menubutton[\v!right][\c!width=.5\hsize]{#1}[#2]%
173 \hss
174 \menubutton[\v!right][\c!width=.5\hsize]{#3}[#4]}}
176 \def\HeenEnWeer
177 {\TwoMenuButtons{--}[\v!previouspage]{+}[\v!nextpage]}
179 \def\ZoekEnZoek#1%
180 {\TwoMenuButtons{#1}[\v!SearchDocument]{+}[\v!SearchAgain]}
182 \protect
184 \stopenvironment