fxruby 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/doc/apes02.html +2 -2
  2. data/doc/apes03.html +1 -1
  3. data/doc/book.html +1 -1
  4. data/doc/changes.html +17 -9
  5. data/doc/cvs.html +2 -2
  6. data/doc/differences.html +3 -3
  7. data/doc/implementation.html +1 -1
  8. data/doc/library.html +5 -5
  9. data/doc/opengl.html +5 -5
  10. data/doc/pt02.html +1 -1
  11. data/doc/scintilla.html +4 -4
  12. data/ext/fox14/icons_wrap.cpp +3 -3
  13. data/ext/fox14/include/FXRbCommon.h +5 -1
  14. data/ext/fox14/include/FXRbIconSource.h +16 -16
  15. data/ext/fox14/include/FXRbIconSourceVirtuals.h +1 -1
  16. data/ext/fox14/ui_wrap.cpp +2 -3
  17. data/lib/fox14/version.rb +1 -1
  18. data/rdoc-sources/FXDockBar.rb +1 -1
  19. data/rdoc-sources/FXFoldingList.rb +0 -2
  20. data/rdoc-sources/FXIconList.rb +0 -3
  21. data/rdoc-sources/FXList.rb +14 -5
  22. data/rdoc-sources/FXListBox.rb +14 -5
  23. data/rdoc-sources/FXTreeList.rb +4 -6
  24. data/rdoc-sources/FXTreeListBox.rb +4 -6
  25. data/tests/TC_FXAccelTable.rb +1 -1
  26. data/tests/TC_FXApp.rb +1 -1
  27. data/tests/TC_FXArc.rb +1 -1
  28. data/tests/TC_FXBMPIcon.rb +1 -1
  29. data/tests/TC_FXBMPImage.rb +1 -1
  30. data/tests/TC_FXButton.rb +1 -1
  31. data/tests/TC_FXCheckButton.rb +1 -1
  32. data/tests/TC_FXComboBox.rb +1 -1
  33. data/tests/TC_FXDC.rb +1 -1
  34. data/tests/TC_FXDCPrint.rb +1 -1
  35. data/tests/TC_FXDCWindow.rb +1 -1
  36. data/tests/TC_FXDataTarget.rb +1 -1
  37. data/tests/TC_FXDirList.rb +1 -1
  38. data/tests/TC_FXFileAssoc.rb +1 -1
  39. data/tests/TC_FXFileStream.rb +1 -1
  40. data/tests/TC_FXFont.rb +1 -1
  41. data/tests/TC_FXFontDesc.rb +1 -1
  42. data/tests/TC_FXGLGroup.rb +1 -1
  43. data/tests/TC_FXGLShape.rb +1 -1
  44. data/tests/TC_FXGLViewer.rb +1 -1
  45. data/tests/TC_FXGradientBar.rb +1 -1
  46. data/tests/TC_FXHeader.rb +1 -1
  47. data/tests/TC_FXIconDict.rb +1 -1
  48. data/tests/TC_FXIconList.rb +1 -1
  49. data/tests/TC_FXId.rb +1 -1
  50. data/tests/TC_FXImage.rb +1 -1
  51. data/tests/TC_FXLight.rb +1 -1
  52. data/tests/TC_FXList.rb +1 -1
  53. data/tests/TC_FXListBox.rb +1 -1
  54. data/tests/TC_FXMat4f.rb +1 -1
  55. data/tests/TC_FXMaterial.rb +2 -2
  56. data/tests/TC_FXMemoryStream.rb +1 -1
  57. data/tests/TC_FXMenuCommand.rb +1 -1
  58. data/tests/TC_FXPoint.rb +1 -1
  59. data/tests/TC_FXQuatf.rb +1 -1
  60. data/tests/TC_FXRadioButton.rb +1 -1
  61. data/tests/TC_FXRangef.rb +1 -1
  62. data/tests/TC_FXRectangle.rb +1 -1
  63. data/tests/TC_FXRegion.rb +1 -1
  64. data/tests/TC_FXRegistry.rb +1 -1
  65. data/tests/TC_FXScrollArea.rb +1 -1
  66. data/tests/TC_FXScrollWindow.rb +1 -1
  67. data/tests/TC_FXSegment.rb +1 -1
  68. data/tests/TC_FXShell.rb +1 -1
  69. data/tests/TC_FXSize.rb +1 -1
  70. data/tests/TC_FXStream.rb +1 -1
  71. data/tests/TC_FXTable.rb +1 -1
  72. data/tests/TC_FXTableItem.rb +1 -1
  73. data/tests/TC_FXText.rb +2 -2
  74. data/tests/TC_FXTopWindow.rb +1 -1
  75. data/tests/TC_FXTreeList.rb +1 -1
  76. data/tests/TC_FXTreeListBox.rb +1 -1
  77. data/tests/TC_FXUndoList.rb +2 -2
  78. data/tests/TC_FXVec2d.rb +1 -1
  79. data/tests/TC_FXVec2f.rb +1 -1
  80. data/tests/TC_FXVec3d.rb +1 -1
  81. data/tests/TC_FXVec3f.rb +1 -1
  82. data/tests/TC_FXVec4f.rb +1 -1
  83. data/tests/TC_FXViewport.rb +1 -1
  84. data/tests/TC_FXXBMIcon.rb +1 -1
  85. data/tests/TC_FXXBMImage.rb +1 -1
  86. data/tests/TC_FXXPMIcon.rb +1 -1
  87. data/tests/TC_FXXPMImage.rb +1 -1
  88. data/tests/TC_Misc.rb +1 -1
  89. data/tests/TC_downcast.rb +1 -1
  90. data/tests/TS_All.rb +1 -1
  91. data/tests/stress1.rb +1 -1
  92. data/tests/stress2.rb +1 -1
  93. data/tests/stress3.rb +1 -1
  94. data/tests/testcase.rb +1 -1
  95. metadata +2 -2
data/doc/apes02.html CHANGED
@@ -1,6 +1,6 @@
1
1
  <html><head>
2
2
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3
- <title>Object Life Cycles and Garbage Collection</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="implementation.html" title="Appendix&nbsp;E.&nbsp;Implementation"><link rel="previous" 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="d0e4090"></a>Object Life Cycles and Garbage Collection</h2></div></div><div></div></div><p>One of the more difficult issues to deal with was understanding
3
+ <title>Object Life Cycles and Garbage Collection</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="implementation.html" title="Appendix&nbsp;E.&nbsp;Implementation"><link rel="previous" 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="d0e4115"></a>Object Life Cycles and Garbage Collection</h2></div></div><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></td></tr></tab
18
18
  returned from most class instance methods; they are references to already-
19
19
  existing objects. For example, <tt class="methodname">FXStatusBar#statusline
20
20
  </tt> 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="d0e4109"></a>GL Objects</h3></div></div><div></div></div><p>A C++ <tt class="classname">FXGLGroup</tt> object owns all of the <tt class="classname">FXGLObject</tt> objects it "contains". In other words, when that <tt class="classname">FXGLGroup</tt> object is destroyed, it will also destroy all of the <tt class="classname">FXGLObject</tt> 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 <tt class="classname">FXGLGroup</tt>, all of the FXRuby C++ classes derived from <tt class="classname">FXGLObject</tt> have a boolean member variable <i class="structfield"><tt>owned</tt></i> that indicates whether this object is "owned" or not. Until an <tt class="classname">FXGLObject</tt> 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="d0e4134"></a>GL Objects</h3></div></div><div></div></div><p>A C++ <tt class="classname">FXGLGroup</tt> object owns all of the <tt class="classname">FXGLObject</tt> objects it "contains". In other words, when that <tt class="classname">FXGLGroup</tt> object is destroyed, it will also destroy all of the <tt class="classname">FXGLObject</tt> 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 <tt class="classname">FXGLGroup</tt>, all of the FXRuby C++ classes derived from <tt class="classname">FXGLObject</tt> have a boolean member variable <i class="structfield"><tt>owned</tt></i> that indicates whether this object is "owned" or not. Until an <tt class="classname">FXGLObject</tt> 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><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="implementation.html" title="Appendix&nbsp;E.&nbsp;Implementation"><link rel="previous" 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="d0e4143"></a>Virtual Functions</h2></div></div><div></div></div><p>
3
+ <title>Virtual Functions</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="implementation.html" title="Appendix&nbsp;E.&nbsp;Implementation"><link rel="previous" 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="d0e4168"></a>Virtual Functions</h2></div></div><div></div></div><p>
4
4
  One of the design requirements for FXRuby was to ensure that any
5
5
  virtual function call made on a FOX object (from the C++ library
6
6
  layer) is routed to the proper Ruby instance method, even if that
data/doc/book.html CHANGED
@@ -1,3 +1,3 @@
1
1
  <html><head>
