summaryrefslogtreecommitdiff
path: root/texmf-dist/tex/latex/aeb-pro/aeblayers.def
blob: beec800aa654bff5168ec6221b31f41b05e51801 (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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
%%
%% This is file `aeblayers.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% aeb_pro.dtx  (with options: `copyright,aeblayers')
%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% aeb_pro.sty package,                                 %%
%% Copyright (C) 2006--2021  D. P. Story                %%
%%   dpstory@acrotex.net                                %%
%%                                                      %%
%% This program can redistributed and/or modified under %%
%% the terms of the LaTeX Project Public License        %%
%% Distributed from CTAN archives in directory          %%
%% macros/latex/base/lppl.txt; either version 1.2 of    %%
%% the License, or (at your option) any later version.  %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\ifaeb@ocOn \aeb@ocOntrue
\ifaeb@ocOn
\AtBeginDocument{%
\headerps@out{%
{/OCProcSet /ProcSet findresource} stopped not
{/initialize get exec}
{
/BeginOC /pop load def
/EndOC {} def
/SimpleOC /pop load def
/SetOCGInitState {pop pop} bind def
/OCEndPage {} def
/SetOCGIntent {pop pop} bind def
/SetOCGUsage {pop pop} bind def
/AddASEvent {pop pop pop} bind def
}
ifelse
}
}\fi
\ifaeb@ocOn
    \AtEndDocument{\literalps@out{{/OCProcSet /ProcSet findresource
    /terminate get exec} stopped pop}}
\fi
\begin{insDLJS}[getxBld]{aebocg}{AeB Pro: OCG Support}
var ocgs = this.getOCGs();
var xBlds = new Array();
if ( ocgs != null ) {
    var l = ocgs.length;
    for ( i=0; i<l; i++ ) {
        if (ocgs[0].name.substring(0,3) == "xb." )
            xBlds.push(ocgs.shift());
        else ocgs.push(ocgs.shift());
    }
}
var assocxLayers = new Array();
if ( xBlds != null ) {
    for ( var i=0; i<xBlds.length; i++)
        assocxLayers[xBlds[i].name]=i;
}
function getxBld (name) {
    var i = assocxLayers["xb."+name];
    return ( i == undefined ) ? null : xBlds[i];
}
function toggleHelp (name)
{
    var o = getxBld(name);
    if ( o != null ) o.state = (event.name.indexOf("Enter") != -1);
}
function toggleSetThisLayer(name, bState) {
    var oLayer = getxBld(name);
    if ( oLayer != null )
        oLayer.state = (arguments.length > 1) ? bState : !oLayer.state;
}
function getLayerState(name) {
    var oLayer = getxBld(name);
    return ( oLayer != null ) ? oLayer.state : null;
}
\end{insDLJS}
\newcommand{\texHelpIndicatorColor}{webblue}
\newcommand{\texHelpIndicator}[1]{#1\thinspace${}^{\mbox
  {\footnotesize\negthinspace\ding{109}}\raisebox{.225ex}
  {\llap{\color{\texHelpIndicatorColor}%
  \tiny?\hspace{1.3ex}}}}$}
