Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > ed1483a4d9709d82850bb84cf25535e7 > files > 237

sfml-1.5-1mdv2010.0.i586.rpm

<!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.8 -->
<div class="navigation" id="top">
  <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="annotated.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="annotated.htm"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.htm"><span>Class&nbsp;Index</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="navpath"><b>sf</b>::<a class="el" href="classsf_1_1Input.htm">Input</a>
  </div>
</div>
<div class="contents">
<h1>sf::Input Class Reference</h1><!-- doxytag: class="sf::Input" --><!-- doxytag: inherits="sf::WindowListener,sf::NonCopyable" --><a class="el" href="classsf_1_1Input.htm" title="Input handles real-time input from keyboard and mouse.">Input</a> handles real-time input from keyboard and mouse.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="Input_8hpp-source.htm">Input.hpp</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for sf::Input:</div>
<div class="dynsection">

<p><center><img src="classsf_1_1Input.png" usemap="#sf::Input_map" border="0" alt=""></center>
<map name="sf::Input_map">
<area href="classsf_1_1WindowListener.htm" alt="sf::WindowListener" shape="rect" coords="0,0,117,24">
<area href="structsf_1_1NonCopyable.htm" alt="sf::NonCopyable" shape="rect" coords="127,0,244,24">
</map>
</div>

<p>
<a href="classsf_1_1Input-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_1Input.htm#35393e09fc92f7523e52af1c203b958f">Input</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor.  <a href="#35393e09fc92f7523e52af1c203b958f"></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_1Input.htm#5312ed524e1f2837aa4597978553876a">IsKeyDown</a> (<a class="el" href="namespacesf_1_1Key.htm#d32ed01d3448273340bd25af5cdd9c81">Key::Code</a> KeyCode) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the state of a key.  <a href="#5312ed524e1f2837aa4597978553876a"></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_1Input.htm#28c36d05d76f2263faf803e29ffa9dea">IsMouseButtonDown</a> (Mouse::Button Button) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the state of a mouse button.  <a href="#28c36d05d76f2263faf803e29ffa9dea"></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_1Input.htm#715d9533617ef9fc25152ebd6b7ece08">IsJoystickButtonDown</a> (unsigned int JoyId, unsigned int Button) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the state of a joystick button.  <a href="#715d9533617ef9fc25152ebd6b7ece08"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Input.htm#2100db642800d4d3e21579c72bed99b3">GetMouseX</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the mouse X position.  <a href="#2100db642800d4d3e21579c72bed99b3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Input.htm#fe8a8e65be0a5840de9865054aaa5796">GetMouseY</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the mouse Y position.  <a href="#fe8a8e65be0a5840de9865054aaa5796"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Input.htm#4edf71238ae3d311c4b6e5e6895c6896">GetJoystickAxis</a> (unsigned int JoyId, Joy::Axis Axis) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a joystick axis position.  <a href="#4edf71238ae3d311c4b6e5e6895c6896"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="classsf_1_1Input.htm" title="Input handles real-time input from keyboard and mouse.">Input</a> handles real-time input from keyboard and mouse. 
<p>
Use it instead of events to handle continuous moves and more game-friendly inputs 
<p>Definition at line <a class="el" href="Input_8hpp-source.htm#l00044">44</a> of file <a class="el" href="Input_8hpp-source.htm">Input.hpp</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="35393e09fc92f7523e52af1c203b958f"></a><!-- doxytag: member="sf::Input::Input" ref="35393e09fc92f7523e52af1c203b958f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sf::Input::Input           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Default constructor. 
<p>

