rrtf 1.0.0 → 1.3.1
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 +5 -5
- data/CHANGELOG.md +17 -0
- data/README.md +29 -0
- data/documentation/RRTF.html +5 -5
- data/documentation/RRTF/AnonymousStyle.html +2 -2
- data/documentation/RRTF/BorderFormatting.html +48 -48
- data/documentation/RRTF/BorderStyle.html +1 -1
- data/documentation/RRTF/CharacterFormatting.html +1 -1
- data/documentation/RRTF/CharacterStyle.html +1 -1
- data/documentation/RRTF/Colour.html +1 -1
- data/documentation/RRTF/ColourTable.html +1 -1
- data/documentation/RRTF/CommandNode.html +333 -93
- data/documentation/RRTF/ContainerNode.html +1 -1
- data/documentation/RRTF/Converters.html +1 -1
- data/documentation/RRTF/Converters/HTML.html +1 -1
- data/documentation/RRTF/Converters/HTML/Helpers.html +1 -1
- data/documentation/RRTF/Converters/HTML/Node.html +1 -1
- data/documentation/RRTF/Converters/HTML/NodeSet.html +1 -1
- data/documentation/RRTF/Document.html +2 -2
- data/documentation/RRTF/DocumentFormatting.html +48 -48
- data/documentation/RRTF/DocumentProperties.html +8 -3
- data/documentation/RRTF/Font.html +1 -1
- data/documentation/RRTF/FontTable.html +1 -1
- data/documentation/RRTF/FooterNode.html +2 -2
- data/documentation/RRTF/GeometryNode.html +2 -2
- data/documentation/RRTF/GeometryProperties.html +9 -9
- data/documentation/RRTF/HeaderNode.html +2 -2
- data/documentation/RRTF/ImageNode.html +64 -61
- data/documentation/RRTF/Information.html +1 -1
- data/documentation/RRTF/LinkNode.html +2 -2
- data/documentation/RRTF/ListLevel.html +1 -1
- data/documentation/RRTF/ListLevelNode.html +2 -2
- data/documentation/RRTF/ListMarker.html +1 -1
- data/documentation/RRTF/ListNode.html +2 -2
- data/documentation/RRTF/ListTable.html +1 -1
- data/documentation/RRTF/ListTemplate.html +1 -1
- data/documentation/RRTF/ListTextNode.html +2 -2
- data/documentation/RRTF/Node.html +1 -1
- data/documentation/RRTF/Page.html +1 -1
- data/documentation/RRTF/Page/Margin.html +1 -1
- data/documentation/RRTF/Page/Size.html +1 -1
- data/documentation/RRTF/PageFormatting.html +184 -195
- data/documentation/RRTF/ParagraphFormatting.html +75 -48
- data/documentation/RRTF/ParagraphNode.html +2 -2
- data/documentation/RRTF/ParagraphStyle.html +1 -1
- data/documentation/RRTF/PositionFormatting.html +48 -48
- data/documentation/RRTF/PositionStyle.html +1 -1
- data/documentation/RRTF/Properties.html +1 -1
- data/documentation/RRTF/RTFError.html +1 -1
- data/documentation/RRTF/SectionFormatting.html +750 -0
- data/documentation/RRTF/SectionNode.html +383 -0
- data/documentation/RRTF/SectionStyle.html +830 -0
- data/documentation/RRTF/ShadingFormatting.html +48 -48
- data/documentation/RRTF/ShadingStyle.html +1 -1
- data/documentation/RRTF/Style.html +2 -2
- data/documentation/RRTF/Stylesheet.html +1 -1
- data/documentation/RRTF/TabStyle.html +698 -0
- data/documentation/RRTF/TableCellNode.html +2 -2
- data/documentation/RRTF/TableNode.html +1 -1
- data/documentation/RRTF/TableRowNode.html +1 -1
- data/documentation/RRTF/TextNode.html +1 -1
- data/documentation/RRTF/Utilities.html +1 -1
- data/documentation/_index.html +33 -5
- data/documentation/class_list.html +1 -1
- data/documentation/file.README.html +32 -1
- data/documentation/index.html +32 -1
- data/documentation/method_list.html +499 -355
- data/documentation/top-level-namespace.html +1 -1
- data/examples/08.rtf +2 -2
- data/examples/09.rtf +9 -13
- data/examples/09_shapes.rb +2 -1
- data/examples/11.rtf +19 -0
- data/examples/11_sections.rb +11 -0
- data/examples/12.rtf +19 -0
- data/examples/12_tabs.rb +21 -0
- data/lib/rrtf/formatting.rb +155 -22
- data/lib/rrtf/node.rb +1 -0
- data/lib/rrtf/node/command_node.rb +38 -4
- data/lib/rrtf/node/image_node.rb +26 -32
- data/lib/rrtf/node/section_node.rb +21 -0
- data/lib/rrtf/properties/geometry_properties.rb +4 -4
- data/lib/rrtf/style.rb +2 -0
- data/lib/rrtf/style/section_style.rb +66 -0
- data/lib/rrtf/style/tab_style.rb +55 -0
- data/lib/rrtf/version.rb +1 -1
- data/rrtf.gemspec +4 -4
- metadata +30 -20
@@ -0,0 +1,383 @@
|
|
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::SectionNode
|
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::SectionNode";
|
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 (S)</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">SectionNode</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::SectionNode
|
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="CommandNode.html" title="RRTF::CommandNode (class)">CommandNode</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next"><span class='object_link'><a href="Node.html" title="RRTF::Node (class)">Node</a></span></li>
|
78
|
+
|
79
|
+
<li class="next"><span class='object_link'><a href="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</a></span></li>
|
80
|
+
|
81
|
+
<li class="next"><span class='object_link'><a href="CommandNode.html" title="RRTF::CommandNode (class)">CommandNode</a></span></li>
|
82
|
+
|
83
|
+
<li class="next">RRTF::SectionNode</li>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
87
|
+
|
88
|
+
</dd>
|
89
|
+
</dl>
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
<dl>
|
102
|
+
<dt>Defined in:</dt>
|
103
|
+
<dd>lib/rrtf/node/section_node.rb</dd>
|
104
|
+
</dl>
|
105
|
+
|
106
|
+
</div>
|
107
|
+
|
108
|
+
<h2>Overview</h2><div class="docstring">
|
109
|
+
<div class="discussion">
|
110
|
+
|
111
|
+
<p>This class represents a section within an RTF document. Section nodes do
|
112
|
+
not contain other nodes; instead, they mark the start of a new section.</p>
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
<div class="tags">
|
118
|
+
|
119
|
+
<p class="tag_title">Author:</p>
|
120
|
+
<ul class="author">
|
121
|
+
|
122
|
+
<li>
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
<div class='inline'>
|
129
|
+
<p>Wesley Hileman</p>
|
130
|
+
</div>
|
131
|
+
|
132
|
+
</li>
|
133
|
+
|
134
|
+
</ul>
|
135
|
+
|
136
|
+
</div>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<h2>Instance Attribute Summary</h2>
|
143
|
+
|
144
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="CommandNode.html" title="RRTF::CommandNode (class)">CommandNode</a></span></h3>
|
145
|
+
<p class="inherited"><span class='object_link'><a href="CommandNode.html#prefix-instance_method" title="RRTF::CommandNode#prefix (method)">#prefix</a></span>, <span class='object_link'><a href="CommandNode.html#split-instance_method" title="RRTF::CommandNode#split (method)">#split</a></span>, <span class='object_link'><a href="CommandNode.html#suffix-instance_method" title="RRTF::CommandNode#suffix (method)">#suffix</a></span>, <span class='object_link'><a href="CommandNode.html#wrap-instance_method" title="RRTF::CommandNode#wrap (method)">#wrap</a></span></p>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</a></span></h3>
|
150
|
+
<p class="inherited"><span class='object_link'><a href="ContainerNode.html#children-instance_method" title="RRTF::ContainerNode#children (method)">#children</a></span></p>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Node.html" title="RRTF::Node (class)">Node</a></span></h3>
|
155
|
+
<p class="inherited"><span class='object_link'><a href="Node.html#parent-instance_method" title="RRTF::Node#parent (method)">#parent</a></span></p>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
<h2>
|
160
|
+
Instance Method Summary
|
161
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
162
|
+
</h2>
|
163
|
+
|
164
|
+
<ul class="summary">
|
165
|
+
|
166
|
+
<li class="public ">
|
167
|
+
<span class="summary_signature">
|
168
|
+
|
169
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(parent, style = nil) ⇒ SectionNode </a>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
</span>
|
174
|
+
|
175
|
+
|
176
|
+
<span class="note title constructor">constructor</span>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
<span class="summary_desc"><div class='inline'>
|
186
|
+
<p>A new instance of SectionNode.</p>
|
187
|
+
</div></span>
|
188
|
+
|
189
|
+
</li>
|
190
|
+
|
191
|
+
|
192
|
+
<li class="public ">
|
193
|
+
<span class="summary_signature">
|
194
|
+
|
195
|
+
<a href="#store-instance_method" title="#store (instance method)">#<strong>store</strong>(node) ⇒ Object </a>
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
</span>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
<span class="summary_desc"><div class='inline'>
|
210
|
+
<p>Overrides <span class='object_link'><a href="ContainerNode.html#store-instance_method" title="RRTF::ContainerNode#store (method)">ContainerNode#store</a></span> to prevent child nodes from being added to
|
211
|
+
sections.</p>
|
212
|
+
</div></span>
|
213
|
+
|
214
|
+
</li>
|
215
|
+
|
216
|
+
|
217
|
+
</ul>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="CommandNode.html" title="RRTF::CommandNode (class)">CommandNode</a></span></h3>
|
230
|
+
<p class="inherited"><span class='object_link'><a href="CommandNode.html#<<-instance_method" title="RRTF::CommandNode#<< (method)">#<<</a></span>, <span class='object_link'><a href="CommandNode.html#apply-instance_method" title="RRTF::CommandNode#apply (method)">#apply</a></span>, <span class='object_link'><a href="CommandNode.html#column_break-instance_method" title="RRTF::CommandNode#column_break (method)">#column_break</a></span>, <span class='object_link'><a href="CommandNode.html#footnote-instance_method" title="RRTF::CommandNode#footnote (method)">#footnote</a></span>, <span class='object_link'><a href="CommandNode.html#geometry-instance_method" title="RRTF::CommandNode#geometry (method)">#geometry</a></span>, <span class='object_link'><a href="CommandNode.html#image-instance_method" title="RRTF::CommandNode#image (method)">#image</a></span>, <span class='object_link'><a href="CommandNode.html#line_break-instance_method" title="RRTF::CommandNode#line_break (method)">#line_break</a></span>, <span class='object_link'><a href="CommandNode.html#link-instance_method" title="RRTF::CommandNode#link (method)">#link</a></span>, <span class='object_link'><a href="CommandNode.html#list-instance_method" title="RRTF::CommandNode#list (method)">#list</a></span>, <span class='object_link'><a href="CommandNode.html#paragraph-instance_method" title="RRTF::CommandNode#paragraph (method)">#paragraph</a></span>, <span class='object_link'><a href="CommandNode.html#section-instance_method" title="RRTF::CommandNode#section (method)">#section</a></span>, <span class='object_link'><a href="CommandNode.html#tab-instance_method" title="RRTF::CommandNode#tab (method)">#tab</a></span>, <span class='object_link'><a href="CommandNode.html#table-instance_method" title="RRTF::CommandNode#table (method)">#table</a></span>, <span class='object_link'><a href="CommandNode.html#to_rtf-instance_method" title="RRTF::CommandNode#to_rtf (method)">#to_rtf</a></span></p>
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</a></span></h3>
|
241
|
+
<p class="inherited"><span class='object_link'><a href="ContainerNode.html#[]-instance_method" title="RRTF::ContainerNode#[] (method)">#[]</a></span>, <span class='object_link'><a href="ContainerNode.html#each-instance_method" title="RRTF::ContainerNode#each (method)">#each</a></span>, <span class='object_link'><a href="ContainerNode.html#first-instance_method" title="RRTF::ContainerNode#first (method)">#first</a></span>, <span class='object_link'><a href="ContainerNode.html#last-instance_method" title="RRTF::ContainerNode#last (method)">#last</a></span>, <span class='object_link'><a href="ContainerNode.html#size-instance_method" title="RRTF::ContainerNode#size (method)">#size</a></span>, <span class='object_link'><a href="ContainerNode.html#to_rtf-instance_method" title="RRTF::ContainerNode#to_rtf (method)">#to_rtf</a></span></p>
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Node.html" title="RRTF::Node (class)">Node</a></span></h3>
|
253
|
+
<p class="inherited"><span class='object_link'><a href="Node.html#is_root%3F-instance_method" title="RRTF::Node#is_root? (method)">#is_root?</a></span>, <span class='object_link'><a href="Node.html#next_node-instance_method" title="RRTF::Node#next_node (method)">#next_node</a></span>, <span class='object_link'><a href="Node.html#previous_node-instance_method" title="RRTF::Node#previous_node (method)">#previous_node</a></span>, <span class='object_link'><a href="Node.html#root-instance_method" title="RRTF::Node#root (method)">#root</a></span></p>
|
254
|
+
<div id="constructor_details" class="method_details_list">
|
255
|
+
<h2>Constructor Details</h2>
|
256
|
+
|
257
|
+
<div class="method_details first">
|
258
|
+
<h3 class="signature first" id="initialize-instance_method">
|
259
|
+
|
260
|
+
#<strong>initialize</strong>(parent, style = nil) ⇒ <tt><span class='object_link'><a href="" title="RRTF::SectionNode (class)">SectionNode</a></span></tt>
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
</h3><div class="docstring">
|
267
|
+
<div class="discussion">
|
268
|
+
|
269
|
+
<p>Returns a new instance of SectionNode</p>
|
270
|
+
|
271
|
+
|
272
|
+
</div>
|
273
|
+
</div>
|
274
|
+
<div class="tags">
|
275
|
+
|
276
|
+
|
277
|
+
</div><table class="source_code">
|
278
|
+
<tr>
|
279
|
+
<td>
|
280
|
+
<pre class="lines">
|
281
|
+
|
282
|
+
|
283
|
+
6
|
284
|
+
7
|
285
|
+
8
|
286
|
+
9
|
287
|
+
10
|
288
|
+
11</pre>
|
289
|
+
</td>
|
290
|
+
<td>
|
291
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/section_node.rb', line 6</span>
|
292
|
+
|
293
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span><span class='comma'>,</span> <span class='id identifier rubyid_style'>style</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
294
|
+
<span class='id identifier rubyid_prefix'>prefix</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>\sect\sectd</span><span class='tstring_end'>'</span></span>
|
295
|
+
<span class='id identifier rubyid_prefix'>prefix</span> <span class='op'><<</span> <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_prefix'>prefix</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
296
|
+
|
297
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span><span class='comma'>,</span> <span class='id identifier rubyid_prefix'>prefix</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
298
|
+
<span class='kw'>end</span></pre>
|
299
|
+
</td>
|
300
|
+
</tr>
|
301
|
+
</table>
|
302
|
+
</div>
|
303
|
+
|
304
|
+
</div>
|
305
|
+
|
306
|
+
|
307
|
+
<div id="instance_method_details" class="method_details_list">
|
308
|
+
<h2>Instance Method Details</h2>
|
309
|
+
|
310
|
+
|
311
|
+
<div class="method_details first">
|
312
|
+
<h3 class="signature first" id="store-instance_method">
|
313
|
+
|
314
|
+
#<strong>store</strong>(node) ⇒ <tt>Object</tt>
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
</h3><div class="docstring">
|
321
|
+
<div class="discussion">
|
322
|
+
|
323
|
+
<p>Overrides <span class='object_link'><a href="ContainerNode.html#store-instance_method" title="RRTF::ContainerNode#store (method)">ContainerNode#store</a></span> to prevent child nodes from being added to
|
324
|
+
sections.</p>
|
325
|
+
|
326
|
+
|
327
|
+
</div>
|
328
|
+
</div>
|
329
|
+
<div class="tags">
|
330
|
+
|
331
|
+
<p class="tag_title">Raises:</p>
|
332
|
+
<ul class="raise">
|
333
|
+
|
334
|
+
<li>
|
335
|
+
|
336
|
+
|
337
|
+
<span class='type'>(<tt><span class='object_link'><a href="RTFError.html" title="RRTF::RTFError (class)">RTFError</a></span></tt>)</span>
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
—
|
342
|
+
<div class='inline'>
|
343
|
+
<p>whenever called.</p>
|
344
|
+
</div>
|
345
|
+
|
346
|
+
</li>
|
347
|
+
|
348
|
+
</ul>
|
349
|
+
|
350
|
+
</div><table class="source_code">
|
351
|
+
<tr>
|
352
|
+
<td>
|
353
|
+
<pre class="lines">
|
354
|
+
|
355
|
+
|
356
|
+
17
|
357
|
+
18
|
358
|
+
19</pre>
|
359
|
+
</td>
|
360
|
+
<td>
|
361
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node/section_node.rb', line 17</span>
|
362
|
+
|
363
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_store'>store</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
|
364
|
+
<span class='const'><span class='object_link'><a href="RTFError.html" title="RRTF::RTFError (class)">RTFError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fire'><span class='object_link'><a href="RTFError.html#fire-class_method" title="RRTF::RTFError.fire (method)">fire</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Cannot add child nodes to section nodes: tried to add </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_node'>node</span><span class='embexpr_end'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
365
|
+
<span class='kw'>end</span></pre>
|
366
|
+
</td>
|
367
|
+
</tr>
|
368
|
+
</table>
|
369
|
+
</div>
|
370
|
+
|
371
|
+
</div>
|
372
|
+
|
373
|
+
</div>
|
374
|
+
|
375
|
+
<div id="footer">
|
376
|
+
Generated on Wed Aug 2 23:05:18 2017 by
|
377
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
378
|
+
0.9.9 (ruby-2.3.3).
|
379
|
+
</div>
|
380
|
+
|
381
|
+
</div>
|
382
|
+
</body>
|
383
|
+
</html>
|
@@ -0,0 +1,830 @@
|
|
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::SectionStyle
|
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::SectionStyle";
|
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 (S)</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">SectionStyle</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::SectionStyle
|
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="AnonymousStyle.html" title="RRTF::AnonymousStyle (class)">AnonymousStyle</a></span></li>
|
78
|
+
|
79
|
+
<li class="next"><span class='object_link'><a href="Style.html" title="RRTF::Style (class)">Style</a></span></li>
|
80
|
+
|
81
|
+
<li class="next">RRTF::SectionStyle</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
</dl>
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
<dl>
|
95
|
+
<dt>Includes:</dt>
|
96
|
+
<dd><span class='object_link'><a href="PageFormatting.html" title="RRTF::PageFormatting (module)">PageFormatting</a></span>, <span class='object_link'><a href="SectionFormatting.html" title="RRTF::SectionFormatting (module)">SectionFormatting</a></span></dd>
|
97
|
+
</dl>
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
<dl>
|
105
|
+
<dt>Defined in:</dt>
|
106
|
+
<dd>lib/rrtf/style/section_style.rb</dd>
|
107
|
+
</dl>
|
108
|
+
|
109
|
+
</div>
|
110
|
+
|
111
|
+
<h2>Overview</h2><div class="docstring">
|
112
|
+
<div class="discussion">
|
113
|
+
|
114
|
+
<p>This class represents a section style for an RTF document.</p>
|
115
|
+
|
116
|
+
|
117
|
+
</div>
|
118
|
+
</div>
|
119
|
+
<div class="tags">
|
120
|
+
|
121
|
+
|
122
|
+
</div>
|
123
|
+
|
124
|
+
|
125
|
+
<h2>Constant Summary</h2>
|
126
|
+
|
127
|
+
<h3 class="inherited">Constants included
|
128
|
+
from <span class='object_link'><a href="PageFormatting.html" title="RRTF::PageFormatting (module)">PageFormatting</a></span></h3>
|
129
|
+
<p class="inherited"><span class='object_link'><a href="PageFormatting.html#PAGE_ATTRIBUTES-constant" title="RRTF::PageFormatting::PAGE_ATTRIBUTES (constant)">PageFormatting::PAGE_ATTRIBUTES</a></span>, <span class='object_link'><a href="PageFormatting.html#PAGE_FORMATTING_TARGET_DICTIONARY-constant" title="RRTF::PageFormatting::PAGE_FORMATTING_TARGET_DICTIONARY (constant)">PageFormatting::PAGE_FORMATTING_TARGET_DICTIONARY</a></span></p>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
<h3 class="inherited">Constants included
|
134
|
+
from <span class='object_link'><a href="SectionFormatting.html" title="RRTF::SectionFormatting (module)">SectionFormatting</a></span></h3>
|
135
|
+
<p class="inherited"><span class='object_link'><a href="SectionFormatting.html#SECTION_ATTRIBUTES-constant" title="RRTF::SectionFormatting::SECTION_ATTRIBUTES (constant)">RRTF::SectionFormatting::SECTION_ATTRIBUTES</a></span></p>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
<h2>Instance Attribute Summary</h2>
|
141
|
+
|
142
|
+
<h3 class="inherited">Attributes included from <span class='object_link'><a href="PageFormatting.html" title="RRTF::PageFormatting (module)">PageFormatting</a></span></h3>
|
143
|
+
<p class="inherited"><span class='object_link'><a href="PageFormatting.html#target-instance_method" title="RRTF::PageFormatting#target (method)">#target</a></span></p>
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Style.html" title="RRTF::Style (class)">Style</a></span></h3>
|
148
|
+
<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>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
<h2>
|
153
|
+
Instance Method Summary
|
154
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
155
|
+
</h2>
|
156
|
+
|
157
|
+
<ul class="summary">
|
158
|
+
|
159
|
+
<li class="public ">
|
160
|
+
<span class="summary_signature">
|
161
|
+
|
162
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(options = {}) ⇒ SectionStyle </a>
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
</span>
|
167
|
+
|
168
|
+
|
169
|
+
<span class="note title constructor">constructor</span>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
<span class="summary_desc"><div class='inline'>
|
179
|
+
<p>This is the constructor for the SectionStyle class.</p>
|
180
|
+
</div></span>
|
181
|
+
|
182
|
+
</li>
|
183
|
+
|
184
|
+
|
185
|
+
<li class="public ">
|
186
|
+
<span class="summary_signature">
|
187
|
+
|
188
|
+
<a href="#prefix-instance_method" title="#prefix (instance method)">#<strong>prefix</strong>(document) ⇒ Object </a>
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
</span>
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
<span class="summary_desc"><div class='inline'>
|
203
|
+
<p>This method generates a string containing the prefix associated with the
|
204
|
+
style object.</p>
|
205
|
+
</div></span>
|
206
|
+
|
207
|
+
</li>
|
208
|
+
|
209
|
+
|
210
|
+
<li class="public ">
|
211
|
+
<span class="summary_signature">
|
212
|
+
|
213
|
+
<a href="#rtf_formatting-instance_method" title="#rtf_formatting (instance method)">#<strong>rtf_formatting</strong> ⇒ Object </a>
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
</span>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
228
|
+
|
229
|
+
</li>
|
230
|
+
|
231
|
+
|
232
|
+
<li class="public ">
|
233
|
+
<span class="summary_signature">
|
234
|
+
|
235
|
+
<a href="#to_rtf-instance_method" title="#to_rtf (instance method)">#<strong>to_rtf</strong>(document, options = {}) ⇒ Object </a>
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
</span>
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
<span class="summary_desc"><div class='inline'>
|
250
|
+
<p>Converts the stylesheet character style into its RTF representation (for
|
251
|
+
stylesheet).</p>
|
252
|
+
</div></span>
|
253
|
+
|
254
|
+
</li>
|
255
|
+
|
256
|
+
|
257
|
+
</ul>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="PageFormatting.html" title="RRTF::PageFormatting (module)">PageFormatting</a></span></h3>
|
270
|
+
<p class="inherited"><span class='object_link'><a href="PageFormatting.html#included-class_method" title="RRTF::PageFormatting.included (method)">included</a></span>, <span class='object_link'><a href="PageFormatting.html#initialize_page_formatting-instance_method" title="RRTF::PageFormatting#initialize_page_formatting (method)">#initialize_page_formatting</a></span>, <span class='object_link'><a href="PageFormatting.html#page_formatting_to_rtf-instance_method" title="RRTF::PageFormatting#page_formatting_to_rtf (method)">#page_formatting_to_rtf</a></span>, <span class='object_link'><a href="PageFormatting.html#set_page_formatting_from_hashmap-instance_method" title="RRTF::PageFormatting#set_page_formatting_from_hashmap (method)">#set_page_formatting_from_hashmap</a></span></p>
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="SectionFormatting.html" title="RRTF::SectionFormatting (module)">SectionFormatting</a></span></h3>
|
281
|
+
<p class="inherited"><span class='object_link'><a href="SectionFormatting.html#included-class_method" title="RRTF::SectionFormatting.included (method)">included</a></span>, <span class='object_link'><a href="SectionFormatting.html#initialize_section_formatting-instance_method" title="RRTF::SectionFormatting#initialize_section_formatting (method)">#initialize_section_formatting</a></span>, <span class='object_link'><a href="SectionFormatting.html#section_formatting_to_rtf-instance_method" title="RRTF::SectionFormatting#section_formatting_to_rtf (method)">#section_formatting_to_rtf</a></span>, <span class='object_link'><a href="SectionFormatting.html#set_section_formatting_from_hashmap-instance_method" title="RRTF::SectionFormatting#set_section_formatting_from_hashmap (method)">#set_section_formatting_from_hashmap</a></span></p>
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="AnonymousStyle.html" title="RRTF::AnonymousStyle (class)">AnonymousStyle</a></span></h3>
|
298
|
+
<p class="inherited"><span class='object_link'><a href="AnonymousStyle.html#push_colours-instance_method" title="RRTF::AnonymousStyle#push_colours (method)">#push_colours</a></span>, <span class='object_link'><a href="AnonymousStyle.html#push_fonts-instance_method" title="RRTF::AnonymousStyle#push_fonts (method)">#push_fonts</a></span>, <span class='object_link'><a href="AnonymousStyle.html#suffix-instance_method" title="RRTF::AnonymousStyle#suffix (method)">#suffix</a></span></p>
|
299
|
+
<div id="constructor_details" class="method_details_list">
|
300
|
+
<h2>Constructor Details</h2>
|
301
|
+
|
302
|
+
<div class="method_details first">
|
303
|
+
<h3 class="signature first" id="initialize-instance_method">
|
304
|
+
|
305
|
+
#<strong>initialize</strong>(options = {}) ⇒ <tt><span class='object_link'><a href="" title="RRTF::SectionStyle (class)">SectionStyle</a></span></tt>
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
</h3><div class="docstring">
|
312
|
+
<div class="discussion">
|
313
|
+
|
314
|
+
<p>This is the constructor for the SectionStyle class.</p>
|
315
|
+
|
316
|
+
|
317
|
+
</div>
|
318
|
+
</div>
|
319
|
+
<div class="tags">
|
320
|
+
<p class="tag_title">Parameters:</p>
|
321
|
+
<ul class="param">
|
322
|
+
|
323
|
+
<li>
|
324
|
+
|
325
|
+
<span class='name'>options</span>
|
326
|
+
|
327
|
+
|
328
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
329
|
+
|
330
|
+
|
331
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
332
|
+
|
333
|
+
|
334
|
+
—
|
335
|
+
<div class='inline'>
|
336
|
+
<p>the section style options.</p>
|
337
|
+
</div>
|
338
|
+
|
339
|
+
</li>
|
340
|
+
|
341
|
+
</ul>
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
347
|
+
<ul class="option">
|
348
|
+
|
349
|
+
<li>
|
350
|
+
<span class="name">"name"</span>
|
351
|
+
<span class="type">(<tt>String</tt>)</span>
|
352
|
+
<span class="default">
|
353
|
+
|
354
|
+
— default:
|
355
|
+
<tt>nil</tt>
|
356
|
+
|
357
|
+
</span>
|
358
|
+
|
359
|
+
— <div class='inline'>
|
360
|
+
<p>human-readable name for the style.</p>
|
361
|
+
</div>
|
362
|
+
|
363
|
+
</li>
|
364
|
+
|
365
|
+
<li>
|
366
|
+
<span class="name">"handle"</span>
|
367
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
368
|
+
<span class="default">
|
369
|
+
|
370
|
+
— default:
|
371
|
+
<tt>nil</tt>
|
372
|
+
|
373
|
+
</span>
|
374
|
+
|
375
|
+
— <div class='inline'>
|
376
|
+
<p>16-bit integer that identifies the style in a document.</p>
|
377
|
+
</div>
|
378
|
+
|
379
|
+
</li>
|
380
|
+
|
381
|
+
<li>
|
382
|
+
<span class="name">"next_style_handle"</span>
|
383
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
384
|
+
<span class="default">
|
385
|
+
|
386
|
+
— default:
|
387
|
+
<tt>nil</tt>
|
388
|
+
|
389
|
+
</span>
|
390
|
+
|
391
|
+
— <div class='inline'>
|
392
|
+
<p>16-bit integer that identifies the next style for this style.</p>
|
393
|
+
</div>
|
394
|
+
|
395
|
+
</li>
|
396
|
+
|
397
|
+
<li>
|
398
|
+
<span class="name">"based_on_style_handle"</span>
|
399
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
400
|
+
<span class="default">
|
401
|
+
|
402
|
+
— default:
|
403
|
+
<tt>nil</tt>
|
404
|
+
|
405
|
+
</span>
|
406
|
+
|
407
|
+
— <div class='inline'>
|
408
|
+
<p>16-bit integer that identifies the base style for this style.</p>
|
409
|
+
</div>
|
410
|
+
|
411
|
+
</li>
|
412
|
+
|
413
|
+
<li>
|
414
|
+
<span class="name">"priority"</span>
|
415
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
416
|
+
<span class="default">
|
417
|
+
|
418
|
+
— default:
|
419
|
+
<tt>nil</tt>
|
420
|
+
|
421
|
+
</span>
|
422
|
+
|
423
|
+
— <div class='inline'>
|
424
|
+
<p>16-bit integer that indicates the ordering of the style among other styles
|
425
|
+
in a document.</p>
|
426
|
+
</div>
|
427
|
+
|
428
|
+
</li>
|
429
|
+
|
430
|
+
<li>
|
431
|
+
<span class="name">"primary"</span>
|
432
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
433
|
+
<span class="default">
|
434
|
+
|
435
|
+
— default:
|
436
|
+
<tt>false</tt>
|
437
|
+
|
438
|
+
</span>
|
439
|
+
|
440
|
+
— <div class='inline'>
|
441
|
+
<p>whether or not this style is a primary or “quick” style.</p>
|
442
|
+
</div>
|
443
|
+
|
444
|
+
</li>
|
445
|
+
|
446
|
+
<li>
|
447
|
+
<span class="name">"additive"</span>
|
448
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
449
|
+
<span class="default">
|
450
|
+
|
451
|
+
— default:
|
452
|
+
<tt>false</tt>
|
453
|
+
|
454
|
+
</span>
|
455
|
+
|
456
|
+
— <div class='inline'>
|
457
|
+
<p>whether or not this character style is additive to the current paragraph
|
458
|
+
style.</p>
|
459
|
+
</div>
|
460
|
+
|
461
|
+
</li>
|
462
|
+
|
463
|
+
<li>
|
464
|
+
<span class="name">"auto_update"</span>
|
465
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
466
|
+
<span class="default">
|
467
|
+
|
468
|
+
— default:
|
469
|
+
<tt>false</tt>
|
470
|
+
|
471
|
+
</span>
|
472
|
+
|
473
|
+
— <div class='inline'>
|
474
|
+
<p>whether or not this style should be updated when any node to which the
|
475
|
+
style is applied is updated.</p>
|
476
|
+
</div>
|
477
|
+
|
478
|
+
</li>
|
479
|
+
|
480
|
+
<li>
|
481
|
+
<span class="name">"hidden"</span>
|
482
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
483
|
+
<span class="default">
|
484
|
+
|
485
|
+
— default:
|
486
|
+
<tt>false</tt>
|
487
|
+
|
488
|
+
</span>
|
489
|
+
|
490
|
+
— <div class='inline'>
|
491
|
+
<p>whether or not the style should be hidden.</p>
|
492
|
+
</div>
|
493
|
+
|
494
|
+
</li>
|
495
|
+
|
496
|
+
<li>
|
497
|
+
<span class="name">"columns"</span>
|
498
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
499
|
+
<span class="default">
|
500
|
+
|
501
|
+
— default:
|
502
|
+
<tt>nil</tt>
|
503
|
+
|
504
|
+
</span>
|
505
|
+
|
506
|
+
— <div class='inline'>
|
507
|
+
<p>the number of columns in the section.</p>
|
508
|
+
</div>
|
509
|
+
|
510
|
+
</li>
|
511
|
+
|
512
|
+
<li>
|
513
|
+
<span class="name">"column_spacing"</span>
|
514
|
+
<span class="type">(<tt>String</tt>, <tt>Integer</tt>)</span>
|
515
|
+
<span class="default">
|
516
|
+
|
517
|
+
— default:
|
518
|
+
<tt>nil</tt>
|
519
|
+
|
520
|
+
</span>
|
521
|
+
|
522
|
+
— <div class='inline'>
|
523
|
+
<p>the column spacing in twips (can also be a string, see
|
524
|
+
<span class='object_link'><a href="Utilities.html#value2twips-class_method" title="RRTF::Utilities.value2twips (method)">Utilities.value2twips</a></span>).</p>
|
525
|
+
</div>
|
526
|
+
|
527
|
+
</li>
|
528
|
+
|
529
|
+
<li>
|
530
|
+
<span class="name">"mirror_margins"</span>
|
531
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
532
|
+
<span class="default">
|
533
|
+
|
534
|
+
— default:
|
535
|
+
<tt>nil</tt>
|
536
|
+
|
537
|
+
</span>
|
538
|
+
|
539
|
+
— <div class='inline'>
|
540
|
+
<p>whether or not to enable mirrored margins (when facing pages is enabled) in
|
541
|
+
the document.</p>
|
542
|
+
</div>
|
543
|
+
|
544
|
+
</li>
|
545
|
+
|
546
|
+
<li>
|
547
|
+
<span class="name">"orientation"</span>
|
548
|
+
<span class="type">(<tt>String</tt>)</span>
|
549
|
+
<span class="default">
|
550
|
+
|
551
|
+
— default:
|
552
|
+
<tt>"PORTRAIT"</tt>
|
553
|
+
|
554
|
+
</span>
|
555
|
+
|
556
|
+
— <div class='inline'>
|
557
|
+
<p>the orientation of the paper (“PORTRAIT” or “LANDSCAPE”).</p>
|
558
|
+
</div>
|
559
|
+
|
560
|
+
</li>
|
561
|
+
|
562
|
+
<li>
|
563
|
+
<span class="name">"size"</span>
|
564
|
+
<span class="type">(<tt>String</tt>, <tt><span class='object_link'><a href="Page/Size.html" title="RRTF::Page::Size (class)">Page::Size</a></span></tt>)</span>
|
565
|
+
<span class="default">
|
566
|
+
|
567
|
+
— default:
|
568
|
+
<tt>Page::Size.new</tt>
|
569
|
+
|
570
|
+
</span>
|
571
|
+
|
572
|
+
— <div class='inline'>
|
573
|
+
<p>the size of the paper (object or string; see <span class='object_link'><a href="Page/Size.html#initialize-instance_method" title="RRTF::Page::Size#initialize (method)">Page::Size#initialize</a></span>).</p>
|
574
|
+
</div>
|
575
|
+
|
576
|
+
</li>
|
577
|
+
|
578
|
+
<li>
|
579
|
+
<span class="name">"margin"</span>
|
580
|
+
<span class="type">(<tt>String</tt>, <tt><span class='object_link'><a href="Page/Margin.html" title="RRTF::Page::Margin (class)">Page::Margin</a></span></tt>)</span>
|
581
|
+
<span class="default">
|
582
|
+
|
583
|
+
— default:
|
584
|
+
<tt>Page::Margin.new</tt>
|
585
|
+
|
586
|
+
</span>
|
587
|
+
|
588
|
+
— <div class='inline'>
|
589
|
+
<p>the paper margin (object or string; see <span class='object_link'><a href="Page/Margin.html#initialize-instance_method" title="RRTF::Page::Margin#initialize (method)">Page::Margin#initialize</a></span>).</p>
|
590
|
+
</div>
|
591
|
+
|
592
|
+
</li>
|
593
|
+
|
594
|
+
<li>
|
595
|
+
<span class="name">"gutter"</span>
|
596
|
+
<span class="type">(<tt>String</tt>)</span>
|
597
|
+
<span class="default">
|
598
|
+
|
599
|
+
— default:
|
600
|
+
<tt>nil</tt>
|
601
|
+
|
602
|
+
</span>
|
603
|
+
|
604
|
+
— <div class='inline'>
|
605
|
+
<p>the page gutter width (specify a string, see <span class='object_link'><a href="Utilities.html#value2twips-class_method" title="RRTF::Utilities.value2twips (method)">Utilities.value2twips</a></span>).</p>
|
606
|
+
</div>
|
607
|
+
|
608
|
+
</li>
|
609
|
+
|
610
|
+
</ul>
|
611
|
+
|
612
|
+
|
613
|
+
|
614
|
+
</div><table class="source_code">
|
615
|
+
<tr>
|
616
|
+
<td>
|
617
|
+
<pre class="lines">
|
618
|
+
|
619
|
+
|
620
|
+
15
|
621
|
+
16
|
622
|
+
17
|
623
|
+
18
|
624
|
+
19</pre>
|
625
|
+
</td>
|
626
|
+
<td>
|
627
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/style/section_style.rb', line 15</span>
|
628
|
+
|
629
|
+
<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>
|
630
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
631
|
+
<span class='id identifier rubyid_initialize_section_formatting'>initialize_section_formatting</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
632
|
+
<span class='id identifier rubyid_initialize_page_formatting'>initialize_page_formatting</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
633
|
+
<span class='kw'>end</span></pre>
|
634
|
+
</td>
|
635
|
+
</tr>
|
636
|
+
</table>
|
637
|
+
</div>
|
638
|
+
|
639
|
+
</div>
|
640
|
+
|
641
|
+
|
642
|
+
<div id="instance_method_details" class="method_details_list">
|
643
|
+
<h2>Instance Method Details</h2>
|
644
|
+
|
645
|
+
|
646
|
+
<div class="method_details first">
|
647
|
+
<h3 class="signature first" id="prefix-instance_method">
|
648
|
+
|
649
|
+
#<strong>prefix</strong>(document) ⇒ <tt>Object</tt>
|
650
|
+
|
651
|
+
|
652
|
+
|
653
|
+
|
654
|
+
|
655
|
+
</h3><div class="docstring">
|
656
|
+
<div class="discussion">
|
657
|
+
|
658
|
+
<p>This method generates a string containing the prefix associated with the
|
659
|
+
style object.</p>
|
660
|
+
|
661
|
+
|
662
|
+
</div>
|
663
|
+
</div>
|
664
|
+
<div class="tags">
|
665
|
+
|
666
|
+
|
667
|
+
</div><table class="source_code">
|
668
|
+
<tr>
|
669
|
+
<td>
|
670
|
+
<pre class="lines">
|
671
|
+
|
672
|
+
|
673
|
+
53
|
674
|
+
54
|
675
|
+
55
|
676
|
+
56
|
677
|
+
57
|
678
|
+
58
|
679
|
+
59
|
680
|
+
60</pre>
|
681
|
+
</td>
|
682
|
+
<td>
|
683
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/style/section_style.rb', line 53</span>
|
684
|
+
|
685
|
+
<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>
|
686
|
+
<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>
|
687
|
+
|
688
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\ds</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>
|
689
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='id identifier rubyid_rtf_formatting'>rtf_formatting</span>
|
690
|
+
|
691
|
+
<span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span>
|
692
|
+
<span class='kw'>end</span></pre>
|
693
|
+
</td>
|
694
|
+
</tr>
|
695
|
+
</table>
|
696
|
+
</div>
|
697
|
+
|
698
|
+
<div class="method_details ">
|
699
|
+
<h3 class="signature " id="rtf_formatting-instance_method">
|
700
|
+
|
701
|
+
#<strong>rtf_formatting</strong> ⇒ <tt>Object</tt>
|
702
|
+
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
</h3><table class="source_code">
|
708
|
+
<tr>
|
709
|
+
<td>
|
710
|
+
<pre class="lines">
|
711
|
+
|
712
|
+
|
713
|
+
62
|
714
|
+
63
|
715
|
+
64</pre>
|
716
|
+
</td>
|
717
|
+
<td>
|
718
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/style/section_style.rb', line 62</span>
|
719
|
+
|
720
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_rtf_formatting'>rtf_formatting</span>
|
721
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_section_formatting_to_rtf'>section_formatting_to_rtf</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_page_formatting_to_rtf'>page_formatting_to_rtf</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
722
|
+
<span class='kw'>end</span></pre>
|
723
|
+
</td>
|
724
|
+
</tr>
|
725
|
+
</table>
|
726
|
+
</div>
|
727
|
+
|
728
|
+
<div class="method_details ">
|
729
|
+
<h3 class="signature " id="to_rtf-instance_method">
|
730
|
+
|
731
|
+
#<strong>to_rtf</strong>(document, options = {}) ⇒ <tt>Object</tt>
|
732
|
+
|
733
|
+
|
734
|
+
|
735
|
+
|
736
|
+
|
737
|
+
</h3><div class="docstring">
|
738
|
+
<div class="discussion">
|
739
|
+
|
740
|
+
<p>Converts the stylesheet character style into its RTF representation (for
|
741
|
+
stylesheet)</p>
|
742
|
+
|
743
|
+
|
744
|
+
</div>
|
745
|
+
</div>
|
746
|
+
<div class="tags">
|
747
|
+
|
748
|
+
|
749
|
+
</div><table class="source_code">
|
750
|
+
<tr>
|
751
|
+
<td>
|
752
|
+
<pre class="lines">
|
753
|
+
|
754
|
+
|
755
|
+
23
|
756
|
+
24
|
757
|
+
25
|
758
|
+
26
|
759
|
+
27
|
760
|
+
28
|
761
|
+
29
|
762
|
+
30
|
763
|
+
31
|
764
|
+
32
|
765
|
+
33
|
766
|
+
34
|
767
|
+
35
|
768
|
+
36
|
769
|
+
37
|
770
|
+
38
|
771
|
+
39
|
772
|
+
40
|
773
|
+
41
|
774
|
+
42
|
775
|
+
43
|
776
|
+
44
|
777
|
+
45
|
778
|
+
46
|
779
|
+
47
|
780
|
+
48
|
781
|
+
49</pre>
|
782
|
+
</td>
|
783
|
+
<td>
|
784
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/style/section_style.rb', line 23</span>
|
785
|
+
|
786
|
+
<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>
|
787
|
+
<span class='comment'># load default options
|
788
|
+
</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
789
|
+
<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>
|
790
|
+
<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>
|
791
|
+
<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>
|
792
|
+
<span class='comment'># build formatting helpers
|
793
|
+
</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>
|
794
|
+
<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>
|
795
|
+
<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>
|
796
|
+
|
797
|
+
<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>
|
798
|
+
|
799
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='id identifier rubyid_base_prefix'>base_prefix</span>
|
800
|
+
<span class='id identifier rubyid_rtf'>rtf</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>{\\*\\ds</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>
|
801
|
+
<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>
|
802
|
+
<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>
|
803
|
+
<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>
|
804
|
+
<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>
|
805
|
+
<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>
|
806
|
+
<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>
|
807
|
+
<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>
|
808
|
+
<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>
|
809
|
+
<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>
|
810
|
+
|
811
|
+
<span class='id identifier rubyid_rtf'>rtf</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span>
|
812
|
+
<span class='kw'>end</span></pre>
|
813
|
+
</td>
|
814
|
+
</tr>
|
815
|
+
</table>
|
816
|
+
</div>
|
817
|
+
|
818
|
+
</div>
|
819
|
+
|
820
|
+
</div>
|
821
|
+
|
822
|
+
<div id="footer">
|
823
|
+
Generated on Wed Aug 2 23:05:18 2017 by
|
824
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
825
|
+
0.9.9 (ruby-2.3.3).
|
826
|
+
</div>
|
827
|
+
|
828
|
+
</div>
|
829
|
+
</body>
|
830
|
+
</html>
|