fxruby 1.6.18-universal-darwin-9 → 1.6.19-universal-darwin-9
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/apes02.html +2 -2
- data/doc/apes03.html +1 -1
- data/doc/book.html +1 -1
- data/doc/changes.html +43 -33
- data/doc/differences.html +9 -9
- data/doc/implementation.html +1 -1
- data/doc/library.html +5 -5
- data/doc/opengl.html +5 -5
- data/doc/pt02.html +1 -1
- data/doc/scintilla.html +4 -4
- data/doc/subversion.html +1 -1
- data/ext/fox16/fox16.bundle +0 -0
- data/index.html +14 -0
- data/lib/fox16/accel_table.rb +70 -0
- data/lib/fox16/responder.rb +1 -1
- data/lib/fox16/responder2.rb +2 -1
- data/lib/fox16/version.rb +1 -1
- data/rdoc-sources/FXAccelTable.rb +0 -18
- data/rdoc-sources/FXVec2d.rb +1 -1
- data/rdoc-sources/FXVec2f.rb +1 -1
- data/rdoc-sources/FXVec3d.rb +7 -2
- data/rdoc-sources/FXVec3f.rb +7 -2
- data/rdoc-sources/FXVec4d.rb +12 -2
- data/rdoc-sources/FXVec4f.rb +12 -2
- data/tests/TC_FXAccelTable.rb +39 -25
- data/tests/TC_FXDC.rb +1 -1
- data/tests/TC_FXDCPrint.rb +1 -2
- data/tests/TC_FXExtentd.rb +21 -0
- data/tests/TC_FXExtentf.rb +21 -0
- data/tests/TC_FXFileStream.rb +1 -2
- data/tests/TC_FXId.rb +3 -3
- data/tests/TC_FXQuatf.rb +24 -4
- data/tests/stress1.rb +2 -2
- data/web/community.html +5 -18
- data/web/documentation.html +7 -24
- data/web/downloads.html +10 -39
- data/web/index.html +13 -21
- metadata +6 -2
data/doc/pt02.html
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Part II. Appendices</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook v5 XSL Stylesheets V1.72.0"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="prev" href="changes.html" title="Chapter 10. Change History"><link rel="next" href="opengl.html" title="Appendix A. Using OpenGL with FXRuby"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part II. Appendices</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="changes.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="opengl.html">Next</a></td></tr></table><hr></div><div class="part" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="
|
3
|
+
<title>Part II. Appendices</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook v5 XSL Stylesheets V1.72.0"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="prev" href="changes.html" title="Chapter 10. Change History"><link rel="next" href="opengl.html" title="Appendix A. Using OpenGL with FXRuby"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part II. Appendices</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="changes.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="opengl.html">Next</a></td></tr></table><hr></div><div class="part" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="d0e4746"></a>Part II. Appendices</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="appendix"><a href="opengl.html">A. Using OpenGL with FXRuby</a></span></dt><dt><span class="appendix"><a href="scintilla.html">B. Using Scintilla with FXRuby</a></span></dt><dt><span class="appendix"><a href="differences.html">C. Differences between FOX and FXRuby</a></span></dt><dt><span class="appendix"><a href="library.html">D. The FXRuby Standard Library</a></span></dt><dt><span class="appendix"><a href="implementation.html">E. Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="implementation.html#d0e5797">Code Generation</a></span></dt><dt><span class="section"><a href="apes02.html">Object Life Cycles and Garbage Collection</a></span></dt><dd><dl><dt><span class="section"><a href="apes02.html#d0e5835">GL Objects</a></span></dt></dl></dd><dt><span class="section"><a href="apes03.html">Virtual Functions</a></span></dt></dl></dd><dt><span class="appendix"><a href="subversion.html">F. Getting the Sources from Subversion</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="changes.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="opengl.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 10. Change History </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix A. Using OpenGL with FXRuby</td></tr></table></div></body></html>
|
data/doc/scintilla.html
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Appendix B. Using Scintilla with FXRuby</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook v5 XSL Stylesheets V1.72.0"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt02.html" title="Part II. Appendices"><link rel="prev" href="opengl.html" title="Appendix A. Using OpenGL with FXRuby"><link rel="next" href="differences.html" title="Appendix C. Differences between FOX and FXRuby"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix B. Using Scintilla with FXRuby</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="opengl.html">Prev</a> </td><th width="60%" align="center">Part II. Appendices</th><td width="20%" align="right"> <a accesskey="n" href="differences.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="scintilla"></a>Appendix B. Using Scintilla with FXRuby</h2></div></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
3
|
+
<title>Appendix B. Using Scintilla with FXRuby</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook v5 XSL Stylesheets V1.72.0"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt02.html" title="Part II. Appendices"><link rel="prev" href="opengl.html" title="Appendix A. Using OpenGL with FXRuby"><link rel="next" href="differences.html" title="Appendix C. Differences between FOX and FXRuby"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix B. Using Scintilla with FXRuby</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="opengl.html">Prev</a> </td><th width="60%" align="center">Part II. Appendices</th><td width="20%" align="right"> <a accesskey="n" href="differences.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="scintilla"></a>Appendix B. Using Scintilla with FXRuby</h2></div></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4934"></a>What is Scintilla?</h2></div></div></div><p><a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.scintilla.org" target="_top">Scintilla</a> is a free
|
4
4
|
source code editing component developed by Neil Hodgson for the Win32 and
|
5
|
-
GTK+ platforms.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
5
|
+
GTK+ platforms.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4941"></a>What is FXScintilla?</h2></div></div></div><p><a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://savannah.gnu.org/projects/fxscintilla" target="_top">FXScintilla </a> is
|
6
6
|
a FOX widget that wraps around the Scintilla component, or, if you wish,
|
7
7
|
the FOX "port" of Scintilla. Until recently it was developed by Gilles Filippini,
|
8
8
|
and as of this writing the latest release is available for download from
|
9
|
-
<a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://download.savannah.gnu.org/releases/fxscintilla/fxscintilla-1.71.tar.gz" target="_top">http://download.savannah.gnu.org/releases/fxscintilla/fxscintilla-1.71.tar.gz</a>.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
9
|
+
<a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://download.savannah.gnu.org/releases/fxscintilla/fxscintilla-1.71.tar.gz" target="_top">http://download.savannah.gnu.org/releases/fxscintilla/fxscintilla-1.71.tar.gz</a>.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4951"></a>Compiling FXScintilla</h2></div></div></div><p>The FXScintilla distribution contains everything you need to build
|
10
10
|
the FXScintilla widget and begin using it in your C++-based FOX
|
11
11
|
applications. That is to say, you do not have to separately download the
|
12
12
|
Scintilla source code from the Scintilla home page. When you unpack the
|
@@ -17,7 +17,7 @@
|
|
17
17
|
other open-source software (like FOX) from the source code. The
|
18
18
|
<code class="filename">INSTALL</code> file in the top-level directory should
|
19
19
|
provide enough instruction for you to build and install FXScintilla for
|
20
|
-
either Unix or Microsoft Windows.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
20
|
+
either Unix or Microsoft Windows.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4964"></a>Enabling FXScintilla Support in FXRuby</h2></div></div></div><p>The next step is to build a version of FXRuby (from its source code)
|
21
21
|
with the optional FXScintilla support enabled. If you're working on a Unix
|
22
22
|
or Linux system and have installed FXScintilla in one of the standard
|
23
23
|
installation directories (e.g. under <code class="filename">/usr/include</code> or <code class="filename">/usr/local/include</code>), the regular FXRuby build
|
data/doc/subversion.html
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
<a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://svnbook.red-bean.com/" target="_top">book</a>.</p><p>You're also going to need to have a working <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.swig.org/" target="_top">SWIG</a> installation so that you can
|
15
15
|
generate the C++ source files from the SWIG interface files. As of this
|
16
16
|
writing, FXRuby requires SWIG version 1.3.22; later versions of SWIG will
|
17
|
-
not work, nor will versions earlier than about 1.3.15.</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
17
|
+
not work, nor will versions earlier than about 1.3.15.</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e5980"></a>Checking out the code</h2></div></div></div><p>To check out the development version (i.e. the trunk) for FXRuby,
|
18
18
|
type the following command:</p><pre class="screen">svn checkout svn://rubyforge.org/var/svn/fxruby/trunk/FXRuby</pre><p>Next, you'll need to use SWIG to generate the C++ source code from
|
19
19
|
the SWIG interface files. To do that, type:</p><pre class="screen">rake swig</pre><p>At this point, you should be ready to change to the top-level
|
20
20
|
directory and go through the normal build and installation process, as
|
data/ext/fox16/fox16.bundle
CHANGED
Binary file
|
data/index.html
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
2
|
+
<HTML>
|
3
|
+
<HEAD>
|
4
|
+
<title>FXRuby - Home Page</title>
|
5
|
+
<link rel="meta" title="DOAP" type="application/rdf+xml" href="http://www.fxruby.org/doap.rdf"/>
|
6
|
+
</HEAD>
|
7
|
+
<FRAMESET rows='55,*' border=0 frameborder=0 frameborder=no framespacing=0 >
|
8
|
+
<FRAME src='web/top.html' scrolling=no frameborder=0 frameborder=no marginwidth=0 marginheight=0>
|
9
|
+
<FRAMESET cols='170,*' border=0 frameborder=0 frameborder=no framespacing=0 >
|
10
|
+
<FRAME src='web/menu.html' frameborder=0 frameborder=no marginwidth=0 marginheight=0>
|
11
|
+
<FRAME src='web/home.html' frameborder=0 frameborder=no marginwidth=2 marginheight=1 name=page>
|
12
|
+
</FRAMESET>
|
13
|
+
</FRAMESET>
|
14
|
+
</HTML>
|
@@ -0,0 +1,70 @@
|
|
1
|
+
module Fox
|
2
|
+
class FXAccelTable
|
3
|
+
alias addAccelOrig addAccel # :nodoc:
|
4
|
+
|
5
|
+
#
|
6
|
+
# Add an accelerator to the table. The _hotKey_ is a code returned
|
7
|
+
# by the Fox.fxparseAccel method.
|
8
|
+
#
|
9
|
+
# There are several forms for _addAccel_; the original form (from FOX)
|
10
|
+
# takes either three or four arguments. For example, to associate the
|
11
|
+
# Ctrl+H keypress with sending the "hide" command to a window, you might
|
12
|
+
# use code like this:
|
13
|
+
#
|
14
|
+
# hotKey = fxparseAccel("Ctrl+H")
|
15
|
+
# accelTable.addAccel(hotKey, window, FXSEL(SEL_COMMAND, FXWindow::ID_HIDE))
|
16
|
+
#
|
17
|
+
# If you instead want to trigger the command on the key release (instead of
|
18
|
+
# the key press), pass a zero for the third argument and pass the command
|
19
|
+
# as the fourth argument:
|
20
|
+
#
|
21
|
+
# accelTable.addAccel(hotKey, window, 0, FXSEL(SEL_COMMAND, FXWindow::ID_HIDE))
|
22
|
+
#
|
23
|
+
# You can even pass in two different messages, corresponding to the key press
|
24
|
+
# and key release events for the hot key, although this is less common.
|
25
|
+
#
|
26
|
+
# accelTable.addAccel(hotKey, window,
|
27
|
+
# FXSEL(SEL_COMMAND, FXWindow::ID_HIDE),
|
28
|
+
# FXSEL(SEL_COMMAND, FXWindow::ID_SHOW))
|
29
|
+
#
|
30
|
+
# The problem with this form is that you need to be familiar with the message
|
31
|
+
# types and identifiers that different widgets respond to, and this information
|
32
|
+
# isn't very well documented. A more straightforward way to use _addAccel_
|
33
|
+
# from Ruby code is to instead pass one or more callable objects in as the
|
34
|
+
# second and third arguments. For example:
|
35
|
+
#
|
36
|
+
# accelTable.addAccel(hotKey, lambda { window.hide })
|
37
|
+
#
|
38
|
+
# or to trigger the event on the key release event:
|
39
|
+
#
|
40
|
+
# accelTable.addAccel(hotKey, nil, lambda { window.hide })
|
41
|
+
#
|
42
|
+
# Or to handle both the key press and key release events:
|
43
|
+
#
|
44
|
+
# accelTable.addAccel(hotKey, lambda { window.hide }, lambda { window.show })
|
45
|
+
#
|
46
|
+
def addAccel(hotKey, *args)
|
47
|
+
tgt, seldn, selup = nil, 0, 0
|
48
|
+
if args.length > 0
|
49
|
+
if args[0].respond_to? :call
|
50
|
+
tgt = FXPseudoTarget.new
|
51
|
+
seldn = FXSEL(SEL_KEYPRESS, 0)
|
52
|
+
tgt.pconnect(SEL_KEYPRESS, args[0])
|
53
|
+
else
|
54
|
+
tgt = args[0]
|
55
|
+
end
|
56
|
+
if args.length > 1
|
57
|
+
if args[1].respond_to? :call
|
58
|
+
tgt = tgt || FXPseudoTarget.new
|
59
|
+
selup = FXSEL(SEL_KEYRELEASE, 0)
|
60
|
+
tgt.pconnect(SEL_KEYRELEASE, args[1])
|
61
|
+
else
|
62
|
+
seldn = args[1]
|
63
|
+
selup = args[2] if args.length > 2
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
addAccelOrig(hotKey, tgt, seldn, selup)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
data/lib/fox16/responder.rb
CHANGED
@@ -19,7 +19,7 @@ module Responder
|
|
19
19
|
|
20
20
|
# Return the array of (selector -> func) associations
|
21
21
|
def messageMap
|
22
|
-
unless instance_variables.include?
|
22
|
+
unless instance_variables.include?("@assocs") || instance_variables.include?(:@assocs)
|
23
23
|
@assocs = []
|
24
24
|
end
|
25
25
|
@assocs
|
data/lib/fox16/responder2.rb
CHANGED
@@ -104,7 +104,7 @@ module Responder2
|
|
104
104
|
# message data).
|
105
105
|
#
|
106
106
|
def connect(message_type, callable_object=nil, &block)
|
107
|
-
unless instance_variables.include?('@pseudoTarget')
|
107
|
+
unless instance_variables.include?('@pseudoTarget') || instance_variables.include?(:@pseudoTarget)
|
108
108
|
@pseudoTarget = Fox::FXPseudoTarget.new
|
109
109
|
self.target = @pseudoTarget
|
110
110
|
end
|
@@ -129,3 +129,4 @@ require 'fox16/timeout'
|
|
129
129
|
require 'fox16/chore'
|
130
130
|
require 'fox16/signal'
|
131
131
|
require 'fox16/input'
|
132
|
+
require 'fox16/accel_table'
|
data/lib/fox16/version.rb
CHANGED
@@ -11,24 +11,6 @@ module Fox
|
|
11
11
|
def initialize # :yields: acceleratorTable
|
12
12
|
end
|
13
13
|
|
14
|
-
#
|
15
|
-
# Add an accelerator to the table. The _hotKey_ is a code returned
|
16
|
-
# by the Fox.fxparseAccel method. For example, to associate the
|
17
|
-
# Ctrl+S keypress with sending a "save" command to a document, you
|
18
|
-
# might use code like this:
|
19
|
-
#
|
20
|
-
# hotKey = fxparseAccel("Ctrl+S")
|
21
|
-
# accelTable.addAccel(hotKey, doc, FXSEL(SEL_COMMAND, MyDocument::ID_SAVE))
|
22
|
-
#
|
23
|
-
# ==== Parameters:
|
24
|
-
#
|
25
|
-
# +hotKey+:: the hotkey associated with this accelerator [Integer]
|
26
|
-
# +target+:: message target [FXObject]
|
27
|
-
# +seldn+:: selector for the +SEL_KEYPRESS+ event [Integer]
|
28
|
-
# +selup+:: selector for the +SEL_KEYRELEASE+ event [Integer]
|
29
|
-
#
|
30
|
-
def addAccel(hotKey, target=nil, seldn=0, selup=0) ; end
|
31
|
-
|
32
14
|
#
|
33
15
|
# Remove an accelerator from the table.
|
34
16
|
#
|
data/rdoc-sources/FXVec2d.rb
CHANGED
data/rdoc-sources/FXVec2f.rb
CHANGED
data/rdoc-sources/FXVec3d.rb
CHANGED
@@ -6,9 +6,14 @@ module Fox
|
|
6
6
|
attr_accessor :z
|
7
7
|
|
8
8
|
#
|
9
|
-
# Return an initialized
|
9
|
+
# Return an FXVec3d instance with _x_, _y_ and _z_ initialized to zeroes.
|
10
10
|
#
|
11
|
-
def initialize
|
11
|
+
def initialize; end
|
12
|
+
|
13
|
+
#
|
14
|
+
# Return an FXVec3d instance initialized from specified component values.
|
15
|
+
#
|
16
|
+
def initialize(xx, yy, zz=1.0); end
|
12
17
|
|
13
18
|
#
|
14
19
|
# Returns the element at _index_, where _index_ is 0, 1 or 2.
|
data/rdoc-sources/FXVec3f.rb
CHANGED
@@ -6,9 +6,14 @@ module Fox
|
|
6
6
|
attr_accessor :z
|
7
7
|
|
8
8
|
#
|
9
|
-
# Return an initialized
|
9
|
+
# Return an FXVec3f instance with _x_, _y_ and _z_ initialized to zeroes.
|
10
10
|
#
|
11
|
-
def initialize
|
11
|
+
def initialize; end
|
12
|
+
|
13
|
+
#
|
14
|
+
# Return an FXVec3f instance initialized with specified component values.
|
15
|
+
#
|
16
|
+
def initialize(xx, yy, zz=1.0); end
|
12
17
|
|
13
18
|
#
|
14
19
|
# Returns the element at _index_, where _index_ is 0, 1 or 2.
|
data/rdoc-sources/FXVec4d.rb
CHANGED
@@ -7,12 +7,22 @@ module Fox
|
|
7
7
|
attr_accessor :w
|
8
8
|
|
9
9
|
#
|
10
|
-
# Return an initialized
|
10
|
+
# Return an FXVec4d instance with _x_, _y_, _z_ and _w_ initialized to zeroes.
|
11
|
+
#
|
12
|
+
def initialize; end
|
13
|
+
|
14
|
+
#
|
15
|
+
# Return an FXVec4d instance initialized from specified component values.
|
11
16
|
#
|
12
17
|
def initialize(xx, yy, zz, ww=1.0); end
|
18
|
+
|
19
|
+
#
|
20
|
+
# Return an FXVec4d instance initialized from an FXVec3d instance and optional scalar.
|
21
|
+
#
|
22
|
+
def initialize(vec3d, ww=1.0); end
|
13
23
|
|
14
24
|
#
|
15
|
-
# Returns the element at _index_, where _index_ is 0, 1 or
|
25
|
+
# Returns the element at _index_, where _index_ is 0, 1, 2 or 3.
|
16
26
|
# Raises IndexError if _index_ is out of range.
|
17
27
|
#
|
18
28
|
def [](index); end
|
data/rdoc-sources/FXVec4f.rb
CHANGED
@@ -7,12 +7,22 @@ module Fox
|
|
7
7
|
attr_accessor :w
|
8
8
|
|
9
9
|
#
|
10
|
-
# Return an initialized
|
10
|
+
# Return an FXVec4f instance with _x_, _y_, _z_ and _w_ initialized to zeroes.
|
11
|
+
#
|
12
|
+
def initialize; end
|
13
|
+
|
14
|
+
#
|
15
|
+
# Return an FXVec4f instance initialized from specified component values.
|
11
16
|
#
|
12
17
|
def initialize(xx, yy, zz, ww=1.0); end
|
18
|
+
|
19
|
+
#
|
20
|
+
# Return an FXVec4f instance initialized from an FXVec3f instance and optional scalar.
|
21
|
+
#
|
22
|
+
def initialize(vec3f, ww=1.0); end
|
13
23
|
|
14
24
|
#
|
15
|
-
# Returns the element at _index_, where _index_ is 0, 1 or
|
25
|
+
# Returns the element at _index_, where _index_ is 0, 1, 2 or 3.
|
16
26
|
# Raises IndexError if _index_ is out of range.
|
17
27
|
#
|
18
28
|
def [](index); end
|
data/tests/TC_FXAccelTable.rb
CHANGED
@@ -6,38 +6,52 @@ include Fox
|
|
6
6
|
|
7
7
|
class TC_FXAccelTable < Test::Unit::TestCase
|
8
8
|
def setup
|
9
|
-
@
|
9
|
+
@accelTable = FXAccelTable.new
|
10
|
+
@hotKey = fxparseHotKey('&q')
|
10
11
|
end
|
11
12
|
|
12
|
-
def
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
@accel.addAccel(hotkey)
|
17
|
-
@accel.addAccel(hotkey, target)
|
18
|
-
@accel.addAccel(hotkey, target, seldn)
|
19
|
-
@accel.addAccel(hotkey, target, seldn, selup)
|
13
|
+
def test_add_accel_with_nil_target
|
14
|
+
@accelTable.addAccel(@hotKey)
|
15
|
+
assert @accelTable.hasAccel?(@hotKey)
|
16
|
+
assert_nil @accelTable.targetOfAccel(@hotKey)
|
20
17
|
end
|
21
18
|
|
22
|
-
def
|
23
|
-
|
24
|
-
|
25
|
-
@
|
26
|
-
|
19
|
+
def test_add_accel_with_default_seldn_selup
|
20
|
+
target = FXObject.new
|
21
|
+
@accelTable.addAccel(@hotKey, target)
|
22
|
+
assert_same target, @accelTable.targetOfAccel(@hotKey)
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_add_accel_with_default_selup
|
26
|
+
@accelTable.addAccel(@hotKey, FXObject.new, FXSEL(SEL_COMMAND, FXWindow::ID_SHOW))
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_add_accel_with_no_defaults
|
30
|
+
@accelTable.addAccel(@hotKey, FXObject.new, FXSEL(SEL_COMMAND, FXWindow::ID_SHOW), FXSEL(SEL_COMMAND, FXWindow::ID_HIDE))
|
27
31
|
end
|
28
32
|
|
29
|
-
def
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
33
|
+
def test_add_accel_with_lambda_for_seldn
|
34
|
+
@accelTable.addAccel(@hotKey, lambda { puts "hello" })
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_add_accel_with_lambda_for_selup
|
38
|
+
@accelTable.addAccel(@hotKey, nil, lambda { puts "goodbye" })
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_add_accel_with_lambda_for_selup_and_seldn
|
42
|
+
@accelTable.addAccel(@hotKey, lambda { puts "hello" }, lambda { puts "goodbye" })
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_has_accel
|
46
|
+
assert(!@accelTable.hasAccel?(@hotKey))
|
47
|
+
@accelTable.addAccel(@hotKey)
|
48
|
+
assert(@accelTable.hasAccel?(@hotKey))
|
34
49
|
end
|
35
50
|
|
36
|
-
def
|
37
|
-
|
38
|
-
@
|
39
|
-
|
40
|
-
|
41
|
-
assert(!@accel.hasAccel?(hotkey))
|
51
|
+
def test_remove_accel
|
52
|
+
@accelTable.addAccel(@hotKey)
|
53
|
+
assert(@accelTable.hasAccel?(@hotKey))
|
54
|
+
@accelTable.removeAccel(@hotKey)
|
55
|
+
assert(!@accelTable.hasAccel?(@hotKey))
|
42
56
|
end
|
43
57
|
end
|
data/tests/TC_FXDC.rb
CHANGED
data/tests/TC_FXDCPrint.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'fox16'
|
3
|
+
|
4
|
+
include Fox
|
5
|
+
|
6
|
+
class TC_FXExtentd < Test::Unit::TestCase
|
7
|
+
def test_lower_always_returns_same_instance
|
8
|
+
e = FXExtentd.new(0, 1, 0, 1)
|
9
|
+
assert_same e.lower, e.lower
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_upper_always_returns_same_instance
|
13
|
+
e = FXExtentd.new(0, 1, 0, 1)
|
14
|
+
assert_same e.upper, e.upper
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_index_always_returns_same_instance
|
18
|
+
e = FXExtentd.new(0, 1, 0, 1)
|
19
|
+
assert_same e[0], e[0]
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'fox16'
|
3
|
+
|
4
|
+
include Fox
|
5
|
+
|
6
|
+
class TC_FXExtentf < Test::Unit::TestCase
|
7
|
+
def test_lower_always_returns_same_instance
|
8
|
+
e = FXExtentf.new(0, 1, 0, 1)
|
9
|
+
assert_same e.lower, e.lower
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_upper_always_returns_same_instance
|
13
|
+
e = FXExtentf.new(0, 1, 0, 1)
|
14
|
+
assert_same e.upper, e.upper
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_index_always_returns_same_instance
|
18
|
+
e = FXExtentf.new(0, 1, 0, 1)
|
19
|
+
assert_same e[0], e[0]
|
20
|
+
end
|
21
|
+
end
|