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,1704 @@
|
|
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::TableCellNode
|
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::TableCellNode";
|
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">TableCellNode</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::TableCellNode
|
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::TableCellNode</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.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 cell within an RTF table. The TableCellNode is a
|
112
|
+
specialised command node that is forbidden from creating tables or having
|
113
|
+
its parent changed.</p>
|
114
|
+
|
115
|
+
|
116
|
+
</div>
|
117
|
+
</div>
|
118
|
+
<div class="tags">
|
119
|
+
|
120
|
+
|
121
|
+
</div>
|
122
|
+
<h2>Constant Summary</h2>
|
123
|
+
<dl class="constants">
|
124
|
+
|
125
|
+
<dt id="DEFAULT_WIDTH-constant" class="">DEFAULT_WIDTH =
|
126
|
+
<div class="docstring">
|
127
|
+
<div class="discussion">
|
128
|
+
|
129
|
+
<p>A definition for the default width for the cell.</p>
|
130
|
+
|
131
|
+
|
132
|
+
</div>
|
133
|
+
</div>
|
134
|
+
<div class="tags">
|
135
|
+
|
136
|
+
|
137
|
+
</div>
|
138
|
+
</dt>
|
139
|
+
<dd><pre class="code"><span class='int'>300</span></pre></dd>
|
140
|
+
|
141
|
+
<dt id="TOP-constant" class="">TOP =
|
142
|
+
<div class="docstring">
|
143
|
+
<div class="discussion">
|
144
|
+
|
145
|
+
<p>Top border</p>
|
146
|
+
|
147
|
+
|
148
|
+
</div>
|
149
|
+
</div>
|
150
|
+
<div class="tags">
|
151
|
+
|
152
|
+
|
153
|
+
</div>
|
154
|
+
</dt>
|
155
|
+
<dd><pre class="code"><span class='int'>0</span></pre></dd>
|
156
|
+
|
157
|
+
<dt id="RIGHT-constant" class="">RIGHT =
|
158
|
+
<div class="docstring">
|
159
|
+
<div class="discussion">
|
160
|
+
|
161
|
+
<p>Right border</p>
|
162
|
+
|
163
|
+
|
164
|
+
</div>
|
165
|
+
</div>
|
166
|
+
<div class="tags">
|
167
|
+
|
168
|
+
|
169
|
+
</div>
|
170
|
+
</dt>
|
171
|
+
<dd><pre class="code"><span class='int'>1</span></pre></dd>
|
172
|
+
|
173
|
+
<dt id="BOTTOM-constant" class="">BOTTOM =
|
174
|
+
<div class="docstring">
|
175
|
+
<div class="discussion">
|
176
|
+
|
177
|
+
<p>Bottom border</p>
|
178
|
+
|
179
|
+
|
180
|
+
</div>
|
181
|
+
</div>
|
182
|
+
<div class="tags">
|
183
|
+
|
184
|
+
|
185
|
+
</div>
|
186
|
+
</dt>
|
187
|
+
<dd><pre class="code"><span class='int'>2</span></pre></dd>
|
188
|
+
|
189
|
+
<dt id="LEFT-constant" class="">LEFT =
|
190
|
+
<div class="docstring">
|
191
|
+
<div class="discussion">
|
192
|
+
|
193
|
+
<p>Left border</p>
|
194
|
+
|
195
|
+
|
196
|
+
</div>
|
197
|
+
</div>
|
198
|
+
<div class="tags">
|
199
|
+
|
200
|
+
|
201
|
+
</div>
|
202
|
+
</dt>
|
203
|
+
<dd><pre class="code"><span class='int'>3</span></pre></dd>
|
204
|
+
|
205
|
+
</dl>
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
211
|
+
<ul class="summary">
|
212
|
+
|
213
|
+
<li class="public ">
|
214
|
+
<span class="summary_signature">
|
215
|
+
|
216
|
+
<a href="#shading_colour-instance_method" title="#shading_colour (instance method)">#<strong>shading_colour</strong> ⇒ Object </a>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
</span>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
<span class="summary_desc"><div class='inline'>
|
234
|
+
<p>Attribute accessor.</p>
|
235
|
+
</div></span>
|
236
|
+
|
237
|
+
</li>
|
238
|
+
|
239
|
+
|
240
|
+
<li class="public ">
|
241
|
+
<span class="summary_signature">
|
242
|
+
|
243
|
+
<a href="#style-instance_method" title="#style (instance method)">#<strong>style</strong> ⇒ Object </a>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
</span>
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
<span class="summary_desc"><div class='inline'>
|
261
|
+
<p>Attribute accessor.</p>
|
262
|
+
</div></span>
|
263
|
+
|
264
|
+
</li>
|
265
|
+
|
266
|
+
|
267
|
+
<li class="public ">
|
268
|
+
<span class="summary_signature">
|
269
|
+
|
270
|
+
<a href="#width-instance_method" title="#width (instance method)">#<strong>width</strong> ⇒ Object </a>
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
</span>
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
<span class="summary_desc"><div class='inline'>
|
288
|
+
<p>Width of cell.</p>
|
289
|
+
</div></span>
|
290
|
+
|
291
|
+
</li>
|
292
|
+
|
293
|
+
|
294
|
+
</ul>
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="CommandNode.html" title="RRTF::CommandNode (class)">CommandNode</a></span></h3>
|
301
|
+
<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>
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
<h3 class="inherited">Attributes 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#children-instance_method" title="RRTF::ContainerNode#children (method)">#children</a></span></p>
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Node.html" title="RRTF::Node (class)">Node</a></span></h3>
|
311
|
+
<p class="inherited"><span class='object_link'><a href="Node.html#parent-instance_method" title="RRTF::Node#parent (method)">#parent</a></span></p>
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
<h2>
|
316
|
+
Instance Method Summary
|
317
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
318
|
+
</h2>
|
319
|
+
|
320
|
+
<ul class="summary">
|
321
|
+
|
322
|
+
<li class="public ">
|
323
|
+
<span class="summary_signature">
|
324
|
+
|
325
|
+
<a href="#border_width=-instance_method" title="#border_width= (instance method)">#<strong>border_width=</strong>(width) ⇒ Object </a>
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
</span>
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
<span class="summary_desc"><div class='inline'>
|
340
|
+
<p>This method assigns a width, in twips, for the borders on all sides of the
|
341
|
+
cell.</p>
|
342
|
+
</div></span>
|
343
|
+
|
344
|
+
</li>
|
345
|
+
|
346
|
+
|
347
|
+
<li class="public ">
|
348
|
+
<span class="summary_signature">
|
349
|
+
|
350
|
+
<a href="#border_widths-instance_method" title="#border_widths (instance method)">#<strong>border_widths</strong> ⇒ Object </a>
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
</span>
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
<span class="summary_desc"><div class='inline'>
|
365
|
+
<p>This method retrieves an array with the cell border width settings.</p>
|
366
|
+
</div></span>
|
367
|
+
|
368
|
+
</li>
|
369
|
+
|
370
|
+
|
371
|
+
<li class="public ">
|
372
|
+
<span class="summary_signature">
|
373
|
+
|
374
|
+
<a href="#bottom_border_width-instance_method" title="#bottom_border_width (instance method)">#<strong>bottom_border_width</strong> ⇒ Object </a>
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
</span>
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
<span class="summary_desc"><div class='inline'>
|
389
|
+
<p>This method fetches the width for bottom border of a cell.</p>
|
390
|
+
</div></span>
|
391
|
+
|
392
|
+
</li>
|
393
|
+
|
394
|
+
|
395
|
+
<li class="public ">
|
396
|
+
<span class="summary_signature">
|
397
|
+
|
398
|
+
<a href="#bottom_border_width=-instance_method" title="#bottom_border_width= (instance method)">#<strong>bottom_border_width=</strong>(width) ⇒ Object </a>
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
</span>
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
<span class="summary_desc"><div class='inline'>
|
413
|
+
<p>This method assigns a border width to the bottom side of a table cell.</p>
|
414
|
+
</div></span>
|
415
|
+
|
416
|
+
</li>
|
417
|
+
|
418
|
+
|
419
|
+
<li class="public ">
|
420
|
+
<span class="summary_signature">
|
421
|
+
|
422
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(row, width = DEFAULT_WIDTH, style = nil, top = nil, right = nil, bottom = nil, left = nil) ⇒ TableCellNode </a>
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
</span>
|
427
|
+
|
428
|
+
|
429
|
+
<span class="note title constructor">constructor</span>
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
<span class="summary_desc"><div class='inline'>
|
439
|
+
<p>This is the constructor for the TableCellNode class.</p>
|
440
|
+
</div></span>
|
441
|
+
|
442
|
+
</li>
|
443
|
+
|
444
|
+
|
445
|
+
<li class="public ">
|
446
|
+
<span class="summary_signature">
|
447
|
+
|
448
|
+
<a href="#left_border_width-instance_method" title="#left_border_width (instance method)">#<strong>left_border_width</strong> ⇒ Object </a>
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
</span>
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
<span class="summary_desc"><div class='inline'>
|
463
|
+
<p>This method fetches the width for left border of a cell.</p>
|
464
|
+
</div></span>
|
465
|
+
|
466
|
+
</li>
|
467
|
+
|
468
|
+
|
469
|
+
<li class="public ">
|
470
|
+
<span class="summary_signature">
|
471
|
+
|
472
|
+
<a href="#left_border_width=-instance_method" title="#left_border_width= (instance method)">#<strong>left_border_width=</strong>(width) ⇒ Object </a>
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
</span>
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
<span class="summary_desc"><div class='inline'>
|
487
|
+
<p>This method assigns a border width to the left side of a table cell.</p>
|
488
|
+
</div></span>
|
489
|
+
|
490
|
+
</li>
|
491
|
+
|
492
|
+
|
493
|
+
<li class="public ">
|
494
|
+
<span class="summary_signature">
|
495
|
+
|
496
|
+
<a href="#paragraph-instance_method" title="#paragraph (instance method)">#<strong>paragraph</strong>(style = nil) ⇒ Object </a>
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
</span>
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
<span class="summary_desc"><div class='inline'>
|
511
|
+
<p>This method overloads the paragraph method inherited from the ComamndNode
|
512
|
+
class to forbid the creation of paragraphs.</p>
|
513
|
+
</div></span>
|
514
|
+
|
515
|
+
</li>
|
516
|
+
|
517
|
+
|
518
|
+
<li class="public ">
|
519
|
+
<span class="summary_signature">
|
520
|
+
|
521
|
+
<a href="#parent=-instance_method" title="#parent= (instance method)">#<strong>parent=</strong>(parent) ⇒ Object </a>
|
522
|
+
|
523
|
+
|
524
|
+
|
525
|
+
</span>
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
|
534
|
+
|
535
|
+
<span class="summary_desc"><div class='inline'>
|
536
|
+
<p>This method overloads the parent= method inherited from the Node class to
|
537
|
+
forbid the alteration of the cells parent.</p>
|
538
|
+
</div></span>
|
539
|
+
|
540
|
+
</li>
|
541
|
+
|
542
|
+
|
543
|
+
<li class="public ">
|
544
|
+
<span class="summary_signature">
|
545
|
+
|
546
|
+
<a href="#right_border_width-instance_method" title="#right_border_width (instance method)">#<strong>right_border_width</strong> ⇒ Object </a>
|
547
|
+
|
548
|
+
|
549
|
+
|
550
|
+
</span>
|
551
|
+
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
|
559
|
+
|
560
|
+
<span class="summary_desc"><div class='inline'>
|
561
|
+
<p>This method fetches the width for right border of a cell.</p>
|
562
|
+
</div></span>
|
563
|
+
|
564
|
+
</li>
|
565
|
+
|
566
|
+
|
567
|
+
<li class="public ">
|
568
|
+
<span class="summary_signature">
|
569
|
+
|
570
|
+
<a href="#right_border_width=-instance_method" title="#right_border_width= (instance method)">#<strong>right_border_width=</strong>(width) ⇒ Object </a>
|
571
|
+
|
572
|
+
|
573
|
+
|
574
|
+
</span>
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
|
582
|
+
|
583
|
+
|
584
|
+
<span class="summary_desc"><div class='inline'>
|
585
|
+
<p>This method assigns a border width to the right side of a table cell.</p>
|
586
|
+
</div></span>
|
587
|
+
|
588
|
+
</li>
|
589
|
+
|
590
|
+
|
591
|
+
<li class="public ">
|
592
|
+
<span class="summary_signature">
|
593
|
+
|
594
|
+
<a href="#table-instance_method" title="#table (instance method)">#<strong>table</strong>(rows, columns, *widths) ⇒ Object </a>
|
595
|
+
|
596
|
+
|
597
|
+
|
598
|
+
</span>
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
|
606
|
+
|
607
|
+
|
608
|
+
<span class="summary_desc"><div class='inline'>
|
609
|
+
<p>This method overrides the table method inherited from CommandNode to forbid
|
610
|
+
its use in table cells.</p>
|
611
|
+
</div></span>
|
612
|
+
|
613
|
+
</li>
|
614
|
+
|
615
|
+
|
616
|
+
<li class="public ">
|
617
|
+
<span class="summary_signature">
|
618
|
+
|
619
|
+
<a href="#to_rtf-instance_method" title="#to_rtf (instance method)">#<strong>to_rtf</strong> ⇒ Object </a>
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
</span>
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
|
628
|
+
|
629
|
+
|
630
|
+
|
631
|
+
|
632
|
+
|
633
|
+
<span class="summary_desc"><div class='inline'>
|
634
|
+
<p>This method generates the RTF document text for a TableCellNode object.</p>
|
635
|
+
</div></span>
|
636
|
+
|
637
|
+
</li>
|
638
|
+
|
639
|
+
|
640
|
+
<li class="public ">
|
641
|
+
<span class="summary_signature">
|
642
|
+
|
643
|
+
<a href="#top_border_width-instance_method" title="#top_border_width (instance method)">#<strong>top_border_width</strong> ⇒ Object </a>
|
644
|
+
|
645
|
+
|
646
|
+
|
647
|
+
</span>
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
|
653
|
+
|
654
|
+
|
655
|
+
|
656
|
+
|
657
|
+
<span class="summary_desc"><div class='inline'>
|
658
|
+
<p>This method fetches the width for top border of a cell.</p>
|
659
|
+
</div></span>
|
660
|
+
|
661
|
+
</li>
|
662
|
+
|
663
|
+
|
664
|
+
<li class="public ">
|
665
|
+
<span class="summary_signature">
|
666
|
+
|
667
|
+
<a href="#top_border_width=-instance_method" title="#top_border_width= (instance method)">#<strong>top_border_width=</strong>(width) ⇒ Object </a>
|
668
|
+
|
669
|
+
|
670
|
+
|
671
|
+
</span>
|
672
|
+
|
673
|
+
|
674
|
+
|
675
|
+
|
676
|
+
|
677
|
+
|
678
|
+
|
679
|
+
|
680
|
+
|
681
|
+
<span class="summary_desc"><div class='inline'>
|
682
|
+
<p>This method assigns a border width to the top side of a table cell.</p>
|
683
|
+
</div></span>
|
684
|
+
|
685
|
+
</li>
|
686
|
+
|
687
|
+
|
688
|
+
</ul>
|
689
|
+
|
690
|
+
|
691
|
+
|
692
|
+
|
693
|
+
|
694
|
+
|
695
|
+
|
696
|
+
|
697
|
+
|
698
|
+
|
699
|
+
|
700
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="CommandNode.html" title="RRTF::CommandNode (class)">CommandNode</a></span></h3>
|
701
|
+
<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#background-instance_method" title="RRTF::CommandNode#background (method)">#background</a></span>, <span class='object_link'><a href="CommandNode.html#bold-instance_method" title="RRTF::CommandNode#bold (method)">#bold</a></span>, <span class='object_link'><a href="CommandNode.html#colour-instance_method" title="RRTF::CommandNode#colour (method)">#colour</a></span>, <span class='object_link'><a href="CommandNode.html#font-instance_method" title="RRTF::CommandNode#font (method)">#font</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#foreground-instance_method" title="RRTF::CommandNode#foreground (method)">#foreground</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#italic-instance_method" title="RRTF::CommandNode#italic (method)">#italic</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#strike-instance_method" title="RRTF::CommandNode#strike (method)">#strike</a></span>, <span class='object_link'><a href="CommandNode.html#subscript-instance_method" title="RRTF::CommandNode#subscript (method)">#subscript</a></span>, <span class='object_link'><a href="CommandNode.html#superscript-instance_method" title="RRTF::CommandNode#superscript (method)">#superscript</a></span>, <span class='object_link'><a href="CommandNode.html#underline-instance_method" title="RRTF::CommandNode#underline (method)">#underline</a></span></p>
|
702
|
+
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</a></span></h3>
|
712
|
+
<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>
|
713
|
+
|
714
|
+
|
715
|
+
|
716
|
+
|
717
|
+
|
718
|
+
|
719
|
+
|
720
|
+
|
721
|
+
|
722
|
+
|
723
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Node.html" title="RRTF::Node (class)">Node</a></span></h3>
|
724
|
+
<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>
|
725
|
+
<div id="constructor_details" class="method_details_list">
|
726
|
+
<h2>Constructor Details</h2>
|
727
|
+
|
728
|
+
<div class="method_details first">
|
729
|
+
<h3 class="signature first" id="initialize-instance_method">
|
730
|
+
|
731
|
+
#<strong>initialize</strong>(row, width = DEFAULT_WIDTH, style = nil, top = nil, right = nil, bottom = nil, left = nil) ⇒ <tt><span class='object_link'><a href="" title="RRTF::TableCellNode (class)">TableCellNode</a></span></tt>
|
732
|
+
|
733
|
+
|
734
|
+
|
735
|
+
|
736
|
+
|
737
|
+
</h3><div class="docstring">
|
738
|
+
<div class="discussion">
|
739
|
+
|
740
|
+
<p>This is the constructor for the TableCellNode class.</p>
|
741
|
+
|
742
|
+
<h4 id="label-Parameters">Parameters</h4>
|
743
|
+
<dl class="rdoc-list note-list"><dt>row
|
744
|
+
<dd>
|
745
|
+
<p>The row that the cell belongs to.</p>
|
746
|
+
</dd><dt>width
|
747
|
+
<dd>
|
748
|
+
<p>The width to be assigned to the cell. This defaults to
|
749
|
+
TableCellNode::DEFAULT_WIDTH.</p>
|
750
|
+
</dd><dt>style
|
751
|
+
<dd>
|
752
|
+
<p>The style that is applied to the cell. This must be a ParagraphStyle class.
|
753
|
+
Defaults to nil.</p>
|
754
|
+
</dd><dt>top
|
755
|
+
<dd>
|
756
|
+
<p>The border width for the cells top border. Defaults to nil.</p>
|
757
|
+
</dd><dt>right
|
758
|
+
<dd>
|
759
|
+
<p>The border width for the cells right hand border. Defaults to nil.</p>
|
760
|
+
</dd><dt>bottom
|
761
|
+
<dd>
|
762
|
+
<p>The border width for the cells bottom border. Defaults to nil.</p>
|
763
|
+
</dd><dt>left
|
764
|
+
<dd>
|
765
|
+
<p>The border width for the cells left hand border. Defaults to nil.</p>
|
766
|
+
</dd></dl>
|
767
|
+
|
768
|
+
<h4 id="label-Exceptions">Exceptions</h4>
|
769
|
+
<dl class="rdoc-list note-list"><dt>RTFError
|
770
|
+
<dd>
|
771
|
+
<p>Generated whenever an invalid style setting is specified.</p>
|
772
|
+
</dd></dl>
|
773
|
+
|
774
|
+
|
775
|
+
</div>
|
776
|
+
</div>
|
777
|
+
<div class="tags">
|
778
|
+
|
779
|
+
|
780
|
+
</div><table class="source_code">
|
781
|
+
<tr>
|
782
|
+
<td>
|
783
|
+
<pre class="lines">
|
784
|
+
|
785
|
+
|
786
|
+
962
|
787
|
+
963
|
788
|
+
964
|
789
|
+
965
|
790
|
+
966
|
791
|
+
967
|
792
|
+
968
|
793
|
+
969
|
794
|
+
970
|
795
|
+
971
|
796
|
+
972
|
797
|
+
973
|
798
|
+
974
|
799
|
+
975
|
800
|
+
976
|
801
|
+
977</pre>
|
802
|
+
</td>
|
803
|
+
<td>
|
804
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 962</span>
|
805
|
+
|
806
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_row'>row</span><span class='comma'>,</span> <span class='id identifier rubyid_width'>width</span><span class='op'>=</span><span class='const'>DEFAULT_WIDTH</span><span class='comma'>,</span> <span class='id identifier rubyid_style'>style</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_top'>top</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_right'>right</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span>
|
807
|
+
<span class='id identifier rubyid_bottom'>bottom</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_left'>left</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
808
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_row'>row</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
809
|
+
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='op'>!</span><span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_is_paragraph_style?'>is_paragraph_style?</span>
|
810
|
+
<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'>Non-paragraph style specified for TableCellNode </span><span class='tstring_end'>"</span></span>\
|
811
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>constructor.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
812
|
+
<span class='kw'>end</span>
|
813
|
+
|
814
|
+
<span class='ivar'>@width</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&&</span> <span class='id identifier rubyid_width'>width</span> <span class='op'>></span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_width'>width</span> <span class='op'>:</span> <span class='const'><span class='object_link'><a href="#DEFAULT_WIDTH-constant" title="RRTF::TableCellNode::DEFAULT_WIDTH (constant)">DEFAULT_WIDTH</a></span></span>
|
815
|
+
<span class='ivar'>@borders</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='lparen'>(</span><span class='id identifier rubyid_top'>top</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&&</span> <span class='id identifier rubyid_top'>top</span> <span class='op'>></span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_top'>top</span> <span class='op'>:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
816
|
+
<span class='lparen'>(</span><span class='id identifier rubyid_right'>right</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&&</span> <span class='id identifier rubyid_right'>right</span> <span class='op'>></span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_right'>right</span> <span class='op'>:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
817
|
+
<span class='lparen'>(</span><span class='id identifier rubyid_bottom'>bottom</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&&</span> <span class='id identifier rubyid_bottom'>bottom</span> <span class='op'>></span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_bottom'>bottom</span> <span class='op'>:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
818
|
+
<span class='lparen'>(</span><span class='id identifier rubyid_left'>left</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&&</span> <span class='id identifier rubyid_left'>left</span> <span class='op'>></span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_left'>left</span> <span class='op'>:</span> <span class='kw'>nil</span><span class='rbracket'>]</span>
|
819
|
+
<span class='ivar'>@shading_colour</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
820
|
+
<span class='ivar'>@style</span> <span class='op'>=</span> <span class='id identifier rubyid_style'>style</span>
|
821
|
+
<span class='kw'>end</span></pre>
|
822
|
+
</td>
|
823
|
+
</tr>
|
824
|
+
</table>
|
825
|
+
</div>
|
826
|
+
|
827
|
+
</div>
|
828
|
+
|
829
|
+
<div id="instance_attr_details" class="attr_details">
|
830
|
+
<h2>Instance Attribute Details</h2>
|
831
|
+
|
832
|
+
|
833
|
+
<span id="shading_colour=-instance_method"></span>
|
834
|
+
<div class="method_details first">
|
835
|
+
<h3 class="signature first" id="shading_colour-instance_method">
|
836
|
+
|
837
|
+
#<strong>shading_colour</strong> ⇒ <tt>Object</tt>
|
838
|
+
|
839
|
+
|
840
|
+
|
841
|
+
|
842
|
+
|
843
|
+
</h3><div class="docstring">
|
844
|
+
<div class="discussion">
|
845
|
+
|
846
|
+
<p>Attribute accessor.</p>
|
847
|
+
|
848
|
+
|
849
|
+
</div>
|
850
|
+
</div>
|
851
|
+
<div class="tags">
|
852
|
+
|
853
|
+
|
854
|
+
</div><table class="source_code">
|
855
|
+
<tr>
|
856
|
+
<td>
|
857
|
+
<pre class="lines">
|
858
|
+
|
859
|
+
|
860
|
+
943
|
861
|
+
944
|
862
|
+
945</pre>
|
863
|
+
</td>
|
864
|
+
<td>
|
865
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 943</span>
|
866
|
+
|
867
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_shading_colour'>shading_colour</span>
|
868
|
+
<span class='ivar'>@shading_colour</span>
|
869
|
+
<span class='kw'>end</span></pre>
|
870
|
+
</td>
|
871
|
+
</tr>
|
872
|
+
</table>
|
873
|
+
</div>
|
874
|
+
|
875
|
+
|
876
|
+
<span id="style=-instance_method"></span>
|
877
|
+
<div class="method_details ">
|
878
|
+
<h3 class="signature " id="style-instance_method">
|
879
|
+
|
880
|
+
#<strong>style</strong> ⇒ <tt>Object</tt>
|
881
|
+
|
882
|
+
|
883
|
+
|
884
|
+
|
885
|
+
|
886
|
+
</h3><div class="docstring">
|
887
|
+
<div class="discussion">
|
888
|
+
|
889
|
+
<p>Attribute accessor.</p>
|
890
|
+
|
891
|
+
|
892
|
+
</div>
|
893
|
+
</div>
|
894
|
+
<div class="tags">
|
895
|
+
|
896
|
+
|
897
|
+
</div><table class="source_code">
|
898
|
+
<tr>
|
899
|
+
<td>
|
900
|
+
<pre class="lines">
|
901
|
+
|
902
|
+
|
903
|
+
943
|
904
|
+
944
|
905
|
+
945</pre>
|
906
|
+
</td>
|
907
|
+
<td>
|
908
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 943</span>
|
909
|
+
|
910
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_style'>style</span>
|
911
|
+
<span class='ivar'>@style</span>
|
912
|
+
<span class='kw'>end</span></pre>
|
913
|
+
</td>
|
914
|
+
</tr>
|
915
|
+
</table>
|
916
|
+
</div>
|
917
|
+
|
918
|
+
|
919
|
+
<span id="width=-instance_method"></span>
|
920
|
+
<div class="method_details ">
|
921
|
+
<h3 class="signature " id="width-instance_method">
|
922
|
+
|
923
|
+
#<strong>width</strong> ⇒ <tt>Object</tt>
|
924
|
+
|
925
|
+
|
926
|
+
|
927
|
+
|
928
|
+
|
929
|
+
</h3><div class="docstring">
|
930
|
+
<div class="discussion">
|
931
|
+
|
932
|
+
<p>Width of cell</p>
|
933
|
+
|
934
|
+
|
935
|
+
</div>
|
936
|
+
</div>
|
937
|
+
<div class="tags">
|
938
|
+
|
939
|
+
|
940
|
+
</div><table class="source_code">
|
941
|
+
<tr>
|
942
|
+
<td>
|
943
|
+
<pre class="lines">
|
944
|
+
|
945
|
+
|
946
|
+
941
|
947
|
+
942
|
948
|
+
943</pre>
|
949
|
+
</td>
|
950
|
+
<td>
|
951
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 941</span>
|
952
|
+
|
953
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_width'>width</span>
|
954
|
+
<span class='ivar'>@width</span>
|
955
|
+
<span class='kw'>end</span></pre>
|
956
|
+
</td>
|
957
|
+
</tr>
|
958
|
+
</table>
|
959
|
+
</div>
|
960
|
+
|
961
|
+
</div>
|
962
|
+
|
963
|
+
|
964
|
+
<div id="instance_method_details" class="method_details_list">
|
965
|
+
<h2>Instance Method Details</h2>
|
966
|
+
|
967
|
+
|
968
|
+
<div class="method_details first">
|
969
|
+
<h3 class="signature first" id="border_width=-instance_method">
|
970
|
+
|
971
|
+
#<strong>border_width=</strong>(width) ⇒ <tt>Object</tt>
|
972
|
+
|
973
|
+
|
974
|
+
|
975
|
+
|
976
|
+
|
977
|
+
</h3><div class="docstring">
|
978
|
+
<div class="discussion">
|
979
|
+
|
980
|
+
<p>This method assigns a width, in twips, for the borders on all sides of the
|
981
|
+
cell. Negative widths will be ignored and a width of zero will switch the
|
982
|
+
border off.</p>
|
983
|
+
|
984
|
+
<h4 id="label-Parameters">Parameters</h4>
|
985
|
+
<dl class="rdoc-list note-list"><dt>width
|
986
|
+
<dd>
|
987
|
+
<p>The setting for the width of the border.</p>
|
988
|
+
</dd></dl>
|
989
|
+
|
990
|
+
|
991
|
+
</div>
|
992
|
+
</div>
|
993
|
+
<div class="tags">
|
994
|
+
|
995
|
+
|
996
|
+
</div><table class="source_code">
|
997
|
+
<tr>
|
998
|
+
<td>
|
999
|
+
<pre class="lines">
|
1000
|
+
|
1001
|
+
|
1002
|
+
1002
|
1003
|
+
1003
|
1004
|
+
1004
|
1005
|
+
1005
|
1006
|
+
1006
|
1007
|
+
1007
|
1008
|
+
1008
|
1009
|
+
1009</pre>
|
1010
|
+
</td>
|
1011
|
+
<td>
|
1012
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 1002</span>
|
1013
|
+
|
1014
|
+
<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>
|
1015
|
+
<span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier rubyid_width'>width</span>
|
1016
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_size'>size</span> <span class='op'>></span> <span class='int'>0</span>
|
1017
|
+
<span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#TOP-constant" title="RRTF::TableCellNode::TOP (constant)">TOP</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#RIGHT-constant" title="RRTF::TableCellNode::RIGHT (constant)">RIGHT</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#BOTTOM-constant" title="RRTF::TableCellNode::BOTTOM (constant)">BOTTOM</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#LEFT-constant" title="RRTF::TableCellNode::LEFT (constant)">LEFT</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
1018
|
+
<span class='kw'>else</span>
|
1019
|
+
<span class='ivar'>@borders</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rbracket'>]</span>
|
1020
|
+
<span class='kw'>end</span>
|
1021
|
+
<span class='kw'>end</span></pre>
|
1022
|
+
</td>
|
1023
|
+
</tr>
|
1024
|
+
</table>
|
1025
|
+
</div>
|
1026
|
+
|
1027
|
+
<div class="method_details ">
|
1028
|
+
<h3 class="signature " id="border_widths-instance_method">
|
1029
|
+
|
1030
|
+
#<strong>border_widths</strong> ⇒ <tt>Object</tt>
|
1031
|
+
|
1032
|
+
|
1033
|
+
|
1034
|
+
|
1035
|
+
|
1036
|
+
</h3><div class="docstring">
|
1037
|
+
<div class="discussion">
|
1038
|
+
|
1039
|
+
<p>This method retrieves an array with the cell border width settings. The
|
1040
|
+
values are inserted in top, right, bottom, left order.</p>
|
1041
|
+
|
1042
|
+
|
1043
|
+
</div>
|
1044
|
+
</div>
|
1045
|
+
<div class="tags">
|
1046
|
+
|
1047
|
+
|
1048
|
+
</div><table class="source_code">
|
1049
|
+
<tr>
|
1050
|
+
<td>
|
1051
|
+
<pre class="lines">
|
1052
|
+
|
1053
|
+
|
1054
|
+
1080
|
1055
|
+
1081
|
1056
|
+
1082
|
1057
|
+
1083
|
1058
|
+
1084</pre>
|
1059
|
+
</td>
|
1060
|
+
<td>
|
1061
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 1080</span>
|
1062
|
+
|
1063
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_border_widths'>border_widths</span>
|
1064
|
+
<span class='id identifier rubyid_widths'>widths</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1065
|
+
<span class='ivar'>@borders</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_entry'>entry</span><span class='op'>|</span> <span class='id identifier rubyid_widths'>widths</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier rubyid_entry'>entry</span><span class='rparen'>)</span><span class='rbrace'>}</span>
|
1066
|
+
<span class='id identifier rubyid_widths'>widths</span>
|
1067
|
+
<span class='kw'>end</span></pre>
|
1068
|
+
</td>
|
1069
|
+
</tr>
|
1070
|
+
</table>
|
1071
|
+
</div>
|
1072
|
+
|
1073
|
+
<div class="method_details ">
|
1074
|
+
<h3 class="signature " id="bottom_border_width-instance_method">
|
1075
|
+
|
1076
|
+
#<strong>bottom_border_width</strong> ⇒ <tt>Object</tt>
|
1077
|
+
|
1078
|
+
|
1079
|
+
|
1080
|
+
|
1081
|
+
|
1082
|
+
</h3><div class="docstring">
|
1083
|
+
<div class="discussion">
|
1084
|
+
|
1085
|
+
<p>This method fetches the width for bottom border of a cell.</p>
|
1086
|
+
|
1087
|
+
|
1088
|
+
</div>
|
1089
|
+
</div>
|
1090
|
+
<div class="tags">
|
1091
|
+
|
1092
|
+
|
1093
|
+
</div><table class="source_code">
|
1094
|
+
<tr>
|
1095
|
+
<td>
|
1096
|
+
<pre class="lines">
|
1097
|
+
|
1098
|
+
|
1099
|
+
1097
|
1100
|
+
1098
|
1101
|
+
1099</pre>
|
1102
|
+
</td>
|
1103
|
+
<td>
|
1104
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 1097</span>
|
1105
|
+
|
1106
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_bottom_border_width'>bottom_border_width</span>
|
1107
|
+
<span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#BOTTOM-constant" title="RRTF::TableCellNode::BOTTOM (constant)">BOTTOM</a></span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#BOTTOM-constant" title="RRTF::TableCellNode::BOTTOM (constant)">BOTTOM</a></span></span><span class='rbracket'>]</span>
|
1108
|
+
<span class='kw'>end</span></pre>
|
1109
|
+
</td>
|
1110
|
+
</tr>
|
1111
|
+
</table>
|
1112
|
+
</div>
|
1113
|
+
|
1114
|
+
<div class="method_details ">
|
1115
|
+
<h3 class="signature " id="bottom_border_width=-instance_method">
|
1116
|
+
|
1117
|
+
#<strong>bottom_border_width=</strong>(width) ⇒ <tt>Object</tt>
|
1118
|
+
|
1119
|
+
|
1120
|
+
|
1121
|
+
|
1122
|
+
|
1123
|
+
</h3><div class="docstring">
|
1124
|
+
<div class="discussion">
|
1125
|
+
|
1126
|
+
<p>This method assigns a border width to the bottom side of a table cell.
|
1127
|
+
Negative values are ignored and a value of 0 switches the border off.</p>
|
1128
|
+
|
1129
|
+
<h4 id="label-Parameters">Parameters</h4>
|
1130
|
+
<dl class="rdoc-list note-list"><dt>width
|
1131
|
+
<dd>
|
1132
|
+
<p>The new border width setting.</p>
|
1133
|
+
</dd></dl>
|
1134
|
+
|
1135
|
+
|
1136
|
+
</div>
|
1137
|
+
</div>
|
1138
|
+
<div class="tags">
|
1139
|
+
|
1140
|
+
|
1141
|
+
</div><table class="source_code">
|
1142
|
+
<tr>
|
1143
|
+
<td>
|
1144
|
+
<pre class="lines">
|
1145
|
+
|
1146
|
+
|
1147
|
+
1044
|
1148
|
+
1045
|
1149
|
+
1046
|
1150
|
+
1047
|
1151
|
+
1048
|
1152
|
+
1049
|
1153
|
+
1050
|
1154
|
+
1051</pre>
|
1155
|
+
</td>
|
1156
|
+
<td>
|
1157
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 1044</span>
|
1158
|
+
|
1159
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_bottom_border_width='>bottom_border_width=</span><span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span><span class='rparen'>)</span>
|
1160
|
+
<span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier rubyid_width'>width</span>
|
1161
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_size'>size</span> <span class='op'>></span> <span class='int'>0</span>
|
1162
|
+
<span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#BOTTOM-constant" title="RRTF::TableCellNode::BOTTOM (constant)">BOTTOM</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
1163
|
+
<span class='kw'>else</span>
|
1164
|
+
<span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#BOTTOM-constant" title="RRTF::TableCellNode::BOTTOM (constant)">BOTTOM</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
1165
|
+
<span class='kw'>end</span>
|
1166
|
+
<span class='kw'>end</span></pre>
|
1167
|
+
</td>
|
1168
|
+
</tr>
|
1169
|
+
</table>
|
1170
|
+
</div>
|
1171
|
+
|
1172
|
+
<div class="method_details ">
|
1173
|
+
<h3 class="signature " id="left_border_width-instance_method">
|
1174
|
+
|
1175
|
+
#<strong>left_border_width</strong> ⇒ <tt>Object</tt>
|
1176
|
+
|
1177
|
+
|
1178
|
+
|
1179
|
+
|
1180
|
+
|
1181
|
+
</h3><div class="docstring">
|
1182
|
+
<div class="discussion">
|
1183
|
+
|
1184
|
+
<p>This method fetches the width for left border of a cell.</p>
|
1185
|
+
|
1186
|
+
|
1187
|
+
</div>
|
1188
|
+
</div>
|
1189
|
+
<div class="tags">
|
1190
|
+
|
1191
|
+
|
1192
|
+
</div><table class="source_code">
|
1193
|
+
<tr>
|
1194
|
+
<td>
|
1195
|
+
<pre class="lines">
|
1196
|
+
|
1197
|
+
|
1198
|
+
1102
|
1199
|
+
1103
|
1200
|
+
1104</pre>
|
1201
|
+
</td>
|
1202
|
+
<td>
|
1203
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 1102</span>
|
1204
|
+
|
1205
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_left_border_width'>left_border_width</span>
|
1206
|
+
<span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#LEFT-constant" title="RRTF::TableCellNode::LEFT (constant)">LEFT</a></span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#LEFT-constant" title="RRTF::TableCellNode::LEFT (constant)">LEFT</a></span></span><span class='rbracket'>]</span>
|
1207
|
+
<span class='kw'>end</span></pre>
|
1208
|
+
</td>
|
1209
|
+
</tr>
|
1210
|
+
</table>
|
1211
|
+
</div>
|
1212
|
+
|
1213
|
+
<div class="method_details ">
|
1214
|
+
<h3 class="signature " id="left_border_width=-instance_method">
|
1215
|
+
|
1216
|
+
#<strong>left_border_width=</strong>(width) ⇒ <tt>Object</tt>
|
1217
|
+
|
1218
|
+
|
1219
|
+
|
1220
|
+
|
1221
|
+
|
1222
|
+
</h3><div class="docstring">
|
1223
|
+
<div class="discussion">
|
1224
|
+
|
1225
|
+
<p>This method assigns a border width to the left side of a table cell.
|
1226
|
+
Negative values are ignored and a value of 0 switches the border off.</p>
|
1227
|
+
|
1228
|
+
<h4 id="label-Parameters">Parameters</h4>
|
1229
|
+
<dl class="rdoc-list note-list"><dt>width
|
1230
|
+
<dd>
|
1231
|
+
<p>The new border width setting.</p>
|
1232
|
+
</dd></dl>
|
1233
|
+
|
1234
|
+
|
1235
|
+
</div>
|
1236
|
+
</div>
|
1237
|
+
<div class="tags">
|
1238
|
+
|
1239
|
+
|
1240
|
+
</div><table class="source_code">
|
1241
|
+
<tr>
|
1242
|
+
<td>
|
1243
|
+
<pre class="lines">
|
1244
|
+
|
1245
|
+
|
1246
|
+
1058
|
1247
|
+
1059
|
1248
|
+
1060
|
1249
|
+
1061
|
1250
|
+
1062
|
1251
|
+
1063
|
1252
|
+
1064
|
1253
|
+
1065</pre>
|
1254
|
+
</td>
|
1255
|
+
<td>
|
1256
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 1058</span>
|
1257
|
+
|
1258
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_left_border_width='>left_border_width=</span><span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span><span class='rparen'>)</span>
|
1259
|
+
<span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier rubyid_width'>width</span>
|
1260
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_size'>size</span> <span class='op'>></span> <span class='int'>0</span>
|
1261
|
+
<span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#LEFT-constant" title="RRTF::TableCellNode::LEFT (constant)">LEFT</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
1262
|
+
<span class='kw'>else</span>
|
1263
|
+
<span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#LEFT-constant" title="RRTF::TableCellNode::LEFT (constant)">LEFT</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
1264
|
+
<span class='kw'>end</span>
|
1265
|
+
<span class='kw'>end</span></pre>
|
1266
|
+
</td>
|
1267
|
+
</tr>
|
1268
|
+
</table>
|
1269
|
+
</div>
|
1270
|
+
|
1271
|
+
<div class="method_details ">
|
1272
|
+
<h3 class="signature " id="paragraph-instance_method">
|
1273
|
+
|
1274
|
+
#<strong>paragraph</strong>(style = nil) ⇒ <tt>Object</tt>
|
1275
|
+
|
1276
|
+
|
1277
|
+
|
1278
|
+
|
1279
|
+
|
1280
|
+
</h3><div class="docstring">
|
1281
|
+
<div class="discussion">
|
1282
|
+
|
1283
|
+
<p>This method overloads the paragraph method inherited from the ComamndNode
|
1284
|
+
class to forbid the creation of paragraphs.</p>
|
1285
|
+
|
1286
|
+
<h4 id="label-Parameters">Parameters</h4>
|
1287
|
+
<dl class="rdoc-list note-list"><dt>style
|
1288
|
+
<dd>
|
1289
|
+
<p>The paragraph style, ignored</p>
|
1290
|
+
</dd></dl>
|
1291
|
+
|
1292
|
+
|
1293
|
+
</div>
|
1294
|
+
</div>
|
1295
|
+
<div class="tags">
|
1296
|
+
|
1297
|
+
|
1298
|
+
</div><table class="source_code">
|
1299
|
+
<tr>
|
1300
|
+
<td>
|
1301
|
+
<pre class="lines">
|
1302
|
+
|
1303
|
+
|
1304
|
+
1111
|
1305
|
+
1112
|
1306
|
+
1113
|
1307
|
+
1114</pre>
|
1308
|
+
</td>
|
1309
|
+
<td>
|
1310
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 1111</span>
|
1311
|
+
|
1312
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_paragraph'>paragraph</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
1313
|
+
<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'>TableCellNode#paragraph() called. Table cells cannot </span><span class='tstring_end'>"</span></span>\
|
1314
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>contain paragraphs.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
1315
|
+
<span class='kw'>end</span></pre>
|
1316
|
+
</td>
|
1317
|
+
</tr>
|
1318
|
+
</table>
|
1319
|
+
</div>
|
1320
|
+
|
1321
|
+
<div class="method_details ">
|
1322
|
+
<h3 class="signature " id="parent=-instance_method">
|
1323
|
+
|
1324
|
+
#<strong>parent=</strong>(parent) ⇒ <tt>Object</tt>
|
1325
|
+
|
1326
|
+
|
1327
|
+
|
1328
|
+
|
1329
|
+
|
1330
|
+
</h3><div class="docstring">
|
1331
|
+
<div class="discussion">
|
1332
|
+
|
1333
|
+
<p>This method overloads the parent= method inherited from the Node class to
|
1334
|
+
forbid the alteration of the cells parent.</p>
|
1335
|
+
|
1336
|
+
<h4 id="label-Parameters">Parameters</h4>
|
1337
|
+
<dl class="rdoc-list note-list"><dt>parent
|
1338
|
+
<dd>
|
1339
|
+
<p>A reference to the new node parent.</p>
|
1340
|
+
</dd></dl>
|
1341
|
+
|
1342
|
+
|
1343
|
+
</div>
|
1344
|
+
</div>
|
1345
|
+
<div class="tags">
|
1346
|
+
|
1347
|
+
|
1348
|
+
</div><table class="source_code">
|
1349
|
+
<tr>
|
1350
|
+
<td>
|
1351
|
+
<pre class="lines">
|
1352
|
+
|
1353
|
+
|
1354
|
+
1121
|
1355
|
+
1122
|
1356
|
+
1123</pre>
|
1357
|
+
</td>
|
1358
|
+
<td>
|
1359
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 1121</span>
|
1360
|
+
|
1361
|
+
<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>
|
1362
|
+
<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 cell nodes cannot have their parent changed.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
1363
|
+
<span class='kw'>end</span></pre>
|
1364
|
+
</td>
|
1365
|
+
</tr>
|
1366
|
+
</table>
|
1367
|
+
</div>
|
1368
|
+
|
1369
|
+
<div class="method_details ">
|
1370
|
+
<h3 class="signature " id="right_border_width-instance_method">
|
1371
|
+
|
1372
|
+
#<strong>right_border_width</strong> ⇒ <tt>Object</tt>
|
1373
|
+
|
1374
|
+
|
1375
|
+
|
1376
|
+
|
1377
|
+
|
1378
|
+
</h3><div class="docstring">
|
1379
|
+
<div class="discussion">
|
1380
|
+
|
1381
|
+
<p>This method fetches the width for right border of a cell.</p>
|
1382
|
+
|
1383
|
+
|
1384
|
+
</div>
|
1385
|
+
</div>
|
1386
|
+
<div class="tags">
|
1387
|
+
|
1388
|
+
|
1389
|
+
</div><table class="source_code">
|
1390
|
+
<tr>
|
1391
|
+
<td>
|
1392
|
+
<pre class="lines">
|
1393
|
+
|
1394
|
+
|
1395
|
+
1092
|
1396
|
+
1093
|
1397
|
+
1094</pre>
|
1398
|
+
</td>
|
1399
|
+
<td>
|
1400
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 1092</span>
|
1401
|
+
|
1402
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_right_border_width'>right_border_width</span>
|
1403
|
+
<span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#RIGHT-constant" title="RRTF::TableCellNode::RIGHT (constant)">RIGHT</a></span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#RIGHT-constant" title="RRTF::TableCellNode::RIGHT (constant)">RIGHT</a></span></span><span class='rbracket'>]</span>
|
1404
|
+
<span class='kw'>end</span></pre>
|
1405
|
+
</td>
|
1406
|
+
</tr>
|
1407
|
+
</table>
|
1408
|
+
</div>
|
1409
|
+
|
1410
|
+
<div class="method_details ">
|
1411
|
+
<h3 class="signature " id="right_border_width=-instance_method">
|
1412
|
+
|
1413
|
+
#<strong>right_border_width=</strong>(width) ⇒ <tt>Object</tt>
|
1414
|
+
|
1415
|
+
|
1416
|
+
|
1417
|
+
|
1418
|
+
|
1419
|
+
</h3><div class="docstring">
|
1420
|
+
<div class="discussion">
|
1421
|
+
|
1422
|
+
<p>This method assigns a border width to the right side of a table cell.
|
1423
|
+
Negative values are ignored and a value of 0 switches the border off.</p>
|
1424
|
+
|
1425
|
+
<h4 id="label-Parameters">Parameters</h4>
|
1426
|
+
<dl class="rdoc-list note-list"><dt>width
|
1427
|
+
<dd>
|
1428
|
+
<p>The new border width setting.</p>
|
1429
|
+
</dd></dl>
|
1430
|
+
|
1431
|
+
|
1432
|
+
</div>
|
1433
|
+
</div>
|
1434
|
+
<div class="tags">
|
1435
|
+
|
1436
|
+
|
1437
|
+
</div><table class="source_code">
|
1438
|
+
<tr>
|
1439
|
+
<td>
|
1440
|
+
<pre class="lines">
|
1441
|
+
|
1442
|
+
|
1443
|
+
1030
|
1444
|
+
1031
|
1445
|
+
1032
|
1446
|
+
1033
|
1447
|
+
1034
|
1448
|
+
1035
|
1449
|
+
1036
|
1450
|
+
1037</pre>
|
1451
|
+
</td>
|
1452
|
+
<td>
|
1453
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 1030</span>
|
1454
|
+
|
1455
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_right_border_width='>right_border_width=</span><span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span><span class='rparen'>)</span>
|
1456
|
+
<span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier rubyid_width'>width</span>
|
1457
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_size'>size</span> <span class='op'>></span> <span class='int'>0</span>
|
1458
|
+
<span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#RIGHT-constant" title="RRTF::TableCellNode::RIGHT (constant)">RIGHT</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
1459
|
+
<span class='kw'>else</span>
|
1460
|
+
<span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#RIGHT-constant" title="RRTF::TableCellNode::RIGHT (constant)">RIGHT</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
1461
|
+
<span class='kw'>end</span>
|
1462
|
+
<span class='kw'>end</span></pre>
|
1463
|
+
</td>
|
1464
|
+
</tr>
|
1465
|
+
</table>
|
1466
|
+
</div>
|
1467
|
+
|
1468
|
+
<div class="method_details ">
|
1469
|
+
<h3 class="signature " id="table-instance_method">
|
1470
|
+
|
1471
|
+
#<strong>table</strong>(rows, columns, *widths) ⇒ <tt>Object</tt>
|
1472
|
+
|
1473
|
+
|
1474
|
+
|
1475
|
+
|
1476
|
+
|
1477
|
+
</h3><div class="docstring">
|
1478
|
+
<div class="discussion">
|
1479
|
+
|
1480
|
+
<p>This method overrides the table method inherited from CommandNode to forbid
|
1481
|
+
its use in table cells.</p>
|
1482
|
+
|
1483
|
+
<h4 id="label-Parameters">Parameters</h4>
|
1484
|
+
<dl class="rdoc-list note-list"><dt>rows
|
1485
|
+
<dd>
|
1486
|
+
<p>The number of rows for the table.</p>
|
1487
|
+
</dd><dt>columns
|
1488
|
+
<dd>
|
1489
|
+
<p>The number of columns for the table.</p>
|
1490
|
+
</dd><dt>*widths
|
1491
|
+
<dd>
|
1492
|
+
<p>One or more integers representing the widths for the table columns.</p>
|
1493
|
+
</dd></dl>
|
1494
|
+
|
1495
|
+
|
1496
|
+
</div>
|
1497
|
+
</div>
|
1498
|
+
<div class="tags">
|
1499
|
+
|
1500
|
+
|
1501
|
+
</div><table class="source_code">
|
1502
|
+
<tr>
|
1503
|
+
<td>
|
1504
|
+
<pre class="lines">
|
1505
|
+
|
1506
|
+
|
1507
|
+
1133
|
1508
|
+
1134
|
1509
|
+
1135</pre>
|
1510
|
+
</td>
|
1511
|
+
<td>
|
1512
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 1133</span>
|
1513
|
+
|
1514
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_table'>table</span><span class='lparen'>(</span><span class='id identifier rubyid_rows'>rows</span><span class='comma'>,</span> <span class='id identifier rubyid_columns'>columns</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_widths'>widths</span><span class='rparen'>)</span>
|
1515
|
+
<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'>TableCellNode#table() called. Nested tables not allowed.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
1516
|
+
<span class='kw'>end</span></pre>
|
1517
|
+
</td>
|
1518
|
+
</tr>
|
1519
|
+
</table>
|
1520
|
+
</div>
|
1521
|
+
|
1522
|
+
<div class="method_details ">
|
1523
|
+
<h3 class="signature " id="to_rtf-instance_method">
|
1524
|
+
|
1525
|
+
#<strong>to_rtf</strong> ⇒ <tt>Object</tt>
|
1526
|
+
|
1527
|
+
|
1528
|
+
|
1529
|
+
|
1530
|
+
|
1531
|
+
</h3><div class="docstring">
|
1532
|
+
<div class="discussion">
|
1533
|
+
|
1534
|
+
<p>This method generates the RTF document text for a TableCellNode object.</p>
|
1535
|
+
|
1536
|
+
|
1537
|
+
</div>
|
1538
|
+
</div>
|
1539
|
+
<div class="tags">
|
1540
|
+
|
1541
|
+
|
1542
|
+
</div><table class="source_code">
|
1543
|
+
<tr>
|
1544
|
+
<td>
|
1545
|
+
<pre class="lines">
|
1546
|
+
|
1547
|
+
|
1548
|
+
1138
|
1549
|
+
1139
|
1550
|
+
1140
|
1551
|
+
1141
|
1552
|
+
1142
|
1553
|
+
1143
|
1554
|
+
1144
|
1555
|
+
1145
|
1556
|
+
1146
|
1557
|
+
1147
|
1558
|
+
1148
|
1559
|
+
1149
|
1560
|
+
1150
|
1561
|
+
1151
|
1562
|
+
1152
|
1563
|
+
1153
|
1564
|
+
1154
|
1565
|
+
1155</pre>
|
1566
|
+
</td>
|
1567
|
+
<td>
|
1568
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 1138</span>
|
1569
|
+
|
1570
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_rtf'>to_rtf</span>
|
1571
|
+
<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>
|
1572
|
+
<span class='id identifier rubyid_separator'>separator</span> <span class='op'>=</span> <span class='id identifier rubyid_split?'>split?</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> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span>
|
1573
|
+
<span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_separator'>separator</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='rparen'>)</span>
|
1574
|
+
|
1575
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\pard\\intbl</span><span class='tstring_end'>"</span></span>
|
1576
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='ivar'>@style</span><span class='period'>.</span><span class='id identifier rubyid_prefix'>prefix</span><span class='lparen'>(</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='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@style</span> <span class='op'>!=</span> <span class='kw'>nil</span>
|
1577
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='id identifier rubyid_separator'>separator</span>
|
1578
|
+
<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>
|
1579
|
+
<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> <span class='kw'>if</span> <span class='id identifier rubyid_line'>line</span>
|
1580
|
+
<span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='kw'>true</span>
|
1581
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_to_rtf'>to_rtf</span>
|
1582
|
+
<span class='kw'>end</span>
|
1583
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='lparen'>(</span><span class='id identifier rubyid_split?'>split?</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> <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='rparen'>)</span>
|
1584
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\cell</span><span class='tstring_end'>"</span></span>
|
1585
|
+
|
1586
|
+
<span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span>
|
1587
|
+
<span class='kw'>end</span></pre>
|
1588
|
+
</td>
|
1589
|
+
</tr>
|
1590
|
+
</table>
|
1591
|
+
</div>
|
1592
|
+
|
1593
|
+
<div class="method_details ">
|
1594
|
+
<h3 class="signature " id="top_border_width-instance_method">
|
1595
|
+
|
1596
|
+
#<strong>top_border_width</strong> ⇒ <tt>Object</tt>
|
1597
|
+
|
1598
|
+
|
1599
|
+
|
1600
|
+
|
1601
|
+
|
1602
|
+
</h3><div class="docstring">
|
1603
|
+
<div class="discussion">
|
1604
|
+
|
1605
|
+
<p>This method fetches the width for top border of a cell.</p>
|
1606
|
+
|
1607
|
+
|
1608
|
+
</div>
|
1609
|
+
</div>
|
1610
|
+
<div class="tags">
|
1611
|
+
|
1612
|
+
|
1613
|
+
</div><table class="source_code">
|
1614
|
+
<tr>
|
1615
|
+
<td>
|
1616
|
+
<pre class="lines">
|
1617
|
+
|
1618
|
+
|
1619
|
+
1087
|
1620
|
+
1088
|
1621
|
+
1089</pre>
|
1622
|
+
</td>
|
1623
|
+
<td>
|
1624
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 1087</span>
|
1625
|
+
|
1626
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_top_border_width'>top_border_width</span>
|
1627
|
+
<span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#TOP-constant" title="RRTF::TableCellNode::TOP (constant)">TOP</a></span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#TOP-constant" title="RRTF::TableCellNode::TOP (constant)">TOP</a></span></span><span class='rbracket'>]</span>
|
1628
|
+
<span class='kw'>end</span></pre>
|
1629
|
+
</td>
|
1630
|
+
</tr>
|
1631
|
+
</table>
|
1632
|
+
</div>
|
1633
|
+
|
1634
|
+
<div class="method_details ">
|
1635
|
+
<h3 class="signature " id="top_border_width=-instance_method">
|
1636
|
+
|
1637
|
+
#<strong>top_border_width=</strong>(width) ⇒ <tt>Object</tt>
|
1638
|
+
|
1639
|
+
|
1640
|
+
|
1641
|
+
|
1642
|
+
|
1643
|
+
</h3><div class="docstring">
|
1644
|
+
<div class="discussion">
|
1645
|
+
|
1646
|
+
<p>This method assigns a border width to the top side of a table cell.
|
1647
|
+
Negative values are ignored and a value of 0 switches the border off.</p>
|
1648
|
+
|
1649
|
+
<h4 id="label-Parameters">Parameters</h4>
|
1650
|
+
<dl class="rdoc-list note-list"><dt>width
|
1651
|
+
<dd>
|
1652
|
+
<p>The new border width setting.</p>
|
1653
|
+
</dd></dl>
|
1654
|
+
|
1655
|
+
|
1656
|
+
</div>
|
1657
|
+
</div>
|
1658
|
+
<div class="tags">
|
1659
|
+
|
1660
|
+
|
1661
|
+
</div><table class="source_code">
|
1662
|
+
<tr>
|
1663
|
+
<td>
|
1664
|
+
<pre class="lines">
|
1665
|
+
|
1666
|
+
|
1667
|
+
1016
|
1668
|
+
1017
|
1669
|
+
1018
|
1670
|
+
1019
|
1671
|
+
1020
|
1672
|
+
1021
|
1673
|
+
1022
|
1674
|
+
1023</pre>
|
1675
|
+
</td>
|
1676
|
+
<td>
|
1677
|
+
<pre class="code"><span class="info file"># File 'lib/rrtf/node.rb', line 1016</span>
|
1678
|
+
|
1679
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_top_border_width='>top_border_width=</span><span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span><span class='rparen'>)</span>
|
1680
|
+
<span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier rubyid_width'>width</span>
|
1681
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_size'>size</span> <span class='op'>></span> <span class='int'>0</span>
|
1682
|
+
<span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#TOP-constant" title="RRTF::TableCellNode::TOP (constant)">TOP</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
1683
|
+
<span class='kw'>else</span>
|
1684
|
+
<span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#TOP-constant" title="RRTF::TableCellNode::TOP (constant)">TOP</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
1685
|
+
<span class='kw'>end</span>
|
1686
|
+
<span class='kw'>end</span></pre>
|
1687
|
+
</td>
|
1688
|
+
</tr>
|
1689
|
+
</table>
|
1690
|
+
</div>
|
1691
|
+
|
1692
|
+
</div>
|
1693
|
+
|
1694
|
+
</div>
|
1695
|
+
|
1696
|
+
<div id="footer">
|
1697
|
+
Generated on Mon Jul 24 15:49:00 2017 by
|
1698
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1699
|
+
0.9.9 (ruby-2.3.3).
|
1700
|
+
</div>
|
1701
|
+
|
1702
|
+
</div>
|
1703
|
+
</body>
|
1704
|
+
</html>
|