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
|
<!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::WCssTemplateRule 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_1WCssTemplateRule.html">WCssTemplateRule</a>
</div>
</div>
<div class="contents">
<h1>Wt::WCssTemplateRule Class Reference<br>
<small>
[<a class="el" href="group__style.html">Style classes</a>]</small>
</h1><!-- doxytag: class="Wt::WCssTemplateRule" --><!-- doxytag: inherits="Wt::WCssRule" -->A CSS rule based on a template widget.
<a href="#_details">More...</a>
<p>
<code>#include <Wt/WCssStyleSheet></code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::WCssTemplateRule:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1WCssTemplateRule__inherit__graph.png" border="0" usemap="#Wt_1_1WCssTemplateRule__inherit__map" alt="Inheritance graph"></center>
<map name="Wt_1_1WCssTemplateRule__inherit__map">
<area shape="rect" href="classWt_1_1WCssRule.html" title="Abstract rule in a CSS style sheet." alt="" coords="32,5,139,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<p>
<a href="classWt_1_1WCssTemplateRule-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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WCssTemplateRule.html#e05ee2d960f007cda1db3fa3bc2db60d">WCssTemplateRule</a> (const std::string &selector)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a CSS rule with a given selector. <a href="#e05ee2d960f007cda1db3fa3bc2db60d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WCssTemplateRule.html#ebf91a4bcb9c9b737e20ce6177624553">templateWidget</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the widget that is used as a template. <a href="#ebf91a4bcb9c9b737e20ce6177624553"></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_1WCssTemplateRule.html#b10a2ebfc6f80cf3357c963716868598">declarations</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the declarations. <a href="#b10a2ebfc6f80cf3357c963716868598"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A CSS rule based on a template widget.
<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>
Usage example: <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" title="A CSS rule based on a template widget.">Wt::WCssTemplateRule</a>(<span class="stringliteral">"#"</span> + <span class="keywordtype">id</span>() + <span class="stringliteral">" .item"</span>);
<a class="code" href="classWt_1_1WApplication.html#38d922da0a0d83395519f3eaab85d0f6" title="Returns the current application instance.">Wt::WApplication::instance</a>()->styleSheet().addRule(styleRule);
styleRule-><a class="code" href="classWt_1_1WCssTemplateRule.html#ebf91a4bcb9c9b737e20ce6177624553" title="Returns the widget that is used as a template.">templateWidget</a>()->resize(100, <a class="code" href="classWt_1_1WLength.html#0cf39ca4225776879d56ade60320c31a" title="An &#39;auto&#39; length.">WLength::Auto</a>);
styleRule-><a class="code" href="classWt_1_1WCssTemplateRule.html#ebf91a4bcb9c9b737e20ce6177624553" title="Returns the widget that is used as a template.">templateWidget</a>()->decorationStyle().setCursor(<a class="code" href="namespaceWt.html#6dc0346a6ae888d6d4ab44f022e61eb6f860d39b9a2ba8f7d7359453bf15a37c" title="Pointing hand, CSS &#39;pointer&#39; cursor.">PointingHandCursor</a>);
</pre></div><p>
<dl class="see" compact><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>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="e05ee2d960f007cda1db3fa3bc2db60d"></a><!-- doxytag: member="Wt::WCssTemplateRule::WCssTemplateRule" ref="e05ee2d960f007cda1db3fa3bc2db60d" args="(const std::string &selector)" -->
<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 & </td>
<td class="paramname"> <em>selector</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates a CSS rule with a given selector.
<p>
The selector should be a valid CSS selector.<p>
<dl class="note" compact><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><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="ebf91a4bcb9c9b737e20ce6177624553"></a><!-- doxytag: member="Wt::WCssTemplateRule::templateWidget" ref="ebf91a4bcb9c9b737e20ce6177624553" 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>
Various properties of the widget are reflected in the CSS style:<ul>
<li>size and dimensions: <a class="el" href="classWt_1_1WWidget.html#5bebad8f1582b8bebf01a9ed0ee11972" title="Resizes the widget.">WWidget::resize()</a>, <a class="el" href="classWt_1_1WWidget.html#092c7d1ecfde7f004ef120389d91775d" title="Sets a minimum size.">WWidget::setMinimumSize()</a>, and <a class="el" href="classWt_1_1WWidget.html#f023064cf8007bda6baeb5277d79bbd9" title="Sets a maximum size.">WWidget::setMaximumSize()</a></li><li>its position: <a class="el" href="classWt_1_1WWidget.html#e15ffe92fdc5c394013d61b5bebb2f11" title="Sets the CSS position scheme.">WWidget::setPositionScheme()</a>, <a class="el" href="classWt_1_1WWidget.html#0b60b3e6d868689071fe3f828d550ae2" title="Sets CSS offsets for a non-statically positioned widget.">WWidget::setOffsets()</a>, <a class="el" href="classWt_1_1WWidget.html#2915d313e6934173c087bf8212024289" title="Specifies a CSS float side.">WWidget::setFloatSide()</a>, <a class="el" href="classWt_1_1WWidget.html#1919e2e3628bb4e4b74517605b5062c5" title="Sets the sides that should be cleared of floats.">WWidget::setClearSides()</a></li><li>visibility: <a class="el" href="classWt_1_1WWidget.html#0825c3ccbd4999afc1a88fafa6aa6fc7" title="Hides the widget.">WWidget::hide()</a>, <a class="el" href="classWt_1_1WWidget.html#52dcef5a385ddfa0a8c3e6c20000f181" title="Shows the widget.">WWidget::show()</a> and <a class="el" href="classWt_1_1WWidget.html#11bd299d9afd0d83f17ac454c85c43a2" title="Sets whether the widget is hidden.">WWidget::setHidden()</a></li><li>margins: <a class="el" href="classWt_1_1WWidget.html#a4f27573eae7875d0fc538e37bc191a0" title="Sets CSS margins around the widget.">WWidget::setMargin()</a></li><li>line height: <a class="el" href="classWt_1_1WWidget.html#0763f0e672e5cf673141405dc8e796bb" 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#c1833c7c01599b3733712ab0bf3c3a0a" 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.
</div>
</div><p>
<a class="anchor" name="b10a2ebfc6f80cf3357c963716868598"></a><!-- doxytag: member="Wt::WCssTemplateRule::declarations" ref="b10a2ebfc6f80cf3357c963716868598" 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>
This is a semi-colon separated list of CSS declarations.
<p>Implements <a class="el" href="classWt_1_1WCssRule.html#be99bca6582d1ec43b7135f3a28956b4">Wt::WCssRule</a>.</p>
</div>
</div><p>
</div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:06 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>
|