Sophie

Sophie

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

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::WCssTemplateRule 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_1WCssTemplateRule.html">WCssTemplateRule</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::WCssTemplateRule Class Reference<div class="ingroups"><a class="el" href="group__style.html">Style classes</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Wt::WCssTemplateRule" --><!-- doxytag: inherits="Wt::WCssRule" -->
<p>A CSS rule based on a template widget.  
 <a href="classWt_1_1WCssTemplateRule.html#details">More...</a></p>

<p><code>#include &lt;Wt/WCssStyleSheet&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Wt::WCssTemplateRule:</div>
<div class="dyncontent">
<div class="center"><img src="classWt_1_1WCssTemplateRule__inherit__graph.png" border="0" usemap="#Wt_1_1WCssTemplateRule_inherit__map" alt="Inheritance graph"/></div>
<map name="Wt_1_1WCssTemplateRule_inherit__map" id="Wt_1_1WCssTemplateRule_inherit__map">
<area shape="rect" href="classWt_1_1WCssRule.html" title="Abstract rule in a CSS style sheet." alt="" coords="32,80,139,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="37,5,133,32"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classWt_1_1WCssTemplateRule-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">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WCssTemplateRule.html#a1d8a131df0dbe30368cb68b1653f6031">WCssTemplateRule</a> (const std::string &amp;selector, <a class="el" href="classWt_1_1WObject.html">WObject</a> *parent=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a CSS rule with a given selector.  <a href="#a1d8a131df0dbe30368cb68b1653f6031"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WCssTemplateRule.html#aebf91a4bcb9c9b737e20ce6177624553">templateWidget</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the widget that is used as a template.  <a href="#aebf91a4bcb9c9b737e20ce6177624553"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WCssTemplateRule.html#ab10a2ebfc6f80cf3357c963716868598">declarations</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the declarations.  <a href="#ab10a2ebfc6f80cf3357c963716868598"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A CSS rule based on a template widget. </p>
<p>This is a CSS rule whose CSS style properties are defined based on properties of a template widget. When modifying the template widget, these changes are reflected on the CSS rule and thus all widgets that have this CSS rule.</p>
<p>Usage example: </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classWt_1_1WCssTemplateRule.html" title="A CSS rule based on a template widget.">Wt::WCssTemplateRule</a> *styleRule = <span class="keyword">new</span> <a class="code" href="classWt_1_1WCssTemplateRule.html#a1d8a131df0dbe30368cb68b1653f6031" title="Creates a CSS rule with a given selector.">Wt::WCssTemplateRule</a>(<span class="stringliteral">&quot;#&quot;</span> + <span class="keywordtype">id</span>() + <span class="stringliteral">&quot; .item&quot;</span>);
 <a class="code" href="classWt_1_1WApplication.html#a38d922da0a0d83395519f3eaab85d0f6" title="Returns the current application instance.">Wt::WApplication::instance</a>()-&gt;styleSheet().addRule(styleRule);

 styleRule-&gt;<a class="code" href="classWt_1_1WCssTemplateRule.html#aebf91a4bcb9c9b737e20ce6177624553" title="Returns the widget that is used as a template.">templateWidget</a>()-&gt;resize(100, <a class="code" href="classWt_1_1WLength.html#a0cf39ca4225776879d56ade60320c31a" title="An &#39;auto&#39; length.">WLength::Auto</a>);
 styleRule-&gt;<a class="code" href="classWt_1_1WCssTemplateRule.html#aebf91a4bcb9c9b737e20ce6177624553" title="Returns the widget that is used as a template.">templateWidget</a>()-&gt;decorationStyle().setCursor(<a class="code" href="namespaceWt.html#a6dc0346a6ae888d6d4ab44f022e61eb6af860d39b9a2ba8f7d7359453bf15a37c" title="Pointing hand, CSS &#39;pointer&#39; cursor.">PointingHandCursor</a>);
