[latex3-commits] [git/LaTeX3-latex3-pdfresources] test-checkbox: added widget box command (07882cf)

Ulrike Fischer fischer at troubleshooting-tex.de
Wed Mar 3 23:03:39 CET 2021


Repository : https://github.com/latex3/pdfresources
On branch  : test-checkbox
Link       : https://github.com/latex3/pdfresources/commit/07882cfb7d37fed6c5343ab3c5e861d6780f98b9

>---------------------------------------------------------------

commit 07882cfb7d37fed6c5343ab3c5e861d6780f98b9
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Wed Mar 3 23:03:39 2021 +0100

    added widget box command


>---------------------------------------------------------------

07882cfb7d37fed6c5343ab3c5e861d6780f98b9
 l3pdfannot.dtx | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/l3pdfannot.dtx b/l3pdfannot.dtx
index a7ed5a6..5d2e642 100644
--- a/l3pdfannot.dtx
+++ b/l3pdfannot.dtx
@@ -109,7 +109,7 @@
 % values. This allows to create user interfaces to change settings and
 % also makes it easy to extend the interfaces in case some new setting
 % should be included. For these reasons both the PDF management itself,
-% but also the specific annotation commands in the following section
+% but also the specific annotation commands in the following sections
 % all make use of such dictionaries.
 %
 % \subsection{Link annotations}
@@ -337,13 +337,14 @@
 % the command is offered as box command.
 %
 % \begin{function}[added = 2021-03-02]
-%   { \pdfannot_widget_box:nnnn }
+%   { \pdfannot_widget_box:nnn }
 %   \begin{syntax}
-%     \cs{pdfannot_widget:nnnn}  \Arg{width} \Arg{height} \Arg{depth}
+%     \cs{pdfannot_widget_box:nnn}  \Arg{width} \Arg{height} \Arg{depth}
 %   \end{syntax}
 %   This creates an \texttt{/Type/Annot} object with the given dimensions.
-%   It will then insert the attribute dictionary of the widget
-%   as \meta{annot spec}.
+%   The annotation doesn't occupy space.
+%   It will insert the attribute dictionary of the widget type (which
+%   is prefilled with  \texttt{/Subtype/Widget}).
 %   The hooks \texttt{pdfannot/widget/before} and \texttt{pdfannot/widget/after}
 %   are executed before and after the widget.
 % \end{function}
@@ -421,12 +422,12 @@
 %    \end{macrocode}
 % \end{macro}
 % \subsection{Annotations, subtype Widget}\label{pdf:annot:widget}
-% Currently no code is provided here.
-% The local dictionary \texttt{l_@@/Widget} is a skeleton
-% dictionary for this subtype. It currently contains as only entry
+% Widgets are typically boxes, so we provide a box command.
+% A local dictionary \texttt{l_@@/Widget} is used.
+% It contains like the other dictionaries
 % the subtype setting (the /Type is added by the backend).
 %    \begin{macrocode}
- \pdfdict_new:n { l_@@/widget }
+ \pdfdict_new:n   { l_@@/widget }
  \pdfdict_put:nnn { l_@@/widget }{ Subtype }{ /Widget }
  \hook_new_pair:nn
    {pdfannot/widget/before}
@@ -436,13 +437,12 @@
    {pdfannot/widget/end}
 \cs_new_protected:Npn \pdfannot_widget_box:nnn #1 #2 #3
   {
-    \hook_use:n { pdfannot/widget/before}
-    \exp_args:Nx
-    \__pdf_backend_annotation:nnnn {#1}{#2}{#3}
+    \hook_use:n { pdfannot/widget/before }
+    \pdfannot_box:nnnx {#1}{#2}{#3}
       {
         \pdfdict_use:n { l_@@/widget}
       }
-    \hook_use:n { pdfannot/widget/after}
+    \hook_use:n { pdfannot/widget/after }
     \bool_gset_false:N\g_@@_use_lastlink_bool
   }
 %    \end{macrocode}





More information about the latex3-commits mailing list.