]> git.lyx.org Git - lyx.git/blob - lib/layouts/pdfform.module
Remove debugging code.
[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 60
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           PassThruChars         "\[]{}"
70         EndArgument
71         LabelFont
72           Color                         magenta
73           Size                          Small
74         EndFont
75         Requires                        hyperref
76 End
77
78 InsetLayout Flex:CheckBox
79         CopyStyle                       Flex:TextField
80         LatexName                       CheckBox
81         LabelString                     "CheckBox"
82 End
83
84 InsetLayout Flex:ChoiceMenu
85         CopyStyle                       Flex:TextField
86         LatexName                       ChoiceMenu
87         LabelString                     "ChoiceMenu"
88         Argument 2
89           LabelString           "Label"
90           Mandatory                     1
91           AutoInsert            1
92           ToolTip                       "Insert the label here"
93         EndArgument
94 End
95
96 InsetLayout Flex:PushButton
97         CopyStyle                       Flex:TextField
98         LatexName                       PushButton
99         LabelString                     "PushButton"
100 End
101
102 InsetLayout Flex:SubmitButton
103         CopyStyle                       Flex:TextField
104         LatexName                       Submit
105         LabelString                     "SubmitButton"
106 End
107
108 InsetLayout Flex:ResetButton
109         CopyStyle                       Flex:TextField
110         LatexName                       Reset
111         LabelString                     "ResetButton"
112 End
113
114 #
115 # PDF viewer-specific insets
116 #
117
118 InsetLayout Flex:PDFAction
119         CopyStyle                       Flex:TextField
120         LatexName                       Acrobatmenu
121         LabelString                     "PDFAction"
122         Argument 1
123           LabelString           "Action"
124           Mandatory                     1
125           AutoInsert            1
126           ToolTip                       "The name of the PDF action"
127         EndArgument
128 End
129
130 #
131 # Form style layouts
132 #
133
134 Style "Text Field Style"
135         CopyStyle                       "Begin PDF Form"
136         LatexName                       renewcommand*{\DefaultOptionsofText}
137         LabelString                     "Default text field style"
138         PassThru                        1
139 End
140
141 Style "Submit Button Style"
142         CopyStyle                       "Text Field Style"
143         LatexName                       renewcommand*{\DefaultOptionsofSubmit}
144         LabelString                     "Default submit button style"
145 End
146
147 Style "Push Button Style"
148         CopyStyle                       "Text Field Style"
149         LatexName                       renewcommand*{\DefaultOptionsofPushButton}
150         LabelString                     "Default push button style"
151 End
152
153 Style "Check Box Style"
154         CopyStyle                       "Text Field Style"
155         LatexName                       renewcommand*{\DefaultOptionsofCheckBox}
156         LabelString                     "Default check box style"
157 End
158
159 Style "Reset Button Style"
160         CopyStyle                       "Text Field Style"
161         LatexName                       renewcommand*{\DefaultOptionsofReset}
162         LabelString                     "Default reset button style"
163 End
164
165 Style "List Box Style"
166         CopyStyle                       "Text Field Style"
167         LatexName                       renewcommand*{\DefaultOptionsofListBox}
168         LabelString                     "Default list box style"
169 End
170
171 Style "Combo Box Style"
172         CopyStyle                       "Text Field Style"
173         LatexName                       renewcommand*{\DefaultOptionsofComboBox}
174         LabelString                     "Default combo box style"
175 End
176
177 Style "Popdown Box Style"
178         CopyStyle                       "Text Field Style"
179         LatexName                       renewcommand*{\DefaultOptionsofPopdownBox}
180         LabelString                     "Default popdown box style"
181 End
182
183 Style "Radio Box Style"
184         CopyStyle                       "Text Field Style"
185         LatexName                       renewcommand*{\DefaultOptionsofRadio}
186         LabelString                     "Default radio box style"
187 End