fxruby 1.6.2 → 1.6.3
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 +55 -18
- data/doc/cvs.html +2 -2
- data/doc/differences.html +3 -3
- 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/examples/inputs.rb +2 -2
- data/examples/unicode.rb +36 -0
- data/ext/fox16/extconf.rb +4 -4
- data/ext/fox16/frames_wrap.cpp +3 -3
- data/ext/fox16/iconlist_wrap.cpp +6 -6
- data/ext/fox16/list_wrap.cpp +10 -10
- data/ext/fox16/mdi_wrap.cpp +3 -3
- data/ext/fox16/treelist_wrap.cpp +9 -9
- data/ext/fox16/ui_wrap.cpp +3 -2
- data/lib/fox16/aliases.rb +15 -0
- data/lib/fox16/core.rb +6 -1
- data/lib/fox16/iterators.rb +4 -4
- data/lib/fox16/kwargs.rb +2292 -0
- data/lib/fox16/version.rb +1 -1
- data/rdoc-sources/FXChoiceBox.rb +4 -37
- data/rdoc-sources/FXDCWindow.rb +7 -11
- data/rdoc-sources/FXDialogBox.rb +3 -7
- data/rdoc-sources/FXDirDialog.rb +0 -4
- data/rdoc-sources/FXFileDialog.rb +0 -4
- data/rdoc-sources/FXFileDict.rb +5 -12
- data/rdoc-sources/FXGLContext.rb +5 -6
- data/rdoc-sources/FXGLShape.rb +1 -7
- data/rdoc-sources/FXInputDialog.rb +3 -7
- data/rdoc-sources/FXMessageBox.rb +10 -25
- data/rdoc-sources/FXSplashWindow.rb +1 -5
- data/rdoc-sources/FXTriStateButton.rb +1 -1
- data/rdoc-sources/FXWizard.rb +3 -7
- metadata +4 -2
data/doc/apes02.html
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Object Life Cycles and Garbage Collection</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="implementation.html" title="Appendix E. Implementation"><link rel="prev" href="implementation.html" title="Appendix E. Implementation"><link rel="next" href="apes03.html" title="Virtual Functions"></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">Object Life Cycles and Garbage Collection</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="implementation.html">Prev</a> </td><th width="60%" align="center">Appendix E. Implementation</th><td width="20%" align="right"> <a accesskey="n" href="apes03.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
3
|
+
<title>Object Life Cycles and Garbage Collection</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="implementation.html" title="Appendix E. Implementation"><link rel="prev" href="implementation.html" title="Appendix E. Implementation"><link rel="next" href="apes03.html" title="Virtual Functions"></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">Object Life Cycles and Garbage Collection</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="implementation.html">Prev</a> </td><th width="60%" align="center">Appendix E. Implementation</th><td width="20%" align="right"> <a accesskey="n" href="apes03.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e5043"></a>Object Life Cycles and Garbage Collection</h2></div></div></div><p>One of the more difficult issues to deal with was understanding
|
4
4
|
the "life cycle" of FOX objects (that is, the actual C++ objects) and
|
5
5
|
their relationship to the associated Ruby instances. Understanding this
|
6
6
|
relationship is critical when dealing with Ruby's garbage collector,
|
@@ -18,4 +18,4 @@ myButton = FXButton.new(parentWin, "Hello, World!", myIcon)</pre><p>It's importa
|
|
18
18
|
returned from most class instance methods; they are references to already-
|
19
19
|
existing objects. For example, <code class="methodname">FXStatusBar#statusline
|
20
20
|
</code> returns a reference to the status bar's enclosed status line
|
21
|
-
instance.</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="
|
21
|
+
instance.</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5062"></a>GL Objects</h3></div></div></div><p>A C++ <code class="classname">FXGLGroup</code> object owns all of the <code class="classname">FXGLObject</code> objects it "contains". In other words, when that <code class="classname">FXGLGroup</code> object is destroyed, it will also destroy all of the <code class="classname">FXGLObject</code> objects for which it holds pointers.</p><p>In order to keep track of <span class="emphasis"><em>which</em></span> GL objects have been added to an <code class="classname">FXGLGroup</code>, all of the FXRuby C++ classes derived from <code class="classname">FXGLObject</code> have a boolean member variable <em class="structfield"><code>owned</code></em> that indicates whether this object is "owned" or not. Until an <code class="classname">FXGLObject</code> object is added to a group, this member variable should stay false.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="implementation.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="implementation.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apes03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix E. Implementation </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Virtual Functions</td></tr></table></div></body></html>
|
data/doc/apes03.html
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Virtual Functions</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="implementation.html" title="Appendix E. Implementation"><link rel="prev" href="apes02.html" title="Object Life Cycles and Garbage Collection"><link rel="next" href="cvs.html" title="Appendix F. Getting the Sources from CVS"></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">Virtual Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apes02.html">Prev</a> </td><th width="60%" align="center">Appendix E. Implementation</th><td width="20%" align="right"> <a accesskey="n" href="cvs.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
3
|
+
<title>Virtual Functions</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="implementation.html" title="Appendix E. Implementation"><link rel="prev" href="apes02.html" title="Object Life Cycles and Garbage Collection"><link rel="next" href="cvs.html" title="Appendix F. Getting the Sources from CVS"></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">Virtual Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apes02.html">Prev</a> </td><th width="60%" align="center">Appendix E. Implementation</th><td width="20%" align="right"> <a accesskey="n" href="cvs.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e5096"></a>Virtual Functions</h2></div></div></div><p>
|
4
4
|
One of the design requirements for FXRuby was to ensure that any
|
5
5
|
virtual function call made on a FOX object (from the C++ library
|
6
6
|
layer) is routed to the proper Ruby instance method, even if that
|
data/doc/book.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>Developing Graphical User Interfaces with FXRuby</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="next" href="pt01.html" title="Part I. The Basics"></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">Developing Graphical User Interfaces with FXRuby</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="pt01.html">Next</a></td></tr></table><hr></div><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="book"></a>Developing Graphical User Interfaces with FXRuby</h1></div><div><h2 class="subtitle">Covers FXRuby Version 1.6</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Lyle</span> <span class="surname">Johnson</span></h3></div></div><div><p class="copyright">Copyright © 2006 J. Lyle Johnson</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="part"><a href="pt01.html">I. The Basics</a></span></dt><dd><dl><dt><span class="preface"><a href="goals.html">History and Goals</a></span></dt><dt><span class="chapter"><a href="build.html">1. Building from Source Code</a></span></dt><dt><span class="chapter"><a href="gems.html">2. Installing from Gems</a></span></dt><dt><span class="chapter"><a href="tutorial1.html">3. Hello, World!</a></span></dt><dd><dl><dt><span class="section"><a href="tutorial1.html#d0e597">First Things First</a></span></dt><dt><span class="section"><a href="ch03s02.html">Better living through buttons</a></span></dt><dt><span class="section"><a href="ch03s03.html">Messages</a></span></dt><dt><span class="section"><a href="ch03s04.html">Adding a tool tip</a></span></dt><dt><span class="section"><a href="ch03s05.html">Adding an icon</a></span></dt></dl></dd><dt><span class="chapter"><a href="clipboardtut.html">4. Working With the Clipboard</a></span></dt><dd><dl><dt><span class="section"><a href="clipboardtut.html#d0e986">Basic Application</a></span></dt><dt><span class="section"><a href="ch04s02.html">Acquiring the Clipboard</a></span></dt><dt><span class="section"><a href="ch04s03.html">Sending Data to the Clipboard</a></span></dt><dt><span class="section"><a href="ch04s04.html">Pasting Data from the Clipboard</a></span></dt></dl></dd><dt><span class="chapter"><a href="dragdroptut.html">5. Drag and Drop</a></span></dt><dd><dl><dt><span class="section"><a href="dragdroptut.html#d0e1201">Drop Sites</a></span></dt><dt><span class="section"><a href="ch05s02.html">Drag Sources</a></span></dt><dt><span class="section"><a href="ch05s03.html">Putting It All Together</a></span></dt></dl></dd><dt><span class="chapter"><a href="unicode.html">6. Unicode and FXRuby</a></span></dt><dd><dl><dt><span class="section"><a href="unicode.html#d0e1608">Basic Application</a></span></dt></dl></dd><dt><span class="chapter"><a href="examples.html">7. Examples</a></span></dt><dt><span class="chapter"><a href="events.html">8. FXRuby's Message-Target System</a></span></dt><dt><span class="chapter"><a href="todo.html">9. To-do list</a></span></dt><dt><span class="chapter"><a href="infosources.html">10. Other Sources of Information</a></span></dt><dt><span class="chapter"><a href="changes.html">11. Change History</a></span></dt></dl></dd><dt><span class="part"><a href="pt02.html">II. Appendices</a></span></dt><dd><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#
|
3
|
+
<title>Developing Graphical User Interfaces with FXRuby</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="next" href="pt01.html" title="Part I. The Basics"></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">Developing Graphical User Interfaces with FXRuby</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="pt01.html">Next</a></td></tr></table><hr></div><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="book"></a>Developing Graphical User Interfaces with FXRuby</h1></div><div><h2 class="subtitle">Covers FXRuby Version 1.6</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Lyle</span> <span class="surname">Johnson</span></h3></div></div><div><p class="copyright">Copyright © 2006 J. Lyle Johnson</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="part"><a href="pt01.html">I. The Basics</a></span></dt><dd><dl><dt><span class="preface"><a href="goals.html">History and Goals</a></span></dt><dt><span class="chapter"><a href="build.html">1. Building from Source Code</a></span></dt><dt><span class="chapter"><a href="gems.html">2. Installing from Gems</a></span></dt><dt><span class="chapter"><a href="tutorial1.html">3. Hello, World!</a></span></dt><dd><dl><dt><span class="section"><a href="tutorial1.html#d0e597">First Things First</a></span></dt><dt><span class="section"><a href="ch03s02.html">Better living through buttons</a></span></dt><dt><span class="section"><a href="ch03s03.html">Messages</a></span></dt><dt><span class="section"><a href="ch03s04.html">Adding a tool tip</a></span></dt><dt><span class="section"><a href="ch03s05.html">Adding an icon</a></span></dt></dl></dd><dt><span class="chapter"><a href="clipboardtut.html">4. Working With the Clipboard</a></span></dt><dd><dl><dt><span class="section"><a href="clipboardtut.html#d0e986">Basic Application</a></span></dt><dt><span class="section"><a href="ch04s02.html">Acquiring the Clipboard</a></span></dt><dt><span class="section"><a href="ch04s03.html">Sending Data to the Clipboard</a></span></dt><dt><span class="section"><a href="ch04s04.html">Pasting Data from the Clipboard</a></span></dt></dl></dd><dt><span class="chapter"><a href="dragdroptut.html">5. Drag and Drop</a></span></dt><dd><dl><dt><span class="section"><a href="dragdroptut.html#d0e1201">Drop Sites</a></span></dt><dt><span class="section"><a href="ch05s02.html">Drag Sources</a></span></dt><dt><span class="section"><a href="ch05s03.html">Putting It All Together</a></span></dt></dl></dd><dt><span class="chapter"><a href="unicode.html">6. Unicode and FXRuby</a></span></dt><dd><dl><dt><span class="section"><a href="unicode.html#d0e1608">Basic Application</a></span></dt></dl></dd><dt><span class="chapter"><a href="examples.html">7. Examples</a></span></dt><dt><span class="chapter"><a href="events.html">8. FXRuby's Message-Target System</a></span></dt><dt><span class="chapter"><a href="todo.html">9. To-do list</a></span></dt><dt><span class="chapter"><a href="infosources.html">10. Other Sources of Information</a></span></dt><dt><span class="chapter"><a href="changes.html">11. Change History</a></span></dt></dl></dd><dt><span class="part"><a href="pt02.html">II. Appendices</a></span></dt><dd><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#d0e5024">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#d0e5062">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="cvs.html">F. Getting the Sources from CVS</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="pt01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Part I. The Basics</td></tr></table></div></body></html>
|
data/doc/changes.html
CHANGED
@@ -1,6 +1,43 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Chapter 11. Change History</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt01.html" title="Part I. The Basics"><link rel="prev" href="infosources.html" title="Chapter 10. Other Sources of Information"><link rel="next" href="pt02.html" title="Part II. Appendices"></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">Chapter 11. Change History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="infosources.html">Prev</a> </td><th width="60%" align="center">Part I. The Basics</th><td width="20%" align="right"> <a accesskey="n" href="pt02.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="changes"></a>Chapter 11. Change History</h2></div></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2429"></a>Changes For Version 1.6.
|
3
|
+
<title>Chapter 11. Change History</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt01.html" title="Part I. The Basics"><link rel="prev" href="infosources.html" title="Chapter 10. Other Sources of Information"><link rel="next" href="pt02.html" title="Part II. Appendices"></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">Chapter 11. Change History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="infosources.html">Prev</a> </td><th width="60%" align="center">Part I. The Basics</th><td width="20%" align="right"> <a accesskey="n" href="pt02.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="changes"></a>Chapter 11. Change History</h2></div></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2429"></a>Changes For Version 1.6.3 (October 27, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Widgets of some classes (namely
|
4
|
+
<code class="classname">FXTopWindow</code> and
|
5
|
+
<code class="classname">FXMDIChild</code>) weren't properly sending a
|
6
|
+
<code class="constant">SEL_CLOSE</code> message to their message targets (see
|
7
|
+
<a href="http://rubyforge.org/tracker/index.php?func=detail&aid=5498&group_id=300&atid=1223" target="_top">RubyForge
|
8
|
+
Bug #5498</a>). Thanks to a change in FOX version 1.6.16, this
|
9
|
+
problem has been fixed.</p></li><li style="list-style-type: disc"><p>The <code class="methodname">getControlFor</code> method for the
|
10
|
+
<code class="classname">FXComboTableItem</code> class was coded incorrectly
|
11
|
+
(see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=5906&group_id=300&atid=1223" target="_top">RubyForge
|
12
|
+
Bug #5906</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>There was a minor typo in the API documentation for the
|
13
|
+
<span class="application"><code class="classname">FXTriStateButton</code></span>
|
14
|
+
class (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=5962&group_id=300&atid=1223" target="_top">RubyForge
|
15
|
+
Bug #5962</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>The <code class="methodname">each_row</code> and
|
16
|
+
<code class="methodname">each_column</code> iterator methods for the
|
17
|
+
<code class="classname">FXTable</code> class were incorrectly coded (see
|
18
|
+
<a href="http://rubyforge.org/tracker/index.php?func=detail&aid=6036&group_id=300&atid=1223" target="_top">RubyForge
|
19
|
+
Bug #6036</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>The <code class="methodname">new</code> class methods for
|
20
|
+
<code class="classname">FXColorItem</code>, <code class="classname">FXDirItem</code>,
|
21
|
+
<code class="classname">FXFileItem</code>,
|
22
|
+
<code class="classname">FXFoldingItem</code>,
|
23
|
+
<code class="classname">FXHeaderItem</code>,
|
24
|
+
<code class="classname">FXIconItem</code>, <code class="classname">FXListItem</code>
|
25
|
+
and <code class="classname">FXTreeItem</code> were all raising exceptions when
|
26
|
+
a non-<code class="constant">nil</code> value was passed in for the last
|
27
|
+
argument (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=6197&group_id=300&atid=1223" target="_top">RubyForge
|
28
|
+
Bug #6197</a>). A similar problem was present for various instance
|
29
|
+
methods in the <code class="classname">FXColorList</code>,
|
30
|
+
<code class="classname">FXListBox</code> and
|
31
|
+
<code class="classname">FXMDIClient</code> classes. These problems have been
|
32
|
+
fixed.</p></li><li style="list-style-type: disc"><p>A few problems were discovered for the
|
33
|
+
<code class="filename">inputs.rb</code> example program (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=6209&group_id=300&atid=1223" target="_top">RubyForge
|
34
|
+
Bug #6209</a>). These problems have been fixed.</p></li><li style="list-style-type: disc"><p>Several instance methods for the <code class="classname">FXTable</code>
|
35
|
+
class were not actually present under their documented names (see
|
36
|
+
<a href="http://rubyforge.org/tracker/index.php?func=detail&aid=6211&group_id=300&atid=1223" target="_top">RubyForge
|
37
|
+
Bug #6211</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>The build script was not compatible with changes made in the
|
38
|
+
recently-released FXScintilla 1.71 (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=6313&group_id=300&atid=1223" target="_top">RubyForge
|
39
|
+
Bug #6313</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.6.16 and
|
40
|
+
FXScintilla version 1.71.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2557"></a>Changes For Version 1.6.2 (September 13, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The <code class="methodname">expandTree()</code> and
|
4
41
|
<code class="methodname">collapseTree()</code> methods for the
|
5
42
|
<code class="classname">FXFoldingList</code> class were incorrectly identified
|
6
43
|
as <code class="methodname">expandFolding()</code> and
|
@@ -14,7 +51,7 @@
|
|
14
51
|
Bug #5591</a>). Now it does.</p></li><li style="list-style-type: disc"><p>The <code class="classname">FXGradientBar</code> class was not supported
|
15
52
|
(see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=5746&group_id=300&atid=1223" target="_top">RubyForge
|
16
53
|
Bug #5746</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.6.14 and
|
17
|
-
FXScintilla version 1.67 (from CVS).</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
54
|
+
FXScintilla version 1.67 (from CVS).</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2615"></a>Changes For Version 1.4.7 (September 13, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The <code class="methodname">children</code> instance method for the
|
18
55
|
<code class="classname">FXWindow</code> class always returned an array of
|
19
56
|
<code class="classname">FXWindow</code> instances, even if the actual types
|
20
57
|
should have been instances of subclasses of
|
@@ -35,7 +72,7 @@
|
|
35
72
|
Bug #5591</a>). Now it does.</p></li><li style="list-style-type: disc"><p>The <code class="classname">FXGradientBar</code> class was not supported
|
36
73
|
(see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=5746&group_id=300&atid=1223" target="_top">RubyForge
|
37
74
|
Bug #5746</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.4.34 and
|
38
|
-
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
75
|
+
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2700"></a>Changes For Version 1.6.1 (July 21, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The message data sent along for the
|
39
76
|
<code class="constant">SEL_INSERTED</code>, <code class="constant">SEL_DELETED</code>
|
40
77
|
and <code class="constant">SEL_REPLACED</code> messages from an a
|
41
78
|
<code class="classname">FXText</code> widget to its target was not being
|
@@ -70,7 +107,7 @@
|
|
70
107
|
the sole means for loading FXRuby. Such programs should instead
|
71
108
|
use:</p><pre class="programlisting">require 'fox16'</pre><p>which will work
|
72
109
|
for either gem based or non-gem based installations.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.6.8 and
|
73
|
-
FXScintilla version 1.67 (from CVS).</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
110
|
+
FXScintilla version 1.67 (from CVS).</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2797"></a>Changes For Version 1.6.0 (May 29, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>This is the first release of FXRuby compatible with FOX version
|
74
111
|
1.6. One of the most signficant changes for FOX 1.6 has been the
|
75
112
|
addition of Unicode support; all FOX widgets and internal string
|
76
113
|
processing routines are now Unicode aware. For a comprehensive
|
@@ -96,7 +133,7 @@
|
|
96
133
|
Bug #4342</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>The <code class="filename">dilbert.rb</code> example program was broken
|
97
134
|
due to a change in the Dilbert.com web site structure (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=4597&group_id=300&atid=1223" target="_top">RubyForge
|
98
135
|
Bug #4597</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.6.5 and
|
99
|
-
FXScintilla version 1.67 (from CVS).</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
136
|
+
FXScintilla version 1.67 (from CVS).</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2891"></a>Changes For Version 1.4.6 (April 26, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>FXRuby would not compile properly on some x86-64 systems (see
|
100
137
|
<a href="http://rubyforge.org/tracker/index.php?func=detail&aid=3729&group_id=300&atid=1223" target="_top">RubyForge
|
101
138
|
Bug #3729</a>). This error has been corrected. Thanks to Javier
|
102
139
|
Goizueta for initially reporting this problem, and especially to
|
@@ -122,7 +159,7 @@
|
|
122
159
|
<code class="constant">SEL_COMMAND</code> message type (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=4255&group_id=300&atid=1223" target="_top">RubyForge
|
123
160
|
Bug #4255</a>). This error has been corrected. Thanks to Gerard
|
124
161
|
Menochet for reporting this problem.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.4.29 and
|
125
|
-
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
162
|
+
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2970"></a>Changes For Version 1.4.5 (April 10, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The <code class="classname">FXTextField</code> class was not properly
|
126
163
|
responding to the <code class="constant">ID_INSERT_STRING</code> command (see
|
127
164
|
<a href="http://rubyforge.org/tracker/index.php?func=detail&aid=3320&group_id=300&atid=1223" target="_top">RubyForge
|
128
165
|
Bug #3320</a>). This error has been corrected. Thanks to Uwe Hartl
|
@@ -165,7 +202,7 @@
|
|
165
202
|
third argument, but this wasn't working properly (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=4005&group_id=300&atid=1223" target="_top">RubyForge
|
166
203
|
Bug #4005</a>). This error has been corrected. Thanks to Mark
|
167
204
|
Volkman for reporting this problem.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.4.29 and
|
168
|
-
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
205
|
+
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3091"></a>Changes For Version 1.4.4 (January 21, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The build instructions for Unix platforms had not been updated
|
169
206
|
recently and as such contained some errors (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=3014&group_id=300&atid=1223" target="_top">RubyForge
|
170
207
|
Bug #3014</a>). These errors have been corrected. Thanks to Dave
|
171
208
|
Burns for reporting this problem.</p></li><li style="list-style-type: disc"><p>The <code class="methodname">extendSelection</code> method for the
|
@@ -188,7 +225,7 @@
|
|
188
225
|
RDoc documentation for the <code class="classname">FXTable</code> class. All
|
189
226
|
of these problems have been corrected. Thanks to _blackdog for
|
190
227
|
reporting this problem.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.4.29 and
|
191
|
-
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
228
|
+
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3155"></a>Changes For Version 1.4.3 (November 7, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The <code class="constant">TOGGLEBUTTON_KEEPSTATE</code> option for the
|
192
229
|
<code class="classname">FXToggleButton</code> class was not documented (see
|
193
230
|
<a href="http://rubyforge.org/tracker/index.php?func=detail&aid=2286&group_id=300&atid=1223" target="_top">RubyForge
|
194
231
|
Bug #2286</a>). This oversight has been corrected. Thanks to Tim
|
@@ -223,7 +260,7 @@
|
|
223
260
|
been fixed, and the documentation for
|
224
261
|
<code class="methodname">makePositionVisible</code> has been updated
|
225
262
|
accordingly. Thanks to Ralf Jonas for reporting this problem.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.4.21 and
|
226
|
-
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
263
|
+
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3240"></a>Changes For Version 1.4.2 (August 22, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Due to a bug in the implementation, the
|
227
264
|
<code class="methodname">checked?</code> method for the
|
228
265
|
<code class="classname">FXCheckButton</code> class always returned
|
229
266
|
<code class="constant">false</code> (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=1852&group_id=300&atid=1223" target="_top">RubyForge
|
@@ -250,7 +287,7 @@
|
|
250
287
|
<code class="classname">FXFileStream</code> class were broken (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=2275&group_id=300&atid=1223" target="_top">RubyForge
|
251
288
|
Bug #2275</a>). This problem has been corrected. Thanks to Gonzalo
|
252
289
|
Garramuno for reporting this problem.</p></li><li style="list-style-type: disc"><p>Merged in all of the fixes for FXRuby 1.2.6.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.4.17 and
|
253
|
-
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
290
|
+
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3331"></a>Changes For Version 1.4.1 (August 20, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>This is the second release of FXRuby which is compatible with
|
254
291
|
FOX 1.4, and as such should be considered an "unstable" release. For a
|
255
292
|
history of the changes made during the FOX 1.3 and 1.4 development,
|
256
293
|
see the <a href="http://www.fox-toolkit.com/news.html" target="_top">News</a>
|
@@ -259,11 +296,11 @@
|
|
259
296
|
feature, and were still looking at <code class="constant">fox12</code>. This
|
260
297
|
has been corrected.</p></li><li style="list-style-type: disc"><p>A number of minor problems were corrected for the Windows build
|
261
298
|
of FXRuby.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.4.17 and
|
262
|
-
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
299
|
+
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3359"></a>Changes For Version 1.4.0 (August 19, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>This is the first release of FXRuby which is compatible with FOX
|
263
300
|
1.4, and as such should be considered an "unstable" release. For a
|
264
301
|
history of the changes made during the FOX 1.3 and 1.4 development,
|
265
302
|
see the <a href="http://www.fox-toolkit.com/news.html" target="_top">News</a>
|
266
|
-
page at the FOX Web site.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
303
|
+
page at the FOX Web site.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3369"></a>Changes For Version 1.2.6 (April 15, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Some additional problems related to calling the
|
267
304
|
<code class="methodname">setTableSize</code> method for an
|
268
305
|
<code class="classname">FXTable</code> were discovered (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=1597&group_id=300&atid=1223" target="_top">RubyForge
|
269
306
|
Bug #1597</a>). This problem has been corrected. Thanks to Joel
|
@@ -311,7 +348,7 @@
|
|
311
348
|
to be unavailable as well (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=1771&group_id=300&atid=1223" target="_top">RubyForge
|
312
349
|
Bug #1771</a>). This error has been corrected. Thanks to Jannis
|
313
350
|
Pohlmann for reporting this problem.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.16 and
|
314
|
-
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
351
|
+
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3505"></a>Changes For Version 1.2.5 (March 1, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The change made for FXRuby version 1.2.4 regarding garbage
|
315
352
|
collection for table items corrected only one of the problems
|
316
353
|
described in <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=1445&group_id=300&atid=1223" target="_top">RubyForge
|
317
354
|
Bug #1445</a>; There was still a problem related to the
|
@@ -341,7 +378,7 @@
|
|
341
378
|
<code class="methodname">selectRange</code> method under the hood (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=1562&group_id=300&atid=1223" target="_top">RubyForge
|
342
379
|
Bug #1562</a>). Thanks to Joel VanderWerf for this
|
343
380
|
suggestion.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.13 and
|
344
|
-
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
381
|
+
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3590"></a>Changes For Version 1.2.4 (February 23, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Due to a change in some of the internal Ruby C APIs, a
|
345
382
|
compile-time error for FXRuby was introduced in some of the Ruby 1.8.2
|
346
383
|
preview releases (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=1039&group_id=300&atid=1223" target="_top">RubyForge
|
347
384
|
Bug #1039</a>). One should not see any compile-time errors when
|
@@ -391,7 +428,7 @@
|
|
391
428
|
<code class="classname">FXTable</code> class (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=1426&group_id=300&atid=1226" target="_top">RubyForge
|
392
429
|
Feature Request #1295</a>). Thanks to Brett Hallett for this
|
393
430
|
suggestion.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.13 and
|
394
|
-
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
431
|
+
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3693"></a>Changes For Version 1.2.3 (January 22, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Since group boxes containing radio buttons no longer enforce the
|
395
432
|
radio behavior of radio buttons (i.e. keeping only one radio button
|
396
433
|
selected at a time), some of the example programs were no longer
|
397
434
|
working as desired (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=751&group_id=300&atid=1223" target="_top">RubyForge
|
@@ -454,7 +491,7 @@
|
|
454
491
|
documented incorrectly (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=1325&group_id=300&atid=1223" target="_top">RubyForge
|
455
492
|
Bug #1325</a>). These have been corrected. Thanks to Karl El-Koura
|
456
493
|
for reporting this problem.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.13 and
|
457
|
-
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
494
|
+
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3865"></a>Changes For Version 1.2.2 (October 1, 2004)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>In order to avoid versioning problems when dealing with a mix of
|
458
495
|
applications based on either FXRuby 1.0 or 1.2, the feature name for
|
459
496
|
FXRuby has been changed from "fox" to "fox12". For most application
|
460
497
|
developers, this means that you will need to modify the source code
|
@@ -462,7 +499,7 @@
|
|
462
499
|
changes should be required for legacy applications targeted at FXRuby
|
463
500
|
1.0.</p></li><li style="list-style-type: disc"><p>Made a number of updates to the documentation, to reflect API
|
464
501
|
changes for FXRuby 1.2.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.9 and
|
465
|
-
FXScintilla version 1.61.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
502
|
+
FXScintilla version 1.61.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3882"></a>Changes For Version 1.2a2 (July 10, 2004)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>This is the second "alpha" release of FXRuby 1.2. This release
|
466
503
|
should be compatible with any FOX library version 1.2; it is not
|
467
504
|
compatible with any previous FOX library versions. As this is an alpha
|
468
505
|
release, users should expect a certain amount of instability, bugs,
|
@@ -504,7 +541,7 @@
|
|
504
541
|
or JPEG image support built-in (see <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=986180&group_id=20243&atid=120243" target="_top">SourceForge
|
505
542
|
Bug #986180</a>). This has been fixed. Thanks to Bil Bas for
|
506
543
|
reporting this problem.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.7 and
|
507
|
-
FXScintilla version 1.61.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
544
|
+
FXScintilla version 1.61.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3991"></a>Changes For Version 1.2a1 (June 28, 2004)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>This is the first "alpha" release of FXRuby 1.2. This release
|
508
545
|
should be compatible with any FOX library version 1.2; it is not
|
509
546
|
compatible with any previous FOX library versions. As this is an alpha
|
510
547
|
release, users should expect a certain amount of instability, bugs,
|
data/doc/cvs.html
CHANGED
@@ -19,13 +19,13 @@
|
|
19
19
|
modified SWIG interface files. I always use the latest development version
|
20
20
|
of <a href="http://www.swig.org" target="_top">SWIG</a>, but any release after,
|
21
21
|
say, SWIG 1.3.15 should work fine. The older SWIG 1.1 releases will
|
22
|
-
definitely <span class="emphasis"><em>not</em></span> work.</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
22
|
+
definitely <span class="emphasis"><em>not</em></span> work.</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e5205"></a>Checking out the stable version</h2></div></div></div><p>The stable version of FXRuby is the 1.0.x branch and is compatible
|
23
23
|
with any of the FOX 1.0.x releases. It is <span class="emphasis"><em>not</em></span>
|
24
24
|
compatible with any other release branches of FOX (e.g. the FOX 1.2.x or
|
25
25
|
1.3.x series of releases).</p><p>To check out the stable version of FXRuby, do the following:</p><div class="orderedlist"><ol type="1"><li><p>Log in to the CVS server by typing:</p><pre class="screen">cvs -d:pserver:anonymous@rubyforge.org:/var/cvs/fxruby login</pre><p>When prompted for a password for <span class="emphasis"><em>anonymous</em></span>,
|
26
26
|
simply press the <span><strong class="keycap">Enter</strong></span> key.</p></li><li><p>Check out the stable branch of FXRuby by typing:</p><pre class="screen">cvs -z3 -d:pserver:anonymous@rubyforge.org:/var/cvs/fxruby co -rrelease10 FXRuby</pre></li></ol></div><p>At this point, you should be ready to change to the top-level
|
27
27
|
directory and go through the normal build and installation process, as
|
28
|
-
described in an earlier chapter.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
28
|
+
described in an earlier chapter.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e5238"></a>Regenerating wrapper code with SWIG</h2></div></div></div><p>If you make changes to any of the SWIG interface files (the files
|
29
29
|
ending with a <code class="filename">.i</code> extension, in the <code class="filename">swig-interfaces</code> subdirectory) you will need
|
30
30
|
to re-run SWIG to regenerate parts of the FXRuby source code:</p><div class="orderedlist"><ol type="1"><li><p>Change directories to the <code class="filename">swig-interfaces</code> subdirectory of the
|
31
31
|
FXRuby source tree.</p></li><li><p>Type the following command to create a "bootstrap"
|
data/doc/differences.html
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Appendix C. Differences between FOX and FXRuby</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><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="scintilla.html" title="Appendix B. Using Scintilla with FXRuby"><link rel="next" href="library.html" title="Appendix D. The FXRuby Standard Library"></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 C. Differences between FOX and FXRuby</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="scintilla.html">Prev</a> </td><th width="60%" align="center">Part II. Appendices</th><td width="20%" align="right"> <a accesskey="n" href="library.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="differences"></a>Appendix C. Differences between FOX and FXRuby</h2></div></div></div><p>The FXRuby API follows the FOX API very closely and for the most part, you should be able to use the standard FOX class documentation as a reference. In some cases, however, fundamental differences between Ruby and C++ necessitated slight changes in the API. For some other cases, FOX classes were enhanced to take advantage of Ruby language features (such as iterators). The purpose of this chapter is to identify some of the differences between the C++ and Ruby interfaces to FOX.</p><p>One difference that should be easy to cope with is the substitution of Ruby Strings for FXStrings. Any function that would normally expect an <span class="type">FXString</span> input argument insteads takes a Ruby String. Similarly, functions that would return an <span class="type">FXString</span> will instead return a Ruby string. For functions that would normally accept a <code class="constant">NULL</code> or empty string argument, just pass <code class="constant">nil</code> or an empty string ("").</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
3
|
+
<title>Appendix C. Differences between FOX and FXRuby</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><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="scintilla.html" title="Appendix B. Using Scintilla with FXRuby"><link rel="next" href="library.html" title="Appendix D. The FXRuby Standard Library"></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 C. Differences between FOX and FXRuby</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="scintilla.html">Prev</a> </td><th width="60%" align="center">Part II. Appendices</th><td width="20%" align="right"> <a accesskey="n" href="library.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="differences"></a>Appendix C. Differences between FOX and FXRuby</h2></div></div></div><p>The FXRuby API follows the FOX API very closely and for the most part, you should be able to use the standard FOX class documentation as a reference. In some cases, however, fundamental differences between Ruby and C++ necessitated slight changes in the API. For some other cases, FOX classes were enhanced to take advantage of Ruby language features (such as iterators). The purpose of this chapter is to identify some of the differences between the C++ and Ruby interfaces to FOX.</p><p>One difference that should be easy to cope with is the substitution of Ruby Strings for FXStrings. Any function that would normally expect an <span class="type">FXString</span> input argument insteads takes a Ruby String. Similarly, functions that would return an <span class="type">FXString</span> will instead return a Ruby string. For functions that would normally accept a <code class="constant">NULL</code> or empty string argument, just pass <code class="constant">nil</code> or an empty string ("").</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4286"></a>Functions that expect arrays of objects</h2></div></div></div><p>One common pattern in FOX member function argument lists is to expect a pointer to an array of values, followed by an integer indicating the number of values in the array. This of course isn't necessary in Ruby, where <code class="classname">Array</code> objects "know" their lengths. As a result, functions such as <code class="methodname">FXWindow::acquireClipboard()</code>, whose C++ declaration looks like this:</p><pre class="programlisting">FXbool acquireClipboard(const FXDragType *types, FXuint numTypes);</pre><p>are called from Ruby code by passing in a single <code class="classname">Array</code> argument, e.g.</p><pre class="programlisting">myWindow.acquireClipboard(typesArray)</pre></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4306"></a>Functions that return values by reference</h2></div></div></div><p>Many FOX methods take advantage of the C++ language feature of returning values by reference. For example, the <code class="methodname">getCursorPos()</code> member function for class <code class="classname">FXWindow</code> has the declaration:</p><pre class="programlisting">FXint getCursorPos(FXint& x, FXint& y, FXint& buttons) const;</pre><p>which indicates that the function takes references to three integers (x, y and buttons). To call this function from a C++ program, you'd write code like this:</p><pre class="programlisting">FXint x, y;
|
4
4
|
FXuint buttons;
|
5
5
|
|
6
6
|
if (window->getCursorPosition(x, y, buttons))
|
7
|
-
fprintf(stderr, "Current position is (%d, %d)\n", x, y);</pre><p>Since this idiom doesn't translate well to Ruby, some functions' interfaces have been slightly modified. For example, the FXRuby implementation of <code class="methodname">getCursorPos()</code> returns the three values as an <code class="classname">Array</code>, e.g.:</p><pre class="programlisting">x, y, buttons = aWindow.getCursorPos()</pre><p>The following table shows how these kinds of functions are implemented in FXRuby:</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th align="center">Instance Method</th><th align="center">Return Value</th></tr></thead><tbody><tr><td><code class="methodname">FXDial#range</code></td><td>Returns a <code class="classname">Range</code> instance.</td></tr><tr><td><code class="methodname">FXDial#range=(aRange)</code></td><td>Accepts a <code class="classname">Range</code> instance as its input.</td></tr><tr><td><code class="methodname">FXFontDialog#fontSelection</code></td><td>Returns the <code class="classname">FXFontDesc</code> instance</td></tr><tr><td><code class="methodname">FXFontSelector#fontSelection</code></td><td>Returns the <code class="classname">FXFontDesc</code> instance</td></tr><tr><td><code class="methodname">FXGLObject#bounds(range)</code></td><td>Takes an <code class="classname">FXRange</code> instance as its input and returns a (possibly modified) <code class="classname">FXRange</code> instance.</td></tr><tr><td><code class="methodname">FXGLViewer#eyeToScreen(eye)</code></td><td>Takes an array of eye coordinates (floats) as its input and returns the screen point coordinate as an array of integers [sx, sy]</td></tr><tr><td><code class="methodname">FXGLViewer#getBoreVector(sx, sy)</code></td><td>Returns the endpoint and direction vector as an array of arrays [point, dir]</td></tr><tr><td><code class="methodname">FXGLViewer#light</code></td><td>Returns a <code class="classname">FXLight</code> instance</td></tr><tr><td><code class="methodname">FXGLViewer#viewport</code></td><td>Returns an <code class="classname">FXViewport</code> instance.</td></tr><tr><td><code class="methodname">FXPrinterDialog#printer</code></td><td>Returns the <code class="classname">FXPrinter</code> instance</td></tr><tr><td><code class="methodname">FXScrollArea#position</code></td><td>Returns the position as an array of integers [x, y]</td></tr><tr><td><code class="methodname">FXSlider#range</code></td><td>Returns a <code class="classname">Range</code> instance.</td></tr><tr><td><code class="methodname">FXSlider#range=(aRange)</code></td><td>Accepts a <code class="classname">Range</code> instance as its input.</td></tr><tr><td><code class="methodname">FXSpinner#range</code></td><td>Returns a <code class="classname">Range</code> instance.</td></tr><tr><td><code class="methodname">FXSpinner#range=(aRange)</code></td><td>Accepts a <code class="classname">Range</code> instance as its input.</td></tr><tr><td><code class="methodname">FXText#appendText(text, notify=false)</code></td><td>Append text to the end of the buffer.</td></tr><tr><td><code class="methodname">FXText#appendStyledText(text, style=0, notify=false)</code></td><td>Append styled text to the end of the buffer.</td></tr><tr><td><code class="methodname">FXText#extractText(pos, n)</code></td><td>Extracts <span class="emphasis"><em>n</em></span> characters from the buffer beginning at position <span class="emphasis"><em>pos</em></span> and returns the result as a String.</td></tr><tr><td><code class="methodname">FXText#extractStyle(pos, n)</code></td><td>Extracts <span class="emphasis"><em>n</em></span> style characters from the buffer beginning at position <span class="emphasis"><em>pos</em></span> and returns the result as a String.</td></tr><tr><td><code class="methodname">FXText#insertText(pos, text, notify=false)</code></td><td>Insert <span class="emphasis"><em>text</em></span> at position <span class="emphasis"><em>pos</em></span> in the buffer.</td></tr><tr><td><code class="methodname">FXText#insertStyledText(pos, text, style=0, notify=false)</code></td><td>Insert <span class="emphasis"><em>text</em></span> at position <span class="emphasis"><em>pos</em></span> in the buffer.</td></tr><tr><td><code class="methodname">FXText#replaceText(pos, m, text, notify=false)</code></td><td>Replace <span class="emphasis"><em>m</em></span> characters at <span class="emphasis"><em>pos</em></span> by <span class="emphasis"><em>text</em></span>.</td></tr><tr><td><code class="methodname">FXText#replaceStyledText(pos, m, text, style=0, notify=false)</code></td><td>Replace <span class="emphasis"><em>m</em></span> characters at <span class="emphasis"><em>pos</em></span> by <span class="emphasis"><em>text</em></span>.</td></tr><tr><td><code class="methodname">FXText#setDelimiters(delimiters)</code></td><td>Change delimiters of words (<span class="emphasis"><em>delimiters</em></span> is a string).</td></tr><tr><td><code class="methodname">FXText#getDelimiters()</code></td><td>Return word delimiters as a string.</td></tr><tr><td><code class="methodname">FXWindow#cursorPosition</code></td><td>Returns an array of integers [x, y, buttons]</td></tr><tr><td><code class="methodname">FXWindow#translateCoordinatesFrom(window, x, y)</code></td><td>Returns the translated coordinates as an array [x, y]</td></tr><tr><td><code class="methodname">FXWindow#translateCoordinatesTo(window, x, y)</code></td><td>Returns the translated coordinates as an array [x, y]</td></tr></tbody></table></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
7
|
+
fprintf(stderr, "Current position is (%d, %d)\n", x, y);</pre><p>Since this idiom doesn't translate well to Ruby, some functions' interfaces have been slightly modified. For example, the FXRuby implementation of <code class="methodname">getCursorPos()</code> returns the three values as an <code class="classname">Array</code>, e.g.:</p><pre class="programlisting">x, y, buttons = aWindow.getCursorPos()</pre><p>The following table shows how these kinds of functions are implemented in FXRuby:</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th align="center">Instance Method</th><th align="center">Return Value</th></tr></thead><tbody><tr><td><code class="methodname">FXDial#range</code></td><td>Returns a <code class="classname">Range</code> instance.</td></tr><tr><td><code class="methodname">FXDial#range=(aRange)</code></td><td>Accepts a <code class="classname">Range</code> instance as its input.</td></tr><tr><td><code class="methodname">FXFontDialog#fontSelection</code></td><td>Returns the <code class="classname">FXFontDesc</code> instance</td></tr><tr><td><code class="methodname">FXFontSelector#fontSelection</code></td><td>Returns the <code class="classname">FXFontDesc</code> instance</td></tr><tr><td><code class="methodname">FXGLObject#bounds(range)</code></td><td>Takes an <code class="classname">FXRange</code> instance as its input and returns a (possibly modified) <code class="classname">FXRange</code> instance.</td></tr><tr><td><code class="methodname">FXGLViewer#eyeToScreen(eye)</code></td><td>Takes an array of eye coordinates (floats) as its input and returns the screen point coordinate as an array of integers [sx, sy]</td></tr><tr><td><code class="methodname">FXGLViewer#getBoreVector(sx, sy)</code></td><td>Returns the endpoint and direction vector as an array of arrays [point, dir]</td></tr><tr><td><code class="methodname">FXGLViewer#light</code></td><td>Returns a <code class="classname">FXLight</code> instance</td></tr><tr><td><code class="methodname">FXGLViewer#viewport</code></td><td>Returns an <code class="classname">FXViewport</code> instance.</td></tr><tr><td><code class="methodname">FXPrinterDialog#printer</code></td><td>Returns the <code class="classname">FXPrinter</code> instance</td></tr><tr><td><code class="methodname">FXScrollArea#position</code></td><td>Returns the position as an array of integers [x, y]</td></tr><tr><td><code class="methodname">FXSlider#range</code></td><td>Returns a <code class="classname">Range</code> instance.</td></tr><tr><td><code class="methodname">FXSlider#range=(aRange)</code></td><td>Accepts a <code class="classname">Range</code> instance as its input.</td></tr><tr><td><code class="methodname">FXSpinner#range</code></td><td>Returns a <code class="classname">Range</code> instance.</td></tr><tr><td><code class="methodname">FXSpinner#range=(aRange)</code></td><td>Accepts a <code class="classname">Range</code> instance as its input.</td></tr><tr><td><code class="methodname">FXText#appendText(text, notify=false)</code></td><td>Append text to the end of the buffer.</td></tr><tr><td><code class="methodname">FXText#appendStyledText(text, style=0, notify=false)</code></td><td>Append styled text to the end of the buffer.</td></tr><tr><td><code class="methodname">FXText#extractText(pos, n)</code></td><td>Extracts <span class="emphasis"><em>n</em></span> characters from the buffer beginning at position <span class="emphasis"><em>pos</em></span> and returns the result as a String.</td></tr><tr><td><code class="methodname">FXText#extractStyle(pos, n)</code></td><td>Extracts <span class="emphasis"><em>n</em></span> style characters from the buffer beginning at position <span class="emphasis"><em>pos</em></span> and returns the result as a String.</td></tr><tr><td><code class="methodname">FXText#insertText(pos, text, notify=false)</code></td><td>Insert <span class="emphasis"><em>text</em></span> at position <span class="emphasis"><em>pos</em></span> in the buffer.</td></tr><tr><td><code class="methodname">FXText#insertStyledText(pos, text, style=0, notify=false)</code></td><td>Insert <span class="emphasis"><em>text</em></span> at position <span class="emphasis"><em>pos</em></span> in the buffer.</td></tr><tr><td><code class="methodname">FXText#replaceText(pos, m, text, notify=false)</code></td><td>Replace <span class="emphasis"><em>m</em></span> characters at <span class="emphasis"><em>pos</em></span> by <span class="emphasis"><em>text</em></span>.</td></tr><tr><td><code class="methodname">FXText#replaceStyledText(pos, m, text, style=0, notify=false)</code></td><td>Replace <span class="emphasis"><em>m</em></span> characters at <span class="emphasis"><em>pos</em></span> by <span class="emphasis"><em>text</em></span>.</td></tr><tr><td><code class="methodname">FXText#setDelimiters(delimiters)</code></td><td>Change delimiters of words (<span class="emphasis"><em>delimiters</em></span> is a string).</td></tr><tr><td><code class="methodname">FXText#getDelimiters()</code></td><td>Return word delimiters as a string.</td></tr><tr><td><code class="methodname">FXWindow#cursorPosition</code></td><td>Returns an array of integers [x, y, buttons]</td></tr><tr><td><code class="methodname">FXWindow#translateCoordinatesFrom(window, x, y)</code></td><td>Returns the translated coordinates as an array [x, y]</td></tr><tr><td><code class="methodname">FXWindow#translateCoordinatesTo(window, x, y)</code></td><td>Returns the translated coordinates as an array [x, y]</td></tr></tbody></table></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4596"></a>Iterators</h2></div></div></div><p>Several classes have been extended with an <code class="methodname">each</code> method to provide Ruby-style iterators. These classes include <code class="classname">FXComboBox</code>, <code class="classname">FXGLGroup</code>, <code class="classname">FXHeader</code>, <code class="classname">FXIconList</code>, <code class="classname">FXList</code>, <code class="classname">FXListBox</code>, <code class="classname">FXTreeItem</code>, <code class="classname">FXTreeList</code> and <code class="classname">FXTreeListBox</code>. These classes also mix-in Ruby's <code class="classname">Enumerable</code> module so that you can take full advantage of the iterators.</p><p>The block parameters passed to your code block vary depending on the class. For example, iterating over an <code class="classname">FXList</code> instance yields <code class="classname">FXListItem</code> parameters:</p><pre class="programlisting">aList.each { |aListItem|
|
8
8
|
puts "text for this item = #{aListItem.getText()}"
|
9
9
|
}</pre><p>whereas iterating over an <code class="classname">FXComboBox</code> instance yields two parameters, the item text (a string) and the item data:</p><pre class="programlisting">aComboBox.each { |itemText, itemData|
|
10
10
|
puts "text for this item = #{itemText}"
|
11
|
-
}</pre><p>The following table shows the block parameters for each of these classes' iterators:</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th align="center">Class</th><th align="center">Block Parameters</th></tr></thead><tbody><tr><td><code class="classname">FXComboBox</code></td><td>the item text (a string) and user data</td></tr><tr><td><code class="classname">FXGLGroup</code></td><td>an <code class="classname">FXGLObject</code> instance</td></tr><tr><td><code class="classname">FXHeader</code></td><td>an <code class="classname">FXHeaderItem</code> instance</td></tr><tr><td><code class="classname">FXIconList</code></td><td>an <code class="classname">FXIconItem</code> instance</td></tr><tr><td><code class="classname">FXList</code></td><td>an <code class="classname">FXListItem</code> instance</td></tr><tr><td><code class="classname">FXListBox</code></td><td>the item text (a string), icon (an <code class="classname">FXIcon</code> instance) and user data</td></tr><tr><td><code class="classname">FXTreeItem</code></td><td>an <code class="classname">FXTreeItem</code> instance</td></tr><tr><td><code class="classname">FXTreeList</code></td><td>an <code class="classname">FXTreeItem</code> instance</td></tr><tr><td><code class="classname">FXTreeListBox</code></td><td>an <code class="classname">FXTreeItem</code> instance</td></tr></tbody></table></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
11
|
+
}</pre><p>The following table shows the block parameters for each of these classes' iterators:</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th align="center">Class</th><th align="center">Block Parameters</th></tr></thead><tbody><tr><td><code class="classname">FXComboBox</code></td><td>the item text (a string) and user data</td></tr><tr><td><code class="classname">FXGLGroup</code></td><td>an <code class="classname">FXGLObject</code> instance</td></tr><tr><td><code class="classname">FXHeader</code></td><td>an <code class="classname">FXHeaderItem</code> instance</td></tr><tr><td><code class="classname">FXIconList</code></td><td>an <code class="classname">FXIconItem</code> instance</td></tr><tr><td><code class="classname">FXList</code></td><td>an <code class="classname">FXListItem</code> instance</td></tr><tr><td><code class="classname">FXListBox</code></td><td>the item text (a string), icon (an <code class="classname">FXIcon</code> instance) and user data</td></tr><tr><td><code class="classname">FXTreeItem</code></td><td>an <code class="classname">FXTreeItem</code> instance</td></tr><tr><td><code class="classname">FXTreeList</code></td><td>an <code class="classname">FXTreeItem</code> instance</td></tr><tr><td><code class="classname">FXTreeListBox</code></td><td>an <code class="classname">FXTreeItem</code> instance</td></tr></tbody></table></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4740"></a>Attribute Accessors</h2></div></div></div><p>FOX strictly handles access to all object attributes through member functions, e.g. <code class="methodname">setBackgroundColor</code> and <code class="methodname">getBackgroundColor</code> or <code class="methodname">setText</code> and <code class="methodname">getText</code>. FXRuby exposes all of these functions but also provides aliases that look more like regular Ruby attribute accessors. The names for these accessors are based on the FOX method names; for example, <code class="methodname">setBackgroundColor</code> and <code class="methodname">getBackgroundColor</code> are aliased to <code class="methodname">backgroundColor=</code> and <code class="methodname">backgroundColor</code>, respectively.</p><p>In many cases these aliases allow you to write more compact and legible code. For example, consider this code snippet:</p><pre class="programlisting">aLabel.setText(aLabel.getText() + " (modified)")</pre><p>Now consider a different code snippet, using the aliased accessor method names:</p><pre class="programlisting">aLabel.text += " (modified)"</pre><p>While these two are functionally equivalent, the latter is a bit easier to read and understand at first glance.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4779"></a>Message Passing</h2></div></div></div><p>FOX message maps are implemented as static C++ class members. With FXRuby, you just associate messages with message handlers in the class <code class="methodname">initialize</code> method using the <code class="methodname">FXMAPFUNC()</code>, <code class="methodname">FXMAPTYPE()</code>, <code class="methodname">FXMAPTYPES()</code> or <code class="methodname">FXMAPFUNCS()</code> methods. See almost any of the example programs for examples of how this is done.</p><p>As in C++ FOX, the last argument passed to your message handler functions contains message-specific data. For instance, all <code class="constant">SEL_PAINT</code> messages pass an <code class="classname">FXEvent</code> object through this argument to give you some information about the size of the exposed rectangle. On the other hand, a <code class="constant">SEL_COMMAND</code> message from an <code class="classname">FXHeader</code> object passes the index of the selected header item through this argument. Instead of guessing what's in this last argument, your best bet is to instead invoke a member function on the sending object to find out what you need, instead of relying on the data passed through this pointer. For example, if you get a <code class="constant">SEL_COMMAND</code> message from an <code class="classname">FXColorWell</code> object, the data passed through that last argument is supposed to be the new RGB color value. Instead of trying to interpret the argument's contents, just turn around and call the color well's <code class="methodname">getRGBA()</code> member function to retrieve its color. Similarly, if you get a <code class="constant">SEL_COMMAND</code> message from a tree list, call its <code class="methodname">getCurrentItem()</code> method to find out which item was selected.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4828"></a>Catching Operating System Signals</h2></div></div></div><p>The <code class="methodname">FXApp#addSignal</code> and <code class="methodname">FXApp#removeSignal</code> methods have been enhanced to accept either a string or integer as their first argument. If it's a string (e.g. "SIGINT" or just "INT") the code will determine the corresponding signal number for you (similar to the standard Ruby library's <code class="methodname">Process.kill</code> module method). For examples of how to use this, see the <code class="filename">datatarget.rb</code> or <code class="filename">imageviewer.rb</code> example programs.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4848"></a>Support for Multithreaded Applications</h2></div></div></div><p>There is some support for multithreaded FXRuby applications, but it's not wonderful. The current implementation does what is also done in Ruby/GTK; it turns over some idle processing time to the Ruby thread scheduler to let other threads do their thing. As I learn more about Ruby's threading implementation I may try something different, but this seems to work OK for now. For a simple example, see the <code class="filename">groupbox.rb</code> example program, in which the clock label that appears in the lower right-hand corner is continuously updated (by a separate thread).</p><p>If you suspect that FXRuby's threads support is interfering with your application's performance, you may want to try tweaking the amount of time that the main application thread "sleeps" during idle processing; do this by setting the <code class="classname">FXApp</code> object's <em class="structfield"><code>sleepTime</code></em> attribute. The default value for <em class="structfield"><code>FXApp#sleepTime</code></em> is 100 milliseconds. You can also disable the threads support completely by calling <code class="methodname">FXApp#threadsEnabled=false</code> (and subsequently re-enable it with <code class="methodname">FXApp#threadsEnabled=true</code>).</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4873"></a>Debugging Tricks</h2></div></div></div><p>As a debugging tool, you can optionally catch exceptions raised in message handlers. To turn on this feature, call the <code class="methodname">setIgnoreExceptions(true)</code> module method. When this is enabled, any exceptions raised in message handler functions will cause a standard stack trace to be dumped to the standard output, but then your application will, for better or worse, proceed normally. Thanks to Ted Meng for this suggestion.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="scintilla.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="library.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix B. Using Scintilla with FXRuby </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix D. The FXRuby Standard Library</td></tr></table></div></body></html>
|
data/doc/implementation.html
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Appendix E. Implementation</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><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="library.html" title="Appendix D. The FXRuby Standard Library"><link rel="next" href="apes02.html" title="Object Life Cycles and Garbage Collection"></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 E. Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="library.html">Prev</a> </td><th width="60%" align="center">Part II. Appendices</th><td width="20%" align="right"> <a accesskey="n" href="apes02.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="implementation"></a>Appendix E. Implementation</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="implementation.html#
|
3
|
+
<title>Appendix E. Implementation</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><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="library.html" title="Appendix D. The FXRuby Standard Library"><link rel="next" href="apes02.html" title="Object Life Cycles and Garbage Collection"></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 E. Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="library.html">Prev</a> </td><th width="60%" align="center">Part II. Appendices</th><td width="20%" align="right"> <a accesskey="n" href="apes02.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="implementation"></a>Appendix E. Implementation</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="implementation.html#d0e5024">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#d0e5062">GL Objects</a></span></dt></dl></dd><dt><span class="section"><a href="apes03.html">Virtual Functions</a></span></dt></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e5024"></a>Code Generation</h2></div></div></div><p>The development and maintenance of FXRuby would be almost impossible
|
4
4
|
without the help of Dave Beazley's excellent
|
5
5
|
<a href="http://www.swig.org" target="_top">SWIG</a>. The complete set of SWIG
|
6
6
|
interface files used to generate FXRuby is included in the standard
|
data/doc/library.html
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Appendix D. The FXRuby Standard Library</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><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="differences.html" title="Appendix C. Differences between FOX and FXRuby"><link rel="next" href="implementation.html" title="Appendix E. Implementation"></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 D. The FXRuby Standard Library</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="differences.html">Prev</a> </td><th width="60%" align="center">Part II. Appendices</th><td width="20%" align="right"> <a accesskey="n" href="implementation.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="library"></a>Appendix D. The FXRuby Standard Library</h2></div></div></div><p>While the majority of FXRuby is in fact implemented by an extension module, some parts are provided instead by "pure Ruby" code. This section describes the classes and modules available in the FXRuby standard library.</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
3
|
+
<title>Appendix D. The FXRuby Standard Library</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><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="differences.html" title="Appendix C. Differences between FOX and FXRuby"><link rel="next" href="implementation.html" title="Appendix E. Implementation"></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 D. The FXRuby Standard Library</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="differences.html">Prev</a> </td><th width="60%" align="center">Part II. Appendices</th><td width="20%" align="right"> <a accesskey="n" href="implementation.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="library"></a>Appendix D. The FXRuby Standard Library</h2></div></div></div><p>While the majority of FXRuby is in fact implemented by an extension module, some parts are provided instead by "pure Ruby" code. This section describes the classes and modules available in the FXRuby standard library.</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4886"></a>Undoable Commands</h2></div></div></div><p>The <code class="filename">fox16/undolist.rb</code> file provides the <code class="classname">FXCommand</code> and <code class="classname">FXUndoList</code> classes. These serve the same purpose as the <code class="classname">FXCommand</code> and <code class="classname">FXUndoList</code> classes from the standard FOX distribution, but they're implemented entirely in Ruby.</p><p>For a complete description of these classes and how to use them, see the RD documentation in <code class="filename">fox16/undolist.rb</code>.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4911"></a>Aliases</h2></div></div></div><p>The <code class="filename">fox16/aliases.rb</code> implements most of the accessor-style aliases for methods. This file is loaded automatically when you </p><pre class="programlisting">require 'fox16'</pre><p> and so you should never need to load it directly.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4922"></a>Color Names</h2></div></div></div><p>The <code class="filename">fox16/colors.rb</code> file, contributed by Jeff
|
4
4
|
Heard, provides a bunch of predefined color values (based on the standard
|
5
5
|
X11 color names). You can use these color constants anywhere that FOX
|
6
6
|
expects an RGB color value, e.g.</p><pre class="programlisting">dc = FXDCWindow.new(drawable, ev)
|
7
7
|
dc.foreground = FXColor::MistyRose # instead of FXRGB(255, 228, 225)
|
8
|
-
dc.background = FXColor::MidnightBlue # instead of FXRGB( 25, 25, 112)</pre></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
8
|
+
dc.background = FXColor::MidnightBlue # instead of FXRGB( 25, 25, 112)</pre></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4932"></a>OpenGL Shapes</h2></div></div></div><p>The <code class="filename">fox16/glshapes.rb</code> library provides Ruby
|
9
9
|
implementations of a number of basic 3-D shapes (all derived from the
|
10
10
|
built-in <code class="classname">FXGLShape</code> class) that can be used with
|
11
11
|
the <code class="classname">FXGLViewer</code>. Several of these shapes are used
|
12
12
|
in the <code class="filename">glviewer.rb</code> example program. These shapes
|
13
13
|
were originally implemented in C++ and wrapped using SWIG, but they are
|
14
14
|
straightforward enough to implement in Ruby so they were moved out to
|
15
|
-
this library instead.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
15
|
+
this library instead.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4949"></a>Iterators</h2></div></div></div><p>The <code class="filename">fox16/iterators.rb</code> library just adds an
|
16
16
|
<code class="methodname">each</code> instance method for the <code class="classname">
|
17
17
|
FXComboBox</code>, <code class="classname">FXGLGroup</code>, <code class="classname">
|
18
18
|
FXHeader</code>, <code class="classname">FXIconList</code>, <code class="classname">
|
@@ -21,10 +21,10 @@ dc.background = FXColor::MidnightBlue # instead of FXRGB( 25, 25, 112)</pre><
|
|
21
21
|
FXTreeList</code> and <code class="classname">FXTreeListBox</code> classes,
|
22
22
|
so that you can iterate over their members in a Ruby-friendly way. It
|
23
23
|
also mixes the <code class="classname">Enumerable</code> module into each of
|
24
|
-
these classes.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
24
|
+
these classes.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4993"></a>Key Codes</h2></div></div></div><p>The <code class="filename">fox16/keys.rb</code> library file defines all of the
|
25
25
|
key codes (e.g. <code class="constant">KEY_space</code>) that might show up in the
|
26
26
|
code field of an <code class="classname">FXEvent</code> instance. This file is
|
27
27
|
loaded automatically when you
|
28
28
|
</p><pre class="programlisting">require 'fox16'</pre><p> and
|
29
29
|
so you should never need to load it
|
30
|
-
directly.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
30
|
+
directly.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e5010"></a>Calendar Widget</h2></div></div></div><p>The <code class="filename">fox16/calendar.rb</code> library file provides the <code class="classname">FXCalendar</code> widget, contributed by David Naseby.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="differences.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="implementation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix C. Differences between FOX and FXRuby </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix E. Implementation</td></tr></table></div></body></html>
|
data/doc/opengl.html
CHANGED
@@ -5,10 +5,10 @@
|
|
5
5
|
widgets, and FXRuby in turn provides interfaces to those classes. By
|
6
6
|
combining FXRuby with the OpenGL interface for Ruby (described below) you
|
7
7
|
can develop very powerful 3-D graphics applications. This chapter gives
|
8
|
-
you the information you'll need to get started.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
8
|
+
you the information you'll need to get started.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4029"></a>What is OpenGL?</h2></div></div></div><p>OpenGL is a platform-independent API for 2D and 3D graphics. The
|
9
9
|
home page is <a href="http://www.opengl.org" target="_top">http://www.opengl.org</a>. Because it's a
|
10
10
|
fairly open standard, highly optimized OpenGL drivers are available for
|
11
|
-
most operating systems (including Windows and Linux).</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
11
|
+
most operating systems (including Windows and Linux).</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4037"></a>OpenGL Extensions for Ruby</h2></div></div></div><p>This extension module, developed by Yoshiyuki Kusano, provides
|
12
12
|
interfaces to not only the basic OpenGL API, but also the GLU and GLUT
|
13
13
|
APIs. As of this writing, the currently released version is 0.32d and is
|
14
14
|
available for download from <a href="http://www2.giganet.net/~yoshi/rbogl-0.32b.tgz" target="_top">http://www2.giganet.net/~yoshi/rbogl-0.32d.tgz</a>.
|
@@ -25,7 +25,7 @@
|
|
25
25
|
extensions by typing:</p><pre class="screen">$ <span><strong class="command">make site-install</strong></span></pre><p>Please note that I'm not the maintainer of this particular Ruby
|
26
26
|
extension, so I can't really accept bug fixes for it. But if you're having
|
27
27
|
trouble integrating Ruby/OpenGL with FXRuby, let me know and we'll see
|
28
|
-
what we can do.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
28
|
+
what we can do.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4092"></a>The FXGLVisual Class</h2></div></div></div><p>An <code class="classname">FXGLVisual</code> object describes the
|
29
29
|
capabilities of an <code class="classname">FXGLCanvas</code> or
|
30
30
|
<code class="classname">FXGLViewer</code> window. Typically, an X server supports
|
31
31
|
many different visuals with varying capabilities, but the ones with
|
@@ -58,13 +58,13 @@ end</pre><p>Some <code class="classname">FXGLVisual</code> object must be associ
|
|
58
58
|
separate <code class="classname">FXGLVisual</code> object for each window. For
|
59
59
|
most applications, you can just construct a single
|
60
60
|
<code class="classname">FXGLVisual</code> object that's shared among all the
|
61
|
-
OpenGL windows.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
61
|
+
OpenGL windows.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4151"></a>The FXGLCanvas Class</h2></div></div></div><p>The <code class="classname">FXGLCanvas</code> widget provides a very simple
|
62
62
|
OpenGL-capable window with minimal functionality. To construct an
|
63
63
|
<code class="classname">FXGLCanvas</code>, call
|
64
64
|
<code class="methodname">FXGLCanvas.new</code>:</p><pre class="programlisting">glCanvas = FXGLCanvas.new(parent, vis)</pre><p>The first argument to <code class="methodname">FXGLCanvas.new</code> is the
|
65
65
|
parent (container) widget and the second argument is the
|
66
66
|
<code class="classname">FXGLVisual</code> that should be used for this
|
67
|
-
window.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
67
|
+
window.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4175"></a>OpenGL objects and the FXGLViewer</h2></div></div></div><p>The <code class="classname">FXGLViewer</code> widget provides a higher-level
|
68
68
|
OpenGL-capable window with a lot of built-in functionality. To construct
|
69
69
|
an <code class="classname">FXGLViewer</code>, call
|
70
70
|
<code class="methodname">FXGLViewer.new</code>:</p><pre class="programlisting">glViewer = FXGLViewer.new(parent, vis)</pre><p>The first argument to <code class="methodname">FXGLViewer.new</code> is the
|
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 XSL Stylesheets V1.68.1"><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 11. 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 XSL Stylesheets V1.68.1"><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 11. 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="d0e4014"></a>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#d0e5024">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#d0e5062">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="cvs.html">F. Getting the Sources from CVS</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 11. 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 XSL Stylesheets V1.68.1"><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 XSL Stylesheets V1.68.1"><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="d0e4202"></a>What is Scintilla?</h2></div></div></div><p><a 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="d0e4209"></a>What is FXScintilla?</h2></div></div></div><p><a 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. It is being developed by Gilles Filippini,
|
8
8
|
and as of this writing the latest release is available for download from
|
9
|
-
<a href="http://savannah.nongnu.org/download/fxscintilla/fxscintilla-1.63.tar.gz" target="_top">http://savannah.nongnu.org/download/fxscintilla/fxscintilla-1.63.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 href="http://savannah.nongnu.org/download/fxscintilla/fxscintilla-1.63.tar.gz" target="_top">http://savannah.nongnu.org/download/fxscintilla/fxscintilla-1.63.tar.gz</a>.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4219"></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="d0e4232"></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/examples/inputs.rb
CHANGED
@@ -53,10 +53,10 @@ class InputHandlerWindow < FXMainWindow
|
|
53
53
|
|
54
54
|
# Register input callbacks and return
|
55
55
|
getApp().addInput(@pipe, INPUT_READ|INPUT_EXCEPT) { |sender, sel, ptr|
|
56
|
-
case
|
56
|
+
case FXSELTYPE(sel)
|
57
57
|
when SEL_IO_READ
|
58
58
|
text = @pipe.read
|
59
|
-
if text
|
59
|
+
if text && text.length > 0
|
60
60
|
@cmdOutput.appendText(text)
|
61
61
|
else
|
62
62
|
closePipe
|
data/examples/unicode.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'fox16'
|
4
|
+
require 'jcode'
|
5
|
+
|
6
|
+
$KCODE = 'UTF8'
|
7
|
+
|
8
|
+
class UString < String
|
9
|
+
# Show u-prefix as in Python
|
10
|
+
def inspect; "u#{ super }" end
|
11
|
+
|
12
|
+
# Count multibyte characters
|
13
|
+
def length; self.scan(/./).length end
|
14
|
+
|
15
|
+
# Reverse the string
|
16
|
+
def reverse; self.scan(/./).reverse.join end
|
17
|
+
end
|
18
|
+
|
19
|
+
module Kernel
|
20
|
+
def u( str )
|
21
|
+
UString.new str.gsub(/U\+([0-9a-fA-F]{4,4})/u){["#$1".hex ].pack('U*')}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
include Fox
|
26
|
+
|
27
|
+
# Pass UTF-8 encoded Unicode strings to FXRuby.
|
28
|
+
label = u"Les enfants vont U+00E0 l'U+00E9cole.\nLa boulangU+00E8re vend-elle le pain en aoU+00FBt?"
|
29
|
+
|
30
|
+
FXApp.new("Unicode Example", "FoxTest") do |app|
|
31
|
+
main = FXMainWindow.new(app, "Unicode Text", nil, nil, DECOR_ALL)
|
32
|
+
FXLabel.new(main, label)
|
33
|
+
app.create
|
34
|
+
main.show(PLACEMENT_SCREEN)
|
35
|
+
app.run
|
36
|
+
end
|
data/ext/fox16/extconf.rb
CHANGED
@@ -86,7 +86,7 @@ def do_cygwin_setup
|
|
86
86
|
$CFLAGS = $CFLAGS + " -fpermissive -DWIN32 -Iinclude"
|
87
87
|
if is_fxscintilla_build?
|
88
88
|
File.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if FileTest.exists?('scintilla_wrap.cpp.bak')
|
89
|
-
$CFLAGS = $CFLAGS + " -DWITH_FXSCINTILLA"
|
89
|
+
$CFLAGS = $CFLAGS + " -DWITH_FXSCINTILLA -DHAVE_FOX_1_6"
|
90
90
|
$libs = append_library($libs, "fxscintilla")
|
91
91
|
else
|
92
92
|
File.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if FileTest.exists?('scintilla_wrap.cpp')
|
@@ -106,11 +106,11 @@ def do_mswin32_setup
|
|
106
106
|
have_library("libtiff", "TIFFSetErrorHandler")
|
107
107
|
# $CFLAGS = $CFLAGS + " /DWIN32 /GR /GX /DFOXDLL /Iinclude"
|
108
108
|
# $LOCAL_LIBS = $LOCAL_LIBS + "foxdll.lib"
|
109
|
-
$CFLAGS = $CFLAGS + " /DWIN32 /GR /GX /Iinclude"
|
109
|
+
$CFLAGS = $CFLAGS + " /DWIN32 /DUNICODE /GR /GX /Iinclude"
|
110
110
|
$LOCAL_LIBS = $LOCAL_LIBS + "FOX-1.6.lib"
|
111
111
|
if is_fxscintilla_build?
|
112
112
|
File.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if FileTest.exists?('scintilla_wrap.cpp.bak')
|
113
|
-
$CFLAGS = $CFLAGS + " /DWITH_FXSCINTILLA"
|
113
|
+
$CFLAGS = $CFLAGS + " /DWITH_FXSCINTILLA /DHAVE_FOX_1_6"
|
114
114
|
$libs = append_library($libs, "fxscintilla")
|
115
115
|
else
|
116
116
|
File.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if FileTest.exists?('scintilla_wrap.cpp')
|
@@ -134,7 +134,7 @@ def do_unix_setup
|
|
134
134
|
$CFLAGS = $CFLAGS + " -O0 -Iinclude"
|
135
135
|
if is_fxscintilla_build?
|
136
136
|
File.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if FileTest.exists?('scintilla_wrap.cpp.bak')
|
137
|
-
$CFLAGS = $CFLAGS + " -DWITH_FXSCINTILLA"
|
137
|
+
$CFLAGS = $CFLAGS + " -DWITH_FXSCINTILLA -DHAVE_FOX_1_6"
|
138
138
|
$libs = append_library($libs, "fxscintilla")
|
139
139
|
else
|
140
140
|
File.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if FileTest.exists?('scintilla_wrap.cpp')
|