I forgot to actually include the documentation to the commit.

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1659 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
groogy 2010-11-16 16:41:16 +00:00
parent 85a4e5155e
commit 01b0f37451
144 changed files with 12034 additions and 0 deletions

View File

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Module: SFML</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Module</strong></td>
<td class="class-name-in-header">SFML</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../files/system/Vector3_cpp.html">
system/Vector3.cpp
</a>
<br />
<a href="../files/system/main_cpp.html">
system/main.cpp
</a>
<br />
<a href="../files/system/Clock_cpp.html">
system/Clock.cpp
</a>
<br />
<a href="../files/system/Vector2_cpp.html">
system/Vector2.cpp
</a>
<br />
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="SFML.html">SFML</a> namespace which contains the classes of this
module.
</p>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="class-list">
<h3 class="section-bar">Classes and Modules</h3>
Class <a href="SFML/Clock.html" class="link">SFML::Clock</a><br />
Class <a href="SFML/Vector2.html" class="link">SFML::Vector2</a><br />
Class <a href="SFML/Vector3.html" class="link">SFML::Vector3</a><br />
</div>
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">SystemLoaded</td>
<td>=</td>
<td class="context-item-value">Qtrue</td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,227 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Clock</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Clock</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/system/Vector3_cpp.html">
system/Vector3.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
Utility class for manipulating time.
</p>
<p>
sf::<a href="Clock.html">Clock</a> is a lightweight class for measuring
time.
</p>
<p>
Its resolution depends on the underlying OS, but you can generally expect a
1 ms resolution.
</p>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000004">elapsedTime</a>&nbsp;&nbsp;
<a href="#M000005">elapsed_time</a>&nbsp;&nbsp;
<a href="#M000002">getElapsedTime</a>&nbsp;&nbsp;
<a href="#M000001">new</a>&nbsp;&nbsp;
<a href="#M000003">reset</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000001" class="method-detail">
<a name="M000001"></a>
<div class="method-heading">
<a href="Clock.src/M000001.html" target="Code" class="method-signature"
onclick="popupCode('Clock.src/M000001.html');return false;">
<span class="method-name">Clock.new() &rarr; clock<br />
</span>
</a>
</div>
<div class="method-description">
<p>
The clock starts automatically after being constructed.
</p>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000004" class="method-detail">
<a name="M000004"></a>
<div class="method-heading">
<span class="method-name">elapsedTime</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Clock.html#M000002">getElapsedTime</a>
</p>
</div>
</div>
<div id="method-M000005" class="method-detail">
<a name="M000005"></a>
<div class="method-heading">
<span class="method-name">elapsed_time</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Clock.html#M000002">getElapsedTime</a>
</p>
</div>
</div>
<div id="method-M000002" class="method-detail">
<a name="M000002"></a>
<div class="method-heading">
<a href="Clock.src/M000002.html" target="Code" class="method-signature"
onclick="popupCode('Clock.src/M000002.html');return false;">
<span class="method-name">clock.getElapsedTime() &rarr; Float<br />
</span>
</a>
</div>
<div class="method-description">
<p>
This function returns the time elapsed since the last call to Reset() (or
the construction of the instance if Reset() has not been called) in
seconds.
</p>
</div>
</div>
<div id="method-M000003" class="method-detail">
<a name="M000003"></a>
<div class="method-heading">
<a href="Clock.src/M000003.html" target="Code" class="method-signature"
onclick="popupCode('Clock.src/M000003.html');return false;">
<span class="method-name">clock.reset() &rarr; nil<br />
</span>
</a>
</div>
<div class="method-description">
<p>
This function puts the time counter back to zero.
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (SFML::Clock)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* Clock.new() -&gt; clock
*
* The clock starts automatically after being constructed.
*/
static VALUE Clock_New( VALUE aKlass )
{
sf::Clock *object = new sf::Clock();
VALUE rbData = Data_Wrap_Struct( aKlass, 0, Clock_Free, object );
rb_obj_call_init( rbData, 0, 0 );
return rbData;
}</pre>
</body>
</html>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getElapsedTime (SFML::Clock)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* clock.getElapsedTime() -&gt; Float
*
* This function returns the time elapsed since the last call to Reset()
* (or the construction of the instance if Reset() has not been called) in seconds.
*/
static VALUE Clock_GetElapsedTime( VALUE self )
{
sf::Clock *object = NULL;
Data_Get_Struct( self, sf::Clock, object );
return rb_float_new( object-&gt;GetElapsedTime() );
}</pre>
</body>
</html>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>reset (SFML::Clock)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* clock.reset() -&gt; nil
*
* This function puts the time counter back to zero.
*/
static VALUE Clock_Reset( VALUE self )
{
sf::Clock *object = NULL;
Data_Get_Struct( self, sf::Clock, object );
object-&gt;Reset();
return Qnil;
}</pre>
</body>
</html>

View File

@ -0,0 +1,295 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Vector2</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Vector2</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/system/Vector3_cpp.html">
system/Vector3.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="Vector2.html">SFML::Vector2</a> is a simple class that defines a
mathematical vector with two coordinates (x and y).
</p>
<p>
It can be used to represent anything that has two dimensions: a size, a
point, a velocity, etc.
</p>
<p>
This class differs from the C++ version. It will accept any value that is
Numeric and both x and y must be of the same class.
</p>
<pre>
v1 = SFML::Vector2.new(16.5, 24.0)
v1.x = 18.2
y = v1.y
v2 = v1 * v1;
v3 = SFML::Vector2.new
v3 = v1 + v2
different = (v2 != v3);
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000011">*</a>&nbsp;&nbsp;
<a href="#M000009">+</a>&nbsp;&nbsp;
<a href="#M000010">-</a>&nbsp;&nbsp;
<a href="#M000008">-@</a>&nbsp;&nbsp;
<a href="#M000012">/</a>&nbsp;&nbsp;
<a href="#M000013">==</a>&nbsp;&nbsp;
<a href="#M000007">eql?</a>&nbsp;&nbsp;
<a href="#M000006">new</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="attribute-list">
<h3 class="section-bar">Attributes</h3>
<div class="name-list">
<table>
<tr class="top-aligned-row context-row">
<td class="context-item-name">x</td>
<td class="context-item-value">&nbsp;[RW]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">y</td>
<td class="context-item-value">&nbsp;[RW]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000006" class="method-detail">
<a name="M000006"></a>
<div class="method-heading">
<a href="Vector2.src/M000006.html" target="Code" class="method-signature"
onclick="popupCode('Vector2.src/M000006.html');return false;">
<span class="method-name">Vector2.new() &rarr; vector<br />
Vector2.new([x,y]) &rarr; vector<br />
Vector2.new(vector) &rarr; vector<br />
Vector2.new(x,y) &rarr; vector<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Create a <a href="Vector2.html#M000006">new</a> vector instance.
</p>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000011" class="method-detail">
<a name="M000011"></a>
<div class="method-heading">
<a href="Vector2.src/M000011.html" target="Code" class="method-signature"
onclick="popupCode('Vector2.src/M000011.html');return false;">
<span class="method-name">*</span><span class="method-args">(p1)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000009" class="method-detail">
<a name="M000009"></a>
<div class="method-heading">
<a href="Vector2.src/M000009.html" target="Code" class="method-signature"
onclick="popupCode('Vector2.src/M000009.html');return false;">
<span class="method-name">+</span><span class="method-args">(p1)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000010" class="method-detail">
<a name="M000010"></a>
<div class="method-heading">
<a href="Vector2.src/M000010.html" target="Code" class="method-signature"
onclick="popupCode('Vector2.src/M000010.html');return false;">
<span class="method-name">-</span><span class="method-args">(p1)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000008" class="method-detail">
<a name="M000008"></a>
<div class="method-heading">
<a href="Vector2.src/M000008.html" target="Code" class="method-signature"
onclick="popupCode('Vector2.src/M000008.html');return false;">
<span class="method-name">-@</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000012" class="method-detail">
<a name="M000012"></a>
<div class="method-heading">
<a href="Vector2.src/M000012.html" target="Code" class="method-signature"
onclick="popupCode('Vector2.src/M000012.html');return false;">
<span class="method-name">/</span><span class="method-args">(p1)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000013" class="method-detail">
<a name="M000013"></a>
<div class="method-heading">
<a href="Vector2.src/M000013.html" target="Code" class="method-signature"
onclick="popupCode('Vector2.src/M000013.html');return false;">
<span class="method-name">==</span><span class="method-args">(p1)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000007" class="method-detail">
<a name="M000007"></a>
<div class="method-heading">
<a href="Vector2.src/M000007.html" target="Code" class="method-signature"
onclick="popupCode('Vector2.src/M000007.html');return false;">
<span class="method-name">eql?</span><span class="method-args">(p1)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (SFML::Vector2)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* Vector2.new() -&gt; vector
* Vector2.new([x,y]) -&gt; vector
* Vector2.new(vector) -&gt; vector
* Vector2.new(x,y) -&gt; vector
*
* Create a new vector instance.
*/
static VALUE Vector2_Initialize( VALUE self, VALUE someArgs )
{
long arrayLength = RARRAY_LEN( someArgs );
rb_iv_set( self, &quot;@x&quot;, INT2NUM( 0 ) );
rb_iv_set( self, &quot;@y&quot;, INT2NUM( 0 ) );
if( arrayLength == 0 )
{
// Nothing needs to be done
}
else if( arrayLength == 1 )
{
Vector2_internal_CopyFrom( self, rb_ary_entry( someArgs, 0 ) );
}
else if( arrayLength == 2 )
{
VALUE arg1 = rb_ary_entry( someArgs, 0 );
VALUE arg2 = rb_ary_entry( someArgs, 1 );
Vector2_internal_ValidateTypes( arg1, arg2 );
rb_iv_set( self, &quot;@x&quot;, arg1 );
rb_iv_set( self, &quot;@y&quot;, arg2 );
}
rb_iv_set( self, &quot;@dataType&quot;, CLASS_OF( rb_iv_get( self, &quot;@x&quot; ) ) );
return self;
}</pre>
</body>
</html>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>eql? (SFML::Vector2)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Vector2_StrictEqual( VALUE self, VALUE anArgument )
{
VALUE aVector = Vector2_ForceType( anArgument );
VALUE leftX = rb_funcall( self, rb_intern( &quot;x&quot; ), 0 );
VALUE leftY = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE rightX = rb_funcall( aVector, rb_intern( &quot;x&quot; ), 0 );
VALUE rightY = rb_funcall( aVector, rb_intern( &quot;y&quot; ), 0 );
if( rb_funcall( leftX, rb_intern( &quot;eql?&quot; ), 1, rightX ) == Qtrue &amp;&amp;
rb_funcall( leftY, rb_intern( &quot;eql?&quot; ), 1, rightY ) == Qtrue )
{
return Qtrue;
}
else
{
return Qfalse;
}
}</pre>
</body>
</html>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>-@ (SFML::Vector2)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Vector2_Negate( VALUE self )
{
VALUE x = rb_funcall( self, rb_intern( &quot;x&quot; ), 0 );
VALUE y = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE negatedX = rb_funcall( x, rb_intern( &quot;-@&quot; ), 0 );
VALUE negatedY = rb_funcall( y, rb_intern( &quot;-@&quot; ), 0 );
return rb_funcall( globalVector2Class, rb_intern( &quot;new&quot; ), 2, negatedX, negatedY );
}</pre>
</body>
</html>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>+ (SFML::Vector2)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Vector2_Add( VALUE self, VALUE aRightOperand )
{
VALUE rightVector = Vector2_ForceType( aRightOperand );
// Get values
VALUE leftX = rb_funcall( self, rb_intern( &quot;x&quot; ), 0 );
VALUE leftY = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE rightX = rb_funcall( rightVector, rb_intern( &quot;x&quot; ), 0 );
VALUE rightY = rb_funcall( rightVector, rb_intern( &quot;y&quot; ), 0 );
// Do calculation
VALUE newX = rb_funcall( leftX, rb_intern( &quot;+&quot; ), 1, rightX );
VALUE newY = rb_funcall( leftY, rb_intern( &quot;+&quot; ), 1, rightY );
return rb_funcall( globalVector2Class, rb_intern( &quot;new&quot; ), 2, newX, newY );
}</pre>
</body>
</html>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>- (SFML::Vector2)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Vector2_Subtract( VALUE self, VALUE aRightOperand )
{
VALUE rightVector = Vector2_ForceType( aRightOperand );
// Get values
VALUE leftX = rb_funcall( self, rb_intern( &quot;x&quot; ), 0 );
VALUE leftY = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE rightX = rb_funcall( rightVector, rb_intern( &quot;x&quot; ), 0 );
VALUE rightY = rb_funcall( rightVector, rb_intern( &quot;y&quot; ), 0 );
// Do calculation
VALUE newX = rb_funcall( leftX, rb_intern( &quot;-&quot; ), 1, rightX );
VALUE newY = rb_funcall( leftY, rb_intern( &quot;-&quot; ), 1, rightY );
return rb_funcall( globalVector2Class, rb_intern( &quot;new&quot; ), 2, newX, newY );
}</pre>
</body>
</html>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>* (SFML::Vector2)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Vector2_Multiply( VALUE self, VALUE aRightOperand )
{
VALUE rightVector = Vector2_ForceType( aRightOperand );
// Get values
VALUE leftX = rb_funcall( self, rb_intern( &quot;x&quot; ), 0 );
VALUE leftY = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE rightX = rb_funcall( rightVector, rb_intern( &quot;x&quot; ), 0 );
VALUE rightY = rb_funcall( rightVector, rb_intern( &quot;y&quot; ), 0 );
// Do calculation
VALUE newX = rb_funcall( leftX, rb_intern( &quot;*&quot; ), 1, rightX );
VALUE newY = rb_funcall( leftY, rb_intern( &quot;*&quot; ), 1, rightY );
return rb_funcall( globalVector2Class, rb_intern( &quot;new&quot; ), 2, newX, newY );
}</pre>
</body>
</html>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>/ (SFML::Vector2)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Vector2_Divide( VALUE self, VALUE aRightOperand )
{
VALUE rightVector = Vector2_ForceType( aRightOperand );
// Get values
VALUE leftX = rb_funcall( self, rb_intern( &quot;x&quot; ), 0 );
VALUE leftY = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE rightX = rb_funcall( rightVector, rb_intern( &quot;x&quot; ), 0 );
VALUE rightY = rb_funcall( rightVector, rb_intern( &quot;y&quot; ), 0 );
// Do calculation
VALUE newX = rb_funcall( leftX, rb_intern( &quot;/&quot; ), 1, rightX );
VALUE newY = rb_funcall( leftY, rb_intern( &quot;/&quot; ), 1, rightY );
return rb_funcall( globalVector2Class, rb_intern( &quot;new&quot; ), 2, newX, newY );
}</pre>
</body>
</html>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>== (SFML::Vector2)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Vector2_Equal( VALUE self, VALUE anArgument )
{
VALUE aVector = Vector2_ForceType( anArgument );
VALUE leftX = rb_funcall( self, rb_intern( &quot;x&quot; ), 0 );
VALUE leftY = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE rightX = rb_funcall( aVector, rb_intern( &quot;x&quot; ), 0 );
VALUE rightY = rb_funcall( aVector, rb_intern( &quot;y&quot; ), 0 );
if( rb_funcall( leftX, rb_intern( &quot;==&quot; ), 1, rightX ) == Qtrue &amp;&amp;
rb_funcall( leftY, rb_intern( &quot;==&quot; ), 1, rightY ) == Qtrue )
{
return Qtrue;
}
else
{
return Qfalse;
}
}</pre>
</body>
</html>

