summaryrefslogtreecommitdiff
path: root/doc/html/classsf_1_1VideoMode.htm
blob: 82d60583d2eb375a44a8cc10552556a798fba3a7 (plain)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>SFML - Simple and Fast Multimedia Library</title>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="tabs.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <div id="logo">
            <img src="./logo.jpg" width="770" height="200" title="SFML home" alt="SFML logo" />
        </div>
<!-- Generated by Doxygen 1.5.2 -->
<div class="tabs">
  <ul>
    <li><a href="index.htm"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.htm"><span>Namespaces</span></a></li>
    <li class="current"><a href="classes.htm"><span>Classes</span></a></li>
    <li><a href="files.htm"><span>Files</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="classes.htm"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.htm"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.htm"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.htm"><span>Class&nbsp;Members</span></a></li>
  </ul>
</div>
<div class="nav">
<a class="el" href="namespacesf.htm">sf</a>::<a class="el" href="classsf_1_1VideoMode.htm">VideoMode</a></div>
<h1>sf::VideoMode Class Reference</h1><!-- doxytag: class="sf::VideoMode" --><a class="el" href="classsf_1_1VideoMode.htm" title="VideoMode defines a video mode (width, height, bpp, frequency) and provides static...">VideoMode</a> defines a video mode (width, height, bpp, frequency) and provides static functions for getting modes supported by the display device.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="VideoMode_8hpp-source.htm">VideoMode.hpp</a>&gt;</code>
<p>
<a href="classsf_1_1VideoMode-members.htm">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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VideoMode.htm#04c9417e5c304510bef5f6aeb03f6ce1">VideoMode</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor.  <a href="#04c9417e5c304510bef5f6aeb03f6ce1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VideoMode.htm#9478572db06121f70260e6b9dc21704e">VideoMode</a> (unsigned int ModeWidth, unsigned int ModeHeight, unsigned int ModeBpp=32)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct the video mode with its attributes.  <a href="#9478572db06121f70260e6b9dc21704e"></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="classsf_1_1VideoMode.htm#5f5ba82a19680fad264b32f7bb9634d9">IsValid</a> () const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tell whether or not the video mode is supported.  <a href="#5f5ba82a19680fad264b32f7bb9634d9"></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="classsf_1_1VideoMode.htm#497c88cd2475d941f27a0ac2a0541fa1">operator==</a> (const <a class="el" href="classsf_1_1VideoMode.htm">VideoMode</a> &amp;Other) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Comparison operator overload -- tell if two video modes are equal.  <a href="#497c88cd2475d941f27a0ac2a0541fa1"></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="classsf_1_1VideoMode.htm#7db70f110d4a1404e38ed8a909d77821">operator!=</a> (const <a class="el" href="classsf_1_1VideoMode.htm">VideoMode</a> &amp;Other) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Comparison operator overload -- tell if two video modes are different.  <a href="#7db70f110d4a1404e38ed8a909d77821"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classsf_1_1VideoMode.htm">VideoMode</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VideoMode.htm#cdc9c223fb5fcba8956bc6004addf3fa">GetDesktopMode</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current desktop video mode.  <a href="#cdc9c223fb5fcba8956bc6004addf3fa"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classsf_1_1VideoMode.htm">VideoMode</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VideoMode.htm#3393f8175a96fcd9df446c28afbaa342">GetMode</a> (std::size_t Index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a valid video mode Index must be in range [0, <a class="el" href="classsf_1_1VideoMode.htm#7497cef03e50869e63e2c15cd093238a" title="Get valid video modes count.">GetModesCount()</a>[ Modes are sorted from best to worst.  <a href="#3393f8175a96fcd9df446c28afbaa342"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static std::size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VideoMode.htm#7497cef03e50869e63e2c15cd093238a">GetModesCount</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get valid video modes count.  <a href="#7497cef03e50869e63e2c15cd093238a"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VideoMode.htm#bee130381af7a465b29ea5cdb3927203">Width</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Video mode width, in pixels.  <a href="#bee130381af7a465b29ea5cdb3927203"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VideoMode.htm#c890fbaecc5d9b82b44123a0d5b3c0f5">Height</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Video mode height, in pixels.  <a href="#c890fbaecc5d9b82b44123a0d5b3c0f5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VideoMode.htm#c2aa4a809527fd9da6b70c9479d02c7a">BitsPerPixel</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Video mode pixel depth, in bits per pixels.  <a href="#c2aa4a809527fd9da6b70c9479d02c7a"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="classsf_1_1VideoMode.htm" title="VideoMode defines a video mode (width, height, bpp, frequency) and provides static...">VideoMode</a> defines a video mode (width, height, bpp, frequency) and provides static functions for getting modes supported by the display device. 
<p>

<p>
Definition at line <a class="el" href="VideoMode_8hpp-source.htm#l00042">42</a> of file <a class="el" href="VideoMode_8hpp-source.htm">VideoMode.hpp</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="04c9417e5c304510bef5f6aeb03f6ce1"></a><!-- doxytag: member="sf::VideoMode::VideoMode" ref="04c9417e5c304510bef5f6aeb03f6ce1" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sf::VideoMode::VideoMode           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Default constructor. 
<p>

