fxruby 1.6.4 → 1.6.5
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 +2 -2
- data/doc/book.html +1 -1
- data/doc/changes.html +40 -20
- data/doc/differences.html +183 -4
- data/doc/implementation.html +1 -1
- data/doc/library.html +5 -5
- data/doc/opengl.html +5 -5
- data/doc/pt02.html +1 -1
- data/doc/scintilla.html +4 -4
- data/doc/subversion.html +21 -0
- data/examples/raabrowser.rb +1 -1
- data/ext/fox16/table_wrap.cpp +3 -10
- data/lib/fox16/iterators.rb +37 -0
- data/lib/fox16/kwargs.rb +1160 -960
- data/lib/fox16/timeout.rb +1 -1
- data/lib/fox16/version.rb +1 -1
- data/rdoc-sources/FX4Splitter.rb +8 -8
- data/rdoc-sources/FX7Segment.rb +1 -1
- data/rdoc-sources/FXAccelTable.rb +2 -2
- data/rdoc-sources/FXBMPIcon.rb +3 -3
- data/rdoc-sources/FXBMPImage.rb +3 -3
- data/rdoc-sources/FXBitmapFrame.rb +1 -1
- data/rdoc-sources/FXBitmapView.rb +1 -1
- data/rdoc-sources/FXChoiceBox.rb +3 -3
- data/rdoc-sources/FXColorList.rb +1 -1
- data/rdoc-sources/FXColorRing.rb +1 -1
- data/rdoc-sources/FXColorWheel.rb +9 -9
- data/rdoc-sources/FXComboBox.rb +9 -9
- data/rdoc-sources/FXDC.rb +10 -10
- data/rdoc-sources/FXDataTarget.rb +1 -1
- data/rdoc-sources/FXDial.rb +9 -9
- data/rdoc-sources/FXDialogBox.rb +1 -1
- data/rdoc-sources/FXDirBox.rb +1 -1
- data/rdoc-sources/FXDirDialog.rb +1 -1
- data/rdoc-sources/FXDirList.rb +1 -1
- data/rdoc-sources/FXDirSelector.rb +1 -1
- data/rdoc-sources/FXDockBar.rb +20 -20
- data/rdoc-sources/FXDockSite.rb +1 -1
- data/rdoc-sources/FXDockTitle.rb +1 -1
- data/rdoc-sources/FXDrawable.rb +2 -2
- data/rdoc-sources/FXDriveBox.rb +1 -1
- data/rdoc-sources/FXFileDialog.rb +1 -1
- data/rdoc-sources/FXFileList.rb +1 -1
- data/rdoc-sources/FXFileSelector.rb +1 -1
- data/rdoc-sources/FXFoldingList.rb +6 -6
- data/rdoc-sources/FXFontDialog.rb +1 -1
- data/rdoc-sources/FXFontSelector.rb +1 -1
- data/rdoc-sources/FXGIFIcon.rb +3 -3
- data/rdoc-sources/FXGIFImage.rb +3 -3
- data/rdoc-sources/FXGLCanvas.rb +2 -2
- data/rdoc-sources/FXGLViewer.rb +2 -2
- data/rdoc-sources/FXGradientBar.rb +1 -1
- data/rdoc-sources/FXHeader.rb +1 -1
- data/rdoc-sources/FXHorizontalFrame.rb +9 -9
- data/rdoc-sources/FXICOIcon.rb +3 -3
- data/rdoc-sources/FXICOImage.rb +3 -3
- data/rdoc-sources/FXIcon.rb +3 -3
- data/rdoc-sources/FXIconList.rb +1 -1
- data/rdoc-sources/FXImage.rb +7 -7
- data/rdoc-sources/FXImageFrame.rb +1 -1
- data/rdoc-sources/FXImageView.rb +1 -1
- data/rdoc-sources/FXInputDialog.rb +1 -1
- data/rdoc-sources/FXJPGIcon.rb +3 -3
- data/rdoc-sources/FXJPGImage.rb +3 -3
- data/rdoc-sources/FXKnob.rb +1 -1
- data/rdoc-sources/FXList.rb +1 -1
- data/rdoc-sources/FXListBox.rb +1 -1
- data/rdoc-sources/FXMDIButton.rb +6 -6
- data/rdoc-sources/FXMDIChild.rb +1 -1
- data/rdoc-sources/FXMDIClient.rb +2 -2
- data/rdoc-sources/FXMenuBar.rb +1 -1
- data/rdoc-sources/FXMenuCheck.rb +1 -1
- data/rdoc-sources/FXMenuCommand.rb +1 -1
- data/rdoc-sources/FXMenuRadio.rb +1 -1
- data/rdoc-sources/FXOptionMenu.rb +2 -2
- data/rdoc-sources/FXPCXIcon.rb +3 -3
- data/rdoc-sources/FXPCXImage.rb +3 -3
- data/rdoc-sources/FXPNGIcon.rb +3 -3
- data/rdoc-sources/FXPNGImage.rb +3 -3
- data/rdoc-sources/FXPPMIcon.rb +3 -3
- data/rdoc-sources/FXPPMImage.rb +3 -3
- data/rdoc-sources/FXPicker.rb +1 -1
- data/rdoc-sources/FXPopup.rb +2 -2
- data/rdoc-sources/FXPrintDialog.rb +1 -1
- data/rdoc-sources/FXProgressBar.rb +1 -1
- data/rdoc-sources/FXProgressDialog.rb +1 -1
- data/rdoc-sources/FXQuatd.rb +1 -1
- data/rdoc-sources/FXQuatf.rb +1 -1
- data/rdoc-sources/FXRGBIcon.rb +3 -3
- data/rdoc-sources/FXRGBImage.rb +3 -3
- data/rdoc-sources/FXRealSlider.rb +9 -9
- data/rdoc-sources/FXRealSpinner.rb +9 -9
- data/rdoc-sources/FXRecentFiles.rb +1 -1
- data/rdoc-sources/FXReplaceDialog.rb +3 -3
- data/rdoc-sources/FXRuler.rb +1 -1
- data/rdoc-sources/FXRulerView.rb +1 -1
- data/rdoc-sources/FXScintilla.rb +1 -1
- data/rdoc-sources/FXScrollBar.rb +5 -5
- data/rdoc-sources/FXScrollWindow.rb +3 -3
- data/rdoc-sources/FXSearchDialog.rb +3 -3
- data/rdoc-sources/FXSeparator.rb +15 -15
- data/rdoc-sources/FXShutter.rb +20 -20
- data/rdoc-sources/FXSlider.rb +9 -9
- data/rdoc-sources/FXSpinner.rb +9 -9
- data/rdoc-sources/FXSplitter.rb +8 -8
- data/rdoc-sources/FXSpring.rb +9 -9
- data/rdoc-sources/FXStatusBar.rb +9 -9
- data/rdoc-sources/FXStatusLine.rb +3 -3
- data/rdoc-sources/FXSwitcher.rb +7 -7
- data/rdoc-sources/FXTGAIcon.rb +3 -3
- data/rdoc-sources/FXTGAImage.rb +3 -3
- data/rdoc-sources/FXTIFIcon.rb +3 -3
- data/rdoc-sources/FXTIFImage.rb +3 -3
- data/rdoc-sources/FXTabBar.rb +9 -9
- data/rdoc-sources/FXTabBook.rb +9 -9
- data/rdoc-sources/FXTabItem.rb +7 -7
- data/rdoc-sources/FXTable.rb +10 -10
- data/rdoc-sources/FXText.rb +5 -5
- data/rdoc-sources/FXTextField.rb +9 -9
- data/rdoc-sources/FXToggleButton.rb +9 -9
- data/rdoc-sources/FXToolBar.rb +20 -20
- data/rdoc-sources/FXToolBarGrip.rb +5 -5
- data/rdoc-sources/FXToolBarShell.rb +5 -5
- data/rdoc-sources/FXToolBarTab.rb +5 -5
- data/rdoc-sources/FXToolTip.rb +1 -1
- data/rdoc-sources/FXTreeList.rb +5 -5
- data/rdoc-sources/FXTreeListBox.rb +10 -10
- data/rdoc-sources/FXTriStateButton.rb +9 -9
- data/rdoc-sources/FXVerticalFrame.rb +9 -9
- data/rdoc-sources/FXWindow.rb +5 -5
- data/rdoc-sources/FXWizard.rb +1 -1
- data/rdoc-sources/FXXBMIcon.rb +3 -3
- data/rdoc-sources/FXXBMImage.rb +3 -3
- data/rdoc-sources/FXXPMIcon.rb +3 -3
- data/rdoc-sources/FXXPMImage.rb +3 -3
- metadata +5 -4
- data/doc/cvs.html +0 -35
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="d0e5173"></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="d0e5192"></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="
|
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="subversion.html" title="Appendix F. Getting the Sources from Subversion"></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="subversion.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="d0e5226"></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
|
@@ -36,4 +36,4 @@ basic requirements are always the same:
|
|
36
36
|
function. For example, if the C++ function has a <span class="type"> FXbool</span>
|
37
37
|
return type, we would expect the corresponding Ruby method to return
|
38
38
|
either <code class="constant">Qtrue</code> or <code class="constant">Qfalse</code>.</p></li></ol></div><p>
|
39
|
-
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apes02.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="
|
39
|
+
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apes02.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="subversion.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Object Life Cycles and Garbage Collection </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix F. Getting the Sources from Subversion</td></tr></table></div></body></html>
|
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#d0e5154">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#d0e5192">GL Objects</a></span></dt></dl></dd><dt><span class="section"><a href="apes03.html">Virtual Functions</a></span></dt></dl></dd><dt><span class="appendix"><a href="subversion.html">F. Getting the Sources from Subversion</a></span></dt></dl></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,10 +1,30 @@
|
|
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.5 (January 20, 2007)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Clicking outside of the visible cells for an
|
4
|
+
<code class="classname">FXTable</code> when there was no current selection
|
5
|
+
caused the code to raise an exception (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=5907&group_id=300&atid=1223" target="_top">RubyForge
|
6
|
+
Bug #5907</a>). This problem has been fixed.</p></li><li style="list-style-type: disc"><p>The <code class="methodname">hasTimeout?</code> method for the
|
7
|
+
<code class="classname">FXApp</code> class was implemented incorrectly (see
|
8
|
+
<a href="http://rubyforge.org/tracker/index.php?func=detail&aid=7564&group_id=300&atid=1223" target="_top">RubyForge
|
9
|
+
Bug #7564</a>). This problem has been fixed.</p></li><li style="list-style-type: disc"><p>The <code class="classname">FXFoldingList</code> and
|
10
|
+
<code class="classname">FXFoldingItem</code> classes did not have each
|
11
|
+
iterator methods like most of the other list-based widgets (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=7978&group_id=300&atid=1225" target="_top">RubyForge
|
12
|
+
Patch #7978</a>). These have been added.</p></li><li style="list-style-type: disc"><p>The API documentation for <code class="classname">FXMDIClient</code>
|
13
|
+
claimed that <code class="classname">FXScrollArea</code> was its base class
|
14
|
+
(see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=7979&group_id=300&atid=1223" target="_top">RubyForge
|
15
|
+
Bug #7979</a>). This has been corrected; the base class for
|
16
|
+
<code class="classname">FXMDIClient</code> is
|
17
|
+
<code class="classname">FXComposite</code>.</p></li><li style="list-style-type: disc"><p>There was a small typo in the documentation for the
|
18
|
+
<code class="classname">FXFoldingList</code> class options (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=7981&group_id=300&atid=1223" target="_top">RubyForge
|
19
|
+
Bug #7981</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>Added preliminary support for keyword-style arguments, as
|
20
|
+
described in the <a href="http://www.fxruby.org/doc/differences.html" target="_top">"Differences Between
|
21
|
+
FOX and FXRuby"</a> section of the <a href="http://www.fxruby.org/doc/book.html" target="_top">FXRuby User's
|
22
|
+
Guide</a>.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.6.20 and
|
23
|
+
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="d0e2505"></a>Changes For Version 1.6.4 (November 30, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>A change made in Ruby 1.8.5 for cyclic requires led to a problem
|
4
24
|
that caused the Ruby interpreter to emit a large number of warnings
|
5
25
|
(see <a href="http://rubyforge.org/tracker/?func=detail&aid=5633&group_id=300&atid=1223" target="_top">RubyForge
|
6
26
|
Bug #5633</a>). This problem 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
|
7
|
-
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="
|
27
|
+
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="d0e2518"></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
|
8
28
|
<code class="classname">FXTopWindow</code> and
|
9
29
|
<code class="classname">FXMDIChild</code>) weren't properly sending a
|
10
30
|
<code class="constant">SEL_CLOSE</code> message to their message targets (see
|
@@ -41,7 +61,7 @@
|
|
41
61
|
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
|
42
62
|
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
|
43
63
|
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
|
44
|
-
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="
|
64
|
+
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="d0e2646"></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
|
45
65
|
<code class="methodname">collapseTree()</code> methods for the
|
46
66
|
<code class="classname">FXFoldingList</code> class were incorrectly identified
|
47
67
|
as <code class="methodname">expandFolding()</code> and
|
@@ -55,7 +75,7 @@
|
|
55
75
|
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
|
56
76
|
(see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=5746&group_id=300&atid=1223" target="_top">RubyForge
|
57
77
|
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
|
58
|
-
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="
|
78
|
+
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="d0e2704"></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
|
59
79
|
<code class="classname">FXWindow</code> class always returned an array of
|
60
80
|
<code class="classname">FXWindow</code> instances, even if the actual types
|
61
81
|
should have been instances of subclasses of
|
@@ -76,7 +96,7 @@
|
|
76
96
|
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
|
77
97
|
(see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=5746&group_id=300&atid=1223" target="_top">RubyForge
|
78
98
|
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
|
79
|
-
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="
|
99
|
+
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="d0e2789"></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
|
80
100
|
<code class="constant">SEL_INSERTED</code>, <code class="constant">SEL_DELETED</code>
|
81
101
|
and <code class="constant">SEL_REPLACED</code> messages from an a
|
82
102
|
<code class="classname">FXText</code> widget to its target was not being
|
@@ -111,7 +131,7 @@
|
|
111
131
|
the sole means for loading FXRuby. Such programs should instead
|
112
132
|
use:</p><pre class="programlisting">require 'fox16'</pre><p>which will work
|
113
133
|
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
|
114
|
-
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="
|
134
|
+
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="d0e2886"></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
|
115
135
|
1.6. One of the most signficant changes for FOX 1.6 has been the
|
116
136
|
addition of Unicode support; all FOX widgets and internal string
|
117
137
|
processing routines are now Unicode aware. For a comprehensive
|
@@ -137,7 +157,7 @@
|
|
137
157
|
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
|
138
158
|
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
|
139
159
|
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
|
140
|
-
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="
|
160
|
+
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="d0e2980"></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
|
141
161
|
<a href="http://rubyforge.org/tracker/index.php?func=detail&aid=3729&group_id=300&atid=1223" target="_top">RubyForge
|
142
162
|
Bug #3729</a>). This error has been corrected. Thanks to Javier
|
143
163
|
Goizueta for initially reporting this problem, and especially to
|
@@ -163,7 +183,7 @@
|
|
163
183
|
<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
|
164
184
|
Bug #4255</a>). This error has been corrected. Thanks to Gerard
|
165
185
|
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
|
166
|
-
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="
|
186
|
+
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="d0e3059"></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
|
167
187
|
responding to the <code class="constant">ID_INSERT_STRING</code> command (see
|
168
188
|
<a href="http://rubyforge.org/tracker/index.php?func=detail&aid=3320&group_id=300&atid=1223" target="_top">RubyForge
|
169
189
|
Bug #3320</a>). This error has been corrected. Thanks to Uwe Hartl
|
@@ -206,7 +226,7 @@
|
|
206
226
|
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
|
207
227
|
Bug #4005</a>). This error has been corrected. Thanks to Mark
|
208
228
|
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
|
209
|
-
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="
|
229
|
+
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="d0e3180"></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
|
210
230
|
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
|
211
231
|
Bug #3014</a>). These errors have been corrected. Thanks to Dave
|
212
232
|
Burns for reporting this problem.</p></li><li style="list-style-type: disc"><p>The <code class="methodname">extendSelection</code> method for the
|
@@ -229,7 +249,7 @@
|
|
229
249
|
RDoc documentation for the <code class="classname">FXTable</code> class. All
|
230
250
|
of these problems have been corrected. Thanks to _blackdog for
|
231
251
|
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
|
232
|
-
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="
|
252
|
+
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="d0e3244"></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
|
233
253
|
<code class="classname">FXToggleButton</code> class was not documented (see
|
234
254
|
<a href="http://rubyforge.org/tracker/index.php?func=detail&aid=2286&group_id=300&atid=1223" target="_top">RubyForge
|
235
255
|
Bug #2286</a>). This oversight has been corrected. Thanks to Tim
|
@@ -264,7 +284,7 @@
|
|
264
284
|
been fixed, and the documentation for
|
265
285
|
<code class="methodname">makePositionVisible</code> has been updated
|
266
286
|
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
|
267
|
-
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="
|
287
|
+
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="d0e3329"></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
|
268
288
|
<code class="methodname">checked?</code> method for the
|
269
289
|
<code class="classname">FXCheckButton</code> class always returned
|
270
290
|
<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
|
@@ -291,7 +311,7 @@
|
|
291
311
|
<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
|
292
312
|
Bug #2275</a>). This problem has been corrected. Thanks to Gonzalo
|
293
313
|
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
|
294
|
-
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="
|
314
|
+
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="d0e3420"></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
|
295
315
|
FOX 1.4, and as such should be considered an "unstable" release. For a
|
296
316
|
history of the changes made during the FOX 1.3 and 1.4 development,
|
297
317
|
see the <a href="http://www.fox-toolkit.com/news.html" target="_top">News</a>
|
@@ -300,11 +320,11 @@
|
|
300
320
|
feature, and were still looking at <code class="constant">fox12</code>. This
|
301
321
|
has been corrected.</p></li><li style="list-style-type: disc"><p>A number of minor problems were corrected for the Windows build
|
302
322
|
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
|
303
|
-
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="
|
323
|
+
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="d0e3448"></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
|
304
324
|
1.4, and as such should be considered an "unstable" release. For a
|
305
325
|
history of the changes made during the FOX 1.3 and 1.4 development,
|
306
326
|
see the <a href="http://www.fox-toolkit.com/news.html" target="_top">News</a>
|
307
|
-
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="
|
327
|
+
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="d0e3458"></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
|
308
328
|
<code class="methodname">setTableSize</code> method for an
|
309
329
|
<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
|
310
330
|
Bug #1597</a>). This problem has been corrected. Thanks to Joel
|
@@ -352,7 +372,7 @@
|
|
352
372
|
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
|
353
373
|
Bug #1771</a>). This error has been corrected. Thanks to Jannis
|
354
374
|
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
|
355
|
-
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="
|
375
|
+
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="d0e3594"></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
|
356
376
|
collection for table items corrected only one of the problems
|
357
377
|
described in <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=1445&group_id=300&atid=1223" target="_top">RubyForge
|
358
378
|
Bug #1445</a>; There was still a problem related to the
|
@@ -382,7 +402,7 @@
|
|
382
402
|
<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
|
383
403
|
Bug #1562</a>). Thanks to Joel VanderWerf for this
|
384
404
|
suggestion.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.13 and
|
385
|
-
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="
|
405
|
+
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="d0e3679"></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
|
386
406
|
compile-time error for FXRuby was introduced in some of the Ruby 1.8.2
|
387
407
|
preview releases (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=1039&group_id=300&atid=1223" target="_top">RubyForge
|
388
408
|
Bug #1039</a>). One should not see any compile-time errors when
|
@@ -432,7 +452,7 @@
|
|
432
452
|
<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
|
433
453
|
Feature Request #1295</a>). Thanks to Brett Hallett for this
|
434
454
|
suggestion.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.13 and
|
435
|
-
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="
|
455
|
+
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="d0e3782"></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
|
436
456
|
radio behavior of radio buttons (i.e. keeping only one radio button
|
437
457
|
selected at a time), some of the example programs were no longer
|
438
458
|
working as desired (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=751&group_id=300&atid=1223" target="_top">RubyForge
|
@@ -495,7 +515,7 @@
|
|
495
515
|
documented incorrectly (see <a href="http://rubyforge.org/tracker/index.php?func=detail&aid=1325&group_id=300&atid=1223" target="_top">RubyForge
|
496
516
|
Bug #1325</a>). These have been corrected. Thanks to Karl El-Koura
|
497
517
|
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
|
498
|
-
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="
|
518
|
+
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="d0e3954"></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
|
499
519
|
applications based on either FXRuby 1.0 or 1.2, the feature name for
|
500
520
|
FXRuby has been changed from "fox" to "fox12". For most application
|
501
521
|
developers, this means that you will need to modify the source code
|
@@ -503,7 +523,7 @@
|
|
503
523
|
changes should be required for legacy applications targeted at FXRuby
|
504
524
|
1.0.</p></li><li style="list-style-type: disc"><p>Made a number of updates to the documentation, to reflect API
|
505
525
|
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
|
506
|
-
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="
|
526
|
+
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="d0e3971"></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
|
507
527
|
should be compatible with any FOX library version 1.2; it is not
|
508
528
|
compatible with any previous FOX library versions. As this is an alpha
|
509
529
|
release, users should expect a certain amount of instability, bugs,
|
@@ -545,7 +565,7 @@
|
|
545
565
|
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
|
546
566
|
Bug #986180</a>). This has been fixed. Thanks to Bil Bas for
|
547
567
|
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
|
548
|
-
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="
|
568
|
+
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="d0e4080"></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
|
549
569
|
should be compatible with any FOX library version 1.2; it is not
|
550
570
|
compatible with any previous FOX library versions. As this is an alpha
|
551
571
|
release, users should expect a certain amount of instability, bugs,
|
data/doc/differences.html
CHANGED
@@ -1,11 +1,190 @@
|
|
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,
|
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,
|
4
|
+
you should be able to use the standard FOX class documentation as a
|
5
|
+
reference. In some cases, however, fundamental differences between Ruby and
|
6
|
+
C++ necessitated slight changes in the API. For some other cases, FOX
|
7
|
+
classes were enhanced to take advantage of Ruby language features (such as
|
8
|
+
iterators). The purpose of this chapter is to identify some of the
|
9
|
+
differences between the C++ and Ruby interfaces to FOX.</p><p>One difference that should be easy to cope with is the substitution of
|
10
|
+
Ruby Strings for FXStrings. Any function that would normally expect an
|
11
|
+
<span class="type">FXString</span> input argument insteads takes a Ruby String.
|
12
|
+
Similarly, functions that would return an <span class="type">FXString</span> will instead
|
13
|
+
return a Ruby string. For functions that would normally accept a
|
14
|
+
<code class="constant">NULL</code> or empty string argument, just pass
|
15
|
+
<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="d0e4375"></a>Functions that expect arrays of objects</h2></div></div></div><p>One common pattern in FOX member function argument lists is to
|
16
|
+
expect a pointer to an array of values, followed by an integer indicating
|
17
|
+
the number of values in the array. This of course isn't necessary in Ruby,
|
18
|
+
where <code class="classname">Array</code> objects "know" their lengths. As a
|
19
|
+
result, functions such as
|
20
|
+
<code class="methodname">FXWindow::acquireClipboard()</code>, whose C++
|
21
|
+
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
|
22
|
+
<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="d0e4395"></a>Functions that return values by reference</h2></div></div></div><p>Many FOX methods take advantage of the C++ language feature of
|
23
|
+
returning values by reference. For example, the
|
24
|
+
<code class="methodname">getCursorPos()</code> member function for class
|
25
|
+
<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
|
26
|
+
(x, y and buttons). To call this function from a C++ program, you'd write
|
27
|
+
code like this:</p><pre class="programlisting">FXint x, y;
|
4
28
|
FXuint buttons;
|
5
29
|
|
6
30
|
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'
|
31
|
+
fprintf(stderr, "Current position is (%d, %d)\n", x, y);</pre><p>Since this idiom doesn't translate well to Ruby, some functions'
|
32
|
+
interfaces have been slightly modified. For example, the FXRuby
|
33
|
+
implementation of <code class="methodname">getCursorPos()</code> returns the
|
34
|
+
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
|
35
|
+
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
|
36
|
+
input.</td></tr><tr><td><code class="methodname">FXFontDialog#fontSelection</code></td><td>Returns the <code class="classname">FXFontDesc</code>
|
37
|
+
instance</td></tr><tr><td><code class="methodname">FXFontSelector#fontSelection</code></td><td>Returns the <code class="classname">FXFontDesc</code>
|
38
|
+
instance</td></tr><tr><td><code class="methodname">FXGLObject#bounds(range)</code></td><td>Takes an <code class="classname">FXRange</code> instance as its
|
39
|
+
input and returns a (possibly modified)
|
40
|
+
<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
|
41
|
+
returns the screen point coordinate as an array of integers [sx,
|
42
|
+
sy]</td></tr><tr><td><code class="methodname">FXGLViewer#getBoreVector(sx,
|
43
|
+
sy)</code></td><td>Returns the endpoint and direction vector as an array of
|
44
|
+
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>
|
45
|
+
instance.</td></tr><tr><td><code class="methodname">FXPrinterDialog#printer</code></td><td>Returns the <code class="classname">FXPrinter</code>
|
46
|
+
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
|
47
|
+
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
|
48
|
+
input.</td></tr><tr><td><code class="methodname">FXText#appendText(text,
|
49
|
+
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,
|
50
|
+
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
|
51
|
+
beginning at position <span class="emphasis"><em>pos</em></span> and returns the
|
52
|
+
result as a String.</td></tr><tr><td><code class="methodname">FXText#extractStyle(pos,
|
53
|
+
n)</code></td><td>Extracts <span class="emphasis"><em>n</em></span> style characters from the
|
54
|
+
buffer beginning at position <span class="emphasis"><em>pos</em></span> and returns
|
55
|
+
the result as a String.</td></tr><tr><td><code class="methodname">FXText#insertText(pos, text,
|
56
|
+
notify=false)</code></td><td>Insert <span class="emphasis"><em>text</em></span> at position
|
57
|
+
<span class="emphasis"><em>pos</em></span> in the buffer.</td></tr><tr><td><code class="methodname">FXText#insertStyledText(pos, text, style=0,
|
58
|
+
notify=false)</code></td><td>Insert <span class="emphasis"><em>text</em></span> at position
|
59
|
+
<span class="emphasis"><em>pos</em></span> in the buffer.</td></tr><tr><td><code class="methodname">FXText#replaceText(pos, m, text,
|
60
|
+
notify=false)</code></td><td>Replace <span class="emphasis"><em>m</em></span> characters at
|
61
|
+
<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,
|
62
|
+
notify=false)</code></td><td>Replace <span class="emphasis"><em>m</em></span> characters at
|
63
|
+
<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>
|
64
|
+
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,
|
65
|
+
y)</code></td><td>Returns the translated coordinates as an array [x,
|
66
|
+
y]</td></tr><tr><td><code class="methodname">FXWindow#translateCoordinatesTo(window, x,
|
67
|
+
y)</code></td><td>Returns the translated coordinates as an array [x,
|
68
|
+
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="d0e4685"></a>Iterators</h2></div></div></div><p>Several classes have been extended with an
|
69
|
+
<code class="methodname">each</code> method to provide Ruby-style iterators.
|
70
|
+
These classes include <code class="classname">FXComboBox</code>,
|
71
|
+
<code class="classname">FXGLGroup</code>, <code class="classname">FXHeader</code>,
|
72
|
+
<code class="classname">FXIconList</code>, <code class="classname">FXList</code>,
|
73
|
+
<code class="classname">FXListBox</code>, <code class="classname">FXTreeItem</code>,
|
74
|
+
<code class="classname">FXTreeList</code> and
|
75
|
+
<code class="classname">FXTreeListBox</code>. These classes also mix-in Ruby's
|
76
|
+
<code class="classname">Enumerable</code> module so that you can take full
|
77
|
+
advantage of the iterators.</p><p>The block parameters passed to your code block vary depending on the
|
78
|
+
class. For example, iterating over an <code class="classname">FXList</code>
|
79
|
+
instance yields <code class="classname">FXListItem</code> parameters:</p><pre class="programlisting">aList.each { |aListItem|
|
8
80
|
puts "text for this item = #{aListItem.getText()}"
|
9
|
-
}</pre><p>whereas iterating over an <code class="classname">FXComboBox</code> instance
|
81
|
+
}</pre><p>whereas iterating over an <code class="classname">FXComboBox</code> instance
|
82
|
+
yields two parameters, the item text (a string) and the item data:</p><pre class="programlisting">aComboBox.each { |itemText, itemData|
|
10
83
|
puts "text for this item = #{itemText}"
|
11
|
-
}</pre><p>The following table shows the block parameters for each of these
|
84
|
+
}</pre><p>The following table shows the block parameters for each of these
|
85
|
+
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
|
86
|
+
<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="d0e4829"></a>Attribute Accessors</h2></div></div></div><p>FOX strictly handles access to all object attributes through member
|
87
|
+
functions, e.g. <code class="methodname">setBackgroundColor</code> and
|
88
|
+
<code class="methodname">getBackgroundColor</code> or
|
89
|
+
<code class="methodname">setText</code> and <code class="methodname">getText</code>.
|
90
|
+
FXRuby exposes all of these functions but also provides aliases that look
|
91
|
+
more like regular Ruby attribute accessors. The names for these accessors
|
92
|
+
are based on the FOX method names; for example,
|
93
|
+
<code class="methodname">setBackgroundColor</code> and
|
94
|
+
<code class="methodname">getBackgroundColor</code> are aliased to
|
95
|
+
<code class="methodname">backgroundColor=</code> and
|
96
|
+
<code class="methodname">backgroundColor</code>, respectively.</p><p>In many cases these aliases allow you to write more compact and
|
97
|
+
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
|
98
|
+
method names:</p><pre class="programlisting">aLabel.text += " (modified)"</pre><p>While these two are functionally equivalent, the latter is a bit
|
99
|
+
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="d0e4868"></a>Message Passing</h2></div></div></div><p>FOX message maps are implemented as static C++ class members. With
|
100
|
+
FXRuby, you just associate messages with message handlers in the class
|
101
|
+
<code class="methodname">initialize</code> method using the
|
102
|
+
<code class="methodname">FXMAPFUNC()</code>,
|
103
|
+
<code class="methodname">FXMAPTYPE()</code>,
|
104
|
+
<code class="methodname">FXMAPTYPES()</code> or
|
105
|
+
<code class="methodname">FXMAPFUNCS()</code> methods. See almost any of the
|
106
|
+
example programs for examples of how this is done.</p><p>As in C++ FOX, the last argument passed to your message handler
|
107
|
+
functions contains message-specific data. For instance, all
|
108
|
+
<code class="constant">SEL_PAINT</code> messages pass an
|
109
|
+
<code class="classname">FXEvent</code> object through this argument to give you
|
110
|
+
some information about the size of the exposed rectangle. On the other
|
111
|
+
hand, a <code class="constant">SEL_COMMAND</code> message from an
|
112
|
+
<code class="classname">FXHeader</code> object passes the index of the selected
|
113
|
+
header item through this argument. Instead of guessing what's in this last
|
114
|
+
argument, your best bet is to instead invoke a member function on the
|
115
|
+
sending object to find out what you need, instead of relying on the data
|
116
|
+
passed through this pointer. For example, if you get a
|
117
|
+
<code class="constant">SEL_COMMAND</code> message from an
|
118
|
+
<code class="classname">FXColorWell</code> object, the data passed through that
|
119
|
+
last argument is supposed to be the new RGB color value. Instead of trying
|
120
|
+
to interpret the argument's contents, just turn around and call the color
|
121
|
+
well's <code class="methodname">getRGBA()</code> member function to retrieve its
|
122
|
+
color. Similarly, if you get a <code class="constant">SEL_COMMAND</code> message
|
123
|
+
from a tree list, call its <code class="methodname">getCurrentItem()</code>
|
124
|
+
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="d0e4917"></a>Catching Operating System Signals</h2></div></div></div><p>The <code class="methodname">FXApp#addSignal</code> and
|
125
|
+
<code class="methodname">FXApp#removeSignal</code> methods have been enhanced to
|
126
|
+
accept either a string or integer as their first argument. If it's a
|
127
|
+
string (e.g. "SIGINT" or just "INT") the code will determine the
|
128
|
+
corresponding signal number for you (similar to the standard Ruby
|
129
|
+
library's <code class="methodname">Process.kill</code> module method). For
|
130
|
+
examples of how to use this, see the <code class="filename">datatarget.rb</code> or
|
131
|
+
<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="d0e4937"></a>Support for Multithreaded Applications</h2></div></div></div><p>There is some support for multithreaded FXRuby applications, but
|
132
|
+
it's not wonderful. The current implementation does what is also done in
|
133
|
+
Ruby/GTK; it turns over some idle processing time to the Ruby thread
|
134
|
+
scheduler to let other threads do their thing. As I learn more about
|
135
|
+
Ruby's threading implementation I may try something different, but this
|
136
|
+
seems to work OK for now. For a simple example, see the
|
137
|
+
<code class="filename">groupbox.rb</code> example program, in which the clock label
|
138
|
+
that appears in the lower right-hand corner is continuously updated (by a
|
139
|
+
separate thread).</p><p>If you suspect that FXRuby's threads support is interfering with
|
140
|
+
your application's performance, you may want to try tweaking the amount of
|
141
|
+
time that the main application thread "sleeps" during idle processing; do
|
142
|
+
this by setting the <code class="classname">FXApp</code> object's
|
143
|
+
<em class="structfield"><code>sleepTime</code></em> attribute. The default value for
|
144
|
+
<em class="structfield"><code>FXApp#sleepTime</code></em> is 100 milliseconds. You can
|
145
|
+
also disable the threads support completely by calling
|
146
|
+
<code class="methodname">FXApp#threadsEnabled=false</code> (and subsequently
|
147
|
+
re-enable it with
|
148
|
+
<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="d0e4962"></a>Keyword-Style Arguments</h2></div></div></div><p>FXRuby 1.6.5 introduced preliminary, experimental support for using
|
149
|
+
keyword-style arguments in FXRuby method calls. The current implementation
|
150
|
+
of this feature only works for class constructors (i.e. the "new" class
|
151
|
+
methods), but the intent is to gradually extend this feature so that it
|
152
|
+
covers all FXRuby methods.</p><p>What this means in practice is that for calls to methods that have
|
153
|
+
one or more optional arguments, you can replace all of the optional
|
154
|
+
arguments with a hash that sets only the values for which the default
|
155
|
+
isn't appropriate. So, for example, consider a typical call to
|
156
|
+
<code class="methodname">FXMainWindow.new</code>:</p><pre class="programlisting">main = FXMainWindow.new(app, "Title Goes Here", nil, nil, DECOR_ALL, 0, 0, 800, 600)</pre><p>In this case, the programmer wants to set the initial window width
|
157
|
+
and height to 800 and 600. In order to do that (with the current release
|
158
|
+
of FXRuby), however, she's required to fill in all of the optional
|
159
|
+
arguments in between the window title string and the width and height
|
160
|
+
values. As anyone who's worked with FXRuby for any amount of time will
|
161
|
+
tell you, it's easy to accidentally leave out one of those intermediate
|
162
|
+
arguments and it can be difficult to figure out what's wrong
|
163
|
+
afterwards.</p><p>Now consider how this method call could be written using the new
|
164
|
+
keyword arguments support. First, the programmer would need to require the
|
165
|
+
keyword arguments library:</p><pre class="programlisting">require 'fox16/kwargs'</pre><p>Then she would look up the API documentation for the
|
166
|
+
<code class="methodname">FXMainWindow#initialize</code> method (e.g. <a href="http://www.fxruby.org/doc/api/classes/Fox/FXMainWindow.html" target="_top">here</a>)
|
167
|
+
and see that the names of the width and height arguments are, in fact,
|
168
|
+
"width" and "height". Armed with that information, she would be able to
|
169
|
+
rewrite the previous code as:</p><pre class="programlisting">main = FXMainWindow.new(app, "Title Goes Here", :width => 800, :height => 600)</pre><p>Here, the programmer has omitted the intermediate optional arguments
|
170
|
+
(thus accepting their default values) and specified only the width and
|
171
|
+
height values. This code is obviously a lot more readable and
|
172
|
+
maintainable.</p><p>It is important to observe the difference between required and
|
173
|
+
optional arguments when using this feature. If the API documentation for a
|
174
|
+
particular method doesn't indicate that an argument has a default value,
|
175
|
+
then it is by definition not an optional argument. So one could
|
176
|
+
<span class="emphasis"><em>not</em></span> write the example as, e.g.</p><pre class="programlisting">main = FXMainWindow.new(app, :width => 800, :title => "Title Goes Here", :height => 600)</pre><p>This example is incorrect because the title argument is required,
|
177
|
+
and it must be the second argument in the call. Obviously, this means that
|
178
|
+
the optional arguments in a method call (if they're specified) will always
|
179
|
+
follow all of the required arguments.</p><p>Finally, note that the keyword arguments feature has been
|
180
|
+
implemented so that it's backwards-compatible with the original positional
|
181
|
+
arguments scheme (or it's intended to be, at any rate). What that means is
|
182
|
+
that you can immediately start making use of this feature in your existing
|
183
|
+
code, even if you don't have time to update all of the method calls to use
|
184
|
+
keyword arguments.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e5003"></a>Debugging Tricks</h2></div></div></div><p>As a debugging tool, you can optionally catch exceptions raised in
|
185
|
+
message handlers. To turn on this feature, call the
|
186
|
+
<code class="methodname">setIgnoreExceptions(true)</code> module method. When
|
187
|
+
this is enabled, any exceptions raised in message handler functions will
|
188
|
+
cause a standard stack trace to be dumped to the standard output, but then
|
189
|
+
your application will, for better or worse, proceed normally. Thanks to
|
190
|
+
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#d0e5154">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#d0e5192">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="d0e5154"></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="d0e5016"></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="d0e5041"></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="d0e5052"></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="d0e5062"></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="d0e5079"></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="d0e5123"></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="d0e5140"></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>
|