View File

@ -0,0 +1,300 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Vector3</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Vector3</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/system/Vector3_cpp.html">
system/Vector3.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="Vector3.html">SFML::Vector3</a> is a simple class that defines a
mathematical vector with three coordinates (x, y and z).
</p>
<p>
It can be used to represent anything that has three dimensions: a size, a
point, a velocity, etc.
</p>
<p>
This class differs from the C++ version. It will accept any value that is
Numeric and both x, y an z must be of the same class.
</p>
<pre>
v1 = SFML::Vector3.new(16.5, 24.0, -8.2)
v1.z = 18.2
y = v1.y
v2 = v1 * v1;
v3 = SFML::Vector3.new
v3 = v1 + v2
different = (v2 != v3);
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000019">*</a>&nbsp;&nbsp;
<a href="#M000017">+</a>&nbsp;&nbsp;
<a href="#M000018">-</a>&nbsp;&nbsp;
<a href="#M000016">-@</a>&nbsp;&nbsp;
<a href="#M000020">/</a>&nbsp;&nbsp;
<a href="#M000021">==</a>&nbsp;&nbsp;
<a href="#M000015">eql?</a>&nbsp;&nbsp;
<a href="#M000014">new</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="attribute-list">
<h3 class="section-bar">Attributes</h3>
<div class="name-list">
<table>
<tr class="top-aligned-row context-row">
<td class="context-item-name">x</td>
<td class="context-item-value">&nbsp;[RW]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">y</td>
<td class="context-item-value">&nbsp;[RW]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">z</td>
<td class="context-item-value">&nbsp;[RW]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000014" class="method-detail">
<a name="M000014"></a>
<div class="method-heading">
<a href="Vector3.src/M000014.html" target="Code" class="method-signature"
onclick="popupCode('Vector3.src/M000014.html');return false;">
<span class="method-name">Vector3.new() &rarr; vector<br />
Vector3.new([x,y,z]) &rarr; vector<br />
Vector3.new(vector) &rarr; vector<br />
Vector3.new(x,y,z) &rarr; vector<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Create a <a href="Vector3.html#M000014">new</a> vector instance.
</p>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000019" class="method-detail">
<a name="M000019"></a>
<div class="method-heading">
<a href="Vector3.src/M000019.html" target="Code" class="method-signature"
onclick="popupCode('Vector3.src/M000019.html');return false;">
<span class="method-name">*</span><span class="method-args">(p1)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000017" class="method-detail">
<a name="M000017"></a>
<div class="method-heading">
<a href="Vector3.src/M000017.html" target="Code" class="method-signature"
onclick="popupCode('Vector3.src/M000017.html');return false;">
<span class="method-name">+</span><span class="method-args">(p1)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000018" class="method-detail">
<a name="M000018"></a>
<div class="method-heading">
<a href="Vector3.src/M000018.html" target="Code" class="method-signature"
onclick="popupCode('Vector3.src/M000018.html');return false;">
<span class="method-name">-</span><span class="method-args">(p1)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000016" class="method-detail">
<a name="M000016"></a>
<div class="method-heading">
<a href="Vector3.src/M000016.html" target="Code" class="method-signature"
onclick="popupCode('Vector3.src/M000016.html');return false;">
<span class="method-name">-@</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000020" class="method-detail">
<a name="M000020"></a>
<div class="method-heading">
<a href="Vector3.src/M000020.html" target="Code" class="method-signature"
onclick="popupCode('Vector3.src/M000020.html');return false;">
<span class="method-name">/</span><span class="method-args">(p1)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000021" class="method-detail">
<a name="M000021"></a>
<div class="method-heading">
<a href="Vector3.src/M000021.html" target="Code" class="method-signature"
onclick="popupCode('Vector3.src/M000021.html');return false;">
<span class="method-name">==</span><span class="method-args">(p1)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000015" class="method-detail">
<a name="M000015"></a>
<div class="method-heading">
<a href="Vector3.src/M000015.html" target="Code" class="method-signature"
onclick="popupCode('Vector3.src/M000015.html');return false;">
<span class="method-name">eql?</span><span class="method-args">(p1)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (SFML::Vector3)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* Vector3.new() -&gt; vector
* Vector3.new([x,y,z]) -&gt; vector
* Vector3.new(vector) -&gt; vector
* Vector3.new(x,y,z) -&gt; vector
*
* Create a new vector instance.
*/
static VALUE Vector3_Initialize( VALUE self, VALUE someArgs )
{
long arrayLength = RARRAY_LEN( someArgs );
rb_iv_set( self, &quot;@x&quot;, INT2NUM( 0 ) );
rb_iv_set( self, &quot;@y&quot;, INT2NUM( 0 ) );
rb_iv_set( self, &quot;@z&quot;, INT2NUM( 0 ) );
if( arrayLength == 0 )
{
// Nothing needs to be done
}
else if( arrayLength == 1 )
{
Vector3_internal_CopyFrom( self, rb_ary_entry( someArgs, 0 ) );
}
else if( arrayLength == 3 )
{
VALUE arg1 = rb_ary_entry( someArgs, 0 );
VALUE arg2 = rb_ary_entry( someArgs, 1 );
VALUE arg3 = rb_ary_entry( someArgs, 1 );
Vector3_internal_ValidateTypes( arg1, arg2, arg3 );
rb_iv_set( self, &quot;@x&quot;, arg1 );
rb_iv_set( self, &quot;@y&quot;, arg2 );
rb_iv_set( self, &quot;@z&quot;, arg3 );
}
rb_iv_set( self, &quot;@dataType&quot;, CLASS_OF( rb_iv_get( self, &quot;@x&quot; ) ) );
return self;
}</pre>
</body>
</html>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>eql? (SFML::Vector3)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Vector3_StrictEqual( VALUE self, VALUE anArgument )
{
VALUE aVector = Vector3_ForceType( anArgument );
VALUE leftX = rb_funcall( self, rb_intern( &quot;x&quot; ), 0 );
VALUE leftY = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE leftZ = rb_funcall( self, rb_intern( &quot;z&quot; ), 0 );
VALUE rightX = rb_funcall( aVector, rb_intern( &quot;x&quot; ), 0 );
VALUE rightY = rb_funcall( aVector, rb_intern( &quot;y&quot; ), 0 );
VALUE rightZ = rb_funcall( aVector, rb_intern( &quot;z&quot; ), 0 );
if( rb_funcall( leftX, rb_intern( &quot;eql?&quot; ), 1, rightX ) == Qtrue &amp;&amp;
rb_funcall( leftY, rb_intern( &quot;eql?&quot; ), 1, rightY ) == Qtrue &amp;&amp;
rb_funcall( leftZ, rb_intern( &quot;eql?&quot; ), 1, rightZ ) == Qtrue )
{
return Qtrue;
}
else
{
return Qfalse;
}
}</pre>
</body>
</html>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>-@ (SFML::Vector3)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Vector3_Negate( VALUE self )
{
VALUE x = rb_funcall( self, rb_intern( &quot;x&quot; ), 0 );
VALUE y = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE z = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE negatedX = rb_funcall( x, rb_intern( &quot;-@&quot; ), 0 );
VALUE negatedY = rb_funcall( y, rb_intern( &quot;-@&quot; ), 0 );
VALUE negatedZ = rb_funcall( z, rb_intern( &quot;-@&quot; ), 0 );
return rb_funcall( globalVector3Class, rb_intern( &quot;new&quot; ), 2, negatedX, negatedY, negatedZ );
}</pre>
</body>
</html>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>+ (SFML::Vector3)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Vector3_Add( VALUE self, VALUE aRightOperand )
{
VALUE rightVector = Vector3_ForceType( aRightOperand );
// Get values
VALUE leftX = rb_funcall( self, rb_intern( &quot;x&quot; ), 0 );
VALUE leftY = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE leftZ = rb_funcall( self, rb_intern( &quot;z&quot; ), 0 );
VALUE rightX = rb_funcall( rightVector, rb_intern( &quot;x&quot; ), 0 );
VALUE rightY = rb_funcall( rightVector, rb_intern( &quot;y&quot; ), 0 );
VALUE rightZ = rb_funcall( rightVector, rb_intern( &quot;z&quot; ), 0 );
// Do calculation
VALUE newX = rb_funcall( leftX, rb_intern( &quot;+&quot; ), 1, rightX );
VALUE newY = rb_funcall( leftY, rb_intern( &quot;+&quot; ), 1, rightY );
VALUE newZ = rb_funcall( leftZ, rb_intern( &quot;+&quot; ), 1, rightZ );
return rb_funcall( globalVector3Class, rb_intern( &quot;new&quot; ), 2, newX, newY, newZ );
}</pre>
</body>
</html>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>- (SFML::Vector3)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Vector3_Subtract( VALUE self, VALUE aRightOperand )
{
VALUE rightVector = Vector3_ForceType( aRightOperand );
// Get values
VALUE leftX = rb_funcall( self, rb_intern( &quot;x&quot; ), 0 );
VALUE leftY = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE leftZ = rb_funcall( self, rb_intern( &quot;z&quot; ), 0 );
VALUE rightX = rb_funcall( rightVector, rb_intern( &quot;x&quot; ), 0 );
VALUE rightY = rb_funcall( rightVector, rb_intern( &quot;y&quot; ), 0 );
VALUE rightZ = rb_funcall( rightVector, rb_intern( &quot;z&quot; ), 0 );
// Do calculation
VALUE newX = rb_funcall( leftX, rb_intern( &quot;-&quot; ), 1, rightX );
VALUE newY = rb_funcall( leftY, rb_intern( &quot;-&quot; ), 1, rightY );
VALUE newZ = rb_funcall( leftZ, rb_intern( &quot;-&quot; ), 1, rightZ );
return rb_funcall( globalVector3Class, rb_intern( &quot;new&quot; ), 2, newX, newY, newZ );
}</pre>
</body>
</html>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>* (SFML::Vector3)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Vector3_Multiply( VALUE self, VALUE aRightOperand )
{
VALUE rightVector = Vector3_ForceType( aRightOperand );
// Get values
VALUE leftX = rb_funcall( self, rb_intern( &quot;x&quot; ), 0 );
VALUE leftY = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE leftZ = rb_funcall( self, rb_intern( &quot;z&quot; ), 0 );
VALUE rightX = rb_funcall( rightVector, rb_intern( &quot;x&quot; ), 0 );
VALUE rightY = rb_funcall( rightVector, rb_intern( &quot;y&quot; ), 0 );
VALUE rightZ = rb_funcall( rightVector, rb_intern( &quot;z&quot; ), 0 );
// Do calculation
VALUE newX = rb_funcall( leftX, rb_intern( &quot;*&quot; ), 1, rightX );
VALUE newY = rb_funcall( leftY, rb_intern( &quot;*&quot; ), 1, rightY );
VALUE newZ = rb_funcall( leftZ, rb_intern( &quot;*&quot; ), 1, rightZ );
return rb_funcall( globalVector3Class, rb_intern( &quot;new&quot; ), 2, newX, newY, newZ );
}</pre>
</body>
</html>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>/ (SFML::Vector3)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Vector3_Divide( VALUE self, VALUE aRightOperand )
{
VALUE rightVector = Vector3_ForceType( aRightOperand );
// Get values
VALUE leftX = rb_funcall( self, rb_intern( &quot;x&quot; ), 0 );
VALUE leftY = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE leftZ = rb_funcall( self, rb_intern( &quot;z&quot; ), 0 );
VALUE rightX = rb_funcall( rightVector, rb_intern( &quot;x&quot; ), 0 );
VALUE rightY = rb_funcall( rightVector, rb_intern( &quot;y&quot; ), 0 );
VALUE rightZ = rb_funcall( rightVector, rb_intern( &quot;z&quot; ), 0 );
// Do calculation
VALUE newX = rb_funcall( leftX, rb_intern( &quot;/&quot; ), 1, rightX );
VALUE newY = rb_funcall( leftY, rb_intern( &quot;/&quot; ), 1, rightY );
VALUE newZ = rb_funcall( leftZ, rb_intern( &quot;/&quot; ), 1, rightZ );
return rb_funcall( globalVector3Class, rb_intern( &quot;new&quot; ), 2, newX, newY, newZ );
}</pre>
</body>
</html>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>== (SFML::Vector3)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Vector3_Equal( VALUE self, VALUE anArgument )
{
VALUE aVector = Vector3_ForceType( anArgument );
VALUE leftX = rb_funcall( self, rb_intern( &quot;x&quot; ), 0 );
VALUE leftY = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE leftZ = rb_funcall( self, rb_intern( &quot;z&quot; ), 0 );
VALUE rightX = rb_funcall( aVector, rb_intern( &quot;x&quot; ), 0 );
VALUE rightY = rb_funcall( aVector, rb_intern( &quot;y&quot; ), 0 );
VALUE rightZ = rb_funcall( aVector, rb_intern( &quot;z&quot; ), 0 );
if( rb_funcall( leftX, rb_intern( &quot;==&quot; ), 1, rightX ) == Qtrue &amp;&amp;
rb_funcall( leftY, rb_intern( &quot;==&quot; ), 1, rightY ) == Qtrue &amp;&amp;
rb_funcall( leftZ, rb_intern( &quot;==&quot; ), 1, rightZ ) == Qtrue )
{
return Qtrue;
}
else
{
return Qfalse;
}
}</pre>
</body>
</html>