2
2
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3
- <title>Developing Graphical User Interfaces with FXRuby</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" 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.4</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; 2001-2005 J. Lyle Johnson</p></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>I. <a href="pt01.html">The Basics</a></dt><dd><dl><dt><a href="goals.html">History and Goals</a></dt><dt>1. <a href="build.html">Building from Source Code</a></dt><dt>2. <a href="gems.html">Installing from Gems</a></dt><dt>3. <a href="tutorial1.html">Hello, World!</a></dt><dd><dl><dt><a href="tutorial1.html#d0e619">First Things First</a></dt><dt><a href="ch03s02.html">Better living through buttons</a></dt><dt><a href="ch03s03.html">Messages</a></dt><dt><a href="ch03s04.html">Adding a tool tip</a></dt><dt><a href="ch03s05.html">Adding an icon</a></dt></dl></dd><dt>4. <a href="clipboardtut.html">Working With the Clipboard</a></dt><dd><dl><dt><a href="clipboardtut.html#d0e1008">Basic Application</a></dt><dt><a href="ch04s02.html">Acquiring the Clipboard</a></dt><dt><a href="ch04s03.html">Sending Data to the Clipboard</a></dt><dt><a href="ch04s04.html">Pasting Data from the Clipboard</a></dt></dl></dd><dt>5. <a href="dragdroptut.html">Drag and Drop</a></dt><dd><dl><dt><a href="dragdroptut.html#d0e1223">Drop Sites</a></dt><dt><a href="ch05s02.html">Drag Sources</a></dt><dt><a href="ch05s03.html">Putting It All Together</a></dt></dl></dd><dt>6. <a href="examples.html">Examples</a></dt><dt>7. <a href="events.html">FXRuby's Message-Target System</a></dt><dt>8. <a href="todo.html">To-do list</a></dt><dt>9. <a href="infosources.html">Other Sources of Information</a></dt><dt>10. <a href="changes.html">Change History</a></dt></dl></dd><dt>II. <a href="pt02.html">Appendices</a></dt><dd><dl><dt>A. <a href="opengl.html">Using OpenGL with FXRuby</a></dt><dt>B. <a href="scintilla.html">Using Scintilla with FXRuby</a></dt><dt>C. <a href="differences.html">Differences between FOX and FXRuby</a></dt><dt>D. <a href="library.html">The FXRuby Standard Library</a></dt><dt>E. <a href="implementation.html">Implementation</a></dt><dd><dl><dt><a href="implementation.html#d0e4071">Code Generation</a></dt><dt><a href="apes02.html">Object Life Cycles and Garbage Collection</a></dt><dd><dl><dt><a href="apes02.html#d0e4109">GL Objects</a></dt></dl></dd><dt><a href="apes03.html">Virtual Functions</a></dt></dl></dd><dt>F. <a href="cvs.html">Getting the Sources from CVS</a></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><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" 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.4</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; 2001-2005 J. Lyle Johnson</p></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>I. <a href="pt01.html">The Basics</a></dt><dd><dl><dt><a href="goals.html">History and Goals</a></dt><dt>1. <a href="build.html">Building from Source Code</a></dt><dt>2. <a href="gems.html">Installing from Gems</a></dt><dt>3. <a href="tutorial1.html">Hello, World!</a></dt><dd><dl><dt><a href="tutorial1.html#d0e619">First Things First</a></dt><dt><a href="ch03s02.html">Better living through buttons</a></dt><dt><a href="ch03s03.html">Messages</a></dt><dt><a href="ch03s04.html">Adding a tool tip</a></dt><dt><a href="ch03s05.html">Adding an icon</a></dt></dl></dd><dt>4. <a href="clipboardtut.html">Working With the Clipboard</a></dt><dd><dl><dt><a href="clipboardtut.html#d0e1008">Basic Application</a></dt><dt><a href="ch04s02.html">Acquiring the Clipboard</a></dt><dt><a href="ch04s03.html">Sending Data to the Clipboard</a></dt><dt><a href="ch04s04.html">Pasting Data from the Clipboard</a></dt></dl></dd><dt>5. <a href="dragdroptut.html">Drag and Drop</a></dt><dd><dl><dt><a href="dragdroptut.html#d0e1223">Drop Sites</a></dt><dt><a href="ch05s02.html">Drag Sources</a></dt><dt><a href="ch05s03.html">Putting It All Together</a></dt></dl></dd><dt>6. <a href="examples.html">Examples</a></dt><dt>7. <a href="events.html">FXRuby's Message-Target System</a></dt><dt>8. <a href="todo.html">To-do list</a></dt><dt>9. <a href="infosources.html">Other Sources of Information</a></dt><dt>10. <a href="changes.html">Change History</a></dt></dl></dd><dt>II. <a href="pt02.html">Appendices</a></dt><dd><dl><dt>A. <a href="opengl.html">Using OpenGL with FXRuby</a></dt><dt>B. <a href="scintilla.html">Using Scintilla with FXRuby</a></dt><dt>C. <a href="differences.html">Differences between FOX and FXRuby</a></dt><dt>D. <a href="library.html">The FXRuby Standard Library</a></dt><dt>E. <a href="implementation.html">Implementation</a></dt><dd><dl><dt><a href="implementation.html#d0e4096">Code Generation</a></dt><dt><a href="apes02.html">Object Life Cycles and Garbage Collection</a></dt><dd><dl><dt><a href="apes02.html#d0e4134">GL Objects</a></dt></dl></dd><dt><a href="apes03.html">Virtual Functions</a></dt></dl></dd><dt>F. <a href="cvs.html">Getting the Sources from CVS</a></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,11 +1,19 @@
1
1
  <html><head>
2
2
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3
- <title>Chapter&nbsp;10.&nbsp;Change History</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" 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="previous" href="infosources.html" title="Chapter&nbsp;9.&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;10.&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;10.&nbsp;Change History</h2></div></div><div></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2403"></a>Changes For Version 1.4.0 (August 19, 2005)</h2></div></div><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
3
+ <title>Chapter&nbsp;10.&nbsp;Change History</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" 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="previous" href="infosources.html" title="Chapter&nbsp;9.&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;10.&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;10.&nbsp;Change History</h2></div></div><div></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2403"></a>Changes For Version 1.4.1 (August 20, 2005)</h2></div></div><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
4
+ FOX 1.4, and as such should be considered an "unstable" release. For a
5
+ history of the changes made during the FOX 1.3 and 1.4 development,
6
+ see the <a href="http://www.fox-toolkit.com/news.html" target="_top">News</a>
7
+ page at the FOX Web site.</p></li><li style="list-style-type: disc"><p>The unit tests (in the <tt class="filename">tests</tt> subdirectory)
8
+ had not been updated to require the <tt class="constant">fox14</tt>
9
+ feature, and were still looking at <tt class="constant">fox12</tt>. This
10
+ has been corrected.</p></li><li style="list-style-type: disc"><p>A number of minor problems were corrected for the Windows build
11
+ 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
12
+ 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="d0e2431"></a>Changes For Version 1.4.0 (August 19, 2005)</h2></div></div><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
4
13
  1.4, and as such should be considered an "unstable" release. For a
5
14
  history of the changes made during the FOX 1.3 and 1.4 development,
6
15
  see the <a href="http://www.fox-toolkit.com/news.html" target="_top">News</a>
7
- page at the FOX Web site.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.4.17 and
8
- 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="d0e2416"></a>Changes For Version 1.2.6 (April 15, 2005)</h2></div></div><div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Some additional problems related to calling the
16
+ 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="d0e2441"></a>Changes For Version 1.2.6 (April 15, 2005)</h2></div></div><div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Some additional problems related to calling the
9
17
  <tt class="methodname">setTableSize</tt> method for an
10
18
  <tt class="classname">FXTable</tt> 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
11
19
  Bug #1597</a>). This problem has been corrected. Thanks to Joel
@@ -53,7 +61,7 @@
53
61
  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
54
62
  Bug #1771</a>). This error has been corrected. Thanks to Jannis
55
63
  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
56
- 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="d0e2552"></a>Changes For Version 1.2.5 (March 1, 2005)</h2></div></div><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
64
+ 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="d0e2577"></a>Changes For Version 1.2.5 (March 1, 2005)</h2></div></div><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
57
65
  collection for table items corrected only one of the problems
58
66
  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
59
67
  Bug #1445</a>; There was still a problem related to the
@@ -83,7 +91,7 @@
83
91
  <tt class="methodname">selectRange</tt> 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
84
92
  Bug #1562</a>). Thanks to Joel VanderWerf for this
85
93
  suggestion.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.13 and
86
- 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="d0e2637"></a>Changes For Version 1.2.4 (February 23, 2005)</h2></div></div><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
94
+ 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="d0e2662"></a>Changes For Version 1.2.4 (February 23, 2005)</h2></div></div><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
87
95
  compile-time error for FXRuby was introduced in some of the Ruby 1.8.2
88
96
  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
89
97
  Bug #1039</a>). One should not see any compile-time errors when
@@ -133,7 +141,7 @@
133
141
  <tt class="classname">FXTable</tt> 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
134
142
  Feature Request #1295</a>). Thanks to Brett Hallett for this
135
143
  suggestion.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.13 and
136
- 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="d0e2740"></a>Changes For Version 1.2.3 (January 22, 2005)</h2></div></div><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
144
+ 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="d0e2765"></a>Changes For Version 1.2.3 (January 22, 2005)</h2></div></div><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
137
145
  radio behavior of radio buttons (i.e. keeping only one radio button
138
146
  selected at a time), some of the example programs were no longer
139
147
  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
@@ -196,7 +204,7 @@
196
204
  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
197
205
  Bug #1325</a>). These have been corrected. Thanks to Karl El-Koura
198
206
  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
199
- 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="d0e2912"></a>Changes For Version 1.2.2 (October 1, 2004)</h2></div></div><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
207
+ 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="d0e2937"></a>Changes For Version 1.2.2 (October 1, 2004)</h2></div></div><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
200
208
  applications based on either FXRuby 1.0 or 1.2, the feature name for
201
209
  FXRuby has been changed from "fox" to "fox12". For most application
202
210
  developers, this means that you will need to modify the source code
@@ -204,7 +212,7 @@
204
212
  changes should be required for legacy applications targeted at FXRuby
