rrtf 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +31 -7
- data/documentation/RRTF/CharacterFormatting.html +1002 -0
- data/documentation/RRTF/CharacterStyle.html +1058 -0
- data/documentation/RRTF/Colour.html +813 -0
- data/documentation/RRTF/ColourTable.html +770 -0
- data/documentation/RRTF/CommandNode.html +2372 -0
- data/documentation/RRTF/ContainerNode.html +826 -0
- data/documentation/RRTF/Converters/HTML/Helpers.html +272 -0
- data/documentation/RRTF/Converters/HTML/Node.html +364 -0
- data/documentation/RRTF/Converters/HTML/NodeSet.html +265 -0
- data/documentation/RRTF/Converters/HTML.html +337 -0
- data/documentation/RRTF/Converters.html +117 -0
- data/documentation/RRTF/Document.html +2405 -0
- data/documentation/RRTF/DocumentStyle.html +1367 -0
- data/documentation/RRTF/Font.html +790 -0
- data/documentation/RRTF/FontTable.html +763 -0
- data/documentation/RRTF/FooterNode.html +515 -0
- data/documentation/RRTF/HeaderNode.html +515 -0
- data/documentation/RRTF/ImageNode.html +1374 -0
- data/documentation/RRTF/Information.html +809 -0
- data/documentation/RRTF/LinkNode.html +264 -0
- data/documentation/RRTF/ListLevel.html +799 -0
- data/documentation/RRTF/ListLevelNode.html +612 -0
- data/documentation/RRTF/ListMarker.html +595 -0
- data/documentation/RRTF/ListNode.html +368 -0
- data/documentation/RRTF/ListTable.html +343 -0
- data/documentation/RRTF/ListTemplate.html +433 -0
- data/documentation/RRTF/ListTextNode.html +285 -0
- data/documentation/RRTF/Node.html +616 -0
- data/documentation/RRTF/Paper.html +624 -0
- data/documentation/RRTF/ParagraphFormatting.html +749 -0
- data/documentation/RRTF/ParagraphNode.html +275 -0
- data/documentation/RRTF/ParagraphStyle.html +1319 -0
- data/documentation/RRTF/RTFError.html +295 -0
- data/documentation/RRTF/Style.html +1767 -0
- data/documentation/RRTF/Stylesheet.html +1768 -0
- data/documentation/RRTF/TableCellNode.html +1704 -0
- data/documentation/RRTF/TableNode.html +1025 -0
- data/documentation/RRTF/TableRowNode.html +675 -0
- data/documentation/RRTF/TextNode.html +600 -0
- data/documentation/RRTF/Utilities.html +201 -0
- data/documentation/RRTF.html +129 -0
- data/documentation/_index.html +478 -0
- data/documentation/class_list.html +51 -0
- data/documentation/css/common.css +1 -0
- data/documentation/css/full_list.css +58 -0
- data/documentation/css/style.css +492 -0
- data/documentation/file.README.html +223 -0
- data/documentation/file_list.html +56 -0
- data/documentation/frames.html +17 -0
- data/documentation/index.html +223 -0
- data/documentation/js/app.js +248 -0
- data/documentation/js/full_list.js +216 -0
- data/documentation/js/jquery.js +4 -0
- data/documentation/method_list.html +2203 -0
- data/documentation/top-level-namespace.html +110 -0
- data/examples/01.rtf +14 -17
- data/examples/01_mac_word15_36.png +0 -0
- data/examples/01_styles_and_paragraphs.rb +3 -4
- data/examples/resources/json/redshirt_styles.json +4 -2
- data/lib/rrtf/node.rb +86 -167
- data/lib/rrtf/style/character_style.rb +4 -3
- data/lib/rrtf/style/formatting.rb +55 -11
- data/lib/rrtf/style/paragraph_style.rb +19 -4
- data/lib/rrtf/style/style.rb +15 -15
- data/lib/rrtf/stylesheet.rb +57 -16
- data/lib/rrtf/version.rb +1 -1
- data/rrtf.gemspec +1 -0
- metadata +70 -1
@@ -0,0 +1,1319 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: RRTF::ParagraphStyle
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.9
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "RRTF::ParagraphStyle";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (P)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../RRTF.html" title="RRTF (module)">RRTF</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">ParagraphStyle</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: RRTF::ParagraphStyle
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="Style.html" title="RRTF::Style (class)">Style</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next"><span class='object_link'><a href="Style.html" title="RRTF::Style (class)">Style</a></span></li>
|
78
|
+
|
79
|
+
<li class="next">RRTF::ParagraphStyle</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
<dl>
|
93
|
+
<dt>Includes:</dt>
|
94
|
+
<dd><span class='object_link'><a href="CharacterFormatting.html" title="RRTF::CharacterFormatting (module)">CharacterFormatting</a></span>, <span class='object_link'><a href="ParagraphFormatting.html" title="RRTF::ParagraphFormatting (module)">ParagraphFormatting</a></span></dd>
|
95
|
+
</dl>
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<dl>
|
103
|
+
<dt>Defined in:</dt>
|
104
|
+
<dd>lib/rrtf/style/paragraph_style.rb</dd>
|
105
|
+
</dl>
|
106
|
+
|
107
|
+
</div>
|
108
|
+
|
109
|
+
<h2>Overview</h2><div class="docstring">
|
110
|
+
<div class="discussion">
|
111
|
+
|
112
|
+
<div class="note notetag">
|
113
|
+
<strong>Note:</strong>
|
114
|
+
<div class='inline'>
|
115
|
+
<p>paragraphs can be styled with character commands in addition to paragraph
|
116
|
+
commands, thus this class includes both paragraph & character
|
117
|
+
formatting modules.</p>
|
118
|
+
</div>
|
119
|
+
</div>
|
120
|
+
|
121
|
+
|
122
|
+
<p>This class represents a styling for a paragraph within an RTF document.</p>
|
123
|
+
|
124
|
+
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
<div class="tags">
|
128
|
+
|
129
|
+
|
130
|
+
</div>
|
131
|
+
|
132
|
+
|
133
|
+
<h2>Constant Summary</h2>
|
134
|
+
|
135
|
+
<h3 class="inherited">Constants included
|
136
|
+
from <span class='object_link'><a href="CharacterFormatting.html" title="RRTF::CharacterFormatting (module)">CharacterFormatting</a></span></h3>
|
137
|
+
<p class="inherited"><span class='object_link'><a href="CharacterFormatting.html#CHARACTER_ATTRIBUTES-constant" title="RRTF::CharacterFormatting::CHARACTER_ATTRIBUTES (constant)">CharacterFormatting::CHARACTER_ATTRIBUTES</a></span></p>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
<h3 class="inherited">Constants included
|
142
|
+
from <span class='object_link'><a href="ParagraphFormatting.html" title="RRTF::ParagraphFormatting (module)">ParagraphFormatting</a></span></h3>
|
143
|
+
<p class="inherited"><span class='object_link'><a href="ParagraphFormatting.html#PARAGRAPH_ATTRIBUTES-constant" title="RRTF::ParagraphFormatting::PARAGRAPH_ATTRIBUTES (constant)">RRTF::ParagraphFormatting::PARAGRAPH_ATTRIBUTES</a></span></p>
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
<h2>Instance Attribute Summary</h2>
|
149
|
+
|
150
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Style.html" title="RRTF::Style (class)">Style</a></span></h3>
|
151
|
+
<p class="inherited"><span class='object_link'><a href="Style.html#additive-instance_method" title="RRTF::Style#additive (method)">#additive</a></span>, <span class='object_link'><a href="Style.html#auto_update-instance_method" title="RRTF::Style#auto_update (method)">#auto_update</a></span>, <span class='object_link'><a href="Style.html#based_on_style_handle-instance_method" title="RRTF::Style#based_on_style_handle (method)">#based_on_style_handle</a></span>, <span class='object_link'><a href="Style.html#handle-instance_method" title="RRTF::Style#handle (method)">#handle</a></span>, <span class='object_link'><a href="Style.html#hidden-instance_method" title="RRTF::Style#hidden (method)">#hidden</a></span>, <span class='object_link'><a href="Style.html#name-instance_method" title="RRTF::Style#name (method)">#name</a></span>, <span class='object_link'><a href="Style.html#next_style_handle-instance_method" title="RRTF::Style#next_style_handle (method)">#next_style_handle</a></span>, <span class='object_link'><a href="Style.html#primary-instance_method" title="RRTF::Style#primary (method)">#primary</a></span>, <span class='object_link'><a href="Style.html#priority-instance_method" title="RRTF::Style#priority (method)">#priority</a></span></p>
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
<h2>
|
156
|
+
Instance Method Summary
|
157
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
158
|
+
</h2>
|
159
|
+
|
160
|
+
<ul class="summary">
|
161
|
+
|
162
|
+
<li class="public ">
|
163
|
+
<span class="summary_signature">
|
164
|
+
|
165
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(options = {}) ⇒ ParagraphStyle </a>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
</span>
|
170
|
+
|
171
|
+
|
172
|
+
<span class="note title constructor">constructor</span>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
<span class="summary_desc"><div class='inline'>
|
182
|
+
<p>This is the constructor for the CharacterStyle class.</p>
|
183
|
+
</div></span>
|
184
|
+
|
185
|
+
</li>
|
186
|
+
|
187
|
+
|
188
|
+
<li class="public ">
|
189
|
+
<span class="summary_signature">
|
190
|
+
|
191
|
+
<a href="#is_paragraph_style%3F-instance_method" title="#is_paragraph_style? (instance method)">#<strong>is_paragraph_style?</strong> ⇒ Boolean </a>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
</span>
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
<span class="summary_desc"><div class='inline'>
|
206
|
+
<p>This method overrides the is_paragraph_style? method inherited from the
|
207
|
+
Style class to always return true.</p>
|
208
|
+
</div></span>
|
209
|
+
|
210
|
+
</li>
|
211
|
+
|
212
|
+
|
213
|
+
<li class="public ">
|
214
|
+
<span class="summary_signature">
|
215
|
+
|
216
|
+
<a href="#prefix-instance_method" title="#prefix (instance method)">#<strong>prefix</strong>(document) ⇒ Object </a>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
</span>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
<span class="summary_desc"><div class='inline'>
|
231
|
+
<p>This method generates a string containing the prefix associated with a
|
232
|
+
style object.</p>
|
233
|
+
</div></span>
|
234
|
+
|
235
|
+
</li>
|
236
|
+
|
237
|
+
|
238
|
+
<li class="public ">
|
239
|
+
<span class="summary_signature">
|
240
|
+
|
241
|
+
<a href="#rtf_formatting-instance_method" title="#rtf_formatting (instance method)">#<strong>rtf_formatting</strong>(document) ⇒ Object </a>
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
</span>
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
256
|
+
|
257
|
+
</li>
|
258
|
+
|
259
|
+
|
260
|
+
<li class="public ">
|
261
|
+
<span class="summary_signature">
|
262
|
+
|
263
|
+
<a href="#to_rtf-instance_method" title="#to_rtf (instance method)">#<strong>to_rtf</strong>(document, options = {}) ⇒ Object </a>
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
</span>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
<span class="summary_desc"><div class='inline'>
|
278
|
+
<p>Converts the stylesheet paragraph style into its RTF representation.</p>
|
279
|
+
</div></span>
|
280
|
+
|
281
|
+
</li>
|
282
|
+
|
283
|
+
|
284
|
+
</ul>
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="CharacterFormatting.html" title="RRTF::CharacterFormatting (module)">CharacterFormatting</a></span></h3>
|
297
|
+
<p class="inherited"><span class='object_link'><a href="CharacterFormatting.html#character_formatting_to_rtf-instance_method" title="RRTF::CharacterFormatting#character_formatting_to_rtf (method)">#character_formatting_to_rtf</a></span>, <span class='object_link'><a href="CharacterFormatting.html#included-class_method" title="RRTF::CharacterFormatting.included (method)">included</a></span>, <span class='object_link'><a href="CharacterFormatting.html#initialize_character_formatting-instance_method" title="RRTF::CharacterFormatting#initialize_character_formatting (method)">#initialize_character_formatting</a></span>, <span class='object_link'><a href="CharacterFormatting.html#push_colours-instance_method" title="RRTF::CharacterFormatting#push_colours (method)">#push_colours</a></span>, <span class='object_link'><a href="CharacterFormatting.html#push_fonts-instance_method" title="RRTF::CharacterFormatting#push_fonts (method)">#push_fonts</a></span>, <span class='object_link'><a href="CharacterFormatting.html#set_character_formatting_from_hashmap-instance_method" title="RRTF::CharacterFormatting#set_character_formatting_from_hashmap (method)">#set_character_formatting_from_hashmap</a></span></p>
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="ParagraphFormatting.html" title="RRTF::ParagraphFormatting (module)">ParagraphFormatting</a></span></h3>
|
308
|
+
<p class="inherited"><span class='object_link'><a href="ParagraphFormatting.html#included-class_method" title="RRTF::ParagraphFormatting.included (method)">included</a></span>, <span class='object_link'><a href="ParagraphFormatting.html#initialize_paragraph_formatting-instance_method" title="RRTF::ParagraphFormatting#initialize_paragraph_formatting (method)">#initialize_paragraph_formatting</a></span>, <span class='object_link'><a href="ParagraphFormatting.html#paragraph_formatting_to_rtf-instance_method" title="RRTF::ParagraphFormatting#paragraph_formatting_to_rtf (method)">#paragraph_formatting_to_rtf</a></span>, <span class='object_link'><a href="ParagraphFormatting.html#set_paragraph_formatting_from_hashmap-instance_method" title="RRTF::ParagraphFormatting#set_paragraph_formatting_from_hashmap (method)">#set_paragraph_formatting_from_hashmap</a></span></p>
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Style.html" title="RRTF::Style (class)">Style</a></span></h3>
|
319
|
+
<p class="inherited"><span class='object_link'><a href="Style.html#is_character_style%3F-instance_method" title="RRTF::Style#is_character_style? (method)">#is_character_style?</a></span>, <span class='object_link'><a href="Style.html#is_document_style%3F-instance_method" title="RRTF::Style#is_document_style? (method)">#is_document_style?</a></span>, <span class='object_link'><a href="Style.html#is_table_style%3F-instance_method" title="RRTF::Style#is_table_style? (method)">#is_table_style?</a></span>, <span class='object_link'><a href="Style.html#styledef-instance_method" title="RRTF::Style#styledef (method)">#styledef</a></span>, <span class='object_link'><a href="Style.html#stylename-instance_method" title="RRTF::Style#stylename (method)">#stylename</a></span>, <span class='object_link'><a href="Style.html#suffix-instance_method" title="RRTF::Style#suffix (method)">#suffix</a></span></p>
|
320
|
+
<div id="constructor_details" class="method_details_list">
|
321
|
+
<h2>Constructor Details</h2>
|
322
|
+
|
323
|
+
<div class="method_details first">
|
324
|
+
<h3 class="signature first" id="initialize-instance_method">
|
325
|
+
|
326
|
+
#<strong>initialize</strong>(options = {}) ⇒ <tt><span class='object_link'><a href="" title="RRTF::ParagraphStyle (class)">ParagraphStyle</a></span></tt>
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
</h3><div class="docstring">
|
333
|
+
<div class="discussion">
|
334
|
+
|
335
|
+
<p>This is the constructor for the CharacterStyle class.</p>
|
336
|
+
|
337
|
+
|
338
|
+
</div>
|
339
|
+
</div>
|
340
|
+
<div class="tags">
|
341
|
+
<p class="tag_title">Parameters:</p>
|
342
|
+
<ul class="param">
|
343
|
+
|
344
|
+
<li>
|
345
|
+
|
346
|
+
<span class='name'>options</span>
|
347
|
+
|
348
|
+
|
349
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
350
|
+
|
351
|
+
|
352
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
353
|
+
|
354
|
+
|
355
|
+
—
|
356
|
+
<div class='inline'>
|
357
|
+
<p>the character style options.</p>
|
358
|
+
</div>
|
359
|
+
|
360
|
+
</li>
|
361
|
+
|
362
|
+
</ul>
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
368
|
+
<ul class="option">
|
369
|
+
|
370
|
+
<li>
|
371
|
+
<span class="name">"name"</span>
|
372
|
+
<span class="type">(<tt>String</tt>)</span>
|
373
|
+
<span class="default">
|
374
|
+
|
375
|
+
— default:
|
376
|
+
<tt>nil</tt>
|
377
|
+
|
378
|
+
</span>
|
379
|
+
|
380
|
+
— <div class='inline'>
|
381
|
+
<p>human-readable name for the style.</p>
|
382
|
+
</div>
|
383
|
+
|
384
|
+
</li>
|
385
|
+
|
386
|
+
<li>
|
387
|
+
<span class="name">"handle"</span>
|
388
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
389
|
+
<span class="default">
|
390
|
+
|
391
|
+
— default:
|
392
|
+
<tt>nil</tt>
|
393
|
+
|
394
|
+
</span>
|
395
|
+
|
396
|
+
— <div class='inline'>
|
397
|
+
<p>16-bit integer that identifies the style in a document.</p>
|
398
|
+
</div>
|
399
|
+
|
400
|
+
</li>
|
401
|
+
|
402
|
+
<li>
|
403
|
+
<span class="name">"next_style_handle"</span>
|
404
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
405
|
+
<span class="default">
|
406
|
+
|
407
|
+
— default:
|
408
|
+
<tt>nil</tt>
|
409
|
+
|
410
|
+
</span>
|
411
|
+
|
412
|
+
— <div class='inline'>
|
413
|
+
<p>16-bit integer that identifies the next style for this style.</p>
|
414
|
+
</div>
|
415
|
+
|
416
|
+
</li>
|
417
|
+
|
418
|
+
<li>
|
419
|
+
<span class="name">"based_on_style_handle"</span>
|
420
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
421
|
+
<span class="default">
|
422
|
+
|
423
|
+
— default:
|
424
|
+
<tt>nil</tt>
|
425
|
+
|
426
|
+
</span>
|
427
|
+
|
428
|
+
— <div class='inline'>
|
429
|
+
<p>16-bit integer that identifies the base style for this style.</p>
|
430
|
+
</div>
|
431
|
+
|
432
|
+
</li>
|
433
|
+
|
434
|
+
<li>
|
435
|
+
<span class="name">"priority"</span>
|
436
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
437
|
+
<span class="default">
|
438
|
+
|
439
|
+
— default:
|
440
|
+
<tt>nil</tt>
|
441
|
+
|
442
|
+
</span>
|
443
|
+
|
444
|
+
— <div class='inline'>
|
445
|
+
<p>16-bit integer that indicates the ordering of the style among other styles
|
446
|
+
in a document.</p>
|
447
|
+
</div>
|
448
|
+
|
449
|
+
</li>
|
450
|
+
|
451
|
+
<li>
|
452
|
+
<span class="name">"primary"</span>
|
453
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
454
|
+
<span class="default">
|
455
|
+
|
456
|
+
— default:
|
457
|
+
<tt>false</tt>
|
458
|
+
|
459
|
+
</span>
|
460
|
+
|
461
|
+
— <div class='inline'>
|
462
|
+
<p>whether or not this style is a primary or “quick” style.</p>
|
463
|
+
</div>
|
464
|
+
|
465
|
+
</li>
|
466
|
+
|
467
|
+
<li>
|
468
|
+
<span class="name">"additive"</span>
|
469
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
470
|
+
<span class="default">
|
471
|
+
|
472
|
+
— default:
|
473
|
+
<tt>false</tt>
|
474
|
+
|
475
|
+
</span>
|
476
|
+
|
477
|
+
— <div class='inline'>
|
478
|
+
<p>whether or not this character style is additive to the current paragraph
|
479
|
+
style.</p>
|
480
|
+
</div>
|
481
|
+
|
482
|
+
</li>
|
483
|
+
|
484
|
+
<li>
|
485
|
+
<span class="name">"auto_update"</span>
|
486
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
487
|
+
<span class="default">
|
488
|
+
|
489
|
+
— default:
|
490
|
+
<tt>false</tt>
|
491
|
+
|
492
|
+
</span>
|
493
|
+
|
494
|
+
— <div class='inline'>
|
495
|
+
<p>whether or not this style should be updated when any node to which the
|
496
|
+
style is applied is updated.</p>
|
497
|
+
</div>
|
498
|
+
|
499
|
+
</li>
|
500
|
+
|
501
|
+
<li>
|
502
|
+
<span class="name">"hidden"</span>
|
503
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
504
|
+
<span class="default">
|
505
|
+
|
506
|
+
— default:
|
507
|
+
<tt>false</tt>
|
508
|
+
|
509
|
+
</span>
|
510
|
+
|
511
|
+
— <div class='inline'>
|
512
|
+
<p>whether or not the style should be hidden.</p>
|
513
|
+
</div>
|
514
|
+
|
515
|
+
</li>
|
516
|
+
|
517
|
+
<li>
|
518
|
+
<span class="name">"bold"</span>
|
519
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
520
|
+
<span class="default">
|
521
|
+
|
522
|
+
— default:
|
523
|
+
<tt>nil</tt>
|
524
|
+
|
525
|
+
</span>
|
526
|
+
|
527
|
+
— <div class='inline'>
|
528
|
+
<p>enable or disable bold (nil to remain same).</p>
|
529
|
+
</div>
|
530
|
+
|
531
|
+
</li>
|
532
|
+
|
533
|
+
<li>
|
534
|
+
<span class="name">"italic"</span>
|
535
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
536
|
+
<span class="default">
|
537
|
+
|
538
|
+
— default:
|
539
|
+
<tt>nil</tt>
|
540
|
+
|
541
|
+
</span>
|
542
|
+
|
543
|
+
— <div class='inline'>
|
544
|
+
<p>enable or disable italic (nil to remain same).</p>
|
545
|
+
</div>
|
546
|
+
|
547
|
+
</li>
|
548
|
+
|
549
|
+
<li>
|
550
|
+
<span class="name">"underline"</span>
|
551
|
+
<span class="type">(<tt>Boolean</tt>, <tt>String</tt>)</span>
|
552
|
+
<span class="default">
|
553
|
+
|
554
|
+
— default:
|
555
|
+
<tt>nil</tt>
|
556
|
+
|
557
|
+
</span>
|
558
|
+
|
559
|
+
— <div class='inline'>
|
560
|
+
<p>enable or disable underline (nil to remain same); can also be a string (see
|
561
|
+
<span class='object_link'><a href="CharacterFormatting.html#CHARACTER_ATTRIBUTES-constant" title="RRTF::CharacterFormatting::CHARACTER_ATTRIBUTES (constant)">CharacterFormatting::CHARACTER_ATTRIBUTES</a></span>).</p>
|
562
|
+
</div>
|
563
|
+
|
564
|
+
</li>
|
565
|
+
|
566
|
+
<li>
|
567
|
+
<span class="name">"uppercase"</span>
|
568
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
569
|
+
<span class="default">
|
570
|
+
|
571
|
+
— default:
|
572
|
+
<tt>nil</tt>
|
573
|
+
|
574
|
+
</span>
|
575
|
+
|
576
|
+
— <div class='inline'>
|
577
|
+
<p>enable or disable all caps (nil to remain same).</p>
|
578
|
+
</div>
|
579
|
+
|
580
|
+
</li>
|
581
|
+
|
582
|
+
<li>
|
583
|
+
<span class="name">"superscript"</span>
|
584
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
585
|
+
<span class="default">
|
586
|
+
|
587
|
+
— default:
|
588
|
+
<tt>nil</tt>
|
589
|
+
|
590
|
+
</span>
|
591
|
+
|
592
|
+
— <div class='inline'>
|
593
|
+
<p>enable or disable superscript (nil to remain same).</p>
|
594
|
+
</div>
|
595
|
+
|
596
|
+
</li>
|
597
|
+
|
598
|
+
<li>
|
599
|
+
<span class="name">"subscript"</span>
|
600
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
601
|
+
<span class="default">
|
602
|
+
|
603
|
+
— default:
|
604
|
+
<tt>nil</tt>
|
605
|
+
|
606
|
+
</span>
|
607
|
+
|
608
|
+
— <div class='inline'>
|
609
|
+
<p>enable or disable subscript (nil to remain same).</p>
|
610
|
+
</div>
|
611
|
+
|
612
|
+
</li>
|
613
|
+
|
614
|
+
<li>
|
615
|
+
<span class="name">"strike"</span>
|
616
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
617
|
+
<span class="default">
|
618
|
+
|
619
|
+
— default:
|
620
|
+
<tt>nil</tt>
|
621
|
+
|
622
|
+
</span>
|
623
|
+
|
624
|
+
— <div class='inline'>
|
625
|
+
<p>enable or disable single line-through (nil to remain same).</p>
|
626
|
+
</div>
|
627
|
+
|
628
|
+
</li>
|
629
|
+
|
630
|
+
<li>
|
631
|
+
<span class="name">"emboss"</span>
|
632
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
633
|
+
<span class="default">
|
634
|
+
|
635
|
+
— default:
|
636
|
+
<tt>nil</tt>
|
637
|
+
|
638
|
+
</span>
|
639
|
+
|
640
|
+
— <div class='inline'>
|
641
|
+
<p>enable or disable emboss (nil to remain same).</p>
|
642
|
+
</div>
|
643
|
+
|
644
|
+
</li>
|
645
|
+
|
646
|
+
<li>
|
647
|
+
<span class="name">"imprint"</span>
|
648
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
649
|
+
<span class="default">
|
650
|
+
|
651
|
+
— default:
|
652
|
+
<tt>nil</tt>
|
653
|
+
|
654
|
+
</span>
|
655
|
+
|
656
|
+
— <div class='inline'>
|
657
|
+
<p>enable or disable imprint (nil to remain same).</p>
|
658
|
+
</div>
|
659
|
+
|
660
|
+
</li>
|
661
|
+
|
662
|
+
<li>
|
663
|
+
<span class="name">"outline"</span>
|
664
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
665
|
+
<span class="default">
|
666
|
+
|
667
|
+
— default:
|
668
|
+
<tt>nil</tt>
|
669
|
+
|
670
|
+
</span>
|
671
|
+
|
672
|
+
— <div class='inline'>
|
673
|
+
<p>enable or disable outline (nil to remain same).</p>
|
674
|
+
</div>
|
675
|
+
|
676
|
+
</li>
|
677
|
+
|
678
|
+
<li>
|
679
|
+
<span class="name">"text_hidden"</span>
|
680
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
681
|
+
<span class="default">
|
682
|
+
|
683
|
+
— default:
|
684
|
+
<tt>nil</tt>
|
685
|
+
|
686
|
+
</span>
|
687
|
+
|
688
|
+
— <div class='inline'>
|
689
|
+
<p>enable or disable hidden (nil to remain same).</p>
|
690
|
+
</div>
|
691
|
+
|
692
|
+
</li>
|
693
|
+
|
694
|
+
<li>
|
695
|
+
<span class="name">"kerning"</span>
|
696
|
+
<span class="type">(<tt>Boolean</tt>, <tt>Integer</tt>)</span>
|
697
|
+
<span class="default">
|
698
|
+
|
699
|
+
— default:
|
700
|
+
<tt>nil</tt>
|
701
|
+
|
702
|
+
</span>
|
703
|
+
|
704
|
+
— <div class='inline'>
|
705
|
+
<p>enable or disable kerning (nil to remain same); to enable specify the font
|
706
|
+
size in half-points above which kerining will be applied.</p>
|
707
|
+
</div>
|
708
|
+
|
709
|
+
</li>
|
710
|
+
|
711
|
+
<li>
|
712
|
+
<span class="name">"character_spacing_offset"</span>
|
713
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
714
|
+
<span class="default">
|
715
|
+
|
716
|
+
— default:
|
717
|
+
<tt>nil</tt>
|
718
|
+
|
719
|
+
</span>
|
720
|
+
|
721
|
+
— <div class='inline'>
|
722
|
+
<p>quarter points by which to expand or compress character spacing (negative
|
723
|
+
for compress).</p>
|
724
|
+
</div>
|
725
|
+
|
726
|
+
</li>
|
727
|
+
|
728
|
+
<li>
|
729
|
+
<span class="name">"foreground_color"</span>
|
730
|
+
<span class="type">(<tt>String</tt>, <tt><span class='object_link'><a href="Colour.html" title="RRTF::Colour (class)">Colour</a></span></tt>)</span>
|
731
|
+
<span class="default">
|
732
|
+
|
733
|
+
— default:
|
734
|
+
<tt>nil</tt>
|
735
|
+
|
736
|
+
</span>
|
737
|
+
|
738
|
+
— <div class='inline'>
|
739
|
+
<p>colour to apply to the foreground (text); see <span class='object_link'><a href="Colour.html#from_string-class_method" title="RRTF::Colour.from_string (method)">Colour.from_string</a></span> for
|
740
|
+
string format.</p>
|
741
|
+
</div>
|
742
|
+
|
743
|
+
</li>
|
744
|
+
|
745
|
+
<li>
|
746
|
+
<span class="name">"background_color"</span>
|
747
|
+
<span class="type">(<tt>String</tt>, <tt><span class='object_link'><a href="Colour.html" title="RRTF::Colour (class)">Colour</a></span></tt>)</span>
|
748
|
+
<span class="default">
|
749
|
+
|
750
|
+
— default:
|
751
|
+
<tt>nil</tt>
|
752
|
+
|
753
|
+
</span>
|
754
|
+
|
755
|
+
— <div class='inline'>
|
756
|
+
<p>colour to apply to the background (highlight); see <span class='object_link'><a href="Colour.html#from_string-class_method" title="RRTF::Colour.from_string (method)">Colour.from_string</a></span> for
|
757
|
+
string format.</p>
|
758
|
+
</div>
|
759
|
+
|
760
|
+
</li>
|
761
|
+
|
762
|
+
<li>
|
763
|
+
<span class="name">"underline_color"</span>
|
764
|
+
<span class="type">(<tt>String</tt>, <tt><span class='object_link'><a href="Colour.html" title="RRTF::Colour (class)">Colour</a></span></tt>)</span>
|
765
|
+
<span class="default">
|
766
|
+
|
767
|
+
— default:
|
768
|
+
<tt>nil</tt>
|
769
|
+
|
770
|
+
</span>
|
771
|
+
|
772
|
+
— <div class='inline'>
|
773
|
+
<p>colour to apply to the underline; see <span class='object_link'><a href="Colour.html#from_string-class_method" title="RRTF::Colour.from_string (method)">Colour.from_string</a></span> for string
|
774
|
+
format.</p>
|
775
|
+
</div>
|
776
|
+
|
777
|
+
</li>
|
778
|
+
|
779
|
+
<li>
|
780
|
+
<span class="name">"font"</span>
|
781
|
+
<span class="type">(<tt>String</tt>, <tt><span class='object_link'><a href="Font.html" title="RRTF::Font (class)">Font</a></span></tt>)</span>
|
782
|
+
<span class="default">
|
783
|
+
|
784
|
+
— default:
|
785
|
+
<tt>nil</tt>
|
786
|
+
|
787
|
+
</span>
|
788
|
+
|
789
|
+
— <div class='inline'>
|
790
|
+
<p>font to apply to text; see <span class='object_link'><a href="Font.html#from_string-class_method" title="RRTF::Font.from_string (method)">Font.from_string</a></span> for string format.</p>
|
791
|
+
</div>
|
792
|
+
|
793
|
+
</li>
|
794
|
+
|
795
|
+
<li>
|
796
|
+
<span class="name">"font_size"</span>
|
797
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
798
|
+
<span class="default">
|
799
|
+
|
800
|
+
— default:
|
801
|
+
<tt>nil</tt>
|
802
|
+
|
803
|
+
</span>
|
804
|
+
|
805
|
+
— <div class='inline'>
|
806
|
+
<p>font size in half-points.</p>
|
807
|
+
</div>
|
808
|
+
|
809
|
+
</li>
|
810
|
+
|
811
|
+
<li>
|
812
|
+
<span class="name">"justification"</span>
|
813
|
+
<span class="type">(<tt>String</tt>)</span>
|
814
|
+
<span class="default">
|
815
|
+
|
816
|
+
— default:
|
817
|
+
<tt>'LEFT'</tt>
|
818
|
+
|
819
|
+
</span>
|
820
|
+
|
821
|
+
— <div class='inline'>
|
822
|
+
<p>the paragraph justification ('LEFT',
|
823
|
+
'CENTER'/'CENTRE', 'RIGHT', or 'FULL').</p>
|
824
|
+
</div>
|
825
|
+
|
826
|
+
</li>
|
827
|
+
|
828
|
+
<li>
|
829
|
+
<span class="name">"left_indent"</span>
|
830
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
831
|
+
<span class="default">
|
832
|
+
|
833
|
+
— default:
|
834
|
+
<tt>nil</tt>
|
835
|
+
|
836
|
+
</span>
|
837
|
+
|
838
|
+
— <div class='inline'>
|
839
|
+
<p>the left indent of the paragraph (twentieth points).</p>
|
840
|
+
</div>
|
841
|
+
|
842
|
+
</li>
|
843
|
+
|
844
|
+
<li>
|
845
|
+
<span class="name">"right_indent"</span>
|
846
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
847
|
+
<span class="default">
|
848
|
+
|
849
|
+
— default:
|
850
|
+
<tt>nil</tt>
|
851
|
+
|
852
|
+
</span>
|
853
|
+
|
854
|
+
— <div class='inline'>
|
855
|
+
<p>the right indent of the paragraph (twentieth points).</p>
|
856
|
+
</div>
|
857
|
+
|
858
|
+
</li>
|
859
|
+
|
860
|
+
<li>
|
861
|
+
<span class="name">"first_line_indent"</span>
|
862
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
863
|
+
<span class="default">
|
864
|
+
|
865
|
+
— default:
|
866
|
+
<tt>nil</tt>
|
867
|
+
|
868
|
+
</span>
|
869
|
+
|
870
|
+
— <div class='inline'>
|
871
|
+
<p>the first line indent of the paragraph (twentieth points).</p>
|
872
|
+
</div>
|
873
|
+
|
874
|
+
</li>
|
875
|
+
|
876
|
+
<li>
|
877
|
+
<span class="name">"space_before"</span>
|
878
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
879
|
+
<span class="default">
|
880
|
+
|
881
|
+
— default:
|
882
|
+
<tt>nil</tt>
|
883
|
+
|
884
|
+
</span>
|
885
|
+
|
886
|
+
— <div class='inline'>
|
887
|
+
<p>the space before the paragraph (twentieth points).</p>
|
888
|
+
</div>
|
889
|
+
|
890
|
+
</li>
|
891
|
+
|
892
|
+
<li>
|
893
|
+
<span class="name">"space_after"</span>
|
894
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
895
|
+
<span class="default">
|
896
|
+
|
897
|
+
— default:
|
898
|
+
<tt>nil</tt>
|
899
|
+
|
900
|
+
</span>
|
901
|
+
|
902
|
+
— <div class='inline'>
|
903
|
+
<p>the space after the paragraph (twentieth points).</p>
|
904
|
+
</div>
|
905
|
+
|
906
|
+
</li>
|
907
|
+
|
908
|
+
<li>
|
909
|
+
<span class="name">"line_spacing"</span>
|
910
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
911
|
+
<span class="default">
|
912
|
+
|
913
|
+
— default:
|
914
|
+
<tt>nil</tt>
|
915
|
+
|
916
|
+
</span>
|
917
|
+
|
918
|
+
— <div class='inline'>
|
919
|
+
<p>the line spacing in the paragraph (twentieth points).</p>
|
920
|
+
</div>
|
921
|
+
|
922
|
+
</li>
|
923
|
+
|
924
|
+
<li>
|
925
|
+
<span class="name">"widow_orphan_ctl"</span>
|
926
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
927
|
+
<span class="default">
|
928
|
+
|
929
|
+
— default:
|
930
|
+
<tt>nil</tt>
|
931
|
+
|
932
|
+
</span>
|
933
|
+
|
934
|
+
— <div class='inline'>
|
935
|
+
<p>enable or disable widow-and-orphan control.</p>
|
936
|
+
</div>
|
937
|
+
|
938
|
+
</li>
|
939
|
+
|
940
|
+
<li>
|
941
|
+
<span class="name">"no_break"</span>
|
942
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
943
|
+
<span class="default">
|
944
|
+
|
945
|
+
— default:
|
946
|
+
<tt>nil</tt>
|
947
|
+
|
948
|
+
</span>
|
949
|
+
|
950
|
+
— <div class='inline'>
|
951
|
+
<p>when true, tries to keep the paragraph on the same page (i.e. without
|
952
|
+
breaking).</p>
|
953
|
+
</div>
|
954
|
+
|
955
|
+
</li>
|
956
|
+
|
957
|
+
<li>
|
958
|
+
<span class="name">"no_break_with_next"</span>
|
959
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
960
|
+
<span class="default">
|
961
|
+
|
962
|
+
— default:
|
963
|
+
<tt>nil</tt>
|
964
|
+
|
965
|
+
</span>
|
966
|
+
|
967
|
+
— <div class='inline'>
|
968
|
+
<p>when true, tries to keep the paragraph with the next paragraph on the same
|
969
|
+
page (i.e. without breaking).</p>
|
970
|
+
</div>
|
971
|
+
|
972
|
+
</li>
|
973
|
+
|
974
|
+
<li>
|
975
|
+
<span class="name">"hyphenate"</span>
|
976
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
977
|
+
<span class="default">
|
978
|
+
|
979
|
+
— default:
|
980
|
+
<tt>nil</tt>
|
981
|
+
|
982
|
+
</span>
|
983
|
+
|
984
|
+
— <div class='inline'>
|
985
|
+
<p>enable or disable hyphenation for the paragraph.</p>
|
986
|
+
</div>
|
987
|
+
|
988
|
+
</li>
|
989
|
+
|
990
|
+
<li>
|
991
|
+
<span class="name">"paragraph_flow"</span>
|
992
|
+
<span class="type">(<tt>String</tt>)</span>
|
993
|
+
<span class="default">
|
994
|
+
|
995
|
+
— default:
|
996
|
+
<tt>'LEFT_TO_RIGHT'</tt>
|
997
|
+
|
998
|
+
</span>
|
999
|
+
|
1000
|
+
— <div class='inline'>
|
1001
|
+
<p>the text flow direction in the paragraph ('LEFT_TO_RIGHT' or
|
1002
|
+
'RIGHT_TO_LEFT').</p>
|
1003
|
+
</div>
|
1004
|
+
|
1005
|
+
</li>
|
1006
|
+
|
1007
|
+
</ul>
|
1008
|
+
|
1009
|
+
|
1010
|
+
|
1011
|
+
</div><table class="source_code">
|
1012
|
+
<tr>
|
1013
|
+
<td>
|
1014
|
+
<pre class="lines">
|
1015
|
+
|
1016
|
+
|
1017
|
+
18
|
1018
|
+
19
|
1019
|
+
20
|
1020
|
+
21
|
1021
|
+
22</pre>
|
1022
|
+
</td>
|
1023
|
+
<td>
|
1024
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/style/paragraph_style.rb', line 18</span>
|
1025
|
+
|
1026
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1027
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
1028
|
+
<span class='id identifier rubyid_initialize_paragraph_formatting'>initialize_paragraph_formatting</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
1029
|
+
<span class='id identifier rubyid_initialize_character_formatting'>initialize_character_formatting</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
1030
|
+
<span class='kw'>end</span></pre>
|
1031
|
+
</td>
|
1032
|
+
</tr>
|
1033
|
+
</table>
|
1034
|
+
</div>
|
1035
|
+
|
1036
|
+
</div>
|
1037
|
+
|
1038
|
+
|
1039
|
+
<div id="instance_method_details" class="method_details_list">
|
1040
|
+
<h2>Instance Method Details</h2>
|
1041
|
+
|
1042
|
+
|
1043
|
+
<div class="method_details first">
|
1044
|
+
<h3 class="signature first" id="is_paragraph_style?-instance_method">
|
1045
|
+
|
1046
|
+
#<strong>is_paragraph_style?</strong> ⇒ <tt>Boolean</tt>
|
1047
|
+
|
1048
|
+
|
1049
|
+
|
1050
|
+
|
1051
|
+
|
1052
|
+
</h3><div class="docstring">
|
1053
|
+
<div class="discussion">
|
1054
|
+
|
1055
|
+
<p>This method overrides the is_paragraph_style? method inherited from the
|
1056
|
+
Style class to always return true.</p>
|
1057
|
+
|
1058
|
+
|
1059
|
+
</div>
|
1060
|
+
</div>
|
1061
|
+
<div class="tags">
|
1062
|
+
|
1063
|
+
<p class="tag_title">Returns:</p>
|
1064
|
+
<ul class="return">
|
1065
|
+
|
1066
|
+
<li>
|
1067
|
+
|
1068
|
+
|
1069
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1070
|
+
|
1071
|
+
|
1072
|
+
|
1073
|
+
</li>
|
1074
|
+
|
1075
|
+
</ul>
|
1076
|
+
|
1077
|
+
</div><table class="source_code">
|
1078
|
+
<tr>
|
1079
|
+
<td>
|
1080
|
+
<pre class="lines">
|
1081
|
+
|
1082
|
+
|
1083
|
+
26
|
1084
|
+
27
|
1085
|
+
28</pre>
|
1086
|
+
</td>
|
1087
|
+
<td>
|
1088
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/style/paragraph_style.rb', line 26</span>
|
1089
|
+
|
1090
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_is_paragraph_style?'>is_paragraph_style?</span>
|
1091
|
+
<span class='kw'>true</span>
|
1092
|
+
<span class='kw'>end</span></pre>
|
1093
|
+
</td>
|
1094
|
+
</tr>
|
1095
|
+
</table>
|
1096
|
+
</div>
|
1097
|
+
|
1098
|
+
<div class="method_details ">
|
1099
|
+
<h3 class="signature " id="prefix-instance_method">
|
1100
|
+
|
1101
|
+
#<strong>prefix</strong>(document) ⇒ <tt>Object</tt>
|
1102
|
+
|
1103
|
+
|
1104
|
+
|
1105
|
+
|
1106
|
+
|
1107
|
+
</h3><div class="docstring">
|
1108
|
+
<div class="discussion">
|
1109
|
+
|
1110
|
+
<p>This method generates a string containing the prefix associated with a
|
1111
|
+
style object.</p>
|
1112
|
+
|
1113
|
+
<h4 id="label-Parameters">Parameters</h4>
|
1114
|
+
<dl class="rdoc-list note-list"><dt>fonts
|
1115
|
+
<dd>
|
1116
|
+
<p>A reference to a FontTable containing any fonts used by the style (may be
|
1117
|
+
nil if no fonts used).</p>
|
1118
|
+
</dd><dt>colours
|
1119
|
+
<dd>
|
1120
|
+
<p>A reference to a ColourTable containing any colours used by the style (may
|
1121
|
+
be nil if no colours used).</p>
|
1122
|
+
</dd></dl>
|
1123
|
+
|
1124
|
+
|
1125
|
+
</div>
|
1126
|
+
</div>
|
1127
|
+
<div class="tags">
|
1128
|
+
|
1129
|
+
|
1130
|
+
</div><table class="source_code">
|
1131
|
+
<tr>
|
1132
|
+
<td>
|
1133
|
+
<pre class="lines">
|
1134
|
+
|
1135
|
+
|
1136
|
+
73
|
1137
|
+
74
|
1138
|
+
75
|
1139
|
+
76
|
1140
|
+
77
|
1141
|
+
78
|
1142
|
+
79
|
1143
|
+
80</pre>
|
1144
|
+
</td>
|
1145
|
+
<td>
|
1146
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/style/paragraph_style.rb', line 73</span>
|
1147
|
+
|
1148
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_prefix'>prefix</span><span class='lparen'>(</span><span class='id identifier rubyid_document'>document</span><span class='rparen'>)</span>
|
1149
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
1150
|
+
|
1151
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\s</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_handle'>handle</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1152
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='id identifier rubyid_rtf_formatting'>rtf_formatting</span><span class='lparen'>(</span><span class='id identifier rubyid_document'>document</span><span class='rparen'>)</span>
|
1153
|
+
|
1154
|
+
<span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span>
|
1155
|
+
<span class='kw'>end</span></pre>
|
1156
|
+
</td>
|
1157
|
+
</tr>
|
1158
|
+
</table>
|
1159
|
+
</div>
|
1160
|
+
|
1161
|
+
<div class="method_details ">
|
1162
|
+
<h3 class="signature " id="rtf_formatting-instance_method">
|
1163
|
+
|
1164
|
+
#<strong>rtf_formatting</strong>(document) ⇒ <tt>Object</tt>
|
1165
|
+
|
1166
|
+
|
1167
|
+
|
1168
|
+
|
1169
|
+
|
1170
|
+
</h3><table class="source_code">
|
1171
|
+
<tr>
|
1172
|
+
<td>
|
1173
|
+
<pre class="lines">
|
1174
|
+
|
1175
|
+
|
1176
|
+
82
|
1177
|
+
83
|
1178
|
+
84
|
1179
|
+
85
|
1180
|
+
86
|
1181
|
+
87
|
1182
|
+
88
|
1183
|
+
89
|
1184
|
+
90
|
1185
|
+
91
|
1186
|
+
92</pre>
|
1187
|
+
</td>
|
1188
|
+
<td>
|
1189
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/style/paragraph_style.rb', line 82</span>
|
1190
|
+
|
1191
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_rtf_formatting'>rtf_formatting</span><span class='lparen'>(</span><span class='id identifier rubyid_document'>document</span><span class='rparen'>)</span>
|
1192
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'>=</span> <span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
1193
|
+
|
1194
|
+
<span class='id identifier rubyid_pf'>pf</span> <span class='op'>=</span> <span class='id identifier rubyid_paragraph_formatting_to_rtf'>paragraph_formatting_to_rtf</span><span class='lparen'>(</span><span class='id identifier rubyid_document'>document</span><span class='rparen'>)</span>
|
1195
|
+
<span class='id identifier rubyid_cf'>cf</span> <span class='op'>=</span> <span class='id identifier rubyid_character_formatting_to_rtf'>character_formatting_to_rtf</span><span class='lparen'>(</span><span class='id identifier rubyid_document'>document</span><span class='rparen'>)</span>
|
1196
|
+
|
1197
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='id identifier rubyid_pf'>pf</span> <span class='kw'>unless</span> <span class='id identifier rubyid_pf'>pf</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1198
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='id identifier rubyid_cf'>cf</span> <span class='kw'>unless</span> <span class='id identifier rubyid_cf'>cf</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1199
|
+
|
1200
|
+
<span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span>
|
1201
|
+
<span class='kw'>end</span></pre>
|
1202
|
+
</td>
|
1203
|
+
</tr>
|
1204
|
+
</table>
|
1205
|
+
</div>
|
1206
|
+
|
1207
|
+
<div class="method_details ">
|
1208
|
+
<h3 class="signature " id="to_rtf-instance_method">
|
1209
|
+
|
1210
|
+
#<strong>to_rtf</strong>(document, options = {}) ⇒ <tt>Object</tt>
|
1211
|
+
|
1212
|
+
|
1213
|
+
|
1214
|
+
|
1215
|
+
|
1216
|
+
</h3><div class="docstring">
|
1217
|
+
<div class="discussion">
|
1218
|
+
|
1219
|
+
<p>Converts the stylesheet paragraph style into its RTF representation</p>
|
1220
|
+
|
1221
|
+
<h4 id="label-Parameters">Parameters</h4>
|
1222
|
+
<dl class="rdoc-list note-list"><dt>fonts
|
1223
|
+
<dd>
|
1224
|
+
<p>A reference to a FontTable containing any fonts used by the style (may be
|
1225
|
+
nil if no fonts used).</p>
|
1226
|
+
</dd><dt>colours
|
1227
|
+
<dd>
|
1228
|
+
<p>A reference to a ColourTable containing any colours used by the style (may
|
1229
|
+
be nil if no colours used).</p>
|
1230
|
+
</dd></dl>
|
1231
|
+
|
1232
|
+
|
1233
|
+
</div>
|
1234
|
+
</div>
|
1235
|
+
<div class="tags">
|
1236
|
+
|
1237
|
+
|
1238
|
+
</div><table class="source_code">
|
1239
|
+
<tr>
|
1240
|
+
<td>
|
1241
|
+
<pre class="lines">
|
1242
|
+
|
1243
|
+
|
1244
|
+
37
|
1245
|
+
38
|
1246
|
+
39
|
1247
|
+
40
|
1248
|
+
41
|
1249
|
+
42
|
1250
|
+
43
|
1251
|
+
44
|
1252
|
+
45
|
1253
|
+
46
|
1254
|
+
47
|
1255
|
+
48
|
1256
|
+
49
|
1257
|
+
50
|
1258
|
+
51
|
1259
|
+
52
|
1260
|
+
53
|
1261
|
+
54
|
1262
|
+
55
|
1263
|
+
56
|
1264
|
+
57
|
1265
|
+
58
|
1266
|
+
59
|
1267
|
+
60
|
1268
|
+
61
|
1269
|
+
62
|
1270
|
+
63</pre>
|
1271
|
+
</td>
|
1272
|
+
<td>
|
1273
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/style/paragraph_style.rb', line 37</span>
|
1274
|
+
|
1275
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_rtf'>to_rtf</span><span class='lparen'>(</span><span class='id identifier rubyid_document'>document</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1276
|
+
<span class='comment'># load default options
|
1277
|
+
</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
1278
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>uglify</span><span class='tstring_end'>"</span></span> <span class='op'>=></span> <span class='kw'>false</span><span class='comma'>,</span>
|
1279
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>base_indent</span><span class='tstring_end'>"</span></span> <span class='op'>=></span> <span class='int'>0</span>
|
1280
|
+
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
1281
|
+
<span class='comment'># build formatting helpers
|
1282
|
+
</span> <span class='id identifier rubyid_base_prefix'>base_prefix</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>uglify</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span><span class='op'>*</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>base_indent</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
1283
|
+
<span class='id identifier rubyid_name_prefix'>name_prefix</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>uglify</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
1284
|
+
<span class='id identifier rubyid_suffix'>suffix</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>uglify</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span>
|
1285
|
+
|
1286
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'>=</span> <span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
1287
|
+
|
1288
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='id identifier rubyid_base_prefix'>base_prefix</span>
|
1289
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>{\\s</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_handle'>handle</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_suffix'>suffix</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1290
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_rtf_formatting'>rtf_formatting</span><span class='lparen'>(</span><span class='id identifier rubyid_document'>document</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_suffix'>suffix</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1291
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\additive</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_suffix'>suffix</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='ivar'>@additive</span>
|
1292
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\sbasedon</span><span class='embexpr_beg'>#{</span><span class='ivar'>@based_on_style_handle</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_suffix'>suffix</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='ivar'>@based_on_style_handle</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1293
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\sautoupd</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_suffix'>suffix</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='ivar'>@auto_update</span>
|
1294
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\snext</span><span class='embexpr_beg'>#{</span><span class='ivar'>@next_style_handle</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_suffix'>suffix</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='ivar'>@next_style_handle</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1295
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\sqformat</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_suffix'>suffix</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='ivar'>@primary</span>
|
1296
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\spriority</span><span class='embexpr_beg'>#{</span><span class='ivar'>@priority</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_suffix'>suffix</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='ivar'>@priority</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1297
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\shidden</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_suffix'>suffix</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='ivar'>@hidden</span>
|
1298
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name_prefix'>name_prefix</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>;}</span><span class='tstring_end'>"</span></span>
|
1299
|
+
|
1300
|
+
<span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span>
|
1301
|
+
<span class='kw'>end</span></pre>
|
1302
|
+
</td>
|
1303
|
+
</tr>
|
1304
|
+
</table>
|
1305
|
+
</div>
|
1306
|
+
|
1307
|
+
</div>
|
1308
|
+
|
1309
|
+
</div>
|
1310
|
+
|
1311
|
+
<div id="footer">
|
1312
|
+
Generated on Mon Jul 24 15:49:02 2017 by
|
1313
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1314
|
+
0.9.9 (ruby-2.3.3).
|
1315
|
+
</div>
|
1316
|
+
|
1317
|
+
</div>
|
1318
|
+
</body>
|
1319
|
+
</html>
|