Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > b3a1f4d91c26f535919e39e25606614a > files > 1748

wt-doc-3.2.3-1.fc18.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Wt: Wt::WFlashObject Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Wt
   &#160;<span id="projectnumber">3.2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceWt.html">Wt</a>      </li>
      <li class="navelem"><a class="el" href="classWt_1_1WFlashObject.html">WFlashObject</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Wt::WFlashObject Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Wt::WFlashObject" --><!-- doxytag: inherits="Wt::WWebWidget" -->
<p>A widget that renders a Flash object (also known as Flash movie).  
 <a href="classWt_1_1WFlashObject.html#details">More...</a></p>

<p><code>#include &lt;Wt/WFlashObject&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Wt::WFlashObject:</div>
<div class="dyncontent">
<div class="center"><img src="classWt_1_1WFlashObject__inherit__graph.png" border="0" usemap="#Wt_1_1WFlashObject_inherit__map" alt="Inheritance graph"/></div>
<map name="Wt_1_1WFlashObject_inherit__map" id="Wt_1_1WFlashObject_inherit__map">
<area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="5,155,133,181"/><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user&#45;interface component." alt="" coords="20,80,119,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="21,5,117,32"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classWt_1_1WFlashObject-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1ba25b0dc80aaea9bf6bebddb4566297"></a><!-- doxytag: member="Wt::WFlashObject::WFlashObject" ref="a1ba25b0dc80aaea9bf6bebddb4566297" args="(const std::string &amp;url, WContainerWidget *parent=0)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFlashObject.html#a1ba25b0dc80aaea9bf6bebddb4566297">WFlashObject</a> (const std::string &amp;url, <a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a Flash widget. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFlashObject.html#ab171e2e30fe09b82db7e97b9b9589265">~WFlashObject</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#ab171e2e30fe09b82db7e97b9b9589265"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFlashObject.html#ad4cb831ed24e824d7feeb2426994e2e3">resize</a> (const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;width, const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;height)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Resizes the widget.  <a href="#ad4cb831ed24e824d7feeb2426994e2e3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFlashObject.html#af5b66c371c595a6c749535280c2823e7">setFlashParameter</a> (const std::string &amp;name, const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a Flash parameter.  <a href="#af5b66c371c595a6c749535280c2823e7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFlashObject.html#a00d24cf3b700d448f504279b4c3f2501">setFlashVariable</a> (const std::string &amp;name, const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a Flash variable.  <a href="#a00d24cf3b700d448f504279b4c3f2501"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFlashObject.html#afca00f0fe23c516684b7505bbbf8af62">jsFlashRef</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A JavaScript expression that returns the DOM node of the Flash object.  <a href="#afca00f0fe23c516684b7505bbbf8af62"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFlashObject.html#a00676cbb898bc23f09548c332121a67a">setAlternativeContent</a> (<a class="el" href="classWt_1_1WWidget.html">WWidget</a> *alternative)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets content to be displayed if Flash is not available.  <a href="#a00676cbb898bc23f09548c332121a67a"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A widget that renders a Flash object (also known as Flash movie). </p>
<p>This class loads a .swf Flash file in the browser.</p>
<p>Usage example: </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classWt_1_1WFlashObject.html#a1ba25b0dc80aaea9bf6bebddb4566297" title="Constructs a Flash widget.">WFlashObject</a> *player = <span class="keyword">new</span> <a class="code" href="classWt_1_1WFlashObject.html#a1ba25b0dc80aaea9bf6bebddb4566297" title="Constructs a Flash widget.">WFlashObject</a>(<span class="stringliteral">&quot;dummy.swf&quot;</span>, parent);
 player-&gt;resize(300, 600);
 player-&gt;setFlashParameter(<span class="stringliteral">&quot;allowScriptAccess&quot;</span>, <span class="stringliteral">&quot;always&quot;</span>);
 player-&gt;setFlashParameter(<span class="stringliteral">&quot;quality&quot;</span>, <span class="stringliteral">&quot;high&quot;</span>);
 player-&gt;setFlashParameter(<span class="stringliteral">&quot;bgcolor&quot;</span>, <span class="stringliteral">&quot;#aaaaaa&quot;</span>);
 player-&gt;setFlashVariable(<span class="stringliteral">&quot;someVar&quot;</span>, <span class="stringliteral">&quot;foo&quot;</span>);
</pre></div><p>Flash objects must have their size set, so do not forget to call <a class="el" href="classWt_1_1WFlashObject.html#ad4cb831ed24e824d7feeb2426994e2e3" title="Resizes the widget.">resize()</a> after instantiation or your content will be invisible. Wt will modify width and height attributes of the Flash object if <a class="el" href="classWt_1_1WFlashObject.html#ad4cb831ed24e824d7feeb2426994e2e3" title="Resizes the widget.">resize()</a> is called after the object is instantiated; it is however not clear if this is permitted by the Flash plugin.</p>
<p>Any <a class="el" href="classWt_1_1WWidget.html" title="The abstract base class for a user-interface component.">WWidget</a> can be set with <a class="el" href="classWt_1_1WFlashObject.html#a00676cbb898bc23f09548c332121a67a" title="Sets content to be displayed if Flash is not available.">setAlternativeContent()</a>, and this widget will be shown only when the browser has no Flash support. By default, a 'Download Flash' button will be displayed that links to a website where the Flash player can be downloaded. You may modify this to be any widget, such as a <a class="el" href="classWt_1_1WImage.html" title="A widget that displays an image.">WImage</a>, or a native Wt implementation of the Flash movie.</p>
<h3>CSS</h3>
<p>Styling through CSS is not applicable. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab171e2e30fe09b82db7e97b9b9589265"></a><!-- doxytag: member="Wt::WFlashObject::~WFlashObject" ref="ab171e2e30fe09b82db7e97b9b9589265" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Wt::WFlashObject::~WFlashObject </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>
<p>The Flash object is removed. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="afca00f0fe23c516684b7505bbbf8af62"></a><!-- doxytag: member="Wt::WFlashObject::jsFlashRef" ref="afca00f0fe23c516684b7505bbbf8af62" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string Wt::WFlashObject::jsFlashRef </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A JavaScript expression that returns the DOM node of the Flash object. </p>
<p>The Flash object is not stored in <a class="el" href="classWt_1_1WWidget.html#aa2b7078b3b43d53a85e5244b45d504f7" title="Returns a JavaScript expression to the corresponding DOM node.">jsRef()</a>, but in <a class="el" href="classWt_1_1WFlashObject.html#afca00f0fe23c516684b7505bbbf8af62" title="A JavaScript expression that returns the DOM node of the Flash object.">jsFlashRef()</a>. Use this method in conjuction with <a class="el" href="classWt_1_1WApplication.html#a2a92457b9212cef4057cb54e56183967" title="Executes some JavaScript code.">WApplication::doJavaScript()</a> or <a class="el" href="classWt_1_1JSlot.html" title="A slot that is only implemented in client side JavaScript code.">JSlot</a> in custom JavaScript code to refer to the Flash content.</p>
<p>The expression returned by <a class="el" href="classWt_1_1WFlashObject.html#afca00f0fe23c516684b7505bbbf8af62" title="A JavaScript expression that returns the DOM node of the Flash object.">jsFlashRef()</a> may be null, for example on IE when flash is not installed. </p>

</div>
</div>
<a class="anchor" id="ad4cb831ed24e824d7feeb2426994e2e3"></a><!-- doxytag: member="Wt::WFlashObject::resize" ref="ad4cb831ed24e824d7feeb2426994e2e3" args="(const WLength &amp;width, const WLength &amp;height)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WFlashObject::resize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Resizes the widget. </p>
<p>Specifies a fixed size for this widget, setting CSS <code>width</code> and <code>height</code> properties. By default a widget has automatic width and height, which sets a size for the widget following CSS rules.</p>
<p>When the widget is not managed by a layout manager, the automatic (natural) size of a widget depends on whether they widget is a <em>block</em> or <em>inline</em> widget:</p>
<ul>
<li>a <em>block</em> widget takes by default the width of the parent, and the height that it needs based on its contents</li>
<li>an <em>inline</em> widget takes the width and height that it needs based on its contents (possibly wrapping over multiple lines). The width and height of an inline widget cannot be changed (by the letter of CSS, although most browsers will react to it in varying ways).</li>
</ul>
<p>When inserted in a layout manager, the size set will be used as a widget's preferred size, but the widget may be given a different size by the layout manager based on available space and stretch factors. The actual size given by a layout manager may be retrieved by making the widget "layout size aware", using <a class="el" href="classWt_1_1WWidget.html#a4f83592912a7f8fa4fd35dadde78ee74" title="Sets the widget to be aware of its size set by a layout manager.">setLayoutSizeAware()</a>. If you have defined a <code>"wtResize()"</code> JavaScript method for the widget, then this method will also be called.</p>
<p>The default width and height of a widget is <a class="el" href="classWt_1_1WLength.html#a0cf39ca4225776879d56ade60320c31a" title="An &#39;auto&#39; length.">WLength::Auto</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WWebWidget.html#a66ea6d827d488a855abc7a36d8d414ca" title="Returns the width.">width()</a>, <a class="el" href="classWt_1_1WWebWidget.html#a890a25fe2e8567525f44c0d2ecf0547b" title="Returns the height.">height()</a> </dd></dl>

<p>Reimplemented from <a class="el" href="classWt_1_1WWebWidget.html#a4762c1aa0b5788e54a52270674f21e23">Wt::WWebWidget</a>.</p>

</div>
</div>
<a class="anchor" id="a00676cbb898bc23f09548c332121a67a"></a><!-- doxytag: member="Wt::WFlashObject::setAlternativeContent" ref="a00676cbb898bc23f09548c332121a67a" args="(WWidget *alternative)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WFlashObject::setAlternativeContent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> *&#160;</td>
          <td class="paramname"><em>alternative</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets content to be displayed if Flash is not available. </p>
<p>Any widget can be a placeholder when Flash is not installed in the users browser. By default, this will show a 'Download Flash' button and link to the Flash download site.</p>
<p>Call this method with a NULL pointer to remove the alternative content. </p>

</div>
</div>
<a class="anchor" id="af5b66c371c595a6c749535280c2823e7"></a><!-- doxytag: member="Wt::WFlashObject::setFlashParameter" ref="af5b66c371c595a6c749535280c2823e7" args="(const std::string &amp;name, const WString &amp;value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WFlashObject::setFlashParameter </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets a Flash parameter. </p>
<p>The Flash parameters are items such as quality, scale, menu, ... They are passed as PARAM objects to the Flash movie. See the adobe website for more information about these parameters: <a href="http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_12701">http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_12701</a></p>
<p>Setting the same Flash parameter a second time will overwrite the previous value. Flash parameters can only be set before the widget is rendered for the first time, so it is recommended to call this method shortly after construction before returning to the idle loop. </p>

</div>
</div>
<a class="anchor" id="a00d24cf3b700d448f504279b4c3f2501"></a><!-- doxytag: member="Wt::WFlashObject::setFlashVariable" ref="a00d24cf3b700d448f504279b4c3f2501" args="(const std::string &amp;name, const WString &amp;value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WFlashObject::setFlashVariable </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets a Flash variable. </p>
<p>This method is a helper function to set variable values in the flashvars parameter.</p>
<p>The flash variables will be properly encoded (URL encoding) before being passed to the flashvars parameter.</p>
<p>Setting the same Flash variable a second time will overwrite the previous value. Flash variables can only be set before the widget is rendered for the first time, so it is recommended to call this method shortly after construction before returning to the idle loop. </p>

</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr size="1"><address style="text-align: right; margin: 3px"><small>
Generated on Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the
C++ Web Toolkit (Wt)</a> by&nbsp;<a
href="http://www.doxygen.org/index.html"><img src="doxygen.png"
alt="doxygen" border="0" style="vertical-align: middle; display:
inline-block; height: 2em"></a> 1.7.5.1</small></address>
</body>
</html>