205
213
  1.0.</p></li><li style="list-style-type: disc"><p>Made a number of updates to the documentation, to reflect API
206
214
  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
207
- 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="d0e2929"></a>Changes For Version 1.2a2 (July 10, 2004)</h2></div></div><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
215
+ 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="d0e2954"></a>Changes For Version 1.2a2 (July 10, 2004)</h2></div></div><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
208
216
  should be compatible with any FOX library version 1.2; it is not
209
217
  compatible with any previous FOX library versions. As this is an alpha
210
218
  release, users should expect a certain amount of instability, bugs,
@@ -246,7 +254,7 @@
246
254
  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
247
255
  Bug #986180</a>). This has been fixed. Thanks to Bil Bas for
248
256
  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
249
- 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="d0e3038"></a>Changes For Version 1.2a1 (June 28, 2004)</h2></div></div><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
257
+ 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="d0e3063"></a>Changes For Version 1.2a1 (June 28, 2004)</h2></div></div><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
250
258
  should be compatible with any FOX library version 1.2; it is not
251
259
  compatible with any previous FOX library versions. As this is an alpha
252
260
  release, users should expect a certain amount of instability, bugs,
data/doc/cvs.html CHANGED
@@ -19,13 +19,13 @@
19
19
  modified SWIG interface files. I always use the latest development version
20
20
  of <a href="http://www.swig.org" target="_top">SWIG</a>, but any release after,
21
21
  say, SWIG 1.3.15 should work fine. The older SWIG 1.1 releases will
22
- definitely <span class="emphasis"><em>not</em></span> work.</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4252"></a>Checking out the stable version</h2></div></div><div></div></div><p>The stable version of FXRuby is the 1.0.x branch and is compatible
22
+ definitely <span class="emphasis"><em>not</em></span> work.</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4277"></a>Checking out the stable version</h2></div></div><div></div></div><p>The stable version of FXRuby is the 1.0.x branch and is compatible
23
23
  with any of the FOX 1.0.x releases. It is <span class="emphasis"><em>not</em></span>
24
24
  compatible with any other release branches of FOX (e.g. the FOX 1.2.x or
25
25
  1.3.x series of releases).</p><p>To check out the stable version of FXRuby, do the following:</p><div class="orderedlist"><ol type="1"><li><p>Log in to the CVS server by typing:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">cvs -d:pserver:anonymous@rubyforge.org:/var/cvs/fxruby login</pre></td></tr></table><p>When prompted for a password for <span class="emphasis"><em>anonymous</em></span>,
26
26
  simply press the <b class="keycap">Enter</b> key.</p></li><li><p>Check out the stable branch of FXRuby by typing:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">cvs -z3 -d:pserver:anonymous@rubyforge.org:/var/cvs/fxruby co -rrelease10 FXRuby</pre></td></tr></table></li></ol></div><p>At this point, you should be ready to change to the top-level
27
27
  directory and go through the normal build and installation process, as
28
- described in an earlier chapter.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4285"></a>Regenerating wrapper code with SWIG</h2></div></div><div></div></div><p>If you make changes to any of the SWIG interface files (the files
28
+ described in an earlier chapter.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4310"></a>Regenerating wrapper code with SWIG</h2></div></div><div></div></div><p>If you make changes to any of the SWIG interface files (the files
29
29
  ending with a <tt class="filename">.i</tt> extension, in the <tt class="filename">swig-interfaces</tt> subdirectory) you will need
30
30
  to re-run SWIG to regenerate parts of the FXRuby source code:</p><div class="orderedlist"><ol type="1"><li><p>Change directories to the <tt class="filename">swig-interfaces</tt> subdirectory of the
31
31
  FXRuby source tree.</p></li><li><p>Type the following command to create a "bootstrap"
data/doc/differences.html CHANGED
@@ -1,11 +1,11 @@
1
1
  <html><head>
2
2
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3
- <title>Appendix&nbsp;C.&nbsp;Differences between FOX and FXRuby</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt02.html" title="Part&nbsp;II.&nbsp;Appendices"><link rel="previous" 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></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 <tt class="constant">NULL</tt> or empty string argument, just pass <tt class="constant">nil</tt> or an empty string ("").</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3333"></a>Functions that expect arrays of objects</h2></div></div><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 <tt class="classname">Array</tt> objects "know" their lengths. As a result, functions such as <tt class="methodname">FXWindow::acquireClipboard()</tt>, whose C++ declaration looks like this:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">FXbool acquireClipboard(const FXDragType *types, FXuint numTypes);</pre></td></tr></table><p>are called from Ruby code by passing in a single <tt class="classname">Array</tt> argument, e.g.</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">myWindow.acquireClipboard(typesArray)</pre></td></tr></table></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3353"></a>Functions that return values by reference</h2></div></div><div></div></div><p>Many FOX methods take advantage of the C++ language feature of returning values by reference. For example, the <tt class="methodname">getCursorPos()</tt> member function for class <tt class="classname">FXWindow</tt> has the declaration:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">FXint getCursorPos(FXint&amp; x, FXint&amp; y, FXint&amp; buttons) const;</pre></td></tr></table><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><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">FXint x, y;
3
+ <title>Appendix&nbsp;C.&nbsp;Differences between FOX and FXRuby</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt02.html" title="Part&nbsp;II.&nbsp;Appendices"><link rel="previous" 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></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 <tt class="constant">NULL</tt> or empty string argument, just pass <tt class="constant">nil</tt> or an empty string ("").</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3358"></a>Functions that expect arrays of objects</h2></div></div><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 <tt class="classname">Array</tt> objects "know" their lengths. As a result, functions such as <tt class="methodname">FXWindow::acquireClipboard()</tt>, whose C++ declaration looks like this:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">FXbool acquireClipboard(const FXDragType *types, FXuint numTypes);</pre></td></tr></table><p>are called from Ruby code by passing in a single <tt class="classname">Array</tt> argument, e.g.</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">myWindow.acquireClipboard(typesArray)</pre></td></tr></table></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3378"></a>Functions that return values by reference</h2></div></div><div></div></div><p>Many FOX methods take advantage of the C++ language feature of returning values by reference. For example, the <tt class="methodname">getCursorPos()</tt> member function for class <tt class="classname">FXWindow</tt> has the declaration:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">FXint getCursorPos(FXint&amp; x, FXint&amp; y, FXint&amp; buttons) const;</pre></td></tr></table><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><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">FXint x, y;
4
4
  FXuint buttons;
5
5
 
6
6
  if (window-&gt;getCursorPosition(x, y, buttons))
