fxruby 1.6.4 → 1.6.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. data/doc/apes02.html +2 -2
  2. data/doc/apes03.html +2 -2
  3. data/doc/book.html +1 -1
  4. data/doc/changes.html +40 -20
  5. data/doc/differences.html +183 -4
  6. data/doc/implementation.html +1 -1
  7. data/doc/library.html +5 -5
  8. data/doc/opengl.html +5 -5
  9. data/doc/pt02.html +1 -1
  10. data/doc/scintilla.html +4 -4
  11. data/doc/subversion.html +21 -0
  12. data/examples/raabrowser.rb +1 -1
  13. data/ext/fox16/table_wrap.cpp +3 -10
  14. data/lib/fox16/iterators.rb +37 -0
  15. data/lib/fox16/kwargs.rb +1160 -960
  16. data/lib/fox16/timeout.rb +1 -1
  17. data/lib/fox16/version.rb +1 -1
  18. data/rdoc-sources/FX4Splitter.rb +8 -8
  19. data/rdoc-sources/FX7Segment.rb +1 -1
  20. data/rdoc-sources/FXAccelTable.rb +2 -2
  21. data/rdoc-sources/FXBMPIcon.rb +3 -3
  22. data/rdoc-sources/FXBMPImage.rb +3 -3
  23. data/rdoc-sources/FXBitmapFrame.rb +1 -1
  24. data/rdoc-sources/FXBitmapView.rb +1 -1
  25. data/rdoc-sources/FXChoiceBox.rb +3 -3
  26. data/rdoc-sources/FXColorList.rb +1 -1
  27. data/rdoc-sources/FXColorRing.rb +1 -1
  28. data/rdoc-sources/FXColorWheel.rb +9 -9
  29. data/rdoc-sources/FXComboBox.rb +9 -9
  30. data/rdoc-sources/FXDC.rb +10 -10
  31. data/rdoc-sources/FXDataTarget.rb +1 -1
  32. data/rdoc-sources/FXDial.rb +9 -9
  33. data/rdoc-sources/FXDialogBox.rb +1 -1
  34. data/rdoc-sources/FXDirBox.rb +1 -1
  35. data/rdoc-sources/FXDirDialog.rb +1 -1
  36. data/rdoc-sources/FXDirList.rb +1 -1
  37. data/rdoc-sources/FXDirSelector.rb +1 -1
  38. data/rdoc-sources/FXDockBar.rb +20 -20
  39. data/rdoc-sources/FXDockSite.rb +1 -1
  40. data/rdoc-sources/FXDockTitle.rb +1 -1
  41. data/rdoc-sources/FXDrawable.rb +2 -2
  42. data/rdoc-sources/FXDriveBox.rb +1 -1
  43. data/rdoc-sources/FXFileDialog.rb +1 -1
  44. data/rdoc-sources/FXFileList.rb +1 -1
  45. data/rdoc-sources/FXFileSelector.rb +1 -1
  46. data/rdoc-sources/FXFoldingList.rb +6 -6
  47. data/rdoc-sources/FXFontDialog.rb +1 -1
  48. data/rdoc-sources/FXFontSelector.rb +1 -1
  49. data/rdoc-sources/FXGIFIcon.rb +3 -3
  50. data/rdoc-sources/FXGIFImage.rb +3 -3
  51. data/rdoc-sources/FXGLCanvas.rb +2 -2
  52. data/rdoc-sources/FXGLViewer.rb +2 -2
  53. data/rdoc-sources/FXGradientBar.rb +1 -1
  54. data/rdoc-sources/FXHeader.rb +1 -1
  55. data/rdoc-sources/FXHorizontalFrame.rb +9 -9
  56. data/rdoc-sources/FXICOIcon.rb +3 -3
  57. data/rdoc-sources/FXICOImage.rb +3 -3
  58. data/rdoc-sources/FXIcon.rb +3 -3
  59. data/rdoc-sources/FXIconList.rb +1 -1
  60. data/rdoc-sources/FXImage.rb +7 -7
  61. data/rdoc-sources/FXImageFrame.rb +1 -1
  62. data/rdoc-sources/FXImageView.rb +1 -1
  63. data/rdoc-sources/FXInputDialog.rb +1 -1
  64. data/rdoc-sources/FXJPGIcon.rb +3 -3
  65. data/rdoc-sources/FXJPGImage.rb +3 -3
  66. data/rdoc-sources/FXKnob.rb +1 -1
  67. data/rdoc-sources/FXList.rb +1 -1
  68. data/rdoc-sources/FXListBox.rb +1 -1
  69. data/rdoc-sources/FXMDIButton.rb +6 -6
  70. data/rdoc-sources/FXMDIChild.rb +1 -1
  71. data/rdoc-sources/FXMDIClient.rb +2 -2
  72. data/rdoc-sources/FXMenuBar.rb +1 -1
  73. data/rdoc-sources/FXMenuCheck.rb +1 -1
  74. data/rdoc-sources/FXMenuCommand.rb +1 -1
  75. data/rdoc-sources/FXMenuRadio.rb +1 -1
  76. data/rdoc-sources/FXOptionMenu.rb +2 -2
  77. data/rdoc-sources/FXPCXIcon.rb +3 -3
  78. data/rdoc-sources/FXPCXImage.rb +3 -3
  79. data/rdoc-sources/FXPNGIcon.rb +3 -3
  80. data/rdoc-sources/FXPNGImage.rb +3 -3
  81. data/rdoc-sources/FXPPMIcon.rb +3 -3
  82. data/rdoc-sources/FXPPMImage.rb +3 -3
  83. data/rdoc-sources/FXPicker.rb +1 -1
  84. data/rdoc-sources/FXPopup.rb +2 -2
  85. data/rdoc-sources/FXPrintDialog.rb +1 -1
  86. data/rdoc-sources/FXProgressBar.rb +1 -1
  87. data/rdoc-sources/FXProgressDialog.rb +1 -1
  88. data/rdoc-sources/FXQuatd.rb +1 -1
  89. data/rdoc-sources/FXQuatf.rb +1 -1
  90. data/rdoc-sources/FXRGBIcon.rb +3 -3
  91. data/rdoc-sources/FXRGBImage.rb +3 -3
  92. data/rdoc-sources/FXRealSlider.rb +9 -9
  93. data/rdoc-sources/FXRealSpinner.rb +9 -9
  94. data/rdoc-sources/FXRecentFiles.rb +1 -1
  95. data/rdoc-sources/FXReplaceDialog.rb +3 -3
  96. data/rdoc-sources/FXRuler.rb +1 -1
  97. data/rdoc-sources/FXRulerView.rb +1 -1
  98. data/rdoc-sources/FXScintilla.rb +1 -1
  99. data/rdoc-sources/FXScrollBar.rb +5 -5
  100. data/rdoc-sources/FXScrollWindow.rb +3 -3
  101. data/rdoc-sources/FXSearchDialog.rb +3 -3
  102. data/rdoc-sources/FXSeparator.rb +15 -15
  103. data/rdoc-sources/FXShutter.rb +20 -20
  104. data/rdoc-sources/FXSlider.rb +9 -9
  105. data/rdoc-sources/FXSpinner.rb +9 -9
  106. data/rdoc-sources/FXSplitter.rb +8 -8
  107. data/rdoc-sources/FXSpring.rb +9 -9
  108. data/rdoc-sources/FXStatusBar.rb +9 -9
  109. data/rdoc-sources/FXStatusLine.rb +3 -3
  110. data/rdoc-sources/FXSwitcher.rb +7 -7
  111. data/rdoc-sources/FXTGAIcon.rb +3 -3
  112. data/rdoc-sources/FXTGAImage.rb +3 -3
  113. data/rdoc-sources/FXTIFIcon.rb +3 -3
  114. data/rdoc-sources/FXTIFImage.rb +3 -3
  115. data/rdoc-sources/FXTabBar.rb +9 -9
  116. data/rdoc-sources/FXTabBook.rb +9 -9
  117. data/rdoc-sources/FXTabItem.rb +7 -7
  118. data/rdoc-sources/FXTable.rb +10 -10
  119. data/rdoc-sources/FXText.rb +5 -5
  120. data/rdoc-sources/FXTextField.rb +9 -9
  121. data/rdoc-sources/FXToggleButton.rb +9 -9
  122. data/rdoc-sources/FXToolBar.rb +20 -20
  123. data/rdoc-sources/FXToolBarGrip.rb +5 -5
  124. data/rdoc-sources/FXToolBarShell.rb +5 -5
  125. data/rdoc-sources/FXToolBarTab.rb +5 -5
  126. data/rdoc-sources/FXToolTip.rb +1 -1
  127. data/rdoc-sources/FXTreeList.rb +5 -5
  128. data/rdoc-sources/FXTreeListBox.rb +10 -10
  129. data/rdoc-sources/FXTriStateButton.rb +9 -9
  130. data/rdoc-sources/FXVerticalFrame.rb +9 -9
  131. data/rdoc-sources/FXWindow.rb +5 -5
  132. data/rdoc-sources/FXWizard.rb +1 -1
  133. data/rdoc-sources/FXXBMIcon.rb +3 -3
  134. data/rdoc-sources/FXXBMImage.rb +3 -3
  135. data/rdoc-sources/FXXPMIcon.rb +3 -3
  136. data/rdoc-sources/FXXPMImage.rb +3 -3
  137. metadata +5 -4
  138. 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&nbsp;E.&nbsp;Implementation"><link rel="prev" href="implementation.html" title="Appendix&nbsp;E.&nbsp;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>&nbsp;</td><th width="60%" align="center">Appendix&nbsp;E.&nbsp;Implementation</th><td width="20%" align="right">&nbsp;<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="d0e5056"></a>Object Life Cycles and Garbage Collection</h2></div></div></div><p>One of the more difficult issues to deal with was understanding
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&nbsp;E.&nbsp;Implementation"><link rel="prev" href="implementation.html" title="Appendix&nbsp;E.&nbsp;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>&nbsp;</td><th width="60%" align="center">Appendix&nbsp;E.&nbsp;Implementation</th><td width="20%" align="right">&nbsp;<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="d0e5075"></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>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="implementation.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="apes03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix&nbsp;E.&nbsp;Implementation&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Virtual Functions</td></tr></table></div></body></html>
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>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="implementation.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="apes03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix&nbsp;E.&nbsp;Implementation&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;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&nbsp;E.&nbsp;Implementation"><link rel="prev" href="apes02.html" title="Object Life Cycles and Garbage Collection"><link rel="next" href="cvs.html" title="Appendix&nbsp;F.&nbsp;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>&nbsp;</td><th width="60%" align="center">Appendix&nbsp;E.&nbsp;Implementation</th><td width="20%" align="right">&nbsp;<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="d0e5109"></a>Virtual Functions</h2></div></div></div><p>
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&nbsp;E.&nbsp;Implementation"><link rel="prev" href="apes02.html" title="Object Life Cycles and Garbage Collection"><link rel="next" href="subversion.html" title="Appendix&nbsp;F.&nbsp;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>&nbsp;</td><th width="60%" align="center">Appendix&nbsp;E.&nbsp;Implementation</th><td width="20%" align="right">&nbsp;<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>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="implementation.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="cvs.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Object Life Cycles and Garbage Collection&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Appendix&nbsp;F.&nbsp;Getting the Sources from CVS</td></tr></table></div></body></html>
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>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="implementation.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="subversion.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Object Life Cycles and Garbage Collection&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Appendix&nbsp;F.&nbsp;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&nbsp;I.&nbsp;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">&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<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 &copy; 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#d0e5037">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#d0e5075">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">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="pt01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right" valign="top">&nbsp;Part&nbsp;I.&nbsp;The Basics</td></tr></table></div></body></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&nbsp;I.&nbsp;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">&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<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 &copy; 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">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="pt01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right" valign="top">&nbsp;Part&nbsp;I.&nbsp;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&nbsp;11.&nbsp;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&nbsp;I.&nbsp;The Basics"><link rel="prev" href="infosources.html" title="Chapter&nbsp;10.&nbsp;Other Sources of Information"><link rel="next" href="pt02.html" title="Part&nbsp;II.&nbsp;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&nbsp;11.&nbsp;Change History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="infosources.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;I.&nbsp;The Basics</th><td width="20%" align="right">&nbsp;<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&nbsp;11.&nbsp;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.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
3
+ <title>Chapter&nbsp;11.&nbsp;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&nbsp;I.&nbsp;The Basics"><link rel="prev" href="infosources.html" title="Chapter&nbsp;10.&nbsp;Other Sources of Information"><link rel="next" href="pt02.html" title="Part&nbsp;II.&nbsp;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&nbsp;11.&nbsp;Change History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="infosources.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;I.&nbsp;The Basics</th><td width="20%" align="right">&nbsp;<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&nbsp;11.&nbsp;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&amp;aid=5907&amp;group_id=300&amp;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&amp;aid=7564&amp;group_id=300&amp;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&amp;aid=7978&amp;group_id=300&amp;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&amp;aid=7979&amp;group_id=300&amp;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&amp;aid=7981&amp;group_id=300&amp;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&amp;aid=5633&amp;group_id=300&amp;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="d0e2442"></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
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&amp;aid=6313&amp;group_id=300&amp;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="d0e2570"></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
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&amp;aid=5746&amp;group_id=300&amp;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="d0e2628"></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
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&amp;aid=5746&amp;group_id=300&amp;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="d0e2713"></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
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="d0e2810"></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
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&amp;aid=4597&amp;group_id=300&amp;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="d0e2904"></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
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&amp;aid=3729&amp;group_id=300&amp;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&amp;aid=4255&amp;group_id=300&amp;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="d0e2983"></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
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&amp;aid=3320&amp;group_id=300&amp;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&amp;aid=4005&amp;group_id=300&amp;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="d0e3104"></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
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&amp;aid=3014&amp;group_id=300&amp;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="d0e3168"></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
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&amp;aid=2286&amp;group_id=300&amp;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="d0e3253"></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
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&amp;aid=1852&amp;group_id=300&amp;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&amp;aid=2275&amp;group_id=300&amp;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="d0e3344"></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
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="d0e3372"></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
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="d0e3382"></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
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&amp;aid=1597&amp;group_id=300&amp;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&amp;aid=1771&amp;group_id=300&amp;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="d0e3518"></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
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&amp;aid=1445&amp;group_id=300&amp;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&amp;aid=1562&amp;group_id=300&amp;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="d0e3603"></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
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&amp;aid=1039&amp;group_id=300&amp;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&amp;aid=1426&amp;group_id=300&amp;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="d0e3706"></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
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&amp;aid=751&amp;group_id=300&amp;atid=1223" target="_top">RubyForge
@@ -495,7 +515,7 @@
495
515
  documented incorrectly (see <a href="http://rubyforge.org/tracker/index.php?func=detail&amp;aid=1325&amp;group_id=300&amp;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="d0e3878"></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
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="d0e3895"></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
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&amp;aid=986180&amp;group_id=20243&amp;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="d0e4004"></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
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&nbsp;C.&nbsp;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&nbsp;II.&nbsp;Appendices"><link rel="prev" href="scintilla.html" title="Appendix&nbsp;B.&nbsp;Using Scintilla with FXRuby"><link rel="next" href="library.html" title="Appendix&nbsp;D.&nbsp;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&nbsp;C.&nbsp;Differences between FOX and FXRuby</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="scintilla.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;II.&nbsp;Appendices</th><td width="20%" align="right">&nbsp;<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&nbsp;C.&nbsp;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="d0e4299"></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="d0e4319"></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&amp; x, FXint&amp; y, FXint&amp; 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;
3
+ <title>Appendix&nbsp;C.&nbsp;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&nbsp;II.&nbsp;Appendices"><link rel="prev" href="scintilla.html" title="Appendix&nbsp;B.&nbsp;Using Scintilla with FXRuby"><link rel="next" href="library.html" title="Appendix&nbsp;D.&nbsp;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&nbsp;C.&nbsp;Differences between FOX and FXRuby</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="scintilla.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;II.&nbsp;Appendices</th><td width="20%" align="right">&nbsp;<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&nbsp;C.&nbsp;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&amp; x, FXint&amp; y, FXint&amp; 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-&gt;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="d0e4609"></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|
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 yields two parameters, the item text (a string) and the item data:</p><pre class="programlisting">aComboBox.each { |itemText, itemData|
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 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="d0e4753"></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="d0e4792"></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="d0e4841"></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="d0e4861"></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="d0e4886"></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>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="library.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix&nbsp;B.&nbsp;Using Scintilla with FXRuby&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Appendix&nbsp;D.&nbsp;The FXRuby Standard Library</td></tr></table></div></body></html>
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 =&gt; 800, :height =&gt; 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 =&gt; 800, :title =&gt; "Title Goes Here", :height =&gt; 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>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="library.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix&nbsp;B.&nbsp;Using Scintilla with FXRuby&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Appendix&nbsp;D.&nbsp;The FXRuby Standard Library</td></tr></table></div></body></html>
@@ -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&nbsp;E.&nbsp;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&nbsp;II.&nbsp;Appendices"><link rel="prev" href="library.html" title="Appendix&nbsp;D.&nbsp;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&nbsp;E.&nbsp;Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="library.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;II.&nbsp;Appendices</th><td width="20%" align="right">&nbsp;<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&nbsp;E.&nbsp;Implementation</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="implementation.html#d0e5037">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#d0e5075">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="d0e5037"></a>Code Generation</h2></div></div></div><p>The development and maintenance of FXRuby would be almost impossible
3
+ <title>Appendix&nbsp;E.&nbsp;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&nbsp;II.&nbsp;Appendices"><link rel="prev" href="library.html" title="Appendix&nbsp;D.&nbsp;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&nbsp;E.&nbsp;Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="library.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;II.&nbsp;Appendices</th><td width="20%" align="right">&nbsp;<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&nbsp;E.&nbsp;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&nbsp;D.&nbsp;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&nbsp;II.&nbsp;Appendices"><link rel="prev" href="differences.html" title="Appendix&nbsp;C.&nbsp;Differences between FOX and FXRuby"><link rel="next" href="implementation.html" title="Appendix&nbsp;E.&nbsp;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&nbsp;D.&nbsp;The FXRuby Standard Library</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="differences.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;II.&nbsp;Appendices</th><td width="20%" align="right">&nbsp;<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&nbsp;D.&nbsp;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="d0e4899"></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="d0e4924"></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="d0e4935"></a>Color Names</h2></div></div></div><p>The <code class="filename">fox16/colors.rb</code> file, contributed by Jeff
3
+ <title>Appendix&nbsp;D.&nbsp;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&nbsp;II.&nbsp;Appendices"><link rel="prev" href="differences.html" title="Appendix&nbsp;C.&nbsp;Differences between FOX and FXRuby"><link rel="next" href="implementation.html" title="Appendix&nbsp;E.&nbsp;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&nbsp;D.&nbsp;The FXRuby Standard Library</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="differences.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;II.&nbsp;Appendices</th><td width="20%" align="right">&nbsp;<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&nbsp;D.&nbsp;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="d0e4945"></a>OpenGL Shapes</h2></div></div></div><p>The <code class="filename">fox16/glshapes.rb</code> library provides Ruby
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="d0e4962"></a>Iterators</h2></div></div></div><p>The <code class="filename">fox16/iterators.rb</code> library just adds an
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="d0e5006"></a>Key Codes</h2></div></div></div><p>The <code class="filename">fox16/keys.rb</code> library file defines all of the
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="d0e5023"></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>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="implementation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix&nbsp;C.&nbsp;Differences between FOX and FXRuby&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Appendix&nbsp;E.&nbsp;Implementation</td></tr></table></div></body></html>
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>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="implementation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix&nbsp;C.&nbsp;Differences between FOX and FXRuby&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Appendix&nbsp;E.&nbsp;Implementation</td></tr></table></div></body></html>