View File

@ -0,0 +1 @@
Tue, 16 Nov 2010 17:24:00 +0100

View File

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>File: extconf.rb</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>extconf.rb</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>extconf.rb
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Wed Nov 03 08:57:19 +0100 2010</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
rbSFML - Copyright (c) 2010 Henrik Valter Vogelius Hansson -
groogy@groogy.se This software is provided &#8216;as-is&#8217;, without any
express or implied warranty. In no event will the authors be held liable
for any damages arising from the use of this software.
</p>
<p>
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
</p>
<ol>
<li>The origin of this software must not be misrepresented; you must not claim
that you wrote the original software. If you use this software in a
product, an acknowledgment in the product documentation would be
appreciated but is not required.
</li>
<li>Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
</li>
<li>This notice may not be removed or altered from any source distribution.
</li>
</ol>
</div>
<div id="requires-list">
<h3 class="section-bar">Required files</h3>
<div class="name-list">
mkmf&nbsp;&nbsp;
</div>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>File: Clock.cpp</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>Clock.cpp</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>system/Clock.cpp
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Tue Nov 16 17:17:03 +0100 2010</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>File: Vector2.cpp</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>Vector2.cpp</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>system/Vector2.cpp
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Tue Nov 16 17:21:27 +0100 2010</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>File: Vector3.cpp</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>Vector3.cpp</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>system/Vector3.cpp
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Tue Nov 16 17:20:51 +0100 2010</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>File: main.cpp</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>main.cpp</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>system/main.cpp
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Tue Nov 16 17:08:37 +0100 2010</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Classes
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Classes</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
<base target="docwin" />
</head>
<body>
<div id="index">
<h1 class="section-bar">Classes</h1>
<div id="index-entries">
<a href="classes/SFML.html">SFML</a><br />
<a href="classes/SFML/Clock.html">SFML::Clock</a><br />
<a href="classes/SFML/Vector2.html">SFML::Vector2</a><br />
<a href="classes/SFML/Vector3.html">SFML::Vector3</a><br />
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Files
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Files</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
<base target="docwin" />
</head>
<body>
<div id="index">
<h1 class="section-bar">Files</h1>
<div id="index-entries">
<a href="files/extconf_rb.html">extconf.rb</a><br />
<a href="files/system/Clock_cpp.html">system/Clock.cpp</a><br />
<a href="files/system/Vector2_cpp.html">system/Vector2.cpp</a><br />
<a href="files/system/Vector3_cpp.html">system/Vector3.cpp</a><br />
<a href="files/system/main_cpp.html">system/main.cpp</a><br />
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Methods
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Methods</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
<base target="docwin" />
</head>
<body>
<div id="index">
<h1 class="section-bar">Methods</h1>
<div id="index-entries">
<a href="classes/SFML/Vector2.html#M000011">* (SFML::Vector2)</a><br />
<a href="classes/SFML/Vector3.html#M000019">* (SFML::Vector3)</a><br />
<a href="classes/SFML/Vector3.html#M000017">+ (SFML::Vector3)</a><br />
<a href="classes/SFML/Vector2.html#M000009">+ (SFML::Vector2)</a><br />
<a href="classes/SFML/Vector2.html#M000010">- (SFML::Vector2)</a><br />
<a href="classes/SFML/Vector3.html#M000018">- (SFML::Vector3)</a><br />
<a href="classes/SFML/Vector2.html#M000008">-@ (SFML::Vector2)</a><br />
<a href="classes/SFML/Vector3.html#M000016">-@ (SFML::Vector3)</a><br />
<a href="classes/SFML/Vector2.html#M000012">/ (SFML::Vector2)</a><br />
<a href="classes/SFML/Vector3.html#M000020">/ (SFML::Vector3)</a><br />
<a href="classes/SFML/Vector2.html#M000013">== (SFML::Vector2)</a><br />
<a href="classes/SFML/Vector3.html#M000021">== (SFML::Vector3)</a><br />
<a href="classes/SFML/Clock.html#M000004">elapsedTime (SFML::Clock)</a><br />
<a href="classes/SFML/Clock.html#M000005">elapsed_time (SFML::Clock)</a><br />
<a href="classes/SFML/Vector2.html#M000007">eql? (SFML::Vector2)</a><br />
<a href="classes/SFML/Vector3.html#M000015">eql? (SFML::Vector3)</a><br />
<a href="classes/SFML/Clock.html#M000002">getElapsedTime (SFML::Clock)</a><br />
<a href="classes/SFML/Vector3.html#M000014">new (SFML::Vector3)</a><br />
<a href="classes/SFML/Vector2.html#M000006">new (SFML::Vector2)</a><br />
<a href="classes/SFML/Clock.html#M000001">new (SFML::Clock)</a><br />
<a href="classes/SFML/Clock.html#M000003">reset (SFML::Clock)</a><br />
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<!--
RDoc Documentation
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>RDoc Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<frameset rows="20%, 80%">
<frameset cols="25%,35%,45%">
<frame src="fr_file_index.html" title="Files" name="Files" />
<frame src="fr_class_index.html" name="Classes" />
<frame src="fr_method_index.html" name="Methods" />
</frameset>
<frame src="files/system/Vector3_cpp.html" name="docwin" />
</frameset>
</html>

View File

