diff options
author | Karl Berry <karl@freefriends.org> | 2009-05-06 15:01:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-05-06 15:01:56 +0000 |
commit | 6534ce0ba0f2e405c4bbe618499e235d5830f5a2 (patch) | |
tree | 6ba687710248189e71bc06d7767e68bc1374c4fe /Master/texmf-dist/tex/latex/fancytooltips | |
parent | 8ff84fe02cc02e3ce7131188816307c51f9ee3d8 (diff) |
fancytooltips update (4may09)
git-svn-id: svn://tug.org/texlive/trunk@12946 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/fancytooltips')
-rw-r--r-- | Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty b/Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty index 3a4011f9c50..83fb819cd1d 100644 --- a/Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty +++ b/Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty @@ -22,7 +22,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{fancytooltips} - [2007/07/28 v1.3a fancytooltips.dtx file] + [2009/05/05 v1.5 fancytooltips.dtx file] \RequirePackage{everyshi} \RequirePackage{graphicx} \RequirePackage{xkeyval} @@ -117,80 +117,82 @@ \fi}% \AddToShipoutPicture{\hbox to 0 pt{\frametip\hss}} \definecolor{tooltipcolor}{rgb}{0,0,1} -\def\TooltipPage#1{\expandafter\gdef\csname TooltipPage#1\endcsname{#1}} -\ifmouseover + +\newcount\tooltip@count +\newtoks\tooltip@toks +\newtoks\tooltip@pagetoks +\tooltip@pagetoks={\thepage} +\def\tooltippage{} + +\def\TooltipPage#1#2{% +\expandafter\gdef\csname TooltipPage#2\endcsname{#2}% +\expandafter\gdef\csname Tooltipcount2page#1\endcsname{#2}% +} + \def\tooltip#1#2{% - \write\@auxout{\noexpand\TooltipPage{\thepage}}% + \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}% \checkTipNumber{#2}\edef\TipNumber{\FindTipNumber{#2}}% \leavevmode \setbox0=\hbox{{\color{tooltipcolor}{#1}}}\hbox to 0 pt{{\copy0\TooltipExtratext\hss}}% - \pushButton[\BC{}\BG{}\S{}\AA{\AAMouseExit{\JS{CloseTooltips();}} - \AAMouseEnter{\JS{this.getField("ikona."+(this.pageNum+1)).hidden=false; + \def\tempfancytooltips{}% + \ifmovetips\edef\tempfancytooltips{nastav(\TipNumber,\tooltippage);}\fi + \pushButton[\BC{}\BG{}\S{}\AA{\AAMouseExit{\JS{CloseTooltips();}}% + \ifmouseover + \AAMouseEnter{\JS{this.getField("ikona."+(\tooltippage)).hidden=false; try {app.clearInterval(animace);}catch (e) {} - \ifmovetips nastav(\TipNumber);\fi - zobraz(\TipNumber); - }}}] - {TooltipField}{\wd0}{\ht0}} -\else -\def\tooltip#1#2{% - \write\@auxout{\noexpand\TooltipPage{\thepage}}% - \checkTipNumber{#2}\edef\TipNumber{\FindTipNumber{#2}}% - \leavevmode - \setbox0=\hbox{{\color{tooltipcolor}{#1}}}\hbox to 0 pt{{\copy0\TooltipExtratext\hss}}% - \pushButton[\BC{}\BG{}\S{}\AA{\AAMouseExit{\JS{CloseTooltips();}}} - \A{\JS{this.getField("ikona."+(this.pageNum+1)).hidden=false; + \tempfancytooltips + zobraz(\TipNumber,\tooltippage); + }} + \fi} + \A{\JS{this.getField("ikona."+(\tooltippage)).hidden=false; try {app.clearInterval(animace);}catch (e) {} - \ifmovetips nastav(\TipNumber);\fi - zobraz(\TipNumber); + \tempfancytooltips + zobraz(\TipNumber,\tooltippage); }}] {TooltipField}{\wd0}{\ht0}} -\fi \def\delayinterval{200} -\ifmouseover \def\tooltipanim#1#2#3{% - \write\@auxout{\noexpand\TooltipPage{\thepage}}% + \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}% \checkTipNumber{#2}\edef\TipNumberA{\FindTipNumber{#2}}% \checkTipNumber{#3}\edef\TipNumberB{\FindTipNumber{#3}}% \leavevmode \setbox0=\hbox{{\color{tooltipcolor}{#1}}}\hbox to 0 pt{{\copy0\TooltipExtratext\hss}}% + \def\tempfancytooltips{}% + \ifmovetips\edef\tempfancytooltips{nastav(\TipNumberA,\tooltippage);}\fi \pushButton[\BC{}\BG{}\S{}\AA{\AAMouseExit{\JS{CloseTooltips();}} + \ifmouseover \AAMouseEnter{\JS{ try {app.clearInterval(animace);}catch (e) {} var cislo=\TipNumberA; - \ifmovetips nastav(\TipNumberA);\fi + \tempfancytooltips function animuj() { - if (cislo<\TipNumberB) cislo=cislo+1; else {try {app.clearInterval(animace);}catch (e) {};} - this.getField('ikona.'+(this.pageNum+1)).buttonSetIcon(this.getField("animtiph."+cislo).buttonGetIcon()); + if (cislo<\TipNumberB) cislo=cislo+1; + this.getField('ikona.'+(\tooltippage)).buttonSetIcon(this.getField("animtiph."+cislo).buttonGetIcon()); }; - this.getField('ikona.'+(this.pageNum+1)).buttonSetIcon(this.getField("animtiph."+\TipNumberA).buttonGetIcon()); - this.getField("ikona."+(this.pageNum+1)).hidden=false; + this.getField('ikona.'+(\tooltippage)).buttonSetIcon(this.getField("animtiph."+\TipNumberA).buttonGetIcon()); + this.getField("ikona."+(\tooltippage)).hidden=false; animace=app.setInterval('animuj();', \delayinterval); - }}} - ]{TooltipField}{\wd0}{\ht0}} -\else -\def\tooltipanim#1#2#3{% - \write\@auxout{\noexpand\TooltipPage{\thepage}}% - \checkTipNumber{#2}\edef\TipNumberA{\FindTipNumber{#2}}% - \checkTipNumber{#3}\edef\TipNumberB{\FindTipNumber{#3}}% - \leavevmode - \setbox0=\hbox{{\color{tooltipcolor}{#1}}}\hbox to 0 pt{{\copy0\TooltipExtratext\hss}}% - \pushButton[\BC{}\BG{}\S{}\AA{\AAMouseExit{\JS{CloseTooltips();}}} + }} + \fi} \A{\JS{ try {app.clearInterval(animace);}catch (e) {} var cislo=\TipNumberA; - \ifmovetips nastav(\TipNumberA);\fi + \tempfancytooltips function animuj() { - if (cislo<\TipNumberB) cislo=cislo+1; else {try {app.clearInterval(animace);}catch (e) {};} - this.getField('ikona.'+(this.pageNum+1)).buttonSetIcon(this.getField("animtiph."+cislo).buttonGetIcon()); + if (cislo<\TipNumberB) cislo=cislo+1; + this.getField('ikona.'+(\tooltippage)).buttonSetIcon(this.getField("animtiph."+cislo).buttonGetIcon()); }; - this.getField('ikona.'+(this.pageNum+1)).buttonSetIcon(this.getField("animtiph."+\TipNumberA).buttonGetIcon()); - this.getField("ikona."+(this.pageNum+1)).hidden=false; + this.getField('ikona.'+(\tooltippage)).buttonSetIcon(this.getField("animtiph."+\TipNumberA).buttonGetIcon()); + this.getField("ikona."+(\tooltippage)).hidden=false; animace=app.setInterval('animuj();', \delayinterval); }} ]{TooltipField}{\wd0}{\ht0}} -\fi \ifTooltip@usepdftex \def\TooltipPageopencloseJS{ \global\pdfpageattr{% /AA << /O << /S /JavaScript /JS (CloseTooltips();) >> >>}% @@ -210,7 +212,6 @@ \ifTooltip@usepdftex \begin{insDLJS}[fancyTooltipsLoaded]{Tooltipsdljs}{DLJS for Tooltips} var animace; - app.focusRect = false; var fancyTooltipsLoaded = true; function CloseTooltips() @@ -219,9 +220,9 @@ try {app.clearInterval(animace);}catch (e) {} } - function nastav(cislo) + function nastav(cislo,strana) { - var f=this.getField("ikona."+(this.pageNum+1)); + var f=this.getField("ikona."+(strana)); var g=this.getField("animtiph."+cislo); var sourf=f.rect; var sourg=g.rect; @@ -238,9 +239,9 @@ f.buttonAlignY=percY; } - function zobraz(cislo) + function zobraz(cislo,strana) { - var f=this.getField("ikona."+(this.pageNum+1)); + var f=this.getField("ikona."+(strana)); var g=this.getField("animtiph."+cislo); f.hidden=false; f.buttonSetIcon(g.buttonGetIcon()); @@ -249,7 +250,6 @@ \else \begin{insDLJS}[fancyTooltipsLoaded]{Tooltipsdljs}{DLJS for Tooltips} var animace; - app.focusRect = false; var fancyTooltipsLoaded = true; function CloseTooltips() @@ -275,9 +275,9 @@ return(1); } - function nastav(cislo) + function nastav(cislo,strana) { - var f=this.getField("ikona."+(this.pageNum+1)); + var f=this.getField("ikona."+(strana)); var g=this.getField("animtiph."+cislo); var sourf=f.rect; var sourg=g.rect; @@ -294,9 +294,9 @@ f.buttonAlignY=percY; } - function zobraz(cislo) + function zobraz(cislo,strana) { - var f=this.getField("ikona."+(this.pageNum+1)); + var f=this.getField("ikona."+(strana)); var g=this.getField("animtiph."+cislo); f.hidden=false; f.buttonSetIcon(g.buttonGetIcon()); |