<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Class: Fox::FXGLObject
— FXRuby API Documentation
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "Fox::FXGLObject";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (F)</a> »
<span class='title'><span class='object_link'><a href="../Fox.html" title="Fox (module)">Fox</a></span></span>
»
<span class="title">FXGLObject</span>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="../class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Class: Fox::FXGLObject
</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd>
<span class="inheritName"><span class='object_link'><a href="FXObject.html" title="Fox::FXObject (class)">FXObject</a></span></span>
<ul class="fullTree">
<li>Object</li>
<li class="next"><span class='object_link'><a href="FXObject.html" title="Fox::FXObject (class)">FXObject</a></span></li>
<li class="next">Fox::FXGLObject</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>rdoc-sources/FXGLObject.rb</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>Basic OpenGL object.</p>
</div>
</div>
<div class="tags">
</div><div id="subclasses">
<h2>Direct Known Subclasses</h2>
<p class="children"><span class='object_link'><a href="FXGLGroup.html" title="Fox::FXGLGroup (class)">FXGLGroup</a></span>, <span class='object_link'><a href="FXGLLine.html" title="Fox::FXGLLine (class)">FXGLLine</a></span>, <span class='object_link'><a href="FXGLPoint.html" title="Fox::FXGLPoint (class)">FXGLPoint</a></span>, <span class='object_link'><a href="FXGLShape.html" title="Fox::FXGLShape (class)">FXGLShape</a></span></p>
</div>
<h2>
Instance Method Summary
<small><a href="#" class="summary_toggle">collapse</a></small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#bounds-instance_method" title="#bounds (instance method)">#<strong>bounds</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Return a bounding box (an FXRangef instance) for this object.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#canDelete-instance_method" title="#canDelete (instance method)">#<strong>canDelete</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Return <code>true</code> if this object can be deleted from the scene.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#canDrag-instance_method" title="#canDrag (instance method)">#<strong>canDrag</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Return <code>true</code> if this object can be dragged around.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#copy-instance_method" title="#copy (instance method)">#<strong>copy</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Return a new object which is a copy (i.e. a “clone”) of this one.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#drag-instance_method" title="#drag (instance method)">#<strong>drag</strong>(viewer, fx, fy, tx, ty) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Drag this object from one position to another.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#draw-instance_method" title="#draw (instance method)">#<strong>draw</strong>(viewer) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Draw this object in a viewer.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#hit-instance_method" title="#hit (instance method)">#<strong>hit</strong>(viewer) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Draw this object for hit-testing purposes.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#identify-instance_method" title="#identify (instance method)">#<strong>identify</strong>(path) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Identify sub-object given path, where <em>path</em> is a list of integer names pushed onto the stack during hit testing.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> ⇒ FXGLObject </a>
</span>
<span class="note title constructor">constructor</span>
<span class="summary_desc"><div class='inline'>
<p>Return an initialized FXGLObject instance.</p>
</div></span>
</li>
</ul>
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="FXObject.html" title="Fox::FXObject (class)">FXObject</a></span></h3>
<p class="inherited"><span class='object_link'><a href="FXObject.html#bind-instance_method" title="Fox::FXObject#bind (method)">#bind</a></span>, <span class='object_link'><a href="FXObject.html#handle-instance_method" title="Fox::FXObject#handle (method)">#handle</a></span>, <span class='object_link'><a href="FXObject.html#load-instance_method" title="Fox::FXObject#load (method)">#load</a></span>, <span class='object_link'><a href="FXObject.html#save-instance_method" title="Fox::FXObject#save (method)">#save</a></span>, <span class='object_link'><a href="FXObject.html#subclasses-class_method" title="Fox::FXObject.subclasses (method)">subclasses</a></span></p>
<div id="constructor_details" class="method_details_list">
<h2>Constructor Details</h2>
<div class="method_details first">
<h3 class="signature first" id="initialize-instance_method">
#<strong>initialize</strong> ⇒ <tt><span class='object_link'><a href="" title="Fox::FXGLObject (class)">FXGLObject</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Return an initialized FXGLObject instance.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
9
10</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXGLObject.rb', line 9</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='comment'># :yields: theGLObject
</span><span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="bounds-instance_method">
#<strong>bounds</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Return a bounding box (an FXRangef instance) for this object.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
20</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXGLObject.rb', line 20</span>
<span class='kw'>def</span> <span class='id identifier rubyid_bounds'>bounds</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="canDelete-instance_method">
#<strong>canDelete</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Return <code>true</code> if this object can be deleted from the scene.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
48</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXGLObject.rb', line 48</span>
<span class='kw'>def</span> <span class='id identifier rubyid_canDelete'>canDelete</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="canDrag-instance_method">
#<strong>canDrag</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Return <code>true</code> if this object can be dragged around.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
43</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXGLObject.rb', line 43</span>
<span class='kw'>def</span> <span class='id identifier rubyid_canDrag'>canDrag</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="copy-instance_method">
#<strong>copy</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Return a new object which is a copy (i.e. a “clone”) of this one.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
15</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXGLObject.rb', line 15</span>
<span class='kw'>def</span> <span class='id identifier rubyid_copy'>copy</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="drag-instance_method">
#<strong>drag</strong>(viewer, fx, fy, tx, ty) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Drag this object from one position to another. Returns <code>true</code> if the drag was successful.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>viewer</code>
<dd>
<p>the viewer window in which we’re dragging <span class='object_link'><a href="FXGLViewer.html" title="Fox::FXGLViewer (class)">Fox::FXGLViewer</a></span></p>
</dd><dt><code>fx</code>
<dd>
<p>x-coordinate for position we’re dragging from [Integer]</p>
</dd><dt><code>fy</code>
<dd>
<p>y-coordinate for position we’re dragging from [Integer]</p>
</dd><dt><code>tx</code>
<dd>
<p>x-coordinate for position we’re dragging to [Integer]</p>
</dd><dt><code>ty</code>
<dd>
<p>y-coordinate for position we’re dragging to [Integer]</p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
62</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXGLObject.rb', line 62</span>
<span class='kw'>def</span> <span class='id identifier rubyid_drag'>drag</span><span class='lparen'>(</span><span class='id identifier rubyid_viewer'>viewer</span><span class='comma'>,</span> <span class='id identifier rubyid_fx'>fx</span><span class='comma'>,</span> <span class='id identifier rubyid_fy'>fy</span><span class='comma'>,</span> <span class='id identifier rubyid_tx'>tx</span><span class='comma'>,</span> <span class='id identifier rubyid_ty'>ty</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="draw-instance_method">
#<strong>draw</strong>(viewer) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Draw this object in a viewer.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>viewer</code>
<dd>
<p>the viewer window into which we’re drawing <span class='object_link'><a href="FXGLViewer.html" title="Fox::FXGLViewer (class)">Fox::FXGLViewer</a></span></p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
29</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXGLObject.rb', line 29</span>
<span class='kw'>def</span> <span class='id identifier rubyid_draw'>draw</span><span class='lparen'>(</span><span class='id identifier rubyid_viewer'>viewer</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="hit-instance_method">
#<strong>hit</strong>(viewer) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Draw this object for hit-testing purposes.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>viewer</code>
<dd>
<p>the viewer window into which we’re drawing <span class='object_link'><a href="FXGLViewer.html" title="Fox::FXGLViewer (class)">Fox::FXGLViewer</a></span></p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
38</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXGLObject.rb', line 38</span>
<span class='kw'>def</span> <span class='id identifier rubyid_hit'>hit</span><span class='lparen'>(</span><span class='id identifier rubyid_viewer'>viewer</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="identify-instance_method">
#<strong>identify</strong>(path) ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Identify sub-object given path, where <em>path</em> is a list of integer names pushed onto the stack during hit testing.</p>
<h4 id="label-Parameters-3A">Parameters:</h4>
<dl class="rdoc-list note-list"><dt><code>path</code>
<dd>
<p>an array of integers [Array]</p>
</dd></dl>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
72</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'rdoc-sources/FXGLObject.rb', line 72</span>
<span class='kw'>def</span> <span class='id identifier rubyid_identify'>identify</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Mon Jan 2 11:47:42 2023 by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.28 (ruby-3.1.2).
</div>
</div>
</body>
</html>