]> git.lyx.org Git - lyx.git/blob - lib/layouts/pdfform.module
3ee0a3b57b336088299b53e1078a8d820ff42212
[lyx.git] / lib / layouts / pdfform.module
1 #\DeclareLyXModule{PDF Form}
2 #DescriptionBegin
3 #Provides fields and buttons for PDF forms. The module uses
4 #the LaTeX package hyperref. Please consult the LyX example file PDF-form.lyx
5 #and the documentation of hyperref for details.
6 #DescriptionEnd
7 # Author: Uwe Stöhr <uwestoehr@lyx.org>
8
9 Format 54
10
11 #
12 # the form environment
13 #
14
15 Style "Begin PDF Form"
16         Margin                          Dynamic
17         LatexType                       Command
18         LatexName                       begin{Form}
19         Category                        "PDF form"
20         KeepEmpty                       1
21         PassThru                        1
22         ParSkip                         0.4
23         Align                           Block
24         LabelSep                        xx
25         LabelType                       Static
26         LabelString                     "Begin PDF Form"
27         Argument 1
28                 MenuString              "PDF form parameters"
29                 LabelString             "Params"
30                 Tooltip                 "Insert PDF form parameters here"
31         EndArgument
32         LabelFont
33           Series                        Bold
34           Color                         Green
35         EndFont
36         Requires            hyperref
37 End
38
39 Style "End PDF Form"
40         CopyStyle                       "Begin PDF Form"
41         LatexName                       end{Form}
42         LabelString                     "End PDF Form"
43 End
44
45 Style "PDF Link Setup"
46         CopyStyle                       "Begin PDF Form"
47         LatexName                       hypersetup
48         LabelString                     "PDF link setup"
49         KeepEmpty                       0
50 End
51
52 #
53 # form fields
54 #
55
56 InsetLayout Flex:TextField
57         LyXType                         custom
58         LatexType                       command
59         Decoration                      classic
60         LatexName                       TextField
61         LabelString                     "TextField"
62         Argument 1
63                 MenuString              "PDF form parameters"
64                 LabelString             "Params"
65                 Tooltip                 "Insert PDF form parameters here"
66         EndArgument
67         PassThru                        1
68         LabelFont
69           Color                         magenta
70           Size                          Small
71         EndFont
72         Requires            hyperref
73 End
74
75 InsetLayout Flex:CheckBox
76         CopyStyle                       Flex:TextField
77         LatexName                       CheckBox
78         LabelString                     "CheckBox"
79 End
80
81 InsetLayout Flex:ChoiceMenu
82         CopyStyle                       Flex:TextField
83         LatexName                       ChoiceMenu
84         LabelString                     "ChoiceMenu"
85         Argument 2
86                 LabelString             "Label"
87                 Mandatory               1
88                 AutoInsert              1
89                 ToolTip                 "Insert the label here"
90         EndArgument
91 End
92
93 InsetLayout Flex:PushButton
94         CopyStyle                       Flex:TextField
95         LatexName                       PushButton
96         LabelString                     "PushButton"
97 End
98
99 InsetLayout Flex:SubmitButton
100         CopyStyle                       Flex:TextField
101         LatexName                       Submit
102         LabelString                     "SubmitButton"
103 End
104
105 InsetLayout Flex:ResetButton
106         CopyStyle                       Flex:TextField
107         LatexName                       Reset
108         LabelString                     "ResetButton"
109 End
110
111 #
112 # PDF viewer-specific insets
113 #
114
115 InsetLayout Flex:PDFAction
116         CopyStyle                       Flex:TextField
117         LatexName                       Acrobatmenu
118         LabelString                     "PDFAction"
119         Argument 1
120                 LabelString             "Action"
121                 Mandatory               1
122                 AutoInsert              1
123                 ToolTip                 "the name of the PDF action"
124         EndArgument
125 End
126
127 #
128 # Form style layouts
129 #
130
131 Style "Text Field Style"
132         CopyStyle                       "Begin PDF Form"
133         LatexName                       renewcommand*{\DefaultOptionsofText}
134         LabelString                     "Default text field style"
135         PassThru                        1
136 End
137
138 Style "Submit Button Style"
139         CopyStyle                       "Text Field Style"
140         LatexName                       renewcommand*{\DefaultOptionsofSubmit}
141         LabelString                     "Default submit button style"
142 End
143
144 Style "Push Button Style"
145         CopyStyle                       "Text Field Style"
146         LatexName                       renewcommand*{\DefaultOptionsofPushButton}
147         LabelString                     "Default push button style"
148 End
149
150 Style "Check Box Style"
151         CopyStyle                       "Text Field Style"
152         LatexName                       renewcommand*{\DefaultOptionsofCheckBox}
153         LabelString                     "Default check box style"
154 End
155
156 Style "Reset Button Style"
157         CopyStyle                       "Text Field Style"
158         LatexName                       renewcommand*{\DefaultOptionsofReset}
159         LabelString                     "Default reset button style"
160 End
161
162 Style "List Box Style"
163         CopyStyle                       "Text Field Style"
164         LatexName                       renewcommand*{\DefaultOptionsofListBox}
165         LabelString                     "Default list box style"
166 End
167
168 Style "Combo Box Style"
169         CopyStyle                       "Text Field Style"
170         LatexName                       renewcommand*{\DefaultOptionsofComboBox}
171         LabelString                     "Default combo box style"
172 End
173
174 Style "Popdown Box Style"
175         CopyStyle                       "Text Field Style"
176         LatexName                       renewcommand*{\DefaultOptionsofPopdownBox}
177         LabelString                     "Default popdown box style"
178 End
179
180 Style "Radio Box Style"
181         CopyStyle                       "Text Field Style"
182         LatexName                       renewcommand*{\DefaultOptionsofRadio}
183         LabelString                     "Default radio box style"
184 End