<p>Definition at line <a class="el" href="Input_8cpp-source.htm#l00036">36</a> of file <a class="el" href="Input_8cpp-source.htm">Input.cpp</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="4edf71238ae3d311c4b6e5e6895c6896"></a><!-- doxytag: member="sf::Input::GetJoystickAxis" ref="4edf71238ae3d311c4b6e5e6895c6896" args="(unsigned int JoyId, Joy::Axis Axis) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sf::Input::GetJoystickAxis           </td>
          <td>(</td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>JoyId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Joy::Axis&nbsp;</td>
          <td class="paramname"> <em>Axis</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get a joystick axis position. 
<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>JoyId</em>&nbsp;</td><td>: Identifier of the joystick to check (0 or 1) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>Axis</em>&nbsp;</td><td>: Axis to get</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Current axis position, in the range [-100, 100] (except for POV, which is [0, 360]) </dd></dl>

<p>Definition at line <a class="el" href="Input_8cpp-source.htm#l00111">111</a> of file <a class="el" href="Input_8cpp-source.htm">Input.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="2100db642800d4d3e21579c72bed99b3"></a><!-- doxytag: member="sf::Input::GetMouseX" ref="2100db642800d4d3e21579c72bed99b3" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int sf::Input::GetMouseX           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the mouse X position. 
<p>
Get the mouse left position.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Current mouse left position, relative to owner window </dd></dl>

<p>Definition at line <a class="el" href="Input_8cpp-source.htm#l00093">93</a> of file <a class="el" href="Input_8cpp-source.htm">Input.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="fe8a8e65be0a5840de9865054aaa5796"></a><!-- doxytag: member="sf::Input::GetMouseY" ref="fe8a8e65be0a5840de9865054aaa5796" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int sf::Input::GetMouseY           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the mouse Y position. 
<p>
Get the mouse top position.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Current mouse top position, relative to owner window </dd></dl>

<p>Definition at line <a class="el" href="Input_8cpp-source.htm#l00102">102</a> of file <a class="el" href="Input_8cpp-source.htm">Input.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="715d9533617ef9fc25152ebd6b7ece08"></a><!-- doxytag: member="sf::Input::IsJoystickButtonDown" ref="715d9533617ef9fc25152ebd6b7ece08" args="(unsigned int JoyId, unsigned int Button) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool sf::Input::IsJoystickButtonDown           </td>
          <td>(</td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>JoyId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>Button</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the state of a joystick button. 
<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>JoyId</em>&nbsp;</td><td>: Identifier of the joystick to check (0 or 1) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>Button</em>&nbsp;</td><td>: Button to check</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if button is down, false if button is up </dd></dl>

<p>Definition at line <a class="el" href="Input_8cpp-source.htm#l00081">81</a> of file <a class="el" href="Input_8cpp-source.htm">Input.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="5312ed524e1f2837aa4597978553876a"></a><!-- doxytag: member="sf::Input::IsKeyDown" ref="5312ed524e1f2837aa4597978553876a" args="(Key::Code KeyCode) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool sf::Input::IsKeyDown           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacesf_1_1Key.htm#d32ed01d3448273340bd25af5cdd9c81">Key::Code</a>&nbsp;</td>
          <td class="paramname"> <em>KeyCode</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the state of a key. 
<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>KeyCode</em>&nbsp;</td><td>: <a class="el" href="namespacesf_1_1Key.htm" title="Definition of key codes for keyboard events.">Key</a> to check</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if key is down, false if key is up </dd></dl>

<p>Definition at line <a class="el" href="Input_8cpp-source.htm#l00063">63</a> of file <a class="el" href="Input_8cpp-source.htm">Input.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="28c36d05d76f2263faf803e29ffa9dea"></a><!-- doxytag: member="sf::Input::IsMouseButtonDown" ref="28c36d05d76f2263faf803e29ffa9dea" args="(Mouse::Button Button) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool sf::Input::IsMouseButtonDown           </td>
          <td>(</td>
          <td class="paramtype">Mouse::Button&nbsp;</td>
          <td class="paramname"> <em>Button</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the state of a mouse button. 
<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>Button</em>&nbsp;</td><td>: Button to check</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if button is down, false if button is up </dd></dl>

<p>Definition at line <a class="el" href="Input_8cpp-source.htm#l00072">72</a> of file <a class="el" href="Input_8cpp-source.htm">Input.cpp</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="Input_8hpp-source.htm">Input.hpp</a><li><a class="el" href="Input_8cpp-source.htm">Input.cpp</a></ul>
</div>

        <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>