7
- fprintf(stderr, "Current position is (%d, %d)\n", x, y);</pre></td></tr></table><p>Since this idiom doesn't translate well to Ruby, some functions' interfaces have been slightly modified. For example, the FXRuby implementation of <tt class="methodname">getCursorPos()</tt> returns the three values as an <tt class="classname">Array</tt>, e.g.:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">x, y, buttons = aWindow.getCursorPos()</pre></td></tr></table><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><tt class="methodname">FXDial#range</tt></td><td>Returns a <tt class="classname">Range</tt> instance.</td></tr><tr><td><tt class="methodname">FXDial#range=(aRange)</tt></td><td>Accepts a <tt class="classname">Range</tt> instance as its input.</td></tr><tr><td><tt class="methodname">FXFontDialog#fontSelection</tt></td><td>Returns the <tt class="classname">FXFontDesc</tt> instance</td></tr><tr><td><tt class="methodname">FXFontSelector#fontSelection</tt></td><td>Returns the <tt class="classname">FXFontDesc</tt> instance</td></tr><tr><td><tt class="methodname">FXGLObject#bounds(range)</tt></td><td>Takes an <tt class="classname">FXRange</tt> instance as its input and returns a (possibly modified) <tt class="classname">FXRange</tt> instance.</td></tr><tr><td><tt class="methodname">FXGLViewer#eyeToScreen(eye)</tt></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><tt class="methodname">FXGLViewer#getBoreVector(sx, sy)</tt></td><td>Returns the endpoint and direction vector as an array of arrays [point, dir]</td></tr><tr><td><tt class="methodname">FXGLViewer#light</tt></td><td>Returns a <tt class="classname">FXLight</tt> instance</td></tr><tr><td><tt class="methodname">FXGLViewer#viewport</tt></td><td>Returns an <tt class="classname">FXViewport</tt> instance.</td></tr><tr><td><tt class="methodname">FXPrinterDialog#printer</tt></td><td>Returns the <tt class="classname">FXPrinter</tt> instance</td></tr><tr><td><tt class="methodname">FXScrollArea#position</tt></td><td>Returns the position as an array of integers [x, y]</td></tr><tr><td><tt class="methodname">FXSlider#range</tt></td><td>Returns a <tt class="classname">Range</tt> instance.</td></tr><tr><td><tt class="methodname">FXSlider#range=(aRange)</tt></td><td>Accepts a <tt class="classname">Range</tt> instance as its input.</td></tr><tr><td><tt class="methodname">FXSpinner#range</tt></td><td>Returns a <tt class="classname">Range</tt> instance.</td></tr><tr><td><tt class="methodname">FXSpinner#range=(aRange)</tt></td><td>Accepts a <tt class="classname">Range</tt> instance as its input.</td></tr><tr><td><tt class="methodname">FXText#appendText(text, notify=false)</tt></td><td>Append text to the end of the buffer.</td></tr><tr><td><tt class="methodname">FXText#appendStyledText(text, style=0, notify=false)</tt></td><td>Append styled text to the end of the buffer.</td></tr><tr><td><tt class="methodname">FXText#extractText(pos, n)</tt></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><tt class="methodname">FXText#extractStyle(pos, n)</tt></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><tt class="methodname">FXText#insertText(pos, text, notify=false)</tt></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><tt class="methodname">FXText#insertStyledText(pos, text, style=0, notify=false)</tt></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><tt class="methodname">FXText#replaceText(pos, m, text, notify=false)</tt></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><tt class="methodname">FXText#replaceStyledText(pos, m, text, style=0, notify=false)</tt></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><tt class="methodname">FXText#setDelimiters(delimiters)</tt></td><td>Change delimiters of words (<span class="emphasis"><em>delimiters</em></span> is a string).</td></tr><tr><td><tt class="methodname">FXText#getDelimiters()</tt></td><td>Return word delimiters as a string.</td></tr><tr><td><tt class="methodname">FXWindow#cursorPosition</tt></td><td>Returns an array of integers [x, y, buttons]</td></tr><tr><td><tt class="methodname">FXWindow#translateCoordinatesFrom(window, x, y)</tt></td><td>Returns the translated coordinates as an array [x, y]</td></tr><tr><td><tt class="methodname">FXWindow#translateCoordinatesTo(window, x, y)</tt></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="d0e3643"></a>Iterators</h2></div></div><div></div></div><p>Several classes have been extended with an <tt class="methodname">each</tt> method to provide Ruby-style iterators. These classes include <tt class="classname">FXComboBox</tt>, <tt class="classname">FXGLGroup</tt>, <tt class="classname">FXHeader</tt>, <tt class="classname">FXIconList</tt>, <tt class="classname">FXList</tt>, <tt class="classname">FXListBox</tt>, <tt class="classname">FXTreeItem</tt>, <tt class="classname">FXTreeList</tt> and <tt class="classname">FXTreeListBox</tt>. These classes also mix-in Ruby's <tt class="classname">Enumerable</tt> 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 <tt class="classname">FXList</tt> instance yields <tt class="classname">FXListItem</tt> parameters:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">aList.each { |aListItem|
7
+ fprintf(stderr, "Current position is (%d, %d)\n", x, y);</pre></td></tr></table><p>Since this idiom doesn't translate well to Ruby, some functions' interfaces have been slightly modified. For example, the FXRuby implementation of <tt class="methodname">getCursorPos()</tt> returns the three values as an <tt class="classname">Array</tt>, e.g.:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">x, y, buttons = aWindow.getCursorPos()</pre></td></tr></table><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><tt class="methodname">FXDial#range</tt></td><td>Returns a <tt class="classname">Range</tt> instance.</td></tr><tr><td><tt class="methodname">FXDial#range=(aRange)</tt></td><td>Accepts a <tt class="classname">Range</tt> instance as its input.</td></tr><tr><td><tt class="methodname">FXFontDialog#fontSelection</tt></td><td>Returns the <tt class="classname">FXFontDesc</tt> instance</td></tr><tr><td><tt class="methodname">FXFontSelector#fontSelection</tt></td><td>Returns the <tt class="classname">FXFontDesc</tt> instance</td></tr><tr><td><tt class="methodname">FXGLObject#bounds(range)</tt></td><td>Takes an <tt class="classname">FXRange</tt> instance as its input and returns a (possibly modified) <tt class="classname">FXRange</tt> instance.</td></tr><tr><td><tt class="methodname">FXGLViewer#eyeToScreen(eye)</tt></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><tt class="methodname">FXGLViewer#getBoreVector(sx, sy)</tt></td><td>Returns the endpoint and direction vector as an array of arrays [point, dir]</td></tr><tr><td><tt class="methodname">FXGLViewer#light</tt></td><td>Returns a <tt class="classname">FXLight</tt> instance</td></tr><tr><td><tt class="methodname">FXGLViewer#viewport</tt></td><td>Returns an <tt class="classname">FXViewport</tt> instance.</td></tr><tr><td><tt class="methodname">FXPrinterDialog#printer</tt></td><td>Returns the <tt class="classname">FXPrinter</tt> instance</td></tr><tr><td><tt class="methodname">FXScrollArea#position</tt></td><td>Returns the position as an array of integers [x, y]</td></tr><tr><td><tt class="methodname">FXSlider#range</tt></td><td>Returns a <tt class="classname">Range</tt> instance.</td></tr><tr><td><tt class="methodname">FXSlider#range=(aRange)</tt></td><td>Accepts a <tt class="classname">Range</tt> instance as its input.</td></tr><tr><td><tt class="methodname">FXSpinner#range</tt></td><td>Returns a <tt class="classname">Range</tt> instance.</td></tr><tr><td><tt class="methodname">FXSpinner#range=(aRange)</tt></td><td>Accepts a <tt class="classname">Range</tt> instance as its input.</td></tr><tr><td><tt class="methodname">FXText#appendText(text, notify=false)</tt></td><td>Append text to the end of the buffer.</td></tr><tr><td><tt class="methodname">FXText#appendStyledText(text, style=0, notify=false)</tt></td><td>Append styled text to the end of the buffer.</td></tr><tr><td><tt class="methodname">FXText#extractText(pos, n)</tt></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><tt class="methodname">FXText#extractStyle(pos, n)</tt></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><tt class="methodname">FXText#insertText(pos, text, notify=false)</tt></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><tt class="methodname">FXText#insertStyledText(pos, text, style=0, notify=false)</tt></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><tt class="methodname">FXText#replaceText(pos, m, text, notify=false)</tt></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><tt class="methodname">FXText#replaceStyledText(pos, m, text, style=0, notify=false)</tt></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><tt class="methodname">FXText#setDelimiters(delimiters)</tt></td><td>Change delimiters of words (<span class="emphasis"><em>delimiters</em></span> is a string).</td></tr><tr><td><tt class="methodname">FXText#getDelimiters()</tt></td><td>Return word delimiters as a string.</td></tr><tr><td><tt class="methodname">FXWindow#cursorPosition</tt></td><td>Returns an array of integers [x, y, buttons]</td></tr><tr><td><tt class="methodname">FXWindow#translateCoordinatesFrom(window, x, y)</tt></td><td>Returns the translated coordinates as an array [x, y]</td></tr><tr><td><tt class="methodname">FXWindow#translateCoordinatesTo(window, x, y)</tt></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="d0e3668"></a>Iterators</h2></div></div><div></div></div><p>Several classes have been extended with an <tt class="methodname">each</tt> method to provide Ruby-style iterators. These classes include <tt class="classname">FXComboBox</tt>, <tt class="classname">FXGLGroup</tt>, <tt class="classname">FXHeader</tt>, <tt class="classname">FXIconList</tt>, <tt class="classname">FXList</tt>, <tt class="classname">FXListBox</tt>, <tt class="classname">FXTreeItem</tt>, <tt class="classname">FXTreeList</tt> and <tt class="classname">FXTreeListBox</tt>. These classes also mix-in Ruby's <tt class="classname">Enumerable</tt> 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 <tt class="classname">FXList</tt> instance yields <tt class="classname">FXListItem</tt> parameters:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">aList.each { |aListItem|
8
8
  puts "text for this item = #{aListItem.getText()}"
9
9
  }</pre></td></tr></table><p>whereas iterating over an <tt class="classname">FXComboBox</tt> instance yields two parameters, the item text (a string) and the item data:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">aComboBox.each { |itemText, itemData|
10
10
  puts "text for this item = #{itemText}"
11
- }</pre></td></tr></table><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><tt class="classname">FXComboBox</tt></td><td>the item text (a string) and user data</td></tr><tr><td><tt class="classname">FXGLGroup</tt></td><td>an <tt class="classname">FXGLObject</tt> instance</td></tr><tr><td><tt class="classname">FXHeader</tt></td><td>an <tt class="classname">FXHeaderItem</tt> instance</td></tr><tr><td><tt class="classname">FXIconList</tt></td><td>an <tt class="classname">FXIconItem</tt> instance</td></tr><tr><td><tt class="classname">FXList</tt></td><td>an <tt class="classname">FXListItem</tt> instance</td></tr><tr><td><tt class="classname">FXListBox</tt></td><td>the item text (a string), icon (an <tt class="classname">FXIcon</tt> instance) and user data</td></tr><tr><td><tt class="classname">FXTreeItem</tt></td><td>an <tt class="classname">FXTreeItem</tt> instance</td></tr><tr><td><tt class="classname">FXTreeList</tt></td><td>an <tt class="classname">FXTreeItem</tt> instance</td></tr><tr><td><tt class="classname">FXTreeListBox</tt></td><td>an <tt class="classname">FXTreeItem</tt> 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="d0e3787"></a>Attribute Accessors</h2></div></div><div></div></div><p>FOX strictly handles access to all object attributes through member functions, e.g. <tt class="methodname">setBackgroundColor</tt> and <tt class="methodname">getBackgroundColor</tt> or <tt class="methodname">setText</tt> and <tt class="methodname">getText</tt>. 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, <tt class="methodname">setBackgroundColor</tt> and <tt class="methodname">getBackgroundColor</tt> are aliased to <tt class="methodname">backgroundColor=</tt> and <tt class="methodname">backgroundColor</tt>, respectively.</p><p>In many cases these aliases allow you to write more compact and legible code. For example, consider this code snippet:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">aLabel.setText(aLabel.getText() + " (modified)")</pre></td></tr></table><p>Now consider a different code snippet, using the aliased accessor method names:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">aLabel.text += " (modified)"</pre></td></tr></table><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="d0e3826"></a>Message Passing</h2></div></div><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 <tt class="methodname">initialize</tt> method using the <tt class="methodname">FXMAPFUNC()</tt>, <tt class="methodname">FXMAPTYPE()</tt>, <tt class="methodname">FXMAPTYPES()</tt> or <tt class="methodname">FXMAPFUNCS()</tt> 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 <tt class="constant">SEL_PAINT</tt> messages pass an <tt class="classname">FXEvent</tt> object through this argument to give you some information about the size of the exposed rectangle. On the other hand, a <tt class="constant">SEL_COMMAND</tt> message from an <tt class="classname">FXHeader</tt> 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 <tt class="constant">SEL_COMMAND</tt> message from an <tt class="classname">FXColorWell</tt> 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 <tt class="methodname">getRGBA()</tt> member function to retrieve its color. Similarly, if you get a <tt class="constant">SEL_COMMAND</tt> message from a tree list, call its <tt class="methodname">getCurrentItem()</tt> 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="d0e3875"></a>Catching Operating System Signals</h2></div></div><div></div></div><p>The <tt class="methodname">FXApp#addSignal</tt> and <tt class="methodname">FXApp#removeSignal</tt> 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 <tt class="methodname">Process.kill</tt> module method). For examples of how to use this, see the <tt class="filename">datatarget.rb</tt> or <tt class="filename">imageviewer.rb</tt> example programs.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3895"></a>Support for Multithreaded Applications</h2></div></div><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 <tt class="filename">groupbox.rb</tt> 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 <tt class="classname">FXApp</tt> object's <i class="structfield"><tt>sleepTime</tt></i> attribute. The default value for <i class="structfield"><tt>FXApp#sleepTime</tt></i> is 100 milliseconds. You can also disable the threads support completely by calling <tt class="methodname">FXApp#threadsEnabled=false</tt> (and subsequently re-enable it with <tt class="methodname">FXApp#threadsEnabled=true</tt>).</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3920"></a>Debugging Tricks</h2></div></div><div></div></div><p>As a debugging tool, you can optionally catch exceptions raised in message handlers. To turn on this feature, call the <tt class="methodname">setIgnoreExceptions(true)</tt> 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>
11
+ }</pre></td></tr></table><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><tt class="classname">FXComboBox</tt></td><td>the item text (a string) and user data</td></tr><tr><td><tt class="classname">FXGLGroup</tt></td><td>an <tt class="classname">FXGLObject</tt> instance</td></tr><tr><td><tt class="classname">FXHeader</tt></td><td>an <tt class="classname">FXHeaderItem</tt> instance</td></tr><tr><td><tt class="classname">FXIconList</tt></td><td>an <tt class="classname">FXIconItem</tt> instance</td></tr><tr><td><tt class="classname">FXList</tt></td><td>an <tt class="classname">FXListItem</tt> instance</td></tr><tr><td><tt class="classname">FXListBox</tt></td><td>the item text (a string), icon (an <tt class="classname">FXIcon</tt> instance) and user data</td></tr><tr><td><tt class="classname">FXTreeItem</tt></td><td>an <tt class="classname">FXTreeItem</tt> instance</td></tr><tr><td><tt class="classname">FXTreeList</tt></td><td>an <tt class="classname">FXTreeItem</tt> instance</td></tr><tr><td><tt class="classname">FXTreeListBox</tt></td><td>an <tt class="classname">FXTreeItem</tt> 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="d0e3812"></a>Attribute Accessors</h2></div></div><div></div></div><p>FOX strictly handles access to all object attributes through member functions, e.g. <tt class="methodname">setBackgroundColor</tt> and <tt class="methodname">getBackgroundColor</tt> or <tt class="methodname">setText</tt> and <tt class="methodname">getText</tt>. 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, <tt class="methodname">setBackgroundColor</tt> and <tt class="methodname">getBackgroundColor</tt> are aliased to <tt class="methodname">backgroundColor=</tt> and <tt class="methodname">backgroundColor</tt>, respectively.</p><p>In many cases these aliases allow you to write more compact and legible code. For example, consider this code snippet:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">aLabel.setText(aLabel.getText() + " (modified)")</pre></td></tr></table><p>Now consider a different code snippet, using the aliased accessor method names:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">aLabel.text += " (modified)"</pre></td></tr></table><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="d0e3851"></a>Message Passing</h2></div></div><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 <tt class="methodname">initialize</tt> method using the <tt class="methodname">FXMAPFUNC()</tt>, <tt class="methodname">FXMAPTYPE()</tt>, <tt class="methodname">FXMAPTYPES()</tt> or <tt class="methodname">FXMAPFUNCS()</tt> 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 <tt class="constant">SEL_PAINT</tt> messages pass an <tt class="classname">FXEvent</tt> object through this argument to give you some information about the size of the exposed rectangle. On the other hand, a <tt class="constant">SEL_COMMAND</tt> message from an <tt class="classname">FXHeader</tt> 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 <tt class="constant">SEL_COMMAND</tt> message from an <tt class="classname">FXColorWell</tt> 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 <tt class="methodname">getRGBA()</tt> member function to retrieve its color. Similarly, if you get a <tt class="constant">SEL_COMMAND</tt> message from a tree list, call its <tt class="methodname">getCurrentItem()</tt> 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="d0e3900"></a>Catching Operating System Signals</h2></div></div><div></div></div><p>The <tt class="methodname">FXApp#addSignal</tt> and <tt class="methodname">FXApp#removeSignal</tt> 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 <tt class="methodname">Process.kill</tt> module method). For examples of how to use this, see the <tt class="filename">datatarget.rb</tt> or <tt class="filename">imageviewer.rb</tt> example programs.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3920"></a>Support for Multithreaded Applications</h2></div></div><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 <tt class="filename">groupbox.rb</tt> 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 <tt class="classname">FXApp</tt> object's <i class="structfield"><tt>sleepTime</tt></i> attribute. The default value for <i class="structfield"><tt>FXApp#sleepTime</tt></i> is 100 milliseconds. You can also disable the threads support completely by calling <tt class="methodname">FXApp#threadsEnabled=false</tt> (and subsequently re-enable it with <tt class="methodname">FXApp#threadsEnabled=true</tt>).</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3945"></a>Debugging Tricks</h2></div></div><div></div></div><p>As a debugging tool, you can optionally catch exceptions raised in message handlers. To turn on this feature, call the <tt class="methodname">setIgnoreExceptions(true)</tt> 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>
@@ -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><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt02.html" title="Part&nbsp;II.&nbsp;Appendices"><link rel="previous" 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></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="implementation.html#d0e4071">Code Generation</a></dt><dt><a href="apes02.html">Object Life Cycles and Garbage Collection</a></dt><dd><dl><dt><a href="apes02.html#d0e4109">GL Objects</a></dt></dl></dd><dt><a href="apes03.html">Virtual Functions</a></dt></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4071"></a>Code Generation</h2></div></div><div></div></div><p>The development and maintenance of FXRuby would be almost impossible
3
+ <title>Appendix&nbsp;E.&nbsp;Implementation</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt02.html" title="Part&nbsp;II.&nbsp;Appendices"><link rel="previous" 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></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="implementation.html#d0e4096">Code Generation</a></dt><dt><a href="apes02.html">Object Life Cycles and Garbage Collection</a></dt><dd><dl><dt><a href="apes02.html#d0e4134">GL Objects</a></dt></dl></dd><dt><a href="apes03.html">Virtual Functions</a></dt></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4096"></a>Code Generation</h2></div></div><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><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt02.html" title="Part&nbsp;II.&nbsp;Appendices"><link rel="previous" 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></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="d0e3933"></a>Undoable Commands</h2></div></div><div></div></div><p>The <tt class="filename">fox/undolist.rb</tt> file provides the <tt class="classname">FXCommand</tt> and <tt class="classname">FXUndoList</tt> classes. These serve the same purpose as the <tt class="classname">FXCommand</tt> and <tt class="classname">FXUndoList</tt> 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 <tt class="filename">fox/undolist.rb</tt>.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3958"></a>Aliases</h2></div></div><div></div></div><p>The <tt class="filename">fox/aliases.rb</tt> implements most of the accessor-style aliases for methods. This file is loaded automatically when you </p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">require 'fox'</pre></td></tr></table><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="d0e3969"></a>Color Names</h2></div></div><div></div></div><p>The <tt class="filename">fox/colors.rb</tt> file, contributed by Jeff
3
+ <title>Appendix&nbsp;D.&nbsp;The FXRuby Standard Library</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt02.html" title="Part&nbsp;II.&nbsp;Appendices"><link rel="previous" 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></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="d0e3958"></a>Undoable Commands</h2></div></div><div></div></div><p>The <tt class="filename">fox/undolist.rb</tt> file provides the <tt class="classname">FXCommand</tt> and <tt class="classname">FXUndoList</tt> classes. These serve the same purpose as the <tt class="classname">FXCommand</tt> and <tt class="classname">FXUndoList</tt> 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 <tt class="filename">fox/undolist.rb</tt>.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3983"></a>Aliases</h2></div></div><div></div></div><p>The <tt class="filename">fox/aliases.rb</tt> implements most of the accessor-style aliases for methods. This file is loaded automatically when you </p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">require 'fox'</pre></td></tr></table><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="d0e3994"></a>Color Names</h2></div></div><div></div></div><p>The <tt class="filename">fox/colors.rb</tt> 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><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><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></td></tr></table></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3979"></a>OpenGL Shapes</h2></div></div><div></div></div><p>The <tt class="filename">fox/glshapes.rb</tt> library provides Ruby
8
+ dc.background = FXColor::MidnightBlue # instead of FXRGB( 25, 25, 112)</pre></td></tr></table></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4004"></a>OpenGL Shapes</h2></div></div><div></div></div><p>The <tt class="filename">fox/glshapes.rb</tt> library provides Ruby
9
9
  implementations of a number of basic 3-D shapes (all derived from the
10
10
  built-in <tt class="classname">FXGLShape</tt> class) that can be used with