</pre></div><dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WCssStyleSheet.html" title="A CSS style sheet.">Wt::WCssStyleSheet</a> </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a1d8a131df0dbe30368cb68b1653f6031"></a><!-- doxytag: member="Wt::WCssTemplateRule::WCssTemplateRule" ref="a1d8a131df0dbe30368cb68b1653f6031" args="(const std::string &amp;selector, WObject *parent=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Wt::WCssTemplateRule::WCssTemplateRule </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>selector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classWt_1_1WObject.html">WObject</a> *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a CSS rule with a given selector. </p>
<p>The selector should be a valid CSS selector.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>If you want to update the rule, then the selector should be unique and not contain commas, since this is not supported by Microsoft Internet Explorer. </dd></dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ab10a2ebfc6f80cf3357c963716868598"></a><!-- doxytag: member="Wt::WCssTemplateRule::declarations" ref="ab10a2ebfc6f80cf3357c963716868598" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::string Wt::WCssTemplateRule::declarations </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the declarations. </p>
<p>This is a semi-colon separated list of CSS declarations. </p>

<p>Implements <a class="el" href="classWt_1_1WCssRule.html#abe99bca6582d1ec43b7135f3a28956b4">Wt::WCssRule</a>.</p>

</div>
</div>
<a class="anchor" id="aebf91a4bcb9c9b737e20ce6177624553"></a><!-- doxytag: member="Wt::WCssTemplateRule::templateWidget" ref="aebf91a4bcb9c9b737e20ce6177624553" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * Wt::WCssTemplateRule::templateWidget </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the widget that is used as a template. </p>
<p>Various properties of the widget are reflected in the CSS style:</p>
<ul>
<li>size and dimensions: <a class="el" href="classWt_1_1WWidget.html#a5bebad8f1582b8bebf01a9ed0ee11972" title="Resizes the widget.">WWidget::resize()</a>, <a class="el" href="classWt_1_1WWidget.html#a092c7d1ecfde7f004ef120389d91775d" title="Sets a minimum size.">WWidget::setMinimumSize()</a>, and <a class="el" href="classWt_1_1WWidget.html#af023064cf8007bda6baeb5277d79bbd9" title="Sets a maximum size.">WWidget::setMaximumSize()</a></li>
<li>its position: <a class="el" href="classWt_1_1WWidget.html#ae15ffe92fdc5c394013d61b5bebb2f11" title="Sets the CSS position scheme.">WWidget::setPositionScheme()</a>, <a class="el" href="classWt_1_1WWidget.html#a0b60b3e6d868689071fe3f828d550ae2" title="Sets CSS offsets for a non-statically positioned widget.">WWidget::setOffsets()</a>, <a class="el" href="classWt_1_1WWidget.html#a2915d313e6934173c087bf8212024289" title="Specifies a CSS float side.">WWidget::setFloatSide()</a>, <a class="el" href="classWt_1_1WWidget.html#a1919e2e3628bb4e4b74517605b5062c5" title="Sets the sides that should be cleared of floats.">WWidget::setClearSides()</a></li>
<li>visibility: <a class="el" href="classWt_1_1WWidget.html#a0825c3ccbd4999afc1a88fafa6aa6fc7" title="Hides the widget.">WWidget::hide()</a>, <a class="el" href="classWt_1_1WWidget.html#a52dcef5a385ddfa0a8c3e6c20000f181" title="Shows the widget.">WWidget::show()</a> and <a class="el" href="classWt_1_1WWidget.html#a66bdda41220267a8c7ff9865996e2675" title="Hides or shows the widget.">WWidget::setHidden()</a></li>
<li>margins: <a class="el" href="classWt_1_1WWidget.html#aa4f27573eae7875d0fc538e37bc191a0" title="Sets CSS margins around the widget.">WWidget::setMargin()</a></li>
<li>line height: <a class="el" href="classWt_1_1WWidget.html#a0763f0e672e5cf673141405dc8e796bb" title="Sets the CSS line height for contained text.">WWidget::setLineHeight()</a></li>
<li>all decoration style properties: <a class="el" href="classWt_1_1WWidget.html#ac1833c7c01599b3733712ab0bf3c3a0a" title="Returns the decoration style of this widget.">WWidget::decorationStyle()</a></li>
</ul>
<p>When modifying one of these properties of the returned widget, the rule will be updated accordingly. </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>