@ -0,0 +1,208 @@
body {
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: 90%;
margin: 0;
margin-left: 40px;
padding: 0;
background: white;
}
h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
h1 { font-size: 150%; }
h2,h3,h4 { margin-top: 1em; }
a { background: #eef; color: #039; text-decoration: none; }
a:hover { background: #039; color: #eef; }
/* Override the base stylesheet's Anchor inside a table cell */
td > a {
background: transparent;
color: #039;
text-decoration: none;
}
/* and inside a section title */
.section-title > a {
background: transparent;
color: #eee;
text-decoration: none;
}
/* === Structural elements =================================== */
div#index {
margin: 0;
margin-left: -40px;
padding: 0;
font-size: 90%;
}
div#index a {
margin-left: 0.7em;
}
div#index .section-bar {
margin-left: 0px;
padding-left: 0.7em;
background: #ccc;
font-size: small;
}
div#classHeader, div#fileHeader {
width: auto;
color: white;
padding: 0.5em 1.5em 0.5em 1.5em;
margin: 0;
margin-left: -40px;
border-bottom: 3px solid #006;
}
div#classHeader a, div#fileHeader a {
background: inherit;
color: white;
}
div#classHeader td, div#fileHeader td {
background: inherit;
color: white;
}
div#fileHeader {
background: #057;
}
div#classHeader {
background: #048;
}
.class-name-in-header {
font-size: 180%;
font-weight: bold;
}
div#bodyContent {
padding: 0 1.5em 0 1.5em;
}
div#description {
padding: 0.5em 1.5em;
background: #efefef;
border: 1px dotted #999;
}
div#description h1,h2,h3,h4,h5,h6 {
color: #125;;
background: transparent;
}
div#validator-badges {
text-align: center;
}
div#validator-badges img { border: 0; }
div#copyright {
color: #333;
background: #efefef;
font: 0.75em sans-serif;
margin-top: 5em;
margin-bottom: 0;
padding: 0.5em 2em;
}
/* === Classes =================================== */
table.header-table {
color: white;
font-size: small;
}
.type-note {
font-size: small;
color: #DEDEDE;
}
.xxsection-bar {
background: #eee;
color: #333;
padding: 3px;
}
.section-bar {
color: #333;
border-bottom: 1px solid #999;
margin-left: -20px;
}
.section-title {
background: #79a;
color: #eee;
padding: 3px;
margin-top: 2em;
margin-left: -30px;
border: 1px solid #999;
}
.top-aligned-row { vertical-align: top }
.bottom-aligned-row { vertical-align: bottom }
/* --- Context section classes ----------------------- */
.context-row { }
.context-item-name { font-family: monospace; font-weight: bold; color: black; }
.context-item-value { font-size: small; color: #448; }
.context-item-desc { color: #333; padding-left: 2em; }
/* --- Method classes -------------------------- */
.method-detail {
background: #efefef;
padding: 0;
margin-top: 0.5em;
margin-bottom: 1em;
border: 1px dotted #ccc;
}
.method-heading {
color: black;
background: #ccc;
border-bottom: 1px solid #666;
padding: 0.2em 0.5em 0 0.5em;
}
.method-signature { color: black; background: inherit; }
.method-name { font-weight: bold; }
.method-args { font-style: italic; }
.method-description { padding: 0 0.5em 0 0.5em; }
/* --- Source code sections -------------------- */
a.source-toggle { font-size: 90%; }
div.method-source-code {
background: #262626;
color: #ffdead;
margin: 1em;
padding: 0.5em;
border: 1px dashed #999;
overflow: hidden;
}
div.method-source-code pre { color: #ffdead; overflow: hidden; }
/* --- Ruby keyword styles --------------------- */
.standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
.ruby-constant { color: #7fffd4; background: transparent; }
.ruby-keyword { color: #00ffff; background: transparent; }
.ruby-ivar { color: #eedd82; background: transparent; }
.ruby-operator { color: #00ffee; background: transparent; }
.ruby-identifier { color: #ffdead; background: transparent; }
.ruby-node { color: #ffa07a; background: transparent; }
.ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
.ruby-regexp { color: #ffa07a; background: transparent; }
.ruby-value { color: #7fffd4; background: transparent; }

View File

@ -0,0 +1,164 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Module: SFML</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Module</strong></td>
<td class="class-name-in-header">SFML</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
<a href="../files/window/ContextSettings_cpp.html">
window/ContextSettings.cpp
</a>
<br />
<a href="../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
<a href="../files/window/VideoMode_cpp.html">
window/VideoMode.cpp
</a>
<br />
<a href="../files/window/Context_cpp.html">
window/Context.cpp
</a>
<br />
<a href="../files/window/Window_cpp.html">
window/Window.cpp
</a>
<br />
<a href="../files/window/Input_cpp.html">
window/Input.cpp
</a>
<br />
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="SFML.html">SFML</a> namespace which contains the classes of this
module.
</p>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="class-list">
<h3 class="section-bar">Classes and Modules</h3>
Module <a href="SFML/Joy.html" class="link">SFML::Joy</a><br />
Module <a href="SFML/Key.html" class="link">SFML::Key</a><br />
Module <a href="SFML/Mouse.html" class="link">SFML::Mouse</a><br />
Module <a href="SFML/Style.html" class="link">SFML::Style</a><br />
Class <a href="SFML/Context.html" class="link">SFML::Context</a><br />
Class <a href="SFML/ContextSettings.html" class="link">SFML::ContextSettings</a><br />
Class <a href="SFML/Event.html" class="link">SFML::Event</a><br />
Class <a href="SFML/Input.html" class="link">SFML::Input</a><br />
Class <a href="SFML/VideoMode.html" class="link">SFML::VideoMode</a><br />
Class <a href="SFML/Window.html" class="link">SFML::Window</a><br />
</div>
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">WindowLoaded</td>
<td>=</td>
<td class="context-item-value">Qtrue</td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,236 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Context</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Context</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
If you need to make OpenGL / graphics calls without having an active window
(like in a thread), you can use an instance of this class to get a valid
context.
</p>
<p>
Having a valid context is necessary for <b>every</b> OpenGL call, and for
most of the classes from the Graphics package.
</p>
<p>
Note that a context is only active in its current thread, if you create a
<a href="Context.html#M000033">new</a> thread it will have no valid context
by default.
</p>
<p>
To use a sf::<a href="Context.html">Context</a> instance, just construct it
and let it live as long as you need a valid context. No explicit activation
is needed, all it has to do is to exist. Its destructor will take care of
deactivating and freeing all the attached resources.
</p>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000036">active=</a>&nbsp;&nbsp;
<a href="#M000033">new</a>&nbsp;&nbsp;
<a href="#M000035">setActive</a>&nbsp;&nbsp;
<a href="#M000034">setReferenceActive</a>&nbsp;&nbsp;
<a href="#M000037">set_active</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000033" class="method-detail">
<a name="M000033"></a>
<div class="method-heading">
<a href="Context.src/M000033.html" target="Code" class="method-signature"
onclick="popupCode('Context.src/M000033.html');return false;">
<span class="method-name">Context.new() &rarr; context<br />
</span>
</a>
</div>
<div class="method-description">
<p>
The constructor creates and activates the context
</p>
</div>
</div>
<div id="method-M000034" class="method-detail">
<a name="M000034"></a>
<div class="method-heading">
<a href="Context.src/M000034.html" target="Code" class="method-signature"
onclick="popupCode('Context.src/M000034.html');return false;">
<span class="method-name">Context.SetReferenceActive() &rarr; true or false<br />
</span>
</a>
</div>
<div class="method-description">
<p>
This function is meant to be called internally; it is used to deactivate
the current context by activating another one (so that we still have an
active context on the current thread).
</p>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000036" class="method-detail">
<a name="M000036"></a>
<div class="method-heading">
<span class="method-name">active=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Context.html#M000035">setActive</a>
</p>
</div>
</div>
<div id="method-M000035" class="method-detail">
<a name="M000035"></a>
<div class="method-heading">
<a href="Context.src/M000035.html" target="Code" class="method-signature"
onclick="popupCode('Context.src/M000035.html');return false;">
<span class="method-name">context.SetActive(bool) &rarr; nil<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Activate or deactivate explicitely the context.
</p>
</div>
</div>
<div id="method-M000037" class="method-detail">
<a name="M000037"></a>
<div class="method-heading">
<span class="method-name">set_active</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Context.html#M000035">setActive</a>
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (SFML::Context)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* Context.new() -&gt; context
*
* The constructor creates and activates the context
*/
static VALUE Context_New( VALUE aKlass )
{
sf::Context *object = new sf::Context();
VALUE rbData = Data_Wrap_Struct( aKlass, 0, Context_Free, object );
rb_obj_call_init( rbData, 0, 0 );
return rbData;
}</pre>
</body>
</html>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>setReferenceActive (SFML::Context)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* Context.SetReferenceActive() -&gt; true or false
*
* This function is meant to be called internally; it is used to deactivate the
* current context by activating another one (so that we still have an active
* context on the current thread).
*/
static VALUE Context_SetReferenceActive( VALUE aKlass )
{
if( sf::Context::SetReferenceActive() == true )
{
return Qtrue;
}
else
{
return Qfalse;
}
}</pre>
</body>
</html>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>setActive (SFML::Context)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* context.SetActive(bool) -&gt; nil
*
* Activate or deactivate explicitely the context.
*/
static VALUE Context_SetActive( VALUE self, VALUE anArgument )
{
sf::Context *object = NULL;
Data_Get_Struct( self, sf::Context, object );
switch( anArgument )
{
case Qtrue:
object-&gt;SetActive( true );
break;
case Qfalse:
object-&gt;SetActive( false );
break;
default:
rb_raise( rb_eTypeError, &quot;expected true or false&quot; );
}
return Qnil;
}</pre>
</body>
</html>

View File

@ -0,0 +1,670 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::ContextSettings</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::ContextSettings</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="ContextSettings.html">ContextSettings</a> allows to define several
advanced settings of the OpenGL context attached to a window.
</p>
<p>
All these settings have no impact on the regular <a
href="../SFML.html">SFML</a> rendering (graphics module) &#8212; except the
anti-aliasing level, so you may need to use this structure only if
you&#8216;re using <a href="../SFML.html">SFML</a> as a windowing system
for custom OpenGL rendering.
</p>
<p>
The DepthBits and StencilBits members define the number of bits per pixel
requested for the (respectively) <a
href="ContextSettings.html#M000124">depth</a> and <a
href="ContextSettings.html#M000128">stencil</a> buffers.
</p>
<p>
AntialiasingLevel represents the requested number of multisampling levels
for anti-aliasing.
</p>
<p>
MajorVersion and MinorVersion define the version of the OpenGL context that
you want. Only versions greater or equal to 3.0 are relevant; versions
lesser than 3.0 are all handled the same way (i.e. you can use any version
&lt; 3.0 if you don&#8216;t want an OpenGL 3 context).
</p>
<p>
Please note that these values are only a hint. No failure will be reported
if one or more of these values are not supported by the system; instead, <a
href="../SFML.html">SFML</a> will try to find the closest valid match. You
can then retrieve the settings that the window actually used to create its
context, with Window::GetSettings().
</p>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000132">antialiasing</a>&nbsp;&nbsp;
<a href="#M000133">antialiasing=</a>&nbsp;&nbsp;
<a href="#M000118">antialiasingLevel</a>&nbsp;&nbsp;
<a href="#M000119">antialiasingLevel=</a>&nbsp;&nbsp;
<a href="#M000134">antialiasing_level</a>&nbsp;&nbsp;
<a href="#M000135">antialiasing_level=</a>&nbsp;&nbsp;
<a href="#M000124">depth</a>&nbsp;&nbsp;
<a href="#M000125">depth=</a>&nbsp;&nbsp;
<a href="#M000114">depthBits</a>&nbsp;&nbsp;
<a href="#M000115">depthBits=</a>&nbsp;&nbsp;
<a href="#M000126">depth_bits</a>&nbsp;&nbsp;
<a href="#M000127">depth_bits=</a>&nbsp;&nbsp;
<a href="#M000136">major</a>&nbsp;&nbsp;
<a href="#M000137">major=</a>&nbsp;&nbsp;
<a href="#M000120">majorVersion</a>&nbsp;&nbsp;
<a href="#M000121">majorVersion=</a>&nbsp;&nbsp;
<a href="#M000138">major_version</a>&nbsp;&nbsp;
<a href="#M000139">major_version=</a>&nbsp;&nbsp;
<a href="#M000140">minor</a>&nbsp;&nbsp;
<a href="#M000141">minor=</a>&nbsp;&nbsp;
<a href="#M000122">minorVersion</a>&nbsp;&nbsp;
<a href="#M000123">minorVersion=</a>&nbsp;&nbsp;
<a href="#M000142">minor_version</a>&nbsp;&nbsp;
<a href="#M000143">minor_version=</a>&nbsp;&nbsp;
<a href="#M000113">new</a>&nbsp;&nbsp;
<a href="#M000128">stencil</a>&nbsp;&nbsp;
<a href="#M000129">stencil=</a>&nbsp;&nbsp;
<a href="#M000116">stencilBits</a>&nbsp;&nbsp;
<a href="#M000117">stencilBits=</a>&nbsp;&nbsp;
<a href="#M000130">stencil_bits</a>&nbsp;&nbsp;
<a href="#M000131">stencil_bits=</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000113" class="method-detail">
<a name="M000113"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000113.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000113.html');return false;">
<span class="method-name">ContextSettings.new( depth = 24, stencil = 8, antialiasing = 0, major = 2, minor = 0) &rarr; settings<br />
</span>
</a>
</div>
<div class="method-description">
<p>
The constructor creates the settings
</p>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000132" class="method-detail">
<a name="M000132"></a>
<div class="method-heading">
<span class="method-name">antialiasing</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000118">antialiasingLevel</a>
</p>
</div>
</div>
<div id="method-M000133" class="method-detail">
<a name="M000133"></a>
<div class="method-heading">
<span class="method-name">antialiasing=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000118">antialiasingLevel</a>=
</p>
</div>
</div>
<div id="method-M000118" class="method-detail">
<a name="M000118"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000118.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000118.html');return false;">
<span class="method-name">settings.antialiasingLevel &rarr; antialiasing<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Level of <a href="ContextSettings.html#M000132">antialiasing</a>
</p>
</div>
</div>
<div id="method-M000119" class="method-detail">
<a name="M000119"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000119.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000119.html');return false;">
<span class="method-name">settings.antialiasingLevel=(new_antialiasing) &rarr; new_antialiasing<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Level of <a href="ContextSettings.html#M000132">antialiasing</a>
</p>
</div>
</div>
<div id="method-M000134" class="method-detail">
<a name="M000134"></a>
<div class="method-heading">
<span class="method-name">antialiasing_level</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000118">antialiasingLevel</a>
</p>
</div>
</div>
<div id="method-M000135" class="method-detail">
<a name="M000135"></a>
<div class="method-heading">
<span class="method-name">antialiasing_level=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000118">antialiasingLevel</a>=
</p>
</div>
</div>
<div id="method-M000124" class="method-detail">
<a name="M000124"></a>
<div class="method-heading">
<span class="method-name">depth</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000114">depthBits</a>
</p>
</div>
</div>
<div id="method-M000125" class="method-detail">
<a name="M000125"></a>
<div class="method-heading">
<span class="method-name">depth=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000114">depthBits</a>=
</p>
</div>
</div>
<div id="method-M000114" class="method-detail">
<a name="M000114"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000114.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000114.html');return false;">
<span class="method-name">settings.depthBits &rarr; depth<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Bits of the <a href="ContextSettings.html#M000124">depth</a> buffer
</p>
</div>
</div>
<div id="method-M000115" class="method-detail">
<a name="M000115"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000115.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000115.html');return false;">
<span class="method-name">settings.depthBits=(new_depth) &rarr; new_depth<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Bits of the <a href="ContextSettings.html#M000124">depth</a> buffer
</p>
</div>
</div>
<div id="method-M000126" class="method-detail">
<a name="M000126"></a>
<div class="method-heading">
<span class="method-name">depth_bits</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000114">depthBits</a>
</p>
</div>
</div>
<div id="method-M000127" class="method-detail">
<a name="M000127"></a>
<div class="method-heading">
<span class="method-name">depth_bits=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000114">depthBits</a>=
</p>
</div>
</div>
<div id="method-M000136" class="method-detail">
<a name="M000136"></a>
<div class="method-heading">
<span class="method-name">major</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000120">majorVersion</a>
</p>
</div>
</div>
<div id="method-M000137" class="method-detail">
<a name="M000137"></a>
<div class="method-heading">
<span class="method-name">major=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000120">majorVersion</a>=
</p>
</div>
</div>
<div id="method-M000120" class="method-detail">
<a name="M000120"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000120.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000120.html');return false;">
<span class="method-name">settings.majorVersion &rarr; major<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Major number of the context version to create
</p>
</div>
</div>
<div id="method-M000121" class="method-detail">
<a name="M000121"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000121.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000121.html');return false;">
<span class="method-name">settings.majorVersion=(new_major) &rarr; new_major<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Major number of the context version to create
</p>
</div>
</div>
<div id="method-M000138" class="method-detail">
<a name="M000138"></a>
<div class="method-heading">
<span class="method-name">major_version</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000120">majorVersion</a>
</p>
</div>
</div>
<div id="method-M000139" class="method-detail">
<a name="M000139"></a>
<div class="method-heading">
<span class="method-name">major_version=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000120">majorVersion</a>=
</p>
</div>
</div>
<div id="method-M000140" class="method-detail">
<a name="M000140"></a>
<div class="method-heading">
<span class="method-name">minor</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000122">minorVersion</a>
</p>
</div>
</div>
<div id="method-M000141" class="method-detail">
<a name="M000141"></a>
<div class="method-heading">
<span class="method-name">minor=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000122">minorVersion</a>=
</p>
</div>
</div>
<div id="method-M000122" class="method-detail">
<a name="M000122"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000122.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000122.html');return false;">
<span class="method-name">settings.minorVersion &rarr; minor<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Minor number of the context version to create
</p>
</div>
</div>
<div id="method-M000123" class="method-detail">
<a name="M000123"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000123.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000123.html');return false;">
<span class="method-name">settings.minorVersion=(new_minor) &rarr; new_minor<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Minor number of the context version to create
</p>
</div>
</div>
<div id="method-M000142" class="method-detail">
<a name="M000142"></a>
<div class="method-heading">
<span class="method-name">minor_version</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000122">minorVersion</a>
</p>
</div>
</div>
<div id="method-M000143" class="method-detail">
<a name="M000143"></a>
<div class="method-heading">
<span class="method-name">minor_version=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000122">minorVersion</a>=
</p>
</div>
</div>
<div id="method-M000128" class="method-detail">
<a name="M000128"></a>
<div class="method-heading">
<span class="method-name">stencil</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000116">stencilBits</a>
</p>
</div>
</div>
<div id="method-M000129" class="method-detail">
<a name="M000129"></a>
<div class="method-heading">
<span class="method-name">stencil=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000116">stencilBits</a>=
</p>
</div>
</div>
<div id="method-M000116" class="method-detail">
<a name="M000116"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000116.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000116.html');return false;">
<span class="method-name">settings.stencilBits &rarr; stencil<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Bits of the <a href="ContextSettings.html#M000128">stencil</a> buffer
</p>
</div>
</div>
<div id="method-M000117" class="method-detail">
<a name="M000117"></a>
<div class="method-heading">
<a href="ContextSettings.src/M000117.html" target="Code" class="method-signature"
onclick="popupCode('ContextSettings.src/M000117.html');return false;">
<span class="method-name">settings.stencilBits=(new_stencil) &rarr; new_stencil<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Bits of the <a href="ContextSettings.html#M000128">stencil</a> buffer
</p>
</div>
</div>
<div id="method-M000130" class="method-detail">
<a name="M000130"></a>
<div class="method-heading">
<span class="method-name">stencil_bits</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000116">stencilBits</a>
</p>
</div>
</div>
<div id="method-M000131" class="method-detail">
<a name="M000131"></a>
<div class="method-heading">
<span class="method-name">stencil_bits=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="ContextSettings.html#M000116">stencilBits</a>=
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* ContextSettings.new( depth = 24, stencil = 8, antialiasing = 0, major = 2, minor = 0) -&gt; settings
*
* The constructor creates the settings
*/
static VALUE ContextSettings_New( VALUE aKlass, VALUE someArgs )
{
long arrayLength = RARRAY_LEN( someArgs );
sf::ContextSettings *object = NULL;
if( arrayLength == 0 )
{
object = new sf::ContextSettings();
}
else if( arrayLength == 1 )
{
VALUE arg1 = rb_ary_entry( someArgs, 0 );
object = new sf::ContextSettings( NUM2UINT( arg1 ) );
}
else if( arrayLength == 2 )
{
VALUE arg1 = rb_ary_entry( someArgs, 0 );
VALUE arg2 = rb_ary_entry( someArgs, 1 );
object = new sf::ContextSettings( NUM2UINT( arg1 ), NUM2UINT( arg2 ) );
}
else if( arrayLength == 3 )
{
VALUE arg1 = rb_ary_entry( someArgs, 0 );
VALUE arg2 = rb_ary_entry( someArgs, 1 );
VALUE arg3 = rb_ary_entry( someArgs, 2 );
object = new sf::ContextSettings( NUM2UINT( arg1 ), NUM2UINT( arg2 ), NUM2UINT( arg3 ) );
}
else if( arrayLength == 4 )
{
VALUE arg1 = rb_ary_entry( someArgs, 0 );
VALUE arg2 = rb_ary_entry( someArgs, 1 );
VALUE arg3 = rb_ary_entry( someArgs, 2 );
VALUE arg4 = rb_ary_entry( someArgs, 3 );
object = new sf::ContextSettings( NUM2UINT( arg1 ), NUM2UINT( arg2 ), NUM2UINT( arg3 ), NUM2UINT( arg4 ) );
}
else if( arrayLength == 5 )
{
VALUE arg1 = rb_ary_entry( someArgs, 0 );
VALUE arg2 = rb_ary_entry( someArgs, 1 );
VALUE arg3 = rb_ary_entry( someArgs, 2 );
VALUE arg4 = rb_ary_entry( someArgs, 3 );
VALUE arg5 = rb_ary_entry( someArgs, 4 );
object = new sf::ContextSettings( NUM2UINT( arg1 ), NUM2UINT( arg2 ), NUM2UINT( arg3 ), NUM2UINT( arg4 ), NUM2UINT( arg5 ) );
}
else
{
rb_raise( rb_eArgError, &quot;Expected 0..5 arguments but was given %ld&quot;, arrayLength );
return Qnil;
}
VALUE rbData = Data_Wrap_Struct( aKlass, 0, ContextSettings_Free, object );
rb_obj_call_init( rbData, 0, 0 );
return rbData;
}</pre>
</body>
</html>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>depthBits (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.depthBits -&gt; depth
*
* Bits of the depth buffer
*/
static VALUE ContextSettings_GetDepth( VALUE self )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;DepthBits );
}</pre>
</body>
</html>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>depthBits= (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.depthBits=(new_depth) -&gt; new_depth
*
* Bits of the depth buffer
*/
static VALUE ContextSettings_SetDepth( VALUE self, VALUE aValue )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;DepthBits = NUM2UINT( aValue ) );
}</pre>
</body>
</html>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>stencilBits (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.stencilBits -&gt; stencil
*
* Bits of the stencil buffer
*/
static VALUE ContextSettings_GetStencil( VALUE self )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;StencilBits );
}</pre>
</body>
</html>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>stencilBits= (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.stencilBits=(new_stencil) -&gt; new_stencil
*
* Bits of the stencil buffer
*/
static VALUE ContextSettings_SetStencil( VALUE self, VALUE aValue )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;StencilBits = NUM2UINT( aValue ) );
}</pre>
</body>
</html>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>antialiasingLevel (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.antialiasingLevel -&gt; antialiasing
*
* Level of antialiasing
*/
static VALUE ContextSettings_GetAntialiasing( VALUE self )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;AntialiasingLevel );
}</pre>
</body>
</html>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>antialiasingLevel= (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.antialiasingLevel=(new_antialiasing) -&gt; new_antialiasing
*
* Level of antialiasing
*/
static VALUE ContextSettings_SetAntialiasing( VALUE self, VALUE aValue )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;AntialiasingLevel = NUM2UINT( aValue ) );
}</pre>
</body>
</html>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>majorVersion (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.majorVersion -&gt; major
*
* Major number of the context version to create
*/
static VALUE ContextSettings_GetMajorVersion( VALUE self )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;MajorVersion );
}</pre>
</body>
</html>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>majorVersion= (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.majorVersion=(new_major) -&gt; new_major
*
* Major number of the context version to create
*/
static VALUE ContextSettings_SetMajorVersion( VALUE self, VALUE aValue )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;MajorVersion = NUM2UINT( aValue ) );
}</pre>
</body>
</html>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>minorVersion (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.minorVersion -&gt; minor
*
* Minor number of the context version to create
*/
static VALUE ContextSettings_GetMinorVersion( VALUE self )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;MinorVersion );
}</pre>
</body>
</html>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>minorVersion= (SFML::ContextSettings)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* settings.minorVersion=(new_minor) -&gt; new_minor
*
* Minor number of the context version to create
*/
static VALUE ContextSettings_SetMinorVersion( VALUE self, VALUE aValue )
{
sf::ContextSettings *object = NULL;
Data_Get_Struct( self, sf::ContextSettings, object );
return INT2FIX( object-&gt;MinorVersion = NUM2UINT( aValue ) );
}</pre>
</body>
</html>

View File

@ -0,0 +1,371 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000091">new</a>&nbsp;&nbsp;
<a href="#M000092">new</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="class-list">
<h3 class="section-bar">Classes and Modules</h3>
Class <a href="Event/JoyButton.html" class="link">SFML::Event::JoyButton</a><br />
Class <a href="Event/JoyMove.html" class="link">SFML::Event::JoyMove</a><br />
Class <a href="Event/Key.html" class="link">SFML::Event::Key</a><br />
Class <a href="Event/MouseButton.html" class="link">SFML::Event::MouseButton</a><br />
Class <a href="Event/MouseMove.html" class="link">SFML::Event::MouseMove</a><br />
Class <a href="Event/MouseWheel.html" class="link">SFML::Event::MouseWheel</a><br />
Class <a href="Event/Size.html" class="link">SFML::Event::Size</a><br />
Class <a href="Event/Text.html" class="link">SFML::Event::Text</a><br />
</div>
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">Closed</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::Closed )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Resized</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::Resized )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">LostFocus</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::LostFocus )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">GainedFocus</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::GainedFocus )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">TextEntered</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::TextEntered )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">KeyPressed</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::KeyPressed )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">KeyReleased</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::KeyReleased )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">MouseWheelMoved</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::MouseWheelMoved )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">MouseButtonPressed</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::MouseButtonPressed )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">MouseButtonReleased</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::MouseButtonReleased )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">MouseMoved</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::MouseMoved )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">MouseEntered</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::MouseEntered )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">MouseLeft</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::MouseLeft )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">JoyButtonPressed</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::JoyButtonPressed )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">JoyButtonReleased</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::JoyButtonReleased )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">JoyMoved</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::JoyMoved )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Count</td>
<td>=</td>
<td class="context-item-value">INT2NUM( sf::Event::Count )</td>
</tr>
</table>
</div>
</div>
<div id="attribute-list">
<h3 class="section-bar">Attributes</h3>
<div class="name-list">
<table>
<tr class="top-aligned-row context-row">
<td class="context-item-name">joyButton</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">joyMove</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">key</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">mouseButton</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">mouseMove</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">mouseWheel</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">size</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">text</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">type</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000091" class="method-detail">
<a name="M000091"></a>
<div class="method-heading">
<a href="Event.src/M000091.html" target="Code" class="method-signature"
onclick="popupCode('Event.src/M000091.html');return false;">
<span class="method-name">Event.new(type) &rarr; event<br />
</span>
</a>
</div>
<div class="method-description">
<p>
You should never call this function directly. You should only aquire
event&#8216;s trough <a
href="Window.html#M000042">SFML::Window#getEvent</a> or <a
href="Window.html#M000062">SFML::Window#waitEvent</a>, if you need to pass
data to a method that takes an event instance then make a proxy instance to
simulate an event. NOTE: Using this method works but it will act constant
as you can&#8216;t access any values.
</p>
</div>
</div>
<div id="method-M000092" class="method-detail">
<a name="M000092"></a>
<div class="method-heading">
<a href="Event.src/M000092.html" target="Code" class="method-signature"
onclick="popupCode('Event.src/M000092.html');return false;">
<span class="method-name">new</span><span class="method-args">(p1)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (SFML::Event)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* Event.new(type) -&gt; event
*
* You should never call this function directly. You should only aquire event's trough
* SFML::Window#getEvent or SFML::Window#waitEvent, if you need to pass data to a method
* that takes an event instance then make a proxy instance to simulate an event.
* NOTE: Using this method works but it will act constant as you can't access any values.
*/
static VALUE Event_New( int argc, VALUE * args, VALUE aKlass )
{
sf::Event *object = new sf::Event();
VALUE rbData = Data_Wrap_Struct( aKlass, 0, Event_Free, object );
rb_obj_call_init( rbData, argc, args );
return rbData;
}</pre>
</body>
</html>