</div>
</div><p>
<a class="anchor" name="9478572db06121f70260e6b9dc21704e"></a><!-- doxytag: member="sf::VideoMode::VideoMode" ref="9478572db06121f70260e6b9dc21704e" args="(unsigned int ModeWidth, unsigned int ModeHeight, unsigned int ModeBpp=32)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sf::VideoMode::VideoMode           </td>
          <td>(</td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>ModeWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>ModeHeight</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>ModeBpp</em> = <code>32</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Construct the video mode with its attributes. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ModeWidth</em>&nbsp;</td><td>: Width in pixels </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ModeHeight</em>&nbsp;</td><td>: Height in pixels </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ModeBpp</em>&nbsp;</td><td>: Pixel depths in bits per pixel (32 by default) </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="cdc9c223fb5fcba8956bc6004addf3fa"></a><!-- doxytag: member="sf::VideoMode::GetDesktopMode" ref="cdc9c223fb5fcba8956bc6004addf3fa" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classsf_1_1VideoMode.htm">VideoMode</a> sf::VideoMode::GetDesktopMode           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the current desktop video mode. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Current desktop video mode </dd></dl>

</div>
</div><p>
<a class="anchor" name="3393f8175a96fcd9df446c28afbaa342"></a><!-- doxytag: member="sf::VideoMode::GetMode" ref="3393f8175a96fcd9df446c28afbaa342" args="(std::size_t Index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classsf_1_1VideoMode.htm">VideoMode</a> sf::VideoMode::GetMode           </td>
          <td>(</td>
          <td class="paramtype">std::size_t&nbsp;</td>
          <td class="paramname"> <em>Index</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get a valid video mode Index must be in range [0, <a class="el" href="classsf_1_1VideoMode.htm#7497cef03e50869e63e2c15cd093238a" title="Get valid video modes count.">GetModesCount()</a>[ Modes are sorted from best to worst. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>Index</em>&nbsp;</td><td>: Index of video mode to get</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Corresponding video mode (invalid mode if index is out of range) </dd></dl>

</div>
</div><p>
<a class="anchor" name="7497cef03e50869e63e2c15cd093238a"></a><!-- doxytag: member="sf::VideoMode::GetModesCount" ref="7497cef03e50869e63e2c15cd093238a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static std::size_t sf::VideoMode::GetModesCount           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get valid video modes count. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of valid video modes available </dd></dl>

</div>
</div><p>
<a class="anchor" name="5f5ba82a19680fad264b32f7bb9634d9"></a><!-- doxytag: member="sf::VideoMode::IsValid" ref="5f5ba82a19680fad264b32f7bb9634d9" args="() const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool sf::VideoMode::IsValid           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Tell whether or not the video mode is supported. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if video mode is supported, false otherwise </dd></dl>

</div>
</div><p>
<a class="anchor" name="497c88cd2475d941f27a0ac2a0541fa1"></a><!-- doxytag: member="sf::VideoMode::operator==" ref="497c88cd2475d941f27a0ac2a0541fa1" args="(const VideoMode &amp;Other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool sf::VideoMode::operator==           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1VideoMode.htm">VideoMode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>Other</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Comparison operator overload -- tell if two video modes are equal. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>Other</em>&nbsp;</td><td>: Video mode to compare</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if modes are equal </dd></dl>

</div>
</div><p>
<a class="anchor" name="7db70f110d4a1404e38ed8a909d77821"></a><!-- doxytag: member="sf::VideoMode::operator!=" ref="7db70f110d4a1404e38ed8a909d77821" args="(const VideoMode &amp;Other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool sf::VideoMode::operator!=           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1VideoMode.htm">VideoMode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>Other</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Comparison operator overload -- tell if two video modes are different. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>Other</em>&nbsp;</td><td>: Video mode to compare</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if modes are different </dd></dl>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="bee130381af7a465b29ea5cdb3927203"></a><!-- doxytag: member="sf::VideoMode::Width" ref="bee130381af7a465b29ea5cdb3927203" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int <a class="el" href="classsf_1_1VideoMode.htm#bee130381af7a465b29ea5cdb3927203">sf::VideoMode::Width</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Video mode width, in pixels. 
<p>

<p>
Definition at line <a class="el" href="VideoMode_8hpp-source.htm#l00121">121</a> of file <a class="el" href="VideoMode_8hpp-source.htm">VideoMode.hpp</a>.
</div>
</div><p>
<a class="anchor" name="c890fbaecc5d9b82b44123a0d5b3c0f5"></a><!-- doxytag: member="sf::VideoMode::Height" ref="c890fbaecc5d9b82b44123a0d5b3c0f5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int <a class="el" href="classsf_1_1VideoMode.htm#c890fbaecc5d9b82b44123a0d5b3c0f5">sf::VideoMode::Height</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Video mode height, in pixels. 
<p>

<p>
Definition at line <a class="el" href="VideoMode_8hpp-source.htm#l00122">122</a> of file <a class="el" href="VideoMode_8hpp-source.htm">VideoMode.hpp</a>.
</div>
</div><p>
<a class="anchor" name="c2aa4a809527fd9da6b70c9479d02c7a"></a><!-- doxytag: member="sf::VideoMode::BitsPerPixel" ref="c2aa4a809527fd9da6b70c9479d02c7a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int <a class="el" href="classsf_1_1VideoMode.htm#c2aa4a809527fd9da6b70c9479d02c7a">sf::VideoMode::BitsPerPixel</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Video mode pixel depth, in bits per pixels. 
<p>

<p>
Definition at line <a class="el" href="VideoMode_8hpp-source.htm#l00123">123</a> of file <a class="el" href="VideoMode_8hpp-source.htm">VideoMode.hpp</a>.
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="VideoMode_8hpp-source.htm">VideoMode.hpp</a></ul>

        <p id="footer">
            &nbsp;::&nbsp; Copyright &copy; 2007-2008 Laurent Gomila, all rights reserved &nbsp;::&nbsp;
            Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen 1.5.2</a> &nbsp;::&nbsp;
        </p>

    </body>
</html>