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,675 @@
|
|
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::TableRowNode
|
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::TableRowNode";
|
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 (T)</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">TableRowNode</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::TableRowNode
|
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="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</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">RRTF::TableRowNode</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
</dl>
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
<dl>
|
100
|
+
<dt>Defined in:</dt>
|
101
|
+
<dd>lib/rrtf/node.rb</dd>
|
102
|
+
</dl>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
<h2>Overview</h2><div class="docstring">
|
107
|
+
<div class="discussion">
|
108
|
+
|
109
|
+
<p>This class represents a row within an RTF table. The TableRowNode is a
|
110
|
+
specialised container node that can hold only TableCellNodes and, once
|
111
|
+
created, cannot be resized. Its also not possible to change the parent of a
|
112
|
+
TableRowNode object.</p>
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
<div class="tags">
|
118
|
+
|
119
|
+
|
120
|
+
</div>
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
<h2>Instance Attribute Summary</h2>
|
127
|
+
|
128
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</a></span></h3>
|
129
|
+
<p class="inherited"><span class='object_link'><a href="ContainerNode.html#children-instance_method" title="RRTF::ContainerNode#children (method)">#children</a></span></p>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Node.html" title="RRTF::Node (class)">Node</a></span></h3>
|
134
|
+
<p class="inherited"><span class='object_link'><a href="Node.html#parent-instance_method" title="RRTF::Node#parent (method)">#parent</a></span></p>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
<h2>
|
139
|
+
Instance Method Summary
|
140
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
141
|
+
</h2>
|
142
|
+
|
143
|
+
<ul class="summary">
|
144
|
+
|
145
|
+
<li class="public ">
|
146
|
+
<span class="summary_signature">
|
147
|
+
|
148
|
+
<a href="#border_width=-instance_method" title="#border_width= (instance method)">#<strong>border_width=</strong>(width) ⇒ Object </a>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
</span>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
<span class="summary_desc"><div class='inline'>
|
163
|
+
<p>This method assigns a border width setting to all of the sides on all of
|
164
|
+
the cells within a table row.</p>
|
165
|
+
</div></span>
|
166
|
+
|
167
|
+
</li>
|
168
|
+
|
169
|
+
|
170
|
+
<li class="public ">
|
171
|
+
<span class="summary_signature">
|
172
|
+
|
173
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(table, cells, *widths) ⇒ TableRowNode </a>
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
</span>
|
178
|
+
|
179
|
+
|
180
|
+
<span class="note title constructor">constructor</span>
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
<span class="summary_desc"><div class='inline'>
|
190
|
+
<p>This is the constructor for the TableRowNode class.</p>
|
191
|
+
</div></span>
|
192
|
+
|
193
|
+
</li>
|
194
|
+
|
195
|
+
|
196
|
+
<li class="public ">
|
197
|
+
<span class="summary_signature">
|
198
|
+
|
199
|
+
<a href="#length-instance_method" title="#length (instance method)">#<strong>length</strong> ⇒ Object </a>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
</span>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<span class="summary_desc"><div class='inline'>
|
214
|
+
<p>Attribute accessors.</p>
|
215
|
+
</div></span>
|
216
|
+
|
217
|
+
</li>
|
218
|
+
|
219
|
+
|
220
|
+
<li class="public ">
|
221
|
+
<span class="summary_signature">
|
222
|
+
|
223
|
+
<a href="#parent=-instance_method" title="#parent= (instance method)">#<strong>parent=</strong>(parent) ⇒ Object </a>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
</span>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
<span class="summary_desc"><div class='inline'>
|
238
|
+
<p>This method overloads the parent= method inherited from the Node class to
|
239
|
+
forbid the alteration of the cells parent.</p>
|
240
|
+
</div></span>
|
241
|
+
|
242
|
+
</li>
|
243
|
+
|
244
|
+
|
245
|
+
<li class="public ">
|
246
|
+
<span class="summary_signature">
|
247
|
+
|
248
|
+
<a href="#shading_colour=-instance_method" title="#shading_colour= (instance method)">#<strong>shading_colour=</strong>(colour) ⇒ Object </a>
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
</span>
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
<span class="summary_desc"><div class='inline'>
|
263
|
+
<p>This method sets the shading colour for a row.</p>
|
264
|
+
</div></span>
|
265
|
+
|
266
|
+
</li>
|
267
|
+
|
268
|
+
|
269
|
+
<li class="public ">
|
270
|
+
<span class="summary_signature">
|
271
|
+
|
272
|
+
<a href="#to_rtf-instance_method" title="#to_rtf (instance method)">#<strong>to_rtf</strong> ⇒ Object </a>
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
</span>
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
<span class="summary_desc"><div class='inline'>
|
287
|
+
<p>This method generates the RTF document text for a TableCellNode object.</p>
|
288
|
+
</div></span>
|
289
|
+
|
290
|
+
</li>
|
291
|
+
|
292
|
+
|
293
|
+
</ul>
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</a></span></h3>
|
306
|
+
<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#store-instance_method" title="RRTF::ContainerNode#store (method)">#store</a></span></p>
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Node.html" title="RRTF::Node (class)">Node</a></span></h3>
|
318
|
+
<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>
|
319
|
+
<div id="constructor_details" class="method_details_list">
|
320
|
+
<h2>Constructor Details</h2>
|
321
|
+
|
322
|
+
<div class="method_details first">
|
323
|
+
<h3 class="signature first" id="initialize-instance_method">
|
324
|
+
|
325
|
+
#<strong>initialize</strong>(table, cells, *widths) ⇒ <tt><span class='object_link'><a href="" title="RRTF::TableRowNode (class)">TableRowNode</a></span></tt>
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
</h3><div class="docstring">
|
332
|
+
<div class="discussion">
|
333
|
+
|
334
|
+
<p>This is the constructor for the TableRowNode class.</p>
|
335
|
+
|
336
|
+
<h5 id="label-Parameters">Parameters</h5>
|
337
|
+
<dl class="rdoc-list note-list"><dt>table
|
338
|
+
<dd>
|
339
|
+
<p>A reference to table that owns the row.</p>
|
340
|
+
</dd><dt>cells
|
341
|
+
<dd>
|
342
|
+
<p>The number of cells that the row will contain.</p>
|
343
|
+
</dd><dt>widths
|
344
|
+
<dd>
|
345
|
+
<p>One or more integers specifying the widths for the table columns</p>
|
346
|
+
</dd></dl>
|
347
|
+
|
348
|
+
|
349
|
+
</div>
|
350
|
+
</div>
|
351
|
+
<div class="tags">
|
352
|
+
|
353
|
+
|
354
|
+
</div><table class="source_code">
|
355
|
+
<tr>
|
356
|
+
<td>
|
357
|
+
<pre class="lines">
|
358
|
+
|
359
|
+
|
360
|
+
846
|
361
|
+
847
|
362
|
+
848
|
363
|
+
849
|
364
|
+
850
|
365
|
+
851
|
366
|
+
852
|
367
|
+
853
|
368
|
+
854</pre>
|
369
|
+
</td>
|
370
|
+
<td>
|
371
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 846</span>
|
372
|
+
|
373
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_table'>table</span><span class='comma'>,</span> <span class='id identifier rubyid_cells'>cells</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_widths'>widths</span><span class='rparen'>)</span>
|
374
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_table'>table</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
375
|
+
<span class='id identifier rubyid_entries'>entries</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
376
|
+
<span class='id identifier rubyid_cells'>cells</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_index'>index</span><span class='op'>|</span>
|
377
|
+
<span class='id identifier rubyid_entries'>entries</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="TableCellNode.html" title="RRTF::TableCellNode (class)">TableCellNode</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="TableCellNode.html#initialize-instance_method" title="RRTF::TableCellNode#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_widths'>widths</span><span class='lbracket'>[</span><span class='id identifier rubyid_index'>index</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
378
|
+
<span class='kw'>end</span>
|
379
|
+
<span class='id identifier rubyid_entries'>entries</span>
|
380
|
+
<span class='kw'>end</span>
|
381
|
+
<span class='kw'>end</span></pre>
|
382
|
+
</td>
|
383
|
+
</tr>
|
384
|
+
</table>
|
385
|
+
</div>
|
386
|
+
|
387
|
+
</div>
|
388
|
+
|
389
|
+
|
390
|
+
<div id="instance_method_details" class="method_details_list">
|
391
|
+
<h2>Instance Method Details</h2>
|
392
|
+
|
393
|
+
|
394
|
+
<div class="method_details first">
|
395
|
+
<h3 class="signature first" id="border_width=-instance_method">
|
396
|
+
|
397
|
+
#<strong>border_width=</strong>(width) ⇒ <tt>Object</tt>
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
</h3><div class="docstring">
|
404
|
+
<div class="discussion">
|
405
|
+
|
406
|
+
<p>This method assigns a border width setting to all of the sides on all of
|
407
|
+
the cells within a table row.</p>
|
408
|
+
|
409
|
+
<h4 id="label-Parameters">Parameters</h4>
|
410
|
+
<dl class="rdoc-list note-list"><dt>width
|
411
|
+
<dd>
|
412
|
+
<p>The border width setting to apply. Negative values are ignored and zero
|
413
|
+
switches the border off.</p>
|
414
|
+
</dd></dl>
|
415
|
+
|
416
|
+
|
417
|
+
</div>
|
418
|
+
</div>
|
419
|
+
<div class="tags">
|
420
|
+
|
421
|
+
|
422
|
+
</div><table class="source_code">
|
423
|
+
<tr>
|
424
|
+
<td>
|
425
|
+
<pre class="lines">
|
426
|
+
|
427
|
+
|
428
|
+
867
|
429
|
+
868
|
430
|
+
869</pre>
|
431
|
+
</td>
|
432
|
+
<td>
|
433
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 867</span>
|
434
|
+
|
435
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_border_width='>border_width=</span><span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span><span class='rparen'>)</span>
|
436
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_cell'>cell</span><span class='op'>|</span> <span class='id identifier rubyid_cell'>cell</span><span class='period'>.</span><span class='id identifier rubyid_border_width'>border_width</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span><span class='rbrace'>}</span>
|
437
|
+
<span class='kw'>end</span></pre>
|
438
|
+
</td>
|
439
|
+
</tr>
|
440
|
+
</table>
|
441
|
+
</div>
|
442
|
+
|
443
|
+
<div class="method_details ">
|
444
|
+
<h3 class="signature " id="length-instance_method">
|
445
|
+
|
446
|
+
#<strong>length</strong> ⇒ <tt>Object</tt>
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
</h3><div class="docstring">
|
453
|
+
<div class="discussion">
|
454
|
+
|
455
|
+
<p>Attribute accessors</p>
|
456
|
+
|
457
|
+
|
458
|
+
</div>
|
459
|
+
</div>
|
460
|
+
<div class="tags">
|
461
|
+
|
462
|
+
|
463
|
+
</div><table class="source_code">
|
464
|
+
<tr>
|
465
|
+
<td>
|
466
|
+
<pre class="lines">
|
467
|
+
|
468
|
+
|
469
|
+
857
|
470
|
+
858
|
471
|
+
859</pre>
|
472
|
+
</td>
|
473
|
+
<td>
|
474
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 857</span>
|
475
|
+
|
476
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_length'>length</span>
|
477
|
+
<span class='id identifier rubyid_entries'>entries</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span>
|
478
|
+
<span class='kw'>end</span></pre>
|
479
|
+
</td>
|
480
|
+
</tr>
|
481
|
+
</table>
|
482
|
+
</div>
|
483
|
+
|
484
|
+
<div class="method_details ">
|
485
|
+
<h3 class="signature " id="parent=-instance_method">
|
486
|
+
|
487
|
+
#<strong>parent=</strong>(parent) ⇒ <tt>Object</tt>
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
</h3><div class="docstring">
|
494
|
+
<div class="discussion">
|
495
|
+
|
496
|
+
<p>This method overloads the parent= method inherited from the Node class to
|
497
|
+
forbid the alteration of the cells parent.</p>
|
498
|
+
|
499
|
+
<h4 id="label-Parameters">Parameters</h4>
|
500
|
+
<dl class="rdoc-list note-list"><dt>parent
|
501
|
+
<dd>
|
502
|
+
<p>A reference to the new node parent.</p>
|
503
|
+
</dd></dl>
|
504
|
+
|
505
|
+
|
506
|
+
</div>
|
507
|
+
</div>
|
508
|
+
<div class="tags">
|
509
|
+
|
510
|
+
|
511
|
+
</div><table class="source_code">
|
512
|
+
<tr>
|
513
|
+
<td>
|
514
|
+
<pre class="lines">
|
515
|
+
|
516
|
+
|
517
|
+
876
|
518
|
+
877
|
519
|
+
878</pre>
|
520
|
+
</td>
|
521
|
+
<td>
|
522
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 876</span>
|
523
|
+
|
524
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_parent='>parent=</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span><span class='rparen'>)</span>
|
525
|
+
<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'>Table row nodes cannot have their parent changed.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
526
|
+
<span class='kw'>end</span></pre>
|
527
|
+
</td>
|
528
|
+
</tr>
|
529
|
+
</table>
|
530
|
+
</div>
|
531
|
+
|
532
|
+
<div class="method_details ">
|
533
|
+
<h3 class="signature " id="shading_colour=-instance_method">
|
534
|
+
|
535
|
+
#<strong>shading_colour=</strong>(colour) ⇒ <tt>Object</tt>
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
</h3><div class="docstring">
|
542
|
+
<div class="discussion">
|
543
|
+
|
544
|
+
<p>This method sets the shading colour for a row.</p>
|
545
|
+
|
546
|
+
<h4 id="label-Parameters">Parameters</h4>
|
547
|
+
<dl class="rdoc-list note-list"><dt>colour
|
548
|
+
<dd>
|
549
|
+
<p>A reference to the Colour object that represents the new shading colour.
|
550
|
+
Set to nil to switch shading off.</p>
|
551
|
+
</dd></dl>
|
552
|
+
|
553
|
+
|
554
|
+
</div>
|
555
|
+
</div>
|
556
|
+
<div class="tags">
|
557
|
+
|
558
|
+
|
559
|
+
</div><table class="source_code">
|
560
|
+
<tr>
|
561
|
+
<td>
|
562
|
+
<pre class="lines">
|
563
|
+
|
564
|
+
|
565
|
+
885
|
566
|
+
886
|
567
|
+
887</pre>
|
568
|
+
</td>
|
569
|
+
<td>
|
570
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 885</span>
|
571
|
+
|
572
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_shading_colour='>shading_colour=</span><span class='lparen'>(</span><span class='id identifier rubyid_colour'>colour</span><span class='rparen'>)</span>
|
573
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_cell'>cell</span><span class='op'>|</span> <span class='id identifier rubyid_cell'>cell</span><span class='period'>.</span><span class='id identifier rubyid_shading_colour'>shading_colour</span> <span class='op'>=</span> <span class='id identifier rubyid_colour'>colour</span><span class='rbrace'>}</span>
|
574
|
+
<span class='kw'>end</span></pre>
|
575
|
+
</td>
|
576
|
+
</tr>
|
577
|
+
</table>
|
578
|
+
</div>
|
579
|
+
|
580
|
+
<div class="method_details ">
|
581
|
+
<h3 class="signature " id="to_rtf-instance_method">
|
582
|
+
|
583
|
+
#<strong>to_rtf</strong> ⇒ <tt>Object</tt>
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
|
588
|
+
|
589
|
+
</h3><div class="docstring">
|
590
|
+
<div class="discussion">
|
591
|
+
|
592
|
+
<p>This method generates the RTF document text for a TableCellNode object.</p>
|
593
|
+
|
594
|
+
|
595
|
+
</div>
|
596
|
+
</div>
|
597
|
+
<div class="tags">
|
598
|
+
|
599
|
+
|
600
|
+
</div><table class="source_code">
|
601
|
+
<tr>
|
602
|
+
<td>
|
603
|
+
<pre class="lines">
|
604
|
+
|
605
|
+
|
606
|
+
899
|
607
|
+
900
|
608
|
+
901
|
609
|
+
902
|
610
|
+
903
|
611
|
+
904
|
612
|
+
905
|
613
|
+
906
|
614
|
+
907
|
615
|
+
908
|
616
|
+
909
|
617
|
+
910
|
618
|
+
911
|
619
|
+
912
|
620
|
+
913
|
621
|
+
914
|
622
|
+
915
|
623
|
+
916
|
624
|
+
917
|
625
|
+
918
|
626
|
+
919
|
627
|
+
920
|
628
|
+
921
|
629
|
+
922</pre>
|
630
|
+
</td>
|
631
|
+
<td>
|
632
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 899</span>
|
633
|
+
|
634
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_rtf'>to_rtf</span>
|
635
|
+
<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>
|
636
|
+
<span class='id identifier rubyid_temp'>temp</span> <span class='op'>=</span> <span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
637
|
+
<span class='id identifier rubyid_offset'>offset</span> <span class='op'>=</span> <span class='int'>0</span>
|
638
|
+
|
639
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\trowd\\tgraph</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_parent'>parent</span><span class='period'>.</span><span class='id identifier rubyid_cell_margin'>cell_margin</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
640
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_entry'>entry</span><span class='op'>|</span>
|
641
|
+
<span class='id identifier rubyid_widths'>widths</span> <span class='op'>=</span> <span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_border_widths'>border_widths</span>
|
642
|
+
<span class='id identifier rubyid_colour'>colour</span> <span class='op'>=</span> <span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_shading_colour'>shading_colour</span>
|
643
|
+
|
644
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
645
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\clbrdrt\\brdrw</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_widths'>widths</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>\\brdrs</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_widths'>widths</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='int'>0</span>
|
646
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\clbrdrl\\brdrw</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_widths'>widths</span><span class='lbracket'>[</span><span class='int'>3</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>\\brdrs</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_widths'>widths</span><span class='lbracket'>[</span><span class='int'>3</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='int'>0</span>
|
647
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\clbrdrb\\brdrw</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_widths'>widths</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>\\brdrs</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_widths'>widths</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='int'>0</span>
|
648
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\clbrdrr\\brdrw</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_widths'>widths</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>\\brdrs</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_widths'>widths</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='int'>0</span>
|
649
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\clcbpat</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_root'><span class='object_link'><a href="../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='period'>.</span><span class='id identifier rubyid_colours'>colours</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='lparen'>(</span><span class='id identifier rubyid_colour'>colour</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_colour'>colour</span> <span class='op'>!=</span> <span class='kw'>nil</span>
|
650
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\cellx</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_width'>width</span> <span class='op'>+</span> <span class='id identifier rubyid_offset'>offset</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
651
|
+
<span class='id identifier rubyid_temp'>temp</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_to_rtf'>to_rtf</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
652
|
+
<span class='id identifier rubyid_offset'>offset</span> <span class='op'>+=</span> <span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_width'>width</span>
|
653
|
+
<span class='kw'>end</span>
|
654
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_temp'>temp</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n\\row</span><span class='tstring_end'>"</span></span>
|
655
|
+
|
656
|
+
<span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span>
|
657
|
+
<span class='kw'>end</span></pre>
|
658
|
+
</td>
|
659
|
+
</tr>
|
660
|
+
</table>
|
661
|
+
</div>
|
662
|
+
|
663
|
+
</div>
|
664
|
+
|
665
|
+
</div>
|
666
|
+
|
667
|
+
<div id="footer">
|
668
|
+
Generated on Mon Jul 24 15:49:00 2017 by
|
669
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
670
|
+
0.9.9 (ruby-2.3.3).
|
671
|
+
</div>
|
672
|
+
|
673
|
+
</div>
|
674
|
+
</body>
|
675
|
+
</html>
|