1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>Ipelib: IpeReference Class Reference</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
<link href="tabs.css" rel="stylesheet" type="text/css">
7
<!-- Generated by Doxygen 1.5.1 -->
10
<li><a href="index.html"><span>Main Page</span></a></li>
11
<li><a href="modules.html"><span>Modules</span></a></li>
12
<li id="current"><a href="annotated.html"><span>Classes</span></a></li>
16
<li><a href="annotated.html"><span>Class List</span></a></li>
17
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
18
<li><a href="functions.html"><span>Class Members</span></a></li>
20
<h1>IpeReference Class Reference<br>
22
[<a class="el" href="group__obj.html">Ipe Objects</a>]</small>
23
</h1><!-- doxytag: class="IpeReference" --><!-- doxytag: inherits="IpeObject" -->The reference object.
24
<a href="#_details">More...</a>
26
Inherits <a class="el" href="class_ipe_object.html">IpeObject</a>.
28
<a href="class_ipe_reference-members.html">List of all members.</a><h2>Public Member Functions</h2>
30
<li><a class="el" href="class_ipe_reference.html#9e15e0e676327774131cf18df60ff515">IpeReference</a> (<a class="el" href="class_ipe_repository.html">IpeRepository</a> *rep, const <a class="el" href="class_ipe_xml_attributes.html">IpeXmlAttributes</a> &attr, <a class="el" href="class_ipe_string.html">IpeString</a> data)
31
<li><a class="el" href="class_ipe_reference.html#905cd61a052ec03bdc46a7e940d7fa7a">IpeReference</a> (const <a class="el" href="class_ipe_style_sheet.html">IpeStyleSheet</a> *sheet, <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> name)
32
<li><a class="el" href="class_ipe_reference.html#e1bc698f627fe315173443544e8b5952">IpeReference</a> (const <a class="el" href="class_ipe_reference.html">IpeReference</a> &rhs)
33
<li>virtual <a class="el" href="class_ipe_object.html">IpeObject</a> * <a class="el" href="class_ipe_reference.html#b3b99d65a8750bc84666ad3f75b17d35">Clone</a> () const
34
<li>virtual <a class="el" href="class_ipe_reference.html">IpeReference</a> * <a class="el" href="class_ipe_reference.html#98cf5ebcc2a654489023bc55f0d11ded">AsReference</a> ()
35
<li>virtual void <a class="el" href="class_ipe_reference.html#8becf819cdedec454c6b6e7cb58fae9e">Accept</a> (<a class="el" href="class_ipe_visitor.html">IpeVisitor</a> &visitor) const
36
<li>virtual void <a class="el" href="class_ipe_reference.html#2df44df7d6f037b80ec9586da9015dc3">SaveAsXml</a> (<a class="el" href="class_ipe_painter.html">IpePainter</a> &painter, <a class="el" href="class_ipe_stream.html">IpeStream</a> &stream, <a class="el" href="class_ipe_string.html">IpeString</a> layer) const
37
<li>virtual void <a class="el" href="class_ipe_reference.html#9a19cec8929296b9146f691c0633b439">Draw</a> (<a class="el" href="class_ipe_painter.html">IpePainter</a> &painter) const
38
<li>virtual void <a class="el" href="class_ipe_reference.html#4f5abcd677172a1d596e9486cd6abf20">AddToBBox</a> (<a class="el" href="class_ipe_rect.html">IpeRect</a> &box, const <a class="el" href="class_ipe_matrix.html">IpeMatrix</a> &m) const
39
<li>virtual double <a class="el" href="class_ipe_reference.html#e0dcd67928ced45e1ebad7165df01093">Distance</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &v, const <a class="el" href="class_ipe_matrix.html">IpeMatrix</a> &m, double bound) const
40
<li>virtual void <a class="el" href="class_ipe_reference.html#5b734c2f37c20bd16f03007236c7bd49">SnapVtx</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &mouse, const <a class="el" href="class_ipe_matrix.html">IpeMatrix</a> &m, <a class="el" href="class_ipe_vector.html">IpeVector</a> &pos, double &bound) const
41
<li>virtual void <a class="el" href="class_ipe_reference.html#0e9f1f403ddaa853e1b9ded4727c32f5">SnapBnd</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &mouse, const <a class="el" href="class_ipe_matrix.html">IpeMatrix</a> &m, <a class="el" href="class_ipe_vector.html">IpeVector</a> &pos, double &bound) const
42
<li>virtual void <a class="el" href="class_ipe_reference.html#b1be572e953189f128ad94077ae1ddcd">CheckStyle</a> (const <a class="el" href="class_ipe_style_sheet.html">IpeStyleSheet</a> *sheet, <a class="el" href="group__attr.html#g8592bdde9e4ad7b2ad81f5dd2638e43c">IpeAttributeSeq</a> &seq) const
43
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_reference.html#5f3dd23e14040d5f477e5825fc71cb1b">Name</a> () const
44
<li>const <a class="el" href="class_ipe_object.html">IpeObject</a> * <a class="el" href="class_ipe_reference.html#ea92229f8866e9007423efa0cb687d1d">Object</a> () const
46
<hr><a name="_details"></a><h2>Detailed Description</h2>
49
A reference reuses an object defined in an Ipe style sheet. The object is defined as a named template in the style sheet, and can be reused arbitrarily often in the document. This can, for instance, be used for backgrounds on multi-page documents.<p>
50
It is admissible to refer to an undefined object (that is, the current style sheet cascade does not define a template with the given name).
52
<hr><h2>Constructor & Destructor Documentation</h2>
53
<a class="anchor" name="9e15e0e676327774131cf18df60ff515"></a><!-- doxytag: member="IpeReference::IpeReference" ref="9e15e0e676327774131cf18df60ff515" args="(IpeRepository *rep, const IpeXmlAttributes &attr, IpeString data)" -->
55
<div class="memproto">
56
<table class="memname">
58
<td class="memname">IpeReference::IpeReference </td>
60
<td class="paramtype"><a class="el" href="class_ipe_repository.html">IpeRepository</a> * </td>
61
<td class="paramname"> <em>rep</em>, </td>
64
<td class="paramkey"></td>
66
<td class="paramtype">const <a class="el" href="class_ipe_xml_attributes.html">IpeXmlAttributes</a> & </td>
67
<td class="paramname"> <em>attr</em>, </td>
70
<td class="paramkey"></td>
72
<td class="paramtype"><a class="el" href="class_ipe_string.html">IpeString</a> </td>
73
<td class="paramname"> <em>data</em></td><td> </td>
78
<td></td><td></td><td width="100%"><code> [explicit]</code></td>
85
Create from XML stream.
90
<a class="anchor" name="905cd61a052ec03bdc46a7e940d7fa7a"></a><!-- doxytag: member="IpeReference::IpeReference" ref="905cd61a052ec03bdc46a7e940d7fa7a" args="(const IpeStyleSheet *sheet, IpeAttribute name)" -->
92
<div class="memproto">
93
<table class="memname">
95
<td class="memname">IpeReference::IpeReference </td>
97
<td class="paramtype">const <a class="el" href="class_ipe_style_sheet.html">IpeStyleSheet</a> * </td>
98
<td class="paramname"> <em>sheet</em>, </td>
101
<td class="paramkey"></td>
103
<td class="paramtype"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> </td>
104
<td class="paramname"> <em>name</em></td><td> </td>
109
<td></td><td></td><td width="100%"><code> [explicit]</code></td>
116
Create a reference to the named object in stylesheet.
121
<a class="anchor" name="e1bc698f627fe315173443544e8b5952"></a><!-- doxytag: member="IpeReference::IpeReference" ref="e1bc698f627fe315173443544e8b5952" args="(const IpeReference &rhs)" -->
122
<div class="memitem">
123
<div class="memproto">
124
<table class="memname">
126
<td class="memname">IpeReference::IpeReference </td>
128
<td class="paramtype">const <a class="el" href="class_ipe_reference.html">IpeReference</a> & </td>
129
<td class="paramname"> <em>rhs</em> </td>
130
<td> ) </td>
131
<td width="100%"></td>
143
<hr><h2>Member Function Documentation</h2>
144
<a class="anchor" name="b3b99d65a8750bc84666ad3f75b17d35"></a><!-- doxytag: member="IpeReference::Clone" ref="b3b99d65a8750bc84666ad3f75b17d35" args="() const" -->
145
<div class="memitem">
146
<div class="memproto">
147
<table class="memname">
149
<td class="memname"><a class="el" href="class_ipe_object.html">IpeObject</a> * IpeReference::Clone </td>
151
<td class="paramname"> </td>
152
<td> ) </td>
153
<td width="100%"> const<code> [virtual]</code></td>
164
Implements <a class="el" href="class_ipe_object.html#544473557223336afe1b967223f71c8a">IpeObject</a>.
167
<a class="anchor" name="98cf5ebcc2a654489023bc55f0d11ded"></a><!-- doxytag: member="IpeReference::AsReference" ref="98cf5ebcc2a654489023bc55f0d11ded" args="()" -->
168
<div class="memitem">
169
<div class="memproto">
170
<table class="memname">
172
<td class="memname"><a class="el" href="class_ipe_reference.html">IpeReference</a> * IpeReference::AsReference </td>
174
<td class="paramname"> </td>
175
<td> ) </td>
176
<td width="100%"><code> [virtual]</code></td>
183
Return pointer to this object.
187
Reimplemented from <a class="el" href="class_ipe_object.html#f7ff3dbff00af078bbace3f49198a33c">IpeObject</a>.
190
<a class="anchor" name="8becf819cdedec454c6b6e7cb58fae9e"></a><!-- doxytag: member="IpeReference::Accept" ref="8becf819cdedec454c6b6e7cb58fae9e" args="(IpeVisitor &visitor) const " -->
191
<div class="memitem">
192
<div class="memproto">
193
<table class="memname">
195
<td class="memname">void IpeReference::Accept </td>
197
<td class="paramtype"><a class="el" href="class_ipe_visitor.html">IpeVisitor</a> & </td>
198
<td class="paramname"> <em>visitor</em> </td>
199
<td> ) </td>
200
<td width="100%"> const<code> [virtual]</code></td>
207
Calls VisitXXX method of the visitor.
211
Implements <a class="el" href="class_ipe_object.html#5e1c2d5483175375a3a83aaf61fa4900">IpeObject</a>.
214
<a class="anchor" name="2df44df7d6f037b80ec9586da9015dc3"></a><!-- doxytag: member="IpeReference::SaveAsXml" ref="2df44df7d6f037b80ec9586da9015dc3" args="(IpePainter &painter, IpeStream &stream, IpeString layer) const" -->
215
<div class="memitem">
216
<div class="memproto">
217
<table class="memname">
219
<td class="memname">void IpeReference::SaveAsXml </td>
221
<td class="paramtype"><a class="el" href="class_ipe_painter.html">IpePainter</a> & </td>
222
<td class="paramname"> <em>painter</em>, </td>
225
<td class="paramkey"></td>
227
<td class="paramtype"><a class="el" href="class_ipe_stream.html">IpeStream</a> & </td>
228
<td class="paramname"> <em>stream</em>, </td>
231
<td class="paramkey"></td>
233
<td class="paramtype"><a class="el" href="class_ipe_string.html">IpeString</a> </td>
234
<td class="paramname"> <em>layer</em></td><td> </td>
239
<td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
250
Implements <a class="el" href="class_ipe_object.html#65b22ef539b3c7966f6a68977ed36486">IpeObject</a>.
253
<a class="anchor" name="9a19cec8929296b9146f691c0633b439"></a><!-- doxytag: member="IpeReference::Draw" ref="9a19cec8929296b9146f691c0633b439" args="(IpePainter &painter) const " -->
254
<div class="memitem">
255
<div class="memproto">
256
<table class="memname">
258
<td class="memname">void IpeReference::Draw </td>
260
<td class="paramtype"><a class="el" href="class_ipe_painter.html">IpePainter</a> & </td>
261
<td class="paramname"> <em>painter</em> </td>
262
<td> ) </td>
263
<td width="100%"> const<code> [virtual]</code></td>
272
If the symbolic attribute is not defined in the current style sheet, nothing is drawn at all.
274
Implements <a class="el" href="class_ipe_object.html#60f71ffee0f934072452b4dbed660de4">IpeObject</a>.
277
<a class="anchor" name="4f5abcd677172a1d596e9486cd6abf20"></a><!-- doxytag: member="IpeReference::AddToBBox" ref="4f5abcd677172a1d596e9486cd6abf20" args="(IpeRect &box, const IpeMatrix &m) const" -->
278
<div class="memitem">
279
<div class="memproto">
280
<table class="memname">
282
<td class="memname">void IpeReference::AddToBBox </td>
284
<td class="paramtype"><a class="el" href="class_ipe_rect.html">IpeRect</a> & </td>
285
<td class="paramname"> <em>box</em>, </td>
288
<td class="paramkey"></td>
290
<td class="paramtype">const <a class="el" href="class_ipe_matrix.html">IpeMatrix</a> & </td>
291
<td class="paramname"> <em>m</em></td><td> </td>
296
<td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
303
Extend <em>box</em> to include the object transformed by <em>m</em>.
305
For Ipe objects in a page, don't call this directly. The <a class="el" href="class_ipe_pg_object.html">IpePgObject</a> caches the bounding box, so it is far more efficient to call <a class="el" href="class_ipe_pg_object.html#24d9716bac48f23ee727db17f94dcfd1">IpePgObject::BBox</a>.<p>
306
If called with an empty box, the result of this function is a tight bounding box for the object, with a little leeway in case the boundary is determined by a spline (it has to be approximated to perform this operation).
308
Implements <a class="el" href="class_ipe_object.html#86fb97b574a854c49c2b5cd6aee1bb75">IpeObject</a>.
311
<a class="anchor" name="e0dcd67928ced45e1ebad7165df01093"></a><!-- doxytag: member="IpeReference::Distance" ref="e0dcd67928ced45e1ebad7165df01093" args="(const IpeVector &v, const IpeMatrix &m, double bound) const" -->
312
<div class="memitem">
313
<div class="memproto">
314
<table class="memname">
316
<td class="memname">double IpeReference::Distance </td>
318
<td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
319
<td class="paramname"> <em>v</em>, </td>
322
<td class="paramkey"></td>
324
<td class="paramtype">const <a class="el" href="class_ipe_matrix.html">IpeMatrix</a> & </td>
325
<td class="paramname"> <em>m</em>, </td>
328
<td class="paramkey"></td>
330
<td class="paramtype">double </td>
331
<td class="paramname"> <em>bound</em></td><td> </td>
336
<td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
343
Return distance of transformed object to point <em>v</em>. If larger than <em>bound</em>, can just return <em>bound</em>.
345
Implements <a class="el" href="class_ipe_object.html#ccf553420ac0b3435e686bb85adf7b88">IpeObject</a>.
348
<a class="anchor" name="5b734c2f37c20bd16f03007236c7bd49"></a><!-- doxytag: member="IpeReference::SnapVtx" ref="5b734c2f37c20bd16f03007236c7bd49" args="(const IpeVector &mouse, const IpeMatrix &m, IpeVector &pos, double &bound) const" -->
349
<div class="memitem">
350
<div class="memproto">
351
<table class="memname">
353
<td class="memname">void IpeReference::SnapVtx </td>
355
<td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
356
<td class="paramname"> <em>mouse</em>, </td>
359
<td class="paramkey"></td>
361
<td class="paramtype">const <a class="el" href="class_ipe_matrix.html">IpeMatrix</a> & </td>
362
<td class="paramname"> <em>m</em>, </td>
365
<td class="paramkey"></td>
367
<td class="paramtype"><a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
368
<td class="paramname"> <em>pos</em>, </td>
371
<td class="paramkey"></td>
373
<td class="paramtype">double & </td>
374
<td class="paramname"> <em>bound</em></td><td> </td>
379
<td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
386
Compute possible vertex snapping position for transformed object.
388
Looks only for positions closer than <em>bound</em>. If successful, modify <em>pos</em> and <em>bound</em>.
390
Implements <a class="el" href="class_ipe_object.html#2ebde3cb7e75c55a61d2092c82f29146">IpeObject</a>.
393
<a class="anchor" name="0e9f1f403ddaa853e1b9ded4727c32f5"></a><!-- doxytag: member="IpeReference::SnapBnd" ref="0e9f1f403ddaa853e1b9ded4727c32f5" args="(const IpeVector &mouse, const IpeMatrix &m, IpeVector &pos, double &bound) const" -->
394
<div class="memitem">
395
<div class="memproto">
396
<table class="memname">
398
<td class="memname">void IpeReference::SnapBnd </td>
400
<td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
401
<td class="paramname"> <em>mouse</em>, </td>
404
<td class="paramkey"></td>
406
<td class="paramtype">const <a class="el" href="class_ipe_matrix.html">IpeMatrix</a> & </td>
407
<td class="paramname"> <em>m</em>, </td>
410
<td class="paramkey"></td>
412
<td class="paramtype"><a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
413
<td class="paramname"> <em>pos</em>, </td>
416
<td class="paramkey"></td>
418
<td class="paramtype">double & </td>
419
<td class="paramname"> <em>bound</em></td><td> </td>
424
<td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
431
Compute boundary snapping position for transformed object.
433
Looks only for positions closer than <em>bound</em>. If successful, modify <em>pos</em> and <em>bound</em>. The default implementation does nothing.
435
Reimplemented from <a class="el" href="class_ipe_object.html#f72b15786e9028360d2a44fc8c3c9820">IpeObject</a>.
438
<a class="anchor" name="b1be572e953189f128ad94077ae1ddcd"></a><!-- doxytag: member="IpeReference::CheckStyle" ref="b1be572e953189f128ad94077ae1ddcd" args="(const IpeStyleSheet *sheet, IpeAttributeSeq &seq) const" -->
439
<div class="memitem">
440
<div class="memproto">
441
<table class="memname">
443
<td class="memname">void IpeReference::CheckStyle </td>
445
<td class="paramtype">const <a class="el" href="class_ipe_style_sheet.html">IpeStyleSheet</a> * </td>
446
<td class="paramname"> <em>sheet</em>, </td>
449
<td class="paramkey"></td>
451
<td class="paramtype"><a class="el" href="group__attr.html#g8592bdde9e4ad7b2ad81f5dd2638e43c">IpeAttributeSeq</a> & </td>
452
<td class="paramname"> <em>seq</em></td><td> </td>
457
<td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
464
Check symbolic attributes of object.
468
Reimplemented from <a class="el" href="class_ipe_object.html#f441daae5d1e1a89a5002d80cf2c5c22">IpeObject</a>.
471
<a class="anchor" name="5f3dd23e14040d5f477e5825fc71cb1b"></a><!-- doxytag: member="IpeReference::Name" ref="5f3dd23e14040d5f477e5825fc71cb1b" args="() const" -->
472
<div class="memitem">
473
<div class="memproto">
474
<table class="memname">
476
<td class="memname"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpeReference::Name </td>
478
<td class="paramname"> </td>
479
<td> ) </td>
480
<td width="100%"> const<code> [inline]</code></td>
487
Return symbolic name.
492
<a class="anchor" name="ea92229f8866e9007423efa0cb687d1d"></a><!-- doxytag: member="IpeReference::Object" ref="ea92229f8866e9007423efa0cb687d1d" args="() const" -->
493
<div class="memitem">
494
<div class="memproto">
495
<table class="memname">
497
<td class="memname">const <a class="el" href="class_ipe_object.html">IpeObject</a>* IpeReference::Object </td>
499
<td class="paramname"> </td>
500
<td> ) </td>
501
<td width="100%"> const<code> [inline]</code></td>
508
Return pointer to cached object.
513
<hr>The documentation for this class was generated from the following files:<ul>
514
<li>iperef.h<li>iperef.cpp</ul>