]> git.lyx.org Git - lyx.git/blob - lib/layouts/pdfform.module
f0a4116826aefa57f440151a6c2a3d6896a8df18
[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           AutoInsert            1
32         EndArgument
33         LabelFont
34           Series                        Bold
35           Color                         Green
36         EndFont
37         Requires                        hyperref
38 End
39
40 Style "End PDF Form"
41         CopyStyle                       "Begin PDF Form"
42         LatexName                       end{Form}
43         LabelString                     "End PDF Form"
44         ResetArgs                       1
45 End
46
47 Style "PDF Link Setup"
48         CopyStyle                       "Begin PDF Form"
49         LatexName                       hypersetup
50         LabelString                     "PDF link setup"
51         KeepEmpty                       0
52 End
53
54 #
55 # form fields
56 #
57
58 InsetLayout Flex:TextField
59         LyXType                         custom
60         LatexType                       command
61         Decoration                      classic
62         LatexName                       TextField
63         LabelString                     "TextField"
64         Argument 1
65           MenuString            "PDF Form Parameters"
66           LabelString           "Params"
67           Tooltip                       "Insert PDF form parameters here"
68           AutoInsert            1
69         EndArgument
70         LabelFont
71           Color                         magenta
72           Size                          Small
73         EndFont
74         Requires                        hyperref
75 End
76
77 InsetLayout Flex:CheckBox
78         CopyStyle                       Flex:TextField
79         LatexName                       CheckBox
80         LabelString                     "CheckBox"
81 End
82
83 InsetLayout Flex:ChoiceMenu
84         CopyStyle                       Flex:TextField
85         LatexName                       ChoiceMenu
86         LabelString                     "ChoiceMenu"
87         Argument 2
88           LabelString           "Label"
89           Mandatory                     1
90           AutoInsert            1
91           ToolTip                       "Insert the label here"
92         EndArgument
93 End
94
95 InsetLayout Flex:PushButton
96         CopyStyle                       Flex:TextField
97         LatexName                       PushButton
98         LabelString                     "PushButton"
99 End
100
101 InsetLayout Flex:SubmitButton
102         CopyStyle                       Flex:TextField
103         LatexName                       Submit
104         LabelString                     "SubmitButton"
105 End
106
107 InsetLayout Flex:ResetButton
108         CopyStyle                       Flex:TextField
109         LatexName                       Reset
110         LabelString                     "ResetButton"
111 End
112
113 #
114 # PDF viewer-specific insets
115 #
116
117 InsetLayout Flex:PDFAction
118         CopyStyle                       Flex:TextField
119         LatexName                       Acrobatmenu
120         LabelString                     "PDFAction"
121         Argument 1
122           LabelString           "Action"
123           Mandatory                     1
124           AutoInsert            1
125           ToolTip                       "The name of the PDF action"
126         EndArgument
127 End
128
129 #
130 # Form style layouts
131 #
132
133 Style "Text Field Style"
134         CopyStyle                       "Begin PDF Form"
135         LatexName                       renewcommand*{\DefaultOptionsofText}
136         LabelString                     "Default text field style"
137         PassThru                        1
138 End
139
140 Style "Submit Button Style"
141         CopyStyle                       "Text Field Style"
142         LatexName                       renewcommand*{\DefaultOptionsofSubmit}
143         LabelString                     "Default submit button style"
144 End
145
146 Style "Push Button Style"
147         CopyStyle                       "Text Field Style"
148         LatexName                       renewcommand*{\DefaultOptionsofPushButton}
149         LabelString                     "Default push button style"
150 End
151
152 Style "Check Box Style"
153         CopyStyle                       "Text Field Style"
154         LatexName                       renewcommand*{\DefaultOptionsofCheckBox}
155         LabelString                     "Default check box style"
156 End
157
158 Style "Reset Button Style"
159         CopyStyle                       "Text Field Style"
160         LatexName                       renewcommand*{\DefaultOptionsofReset}
161         LabelString                     "Default reset button style"
162 End
163
164 Style "List Box Style"
165         CopyStyle                       "Text Field Style"
166         LatexName                       renewcommand*{\DefaultOptionsofListBox}
167         LabelString                     "Default list box style"
168 End
169
170 Style "Combo Box Style"
171         CopyStyle                       "Text Field Style"
172         LatexName                       renewcommand*{\DefaultOptionsofComboBox}
173         LabelString                     "Default combo box style"
174 End
175
176 Style "Popdown Box Style"
177         CopyStyle                       "Text Field Style"
178         LatexName                       renewcommand*{\DefaultOptionsofPopdownBox}
179         LabelString                     "Default popdown box style"
180 End
181
182 Style "Radio Box Style"
183         CopyStyle                       "Text Field Style"
184         LatexName                       renewcommand*{\DefaultOptionsofRadio}
185         LabelString                     "Default radio box style"
186 End