\newcommand{\addJStexHelpEnter}[1]{\def\aebp@addJStexHelpEnter{\r#1}}
\newcommand{\addJStexHelpExit}[1]{\def\aebp@addJStexHelpExit{\r#1}}
\newcommand{\resetaddJStexHelp}{%
  \let\aebp@addJStexHelpEnter\@empty
  \let\aebp@addJStexHelpExit\@empty
}
\resetaddJStexHelp
\newif\iftexhelptoggleOff \texhelptoggleOfftrue
\newcommand{\texHelp}{\@ifstar{\texhelptoggleOfffalse\texHelp@i}
  {\texhelptoggleOfftrue\texHelp@i}}
\newcommand{\texHelp@i}[2]{%
  \let\rollormargstring\texorpdfstring
  \sbox{\aebsavehelp}{\texHelpIndicator{#2}}%
  \makebox[0pt][l]{\pushButton[\S{S}\BG{}\BC{}\H{N}
  \AA{\AAMouseEnter{\JS{toggleHelp("#1");\aebp@addJStexHelpEnter}}%
  \AAMouseExit{\JS{\iftexhelptoggleOff toggleHelp("#1");\fi
  \aebp@addJStexHelpExit}}}]{#1}%
    {\wd\aebsavehelp}{\ht\aebsavehelp+\dp\aebsavehelp}}%
  \usebox{\aebsavehelp}\resetaddJStexHelp
  \let\rollormargstring\@gobbletwo
}
\newif\ifaeb@SimpleOCOn \aeb@SimpleOCOnfalse
\newcommand{\@SOC}[2][false]{\global\aeb@SimpleOCOntrue%
    \ifaeb@ocOn\literalps@out{(#2) SimpleOC (#2) #1 SetOCGInitState}\fi}
\newcommand{\b@OC}[2][false]{\ifaeb@SimpleOCOn\@aebSimpleNesterror\fi
    \ifaeb@ocOn\literalps@out{(#2) BeginOC (#2) #1 SetOCGInitState}\fi}
\newcommand{\e@OC}{\ifaeb@ocOn\literalps@out{EndOC}\fi}
\newcommand{\xBld}[2][]{%
    \setkeys{aebpxBld}{false,#1}\b@OC[\aebpxBld@visible]{xb.#2}%
    \ifx\aebpxBld@print\@empty\else
        \literalps@out{/Print [/Print] [(xb.#2)] AddASEvent}%
        \ifAEBP@aebpxBld@print
            \literalps@out{(xb.#2) << /Print<<
                /PrintState/ON >> >> SetOCGUsage}%
        \else
            \literalps@out{(xb.#2) << /Print<<
                /PrintState/OFF >> >> SetOCGUsage}%
        \fi
        \global\let\aebpxBld@print\@empty
    \fi
}
\let\eBld\e@OC
\def\@aebSimpleNesterror{\PackageWarning{aeb}
{The scope of the last \string\Bld\space command
\MessageBreak includes the scope of the nested Bld.
\MessageBreak Executing \protect\ocOff\space to correct this.
\MessageBreak The problem occurs}\ocOff}
\newif\ifAEBP@aebpxBld@print \AEBP@aebpxBld@printfalse
\define@choicekey+{aebpxBld}{print}[\val\nr]{true,false,%
  visible,always,never}[visible]{%
  \ifcase\nr\relax
    \def\aebpxBld@print{true}\AEBP@aebpxBld@printtrue\or
    \def\aebpxBld@print{false}\AEBP@aebpxBld@printfalse\or
    \let\aebpxBld@print\@empty\or
    \def\aebpxBld@print{true}\AEBP@aebpxBld@printtrue\or
    \def\aebpxBld@print{false}\AEBP@aebpxBld@printfalse\fi
}{\PackageWarning{aeb_pro}{Bad choice for initState, permissible values
  are true, false, visible, always, and never. Try again}}
\let\aebpxBld@print\@empty
\define@key{aebpxBld}{true}[true]{\def\aebpxBld@visible{#1}}
\define@key{aebpxBld}{false}[false]{\def\aebpxBld@visible{#1}}
\define@choicekey+{aebpxBld}{initState}[\val\nr]{on,off,%
  true,false}[false]{%
  \ifcase\nr\relax
    \def\aebpxBld@visible{true}\or
    \def\aebpxBld@visible{false}\or
    \def\aebpxBld@visible{true}\or
    \def\aebpxBld@visible{false}\fi
}{\PackageWarning{aeb_pro}{Bad choice for initState, permissible values
  are on, off, true and false. Try again}}
\long\def\defineRC#1#2{\csarg\def{RC#1}{#2}}
\def\insertRC#1{\@nameuse{RC#1}}
\long\def\definePR#1#2{%
  \ifeqforpaper\csarg\def{PR#1}{#2}\else
  \ifeq@proofing\csarg\def{PR#1}{#2}\else
  \csarg\let{PR#1}\relax\fi\fi
}
\def\insertPR#1{%
  \ifeq@proofing\@nameuse{PR#1}\else
  \csarg\let{insertPR}\@gobble\fi
  \csarg\let{PR#1}\relax
}
\@ifundefined{ifeqforpaper}{\newif\ifeqforpaper \eqforpaperfalse}{}
\@ifundefined{ifeq@proofing}{\newif\ifeq@proofing \eq@proofingfalse}{}
\providecommand\turnProofingOn{\eq@proofingtrue}
\providecommand\turnProofingOff{\eq@proofingfalse}
\def\proofRollovers{%
    \ifeqforpaper
        \ifeq@proofing
            \includecomment{rollover}%
            \includecomment{printRollover}%
        \else
            \excludecomment{printRollover}%
            \includecomment{rollover}%
        \fi
    \else
        \ifeq@proofing
            \includecomment{rollover}%
            \includecomment{printRollover}%
        \else
            \excludecomment{printRollover}%
            \includecomment{rollover}%
        \fi
    \fi
}
\proofRollovers
\@onlypreamble\proofRollovers
\newcommand\texPHProof[2]{\small\raggedright\texttt{#1}: #2}
\let\rollormargstring\@gobbletwo
\def\texPrintHelp#1#2{%
    \let\rollormargstring\texorpdfstring
    \ifeqforpaper
        \ifeq@proofing
            \texHelp{#1}{#2}\marginpar{\Hy@pdfstringfalse
                \texPHProof{#1}{#2}}\else
            \texHelpIndicator{#2}\fi
    \else
        \texHelp{#1}{#2}\ifeq@proofing\marginpar{\Hy@pdfstringfalse
            \texPHProof{#1}{#2}}\fi
    \fi
    \let\rollormargstring\@gobbletwo
}
\newcommand{\animeBld}[1][]{\stepcounter{ocSeq}%
    \xBld[#1]{\animBldName}}
\newcounter{ocSeq}
\newcommand{\animeName}[1]{anime!!#1}%01/01/2010
\newcommand{\DeclareAnime}[3]
{%
    \setcounter{ocSeq}{0}%
    \xdef\animBaseName{anime!!#1}%01/01/2010
    \xdef\animSpeed{#2}\xdef\nFrames{#3}%
    \gdef\animBldName{\animBaseName\#\theocSeq}%
}
\newcommand{\backAnimeBtn}[3][]
{%
    \pushButton[\textFont{Wingdings3}\uCA{FEFF00C5}\TU{Reverse}#1
    \A{\JS{%
        try { aebAnimeTimeOutF.running=false; } catch(e) {}\r
        try { aebAnimeTimeOutB.running=false; } catch(e) {}\r
        aebAnimeLayersBackward(\animSpeed,\nFrames,"\animBaseName");
    }}]{\animBaseName BtnBack}{#2}{#3}%
}
\newcommand{\clearAnimeBtn}[3][]
{%
    \pushButton[\textFont{Wingdings}\CA{n}\TU{Clear}#1
    \A{\JS{%
        try { aebAnimeTimeOutF.running=false; } catch(e) {}\r
        try { aebAnimeTimeOutB.running=false; } catch(e) {}\r
        aebAnimeLayersClear(\animSpeed,\nFrames,"\animBaseName");
    }}]{\animBaseName BtnClear}{#2}{#3}%
}
\newcommand{\forwardAnimeBtn}[3][]
{%
    \pushButton[\textFont{Wingdings3}\uCA{FEFF00C6}\TU{Graph It!}#1
    \A{\JS{%
        try { aebAnimeTimeOutF.running=false; } catch(e) {}\r
        try { aebAnimeTimeOutB.running=false; } catch(e) {}\r
        aebAnimeLayersForward(\animSpeed,\nFrames,"\animBaseName");
    }}]{\animBaseName BtnForward}{#2}{#3}%
}
\begin{insDLJS}[_animeLayers]{animelayers}
    {AeB Pro: JS in Support of Anime}
var _animeLayers = true;
var aebAnimeTimeOutF = new Object();
aebAnimeTimeOutF.running=false;
var aebAnimeTimeOutB = new Object();
aebAnimeTimeOutB.running=false;
var aebAnimeTimeOutC = new Object();
function aebAnimeLayersForward(animSpeed,nFrames,baseName)
{
    var timeinterval = animSpeed;
    aebAnimeTimeOutF = app.setInterval("aebAnimeTimeOutF.count++;"
        + "if (aebAnimeTimeOutF.count > "
        + nFrames + " || !aebAnimeTimeOutF.running )"
        +" app.clearInterval(aebAnimeTimeOutF);\r"
        + "else { if (aebAnimeTimeOutF.count == 1 )"
        +" getxBld('"+baseName+"\#1').state=true;\t"
        + "else { getxBld('"+baseName+"\#'"
        + "+(aebAnimeTimeOutF.count-1)).state=false;\t"
        + "getxBld('"+baseName+"\#'"
        + "+aebAnimeTimeOutF.count).state=true;}}", timeinterval);
    aebAnimeTimeOutF.running = true;
    aebAnimeTimeOutF.start = 1;
    aebAnimeTimeOutF.count=0;
}
function aebAnimeLayersBackward(animSpeed,nFrames,baseName)
{
    var timeinterval = animSpeed;
    aebAnimeTimeOutB = app.setInterval("aebAnimeTimeOutB.count++;\r"
     + "if (aebAnimeTimeOutB.count > "+nFrames
     +"|| !aebAnimeTimeOutB.running )"
     +" app.clearInterval(aebAnimeTimeOutB);\r"
     + "else { if (aebAnimeTimeOutB.count == "
     +nFrames+") getxBld('"+baseName+"\#1').state=false;\r"
     + "else { getxBld('"+baseName+"\#'"
     + "+(aebAnimeTimeOutB.start-%
aebAnimeTimeOutB.count+1)).state=false;\r"
     + "getxBld('"+baseName+"\#'"
     + "+(aebAnimeTimeOutB.start-%
aebAnimeTimeOutB.count)).state=true;}}",
     timeinterval);
    aebAnimeTimeOutB.running = true;
    aebAnimeTimeOutB.start = nFrames;
    aebAnimeTimeOutB.count=0;
}
function aebAnimeLayersClear(animSpeed,nFrames,baseName)
{
    aebAnimeTimeOutF.running = false;
    aebAnimeTimeOutB.running = false;
    clearFrames = app.setTimeOut(
        "hideAllFrames("+nFrames+",\""+baseName+"\")",animSpeed);
    var timeinterval = animSpeed;
    aebAnimeTimeOutC = app.setInterval("aebAnimeTimeOutC.count++;\r"
     + "if (aebAnimeTimeOutC.count >= "+nFrames
     +") app.clearInterval(aebAnimeTimeOutC);\r"
     + "else { getxBld('"+baseName+"\#'"
     +"+(aebAnimeTimeOutC.start-aebAnimeTimeOutC.count)).state=false;}",
     timeinterval);
    aebAnimeTimeOutC.start = nFrames;
    aebAnimeTimeOutC.count=0;
}
function hideAllFrames(n, baseName)
{
    for ( var i=1; i <= n ; i++ )
        getxBld(baseName+"\#"+i).state=false;
}
\end{insDLJS}
\endinput
%%
%% End of file `aeblayers.def'.