11
11
  the <tt class="classname">FXGLViewer</tt>. Several of these shapes are used
12
12
  in the <tt class="filename">glviewer.rb</tt> 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="d0e3996"></a>Iterators</h2></div></div><div></div></div><p>The <tt class="filename">fox/iterators.rb</tt> 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="d0e4021"></a>Iterators</h2></div></div><div></div></div><p>The <tt class="filename">fox/iterators.rb</tt> library just adds an
16
16
  <tt class="methodname">each</tt> instance method for the <tt class="classname">
17
17
  FXComboBox</tt>, <tt class="classname">FXGLGroup</tt>, <tt class="classname">
18
18
  FXHeader</tt>, <tt class="classname">FXIconList</tt>, <tt class="classname">
@@ -21,10 +21,10 @@ dc.background = FXColor::MidnightBlue # instead of FXRGB( 25, 25, 112)</pre><
21
21
  FXTreeList</tt> and <tt class="classname">FXTreeListBox</tt> classes,
22
22
  so that you can iterate over their members in a Ruby-friendly way. It
23
23
  also mixes the <tt class="classname">Enumerable</tt> 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="d0e4040"></a>Key Codes</h2></div></div><div></div></div><p>The <tt class="filename">fox/keys.rb</tt> 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="d0e4065"></a>Key Codes</h2></div></div><div></div></div><p>The <tt class="filename">fox/keys.rb</tt> library file defines all of the
