summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-12-18 00:39:11 +0000
committerKarl Berry <karl@freefriends.org>2010-12-18 00:39:11 +0000
commit4a73b1d699271435818be5da6dafd30dfd77f8e4 (patch)
tree259babba8bd9c63550d24196ba2ab70686aac3f1 /Master/texmf-dist/tex/latex
parentf51d0af7ed4d2b504e2bff7402ac9934879e842e (diff)
fancytooltips 1.8 (18dec10)
git-svn-id: svn://tug.org/texlive/trunk@20781 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/fancytooltips/fancytipmark.pdfbin1245 -> 1454 bytes
-rw-r--r--Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty370
2 files changed, 289 insertions, 81 deletions
diff --git a/Master/texmf-dist/tex/latex/fancytooltips/fancytipmark.pdf b/Master/texmf-dist/tex/latex/fancytooltips/fancytipmark.pdf
index ee5af6ab93c..75e0f26d72c 100644
--- a/Master/texmf-dist/tex/latex/fancytooltips/fancytipmark.pdf
+++ b/Master/texmf-dist/tex/latex/fancytooltips/fancytipmark.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty b/Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty
index 1504e3d0f2e..fbf45d176bb 100644
--- a/Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty
+++ b/Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty
@@ -22,26 +22,25 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{fancytooltips}
- [2010/04/10 v1.6 fancytooltips.dtx file]
-\RequirePackage{everyshi}
+ [2010/06/10 v1.8 fancytooltips.dtx file]
\RequirePackage{graphicx}
\RequirePackage{xkeyval}
-\RequirePackage{eso-pic}
+\RequirePackage{atbegshi}
-\newif\ifcreatetips\createtipsfalse
-\DeclareOptionX{createtips}{\createtipstrue}
+\newif\if@fancytooltips@createtips\@fancytooltips@createtipsfalse
+\DeclareOptionX{createtips}{\@fancytooltips@createtipstrue}
\newif\ifTooltip@usepdftex\Tooltip@usepdftextrue
\DeclareOptionX{dvips}{\Tooltip@usepdftexfalse}
-\newif\ifextratext\extratexttrue
-\DeclareOptionX{noextratext}{\extratextfalse}
+\newif\if@fancytooltips@extratext\@fancytooltips@extratexttrue
+\DeclareOptionX{noextratext}{\@fancytooltips@extratextfalse}
-\newif\ifmovetips\movetipsfalse
-\DeclareOptionX{movetips}{\movetipstrue}
+\newif\if@fancytooltips@movetips\@fancytooltips@movetipsfalse
+\DeclareOptionX{movetips}{\@fancytooltips@movetipstrue}
-\newif\ifmouseover\mouseoverfalse
-\DeclareOptionX{mouseover}{\mouseovertrue}
+\newif\if@fancytooltips@mouseover\@fancytooltips@mouseoverfalse
+\DeclareOptionX{mouseover}{\@fancytooltips@mouseovertrue}
\newif\if@fancytooltips@inactive\@fancytooltips@inactivefalse
\DeclareOptionX{inactive}{\@fancytooltips@inactivetrue}
@@ -49,9 +48,19 @@
\newif\if@fancytooltips@active\@fancytooltips@activefalse
\DeclareOptionX{active}{\@fancytooltips@activetrue}
+\newif\if@fancytooltips@fg\@fancytooltips@fgfalse
+\DeclareOptionX{fg}{\@fancytooltips@fgtrue}
+
\DeclareOptionX{filename}{\xdef\TooltipFilename{#1}}
\DeclareOptionX{pages}{\xdef\TooltipPages{#1}}
+\newif\if@fancytooltips@blur\@fancytooltips@blurfalse
+\DeclareOptionX{blur}[0.4]{\@fancytooltips@blurtrue
+ \xdef\fancytooltips@transparency{#1}}
+
+\newif\if@fancytooltips@fixcolor\@fancytooltips@fixcolorfalse
+\DeclareOptionX{fixcolor}{\@fancytooltips@fixcolortrue}
+
\def\fancytooltipsdebugmsg{}
\DeclareOptionX{debug}{\def \fancytooltipsdebugmsg
{
@@ -67,10 +76,27 @@ if (this.getField("animtiph") == null)
\ProcessOptionsX
+\if@fancytooltips@blur
+\ifTooltip@usepdftex\else
+\@fancytooltips@blurfalse
+\AtEndDocument{\PackageWarning{fancytooltips}
+ {Blur option is incompatible with dvips. ^^J The option blur is turned off }}
+\fi
+\fi
+
+\ifTooltip@usepdftex\else
+\@fancytooltips@fgfalse
+\fi
+
\newdimen\buttontipwidth
\newdimen\buttontipheight
\newdimen\fancy@a
\newdimen\fancy@b
+\newdimen\fancy@layerHshift\fancy@layerHshift=0pt
+\newdimen\fancy@layerVshift\fancy@layerVshift=0pt
+\newdimen\fancy@button@Vshift \fancy@button@Vshift=0pt
+\newdimen\fancy@button@Hshift \fancy@button@Hshift=0pt
+\newtoks\pos@fancy@toks
\if@fancytooltips@active\@fancytooltips@inactivefalse\fi
@@ -87,6 +113,11 @@ if (this.getField("animtiph") == null)
\def\TooltipPage#1#2{}%
\let\TooltipExtratext\relax
\let\TooltipRefmark\relax
+\ifx\@ocg@makeknown\undefined
+ \def\@ocg@makeknown#1#2#3{}\fi
+\def\fancy@@pushButton#1#2#3#4#5#6#7#8{}
+\def\fancy@@anim@pushButton#1#2#3#4#5#6#7#8#9{}
+
\PackageWarning{fancytooltips}{Fancytooltips inactive}%
\expandafter\endinput\fi
@@ -116,15 +147,15 @@ if (this.getField("animtiph") == null)
\hss}%
\fi}
\ifTooltip@usepdftex
-\def\TooltipRefmark{\hbox {\raisebox{0.4em}{\includegraphics[width=0.7em]%
- {fancytipmark.pdf}}}}%
+\def\TooltipRefmark{\hbox {\smash{\raisebox{0.4em}{\includegraphics[width=0.7em]%
+ {fancytipmark.pdf}}}}}%
\else
-\def\TooltipRefmark{\hbox {\raisebox{0.4em}{\includegraphics[width=0.7em]%
- {fancytipmark.eps}}}}%
+\def\TooltipRefmark{\hbox {\smash{\raisebox{0.4em}{\includegraphics[width=0.7em]%
+ {fancytipmark.eps}}}}}%
\fi%\ifTooltip@usepdftex
}
-\ifcreatetips
+\if@fancytooltips@createtips
\newwrite\tipfile
\immediate\openout\tipfile \jobname.tips
\def\keytip#1{\write\tipfile{\string\tooltipname{#1}{\arabic{page}}}}
@@ -136,14 +167,14 @@ if (this.getField("animtiph") == null)
\ifTooltip@usepdftex
\RequirePackage[pdftex]{eforms}
-\def\TooltipExtratext{\hbox{\raisebox{0.4em}{\includegraphics[width=0.7em]%
- {fancytipmark.pdf}}}}
+\def\TooltipExtratext{\hbox{\smash{\raisebox{0.4em}{\includegraphics[width=0.7em]%
+ {fancytipmark.pdf}}}}}
\else
\RequirePackage[dvips]{eforms}
-\def\TooltipExtratext{\hbox{\raisebox{0.4em}{\includegraphics[width=0.7em]%
- {fancytipmark.eps}}}}
+\def\TooltipExtratext{\hbox{\smash{\raisebox{0.4em}{\includegraphics[width=0.7em]%
+ {fancytipmark.eps}}}}}
\fi%\ifTooltip@usepdftex
-\ifextratext\else\let\TooltipExtratext\relax\fi
+\if@fancytooltips@extratext\else\let\TooltipExtratext\relax\fi
\AtBeginDocument{
\global\buttontipwidth=\paperwidth
@@ -162,7 +193,7 @@ if (this.getField("animtiph") == null)
/BS << /W 1 /S /S >>
/MK << /TP 1 /IF <</A[1.0 1.0]/SW /B>> >>
}%
- \vbox to \buttontipheight {\vss\hbox to \buttontipwidth{\hss}}\pdfendlink}
+ \vbox to \buttontipheight {\vss\hbox to \buttontipwidth{\hss}}\pdfendlink}%
\else
\def\everyeqIcon#1{\def\every@eqIcon{#1}}
\def\every@eqIcon{}
@@ -178,9 +209,25 @@ if (this.getField("animtiph") == null)
\textColor{0 g}\Ff{\FfReadOnly}
}
\def\frametip@{\eqIconFTT[\BC{}\BG{}\F{\FHidden}]%
- {ikona.\thepage}{\paperwidth}{\paperheight}}%
+ {ikona.\thepage}{\paperwidth}{\paperheight}%
+}%
\fi%\ifTooltip@usepdftex
+\def\fancytooltips@one{1}
+\if@fancytooltips@blur
+ \RequirePackage{ocg}
+ \ifx\fancytooltips@one\fancytooltips@transparency
+ \def\transparent#1{}
+ \else
+ \RequirePackage{transparent}
+ \fi
+\else
+ \ifx\@ocg@makeknown\undefined
+ \def\@ocg@makeknown#1#2#3{}\fi
+\fi
+
+\if@fancytooltips@fg\else
+\RequirePackage{eso-pic}
\def\frametip{%
\expandafter\ifx \csname TooltipPage\thepage\endcsname\relax
\else
@@ -188,6 +235,43 @@ if (this.getField("animtiph") == null)
\hbox{\raise \dp0 \box0}
\fi}%
\AddToShipoutPicture{\hbox to 0 pt{\frametip\hss}}
+\fi
+
+\def\fancytooltips@save@position{\pdfsavepos%
+ \write\@auxout{\string\global\string \fancy@layerVshift \the\pdflastypos sp\string\relax}%
+ \write\@auxout{\string\global\string \fancy@layerHshift \the\pdflastxpos sp\string\relax}%
+}
+
+\def\fancy@beginshipout@hook{}
+\AtBeginShipout{%
+\TooltipPageopencloseJS
+\setbox\AtBeginShipoutBox=\hbox{%
+ \hbox to 0 pt{\TooltipHidden}\global\def\TooltipHidden{}%
+ \fancy@beginshipout@hook\if@fancytooltips@fixcolor\hbox to 0 pt{\resizebox{1pt}{!}{\TooltipExtratext}\hss}\fi
+ \hbox{\box\AtBeginShipoutBox}%
+ \ifTooltip@usepdftex
+ \fancytooltips@save@position
+ \if@fancytooltips@blur
+ \expandafter\ifx \csname TooltipPage\thepage\endcsname\relax \else
+ \lower\fancy@layerVshift\hbox to 0 pt{\kern-\fancy@layerHshift\relax
+ \begin{ocg}{fancyOCG\thepage}{fancyOCG\thepage}{0}%
+ \expandafter\transparent\expandafter{\fancytooltips@transparency}%
+ \color{black}%
+ \vbox to 0 pt{\vss\hbox{\vrule width \paperwidth height \paperheight}}%
+ \end{ocg}\hss}%
+ \fi
+ \fi
+ \if@fancytooltips@fg
+ \expandafter\ifx \csname TooltipPage\thepage\endcsname\relax
+ \else
+ \lower\fancy@layerVshift\vbox to 0 pt{\vss\hbox to 0 pt{\kern-\fancy@layerHshift\relax\hbox{\frametip@}\hss}}%
+ \fi
+ \lower\fancy@layerVshift\vbox to 0 pt{\vss\hbox to 0 pt{\kern-\fancy@layerHshift\relax\hbox to 0 pt{\the\pos@fancy@toks\hss}}}%
+ \fi
+ \fi
+ }%
+}%
+
\definecolor{tooltipcolor}{rgb}{0,0,1}
\newcount\tooltip@count
@@ -212,37 +296,75 @@ if (this.getField("animtiph") == null)
\newcommand{\tooltip@Star}[2]{{\color{tooltipcolor}#1}%
{\let\SaveTooltipExtratext\TooltipExtratext
\let\TooltipExtratext\relax
- \hbox to 0 pt{\tooltip@NoStar{\strut\SaveTooltipExtratext}{#2}\hss}}}
+ \hbox to 0 pt{\tooltip@NoStar{\SaveTooltipExtratext
+ \vrule height 10pt depth 0 pt width 0 pt}{#2}\hss}}}
\newcommand{\tooltip@NoStar}[2]{%
\global\advance\tooltip@count by 1%
\edef\act{\write\@auxout{\noexpand\string\noexpand\TooltipPage{\the\tooltip@count}{\the\tooltip@pagetoks}}}\act
- \edef\tooltippage{\csname Tooltipcount2page\the\tooltip@count \endcsname}%
+ \expandafter\ifx\csname Tooltipcount2page\the\tooltip@count \endcsname\relax
+ \global\edef\tooltippage{}
+ \else
+ \global\edef\tooltippage{\csname Tooltipcount2page\the\tooltip@count \endcsname}%
+ \fi
\checkTipNumber{#2}\edef\TipNumber{\FindTipNumber{#2}}%
- \def\tempfancytooltips{}%
- \ifmovetips\edef\tempfancytooltips{nastav(\TipNumber,\tooltippage);}\fi
\leavevmode
- \setbox0=\hbox{{\color{tooltipcolor}{#1}}}\hbox to 0 pt{\copy0\smash{\TooltipExtratext}\hss}%
- \fancy@a=\ht0
- \advance\fancy@a by \dp 0
- \fancy@b=0.5\fancy@a
- \advance\fancy@b by -\dp0
- \advance\fancy@b by -2bp
- \lower-\fancy@b\vtop{\hbox{%
- \pushButton[\BC{}\BG{}\S{}\AA{\AAMouseExit{\fancy@JS{CloseTooltips();}}%
- \ifmouseover
- \AAMouseEnter{\fancy@JS{this.getField("ikona."+(\tooltippage)).hidden=false;
+ \setbox0=\hbox{{\color{tooltipcolor}{#1}}}\copy0\fancy@a=\dp0\advance\fancy@a by \ht0\relax\hbox to 0 pt{\smash{\TooltipExtratext}\hss}\fancy@pushButton{\TipNumber}{\tooltippage}{TooltipField}{\wd0}{\fancy@a}{\dp0}}
+
+\def\fancy@tooltip@options#1#2{\BC{}\BG{}
+ \S{}\AA{\AAMouseExit{\fancy@JS{CloseTooltips();}}%
+ \if@fancytooltips@mouseover
+ \AAMouseEnter{\fancy@JS{this.getField("ikona."+(#2)).hidden=false;
try {app.clearInterval(animace);}catch (e) {}
- \tempfancytooltips
- zobraz(\TipNumber,\tooltippage);
+ \if@fancytooltips@movetips nastav(#1,#2);\fi
+ \if@fancytooltips@blur
+ try{
+ for(var i=0; fancytooltipsOCGs && i<fancytooltipsOCGs.length;i++)
+ {
+ if(fancytooltipsOCGs[i].name == "fancyOCG"+(#2))
+ fancytooltipsOCGs[i].state = true;
+ else
+ fancytooltipsOCGs[i].state = false;
+ }} catch (e) {};
+ \fi
+ zobraz(#1,#2);
}}
\fi}
- \A{\fancy@JS{this.getField("ikona."+(\tooltippage)).hidden=false;
+ \A{\fancy@JS{this.getField("ikona."+(#2)).hidden=false;
try {app.clearInterval(animace);}catch (e) {}
- \tempfancytooltips
- zobraz(\TipNumber,\tooltippage);
- }}]
- {TooltipField}{\wd0}{\fancy@a}}}}
+ \if@fancytooltips@movetips nastav(#1,#2);\fi
+ \if@fancytooltips@blur
+ try {
+ for(var i=0; fancytooltipsOCGs && i<fancytooltipsOCGs.length;i++)
+ {
+ if(fancytooltipsOCGs[i].name == "fancyOCG"+(#2))
+ fancytooltipsOCGs[i].state = true;
+ else
+ fancytooltipsOCGs[i].state = false;
+ }} catch (e) {};
+ \fi
+ zobraz(#1,#2);
+ }}}
+
+\newtoks\@fxtoks\@fxtoks={\the\pdflastxpos}
+\newtoks\@fytoks\@fytoks={\the\pdflastypos}
+
+\def\fancy@pushButton#1#2#3#4#5#6{%
+ \lower #6\hbox to 0 pt{\hss\expandafter\pushButton\expandafter[\fancy@tooltip@options{#1}{#2}]{#3}{#4}{#5}}}
+\def\fancy@@pushButton#1#2#3#4#5#6#7#8{}
+
+\ifTooltip@usepdftex
+\if@fancytooltips@fg
+\def\fancy@pushButton#1#2#3#4#5#6{\pdfsavepos%
+ \edef\act{\write\@auxout{\string\fancy@@pushButton{#1}{#2}{#3}{\the#4}{\the#5}{\the\@fxtoks}{\the\@fytoks}{\the#6}}}\act%
+}
+\def\fancy@@pushButton#1#2#3#4#5#6#7#8{%
+ \expandafter\global\expandafter\pos@fancy@toks\expandafter{\the\pos@fancy@toks\fancy@onlypage{#2}{\vbox to 0 pt{\vss\hbox to 0 pt{\kern #6 sp\hbox to 0 pt{\hss\expandafter\pushButton\expandafter[\fancy@tooltip@options{#1}{#2}]{#3}{#4}{#5}}\hss}\kern #7sp\kern-#8}}}}
+\fi
+\fi
+
+\def\fancy@onlypage#1#2{\def\ft@a{#1}\edef\ft@b{\thepage}%
+\ifx\ft@a\ft@b#2\fi}
\def\delayinterval{200}
@@ -254,86 +376,172 @@ if (this.getField("animtiph") == null)
\newcommand{\tooltipanim@Star}[3]{{\color{tooltipcolor}#1}%
{\let\SaveTooltipExtratext\TooltipExtratext
\let\TooltipExtratext\relax
- \hbox to 0 pt{\tooltipanim@NoStar{\strut\SaveTooltipExtratext}{#2}{#3}\hss}}}
+ \hbox to 0 pt{\tooltipanim@NoStar{\SaveTooltipExtratext
+ \vrule height 10pt depth 0 pt width 0 pt}{#2}{#3}\hss}}}
\newcommand{\tooltipanim@NoStar}[3]{%
\global\advance\tooltip@count by 1%
\edef\act{\write\@auxout{\noexpand\string\noexpand\TooltipPage{\the\tooltip@count}{\the\tooltip@pagetoks}}}\act
- \edef\tooltippage{\csname Tooltipcount2page\the\tooltip@count \endcsname}%
+ \expandafter\ifx\csname Tooltipcount2page\the\tooltip@count \endcsname\relax
+ \global\edef\tooltippage{}
+ \else
+ \global\edef\tooltippage{\csname Tooltipcount2page\the\tooltip@count \endcsname}%
+ \fi
\checkTipNumber{#2}\edef\TipNumberA{\FindTipNumber{#2}}%
\checkTipNumber{#3}\edef\TipNumberB{\FindTipNumber{#3}}%
\leavevmode
- \setbox0=\hbox{{\color{tooltipcolor}{#1}}}\hbox to 0 pt{\copy0\smash{\TooltipExtratext}\hss}%
- \def\tempfancytooltips{}%
- \ifmovetips\edef\tempfancytooltips{nastav(\TipNumberA,\tooltippage);}\fi
- \fancy@a=\ht0
- \advance\fancy@a by \dp 0
- \fancy@b=0.5\fancy@a
- \advance\fancy@b by -\dp0
- \advance\fancy@b by -2bp
- \lower-\fancy@b\vtop{\hbox{%
- \pushButton[\BC{}\BG{}\S{}\AA{\AAMouseExit{\fancy@JS{CloseTooltips();}}
- \ifmouseover
+ \setbox0=\hbox{{\color{tooltipcolor}{#1}}}\copy0\fancy@a=\dp0\advance\fancy@a by \ht0\relax\hbox to 0 pt{\smash{\TooltipExtratext}\hss}\fancy@anim@pushButton{\TipNumberA}{\tooltippage}{TooltipField}{\wd0}{\fancy@a}{\dp0}{\TipNumberB}}
+
+\def\fancy@tooltipanim@options#1#2#3{
+\BC{}\BG{}\S{}\AA{\AAMouseExit{\fancy@JS{CloseTooltips();}}
+ \if@fancytooltips@mouseover
\AAMouseEnter{\fancy@JS{
try {app.clearInterval(animace);}catch (e) {}
- var cislo=\TipNumberA;
- \tempfancytooltips
+ var cislo=#1;
+ \if@fancytooltips@movetips nastav(#1,#2);\fi
+ \if@fancytooltips@blur
+ try{
+ for(var i=0; fancytooltipsOCGs && i<fancytooltipsOCGs.length;i++)
+ {
+ if(fancytooltipsOCGs[i].name == "fancyOCG"+(#2))
+ fancytooltipsOCGs[i].state = true;
+ else
+ fancytooltipsOCGs[i].state = false;
+ }} catch (e) {};
+ \fi
function animuj()
{
var DirtyBeforeTooltipanim=this.dirty;
- if (cislo<\TipNumberB) cislo=cislo+1;
- this.getField('ikona.'+(\tooltippage)).buttonSetIcon(this.getField("animtiph."+cislo).buttonGetIcon());
+ if (cislo<#3) cislo=cislo+1;
+ this.getField('ikona.'+(#2)).buttonSetIcon(this.getField("animtiph."+cislo).buttonGetIcon());
this.dirty=DirtyBeforeTooltipanim;
};
- this.getField('ikona.'+(\tooltippage)).buttonSetIcon(this.getField("animtiph."+\TipNumberA).buttonGetIcon());
- this.getField("ikona."+(\tooltippage)).hidden=false;
+ this.getField('ikona.'+(#2)).buttonSetIcon(this.getField("animtiph."+#1).buttonGetIcon());
+ this.getField("ikona."+(#2)).hidden=false;
animace=app.setInterval('animuj();', \delayinterval);
}}
\fi}
\A{\fancy@JS{
try {app.clearInterval(animace);}catch (e) {}
- var cislo=\TipNumberA;
- \tempfancytooltips
+ var cislo=#1;
+ \if@fancytooltips@movetips nastav(#1,#2);\fi
+ \if@fancytooltips@blur
+ try{
+ for(var i=0; fancytooltipsOCGs && i<fancytooltipsOCGs.length;i++)
+ {
+ if(fancytooltipsOCGs[i].name == "fancyOCG"+(#3))
+ fancytooltipsOCGs[i].state = true;
+ else
+ fancytooltipsOCGs[i].state = false;
+ }} catch (e) {};
+ \fi
function animuj()
{
var DirtyBeforeTooltipanim=this.dirty;
- if (cislo<\TipNumberB) cislo=cislo+1;
- this.getField('ikona.'+(\tooltippage)).buttonSetIcon(this.getField("animtiph."+cislo).buttonGetIcon());
+ if (cislo<#3) cislo=cislo+1;
+ this.getField('ikona.'+(#2)).buttonSetIcon(this.getField("animtiph."+cislo).buttonGetIcon());
this.dirty=DirtyBeforeTooltipanim;
};
- this.getField('ikona.'+(\tooltippage)).buttonSetIcon(this.getField("animtiph."+\TipNumberA).buttonGetIcon());
- this.getField("ikona."+(\tooltippage)).hidden=false;
+ this.getField('ikona.'+(#2)).buttonSetIcon(this.getField("animtiph."+#1).buttonGetIcon());
+ this.getField("ikona."+(#2)).hidden=false;
animace=app.setInterval('animuj();', \delayinterval);
}}
- ]{TooltipField}{\wd0}{\fancy@a}}}}
+}
+
+\def\fancy@anim@pushButton#1#2#3#4#5#6#7{%
+ \lower #6 \hbox to 0 pt{\hss\expandafter\pushButton\expandafter[\fancy@tooltipanim@options{#1}{#2}{#7}]{#3}{#4}{#5}}}
+\def\fancy@@anim@pushButton#1#2#3#4#5#6#7#8#9{}
+
\ifTooltip@usepdftex
-\def\TooltipPageopencloseJS{ \global\pdfpageattr{%
- /AA << /O << /S /JavaScript /JS (
- var DirtyBeforeCloseTooltip=this.dirty; CloseTooltips(); this.dirty=DirtyBeforeCloseTooltip;) >> >>}%
+\if@fancytooltips@fg
+\def\fancy@anim@pushButton#1#2#3#4#5#6#7{\pdfsavepos%
+ \edef\act{\write\@auxout{\string\fancy@@anim@pushButton{#1}{#2}{#3}{\the#4}{\the#5}{\the\@fxtoks}{\the\@fytoks}{\the#6}{#7}}}\act%
+}
+\def\fancy@@anim@pushButton#1#2#3#4#5#6#7#8#9{%
+ \expandafter\global\expandafter\pos@fancy@toks\expandafter{\the\pos@fancy@toks\fancy@onlypage{#2}{\vbox to 0 pt{\vss\hbox to 0 pt{\kern #6 sp\hbox to 0 pt{\hss\expandafter\pushButton\expandafter[\fancy@tooltipanim@options{#1}{#2}{#9}]{#3}{#4}{#5}}\hss}\kern #7sp\kern-#8}}}}
+\fi
+\fi
+
+\edef\fancytooltips@pdfpageattrJS{%
+ var DirtyBeforeCloseTooltip=this.dirty;
+ \if@fancytooltips@blur
+ try{
+ var temp = fancytooltipsOCGs.length;
+ for(var i=0; fancytooltipsOCGs && i<fancytooltipsOCGs.length;i++)
+ {
+ fancytooltipsOCGs[i].state = false;
+ }
+ }
+ catch (e){}
+ \fi
+ CloseTooltips();
+ this.dirty=DirtyBeforeCloseTooltip;
+}
+\ifTooltip@usepdftex
+\edef\fancy@temp{/AA << /O << /S /JavaScript /JS (
+ \fancytooltips@pdfpageattrJS) >> >>}
+\expandafter\def\expandafter\TooltipPageopencloseJS\expandafter{
+\expandafter\global\expandafter\pdfpageattr\expandafter{\fancy@temp}%
}
\pdfximage{\TooltipFilename.pdf}%
\edef\TooltipPages{\the\pdflastximagepages}%
\else
-\def\TooltipPageopencloseJS{
-\literalps@out{%
- [ {ThisPage} << /AA <<
+\edef\fancy@temp{ [ {ThisPage} << /AA <<
/O << /S /JavaScript /JS (var DirtyBeforeCloseTooltip=this.dirty; CloseTooltips(); this.dirty=DirtyBeforeCloseTooltip;) >>
- >> >> /PUT pdfmark}}
-\OpenAction{/S /JavaScript /JS (var DirtyBeforeCloseTooltip=this.dirty; CloseTooltips(); this.dirty=DirtyBeforeCloseTooltip;)}
+ >> >> /PUT pdfmark}
+\expandafter\def\expandafter\TooltipPageopencloseJS\expandafter{
+\expandafter\literalps@out\expandafter{\fancy@temp}}
+\edef\fancy@@temp{/S /JavaScript /JS ( \fancytooltips@pdfpageattrJS)}
+\expandafter\OpenAction\expandafter{\fancy@@temp}
\fi%\ifTooltip@usepdftex
-\EveryShipout{\TooltipPageopencloseJS}%
\ifTooltip@usepdftex
+\def\fancytempA{}
+\ifx\FancytooltipsAfterClose\undefined\else\edef\fancytempA{\FancytooltipsAfterClose}\fi
+\def\fancytempAA{}
+\ifx\FancytooltipsAfterShow\undefined\else\edef\fancytempAA{\FancytooltipsAfterShow}\fi
+
+\if@fancytooltips@blur
+\def\fancytempAAA{
+ var inifancytooltipsOCGs = this.getOCGs();
+ var fancytooltipsOCGs = [];
+ for(var i=0; inifancytooltipsOCGs && i<inifancytooltipsOCGs.length;i++)
+ {
+ if(inifancytooltipsOCGs[i].name.substr(0,5) == "fancy")
+ {
+ fancytooltipsOCGs.push(inifancytooltipsOCGs[i]);
+ inifancytooltipsOCGs[i].state=false;
+ }
+ }
+ inifancytooltipsOCGs[0].state=true;
+ inifancytooltipsOCGs[0].state=false;
+}
+\else
+\def\fancytempAAA{}
+\fi
+
+\if@fancytooltips@blur
+\def\fancytempB{
+ try {for(var i=0; fancytooltipsOCGs && i<fancytooltipsOCGs.length;i++)
+ {fancytooltipsOCGs[i].state = false;} } catch (e) {}}
+\else
+\def\fancytempB{}
+\fi
+
\begin{insDLJS}[fancyTooltipsLoaded]{Tooltipsdljs}{DLJS for Tooltips}
\fancytooltipsdebugmsg
var animace;
var fancyTooltipsLoaded = true;
+ \fancytempAAA
+
function CloseTooltips()
{
try {this.getField("ikona").hidden=true;}catch (e) {}
try {app.clearInterval(animace);}catch (e) {}
+ \fancytempB
+ \fancytempA
}
function nastav(cislo,strana)
@@ -361,6 +569,7 @@ if (this.getField("animtiph") == null)
var g=this.getField("animtiph."+cislo);
f.hidden=false;
f.buttonSetIcon(g.buttonGetIcon());
+ \fancytempAA
}
this.dirty=false;
@@ -457,7 +666,6 @@ if (this.getField("animtiph") == null)
\egroup
\advance\count@\@ne}%
}
-\AddToShipoutPicture*{\hbox to 0 pt{\TooltipHidden}}
\else
\let\TooltipHidden\relax
\fi
@@ -473,7 +681,7 @@ if (this.getField("animtiph") == null)
#1\else\csname FancyToolTip@#1\endcsname\fi}
\def\checkTipNumber#1{\expandafter\ifx
- \csname FancyToolTip@#1\endcsname\relax \PackageWarning{fancytooltips}{No
+ \csname FancyToolTip@#1\endcsname\relax \PackageInfo{fancytooltips}{No
framenumber is assigned to keyword #1. I assume that #1 is the
number of the frame.}%
\fi}