View File

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (SFML::Event)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Event_Initialize( VALUE self, VALUE aType )
{
sf::Event * object = NULL;
Data_Get_Struct( self, sf::Event, object );
int typeNum = FIX2INT( aType );
if(typeNum &gt;= 0 &amp;&amp; typeNum &lt; sf::Event::Count)
{
rb_iv_set( self, &quot;@type&quot;, aType );
object-&gt;Type = static_cast&lt; sf::Event::EventType &gt;( typeNum );
}
else
{
rb_raise( rb_eTypeError, &quot;expected Fixnum in range of 0...SFML::Event::Count&quot; );
}
bool noSpecialType = false;
VALUE eventType;
const char * name = NULL;
switch( object-&gt;Type )
{
case sf::Event::JoyButtonPressed:
case sf::Event::JoyButtonReleased:
eventType = Data_Wrap_Struct( globalJoyButtonEventClass, 0, 0, &amp;object-&gt;JoyButton );
name = &quot;@joyButton&quot;;
break;
case sf::Event::JoyMoved:
eventType = Data_Wrap_Struct( globalJoyMoveEventClass, 0, 0, &amp;object-&gt;JoyMove );
name = &quot;@joyMove&quot;;
break;
case sf::Event::KeyPressed:
case sf::Event::KeyReleased:
eventType = Data_Wrap_Struct( globalKeyEventClass, 0, 0, &amp;object-&gt;Key );
name = &quot;@key&quot;;
break;
case sf::Event::MouseButtonPressed:
case sf::Event::MouseButtonReleased:
eventType = Data_Wrap_Struct( globalMouseButtonEventClass, 0, 0, &amp;object-&gt;MouseButton );
name = &quot;@mouseButton&quot;;
break;
case sf::Event::MouseMoved:
eventType = Data_Wrap_Struct( globalMouseMoveEventClass, 0, 0, &amp;object-&gt;MouseMove );
name = &quot;@mouseMove&quot;;
break;
case sf::Event::MouseWheelMoved:
eventType = Data_Wrap_Struct( globalMouseWheelEventClass, 0, 0, &amp;object-&gt;MouseWheel );
name = &quot;@mouseWheel&quot;;
break;
case sf::Event::Resized:
eventType = Data_Wrap_Struct( globalSizeEventClass, 0, 0, &amp;object-&gt;Size );
name = &quot;@resized&quot;;
break;
case sf::Event::TextEntered:
eventType = Data_Wrap_Struct( globalTextEventClass, 0, 0, &amp;object-&gt;Text );
name = &quot;@text&quot;;
break;
default:
noSpecialType = true;
};
if( noSpecialType == false )
{
rb_obj_call_init( eventType, 0, 0 );
rb_iv_set( eventType, &quot;@internal__parent_ref&quot;, self );
rb_iv_set( self, name, eventType );
}
}</pre>
</body>
</html>

