diff options
author | Karl Berry <karl@freefriends.org> | 2010-04-08 23:38:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-04-08 23:38:12 +0000 |
commit | 6cae3a9e4038f488584a8d9469802f9376cba64e (patch) | |
tree | dd61cead0ef2670f4fd63488a2ca0cec25351d14 /Master/texmf-dist/tex/latex | |
parent | 8ff11e49578310a0c3428113e92191f2cfb6a817 (diff) |
ocgtools 0.6 (8apr10)
git-svn-id: svn://tug.org/texlive/trunk@17759 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/ocgtools/ocgtools.sty | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/ocgtools/ocgtools.sty b/Master/texmf-dist/tex/latex/ocgtools/ocgtools.sty index 5cac7f126ee..5e86007d9a6 100644 --- a/Master/texmf-dist/tex/latex/ocgtools/ocgtools.sty +++ b/Master/texmf-dist/tex/latex/ocgtools/ocgtools.sty @@ -22,7 +22,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{ocgtools} - [2010/04/01 v0.5 ocgtools.dtx file] + [2010/04/10 v0.6 ocgtools.dtx file] \def\ocgtools@msg{If message does not disappear after a short time, the author either did not compile the \LaTeX{} file three times, or your PDF viewer does not support OCG. Use Adobe Reader!} @@ -62,6 +62,9 @@ \newif\if@ocgtools@pageclose \@ocgtools@pageclosetrue \DeclareOption{nopageclose}{\@ocgtools@pageclosefalse} \ProcessOptions + +\def\ocgtools@JS#1{\JS{DirtyBeforeOCGtools=this.dirty; #1 + this.dirty=DirtyBeforeOCGtools;}} \edef\ocgtools@pdfpageattr{ /AA << /O << /S /JavaScript /JS ( @@ -75,7 +78,8 @@ \fi } catch (e){ - app.focusRectg = false; + app.focusRect = false; + var DirtyBeforeOCGtools=this.dirty; var iniocgtoolsOCGs = this.getOCGs(); var ocgtoolsOCGs = []; for(var i=0; iniocgtoolsOCGs && i<iniocgtoolsOCGs.length;i++) @@ -92,10 +96,12 @@ iniocgtoolsOCGs[0].state=false; \ifx\ocgtools@progressmsg\relax\relax\else this.getField("ocgtoolsmsg").hidden=true; + this.dirty=false; \fi } \ifocg@hide@button this.getField("OcgtoolsBtn.HideButton.main").hidden = true; + this.dirty=false; \fi ) >> >> @@ -148,7 +154,7 @@ \kern 1in \kern -\layerHshift% }% } -\def\ocgtools@HideBtn{\pushButton[\W{0}\BG{}\S{S}\BC{}\H{N}\F{\FHidden}\A{\JS{ +\def\ocgtools@HideBtn{\pushButton[\W{0}\BG{}\S{S}\BC{}\H{N}\F{\FHidden}\A{\ocgtools@JS{ for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) { ocgtoolsOCGs[i].state = false; @@ -160,7 +166,7 @@ \hbox to \wd\ocgtools@box@a% {\hbox{{\color{red}\ocgclosechar}}\hss% \hbox{\pushButton[\W{0}\S{S}\BG{}\BC{}\H{N}% -\F{\FHidden}\A{\JS{ +\F{\FHidden}\A{\ocgtools@JS{ for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) { if(ocgtoolsOCGs[i].name == "ocgtools#1") @@ -174,7 +180,7 @@ \hbox to \wd\ocgtools@box@a% {\hbox{{\color{red}\ocgclosechar}}\hss% \hbox{\pushButton[\W{0}\S{S}\BG{}\BC{}\H{N}% -\F{\FHidden}\A{\JS{ +\F{\FHidden}\A{\ocgtools@JS{ for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) { ocgtoolsOCGs[i].state = false; @@ -195,6 +201,7 @@ /A << /S/JavaScript /JS ( + DirtyBeforeOCGtools=this.dirty; for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) { if(ocgtoolsOCGs[i].name == "ocgtools#1") @@ -205,18 +212,19 @@ \ifocg@hide@button this.getField("OcgtoolsBtn.HideButton.main").hidden = false;\fi this.getField("OcgtoolsBtn.HideButton.corner").hidden = false; this.getField("OcgtoolsBtn.HideButton.corner.#1").setFocus(); + this.dirty=DirtyBeforeOCGtools; ) >> }#2% \if@ocgtools@mouseover \hbox to 0 pt{\hss\pushButton[\W{0}\S{S}\BG{}\BC{}\H{N}% - \A{\JS{ + \A{\ocgtools@JS{ var OpenedByMouseEnter#1=false; \ifocg@hide@button this.getField("OcgtoolsBtn.HideButton.main").hidden = false;\fi this.getField("OcgtoolsBtn.HideButton.corner").hidden = false; this.getField("OcgtoolsBtn.HideButton.corner.#1").setFocus(); }} - \AA{\AAMouseEnter{\JS{ for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) + \AA{\AAMouseEnter{\ocgtools@JS{ for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) { var OpenedByMouseEnter#1=true; if(ocgtoolsOCGs[i].name == "ocgtools#1") @@ -225,7 +233,7 @@ ocgtoolsOCGs[i].state = false; } }} - \AAMouseExit{\JS{ + \AAMouseExit{\ocgtools@JS{ if (OpenedByMouseEnter#1) {for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) { @@ -249,6 +257,7 @@ /A << /S/JavaScript /JS ( + DirtyBeforeOCGtools=this.dirty; for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) { if(ocgtoolsOCGs[i].name == "ocgtools#1") @@ -258,16 +267,17 @@ !this.getField("OcgtoolsBtn.HideButton.mini.#1").hidden; if (!this.getField("OcgtoolsBtn.HideButton.mini.#1").hidden) {this.getField("OcgtoolsBtn.HideButton.mini.#1").setFocus();} + this.dirty=DirtyBeforeOCGtools; ) >> }#2% \if@ocgtools@minimouseover \hbox to 0 pt{\hss\pushButton[\W{0}\S{S}\BG{}\BC{}\H{N}% - \A{\JS{ + \A{\ocgtools@JS{ var OpenedByMouseEnter#1=false; this.getField("OcgtoolsBtn.HideButton.mini.#1").setFocus(); }} - \AA{\AAMouseEnter{\JS{for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) + \AA{\AAMouseEnter{\ocgtools@JS{for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) { var OpenedByMouseEnter#1=true; if(ocgtoolsOCGs[i].name == "ocgtools#1") @@ -275,7 +285,7 @@ } this.getField("OcgtoolsBtn.HideButton.mini.#1").hidden = false; }} - \AAMouseExit{\JS{ + \AAMouseExit{\ocgtools@JS{ if (OpenedByMouseEnter#1) { for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) |