25
25
  key codes (e.g. <tt class="constant">KEY_space</tt>) that might show up in the
26
26
  code field of an <tt class="classname">FXEvent</tt> instance. This file is
27
27
  loaded automatically when you
28
28
  </p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">require 'fox'</pre></td></tr></table><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="d0e4057"></a>Calendar Widget</h2></div></div><div></div></div><p>The <tt class="filename">fox/calendar.rb</tt> library file provides the <tt class="classname">FXCalendar</tt> 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="d0e4082"></a>Calendar Widget</h2></div></div><div></div></div><p>The <tt class="filename">fox/calendar.rb</tt> library file provides the <tt class="classname">FXCalendar</tt> 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>
data/doc/opengl.html CHANGED
@@ -5,10 +5,10 @@
5
5
  widgets, and FXRuby in turn provides interfaces to those classes. By
6
6
  combining FXRuby with the OpenGL interface for Ruby (described below) you
7
7
  can develop very powerful 3-D graphics applications. This chapter gives
8
- you the information you'll need to get started.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3076"></a>What is OpenGL?</h2></div></div><div></div></div><p>OpenGL is a platform-independent API for 2D and 3D graphics. The
8
+ you the information you'll need to get started.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3101"></a>What is OpenGL?</h2></div></div><div></div></div><p>OpenGL is a platform-independent API for 2D and 3D graphics. The
9
9
  home page is <a href="http://www.opengl.org" target="_top">http://www.opengl.org</a>. Because it's a
10
10
  fairly open standard, highly optimized OpenGL drivers are available for
11
- most operating systems (including Windows and Linux).</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3084"></a>OpenGL Extensions for Ruby</h2></div></div><div></div></div><p>This extension module, developed by Yoshiyuki Kusano, provides
11
+ most operating systems (including Windows and Linux).</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3109"></a>OpenGL Extensions for Ruby</h2></div></div><div></div></div><p>This extension module, developed by Yoshiyuki Kusano, provides
12
12
  interfaces to not only the basic OpenGL API, but also the GLU and GLUT
13
13
  APIs. As of this writing, the currently released version is 0.32d and is
14
14
  available for download from <a href="http://www2.giganet.net/~yoshi/rbogl-0.32b.tgz" target="_top">http://www2.giganet.net/~yoshi/rbogl-0.32d.tgz</a>.
@@ -25,7 +25,7 @@
25
25
  extensions by typing:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">$ <b class="command">make site-install</b></pre></td></tr></table><p>Please note that I'm not the maintainer of this particular Ruby
26
26
  extension, so I can't really accept bug fixes for it. But if you're having
27
27
  trouble integrating Ruby/OpenGL with FXRuby, let me know and we'll see
28
- what we can do.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3139"></a>The FXGLVisual Class</h2></div></div><div></div></div><p>An <tt class="classname">FXGLVisual</tt> object describes the
28
+ what we can do.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3164"></a>The FXGLVisual Class</h2></div></div><div></div></div><p>An <tt class="classname">FXGLVisual</tt> object describes the
29
29
  capabilities of an <tt class="classname">FXGLCanvas</tt> or
30
30
  <tt class="classname">FXGLViewer</tt> window. Typically, an X server supports
31
31
  many different visuals with varying capabilities, but the ones with
@@ -58,13 +58,13 @@ end</pre></td></tr></table><p>Some <tt class="classname">FXGLVisual</tt> object
58
58
  separate <tt class="classname">FXGLVisual</tt> object for each window. For
59
59
  most applications, you can just construct a single
60
60
  <tt class="classname">FXGLVisual</tt> object that's shared among all the
61
- OpenGL windows.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3198"></a>The FXGLCanvas Class</h2></div></div><div></div></div><p>The <tt class="classname">FXGLCanvas</tt> widget provides a very simple
61
+ OpenGL windows.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3223"></a>The FXGLCanvas Class</h2></div></div><div></div></div><p>The <tt class="classname">FXGLCanvas</tt> widget provides a very simple
62
62
  OpenGL-capable window with minimal functionality. To construct an
63
63
  <tt class="classname">FXGLCanvas</tt>, call
64
64
  <tt class="methodname">FXGLCanvas.new</tt>:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">glCanvas = FXGLCanvas.new(parent, vis)</pre></td></tr></table><p>The first argument to <tt class="methodname">FXGLCanvas.new</tt> is the
65
65
  parent (container) widget and the second argument is the
66
66
  <tt class="classname">FXGLVisual</tt> that should be used for this
67
- window.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3222"></a>OpenGL objects and the FXGLViewer</h2></div></div><div></div></div><p>The <tt class="classname">FXGLViewer</tt> widget provides a higher-level
67
+ window.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3247"></a>OpenGL objects and the FXGLViewer</h2></div></div><div></div></div><p>The <tt class="classname">FXGLViewer</tt> widget provides a higher-level
68
68
  OpenGL-capable window with a lot of built-in functionality. To construct
69
69
  an <tt class="classname">FXGLViewer</tt>, call
70
70
  <tt class="methodname">FXGLViewer.new</tt>:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">glViewer = FXGLViewer.new(parent, vis)</pre></td></tr></table><p>The first argument to <tt class="methodname">FXGLViewer.new</tt> is the
data/doc/pt02.html CHANGED
@@ -1,3 +1,3 @@
1
1
  <html><head>
2
2
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3
- <title>Part&nbsp;II.&nbsp;Appendices</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="previous" href="changes.html" title="Chapter&nbsp;10.&nbsp;Change History"><link rel="next" href="opengl.html" title="Appendix&nbsp;A.&nbsp;Using OpenGL with FXRuby"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part&nbsp;II.&nbsp;Appendices</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="changes.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="opengl.html">Next</a></td></tr></table><hr></div><div class="part" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="d0e3061"></a>Appendices</h1></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>A. <a href="opengl.html">Using OpenGL with FXRuby</a></dt><dt>B. <a href="scintilla.html">Using Scintilla with FXRuby</a></dt><dt>C. <a href="differences.html">Differences between FOX and FXRuby</a></dt><dt>D. <a href="library.html">The FXRuby Standard Library</a></dt><dt>E. <a href="implementation.html">Implementation</a></dt><dd><dl><dt><a href="implementation.html#d0e4071">Code Generation</a></dt><dt><a href="apes02.html">Object Life Cycles and Garbage Collection</a></dt><dd><dl><dt><a href="apes02.html#d0e4109">GL Objects</a></dt></dl></dd><dt><a href="apes03.html">Virtual Functions</a></dt></dl></dd><dt>F. <a href="cvs.html">Getting the Sources from CVS</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="changes.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="book.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="opengl.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;10.&nbsp;Change History&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;A.&nbsp;Using OpenGL with FXRuby</td></tr></table></div></body></html>
3
+ <title>Part&nbsp;II.&nbsp;Appendices</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="previous" href="changes.html" title="Chapter&nbsp;10.&nbsp;Change History"><link rel="next" href="opengl.html" title="Appendix&nbsp;A.&nbsp;Using OpenGL with FXRuby"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part&nbsp;II.&nbsp;Appendices</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="changes.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="opengl.html">Next</a></td></tr></table><hr></div><div class="part" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="d0e3086"></a>Appendices</h1></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>A. <a href="opengl.html">Using OpenGL with FXRuby</a></dt><dt>B. <a href="scintilla.html">Using Scintilla with FXRuby</a></dt><dt>C. <a href="differences.html">Differences between FOX and FXRuby</a></dt><dt>D. <a href="library.html">The FXRuby Standard Library</a></dt><dt>E. <a href="implementation.html">Implementation</a></dt><dd><dl><dt><a href="implementation.html#d0e4096">Code Generation</a></dt><dt><a href="apes02.html">Object Life Cycles and Garbage Collection</a></dt><dd><dl><dt><a href="apes02.html#d0e4134">GL Objects</a></dt></dl></dd><dt><a href="apes03.html">Virtual Functions</a></dt></dl></dd><dt>F. <a href="cvs.html">Getting the Sources from CVS</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="changes.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="book.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="opengl.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;10.&nbsp;Change History&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;A.&nbsp;Using OpenGL with FXRuby</td></tr></table></div></body></html>
data/doc/scintilla.html CHANGED
@@ -1,12 +1,12 @@
1
1
  <html><head>