View File

@ -0,0 +1,209 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::JoyButton</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::JoyButton</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000105">button</a>&nbsp;&nbsp;
<a href="#M000104">joystickId</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000105" class="method-detail">
<a name="M000105"></a>
<div class="method-heading">
<a href="JoyButton.src/M000105.html" target="Code" class="method-signature"
onclick="popupCode('JoyButton.src/M000105.html');return false;">
<span class="method-name">button</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Index of the <a href="JoyButton.html#M000105">button</a> that has been
pressed.
</p>
</div>
</div>
<div id="method-M000104" class="method-detail">
<a name="M000104"></a>
<div class="method-heading">
<a href="JoyButton.src/M000104.html" target="Code" class="method-signature"
onclick="popupCode('JoyButton.src/M000104.html');return false;">
<span class="method-name">joystickId</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Index of the joystick (0 or 1).
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>joystickId (SFML::Event::JoyButton)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Index of the joystick (0 or 1). */
static VALUE JoyButtonEvent_GetJoystickId( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>button (SFML::Event::JoyButton)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Index of the button that has been pressed. */
static VALUE JoyButtonEvent_GetButton( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,227 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::JoyMove</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::JoyMove</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000111">axis</a>&nbsp;&nbsp;
<a href="#M000110">joystickId</a>&nbsp;&nbsp;
<a href="#M000112">position</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000111" class="method-detail">
<a name="M000111"></a>
<div class="method-heading">
<a href="JoyMove.src/M000111.html" target="Code" class="method-signature"
onclick="popupCode('JoyMove.src/M000111.html');return false;">
<span class="method-name">axis</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Axis on which the joystick moved.
</p>
</div>
</div>
<div id="method-M000110" class="method-detail">
<a name="M000110"></a>
<div class="method-heading">
<a href="JoyMove.src/M000110.html" target="Code" class="method-signature"
onclick="popupCode('JoyMove.src/M000110.html');return false;">
<span class="method-name">joystickId</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Index of the joystick (0 or 1).
</p>
</div>
</div>
<div id="method-M000112" class="method-detail">
<a name="M000112"></a>
<div class="method-heading">
<a href="JoyMove.src/M000112.html" target="Code" class="method-signature"
onclick="popupCode('JoyMove.src/M000112.html');return false;">
<span class="method-name">position</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
New <a href="JoyMove.html#M000112">position</a> on the <a
href="JoyMove.html#M000111">axis</a> (in range [-100, 100]).
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>joystickId (SFML::Event::JoyMove)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Index of the joystick (0 or 1). */
static VALUE JoyMoveEvent_GetJoystickId( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>axis (SFML::Event::JoyMove)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Axis on which the joystick moved. */
static VALUE JoyMoveEvent_GetAxis( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>position (SFML::Event::JoyMove)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* New position on the axis (in range [-100, 100]). */
static VALUE JoyMoveEvent_GetPosition( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,244 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::Key</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::Key</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000107">alt</a>&nbsp;&nbsp;
<a href="#M000106">code</a>&nbsp;&nbsp;
<a href="#M000108">control</a>&nbsp;&nbsp;
<a href="#M000109">shift</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000107" class="method-detail">
<a name="M000107"></a>
<div class="method-heading">
<a href="Key.src/M000107.html" target="Code" class="method-signature"
onclick="popupCode('Key.src/M000107.html');return false;">
<span class="method-name">alt</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Is the Alt key pressed?
</p>
</div>
</div>
<div id="method-M000106" class="method-detail">
<a name="M000106"></a>
<div class="method-heading">
<a href="Key.src/M000106.html" target="Code" class="method-signature"
onclick="popupCode('Key.src/M000106.html');return false;">
<span class="method-name">code</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Code of the key that has been pressed.
</p>
</div>
</div>
<div id="method-M000108" class="method-detail">
<a name="M000108"></a>
<div class="method-heading">
<a href="Key.src/M000108.html" target="Code" class="method-signature"
onclick="popupCode('Key.src/M000108.html');return false;">
<span class="method-name">control</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Is the Control key pressed?
</p>
</div>
</div>
<div id="method-M000109" class="method-detail">
<a name="M000109"></a>
<div class="method-heading">
<a href="Key.src/M000109.html" target="Code" class="method-signature"
onclick="popupCode('Key.src/M000109.html');return false;">
<span class="method-name">shift</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Is the Shift key pressed?
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>code (SFML::Event::Key)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Code of the key that has been pressed. */
static VALUE KeyEvent_GetCode( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>alt (SFML::Event::Key)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Is the Alt key pressed? */
static VALUE KeyEvent_GetAlt( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>control (SFML::Event::Key)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Is the Control key pressed? */
static VALUE KeyEvent_GetControl( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>shift (SFML::Event::Key)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Is the Shift key pressed? */
static VALUE KeyEvent_GetShift( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,227 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::MouseButton</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::MouseButton</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000095">button</a>&nbsp;&nbsp;
<a href="#M000096">x</a>&nbsp;&nbsp;
<a href="#M000097">y</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000095" class="method-detail">
<a name="M000095"></a>
<div class="method-heading">
<a href="MouseButton.src/M000095.html" target="Code" class="method-signature"
onclick="popupCode('MouseButton.src/M000095.html');return false;">
<span class="method-name">button</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Code of the <a href="MouseButton.html#M000095">button</a> that has been
pressed.
</p>
</div>
</div>
<div id="method-M000096" class="method-detail">
<a name="M000096"></a>
<div class="method-heading">
<a href="MouseButton.src/M000096.html" target="Code" class="method-signature"
onclick="popupCode('MouseButton.src/M000096.html');return false;">
<span class="method-name">x</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
X position of the mouse pointer, relative to the left of the owner window
</p>
</div>
</div>
<div id="method-M000097" class="method-detail">
<a name="M000097"></a>
<div class="method-heading">
<a href="MouseButton.src/M000097.html" target="Code" class="method-signature"
onclick="popupCode('MouseButton.src/M000097.html');return false;">
<span class="method-name">y</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Y position of the mouse pointer, relative to the top of the owner window
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>button (SFML::Event::MouseButton)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Code of the button that has been pressed. */
static VALUE MouseButtonEvent_GetButton( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>x (SFML::Event::MouseButton)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* X position of the mouse pointer, relative to the left of the owner window */
static VALUE MouseButtonEvent_GetX( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>y (SFML::Event::MouseButton)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Y position of the mouse pointer, relative to the top of the owner window */
static VALUE MouseButtonEvent_GetY( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,208 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::MouseMove</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::MouseMove</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000093">x</a>&nbsp;&nbsp;
<a href="#M000094">y</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000093" class="method-detail">
<a name="M000093"></a>
<div class="method-heading">
<a href="MouseMove.src/M000093.html" target="Code" class="method-signature"
onclick="popupCode('MouseMove.src/M000093.html');return false;">
<span class="method-name">x</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
X position of the mouse pointer, relative to the left of the owner window
</p>
</div>
</div>
<div id="method-M000094" class="method-detail">
<a name="M000094"></a>
<div class="method-heading">
<a href="MouseMove.src/M000094.html" target="Code" class="method-signature"
onclick="popupCode('MouseMove.src/M000094.html');return false;">
<span class="method-name">y</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Y position of the mouse pointer, relative to the top of the owner window
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>x (SFML::Event::MouseMove)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* X position of the mouse pointer, relative to the left of the owner window */
static VALUE MouseMoveEvent_GetX( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>y (SFML::Event::MouseMove)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Y position of the mouse pointer, relative to the top of the owner window */
static VALUE MouseMoveEvent_GetY( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,226 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::MouseWheel</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::MouseWheel</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000098">delta</a>&nbsp;&nbsp;
<a href="#M000099">x</a>&nbsp;&nbsp;
<a href="#M000100">y</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000098" class="method-detail">
<a name="M000098"></a>
<div class="method-heading">
<a href="MouseWheel.src/M000098.html" target="Code" class="method-signature"
onclick="popupCode('MouseWheel.src/M000098.html');return false;">
<span class="method-name">delta</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Number of ticks the wheel has moved (positive is up, negative is down).
</p>
</div>
</div>
<div id="method-M000099" class="method-detail">
<a name="M000099"></a>
<div class="method-heading">
<a href="MouseWheel.src/M000099.html" target="Code" class="method-signature"
onclick="popupCode('MouseWheel.src/M000099.html');return false;">
<span class="method-name">x</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
X position of the mouse pointer, relative to the left of the owner window
</p>
</div>
</div>
<div id="method-M000100" class="method-detail">
<a name="M000100"></a>
<div class="method-heading">
<a href="MouseWheel.src/M000100.html" target="Code" class="method-signature"
onclick="popupCode('MouseWheel.src/M000100.html');return false;">
<span class="method-name">y</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Y position of the mouse pointer, relative to the top of the owner window
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>delta (SFML::Event::MouseWheel)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Number of ticks the wheel has moved (positive is up, negative is down). */
static VALUE MouseWheelEvent_GetDelta( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>x (SFML::Event::MouseWheel)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* X position of the mouse pointer, relative to the left of the owner window */
static VALUE MouseWheelEvent_GetX( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>y (SFML::Event::MouseWheel)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* Y position of the mouse pointer, relative to the top of the owner window */
static VALUE MouseWheelEvent_GetY( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,208 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::Size</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::Size</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000102">height</a>&nbsp;&nbsp;
<a href="#M000101">width</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000102" class="method-detail">
<a name="M000102"></a>
<div class="method-heading">
<a href="Size.src/M000102.html" target="Code" class="method-signature"
onclick="popupCode('Size.src/M000102.html');return false;">
<span class="method-name">height</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
New <a href="Size.html#M000101">width</a>, in pixels.
</p>
</div>
</div>
<div id="method-M000101" class="method-detail">
<a name="M000101"></a>
<div class="method-heading">
<a href="Size.src/M000101.html" target="Code" class="method-signature"
onclick="popupCode('Size.src/M000101.html');return false;">
<span class="method-name">width</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
New <a href="Size.html#M000101">width</a>, in pixels.
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>width (SFML::Event::Size)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* New width, in pixels. */
static VALUE SizeEvent_GetWidth( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>height (SFML::Event::Size)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* New width, in pixels. */
static VALUE SizeEvent_GetWidth( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,190 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Event::Text</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Event::Text</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../../files/window/Event_cpp.html">
window/Event.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../Event.html">SFML::Event</a> holds all the informations about a
system event that just happened.
</p>
<p>
Events are retrieved using the SFML::Window#GetEvent function.
</p>
<p>
A <a href="../Event.html">SFML::Event</a> instance contains the type of the
event (mouse moved, key pressed, window closed, &#8230;) as well as the
details about this particular event. Please note that the event parameters
are defined in a union, which means that only the member matching the type
of the event will be properly filled; all other members will have undefined
values and must not be read if the type of the event doesn&#8216;t match.
For example, if you received a KeyPressed event, then you must read the
event.Key
</p>
<pre>
member, all other members such as event.MouseMove or event.Text will have undefined values.
</pre>
<p>
The ruby version differs from C++ in that the parameters are still stored
in a union but that the values can be directly accessed from the event
object. If you try to access any data which would be considered undefined
then SFML::SomeKindOfException will be thrown.
</p>
<p>
Usage example:
</p>
<pre>
while event = window.getEvent()
# Request for closing the window
if event.type == SFML::Event::Closed
window.close
# The escape key was pressed
if ( event.type == sf::Event::KeyPressed ) &amp;&amp; ( event.code == SFML::Key::Escape )
window.close
# The window was resized
if event.type == SFML::Event::Resized
DoSomethingWithTheNewSize(event.size);
# etc ...
end
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000103">unicode</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000103" class="method-detail">
<a name="M000103"></a>
<div class="method-heading">
<a href="Text.src/M000103.html" target="Code" class="method-signature"
onclick="popupCode('Text.src/M000103.html');return false;">
<span class="method-name">unicode</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
UTF-32 <a href="Text.html#M000103">unicode</a> value of the character.
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>unicode (SFML::Event::Text)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* UTF-32 unicode value of the character. */
static VALUE TextEvent_GetUnicode( VALUE self )
</pre>
</body>
</html>

View File

@ -0,0 +1,484 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::Input</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::Input</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
The <a href="Input.html">SFML::Input</a> class provides a way to access the
state of keys, mouse buttons, mouse position, joystick buttons and jostick
axis.
</p>
<p>
<a href="Input.html">SFML::Input</a> provides the same informations as the
event system, but these informations can be accessed at any time, which is
more convenient in many situations.
</p>
<p>
For example, to move an entity you can decide to catch the
SFML::Event::KeyPressed event on arrow keys. But if you do so, you will
only receive one event when the key gets pressed (or repeated events if you
activated this feature), thus the entity will not move smoothly. The best
solution here is to use <a
href="Input.html#M000002">SFML::Input#isKeyDown</a> so that you can update
your entity&#8216;s position at every iteration of your game loop, not only
when you catch a KeyPressed event.
</p>
<p>
Note that instances of <a href="Input.html">SFML::Input</a> cannot be
created directly, they must be retrieved from a window (<a
href="Window.html">SFML::Window</a>) with the <a
href="Window.html#M000067">SFML::Window#input</a> method.
</p>
<p>
Usage example:
</p>
<pre>
# Retrieve the input object attached to our window
input = window.input
# Move an entity according to the current keys state
offset = 5.0 * window.frameTime # 5 pixels/sec
entity.move( -offset, 0 ) if input.keyDown?( SFML::Key::Left )
entity.move( offset, 0 ) if input.keyDown?( SFML::Key::Right )
entity.move( 0, -offset ) if input.keyDown?( SFML::Key::Up )
entity.move( 0, offset ) if input.keyDown?( SFML::Key::Down )
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000007">getJoystickAxis</a>&nbsp;&nbsp;
<a href="#M000005">getMouseX</a>&nbsp;&nbsp;
<a href="#M000006">getMouseY</a>&nbsp;&nbsp;
<a href="#M000004">isJoystickButtonDown</a>&nbsp;&nbsp;
<a href="#M000002">isKeyDown</a>&nbsp;&nbsp;
<a href="#M000003">isMouseButtonDown</a>&nbsp;&nbsp;
<a href="#M000018">joystickAxis</a>&nbsp;&nbsp;
<a href="#M000013">joystickButtonDown?</a>&nbsp;&nbsp;
<a href="#M000019">joystick_axis</a>&nbsp;&nbsp;
<a href="#M000012">joystick_button_down?</a>&nbsp;&nbsp;
<a href="#M000009">keyDown?</a>&nbsp;&nbsp;
<a href="#M000008">key_down?</a>&nbsp;&nbsp;
<a href="#M000011">mouseButtonDown?</a>&nbsp;&nbsp;
<a href="#M000014">mouseX</a>&nbsp;&nbsp;
<a href="#M000016">mouseY</a>&nbsp;&nbsp;
<a href="#M000010">mouse_button_down?</a>&nbsp;&nbsp;
<a href="#M000015">mouse_x</a>&nbsp;&nbsp;
<a href="#M000017">mouse_y</a>&nbsp;&nbsp;
<a href="#M000001">new</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000001" class="method-detail">
<a name="M000001"></a>
<div class="method-heading">
<a href="Input.src/M000001.html" target="Code" class="method-signature"
onclick="popupCode('Input.src/M000001.html');return false;">
<span class="method-name">Input.new() &rarr; input<br />
</span>
</a>
</div>
<div class="method-description">
<p>
This will create a <a href="Input.html#M000001">new</a> input object.
though it will not receive any updates of events. You should aquire an
input object from the <a href="Window.html#M000067">SFML::Window#input</a>
method.
</p>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000007" class="method-detail">
<a name="M000007"></a>
<div class="method-heading">
<a href="Input.src/M000007.html" target="Code" class="method-signature"
onclick="popupCode('Input.src/M000007.html');return false;">
<span class="method-name">input.getJoystickAxis( joystick, axis ) &rarr; true or false<br />
</span>
</a>
</div>
<div class="method-description">
<p>
The returned position is in the range [-100, 100], except the POV which is
an angle and is thus defined in [0, 360].
</p>
</div>
</div>
<div id="method-M000005" class="method-detail">
<a name="M000005"></a>
<div class="method-heading">
<a href="Input.src/M000005.html" target="Code" class="method-signature"
onclick="popupCode('Input.src/M000005.html');return false;">
<span class="method-name">input.getMouseX() &rarr; fixnum<br />
</span>
</a>
</div>
<div class="method-description">
<p>
The returned position is relative to the left border of the owner window.
</p>
</div>
</div>
<div id="method-M000006" class="method-detail">
<a name="M000006"></a>
<div class="method-heading">
<a href="Input.src/M000006.html" target="Code" class="method-signature"
onclick="popupCode('Input.src/M000006.html');return false;">
<span class="method-name">input.getMouseY() &rarr; fixnum<br />
</span>
</a>
</div>
<div class="method-description">
<p>
The returned position is relative to the top border of the owner window.
</p>
</div>
</div>
<div id="method-M000004" class="method-detail">
<a name="M000004"></a>
<div class="method-heading">
<a href="Input.src/M000004.html" target="Code" class="method-signature"
onclick="popupCode('Input.src/M000004.html');return false;">
<span class="method-name">input.isJoystickButtonDown( joystick, button ) &rarr; true or false<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Get the current state of a joystick button (pressed or released).
</p>
</div>
</div>
<div id="method-M000002" class="method-detail">
<a name="M000002"></a>
<div class="method-heading">
<a href="Input.src/M000002.html" target="Code" class="method-signature"
onclick="popupCode('Input.src/M000002.html');return false;">
<span class="method-name">input.isKeyDown( keycode ) &rarr; true or false<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Get the current state of a key (pressed or released).
</p>
</div>
</div>
<div id="method-M000003" class="method-detail">
<a name="M000003"></a>
<div class="method-heading">
<a href="Input.src/M000003.html" target="Code" class="method-signature"
onclick="popupCode('Input.src/M000003.html');return false;">
<span class="method-name">input.isMouseButtonDown( keycode ) &rarr; true or false<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Get the current state of a mouse button (pressed or released).
</p>
</div>
</div>
<div id="method-M000018" class="method-detail">
<a name="M000018"></a>
<div class="method-heading">
<span class="method-name">joystickAxis</span><span class="method-args">(p1, p2)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000007">getJoystickAxis</a>
</p>
</div>
</div>
<div id="method-M000013" class="method-detail">
<a name="M000013"></a>
<div class="method-heading">
<span class="method-name">joystickButtonDown?</span><span class="method-args">(p1, p2)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000004">isJoystickButtonDown</a>
</p>
</div>
</div>
<div id="method-M000019" class="method-detail">
<a name="M000019"></a>
<div class="method-heading">
<span class="method-name">joystick_axis</span><span class="method-args">(p1, p2)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000007">getJoystickAxis</a>
</p>
</div>
</div>
<div id="method-M000012" class="method-detail">
<a name="M000012"></a>
<div class="method-heading">
<span class="method-name">joystick_button_down?</span><span class="method-args">(p1, p2)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000004">isJoystickButtonDown</a>
</p>
</div>
</div>
<div id="method-M000009" class="method-detail">
<a name="M000009"></a>
<div class="method-heading">
<span class="method-name">keyDown?</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000002">isKeyDown</a>
</p>
</div>
</div>
<div id="method-M000008" class="method-detail">
<a name="M000008"></a>
<div class="method-heading">
<span class="method-name">key_down?</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000002">isKeyDown</a>
</p>
</div>
</div>
<div id="method-M000011" class="method-detail">
<a name="M000011"></a>
<div class="method-heading">
<span class="method-name">mouseButtonDown?</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000003">isMouseButtonDown</a>
</p>
</div>
</div>
<div id="method-M000014" class="method-detail">
<a name="M000014"></a>
<div class="method-heading">
<span class="method-name">mouseX</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000005">getMouseX</a>
</p>
</div>
</div>
<div id="method-M000016" class="method-detail">
<a name="M000016"></a>
<div class="method-heading">
<span class="method-name">mouseY</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000006">getMouseY</a>
</p>
</div>
</div>
<div id="method-M000010" class="method-detail">
<a name="M000010"></a>
<div class="method-heading">
<span class="method-name">mouse_button_down?</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000003">isMouseButtonDown</a>
</p>
</div>
</div>
<div id="method-M000015" class="method-detail">
<a name="M000015"></a>
<div class="method-heading">
<span class="method-name">mouse_x</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000005">getMouseX</a>
</p>
</div>
</div>
<div id="method-M000017" class="method-detail">
<a name="M000017"></a>
<div class="method-heading">
<span class="method-name">mouse_y</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="Input.html#M000006">getMouseY</a>
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (SFML::Input)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* Input.new() -&gt; input
*
* This will create a new input object. though it will not receive any updates of events.
* You should aquire an input object from the SFML::Window#input method.
*/
static VALUE Input_New( int argc, VALUE * args, VALUE aKlass )
{
sf::Input *object = new sf::Input();
VALUE rbData = Data_Wrap_Struct( aKlass, 0, Input_Free, object );
rb_obj_call_init( rbData, argc, args );
return rbData;
}</pre>
</body>
</html>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>isKeyDown (SFML::Input)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* input.isKeyDown( keycode ) -&gt; true or false
*
* Get the current state of a key (pressed or released).
*/
static VALUE Input_IsKeyDown( VALUE self, VALUE aKeyCode )
{
sf::Input *object = NULL;
Data_Get_Struct( self, sf::Input, object );
sf::Key::Code rawCode = static_cast&lt; sf::Key::Code &gt; ( NUM2INT( aKeyCode ) );
if( object-&gt;IsKeyDown( rawCode ) == true )
{
return Qtrue;
}
else
{
return Qfalse;
}
}</pre>
</body>
</html>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>isMouseButtonDown (SFML::Input)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* input.isMouseButtonDown( keycode ) -&gt; true or false
*
* Get the current state of a mouse button (pressed or released).
*/
static VALUE Input_IsMouseButtonDown( VALUE self, VALUE aMouseButton )
{
sf::Input *object = NULL;
Data_Get_Struct( self, sf::Input, object );
sf::Mouse::Button rawButton = static_cast&lt; sf::Mouse::Button &gt; ( NUM2INT( aMouseButton ) );
if( object-&gt;IsMouseButtonDown( rawButton ) == true )
{
return Qtrue;
}
else
{
return Qfalse;
}
}</pre>
</body>
</html>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>isJoystickButtonDown (SFML::Input)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* input.isJoystickButtonDown( joystick, button ) -&gt; true or false
*
* Get the current state of a joystick button (pressed or released).
*/
static VALUE Input_IsJoystickButtonDown( VALUE self, VALUE aJoystick, VALUE aButton )
{
sf::Input *object = NULL;
Data_Get_Struct( self, sf::Input, object );
unsigned int rawJoystick = NUM2UINT( aJoystick );
unsigned int rawButton = NUM2UINT( aButton );
if( object-&gt;IsJoystickButtonDown( aJoystick, rawButton ) == true )
{
return Qtrue;
}
else
{
return Qfalse;
}
}</pre>
</body>
</html>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getMouseX (SFML::Input)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* input.getMouseX() -&gt; fixnum
*
* The returned position is relative to the left border of the owner window.
*/
static VALUE Input_GetMouseX( VALUE self, VALUE aMouseButton )
{
sf::Input *object = NULL;
Data_Get_Struct( self, sf::Input, object );
return INT2FIX( object-&gt;GetMouseX() );
}</pre>
</body>
</html>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getMouseY (SFML::Input)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* input.getMouseY() -&gt; fixnum
*
* The returned position is relative to the top border of the owner window.
*/
static VALUE Input_GetMouseY( VALUE self, VALUE aMouseButton )
{
sf::Input *object = NULL;
Data_Get_Struct( self, sf::Input, object );
return INT2FIX( object-&gt;GetMouseY() );
}</pre>
</body>
</html>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getJoystickAxis (SFML::Input)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* input.getJoystickAxis( joystick, axis ) -&gt; true or false
*
* The returned position is in the range [-100, 100], except the POV which is an angle and is thus defined in [0, 360].
*/
static VALUE Input_GetJoystickAxis( VALUE self, VALUE aJoystick, VALUE anAxis )
{
sf::Input *object = NULL;
Data_Get_Struct( self, sf::Input, object );
unsigned int rawJoystick = NUM2UINT( aJoystick );
sf::Joy::Axis rawAxis = static_cast&lt; sf::Joy::Axis &gt;( NUM2INT( anAxis ) );
return rb_float_new( object-&gt;GetJoystickAxis( rawJoystick, rawAxis ) );
}</pre>
</body>
</html>

View File

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Module: SFML::Joy</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Module</strong></td>
<td class="class-name-in-header">SFML::Joy</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
Definition of joystick axis for joystick events.
</p>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisX</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisX )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisY</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisY )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisZ</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisZ )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisR</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisR )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisU</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisU )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisV</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisV )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisPOV</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisPOV )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">AxisCount</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Joy::AxisCount )</td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,298 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Module: SFML::Key</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Module</strong></td>
<td class="class-name-in-header">SFML::Key</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
Definition of key codes for keyboard events.
</p>
<p>
All <a href="Key.html">SFML::Key</a> constants exists, I just haven&#8216;t
written them all so Rdoc can interpret them yet.
</p>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">A</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::A )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">B</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::B )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">C</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::C )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">D</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::D )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">E</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::E )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">F</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::F )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">G</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::G )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">H</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::H )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">I</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::I )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">J</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::J )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">K</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::K )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">L</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::L )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">M</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::M )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">N</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::N )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">O</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::O )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">P</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::P )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Q</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Q )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">R</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::R )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">S</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::S )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">T</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::T )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">U</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::U )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">V</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::V )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">X</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::X )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Y</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Y )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Z</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Z )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num0</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num0 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num1</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num1 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num2</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num2 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num3</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num3 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num4</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num4 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num5</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num5 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num6</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num6 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num7</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num7 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num8</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num8 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Num9</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Key::Num9 )</td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Module: SFML::Mouse</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Module</strong></td>
<td class="class-name-in-header">SFML::Mouse</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
Definition of button codes for mouse events.
</p>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">Left</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Mouse::Left )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Right</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Mouse::Right )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Middle</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Mouse::Middle )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">XButton1</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Mouse::XButton1 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">XButton2</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Mouse::XButton2 )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">ButtonCount</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Mouse::ButtonCount )</td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Module: SFML::Style</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Module</strong></td>
<td class="class-name-in-header">SFML::Style</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
Enumeration of the window styles.
</p>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">None</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Style::None )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Titlebar</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Style::Titlebar )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Resize</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Style::Resize )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Close</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Style::Close )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Fullscreen</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Style::Fullscreen )</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">Default</td>
<td>=</td>
<td class="context-item-value">INT2FIX( sf::Style::Default )</td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,414 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Class: SFML::VideoMode</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">SFML::VideoMode</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/window/main_cpp.html">
window/main.cpp
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
A video mode is defined by a <a href="VideoMode.html#M000023">width</a> and
a <a href="VideoMode.html#M000025">height</a> (in pixels) and a depth (in
bits per pixel).
</p>
<p>
Video modes are used to setup windows (<a
href="Window.html">SFML::Window</a>) at creation time.
</p>
<p>
The main usage of video modes is for fullscreen mode: indeed you must use
one of the valid video modes allowed by the OS (which are defined by what
the monitor and the graphics card support), otherwise your window creation
will just fail.
</p>
<p>
<a href="VideoMode.html">SFML::VideoMode</a> provides a static function for
retrieving the list of all the video modes supported by the system: <a
href="VideoMode.html#M000022">getFullscreenModes</a>().
</p>
<p>
A custom video mode can also be checked directly for fullscreen
compatibility with its isValid() function.
</p>
<p>
Additionnally, <a href="VideoMode.html">SFML::VideoMode</a> provides a
static function to get the mode currently used by the desktop: <a
href="VideoMode.html#M000021">getDesktopMode</a>(). This allows to build
windows with the same size or pixel depth as the current resolution.
</p>
<p>
Usage example:
</p>
<pre>
# Display the list of all the video modes available for fullscreen
modes = SFML::VideoMode.getFullscreenModes()
i = 0
modes.each do | mode |
puts &quot;Mode #&quot; + i + &quot;: &quot; + mode.width + &quot;x&quot; + mode.height + &quot; - &quot; + mode.bitsPerPixel + &quot; bpp&quot;
end
# Create a window with the same pixel depth as the desktop
desktop = SFML::VideoMode.getDesktopMode()
window.create( SFML::VideoMode.new( 1024, 768, desktop.BitsPerPixel ), &quot;SFML window&quot; )
</pre>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000027">bitsPerPixel</a>&nbsp;&nbsp;
<a href="#M000028">bitsPerPixel=</a>&nbsp;&nbsp;
<a href="#M000029">bits_per_pixel</a>&nbsp;&nbsp;
<a href="#M000030">bits_per_pixel=</a>&nbsp;&nbsp;
<a href="#M000031">bpp</a>&nbsp;&nbsp;
<a href="#M000032">bpp=</a>&nbsp;&nbsp;
<a href="#M000021">getDesktopMode</a>&nbsp;&nbsp;
<a href="#M000022">getFullscreenModes</a>&nbsp;&nbsp;
<a href="#M000025">height</a>&nbsp;&nbsp;
<a href="#M000026">height=</a>&nbsp;&nbsp;
<a href="#M000020">new</a>&nbsp;&nbsp;
<a href="#M000023">width</a>&nbsp;&nbsp;
<a href="#M000024">width=</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000021" class="method-detail">
<a name="M000021"></a>
<div class="method-heading">
<a href="VideoMode.src/M000021.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000021.html');return false;">
<span class="method-name">VideoMode.getDesktopMode &rarr; desktop_mode<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Get the current desktop video mode.
</p>
</div>
</div>
<div id="method-M000022" class="method-detail">
<a name="M000022"></a>
<div class="method-heading">
<a href="VideoMode.src/M000022.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000022.html');return false;">
<span class="method-name">VideoMode.getFullscreenModes &rarr; [supported_modes]<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Retrieve all the video modes supported in fullscreen mode.
</p>
<p>
When creating a fullscreen window, the video mode is restricted to be
compatible with what the graphics driver and monitor support. This function
returns the complete list of all video modes that can be used in fullscreen
mode. The returned array is sorted from best to worst, so that the first
element will always give the best mode (higher <a
href="VideoMode.html#M000023">width</a>, <a
href="VideoMode.html#M000025">height</a> and bits-per-pixel).
</p>
</div>
</div>
<div id="method-M000020" class="method-detail">
<a name="M000020"></a>
<div class="method-heading">
<a href="VideoMode.src/M000020.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000020.html');return false;">
<span class="method-name">VideoMode.new() &rarr; mode<br />
VideoMode.new( width, height, bpp = 32 ) &rarr; mode<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Create a <a href="VideoMode.html#M000020">new</a> mode.
</p>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000027" class="method-detail">
<a name="M000027"></a>
<div class="method-heading">
<a href="VideoMode.src/M000027.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000027.html');return false;">
<span class="method-name">mode.bitsPerPixel &rarr; bpp<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Video mode pixel depth, in bits per pixels.
</p>
</div>
</div>
<div id="method-M000028" class="method-detail">
<a name="M000028"></a>
<div class="method-heading">
<a href="VideoMode.src/M000028.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000028.html');return false;">
<span class="method-name">mode.bitsPerPixel=(new_bpp) &rarr; new_bpp<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Video mode pixel depth, in bits per pixels.
</p>
</div>
</div>
<div id="method-M000029" class="method-detail">
<a name="M000029"></a>
<div class="method-heading">
<span class="method-name">bits_per_pixel</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="VideoMode.html#M000027">bitsPerPixel</a>
</p>
</div>
</div>
<div id="method-M000030" class="method-detail">
<a name="M000030"></a>
<div class="method-heading">
<span class="method-name">bits_per_pixel=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="VideoMode.html#M000027">bitsPerPixel</a>=
</p>
</div>
</div>
<div id="method-M000031" class="method-detail">
<a name="M000031"></a>
<div class="method-heading">
<span class="method-name">bpp</span><span class="method-args">()</span>
</div>
<div class="method-description">
<p>
Alias for <a href="VideoMode.html#M000027">bitsPerPixel</a>
</p>
</div>
</div>
<div id="method-M000032" class="method-detail">
<a name="M000032"></a>
<div class="method-heading">
<span class="method-name">bpp=</span><span class="method-args">(p1)</span>
</div>
<div class="method-description">
<p>
Alias for <a href="VideoMode.html#M000027">bitsPerPixel</a>=
</p>
</div>
</div>
<div id="method-M000025" class="method-detail">
<a name="M000025"></a>
<div class="method-heading">
<a href="VideoMode.src/M000025.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000025.html');return false;">
<span class="method-name">mode.width &rarr; width<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Video mode <a href="VideoMode.html#M000023">width</a>, in pixels.
</p>
</div>
</div>
<div id="method-M000026" class="method-detail">
<a name="M000026"></a>
<div class="method-heading">
<a href="VideoMode.src/M000026.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000026.html');return false;">
<span class="method-name">mode.width=(new_width) &rarr; new_width<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Video mode <a href="VideoMode.html#M000023">width</a>, in pixels.
</p>
</div>
</div>
<div id="method-M000023" class="method-detail">
<a name="M000023"></a>
<div class="method-heading">
<a href="VideoMode.src/M000023.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000023.html');return false;">
<span class="method-name">mode.width &rarr; width<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Video mode <a href="VideoMode.html#M000023">width</a>, in pixels.
</p>
</div>
</div>
<div id="method-M000024" class="method-detail">
<a name="M000024"></a>
<div class="method-heading">
<a href="VideoMode.src/M000024.html" target="Code" class="method-signature"
onclick="popupCode('VideoMode.src/M000024.html');return false;">
<span class="method-name">mode.width=(new_width) &rarr; new_width<br />
</span>
</a>
</div>
<div class="method-description">
<p>
Video mode <a href="VideoMode.html#M000023">width</a>, in pixels.
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (SFML::VideoMode)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* VideoMode.new() -&gt; mode
* VideoMode.new( width, height, bpp = 32 ) -&gt; mode
*
* Create a new mode.
*/
static VALUE VideoMode_New( int argc, VALUE *args, VALUE aKlass )
{
sf::VideoMode *object = NULL;
switch( argc )
{
case 0:
object = new sf::VideoMode();
break;
case 2:
object = new sf::VideoMode( FIX2UINT( args[0] ), FIX2UINT( args[1] ) );
break;
case 3:
object = new sf::VideoMode( FIX2UINT( args[0] ), FIX2UINT( args[1] ),FIX2UINT( args[2] ) );
break;
default:
rb_raise( rb_eArgError, &quot;Expected 0, 2 or 3 arguments but was given %d&quot;, argc );
break;
}
VALUE rbData = Data_Wrap_Struct( aKlass, 0, VideoMode_Free, object );
rb_obj_call_init( rbData, 0, 0 );
return rbData;
}</pre>
</body>
</html>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getDesktopMode (SFML::VideoMode)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* VideoMode.getDesktopMode -&gt; desktop_mode
*
* Get the current desktop video mode.
*/
static VALUE VideoMode_GetDesktopMode( VALUE aKlass )
{
sf::VideoMode *object = new sf::VideoMode( sf::VideoMode::GetDesktopMode() );
VALUE rbData = Data_Wrap_Struct( aKlass, 0, VideoMode_Free, object );
rb_obj_call_init( rbData, 0, 0 );
return rbData;
}</pre>
</body>
</html>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>getFullscreenModes (SFML::VideoMode)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* VideoMode.getFullscreenModes -&gt; [supported_modes]
*
* Retrieve all the video modes supported in fullscreen mode.
*
* When creating a fullscreen window, the video mode is restricted to be compatible with what the graphics driver and
* monitor support. This function returns the complete list of all video modes that can be used in fullscreen mode.
* The returned array is sorted from best to worst, so that the first element will always give the best mode
* (higher width, height and bits-per-pixel).
*/
static VALUE VideoMode_GetFullscreenModes( VALUE aKlass )
{
const std::vector&lt; sf::VideoMode &gt;&amp; modes = sf::VideoMode::GetFullscreenModes();
VALUE array = rb_ary_new();
for( std::vector&lt; sf::VideoMode &gt;::const_iterator it = modes.begin(), end = modes.end(); it != end; it++ )
{
sf::VideoMode *object = new sf::VideoMode( *it );
VALUE rbData = Data_Wrap_Struct( aKlass, 0, VideoMode_Free, object );
rb_obj_call_init( rbData, 0, 0 );
rb_ary_push( array, rbData );
}
return array;
}</pre>
</body>
</html>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>width (SFML::VideoMode)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* mode.width -&gt; width
*
* Video mode width, in pixels.
*/
static VALUE VideoMode_GetWidth( VALUE self )
{
sf::VideoMode *object = NULL;
Data_Get_Struct( self, sf::VideoMode, object );
return INT2FIX( object-&gt;Width );
}</pre>
</body>
</html>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>width= (SFML::VideoMode)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* call-seq:
* mode.width=(new_width) -&gt; new_width
*
* Video mode width, in pixels.
*/
static VALUE VideoMode_SetWidth( VALUE self, VALUE aValue )
{
sf::VideoMode *object = NULL;
Data_Get_Struct( self, sf::VideoMode, object );
return INT2FIX( object-&gt;Width = NUM2UINT( aValue ) );
}</pre>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More