1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Wt: Wt::WImage Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="namespaceWt.html">Wt</a>::<a class="el" href="classWt_1_1WImage.html">WImage</a>
</div>
</div>
<div class="contents">
<h1>Wt::WImage Class Reference</h1><!-- doxytag: class="Wt::WImage" --><!-- doxytag: inherits="Wt::WInteractWidget" -->A widget that displays an image.
<a href="#_details">More...</a>
<p>
<code>#include <Wt/WImage></code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::WImage:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1WImage__inherit__graph.png" border="0" usemap="#Wt_1_1WImage__inherit__map" alt="Inheritance graph"></center>
<map name="Wt_1_1WImage__inherit__map">
<area shape="rect" href="classWt_1_1WInteractWidget.html" title="An abstract widget that can receive user-interface interaction." alt="" coords="5,229,147,256"><area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="15,155,137,181"><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user-interface component." alt="" coords="28,80,124,107"><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="28,5,124,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<p>
<a href="classWt_1_1WImage-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3566a1fb818f5a57c4cc0d298cc71c7"></a><!-- doxytag: member="Wt::WImage::WImage" ref="a3566a1fb818f5a57c4cc0d298cc71c7" args="(WContainerWidget *parent=0)" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#a3566a1fb818f5a57c4cc0d298cc71c7">WImage</a> (<a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates an empty image widget. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="42eea962cef07ec071ebae0518d1b48d"></a><!-- doxytag: member="Wt::WImage::WImage" ref="42eea962cef07ec071ebae0518d1b48d" args="(const std::string &imageRef, WContainerWidget *parent=0)" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#42eea962cef07ec071ebae0518d1b48d">WImage</a> (const std::string &imageRef, <a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates an image widget with given image URL. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3482c9d00484accd1c81fb715c767f6f"></a><!-- doxytag: member="Wt::WImage::WImage" ref="3482c9d00484accd1c81fb715c767f6f" args="(const std::string &imageRef, const WString &altText, WContainerWidget *parent=0)" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#3482c9d00484accd1c81fb715c767f6f">WImage</a> (const std::string &imageRef, const <a class="el" href="classWt_1_1WString.html">WString</a> &altText, <a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates an image widget with given image URL and alternate text. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#bf4394e0350e28074875dcbd3ce30ff6">WImage</a> (<a class="el" href="classWt_1_1WResource.html">WResource</a> *resource, const <a class="el" href="classWt_1_1WString.html">WString</a> &altText, <a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates an image widget with given image resource and alternate text. <a href="#bf4394e0350e28074875dcbd3ce30ff6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#fa619104c48e0152f5847d72a5397fc3">setAlternateText</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &text)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets an alternate text. <a href="#fa619104c48e0152f5847d72a5397fc3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#fb3144944ad2203d35d08c29bab7111a">alternateText</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the alternate text. <a href="#fb3144944ad2203d35d08c29bab7111a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#cea9ce518f4eec6b19fd4bacc44a52e8">setImageRef</a> (const std::string &url)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the image URL. <a href="#cea9ce518f4eec6b19fd4bacc44a52e8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#e3a7a79cd15e7aa7e4e7c3a72873bc68">imageRef</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the image URL. <a href="#e3a7a79cd15e7aa7e4e7c3a72873bc68"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#509a0636d08916dc14bc1d6eefa79c58">setResource</a> (<a class="el" href="classWt_1_1WResource.html">WResource</a> *resource)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the image resource. <a href="#509a0636d08916dc14bc1d6eefa79c58"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1WResource.html">WResource</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#2ae66c010a7c8c0fffc772c8dd36f91c">resource</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the image resource. <a href="#2ae66c010a7c8c0fffc772c8dd36f91c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#a5737b44a5161b8494b2691c20315417">addArea</a> (<a class="el" href="classWt_1_1WAbstractArea.html">WAbstractArea</a> *area)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds an interactive area. <a href="#a5737b44a5161b8494b2691c20315417"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#32baad2b361ff4660a8354a98e998535">insertArea</a> (int index, <a class="el" href="classWt_1_1WAbstractArea.html">WAbstractArea</a> *area)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Inserts an interactive area. <a href="#32baad2b361ff4660a8354a98e998535"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#79b9dedd023e423b1b2575588ed7ff51">removeArea</a> (<a class="el" href="classWt_1_1WAbstractArea.html">WAbstractArea</a> *area)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes an interactive area. <a href="#79b9dedd023e423b1b2575588ed7ff51"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1WAbstractArea.html">WAbstractArea</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#d1900179902128ddd3d26922c33a3b97">area</a> (int index) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the interactive area at the given index. <a href="#d1900179902128ddd3d26922c33a3b97"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const std::vector<br>
< <a class="el" href="classWt_1_1WAbstractArea.html">WAbstractArea</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#e2dca02b06799eacebc7474569c234b5">areas</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the interactive areas set for this widget. <a href="#e2dca02b06799eacebc7474569c234b5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="54258a16b4ff221694fd79701ce8cd98"></a><!-- doxytag: member="Wt::WImage::imageLoaded" ref="54258a16b4ff221694fd79701ce8cd98" args="()" -->
<a class="el" href="classWt_1_1EventSignal.html">EventSignal</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WImage.html#54258a16b4ff221694fd79701ce8cd98">imageLoaded</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Event emitted when the image was loaded. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A widget that displays an image.
<p>
The image may be specified either as a URL, or may be dynamically generated by a <a class="el" href="classWt_1_1WResource.html" title="An object which can be rendered in the HTTP protocol.">WResource</a>.<p>
You may listen to events by attaching event listeners to signals such as <a class="el" href="classWt_1_1WInteractWidget.html#e11e050cce0d4a8f742afa3ef92bfe8c" title="Event signal emitted when a mouse key was clicked on this widget.">clicked()</a>. Since mouse events pass the coordinates through a <a class="el" href="classWt_1_1WMouseEvent.html" title="A class providing details for a mouse event.">WMouseEvent</a> object, it is possible to react to clicks in specific parts of the image. An alternative is to define interactive areas on the image using <a class="el" href="classWt_1_1WImage.html#a5737b44a5161b8494b2691c20315417" title="Adds an interactive area.">addArea()</a>, which in addition allows to have customized tool tips for certain image areas (using <a class="el" href="classWt_1_1WAbstractArea.html#310e8e1d6360d22bf8bf0e484a52b8f9" title="Sets the tooltip.">WAbstractArea::setToolTip()</a>).<p>
Usage example: <div class="fragment"><pre class="fragment"> <a class="code" href="classWt_1_1WImage.html" title="A widget that displays an image.">Wt::WImage</a> *img = <span class="keyword">new</span> <a class="code" href="classWt_1_1WImage.html" title="A widget that displays an image.">Wt::WImage</a>(<span class="stringliteral">"images/johnny_cash.png"</span>, <span class="keyword">this</span>);
img-><a class="code" href="classWt_1_1WImage.html#fa619104c48e0152f5847d72a5397fc3" title="Sets an alternate text.">setAlternateText</a>(<span class="stringliteral">"Johnny Cash sings a song"</span>);
</pre></div><p>
WImage is an <a class="el" href="classWt_1_1WWidget.html#c78e3af143883334c82031790c87416e">inline </a> widget.<p>
<h3>CSS</h3>
<p>
The widget corresponds to the HTML <code><img></code> tag and does not provide styling. It can be styled using inline or external CSS as appropriate.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WResource.html" title="An object which can be rendered in the HTTP protocol.">WResource</a>, <a class="el" href="classWt_1_1WPaintedWidget.html" title="A widget that is painted using vector graphics.">WPaintedWidget</a> </dd></dl>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="bf4394e0350e28074875dcbd3ce30ff6"></a><!-- doxytag: member="Wt::WImage::WImage" ref="bf4394e0350e28074875dcbd3ce30ff6" args="(WResource *resource, const WString &altText, WContainerWidget *parent=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Wt::WImage::WImage </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WResource.html">WResource</a> * </td>
<td class="paramname"> <em>resource</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td>
<td class="paramname"> <em>altText</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> * </td>
<td class="paramname"> <em>parent</em> = <code>0</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates an image widget with given image resource and alternate text.
<p>
Use this constructor if you want to present a dynamically generated image.
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="fa619104c48e0152f5847d72a5397fc3"></a><!-- doxytag: member="Wt::WImage::setAlternateText" ref="fa619104c48e0152f5847d72a5397fc3" args="(const WString &text)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WImage::setAlternateText </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td>
<td class="paramname"> <em>text</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets an alternate text.
<p>
The alternate text should provide a fallback for browsers that do not display an image. If no sensible fallback text can be provided, an empty text is preferred over nonsense.<p>
This should not be confused with <a class="el" href="classWt_1_1WWebWidget.html#7b851debbfba51f0b9a011ca42b08c8c" title="Returns the tooltip.">toolTip()</a> text, which provides additional information that is displayed when the mouse hovers over the image.<p>
The default alternate text is an empty text ("").<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WImage.html#fb3144944ad2203d35d08c29bab7111a" title="Returns the alternate text.">alternateText()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="fb3144944ad2203d35d08c29bab7111a"></a><!-- doxytag: member="Wt::WImage::alternateText" ref="fb3144944ad2203d35d08c29bab7111a" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classWt_1_1WString.html">WString</a>& Wt::WImage::alternateText </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the alternate text.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WImage.html#fa619104c48e0152f5847d72a5397fc3" title="Sets an alternate text.">setAlternateText()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="cea9ce518f4eec6b19fd4bacc44a52e8"></a><!-- doxytag: member="Wt::WImage::setImageRef" ref="cea9ce518f4eec6b19fd4bacc44a52e8" args="(const std::string &url)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WImage::setImageRef </td>
<td>(</td>
<td class="paramtype">const std::string & </td>
<td class="paramname"> <em>url</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the image URL.
<p>
This should not be used when the image is specified as a resource.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WImage.html#509a0636d08916dc14bc1d6eefa79c58" title="Sets the image resource.">setResource()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="e3a7a79cd15e7aa7e4e7c3a72873bc68"></a><!-- doxytag: member="Wt::WImage::imageRef" ref="e3a7a79cd15e7aa7e4e7c3a72873bc68" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const std::string Wt::WImage::imageRef </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the image URL.
<p>
When the image is specified as a resource, this returns the current resource URL.
</div>
</div><p>
<a class="anchor" name="509a0636d08916dc14bc1d6eefa79c58"></a><!-- doxytag: member="Wt::WImage::setResource" ref="509a0636d08916dc14bc1d6eefa79c58" args="(WResource *resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WImage::setResource </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WResource.html">WResource</a> * </td>
<td class="paramname"> <em>resource</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the image resource.
<p>
A resource specifies application-dependent content, which may be used to generate an image on demand.<p>
This sets <code>resource</code> as the contents for the image, as an alternative to <a class="el" href="classWt_1_1WImage.html#cea9ce518f4eec6b19fd4bacc44a52e8" title="Sets the image URL.">setImageRef()</a>. The resource may be cleared by passing <code>resource</code> = <code>0</code>.<p>
The image does not assume ownership of the resource.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WImage.html#cea9ce518f4eec6b19fd4bacc44a52e8" title="Sets the image URL.">setImageRef()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="2ae66c010a7c8c0fffc772c8dd36f91c"></a><!-- doxytag: member="Wt::WImage::resource" ref="2ae66c010a7c8c0fffc772c8dd36f91c" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WResource.html">WResource</a>* Wt::WImage::resource </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the image resource.
<p>
Returns <code>0</code> if no image resource was set.
</div>
</div><p>
<a class="anchor" name="a5737b44a5161b8494b2691c20315417"></a><!-- doxytag: member="Wt::WImage::addArea" ref="a5737b44a5161b8494b2691c20315417" args="(WAbstractArea *area)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WImage::addArea </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WAbstractArea.html">WAbstractArea</a> * </td>
<td class="paramname"> <em>area</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Adds an interactive area.
<p>
Adds the <code>area</code> which listens to events in a specific region of the image. Areas are organized in an indexed list, to which the given <code>area</code> is appended. When areas overlap, the area with the lowest index receives the event.<p>
Ownership of the <code>area</code> is transferred to the image.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WImage.html#32baad2b361ff4660a8354a98e998535" title="Inserts an interactive area.">insertArea(int, WAbstractArea *)</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="32baad2b361ff4660a8354a98e998535"></a><!-- doxytag: member="Wt::WImage::insertArea" ref="32baad2b361ff4660a8354a98e998535" args="(int index, WAbstractArea *area)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WImage::insertArea </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>index</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classWt_1_1WAbstractArea.html">WAbstractArea</a> * </td>
<td class="paramname"> <em>area</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Inserts an interactive area.
<p>
Inserts the <code>area</code> which listens to events in the coresponding area of the image. Areas are organized in a list, and the <em>area</em> is inserted at index <code>index</code>. When areas overlap, the area with the lowest index receives the event.<p>
Ownership of the <code>Area</code> is transferred to the image.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WImage.html#a5737b44a5161b8494b2691c20315417" title="Adds an interactive area.">addArea(WAbstractArea *)</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="79b9dedd023e423b1b2575588ed7ff51"></a><!-- doxytag: member="Wt::WImage::removeArea" ref="79b9dedd023e423b1b2575588ed7ff51" args="(WAbstractArea *area)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WImage::removeArea </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WAbstractArea.html">WAbstractArea</a> * </td>
<td class="paramname"> <em>area</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Removes an interactive area.
<p>
Removes the <code>area</code> from this widget, and also returns the ownership.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WImage.html#a5737b44a5161b8494b2691c20315417" title="Adds an interactive area.">addArea(WAbstractArea *)</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="d1900179902128ddd3d26922c33a3b97"></a><!-- doxytag: member="Wt::WImage::area" ref="d1900179902128ddd3d26922c33a3b97" args="(int index) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WAbstractArea.html">WAbstractArea</a> * Wt::WImage::area </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>index</em> </td>
<td> ) </td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the interactive area at the given index.
<p>
Returns <code>0</code> if <code>index</code> was invalid.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WImage.html#32baad2b361ff4660a8354a98e998535" title="Inserts an interactive area.">insertArea(int, WAbstractArea *)</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="e2dca02b06799eacebc7474569c234b5"></a><!-- doxytag: member="Wt::WImage::areas" ref="e2dca02b06799eacebc7474569c234b5" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const std::vector< <a class="el" href="classWt_1_1WAbstractArea.html">WAbstractArea</a> * > Wt::WImage::areas </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the interactive areas set for this widget.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WImage.html#a5737b44a5161b8494b2691c20315417" title="Adds an interactive area.">addArea()</a> </dd></dl>
</div>
</div><p>
</div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:07 2010 for <a href="http://www.webtoolkit.eu/wt/">Wt</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address>
</body>
</html>
|