2
2
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3
- <title>Appendix&nbsp;B.&nbsp;Using Scintilla with FXRuby</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt02.html" title="Part&nbsp;II.&nbsp;Appendices"><link rel="previous" href="opengl.html" title="Appendix&nbsp;A.&nbsp;Using OpenGL with FXRuby"><link rel="next" href="differences.html" title="Appendix&nbsp;C.&nbsp;Differences between FOX and FXRuby"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix&nbsp;B.&nbsp;Using Scintilla with FXRuby</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="opengl.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="differences.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="scintilla"></a>Appendix&nbsp;B.&nbsp;Using Scintilla with FXRuby</h2></div></div><div></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3249"></a>What is Scintilla?</h2></div></div><div></div></div><p><a href="http://www.scintilla.org" target="_top">Scintilla</a> is a free
3
+ <title>Appendix&nbsp;B.&nbsp;Using Scintilla with FXRuby</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt02.html" title="Part&nbsp;II.&nbsp;Appendices"><link rel="previous" href="opengl.html" title="Appendix&nbsp;A.&nbsp;Using OpenGL with FXRuby"><link rel="next" href="differences.html" title="Appendix&nbsp;C.&nbsp;Differences between FOX and FXRuby"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix&nbsp;B.&nbsp;Using Scintilla with FXRuby</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="opengl.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="differences.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="scintilla"></a>Appendix&nbsp;B.&nbsp;Using Scintilla with FXRuby</h2></div></div><div></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3274"></a>What is Scintilla?</h2></div></div><div></div></div><p><a href="http://www.scintilla.org" target="_top">Scintilla</a> is a free
4
4
  source code editing component developed by Neil Hodgson for the Win32 and
5
- GTK+ platforms.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3256"></a>What is FXScintilla?</h2></div></div><div></div></div><p><a href="http://savannah.gnu.org/projects/fxscintilla" target="_top">FXScintilla </a> is
5
+ GTK+ platforms.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3281"></a>What is FXScintilla?</h2></div></div><div></div></div><p><a href="http://savannah.gnu.org/projects/fxscintilla" target="_top">FXScintilla </a> is
6
6
  a FOX widget that wraps around the Scintilla component, or, if you wish,
7
7
  the FOX "port" of Scintilla. It is being developed by Gilles Filippini,
8
8
  and as of this writing the latest release is available for download from
9
- <a href="http://savannah.nongnu.org/download/fxscintilla/fxscintilla-1.63.tar.gz" target="_top">http://savannah.nongnu.org/download/fxscintilla/fxscintilla-1.63.tar.gz</a>.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3266"></a>Compiling FXScintilla</h2></div></div><div></div></div><p>The FXScintilla distribution contains everything you need to build
9
+ <a href="http://savannah.nongnu.org/download/fxscintilla/fxscintilla-1.63.tar.gz" target="_top">http://savannah.nongnu.org/download/fxscintilla/fxscintilla-1.63.tar.gz</a>.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3291"></a>Compiling FXScintilla</h2></div></div><div></div></div><p>The FXScintilla distribution contains everything you need to build
10
10
  the FXScintilla widget and begin using it in your C++-based FOX
11
11
  applications. That is to say, you do not have to separately download the
12
12
  Scintilla source code from the Scintilla home page. When you unpack the
@@ -17,7 +17,7 @@
17
17
  other open-source software (like FOX) from the source code. The
18
18
  <tt class="filename">INSTALL</tt> file in the top-level directory should
19
19
  provide enough instruction for you to build and install FXScintilla for
20
- either Unix or Microsoft Windows.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3279"></a>Enabling FXScintilla Support in FXRuby</h2></div></div><div></div></div><p>The next step is to build a version of FXRuby (from its source code)
20
+ either Unix or Microsoft Windows.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3304"></a>Enabling FXScintilla Support in FXRuby</h2></div></div><div></div></div><p>The next step is to build a version of FXRuby (from its source code)
21
21
  with the optional FXScintilla support enabled. If you're working on a Unix
22
22
  or Linux system and have installed FXScintilla in one of the standard
23
23
  installation directories (e.g. under <tt class="filename">/usr/include</tt> or <tt class="filename">/usr/local/include</tt>), the regular FXRuby build
@@ -1245,12 +1245,12 @@ static VALUE _wrap_FXIconSource_loadImage__SWIG_0(int argc, VALUE *argv, VALUE s
1245
1245
  return vresult; }
1246
1246
  static VALUE _wrap_FXIconSource_loadImage__SWIG_1(int argc, VALUE *argv, VALUE self) { FXIconSource *arg1 = (FXIconSource *) 0 ;
1247
1247
  void *arg2 = (void *) 0 ; FXString const &arg3_defvalue = FXString::null ; FXString *arg3 = (FXString *) &arg3_defvalue ;
1248
- FXIcon *result; SwigValueWrapper<FXString > p3 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 2))
1248
+ FXImage *result; SwigValueWrapper<FXString > p3 ; VALUE vresult = Qnil; if ((argc < 1) || (argc > 2))
1249
1249
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
1250
1250
  SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXIconSource, 1); SWIG_ConvertPtr(argv[0], (void **) &arg2, 0, 1);
1251
1251
  if (argc > 1) { p3 = to_FXString(argv[1]); arg3 = &p3; }
1252
- result = (FXIcon *)FXIconSource_loadImage((FXIconSource const *)arg1,(void const *)arg2,(FXString const &)*arg3); {
1253
- swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXIcon, (void **) &result); vresult = FXRbGetRubyObj(result, ty); }
1252
+ result = (FXImage *)FXIconSource_loadImage((FXIconSource const *)arg1,(void const *)arg2,(FXString const &)*arg3); {
1253
+ swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_FXImage, (void **) &result); vresult = FXRbGetRubyObj(result, ty); }
1254
1254
  return vresult; }
1255
1255
  static VALUE _wrap_FXIconSource_loadImage__SWIG_2(int argc, VALUE *argv, VALUE self) { FXIconSource *arg1 = (FXIconSource *) 0 ;
1256
1256
  FXStream *arg2 = 0 ; FXString const &arg3_defvalue = FXString::null ; FXString *arg3 = (FXString *) &arg3_defvalue ;
@@ -21,7 +21,7 @@
21
21
  ***********************************************************************/
22
22
 
23
23
  /***********************************************************************
24
- * $Id: FXRbCommon.h,v 1.1 2005/08/14 15:12:43 lyle Exp $
24
+ * $Id: FXRbCommon.h,v 1.2 2005/08/20 01:55:03 lyle Exp $
25
25
  ***********************************************************************/
26
26
 
27
27
  #include "ruby.h"
@@ -51,6 +51,10 @@
51
51
  #undef read
52
52
  #endif
53
53
 
54
+ #ifdef sleep
55
+ #undef sleep
56
+ #endif
57
+
54
58
  #ifdef write
55
59
  #undef write
56
60
  #endif
@@ -21,7 +21,7 @@
21
21
  ***********************************************************************/
22
22
 
23
23
  /***********************************************************************
24
- * $Id: FXRbIconSource.h,v 1.2 2005/08/19 02:08:05 lyle Exp $
24
+ * $Id: FXRbIconSource.h,v 1.4 2005/08/20 04:32:36 lyle Exp $
25
25
  ***********************************************************************/
26
26
 
27
27
  #ifndef FXRBICONSOURCE_H
@@ -40,8 +40,8 @@ inline FXIcon* cls ## _loadIcon(const cls* self,FXStream& store,const FXString&
40
40
  inline FXImage* cls ## _loadImage(const cls* self,const FXString& filename,const FXString& type){ \
41
41
  return self->cls::loadImage(filename,type); \
42
42
  } \
43
- inline FXIcon* cls ## _loadImage(const cls* self,const void* pixels,const FXString& type){ \
44
- return NULL; \
43
+ inline FXImage* cls ## _loadImage(const cls* self,const void* pixels,const FXString& type){ \
44
+ return self->cls::loadImage(pixels,type); \
45
45
  } \
46
46
  inline FXImage* cls ## _loadImage(const cls* self,FXStream& store,const FXString& type){ \
47
47
  return self->cls::loadImage(store,type); \
@@ -68,40 +68,40 @@ inline FXImage* cls ## _loadScaledImage(const cls* self,FXStream& store,FXint si
68
68
 
69
69
  #define IMPLEMENT_FXICONSOURCE_STUBS(cls) \
70
70
  FXIcon* cls::loadIcon(const FXString& filename,const FXString& type) const { \
71
- FXRbCallIconMethod(this,rb_intern("loadIcon"),filename,type); \
71
+ return FXRbCallIconMethod(this,rb_intern("loadIcon"),filename,type); \
72
72
  } \
73
73
  FXIcon* cls::loadIcon(const void* pixels,const FXString& type) const { \
74
- FXRbCallIconMethod(this,rb_intern("loadIcon"),pixels,type); \
74
+ return FXRbCallIconMethod(this,rb_intern("loadIcon"),pixels,type); \
75
75
  } \
