File: classWt_1_1WLength.html

package info (click to toggle)
witty 3.1.2-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 45,512 kB
  • ctags: 35,832
  • sloc: cpp: 69,469; ansic: 66,945; xml: 4,383; sh: 594; perl: 108; makefile: 106
file content (299 lines) | stat: -rw-r--r-- 17,856 bytes parent folder | download
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
<!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::WLength 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&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceWt.html">Wt</a>::<a class="el" href="classWt_1_1WLength.html">WLength</a>
  </div>
</div>
<div class="contents">
<h1>Wt::WLength Class Reference</h1><!-- doxytag: class="Wt::WLength" -->A class that specifies a CSS length.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;Wt/WLength&gt;</code>
<p>

<p>
<a href="classWt_1_1WLength-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 Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c0">Unit</a> { <br>
&nbsp;&nbsp;<a class="el" href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c03c8be5b087b150df97498adf7a69342f">FontEm</a>, 
<a class="el" href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c0dcb9f05790b02548f1185fbceac6bd81">FontEx</a>, 
<a class="el" href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c00b1fa4c1bd7adb92e1a04d62b96d30ba">Pixel</a>, 
<a class="el" href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c07e715eece268ff7455eb7f80e049c839">Inch</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c092c81cba9e5ac72dd65295572da618c3">Centimeter</a>, 
<a class="el" href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c0160938d7f938d245ee31f5e34be0f6a2">Millimeter</a>, 
<a class="el" href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c0af7ad2af268eb2197f6ebd323a8a3ac4">Point</a>, 
<a class="el" href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c0ffd121933f44c8231c523747efa64a06">Pica</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c0304d9ef07db638690997830a7b348db1">Percentage</a>
<br>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The unit.  <a href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c0">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLength.html#d2a8e7901084735819bc1b29fdb9a930">WLength</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates an 'auto' length.  <a href="#d2a8e7901084735819bc1b29fdb9a930"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLength.html#1c06a75adecaa2dc0097e82f61a20e9a">WLength</a> (double value, <a class="el" href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c0">Unit</a> unit=Pixel)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a length with value and unit.  <a href="#1c06a75adecaa2dc0097e82f61a20e9a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLength.html#b4c9733029342fdbc1dee34a523ee40d">isAuto</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns whether the ength is 'auto'.  <a href="#b4c9733029342fdbc1dee34a523ee40d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLength.html#c4063de548d24148fda45a7bced29ef8">value</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the value.  <a href="#c4063de548d24148fda45a7bced29ef8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c0">Unit</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLength.html#37b71e44633dd09a63b8a1ebb06e9a27">unit</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the unit.  <a href="#37b71e44633dd09a63b8a1ebb06e9a27"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0a25adc9027a39ead32e06a201ffc00f"></a><!-- doxytag: member="Wt::WLength::cssText" ref="0a25adc9027a39ead32e06a201ffc00f" args="() const " -->
const std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLength.html#0a25adc9027a39ead32e06a201ffc00f">cssText</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the CSS text. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="45e8d143f73d728cac9c68b537edd2b4"></a><!-- doxytag: member="Wt::WLength::operator==" ref="45e8d143f73d728cac9c68b537edd2b4" args="(const WLength &amp;other) const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLength.html#45e8d143f73d728cac9c68b537edd2b4">operator==</a> (const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;other) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Comparison operator. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="42fb15b07a6ba7ab12c688f2f05209bc"></a><!-- doxytag: member="Wt::WLength::operator!=" ref="42fb15b07a6ba7ab12c688f2f05209bc" args="(const WLength &amp;other) const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLength.html#42fb15b07a6ba7ab12c688f2f05209bc">operator!=</a> (const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;other) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Comparison operator. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLength.html#3f4a8633434fd5190a60dd693f4a2021">toPixels</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the (approximate) length in pixels.  <a href="#3f4a8633434fd5190a60dd693f4a2021"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classWt_1_1WLength.html">WLength</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLength.html#0cf39ca4225776879d56ade60320c31a">Auto</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An 'auto' length.  <a href="#0cf39ca4225776879d56ade60320c31a"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A class that specifies a CSS length. 
<p>
The class combines a value with a unit. There is a special value <em>auto</em> which has a different meaning depending on the context. <hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="908caf5d6be7e244e24598e6d22cd4c0"></a><!-- doxytag: member="Wt::WLength::Unit" ref="908caf5d6be7e244e24598e6d22cd4c0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c0">Wt::WLength::Unit</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The unit. 
<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="908caf5d6be7e244e24598e6d22cd4c03c8be5b087b150df97498adf7a69342f"></a><!-- doxytag: member="FontEm" ref="908caf5d6be7e244e24598e6d22cd4c03c8be5b087b150df97498adf7a69342f" args="" -->FontEm</em>&nbsp;</td><td>
The relative font size. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="908caf5d6be7e244e24598e6d22cd4c0dcb9f05790b02548f1185fbceac6bd81"></a><!-- doxytag: member="FontEx" ref="908caf5d6be7e244e24598e6d22cd4c0dcb9f05790b02548f1185fbceac6bd81" args="" -->FontEx</em>&nbsp;</td><td>
The height of an 'x' in the font. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="908caf5d6be7e244e24598e6d22cd4c00b1fa4c1bd7adb92e1a04d62b96d30ba"></a><!-- doxytag: member="Pixel" ref="908caf5d6be7e244e24598e6d22cd4c00b1fa4c1bd7adb92e1a04d62b96d30ba" args="" -->Pixel</em>&nbsp;</td><td>
Pixel, relative to canvas resolution. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="908caf5d6be7e244e24598e6d22cd4c07e715eece268ff7455eb7f80e049c839"></a><!-- doxytag: member="Inch" ref="908caf5d6be7e244e24598e6d22cd4c07e715eece268ff7455eb7f80e049c839" args="" -->Inch</em>&nbsp;</td><td>
Inche. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="908caf5d6be7e244e24598e6d22cd4c092c81cba9e5ac72dd65295572da618c3"></a><!-- doxytag: member="Centimeter" ref="908caf5d6be7e244e24598e6d22cd4c092c81cba9e5ac72dd65295572da618c3" args="" -->Centimeter</em>&nbsp;</td><td>
Centimeter. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="908caf5d6be7e244e24598e6d22cd4c0160938d7f938d245ee31f5e34be0f6a2"></a><!-- doxytag: member="Millimeter" ref="908caf5d6be7e244e24598e6d22cd4c0160938d7f938d245ee31f5e34be0f6a2" args="" -->Millimeter</em>&nbsp;</td><td>
Millimeter. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="908caf5d6be7e244e24598e6d22cd4c0af7ad2af268eb2197f6ebd323a8a3ac4"></a><!-- doxytag: member="Point" ref="908caf5d6be7e244e24598e6d22cd4c0af7ad2af268eb2197f6ebd323a8a3ac4" args="" -->Point</em>&nbsp;</td><td>
Point (1/72 Inch). </td></tr>
<tr><td valign="top"><em><a class="anchor" name="908caf5d6be7e244e24598e6d22cd4c0ffd121933f44c8231c523747efa64a06"></a><!-- doxytag: member="Pica" ref="908caf5d6be7e244e24598e6d22cd4c0ffd121933f44c8231c523747efa64a06" args="" -->Pica</em>&nbsp;</td><td>
Pica (12 Point). </td></tr>
<tr><td valign="top"><em><a class="anchor" name="908caf5d6be7e244e24598e6d22cd4c0304d9ef07db638690997830a7b348db1"></a><!-- doxytag: member="Percentage" ref="908caf5d6be7e244e24598e6d22cd4c0304d9ef07db638690997830a7b348db1" args="" -->Percentage</em>&nbsp;</td><td>
Percentage (meaning context-sensitive). </td></tr>
</table>
</dl>

</div>
</div><p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="d2a8e7901084735819bc1b29fdb9a930"></a><!-- doxytag: member="Wt::WLength::WLength" ref="d2a8e7901084735819bc1b29fdb9a930" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Wt::WLength::WLength           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates an 'auto' length. 
<p>
Specifies an 'auto' length.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WLength.html#0cf39ca4225776879d56ade60320c31a" title="An &#39;auto&#39; length.">Auto</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="1c06a75adecaa2dc0097e82f61a20e9a"></a><!-- doxytag: member="Wt::WLength::WLength" ref="1c06a75adecaa2dc0097e82f61a20e9a" args="(double value, Unit unit=Pixel)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Wt::WLength::WLength           </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c0">Unit</a>&nbsp;</td>
          <td class="paramname"> <em>unit</em> = <code>Pixel</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a length with value and unit. 
<p>
This constructor will also provide the implicit conversion between a double and <a class="el" href="classWt_1_1WLength.html" title="A class that specifies a CSS length.">WLength</a>, using a pixel unit. 
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="b4c9733029342fdbc1dee34a523ee40d"></a><!-- doxytag: member="Wt::WLength::isAuto" ref="b4c9733029342fdbc1dee34a523ee40d" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WLength::isAuto           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns whether the ength is 'auto'. 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WLength.html#d2a8e7901084735819bc1b29fdb9a930" title="Creates an &#39;auto&#39; length.">WLength()</a>, <a class="el" href="classWt_1_1WLength.html#0cf39ca4225776879d56ade60320c31a" title="An &#39;auto&#39; length.">Auto</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="c4063de548d24148fda45a7bced29ef8"></a><!-- doxytag: member="Wt::WLength::value" ref="c4063de548d24148fda45a7bced29ef8" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double Wt::WLength::value           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the value. 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WLength.html#37b71e44633dd09a63b8a1ebb06e9a27" title="Returns the unit.">unit()</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="37b71e44633dd09a63b8a1ebb06e9a27"></a><!-- doxytag: member="Wt::WLength::unit" ref="37b71e44633dd09a63b8a1ebb06e9a27" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WLength.html#908caf5d6be7e244e24598e6d22cd4c0">Unit</a> Wt::WLength::unit           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the unit. 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WLength.html#c4063de548d24148fda45a7bced29ef8" title="Returns the value.">value()</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="3f4a8633434fd5190a60dd693f4a2021"></a><!-- doxytag: member="Wt::WLength::toPixels" ref="3f4a8633434fd5190a60dd693f4a2021" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double Wt::WLength::toPixels           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the (approximate) length in pixels. 
<p>
When the length <a class="el" href="classWt_1_1WLength.html#b4c9733029342fdbc1dee34a523ee40d" title="Returns whether the ength is &#39;auto&#39;.">isAuto()</a>, 0 is returned, otherwise the approximate length in pixels. 
</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="0cf39ca4225776879d56ade60320c31a"></a><!-- doxytag: member="Wt::WLength::Auto" ref="0cf39ca4225776879d56ade60320c31a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WLength.html">WLength</a> <a class="el" href="classWt_1_1WLength.html#0cf39ca4225776879d56ade60320c31a">Wt::WLength::Auto</a><code> [static]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
An 'auto' length. 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WLength.html#d2a8e7901084735819bc1b29fdb9a930" title="Creates an &#39;auto&#39; length.">WLength()</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&nbsp;<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>