76
76
  FXIcon* cls::loadIcon(FXStream& store,const FXString& type) const { \
77
- FXRbCallIconMethod(this,rb_intern("loadIcon"),store,type); \
77
+ return FXRbCallIconMethod(this,rb_intern("loadIcon"),store,type); \
78
78
  } \
79
79
  FXImage* cls::loadImage(const FXString& filename,const FXString& type) const { \
80
- FXRbCallImageMethod(this,rb_intern("loadImage"),filename,type); \
80
+ return FXRbCallImageMethod(this,rb_intern("loadImage"),filename,type); \
81
81
  } \
82
- FXIcon* cls::loadImage(const void* pixels,const FXString& type) const { \
83
- FXRbCallIconMethod(this,rb_intern("loadImage"),pixels,type); \
82
+ FXImage* cls::loadImage(const void* pixels,const FXString& type) const { \
83
+ return FXRbCallImageMethod(this,rb_intern("loadImage"),pixels,type); \
84
84
  } \
85
85
  FXImage* cls::loadImage(FXStream& store,const FXString& type) const { \
86
- FXRbCallImageMethod(this,rb_intern("loadImage"),store,type); \
86
+ return FXRbCallImageMethod(this,rb_intern("loadImage"),store,type); \
87
87
  } \
88
88
  FXIcon* cls::loadScaledIcon(const FXString& filename,FXint size,FXint qual,const FXString& type) const { \
89
- FXRbCallIconMethod(this,rb_intern("loadScaledIcon"),filename,size,qual,type); \
89
+ return FXRbCallIconMethod(this,rb_intern("loadScaledIcon"),filename,size,qual,type); \
90
90
  } \
91
91
  FXIcon* cls::loadScaledIcon(const void* pixels,FXint size,FXint qual,const FXString& type) const { \
92
- FXRbCallIconMethod(this,rb_intern("loadScaledIcon"),pixels,size,qual,type); \
92
+ return FXRbCallIconMethod(this,rb_intern("loadScaledIcon"),pixels,size,qual,type); \
93
93
  } \
94
94
  FXIcon* cls::loadScaledIcon(FXStream& store,FXint size,FXint qual,const FXString& type) const { \
95
- FXRbCallIconMethod(this,rb_intern("loadScaledIcon"),store,size,qual,type); \
95
+ return FXRbCallIconMethod(this,rb_intern("loadScaledIcon"),store,size,qual,type); \
96
96
  } \
97
97
  FXImage* cls::loadScaledImage(const FXString& filename,FXint size,FXint qual,const FXString& type) const { \
98
- FXRbCallImageMethod(this,rb_intern("loadScaledImage"),filename,size,qual,type); \
98
+ return FXRbCallImageMethod(this,rb_intern("loadScaledImage"),filename,size,qual,type); \
99
99
  } \
100
100
  FXImage* cls::loadScaledImage(const void* pixels,FXint size,FXint qual,const FXString& type) const { \
101
- FXRbCallImageMethod(this,rb_intern("loadScaledImage"),pixels,size,qual,type); \
101
+ return FXRbCallImageMethod(this,rb_intern("loadScaledImage"),pixels,size,qual,type); \
102
102
  } \
103
103
  FXImage* cls::loadScaledImage(FXStream& store,FXint size,FXint qual,const FXString& type) const { \
104
- FXRbCallImageMethod(this,rb_intern("loadScaledImage"),store,size,qual,type); \
104
+ return FXRbCallImageMethod(this,rb_intern("loadScaledImage"),store,size,qual,type); \
105
105
  }
106
106
 
107
107
 
@@ -12,7 +12,7 @@ public:
12
12
  virtual FXImage *loadImage(const FXString& filename,const FXString& type=FXString::null) const;
13
13
 
14
14
  // Overrides the base class version of loadImage()
15
- virtual FXIcon *loadImage(const void *pixels,const FXString& type=FXString::null) const;
15
+ virtual FXImage *loadImage(const void *pixels,const FXString& type=FXString::null) const;
16
16
 
17
17
  // Overrides the base class version of loadImage()
18
18
  virtual FXImage *loadImage(FXStream& store,const FXString& type=FXString::null) const;
@@ -2899,9 +2899,8 @@ static VALUE _wrap_FXDockBar_findDockNear(int argc, VALUE *argv, VALUE self) { F
2899
2899
  result = (FXDockSite *)(arg1)->findDockNear(arg2,arg3);
2900
2900
  vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_FXDockSite,0); return vresult; }
2901
2901
  static VALUE _wrap_FXDockBar_allowedSidese___(int argc, VALUE *argv, VALUE self) { FXDockBar *arg1 = (FXDockBar *) 0 ;
2902
- FXuchar arg2 = (FXuchar) FXDockBar::ALLOW_EVERYWHERE ; if ((argc < 0) || (argc > 1))
2903
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
2904
- SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXDockBar, 1); if (argc > 0) { arg2 = (FXuchar) NUM2INT(argv[0]); }
2902
+ FXuchar arg2 ; if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
2903
+ SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXDockBar, 1); arg2 = (FXuchar) NUM2INT(argv[0]);
2905
2904
  (arg1)->allowedSides(arg2); return Qnil; }
2906
2905
  static VALUE _wrap_FXDockBar_allowedSides(int argc, VALUE *argv, VALUE self) { FXDockBar *arg1 = (FXDockBar *) 0 ;
2907
2906
  FXuchar result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0))
data/lib/fox14/version.rb CHANGED
@@ -5,7 +5,7 @@ module Fox
5
5
  # Returns the FXRuby version number as a string, e.g. "1.0.19".
6
6
  #
7
7
  def Fox.fxrubyversion
8
- "1.4.0"
8
+ "1.4.1"
9
9
  end
10
10
  end
11
11
 
@@ -125,7 +125,7 @@ module Fox
125
125
  # Change set of sides where docking is allowed.
126
126
  # The default is to allow docking on all sides.
127
127
  #
128
- def allowedSides=(allow=ALLOW_EVERYWHERE); end
128
+ def allowedSides=(allowed); end
129
129
 
130
130
  #
131
131
  # Return set of sides where docking is allowed
@@ -365,8 +365,6 @@ module Fox
365
365
  # Flags may be +SEARCH_FORWARD+ or +SEARCH_BACKWARD+ to control the search
366
366
  # direction; this can be combined with +SEARCH_NOWRAP+ or +SEARCH_WRAP+
367
367
  # to control whether the search wraps at the start or end of the list.
368
- # The option +SEARCH_IGNORECASE+ causes a case-insensitive match. Finally,
369
- # passing +SEARCH_PREFIX+ causes searching for a prefix of the item name.
370
368
  # Returns +nil+ if no matching item is found.
371
369
  def findItemByData(ptr, start=nil, flags=SEARCH_FORWARD|SEARCH_WRAP); end
372
370
 
@@ -316,9 +316,6 @@ module Fox
316
316
  # Flags may be SEARCH_FORWARD or SEARCH_BACKWARD to control the
317
317
  # search direction; this can be combined with SEARCH_NOWRAP or SEARCH_WRAP
318
318
  # to control whether the search wraps at the start or end of the list.
319
- # The option SEARCH_IGNORECASE causes a case-insensitive match. Finally,
320
- # passing SEARCH_PREFIX causes searching for a prefix of the item name.
321
- # Return -1 if no matching item is found.
322
319
  #
323
320
  def findItemByData(data, start=-1, flags=SEARCH_FORWARD|SEARCH_WRAP); end
324
321
 
@@ -268,17 +268,26 @@ module Fox
268
268
  def hitItem(index, x, y) ; end
269
269
 
270
270
  #
271
- # Search items by name, beginning from item start. If the start
271
+ # Search items by _text_, beginning from item _start_. If the start
272
272
  # item is -1 the search will start at the first item in the list.
273
- # Flags may be SEARCH_FORWARD or SEARCH_BACKWARD to control the
274
- # search direction; this can be combined with SEARCH_NOWRAP or SEARCH_WRAP
273
+ # Flags may be +SEARCH_FORWARD+ or +SEARCH_BACKWARD+ to control the
274
+ # search direction; this can be combined with +SEARCH_NOWRAP+ or +SEARCH_WRAP+
275
275
  # to control whether the search wraps at the start or end of the list.
276
- # The option SEARCH_IGNORECASE causes a case-insensitive match. Finally,
277
- # passing SEARCH_PREFIX causes searching for a prefix of the item name.
276
+ # The option +SEARCH_IGNORECASE+ causes a case-insensitive match. Finally,
277
+ # passing +SEARCH_PREFIX+ causes searching for a prefix of the item name.
278
278
  # Return -1 if no matching item is found.
279
279
  #
280
280
  def findItem(text, start=-1, flags=SEARCH_FORWARD|SEARCH_WRAP) ; end
281
281
 
282
+ #
283
+ # Search items by associated user _data_, beginning from item _start_. If the
284
+ # start item is -1 the search will start at the first item in the list.
285
+ # Flags may be +SEARCH_FORWARD+ or +SEARCH_BACKWARD+ to control the
286
+ # search direction; this can be combined with +SEARCH_NOWRAP+ or +SEARCH_WRAP+
287
+ # to control whether the search wraps at the start or end of the list.
288
+ #
289
+ def findItemByData(data, start=-1, flags=SEARCH_FORWARD|SEARCH_WRAP); end
290
+
282
291
  #
283
292
  # Scroll to bring item into view. The argument is either a reference to
284
293
  # an FXListItem instance, or the integer index of an item in the list.