fxruby-commits Mailing List for FXRuby (Page 6)
Status: Inactive
Brought to you by:
lyle
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
(39) |
Apr
(69) |
May
(117) |
Jun
(22) |
Jul
(57) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Lyle J. <ly...@us...> - 2002-05-14 15:14:39
|
Update of /cvsroot/fxruby/FXRuby/doc In directory usw-pr-cvs1:/tmp/cvs-serv12481 Modified Files: Tag: release10 changes.html changes.xml differences.html differences.xml events.html implementation.html library.html library.xml todo.html todo.xml Log Message: Index: changes.html =================================================================== RCS file: /cvsroot/fxruby/FXRuby/doc/changes.html,v retrieving revision 1.42.2.3 retrieving revision 1.42.2.4 diff -C2 -d -r1.42.2.3 -r1.42.2.4 *** changes.html 10 May 2002 22:23:13 -0000 1.42.2.3 --- changes.html 14 May 2002 15:14:33 -0000 1.42.2.4 *************** *** 1,5 **** <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> ! <title>Chapter 11. Change History</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><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="todo.html" title="Chapter 10. To-do list"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 11. Change History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="todo.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="changes"></a>Chapter 11. Change History</h2></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e1913"></a>Changes Since Version 1.0.3</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Corrected the code for <tt>FXTreeList#clearItems</tt> so that after the C++ objects (the tree items) are destroyed, any Ruby instances holding references to those C++ objects are notified of their demise. This one was inadvertently overlooked when other, similar, fixes were made in the previous release. Thanks to Gilles Filippini for catching this.</p></li><li style="list-style-type: disc"><p>The API for Ruby's <tt>rb_rescue2()</tt> function changed in Ruby 1.6.7, but I missed this since I had only compiled against the Ruby 1.6.6 and Ruby 1.7 header files. The API change led to a compile error for FXRuby.cpp; this has been fixed. Thanks to Bil Kleb for catching this one.</p></li><li style="list-style-type: disc"><p>The <tt>FXApp#enableThreads</tt> and <tt>FXApp#disableThreads</tt> instance methods have been replaced by a single instance method, --- 1,5 ---- <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> ! <title>Chapter 11. Change History</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><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="todo.html" title="Chapter 10. To-do list"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 11. Change History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="todo.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="changes"></a>Chapter 11. Change History</h2></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2049"></a>Changes Since Version 1.0.3</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Corrected the code for <tt>FXTreeList#clearItems</tt> so that after the C++ objects (the tree items) are destroyed, any Ruby instances holding references to those C++ objects are notified of their demise. This one was inadvertently overlooked when other, similar, fixes were made in the previous release. Thanks to Gilles Filippini for catching this.</p></li><li style="list-style-type: disc"><p>The API for Ruby's <tt>rb_rescue2()</tt> function changed in Ruby 1.6.7, but I missed this since I had only compiled against the Ruby 1.6.6 and Ruby 1.7 header files. The API change led to a compile error for FXRuby.cpp; this has been fixed. Thanks to Bil Kleb for catching this one.</p></li><li style="list-style-type: disc"><p>The <tt>FXApp#enableThreads</tt> and <tt>FXApp#disableThreads</tt> instance methods have been replaced by a single instance method, *************** *** 14,16 **** now be called in either of these equivalent forms:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">glviewer.backgroundColor = FXHVec.new(0.5, 0.5, 0.5, 1.0)</pre></td></tr></table> or ! <table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">glviewer.backgroundColor = [0.5, 0.5, 0.5, 1.0]</pre></td></tr></table></li><li style="list-style-type: disc"><p>Updated the test case for <tt>FXMaterial</tt>, added a new test case for <tt>FXFileStream</tt>.</p></li><li style="list-style-type: disc"><p>Added aliases <tt>posVisible?</tt> (for <tt>FXTextField#isPosVisible</tt>), <tt>posSelected?</tt> (for <tt>FXTextField#isPosSelected</tt>), <tt>itemCurrent?</tt> (for <tt>FXComboBox#isItemCurrent</tt>), <tt>hasAccel?</tt> (for <tt>FXAccelTable#hasAccel</tt>), <tt>error=</tt> (for <tt>FXStream#setError</tt>), <tt>position=</tt> (for <tt>FXStream#setPosition</tt>) and <tt>position</tt> (for <tt>FXStream#getPosition</tt>).</p></li><li style="list-style-type: disc"><p>The <tt>FXStream</tt>, <tt>FXFileStream</tt> and <tt>FXMemoryStream</tt> classes were not implemented properly, in the sense that if you subclassed one of these classes and then attempted to override one of their virtual functions, that override might not get called (see <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=535955&group_id=20243&atid=120243" target="_top">SourceForge Bug #535955</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>Did some more work on completing the <tt>FXDC</tt> interface, including adding a test case for the same.</p></li><li style="list-style-type: disc"><p>All GIF image files have now been replaced with PNG equivalents. For more information on why this is a good idea, see <a href="http://burnallgifs.org" target="_top">this site</a>.</p></li><li style="list-style-type: disc"><p>Starting with this release, Red Hat Linux 7.2 RPMs are now provided in addition to the Windows installer.</p></li><li style="list-style-type: disc"><p>The previous implementation of <tt>FXImage#data</tt> returned a copy of the underlying image pixel data instead of a pointer to the actual data (see <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=550996&group_id=20243&atid=120243" target="_top">SourceForge Bug #550996</a>). This has been fixed. <tt>FXImage#data</tt> now returns an instance of <tt>FXMemoryBuffer</tt> which is an array or string-like class that acts as a very thin layer over the pointer to the pixel data. The <tt>initialize</tt> methods for images and icons were also updated so that they will now accept either strings (as before) or <tt>FXMemoryBuffer</tt> instances as inputs for the image data.</p></li><li style="list-style-type: disc"><p>Lots of other little fixes here and there...</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2090"></a>Changes Since Version 0.99.189</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Upgraded to the latest version of Minero Aoki's <tt>install.rb</tt> script.</p></li><li style="list-style-type: disc"><p>Switched from using DocBook/SGML to DocBook/XML for the FXRuby documentation. This is mainly a maintenance issue; it's just much less complicated to "publish" documents using DocBook/XML as compared to DocBook/SGML. You should see few (if any) differences in the resulting HTML pages, but let me know if you notice anything squirrely.</p></li><li style="list-style-type: disc"><p>Improved support for customized sorting of list items for the <tt>FXComboBox</tt>, <tt>FXIconList</tt>, <tt>FXList</tt>, <tt>FXListBox</tt>, <tt>FXTreeList</tt> and <tt>FXTreeListBox</tt> classes. The model is different from that used in the C++ FOX library, where you set a global sorting function for each list instance. For FXRuby, you instead just override the list item's <tt><=></tt> method to compare one list item to another. Thanks to Martin Stannard for prompting me to resolve this problem.</p></li><li style="list-style-type: disc"><p>Added instructions about how to modify your <tt>/etc/ld.so.conf</tt> file (on Linux) to include the <tt>libFOX.so</tt> installation directory. Thanks to Giuseppe Cacopardo for providing this information.</p></li><li style="list-style-type: disc"><p>Updated the test cases (again) for use with Nathaniel Talbott's <a href="http://testunit.talbott.ws" target="_top">TestUnit</a>, which is apparently the successor to Lapidary.</p></li><li style="list-style-type: disc"><p>Added support for the <tt>FXCURCursor</tt>, <tt>FXRGBIcon</tt>, <tt>FXRGBImage</tt> classes.</p></li><li style="list-style-type: disc"><p>Fixed a longstanding bug related to the ownership (for garbage collection purposes) of <tt>FXGLGroup</tt> and <tt>FXGLShape</tt> instances. This is the bug that was causing the <tt>glviewer.rb</tt> example program to crash on exit.</p></li><li style="list-style-type: disc"><p>Fixed a different (but also longstanding) bug related to FXRuby's hanging on to "stale" Ruby object references after those Ruby objects had already been garbage-collected. This bug manifested itself in a number of ways, but the most common symptom would be for an object (like an <tt>FXEvent</tt> instance) to suddenly lose its mind and believe it was some other object. Oh, and your program would usually crash at that point. I think this problem is now fixed.</p></li><li style="list-style-type: disc"><p>Added some safeguards for "destructive" functions like <tt>FXList#clearItems</tt>, which can destroy the C++ objects backing-up Ruby objects in FXRuby, so that any outstanding Ruby references to those destroyed C++ objects are left in a safe state when accessed by Ruby's garbage collector.</p></li><li style="list-style-type: disc"><p>Performed a major overhaul on the <tt>shutter.rb</tt> example program, which still demonstrates the <tt>FXShutter</tt> widget but otherwise doesn't resemble its previous incarnation at all.</p></li><li style="list-style-type: disc"><p>Added a new example program (<tt>raabrowser.rb</tt>) that allows you to browse the Ruby Application Archive via its SOAP interface. Requires the <a href="http://www.jin.gr.jp/~nahi/Ruby/SOAP4R" target="_top">SOAP4R</a> extension.</p></li><li style="list-style-type: disc"><p>Added a new example program (<tt>babelfish.rb</tt>) that allows you to use the Babelfish translator web service via its SOAP interface. Requires the <a href="http://www.jin.gr.jp/~nahi/Ruby/SOAP4R" target="_top">SOAP4R</a> extension.</p></li><li style="list-style-type: disc"><p>Added a new page to the documentation to briefly describe each of the example programs (including screenshots).</p></li><li style="list-style-type: disc"><p>The CVS repository for FXRuby is now hosted at the SourceForge site. For those who would like access to the latest version of FXRuby (in-between official releases) this is now an option. For more details, see the instructions at the <a href="http://sourceforge.net/cvs/?group_id=20243" target="_top">SourceForge project CVS page</a>.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="http://www.fox-toolkit.org/ftp/fox-1.0.3.tar.gz" target="_top">fox-1.0.3</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2220"></a>Changes Since Version 0.99.188</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Fixed a big bug related to the <tt>FXApp#addSignal</tt> and <tt>FXApp#removeSignal</tt> functions, which should accept a string signal name as an argument. The list of recognized signal names was not constructed properly and as a result most any call to these methods with a string signal name would fail. This has been corrected, and the methods now throw exceptions like those thrown from <tt>Process::kill</tt> when the signal name is unrecognized or the argument type is wrong.</p></li><li style="list-style-type: disc"><p>The <tt>imageviewer.rb</tt> example program now supports loading TARGA, ICO and TIFF image files.</p></li><li style="list-style-type: disc"><p>The configuration process on Windows should now detect the presence of <tt>libtiff.lib</tt> properly.</p></li><li style="list-sty le-type: disc"><p>Updated the interfaces for compatibility with <a href="http://www.fox-toolkit.org/ftp/fox-0.99.189.tar.gz" target="_top">fox-0.99.189</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2254"></a>Changes Since Version 0.99.181</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Removed the <tt>-fno-strict-prototype</tt> and <tt>-fpermissive</tt> flags from the <tt>CFLAGS</tt> for Linux builds, since these two flags are no longer supported for more recent versions of gcc. Thanks to Thomas Lundqvist for reporting this.</p></li><li style="list-style-type: disc"><p>Some of the source files included in the previous release had DOS-style line endings and this caused gcc to choke while compiling them; this has been fixed. Thanks to Thomas Lundqvist for reporting this.</p></li><li style="list-style-type: disc"><p>Updated the FXRuby test cases (such as they are) to use Nathaniel Talbott's <a href="http://lapidary.sourceforge.net" target="_top">Lapidary</a> unit testing framework.</p></li><li style="list-style-type: disc"><p>Migrated yet more code from the C++ extension to pure Ruby versions. Most of the code for the <tt>FXPoint</tt>, <tt>FXRectangle</tt> and <tt>FXSize</tt> classes is now implemented in Ruby.</p></li><li style="list-style-type: disc"><p>Fixed a bug in the <tt>browser.rb</tt> example. I had meant for the methods and constants lists to be sorted but had failed to use the in-place <tt>sort!</tt> method. Thanks to Robert Gustavsson for reporting this.</p></li><li style="list-style-type: disc"><p>Completed a lot of the initial work for integrating the FXScintilla widget into FXRuby. This is not usable yet, but I'm working with Rich Kilmer and others to try to make this happen.</p></li><li style="list-style-type: disc"><p>Updated the build instructions to provide more information about building the Visual C++ version of FXRuby (i.e. for use with the Visual C++ build of Ruby) on Windows. Thanks to a final tip from Martin Stannard we now have a working build for this compiler.</p></li><li style="list-style-type: disc"><p>For fun, added a new example program that downloads today's Dilbert cartoon from the <a href="http://www.dilbertzone.com" target="_top">DilbertZone</a> web site and displays it in an <tt>FXImageViewer</tt> widget. Requires the <tt>html-parser</tt> module, listed in the <a href="http://www.ruby-lang.org/en/raa.html" target="_top">Ruby Application Archive</a>.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="http://www.fox-toolkit.org/ftp/fox-0.99.188.tar.gz" target="_top">fox-0.99.188</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2327"></a>Changes Since Version 0.99.180</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Added <tt>slices</tt>, <tt>stacks</tt> and <tt>loops</tt> accessors for the <tt>FXGLCone</tt> and <tt>FXGLCylinder</tt> classes, to provide finer control over the rendering fidelity for these shapes (this was already done for <tt>FXGLSphere</tt> in the previous release).</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.fox-toolkit.org/pub/fox-0.99.181.tar.gz" target="_top">fox-0.99.181</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2358"></a>Changes Since Version 0.99.174</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Moved the class definitions for <tt>FXGLPoint</tt>, <tt>FXGLLine</tt>, <tt>FXGLCube</tt>, <tt>FXGLCylinder</tt>, <tt>FXGLSphere</tt> and <tt>FXGLCone</tt> to a new library module <tt>fox/glshapes.rb</tt>. The interfaces are the same as the C++ versions of these classes, this is just a "pure Ruby" implementation of the classes instead of wrappers around the C++ classes. See <tt>examples/glviewer.rb</tt> for an example of their use.</p></li><li style="list-style-type: disc"><p>Fixed a bug related to object ownership for GL objects added to a <tt>FXGLGroup</tt>.</p></li><li style="list-style-type: disc"><p>Added support for overriding the virtual <tt>layout</tt> method in classes derived from <tt>FXWindow</tt>. This will allow developers to, for example, develop new kinds of layout managers.</p></li><li style="list-style-type: disc"><p>Replaced the previous WISE-based installer for the Windows version with an Inno Setup-based installer and reorganized things to better reflect the organization used in the standard Ruby installer.</p></li><li style="list-style-type: disc"><p>Updated the setup and build script to the latest version of Minero Aoki's scripts (version 3.0.2). The main change for FXRuby end-users is that the name of the build script is now <tt>install.rb</tt> instead of <tt>setup.rb</tt>.</p></li><li style="list-style-type: disc"><p>Added the <tt>colors.rb</tt> library file, for predefined color names in the <tt>FXColor</tt> namespace. The use of this module allows you to use symbolic names like <tt>FXColor::Red</tt> instead of an RGB constant like FXRGB(255, 0, 0). Many thanks to Jeff Heard for this suggestion and the contributed file.</p></li><li style="list-style-type: disc"><p>The <tt>FXRegion</tt> was accidentally being renamed to <tt>FX_Region</tt> (a little behind-the-scenes magic I'm doing in FXRuby) and as a result you couldn't use this class. Thanks to Steven Grady for catching this bug.</p></li><li style="list-style-type: disc"><p>The <tt>FXFileStream</tt> class now supports a Ruby-style <tt>open</tt> singleton method that provides transactional control for closing the file stream when it's done. See the <tt>image.rb</tt> and <tt>imageviewer.rb</tt> examples for how this works.</p></li><li style="list-style-type: disc"><p>After some discussions at RubyConf and follow-up discussions on the comp.lang.ruby newsgroup, the procedure for attaching events handlers to FXRuby widgets has been greatly simplified. Most of the example programs have been updated to reflect these changes, and a new documentation section has been added to describe how it works. For some of the background, please see <a href="http://www.rubygarden.org/ruby?FXRubyComments" target="_top">this page</a> on the RubyGarden Wiki.</p></li><li style="list-style-type: disc"><p>Added support for the <tt>each_row</tt> and <tt>each_column</tt> iterators for the <tt>FXTable</tt> class. These iterators yield an array of references to <tt>FXTableItem</tt> instances, one per row or column, respectively. Note that the <tt>each</tt> method is just an alias for <tt>each_row</tt>.</p></li><li style="list-style-type: disc"><p>Removed the interfaces for <tt>fxrandom</tt>, <tt>fxmalloc</tt>, <tt>fxcalloc</tt>, <tt>fxresize</tt>, <tt>fxmemdump</tt>, and <tt>fxfree</tt>. These utility functions are not relevant for FXRuby.</p></li><li style="list-style-type: disc"><p>Corrected interfaces for <tt>fxhsv_to_rgb</tt> and <tt>fxrgb_to_hsv</tt> so that they return three-element arrays of the converted color components.</p></li><li style="list-style-type: disc"><p>Corrected interfaces for <tt>FXWindow#acquireSelection</tt>, <tt>FXWindow#acquireClipboard</tt> and <tt>FXWindow#beginDrag</tt> to take an array of drag types.</p></li><li style="list-style-type: disc"><p>Corrected interfaces for <tt>fxsaveBMP</tt>, <tt>fxsaveGIF</tt>, <tt>fxsaveICO</tt>, <tt>fxsavePCX</tt>, <tt>fxsavePNG</tt>, <tt>fxsaveTIF</tt> and <tt>fxsaveXPM</tt> so that they expect a Ruby string (containing the image pixel data) as their second argument.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.fox-toolkit.org/pub/fox-0.99.180.tar.gz" target="_top">fox-0.99.180</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2551"></a>Changes Since Version 0.99.173</h2></div></div><div class="itemizedlist"><ul type="bullet">< li style="list-style-type: disc"><p>Moved all of the method name aliases out of the C interface code and into a new library file (<tt>fox/aliases.rb</tt>). This file is loaded automatically so you don't need to change your code. Similarly, moved all of the iterator methods out of the C code and into a library file (<tt>fox/iterators.rb</tt>). The main purpose of these changes is to reduce the size of the C++ code (especially <tt>core_wrap.cpp</tt>) where possible. Obviously, compared to recompiling the C++ source code, it's also much more efficient to quickly patch the Ruby files and re-run when there are problems.</p></li><li style="list-style-type: disc"><p>A few errors made it into the <tt>undolist.rb</tt> library module and the <tt>textedit.rb</tt> example last time; I think these have been fixed.</p></li><li style="list-style-type: disc"><p>I meant to add support for the new <tt>FXPCXIcon</tt> and <tt>FXPCXImage</tt> classes with the last release, but somehow I overlooked those. They are now supported, along with the other new classes introduced by FOX version 0.99.174: <tt>FXTIFIcon</tt>, <tt>FXTIFImage</tt> and <tt>FXProgressDialog</tt>.</p></li><li style="list-style-type: disc"><p>Fixed a bug in the GC-related code for "marking" C++ objects. I had not accounted for the possibility that the pointer passed to my mark functions could be a <tt>NULL</tt> pointer, and as a result the code would seg fault during garbage collection, under some circumstances. Many thanks to Ralf Canis for catching this bug.</p></li><li style="list-style-type: disc"><p>Updated the source code and <tt>extconf.rb</tt> files so that FXRuby configures and builds correctly for the "mswin32" builds. Thanks very much to Lorien Dunn for prompting me to get this stuff up-to-date!</p></li><li style="list-style-type: disc"><p>Fixed things so that the <tt>FXApp#addInput</tt> and <tt>FXApp#removeInput</tt> instance methods work properly for generating input messages. The first argument to both of these methods should be an <tt>IO</tt> object of some kind (specifically, an object that implements a <tt>fileno</tt> method). For more information about how this works, see the "Timers, Chores, Signals and Input Messages" section of the FOX documentation. Also see the new <tt>inputs.rb</tt> program in the <tt>examples</tt> directory for an example of how this works. Thanks to Ralf Canis for reminding me that I left this broken!</p></li><li style="list-style-type: disc"><p>Completed the basic code changes required for <tt>FXObject#handle</tt> to properly convert its message data into something that the C++ objects recognize (see the first item in the FXRuby To-Do List for more information). A lot of message types and identifiers are now handled correctly, especially those that are common to all <tt>FXWindow</tt>s. Most of the more widget-specific messages are not handled yet, and this is going to take awhile to complete; it's just a tedious process.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.cfdrc.com/pub/FOX/fox-0.99.174.tar.gz" target="_top">fox-0.99.174</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2642"></a>Changes Since Version 0.99.172</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Changed the build and installation process to use Minero Aoki's <tt>setup.rb</tt> tools. Looking ahead I can see that FXRuby will probably consist of a core C++ extension module and a collection of Ruby library scripts, and so now was the right time to make that transition.</p><p>If you have previously installed FXRuby (and written programs with the same) there are a few changes that may affect you. First, <tt>setup.rb</tt> will install the shared library (<tt>fox.so</tt>) in your <tt>site_ruby</tt> directory instead of the "core" libraries directory, where it was previously installed. So you should be sure to remove the old version of <tt>fox.so</tt> before installing and using this one.</p><p>The other change to be aware of is that there is now a <tt>fox</tt> directory containing FXRuby library scripts, and the <tt>responder.rb</tt> module is the first entry for this directory. You can import this file into your Ruby scripts with the line:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">require 'fox/responder'</pre></td></tr></table><p>and it's no longer necessary to drag copies of that file around.</p></li><li style="list-style-type: disc"><p>Aliased the <tt>getText</tt> instance method to <tt>to_s</tt> for a number of classes. This change should make things a little more convenient when inspecting the contents of widgets whose primary purpose is text entry or display. Thanks to Barry Shultz for this suggestion.</p></li><li style="list-style-type: disc"><p>Added the <tt>FXWindow#removeChild</tt> method for removing child widgets from a container window. This method doesn't exist for the C++ <tt>FXWindow</tt> class because it isn't needed; in C++ programs you simply delete the C++ object and it automatically gets removed from its parent. Note that after you call <tt>FXWindow#removeChild</tt> any outstanding references to the recently deceased child widget are invalid and should be set to <tt>nil</tt> or otherwise disposed of. Thanks to Ted Meng for noticing this omission.</p></li><li style="list-style-type: disc"><p>Modified some of the OpenGL method calls in <tt>gltest.rb</tt> for compatibility with Ruby/OpenGL 0.32. You should now be able to use Ruby/OpenGL with FXRuby unmodified.</p></li><li style="list-style-type: disc"><p>Added <tt>each()</tt> instance methods for <tt>FXComboBox</tt>, <tt>FXGLGroup</tt>, <tt>FXHeader</tt>, <tt>FXIconList</tt>, <tt>FXList</tt>, <tt>FXListBox</tt>, <tt>FXTreeItem</tt>, <tt>FXTreeList</tt> and <tt>FXTreeListBox</tt> in support of iterating over their sub-items. Also mixed the <tt>Enumerable</tt> module into all of these classes.</p></li><li style="list-style-type: disc"><p>Corrected the implementations of <tt>getData()</tt> and <tt>setData()</tt> for a variety of classes. You should now be able to attach arbitrary (application-defined) data to any FOX object that supports these APIs.</p></li><li style="list-style-type: disc"><p>As a debugging tool, you can now optionally catch exceptions raised in message handlers. To turn on this feature, call the <tt>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></li><li style="list-style-type: disc"><p>Extended the interfaces for <tt>FXApp#addSignal</tt> and <tt>FXApp#removeSignal</tt> 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 <tt>Process.kill</tt> module method). For examples of how to use this, see the <tt>datatarget.rb</tt> or <tt>imageviewer.rb</tt> example programs.</p></li><li style="list-style-type: disc"><p>Corrected the implementations of <tt>fxparsefontdesc()</tt> and <tt>fxunparsefontdesc()</tt> module methods.</p></li><li style="list-style-type: disc"><p>Added a pure Ruby implementation of the standard <tt>FXCommand</tt> and <tt>FXUndoList</tt> classes from the standard FOX library.</p></li><li style="list-style-type: disc"><p>Added the <tt>splitter.rb</tt> example, to demonstrate the <tt>FXSplitter</tt> class and its options.</p></li><li style="list-style-type: disc"><p>Completed the initial version of <tt>browser.rb</tt>, which is just a simple tool to inspect the methods and constants exposed by different FOX classes. Thanks to Albert Wagner for pointing out some bugs in this one and providing me with the motivation to complete it. I don't know how useful it is, but it seems to be a required utility for every GUI toolkit for Ruby ;) If you'd like to suggest further im provements, please feel free!</p></li><li style="list-style-type: disc"><p>Corrected the constructors for <tt>FXXPMIcon</tt> and <tt>FXXPMImage</tt> so that they accept a list of strings as their second argument. The list of strings should be an XPM format image file. You can also pass <tt>nil</tt> to construct an initially-empty icon or image.</p></li><li style="list-style-type: disc"><p>Corrected the message data sent by <tt>FXList</tt> to its message target for the <tt>SEL_SELECTED</tt>, <tt>SEL_DESELECTED</tt>, <tt>SEL_INSERTED</tt>, <tt>SEL_DELETED</tt>, and <tt>SEL_REPLACED</tt> messages. For each of these messages, the data should be an integer indicating the affected list item's index.</p></li><li style="list-style-type: disc"><p>Added typemaps to convert Ruby message data back into C++ void pointers when calling the base class versions of message handlers. Please see the to-do list for a brief discussion of the issues that this fix addressed, and what remains to be done.</p></li><li style="list-style-type: disc"><p>Fixed a subtle GC bug related to object ownership. I'll use the <tt>FXList</tt> and <tt>FXListItem</tt> classes to describe the problem, but it's also relevant for several other FOX classes.</p><p>There are two ways to add a new list item to an <tt>FXList</tt> instance. One of those ways involves creating a new <tt>FXListItem</tt> instance explicitly (i.e. using <tt>FXListItem.new</tt>) and then passing it into an <tt>FXList</tt> instance method like <tt>FXList#appendItem</tt>. Before you add the item to the list, the item is "self-owned"; in other words, if Ruby's garbage collector decides to kill off that <tt>FXListItem</tt> instance, it is appropriate to also destroy the underlying C++ object. After the list item has been added to an <tt>FXList</tt>, however, the <tt>FXList</tt> owns that list item and is responsible for destroying it.</p><p>This bug became an issue when you added <tt>FXListItem</tt> instances to a list, because the code didn't properly recognize the fact that "ownership" of the list item had been transferred from the <tt>FXListItem</tt> instance to the <tt>FXList</tt>. More to the point, Ruby's garbage collector assumed that it was still OK to destroy the <tt>FXListItem</tt> instances that it knew about, and so objects could get deleted twice. This would usually result in a core dump.</p><p>Many thanks to Albert Wagner for submitting an example program that demonstrated this problem.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.fox-toolkit.org/pub/fox-0.99.173.tar.gz" target="_top">fox-0.99.173</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2906"></a>Changes Since Version 0.99.167</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Completed the coding for "safe" coexistence with Ruby's garbage collector; it should no longer be necessary to call <tt>GC.disable</tt> at the top of your FXRuby programs. Although all of the example programs now work correctly without disabling the garbage collector, this doesn't mean that there aren't still some bugs lurking. If your FXRuby program(s) crash mysteriously, try adding <tt>GC.disable</tt> to the top to see if it fixes things. If this does make a difference, <span class="emphasis"><em>please</em></span> send me the program (or another that reproduces the problem) so I can track down what's going wrong.</p></li><li style="list-style-type: disc"><p>Added aliases for all classes' accessor functions so that the related properties can be accessed more directly; for example, <tt>FXLabel#getText</tt> is aliased to <tt>FXLabel#text</tt> and <tt>FXLabel#setText</tt> is aliased to <tt>FXLabel#text=</tt>. Although the different forms are functionally equivalent, the new form is often easier to read. For example, consider this snippet of code that modifies a label's text:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">aLabel.setText(aLabel.getText() + " (modified)")</pre></td></tr></table><p>and this version of the same, now using the propery accessor functions:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">aLabel.text += " (modified)"</pre></td></tr></table><p>None of the standard FOX class APIs have been removed, so you shouldn't need to modify any already-working code.</p></li><li style="list-style-type: disc"><p>Corrected the message data sent from the <tt>FXText</tt> widget to its message target for the <tt>SEL_SELECTED</tt>, <tt>SEL_DESELECTED</tt>, <tt>SEL_INSERTED</tt>, <tt>SEL_DELETED</tt> and <tt>SEL_REPLACED</tt> message types. For the first four messages, the associated message data sent to the target will be an array of two integers indicating the starting position in the text buffer and text length for the affected text. For the <tt>SEL_REPLACED</tt> message type, the message data will be an array of three integers, indicating the starting position in the text buffer, the length of the old (replaced) text, and the length of the new text.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.fox-toolkit.org/pub/fox-0.99.172.tar.gz" target="_top">fox-0.99.172</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2975"></a>Changes Since Version 0.99.166-1</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Corrected the interfaces for <tt>FXInputDialog.getString</tt>, <tt>FXInputDialog.getReal</tt> and <tt>FXInputDialog.getInteger</tt> to either return the requested type or <tt>nil</tt> if the user cancels the dialog.</p></li><li style="list-style-type: disc"><p>Added code at the top of all the examples to disable Ruby's garbage collector, until the issues with GC are resolved.</p></li><li style="list-style-type: disc"><p>Corrected implementations for the overloaded versions of <tt>FXWindow#update</tt>. This method can be invoke with no arguments (in which case it updates the entire window) or with four arguments indicating the x, y, w and h of the client area to be updated.</p></li><li style="list-style-type: disc"><p>Modified how the return values from Ruby message handler functions are interpreted, to make things a little more convenient for programmers. If the result is a numeric type (<tt>Fixnum</tt>, <tt>Bignum</tt> or <tt>Float</tt>) we try to cast it to a long integer but also trap the value to either zero or one. If it's a boolean result we map <tt>false</tt> and <tt>true</tt> to zero and one, respectively. For any other return type (<tt>nil</tt>, strings, etc.) we just assume they meant to return 1. Thanks to Ted Meng for this suggestion.</p></li><li style="list-style-type: disc"><p>Modified the interfaces for <tt>FXFileDialog#getPatternList</tt>, <tt>FXFileSelector#getPatternList</tt>, <tt>FXFileDialog#setPatternList</tt> and <tt>FXFileSelector#setPatternList</tt> to take (or return) an array of strings (one array item per pattern) of the form "C/C++ Files (*.cpp)". This is sort-of a compromise between the currently available overloaded C++ versions of these functions, both of which look pretty awkward in Ruby. For an example of how this works now, see the <tt>imageviewer.rb</tt> example program.</p></li><li style="list-style-type: disc"><p>Added the FOX key cap definitions (i.e. the symbols from <tt>fxkeys.h</tt>) into FXRuby. Thanks to Benedikt Grundmann for pointing out this omission.</p></li><li style="list-style-type: disc"><p>Added initial support for multithreaded FXRuby applications. 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. As a simple example, I modified the <tt>groupbox.rb</tt> example program so that the clock label that appears in the lower right-hand corner is continuously updated (by a separate thread) instead of just displaying static text.</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>FXApp</tt> object's <i><tt>sleepTime</tt></i> attribute. The default value for <i><tt>FXApp#sleepTime</tt></i> is 100 milliseconds. You can also disable the threads support completely by calling <tt>FXApp#disableThreads</tt> (and subsequently re-enable it with <tt>FXApp#enableThreads</tt>.</p></li><li style="list-style-type: disc"><p>Started adding <a href="http://homepage1.nifty.com/markey/ruby/rubyunit/index_e.html" target="_top">RubyUnit</a>-style test cases to the <tt>tests</tt> subdirectory. There's not much there yet but we've got to start somewhere!</p></li><li style="list-style-type: disc"><p>Converted most of the documentation over to <a href="http://www.docbook.org" target="_top">DocBook</a> format and reorganized the web page accordingly.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.cfdrc.com/pub/FOX/fox-0.99.167.tar.gz" target="_top">fox-0.99.167</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e3092"></a>Changes Since Version 0.99.166</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Corrected a problem with the binary distribution (i.e. the <tt>fox.so</tt> file) for Windows, which made it unusable on most Windows installations. This problem was related to an incompatibility between the versions of Cygwin that I was using to compile FOX and FXRuby, and the version used to compile the standard Ruby 1.6.2 distribution for Windows. Many, many thanks to Pete, Bene and Robert for helping me to test and resolve this issue!</p></li><li style="list-style-type: disc"><p>Added support for FOX data targets, as demonstrated by the new <tt>datatarget.rb</tt> example in the <tt>examples</tt> directory. A data target is a special kind of FOX object that can be designated as the message target of any widget that has an associated "value", and then the value of the data target and that widget become automatically linked to each other. For example, you can create a data target with a string value and then make it the message target for an <tt>FXTextField</tt> widget. From then on, changes made to the text field will be automatically reflected in the data target's value and vice versa. (For those familiar with Tk, this is the same principal as its <tt>TkVariable</tt> class.)</p></li><li style="list-style-type: disc"><p>Made the <tt>extconf.rb</tt> script a lot more intelligent and robust. Now, if you don't explicitly specify the <tt>--with-fox-include</tt> and <tt>--with-fox-lib</tt> arguments it will look in the standard FOX installation locations (<tt>/usr/local/include/fox</tt> and <tt>/usr/local/lib</tt>, respectively). If it doesn't find the appropriate files there either, it will stop with an error message. The new <tt>extconf.rb</tt> script also compares the FOX version number from the FOX's <tt>fxver.h</tt> file to be sure it's consistent with the version of FXRuby that you're building.</p></li><li style="list-style-type: disc"><p>Revived the missing <tt>FXApp#addTimeout</tt> and <tt>FXApp#removeTimeout</tt> methods, which accidentally got clobbered in the 0.99.166 release.</p></li><li style="list-style-type: disc"><p>Corrected the implementation of <tt>FXWindow#getCursorPosition</tt>. Previously it thought it needed three inputs when in fact it doesn't; this method takes no arguments and returns a 3-element array containing the current <tt>x</tt> and <tt>y</tt> positions (in local window coordinates) and a flag indicating the mouse button states.</p></li><li style="list-style-type: disc"><p>Corrected the implementation of <tt>FXDebugTarget.messageTypeName</tt> to return an array of strings instead of an array of symbols (IDs).</p></li><li style="list-style-type: disc"><p>Added missing wrappers for the <tt>FXJPEGImage</tt> and <tt>FXJPEGIcon</tt> classes; somehow these got overlooked previously.</p></li><li style="list-style-type: disc"><p>Corrected several bugs in the example programs <tt>groupbox.rb</tt>, <tt>imageviewer.rb</tt> and <tt>table.rb</tt>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e3189"></a>Changes Since Version 0.99.161</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>In previous releases of FXRuby, not all of the constructor arguments for some class constructors were exposed; this was due to an obscure problem with how SWIG generated code for functions with more than nine default arguments. This problem has been corrected and all class constructor argument lists should now be consistent with the C++ library versions of the same.</p></li><li style="list-style-type: disc"><p>Corrected several bugs related to the conversions between FOX's FXbool (boolean) type and Ruby's <tt>true</tt> and <tt>false</tt> values. These bugs manifested themselves in many weird and wonderful ways; the most obvious one was the way that opening up pulldown menus (for example, in the <tt>foursplit.rb</tt> example) would cause the entire program to lock up. If you were seeing some unusual behavior like this in the previous release my best advice is to see if you can still reproduce the problem (and if so, contact me).</p></li><li style="list-style-type: disc"><p>Added several new example programs (<tt>dialog.rb</tt>, <tt>dirlist.rb</tt>, <tt>groupbox.rb</tt>, <tt>header.rb</tt>, <tt>imageviewer.rb</tt>, <tt>tabbook.rb</tt> and <tt>table.rb</tt>) in the <tt>examples</tt> subdirectory.</p></li><li style="list-style-type: disc"><p>Added support for the <tt>FXFile</tt> class' singleton methods. Most or all of this functionality is already available in Ruby's standard library but <tt>FXFile</tt> is included for completeness.</p></li><li style="list-style-type: disc"><p>Generally speaking, I corrected the (Ruby-side) implementations of a lot of functions and I believe that all of the important ones are exposed correctly. See the <tt>ChangeLog</tt> file for specific cases.</p></li><li style="list-style-type: disc"><p>Started work on tutorial documentation (in the <tt>doc</tt> subdirectory) but this isn't very useful yet. Plans are to beef this up considerably next time.</p></li><li style="list-style-type: disc"><p>Updated the API for compatibility with FOX version 0.99.166.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e3262"></a>Changes Since Version 0.99.147</h2></div></div><div class="itemizedlist"><ul type="disc"><li><p>The code has been reworked a good deal in an effort to reduce the compile time (although more can and will be done). One part of this change was to break the extension code up into multiple files instead of a single file. The more significant change was to move a lot of inlined template function instantiations out of the FXRuby header file (<tt>FXRuby.h</tt>) and into a separate source code file that only needs to be compiled once. To give you an idea of the compile times after this change, I can now compile FXRuby under Cygwin-on-Win2000 in about 6 minutes (on a Pentium III-700MHz) or under Linux in about 30 minutes (on a Pentium "classic" 133MHz).</p></li><li><p>For classes <tt>FXHeader</tt>, <tt>FXIconList</tt> and <tt>FXList</tt>, added support for the overloaded member functions <tt>appendItem</tt>, <tt>insertItem</tt>, <tt>prependItem</tt>, and <tt>replaceItem</tt>. For classes <tt>FXTreeList</tt> and <tt>FXTreeListBox</tt>, added support for the overloaded member functions <tt>addItemAfter</tt>, <tt>addItemBefore</tt>, <tt>addItemFirst</tt>, and <tt>addItemLast</tt>.</p></li><li><p>Added the <tt>header.rb</tt> example program to demonstrate the <tt>FXHeader</tt> widget.</p></li><li><p >Updated the API for compatibility with FOX version 0.99.161.</p></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="todo.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="book.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">Chapter 10. To-do list </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html> \ No newline at end of file --- 14,16 ---- now be called in either of these equivalent forms:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">glviewer.backgroundColor = FXHVec.new(0.5, 0.5, 0.5, 1.0)</pre></td></tr></table> or ! <table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">glviewer.backgroundColor = [0.5, 0.5, 0.5, 1.0]</pre></td></tr></table></li><li style="list-style-type: disc"><p>Updated the test case for <tt>FXMaterial</tt>, added a new test case for <tt>FXFileStream</tt>.</p></li><li style="list-style-type: disc"><p>Added aliases <tt>posVisible?</tt> (for <tt>FXTextField#isPosVisible</tt>), <tt>posSelected?</tt> (for <tt>FXTextField#isPosSelected</tt>), <tt>itemCurrent?</tt> (for <tt>FXComboBox#isItemCurrent</tt>), <tt>hasAccel?</tt> (for <tt>FXAccelTable#hasAccel</tt>), <tt>error=</tt> (for <tt>FXStream#setError</tt>), <tt>position=</tt> (for <tt>FXStream#setPosition</tt>) and <tt>position</tt> (for <tt>FXStream#getPosition</tt>).</p></li><li style="list-style-type: disc"><p>The <tt>FXStream</tt>, <tt>FXFileStream</tt> and <tt>FXMemoryStream</tt> classes were not implemented properly, in the sense that if you subclassed one of these classes and then attempted to override one of their virtual functions, that override might not get called (see <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=535955&group_id=20243&atid=120243" target="_top">SourceForge Bug #535955</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>Did some more work on completing the <tt>FXDC</tt> interface, including adding a test case for the same. Also added a new example <tt>dctest.rb</tt> that demonstrates many of the <tt>FXDC</tt> interface.</p></li><li style="list-style-type: disc"><p>All GIF image files have now been replaced with PNG equivalents. For more information on why this is a good idea, see <a href="http://burnallgifs.org" target="_top">this site</a>.</p></li><li style="list-style-type: disc"><p>Starting with this release, Red Hat Linux 7.2 RPMs are now provided in addition to the Windows installer.</p></li><li style="list-style-type: disc"><p>The previous implementation of <tt>FXImage#data</tt> returned a copy of the underlying image pixel data instead of a pointer to the actual data (see <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=550996&group_id=20243&atid=120243" target="_top">SourceForge Bug #550996</a>). This has been fixed. <tt>FXImage#data</tt> now returns an instance of <tt>FXMemoryBuffer</tt> which is an array or string-like class that acts as a very thin layer over the pointer to the pixel data. The <tt>initialize</tt> methods for images and icons were also updated so that they will now accept either strings (as before) or <tt>FXMemoryBuffer</tt> instances as inputs for the image data.</p></li><li style="list-style-type: disc"><p>Modified the <tt>range</tt> and <tt>range=</tt> methods for <tt>FXDial</tt>, <tt>FXSlider</tt> and <tt>FXSpinner</tt> so that they work with Ruby <tt>Range</tt> objects instead of pairs of integers for the low and high values.</p></li><li style="list-style-type: disc"><p>Lots of other little fixes here and there...</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2253"></a>Changes Since Version 0.99.189</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Upgraded to the latest version of Minero Aoki's <tt>install.rb</tt> script.</p></li><li style="list-style-type: disc"><p>Switched from using DocBook/SGML to DocBook/XML for the FXRuby documentation. This is mainly a maintenance issue; it's just much less complicated to "publish" documents using DocBook/XML as compared to DocBook/SGML. You should see few (if any) differences in the resulting HTML pages, but let me know if you notice anything squirrely.</p></li><li style="list-style-type: disc"><p>Improved support for customized sorting of list items for the <tt>FXComboBox</tt>, <tt>FXIconList</tt>, <tt>FXList</tt>, <tt>FXListBox</tt>, <tt>FXTreeList</tt> and <tt>FXTreeListBox</tt> classes. The model is different from that used in the C++ FOX library, where you set a global sorting function for each list instance. For FXRuby, you instead just override the list item's <tt><=></tt> method to compare one list item to another. Thanks to Martin Stannard for prompting me to resolve this problem.</p></li><li style="list-style-type: disc"><p>Added instructions about how to modify your <tt>/etc/ld.so.conf</tt> file (on Linux) to include the <tt>libFOX.so</tt> installation directory. Thanks to Giuseppe Cacopardo for providing this information.</p></li><li style="list-style-type: disc"><p>Updated the test cases (again) for use with Nathaniel Talbott's <a href="http://testunit.talbott.ws" target="_top">TestUnit</a>, which is apparently the successor to Lapidary.</p></li><li style="list-style-type: disc"><p>Added support for the <tt>FXCURCursor</tt>, <tt>FXRGBIcon</tt>, <tt>FXRGBImage</tt> classes.</p></li><li style="list-style-type: disc"><p>Fixed a longstanding bug related to the ownership (for garbage collection purposes) of <tt>FXGLGroup</tt> and <tt>FXGLShape</tt> instances. This is the bug that was causing the <tt>glviewer.rb</tt> example program to crash on exit.</p></li><li style="list-style-type: disc"><p>Fixed a different (but also longstanding) bug related to FXRuby's hanging on to "stale" Ruby object references after those Ruby objects had already been garbage-collected. This bug manifested itself in a number of ways, but the most common symptom would be for an object (like an <tt>FXEvent</tt> instance) to suddenly lose its mind and believe it was some other object. Oh, and your program would usually crash at that point. I think this problem is now fixed.</p></li><li style="list-style-type: disc"><p>Added some safeguards for "destructive" functions like <tt>FXList#clearItems</tt>, which can destroy the C++ objects backing-up Ruby objects in FXRuby, so that any outstanding Ruby references to those destroyed C++ objects are left in a safe state when accessed by Ruby's garbage collector.</p></li><li style="list-style-type: disc"><p>Performed a major overhaul on the <tt>shutter.rb</tt> example program, which still demonstrates the <tt>FXShutter</tt> widget but otherwise doesn't resemble its previous incarnation at all.</p></li><li style="list-style-type: disc"><p>Added a new example program (<tt>raabrowser.rb</tt>) that allows you to browse the Ruby Application Archive via its SOAP interface. Requires the <a href="http://www.jin.gr.jp/~nahi/Ruby/SOAP4R" target="_top">SOAP4R</a> extension.</p></li><li style="list-style-type: disc"><p>Added a new example program (<tt>babelfish.rb</tt>) that allows you to use the Babelfish translator web service via its SOAP interface. Requires the <a href="http://www.jin.gr.jp/~nahi/Ruby/SOAP4R" target="_top">SOAP4R</a> extension.</p></li><li style="list-style-type: disc"><p>Added a new page to the documentation to briefly describe each of the example programs (including screenshots).</p></li><li style="list-style-type: disc"><p>The CVS repository for FXRuby is now hosted at the SourceForge site. For those who would like access to the latest version of FXRuby (in-between official releases) this is now an option. For more details, see the instructions at the <a href="http://sourceforge.net/cvs/?group_id=20243" target="_top">SourceForge project CVS page</a>.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="http://www.fox-toolkit.org/ftp/fox-1.0.3.tar.gz" target="_top">fox-1.0.3</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2383"></a>Changes Since Version 0.99.188</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Fixed a big bug related to the <tt>FXApp#addSignal</tt> and <tt>FXApp#removeSignal</tt> functions, which should accept a string signal name as an argument. The list of recognized signal names was not constructed properly and as a result most any call to these methods with a string signal name would fail. This has been corrected, and the methods now throw exceptions like those thrown from <tt>Process::kill</tt> when the signa l name is unrecognized or the argument type is wrong.</p></li><li style="list-style-type: disc"><p>The <tt>imageviewer.rb</tt> example program now supports loading TARGA, ICO and TIFF image files.</p></li><li style="list-style-type: disc"><p>The configuration process on Windows should now detect the presence of <tt>libtiff.lib</tt> properly.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="http://www.fox-toolkit.org/ftp/fox-0.99.189.tar.gz" target="_top">fox-0.99.189</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2417"></a>Changes Since Version 0.99.181</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Removed the <tt>-fno-strict-prototype</tt> and <tt>-fpermissive</tt> flags from the <tt>CFLAGS</tt> for Linux builds, since these two flags are no longer supported for more recent versions of gcc. Thanks to Thomas Lundqvist for reporting this.</p></li><li style="list-style-type: disc"><p>Some of the source files included in the previous release had DOS-style line endings and this caused gcc to choke while compiling them; this has been fixed. Thanks to Thomas Lundqvist for reporting this.</p></li><li style="list-style-type: disc"><p>Updated the FXRuby test cases (such as they are) to use Nathaniel Talbott's <a href="http://lapidary.sourceforge.net" target="_top">Lapidary</a> unit testing framework.</p></li><li style="list-style-type: disc"><p>Migrated yet more code from the C++ extension to pure Ruby versions. Most of the code for the <tt>FXPoint</tt>, <tt>FXRectangle</tt> and <tt>FXSize</tt> classes is now implemented in Ruby.</p></li><li style="list-style-type: disc"><p>Fixed a bug in the <tt>browser.rb</tt> example. I had meant for the methods and constants lists to be sorted but had failed to use the in-place <tt>sort!</tt> method. Thanks to Robert Gustavsson for reporting this.</p></li><li style="list-style-type: disc"><p>Completed a lot of the initial work for integrating the FXScintilla widget into FXRuby. This is not usable yet, but I'm working with Rich Kilmer and others to try to make this happen.</p></li><li style="list-style-type: disc"><p>Updated the build instructions to provide more information about building the Visual C++ version of FXRuby (i.e. for use with the Visual C++ build of Ruby) on Windows. Thanks to a final tip from Martin Stannard we now have a working build for this compiler.</p></li><li style="list-style-type: disc"><p>For fun, added a new example program that downloads today's Dilbert cartoon from the <a href="http://www.dilbertzone.com" target="_top">DilbertZone</a> web site and displays it in an <tt>FXImageViewer</tt> widget. Requires the <tt>html-parser</tt> module, listed in the <a href="http://www.ruby-lang.org/en/raa.html" target="_top">Ruby Application Archive</a>.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="http://www.fox-toolkit.org/ftp/fox-0.99.188.tar.gz" target="_top">fox-0.99.188</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2490"></a>Changes Since Version 0.99.180</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Added <tt>slices</tt>, <tt>stacks</tt> and <tt>loops</tt> accessors for the <tt>FXGLCone</tt> and <tt>FXGLCylinder</tt> classes, to provide finer control over the rendering fidelity for these shapes (this was already done for <tt>FXGLSphere</tt> in the previous release).</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.fox-toolkit.org/pub/fox-0.99.181.tar.gz" target="_top">fox-0.99.181</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2521"></a>Changes Since Version 0.99.174</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Moved the class definitions for <tt>FXGLPoint</tt>, <tt>FXGLLine</tt>, <tt>FXGLCube</tt>, <tt>FXGLCylinder</tt>, <tt>FXGLSphere</tt> and <tt>FXGLCone</tt> to a new library module <tt>fox/glshapes.rb</tt>. The interfaces are the same as the C++ versions of these classes, this is just a "pure Ruby" implementation of the classes instead of wrappers around the C++ classes. See <tt>examples/glviewer.rb</tt> for an example of their use.</p></li><li style="list-style-type: disc"><p>Fixed a bug related to object ownership for GL objects added to a <tt>FXGLGroup</tt>.</p></li><li style="list-style-type: disc"><p>Added support for overriding the virtual <tt>layout</tt> method in classes derived from <tt>FXWindow</tt>. This will allow developers to, for example, develop new kinds of layout managers.</p></li><li style="list-style-type: disc"><p>Replaced the previous WISE-based installer for the Windows version with an Inno Setup-based installer and reorganized things to better reflect the organization used in the standard Ruby installer.</p></li><li style="list-style-type: disc"><p>Updated the setup and build script to the latest version of Minero Aoki's scripts (version 3.0.2). The main change for FXRuby end-users is that the name of the build script is now <tt>install.rb</tt> instead of <tt>setup.rb</tt>.</p></li><li style="list-style-type: disc"><p>Added the <tt>colors.rb</tt> library file, for predefined co... [truncated message content] |
From: Lyle J. <ly...@us...> - 2002-05-14 14:16:15
|
Update of /cvsroot/fxruby/FXRuby/ext/fox In directory usw-pr-cvs1:/tmp/cvs-serv23733/ext/fox Modified Files: Tag: release10 FXRuby.cpp core_wrap.cpp dialogs_wrap.cpp icons_wrap.cpp image_wrap.cpp layout_wrap.cpp mdi_wrap.cpp opengl_wrap.cpp ui_wrap.cpp Log Message: Modified the range and range= methods for FXDial, FXSlider and FXSpinner to work with Ruby Range objects instead of (lo, hi) Fixnum pairs. Index: FXRuby.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/FXRuby.cpp,v retrieving revision 1.40.2.3 retrieving revision 1.40.2.4 diff -C2 -d -r1.40.2.3 -r1.40.2.4 *** FXRuby.cpp 8 May 2002 22:37:46 -0000 1.40.2.3 --- FXRuby.cpp 14 May 2002 14:15:42 -0000 1.40.2.4 *************** *** 862,865 **** --- 862,883 ---- //---------------------------------------------------------------------- + void FXRbRange2LoHi(VALUE range,FXint& lo,FXint& hi){ + if(Qtrue!=rb_obj_is_instance_of(range,rb_cRange)){ + rb_raise(rb_eTypeError,"wrong argument type %s (expected %s)",rb_class2name(CLASS_OF(range)),rb_class2name(rb_cRange)); + } + else{ + VALUE beg=rb_funcall(range,rb_intern("begin"),0,NULL); + VALUE end=rb_funcall(range,rb_intern("end"),0,NULL); + VALUE excl=rb_funcall(range,rb_intern("exclude_end?"),0,NULL); + lo=NUM2INT(beg); + hi=NUM2INT(end); + if(excl==Qtrue){ + hi--; + } + } + } + + //---------------------------------------------------------------------- + void FXRbCallVoidMethod(FXObject* recv, const char *func) { /* Index: core_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/core_wrap.cpp,v retrieving revision 1.62.2.12 retrieving revision 1.62.2.13 diff -C2 -d -r1.62.2.12 -r1.62.2.13 *** core_wrap.cpp 10 May 2002 20:12:31 -0000 1.62.2.12 --- core_wrap.cpp 14 May 2002 14:15:43 -0000 1.62.2.13 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020513-1710 * * This file is not intended to be easily readable and contains a number of Index: dialogs_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/dialogs_wrap.cpp,v retrieving revision 1.34.2.10 retrieving revision 1.34.2.11 diff -C2 -d -r1.34.2.10 -r1.34.2.11 *** dialogs_wrap.cpp 10 May 2002 22:23:13 -0000 1.34.2.10 --- dialogs_wrap.cpp 14 May 2002 14:15:51 -0000 1.34.2.11 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020513-1710 * * This file is not intended to be easily readable and contains a number of Index: icons_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/icons_wrap.cpp,v retrieving revision 1.37.2.11 retrieving revision 1.37.2.12 diff -C2 -d -r1.37.2.11 -r1.37.2.12 *** icons_wrap.cpp 10 May 2002 20:12:30 -0000 1.37.2.11 --- icons_wrap.cpp 14 May 2002 14:15:52 -0000 1.37.2.12 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020513-1710 * * This file is not intended to be easily readable and contains a number of Index: image_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/image_wrap.cpp,v retrieving revision 1.39.2.11 retrieving revision 1.39.2.12 diff -C2 -d -r1.39.2.11 -r1.39.2.12 *** image_wrap.cpp 10 May 2002 20:12:30 -0000 1.39.2.11 --- image_wrap.cpp 14 May 2002 14:15:52 -0000 1.39.2.12 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020513-1710 * * This file is not intended to be easily readable and contains a number of Index: layout_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/layout_wrap.cpp,v retrieving revision 1.8.2.10 retrieving revision 1.8.2.11 diff -C2 -d -r1.8.2.10 -r1.8.2.11 *** layout_wrap.cpp 10 May 2002 22:23:14 -0000 1.8.2.10 --- layout_wrap.cpp 14 May 2002 14:15:53 -0000 1.8.2.11 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020513-1710 * * This file is not intended to be easily readable and contains a number of Index: mdi_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/mdi_wrap.cpp,v retrieving revision 1.36.2.10 retrieving revision 1.36.2.11 diff -C2 -d -r1.36.2.10 -r1.36.2.11 *** mdi_wrap.cpp 10 May 2002 22:23:14 -0000 1.36.2.10 --- mdi_wrap.cpp 14 May 2002 14:15:53 -0000 1.36.2.11 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020513-1710 * * This file is not intended to be easily readable and contains a number of Index: opengl_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/opengl_wrap.cpp,v retrieving revision 1.41.2.11 retrieving revision 1.41.2.12 diff -C2 -d -r1.41.2.11 -r1.41.2.12 *** opengl_wrap.cpp 10 May 2002 22:23:14 -0000 1.41.2.11 --- opengl_wrap.cpp 14 May 2002 14:15:54 -0000 1.41.2.12 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020513-1710 * * This file is not intended to be easily readable and contains a number of Index: ui_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/ui_wrap.cpp,v retrieving revision 1.9.2.10 retrieving revision 1.9.2.11 diff -C2 -d -r1.9.2.10 -r1.9.2.11 *** ui_wrap.cpp 10 May 2002 22:23:17 -0000 1.9.2.10 --- ui_wrap.cpp 14 May 2002 14:15:55 -0000 1.9.2.11 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020513-1710 * * This file is not intended to be easily readable and contains a number of *************** *** 635,645 **** swig_class cFXLabel; static void free_FXRbLabel(FXRbLabel *); VALUE FXDial_getRange(FXDial const *self){ ! FXint lo, hi; ! self->getRange(lo, hi); ! VALUE result = rb_ary_new(); ! rb_ary_push(result, INT2NUM(lo)); ! rb_ary_push(result, INT2NUM(hi)); ! return result; } --- 635,647 ---- swig_class cFXLabel; static void free_FXRbLabel(FXRbLabel *); + void FXDial_setRange(FXDial *self,VALUE range){ + FXint lo,hi; + FXRbRange2LoHi(range,lo,hi); + self->setRange(lo,hi); + } VALUE FXDial_getRange(FXDial const *self){ ! FXint lo,hi; ! self->getRange(lo,hi); ! return rb_range_new(INT2NUM(lo),INT2NUM(hi),0); } *************** *** 723,734 **** swig_class cFXPacker; static void free_FXRbPacker(FXRbPacker *); VALUE FXSpinner_getRange(FXSpinner const *self){ ! FXint lo, hi; ! self->getRange(lo, hi); ! VALUE result = rb_ary_new(); ! rb_ary_push(result, INT2NUM(lo)); ! rb_ary_push(result, INT2NUM(hi)); ! return result; ! } swig_class cFX_Spinner; --- 725,738 ---- swig_class cFXPacker; static void free_FXRbPacker(FXRbPacker *); + void FXSpinner_setRange(FXSpinner *self,VALUE range){ + FXint lo,hi; + FXRbRange2LoHi(range,lo,hi); + self->setRange(lo,hi); + } VALUE FXSpinner_getRange(FXSpinner const *self){ ! FXint lo,hi; ! self->getRange(lo,hi); ! return rb_range_new(INT2NUM(lo),INT2NUM(hi),0); ! } swig_class cFX_Spinner; *************** *** 1228,1239 **** swig_class cFXDirList; static void free_FXRbDirList(FXRbDirList *); VALUE FXSlider_getRange(FXSlider const *self){ ! FXint lo, hi; ! self->getRange(lo, hi); ! VALUE result = rb_ary_new(); ! rb_ary_push(result, INT2NUM(lo)); ! rb_ary_push(result, INT2NUM(hi)); ! return result; ! } swig_class cFX_Slider; --- 1232,1245 ---- swig_class cFXDirList; static void free_FXRbDirList(FXRbDirList *); + void FXSlider_setRange(FXSlider *self,VALUE range){ + FXint lo,hi; + FXRbRange2LoHi(range,lo,hi); + self->setRange(lo,hi); + } VALUE FXSlider_getRange(FXSlider const *self){ ! FXint lo,hi; ! self->getRange(lo,hi); ! return rb_range_new(INT2NUM(lo),INT2NUM(hi),0); ! } swig_class cFX_Slider; *************** *** 9298,9310 **** _wrap_FX_Dial_setRange(int argc, VALUE *argv, VALUE self) { FXDial *arg1 ; ! FXint arg2 ; ! FXint arg3 ; ! if ((argc < 2) || (argc > 2)) ! rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); arg1 = (FXDial *) SWIG_ConvertPtr(self, SWIGTYPE_p_FXDial); ! arg2 = NUM2INT(argv[0]); ! arg3 = NUM2INT(argv[1]); ! (arg1)->setRange(arg2,arg3); return Qnil; --- 9304,9314 ---- _wrap_FX_Dial_setRange(int argc, VALUE *argv, VALUE self) { FXDial *arg1 ; ! VALUE arg2 ; ! if ((argc < 1) || (argc > 1)) ! rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); arg1 = (FXDial *) SWIG_ConvertPtr(self, SWIGTYPE_p_FXDial); ! arg2 = argv[0]; ! FXDial_setRange(arg1,arg2); return Qnil; *************** *** 26965,26977 **** _wrap_FX_Spinner_setRange(int argc, VALUE *argv, VALUE self) { FXSpinner *arg1 ; ! FXint arg2 ; ! FXint arg3 ; ! if ((argc < 2) || (argc > 2)) ! rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); arg1 = (FXSpinner *) SWIG_ConvertPtr(self, SWIGTYPE_p_FXSpinner); ! arg2 = NUM2INT(argv[0]); ! arg3 = NUM2INT(argv[1]); ! (arg1)->setRange(arg2,arg3); return Qnil; --- 26969,26979 ---- _wrap_FX_Spinner_setRange(int argc, VALUE *argv, VALUE self) { FXSpinner *arg1 ; ! VALUE arg2 ; ! if ((argc < 1) || (argc > 1)) ! rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); arg1 = (FXSpinner *) SWIG_ConvertPtr(self, SWIGTYPE_p_FXSpinner); ! arg2 = argv[0]; ! FXSpinner_setRange(arg1,arg2); return Qnil; *************** *** 72045,72057 **** _wrap_FX_Slider_setRange(int argc, VALUE *argv, VALUE self) { FXSlider *arg1 ; ! FXint arg2 ; ! FXint arg3 ; ! if ((argc < 2) || (argc > 2)) ! rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); arg1 = (FXSlider *) SWIG_ConvertPtr(self, SWIGTYPE_p_FXSlider); ! arg2 = NUM2INT(argv[0]); ! arg3 = NUM2INT(argv[1]); ! (arg1)->setRange(arg2,arg3); return Qnil; --- 72047,72057 ---- _wrap_FX_Slider_setRange(int argc, VALUE *argv, VALUE self) { FXSlider *arg1 ; ! VALUE arg2 ; ! if ((argc < 1) || (argc > 1)) ! rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); arg1 = (FXSlider *) SWIG_ConvertPtr(self, SWIGTYPE_p_FXSlider); ! arg2 = argv[0]; ! FXSlider_setRange(arg1,arg2); return Qnil; |
From: Lyle J. <ly...@us...> - 2002-05-14 14:16:15
|
Update of /cvsroot/fxruby/FXRuby/examples In directory usw-pr-cvs1:/tmp/cvs-serv23733/examples Modified Files: Tag: release10 dctest.rb groupbox.rb Log Message: Modified the range and range= methods for FXDial, FXSlider and FXSpinner to work with Ruby Range objects instead of (lo, hi) Fixnum pairs. Index: dctest.rb =================================================================== RCS file: /cvsroot/fxruby/FXRuby/examples/Attic/dctest.rb,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** dctest.rb 13 May 2002 21:58:37 -0000 1.1.2.2 --- dctest.rb 14 May 2002 14:15:41 -0000 1.1.2.3 *************** *** 377,381 **** @lineWidthSpinner = FXSpinner.new(linew, 4, nil, 0, SPIN_NORMAL|FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_COLUMN) @lineWidthSpinner.connect(SEL_COMMAND) { @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) } ! @lineWidthSpinner.setRange(1, 255) @lineWidthSpinner.value = 1 --- 377,381 ---- @lineWidthSpinner = FXSpinner.new(linew, 4, nil, 0, SPIN_NORMAL|FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_COLUMN) @lineWidthSpinner.connect(SEL_COMMAND) { @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) } ! @lineWidthSpinner.range = 1..255 @lineWidthSpinner.value = 1 *************** *** 436,440 **** FXTextField.new(arcangles, 4, @ang1, FXDataTarget::ID_VALUE, TEXTFIELD_INTEGER|JUSTIFY_RIGHT|FRAME_SUNKEN|FRAME_THICK) sang1 = FXSlider.new(arcangles, @ang1, FXDataTarget::ID_VALUE, LAYOUT_CENTER_Y|LAYOUT_FILL_X|SLIDER_INSIDE_BAR|LAYOUT_FILL_COLUMN) ! sang1.setRange(-360, 360) @ang2 = FXDataTarget.new(90) --- 436,440 ---- FXTextField.new(arcangles, 4, @ang1, FXDataTarget::ID_VALUE, TEXTFIELD_INTEGER|JUSTIFY_RIGHT|FRAME_SUNKEN|FRAME_THICK) sang1 = FXSlider.new(arcangles, @ang1, FXDataTarget::ID_VALUE, LAYOUT_CENTER_Y|LAYOUT_FILL_X|SLIDER_INSIDE_BAR|LAYOUT_FILL_COLUMN) ! sang1.range = -360..360 @ang2 = FXDataTarget.new(90) *************** *** 442,446 **** FXTextField.new(arcangles, 4, @ang2, FXDataTarget::ID_VALUE, TEXTFIELD_INTEGER|JUSTIFY_RIGHT|FRAME_SUNKEN|FRAME_THICK) sang2 = FXSlider.new(arcangles, @ang2, FXDataTarget::ID_VALUE, LAYOUT_CENTER_Y|LAYOUT_FILL_X|SLIDER_INSIDE_BAR|LAYOUT_FILL_COLUMN) ! sang2.setRange(-360, 360) # Font --- 442,446 ---- FXTextField.new(arcangles, 4, @ang2, FXDataTarget::ID_VALUE, TEXTFIELD_INTEGER|JUSTIFY_RIGHT|FRAME_SUNKEN|FRAME_THICK) sang2 = FXSlider.new(arcangles, @ang2, FXDataTarget::ID_VALUE, LAYOUT_CENTER_Y|LAYOUT_FILL_X|SLIDER_INSIDE_BAR|LAYOUT_FILL_COLUMN) ! sang2.range = -360..360 # Font Index: groupbox.rb =================================================================== RCS file: /cvsroot/fxruby/FXRuby/examples/groupbox.rb,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** groupbox.rb 2 Apr 2002 22:27:54 -0000 1.12 --- groupbox.rb 14 May 2002 14:15:42 -0000 1.12.2.1 *************** *** 220,224 **** slider = FXSlider.new(group2, nil, 0, (LAYOUT_TOP|LAYOUT_FILL_X| LAYOUT_FIX_HEIGHT|SLIDER_HORIZONTAL|SLIDER_INSIDE_BAR), 0, 0, 200, 20) ! slider.setRange(0, 3) frame = FXHorizontalFrame.new(group2, LAYOUT_FILL_X|LAYOUT_FILL_Y) --- 220,224 ---- slider = FXSlider.new(group2, nil, 0, (LAYOUT_TOP|LAYOUT_FILL_X| LAYOUT_FIX_HEIGHT|SLIDER_HORIZONTAL|SLIDER_INSIDE_BAR), 0, 0, 200, 20) ! slider.range = 0..3 frame = FXHorizontalFrame.new(group2, LAYOUT_FILL_X|LAYOUT_FILL_Y) *************** *** 279,283 **** spinner = FXSpinner.new(group3, 20, nil, 0, SPIN_NORMAL|FRAME_SUNKEN|FRAME_THICK|LAYOUT_SIDE_TOP) ! spinner.setRange(1, 20) combobox = FXComboBox.new(group3, 5, 5, nil, 0, --- 279,283 ---- spinner = FXSpinner.new(group3, 20, nil, 0, SPIN_NORMAL|FRAME_SUNKEN|FRAME_THICK|LAYOUT_SIDE_TOP) ! spinner.range = 1..20 combobox = FXComboBox.new(group3, 5, 5, nil, 0, |
From: Lyle J. <ly...@us...> - 2002-05-14 14:16:15
|
Update of /cvsroot/fxruby/FXRuby/examples/textedit In directory usw-pr-cvs1:/tmp/cvs-serv23733/examples/textedit Modified Files: Tag: release10 prefdialog.rb Log Message: Modified the range and range= methods for FXDial, FXSlider and FXSpinner to work with Ruby Range objects instead of (lo, hi) Fixnum pairs. Index: prefdialog.rb =================================================================== RCS file: /cvsroot/fxruby/FXRuby/examples/textedit/prefdialog.rb,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** prefdialog.rb 2 Apr 2002 22:27:54 -0000 1.4 --- prefdialog.rb 14 May 2002 14:15:42 -0000 1.4.2.1 *************** *** 166,170 **** (JUSTIFY_RIGHT|FRAME_SUNKEN|FRAME_THICK|LAYOUT_CENTER_Y|LAYOUT_LEFT| LAYOUT_FILL_COLUMN|LAYOUT_FILL_ROW)) ! spinner.setRange(1, 100) # Button 2 --- 166,170 ---- (JUSTIFY_RIGHT|FRAME_SUNKEN|FRAME_THICK|LAYOUT_CENTER_Y|LAYOUT_LEFT| LAYOUT_FILL_COLUMN|LAYOUT_FILL_ROW)) ! spinner.range = 1..100 # Button 2 |
From: Lyle J. <ly...@us...> - 2002-05-14 14:16:06
|
Update of /cvsroot/fxruby/FXRuby/lib/fox In directory usw-pr-cvs1:/tmp/cvs-serv23733/lib/fox Modified Files: Tag: release10 aliases.rb Log Message: Modified the range and range= methods for FXDial, FXSlider and FXSpinner to work with Ruby Range objects instead of (lo, hi) Fixnum pairs. Index: aliases.rb =================================================================== RCS file: /cvsroot/fxruby/FXRuby/lib/fox/aliases.rb,v retrieving revision 1.24.2.4 retrieving revision 1.24.2.5 diff -C2 -d -r1.24.2.4 -r1.24.2.5 *** aliases.rb 13 May 2002 21:33:09 -0000 1.24.2.4 --- aliases.rb 14 May 2002 14:16:03 -0000 1.24.2.5 *************** *** 235,238 **** --- 235,240 ---- end class FX_Dial + alias range getRange + alias range= setRange alias value getValue alias value= setValue *************** *** 1011,1014 **** --- 1013,1018 ---- alias value= setValue alias value getValue + alias range= setRange + alias range getRange alias sliderStyle getSliderStyle alias sliderStyle= setSliderStyle *************** *** 1035,1038 **** --- 1039,1044 ---- alias value= setValue alias value getValue + alias range= setRange + alias range getRange alias font= setFont alias font getFont |
From: Lyle J. <ly...@us...> - 2002-05-14 14:16:06
|
Update of /cvsroot/fxruby/FXRuby/swig-interfaces In directory usw-pr-cvs1:/tmp/cvs-serv23733/swig-interfaces Modified Files: Tag: release10 FXDial.i FXSlider.i FXSpinner.i Log Message: Modified the range and range= methods for FXDial, FXSlider and FXSpinner to work with Ruby Range objects instead of (lo, hi) Fixnum pairs. Index: FXDial.i =================================================================== RCS file: /cvsroot/fxruby/FXRuby/swig-interfaces/FXDial.i,v retrieving revision 1.17.2.1 retrieving revision 1.17.2.2 diff -C2 -d -r1.17.2.1 -r1.17.2.2 *** FXDial.i 6 May 2002 19:16:29 -0000 1.17.2.1 --- FXDial.i 14 May 2002 14:16:03 -0000 1.17.2.2 *************** *** 77,97 **** FXint getValue() const; - /// Change the dial's range - void setRange(FXint lo,FXint hi); - #ifdef SWIGRUBY %extend { /// Obtain the current range of the dial VALUE getRange() const { ! FXint lo, hi; ! self->getRange(lo, hi); ! VALUE result = rb_ary_new(); ! rb_ary_push(result, INT2NUM(lo)); ! rb_ary_push(result, INT2NUM(hi)); ! return result; } } #endif #ifdef SWIGPYTHON %extend { PyObject* getRange() const { --- 77,101 ---- FXint getValue() const; #ifdef SWIGRUBY %extend { + /// Change the dial's range + void setRange(VALUE range){ + FXint lo,hi; + FXRbRange2LoHi(range,lo,hi); + self->setRange(lo,hi); + } + /// Obtain the current range of the dial VALUE getRange() const { ! FXint lo,hi; ! self->getRange(lo,hi); ! return rb_range_new(INT2NUM(lo),INT2NUM(hi),0); } } #endif #ifdef SWIGPYTHON + /// Change the dial's range + void setRange(FXint lo,FXint hi) + %extend { PyObject* getRange() const { Index: FXSlider.i =================================================================== RCS file: /cvsroot/fxruby/FXRuby/swig-interfaces/FXSlider.i,v retrieving revision 1.18.2.1 retrieving revision 1.18.2.2 diff -C2 -d -r1.18.2.1 -r1.18.2.2 *** FXSlider.i 6 May 2002 19:16:29 -0000 1.18.2.1 --- FXSlider.i 14 May 2002 14:16:03 -0000 1.18.2.2 *************** *** 100,120 **** FXint getValue() const; - /// Change the slider's range - void setRange(FXint lo,FXint hi); - #ifdef SWIGRUBY %extend { /// Get the slider's current range VALUE getRange() const { ! FXint lo, hi; ! self->getRange(lo, hi); ! VALUE result = rb_ary_new(); ! rb_ary_push(result, INT2NUM(lo)); ! rb_ary_push(result, INT2NUM(hi)); ! return result; ! } } #endif #ifdef SWIGPYTHON %extend { PyObject* getRange() const { --- 100,124 ---- FXint getValue() const; #ifdef SWIGRUBY %extend { + /// Change the slider's range + void setRange(VALUE range){ + FXint lo,hi; + FXRbRange2LoHi(range,lo,hi); + self->setRange(lo,hi); + } + /// Get the slider's current range VALUE getRange() const { ! FXint lo,hi; ! self->getRange(lo,hi); ! return rb_range_new(INT2NUM(lo),INT2NUM(hi),0); ! } } #endif #ifdef SWIGPYTHON + /// Change the slider's range + void setRange(FXint lo,FXint hi); + %extend { PyObject* getRange() const { Index: FXSpinner.i =================================================================== RCS file: /cvsroot/fxruby/FXRuby/swig-interfaces/FXSpinner.i,v retrieving revision 1.20.2.1 retrieving revision 1.20.2.2 diff -C2 -d -r1.20.2.1 -r1.20.2.2 *** FXSpinner.i 6 May 2002 19:16:29 -0000 1.20.2.1 --- FXSpinner.i 14 May 2002 14:16:04 -0000 1.20.2.2 *************** *** 99,119 **** FXint getValue() const; - /// Change the spinner's range - void setRange(FXint lo,FXint hi); - #ifdef SWIGRUBY %extend { /// Get the spinner's current range VALUE getRange() const { ! FXint lo, hi; ! self->getRange(lo, hi); ! VALUE result = rb_ary_new(); ! rb_ary_push(result, INT2NUM(lo)); ! rb_ary_push(result, INT2NUM(hi)); ! return result; ! } } #endif #ifdef SWIGPYTHON %extend { PyObject* getRange() const { --- 99,125 ---- FXint getValue() const; #ifdef SWIGRUBY + %extend { + /// Change the spinner's range + void setRange(VALUE range){ + FXint lo,hi; + FXRbRange2LoHi(range,lo,hi); + self->setRange(lo,hi); + } + /// Get the spinner's current range VALUE getRange() const { ! FXint lo,hi; ! self->getRange(lo,hi); ! return rb_range_new(INT2NUM(lo),INT2NUM(hi),0); ! } } #endif + #ifdef SWIGPYTHON + /// Change the spinner's range + void setRange(FXint lo,FXint hi); + %extend { PyObject* getRange() const { |
From: Lyle J. <ly...@us...> - 2002-05-14 14:16:06
|
Update of /cvsroot/fxruby/FXRuby/ext/fox/include In directory usw-pr-cvs1:/tmp/cvs-serv23733/ext/fox/include Modified Files: Tag: release10 FXRuby.h Log Message: Modified the range and range= methods for FXDial, FXSlider and FXSpinner to work with Ruby Range objects instead of (lo, hi) Fixnum pairs. Index: FXRuby.h =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/include/FXRuby.h,v retrieving revision 1.21.2.3 retrieving revision 1.21.2.4 diff -C2 -d -r1.21.2.3 -r1.21.2.4 *** FXRuby.h 8 May 2002 22:37:46 -0000 1.21.2.3 --- FXRuby.h 14 May 2002 14:16:03 -0000 1.21.2.4 *************** *** 247,250 **** --- 247,253 ---- } + // Returns the beginning and ending values (inclusive) for a Range object + void FXRbRange2LoHi(VALUE range,FXint& lo,FXint& hi); + // Call function with "void" return value void FXRbCallVoidMethod(FXObject* recv, |
From: Lyle J. <ly...@us...> - 2002-05-13 22:40:49
|
Update of /cvsroot/fxruby/FXRuby/examples In directory usw-pr-cvs1:/tmp/cvs-serv27438 Modified Files: Tag: release10 datatarget.rb Log Message: Fixed a little typo in the comments. Index: datatarget.rb =================================================================== RCS file: /cvsroot/fxruby/FXRuby/examples/datatarget.rb,v retrieving revision 1.10.2.1 retrieving revision 1.10.2.2 diff -C2 -d -r1.10.2.1 -r1.10.2.2 *** datatarget.rb 30 Apr 2002 19:45:01 -0000 1.10.2.1 --- datatarget.rb 13 May 2002 22:40:46 -0000 1.10.2.2 *************** *** 83,87 **** 0, 0, 20, 0) ! # Arange nicely matrix = FXMatrix.new(self, 7, MATRIX_BY_COLUMNS|LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y) --- 83,87 ---- 0, 0, 20, 0) ! # Arrange nicely matrix = FXMatrix.new(self, 7, MATRIX_BY_COLUMNS|LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y) |
Update of /cvsroot/fxruby/FXRuby/examples/icons In directory usw-pr-cvs1:/tmp/cvs-serv7402/examples/icons Added Files: Tag: release10 capbutt.png capnotlast.png capproj.png capround.png dippy.png double_dash.png jbevel.png jmiter.png jround.png onoff_dash.png solid_line.png Removed Files: Tag: release10 capbutt.gif capnotlast.gif capproj.gif capround.gif dippy.gif double_dash.gif jbevel.gif jmiter.gif jround.gif onoff_dash.gif solid_line.gif Log Message: Converted all of the GIF icon and image files used by DCTest to PNG equivalents. --- NEW FILE: capbutt.png --- PNG --- NEW FILE: capnotlast.png --- PNG --- NEW FILE: capproj.png --- PNG --- NEW FILE: capround.png --- PNG --- NEW FILE: dippy.png --- PNG H Hogsks-20602b`LB_^chq\kqkkussp{ µ11¦..{vUf_Vcc{{kkk{{s^kcZg¥g©¥g ==£ò¾ùîÑ=ìÛÿÊØWà ø/=cûeµFüÓ#?øGÿA^5ûÀÏýûv/|õ,-ßÌVf~ÿÞ_ÿ娏"©Ú¿ÉTî+3Vù×ùPôó±¿ ~Äd$%r¥±þó{ é¯~ðó¿³Æ!p/ÈÁijüþ½·þxöì[úÑ%ø{%ë%ú"p|¹4\¾`#åOÜõ"$wsº¼<+,¤ü®X./çòû|S,M!S.~C_ÊåD¢P,J¥2§OÐ¥âº]Òâ`â\a²8Y6@Ç«L®g`(BáÀ<S%W-~`ª*u* ¹1±Añ!e 8AE¯ºªhNWÊí`0V$¬(à('¨ðJWÕÿíºRntwöÂ\2Nؤ,BÀÈ¢%1È«ê¦M}¥Üîìîîìì r\Å⢼>z»ïë¢Ü@7ºQt`Ñ5)ÑUº £y[°R~ìµFà$þªRÒ0ºd) æÚ)e(h[´tÞn§- ÌðÁ+Áε´fo½ C½Ýí2ß×aD%üQ;¥Ü TUJ{Ó ¡¼ _j§´E PioZAçÚd(ÜùV;¥Õ½®í¾ÓN)[¬5( ;),Wf'´OoJ;¡|Û{¥Ý}ÙÌ mYôJ[¥Ô`AÏ¥ÓCCáÚVjª¡ãxçNæ´$m1Tí¢µoBwRi¯' +ÂÅ0JÔ5ÜX¥RH_¶©´µÕ¡¾ì¤¢µSÉ£ÔuõQÒØ´¢®§+jêèËN{t¦*¤Úýªnп7Ã+iEÓk Éÿ¾Rúr^êïPÜo¤¼ KÜërö!{. RhÚ'+ïÛ0D;Çåål6û¢ ò×̵8û², $#@ÔrÒCÖZ}Y òUé^º4 -§ªUó{KÊç²Ïþdxǯææ",/¶SPÉÑIJ Ïû&SS_{=ûÄÖÑáí/|2÷ïÞÛ*9¢[j²ý ³Vý5èP«»sG³Ò¢OHRÀ_d]¿ûõ/¶ Tøáí}uï5¿+9kö!-) &Ù=§drK¡ö?½ã£»sOð²ä*´¢þ¬ÃO?ý"ÈTuà1:*@NÙTæ` KÍÿRè»ü(=eáuh~«/ß ¾,»¼èHÉáÿûðpÿ(ÿâÖ¤<ÜûÄóÏ ÷Ó|5Ü^2«Ô©ì¡-¼ñ<I¶/ ´"Ë·[rtÖ#Yô9¨XÙ¸÷üß>)?CRþÞÃ+´¦¹ b÷ùáÛû1{VäË+0û§b\%c»ÖþK¹dúèî¼Æç$¯HY*KzÕ¦"Ô½ ߯}ùî°UeÌB'ãæÜY~øL?éËü/òWèWõøÌú(@_ªyèBn¯ÐóøKÙDå¹¹è?j^YμðÜðOQZé3òÞ^¡âÛ¼Çgòoã÷qÔðñLcNó¢"/T«oßûúMÓÇ+r¯j¨ª¢(FÀÇ+Í\O*RnA-ªðñ¬Ò¡"y| âíIaFEÎ*Z- y{%¥n5Ï¿$eï:¤T}¼"SÈqº7©jDÝT}¼BCæíI¹Q4Sñûì¨ÈUú²¯W$ 9®êýd)¯£ ~^¡!Å𣢨XW¶õñdIññ@¡3ûRÉâ ~^Ö^ ¢âíKñóBA/)®yÜ÷öDc2ü¼É¡NrßÛ+ý4& 5_*XîíÆ,ÎðóJe8LÅYÆâÃr»Wht %¼"ÛT¼Ò )þTd¯ )¾^ª?¯ðTîS0ý©ä~^RÙ`©ùzEÊa*¹ª¦ålUxJ¢"ÃÛY¹æÔjµªU±¦$ÐȵKzE·÷²¹|5/SÉ*KRQ ÷\ @À×+êAGR¡%ð¥"Û+ NR!T|¼Â£¿ ±¡xyEi) ȾyKq; Þý,Y*ÄzsËIjJð²WHÕYÑ|ÜÏ ]*J·W'&§PI.G ܦ.{µ=*Þ^Á£¯Ù¼¿@SI çUpOiãÑK)D·Wx kÊ÷#øPÁ®m\ÅÒØ=h¢âåÉ̬@ý¾No*85ì^ÒWÈ{z ¯QyqåÃàfä¼^5¦âô ÕR§âá¨n*íýQá]oXÿäÜVäå¨Ò°RVÝrëAE {dfwܪn¯Dù~¡Î}ÿJãìì«Î²Îðæ³¬Ë+QïgìîÕ!Êø® h)H¼ÖÌ</õ÷gX# ìÞìWûñ½,¬;iÞãÔÈEèg4ê8ì6QQvG2 ¦Bã:ËBL³i×/£î(øþM*Â| @ÑrZ×5UºØQA7Ö®}M> bT%[`R3sÅ8}úÌé3º^ËâߨQ©ézOL>£éZMõI%fÃDÒÞ&§OMGZI'|Pðã/ºFåJ¥jã¬@ó*®WµjNb$¥HÆÝÐò z'¯jy×ú=¢¦+ }'þ'B岪©ªÂdXF³yO2ºiºö.rÊÄüTª0Òc1ô3gï-`Ò@ε̢ ¢k è8©%²¬0éÌ61 ÷*'-)HKVVÌá÷TòþrÉ#GBÅRdEgÑBvFÉêÖw!èð÷à°¨ »<ühï¿i(ÉCEett¤ì ¾¨À4kE(9IR2'Ñ¢ÂorFȲbÏc!ðó¨ ö|lüø8"sâСÝ[=ÈÆGÙ<jQGZïÆBöììÙ·ôDÑÎ *Ø+ò¦ÇÆÆ6ÇAÍadÝûöíÛ ¤X^Ùñؾ:ÜVðóØøáñC2GÌW2Ê&+zÆ6DVtR7Yd[²wÓb<Ö³zG *Y奦ômrÅcÃ>A`³ûeQɵjÄRÀ×UÁÇûW:²ë!-b(D¬} Dù%<ZÕtÿyÎ&aS= +ß³xvù>ñ zAKÍP¡uìöÉDíçóô¿_ßi`Q±ÄÔjßÂÔMÉ¥&JdF{êÖÝnöÄ$jpÄSâ¹b©<SyIÊd¯^ûâKÊß gQqÜ©wÃj5óþ?.K ÉÒteú)ÚTÈóýîwNqÍ1Äiû{Òë ²Ë+TÒÀ!ÜPÓL¨xl̦-¯,VÊR,¯xHj¶J =âm.¯¢MEö¡²Ù+¡Ëí¢vyå:])ñÇ4ÀV¸¥*î§;4; KQ¦²@¼â¦2nòJR¤Ý@~T>ã¼KQ¶íW>µ($Èè+åÁµkk0l*û öëÄ!ñÊíóÞ:nL+ÍÞ\=ì÷Ìè:ñH¢2S´ü"zHùüÊùÁz?¹º&T$7ËÄ#¥Ê åÔÔµVøkÎ¥bu/3«;üÐ$^ɹW¢dº¯+vZåÙ«_|ñåç×®^ømBlL; ëxð@Wɾò°ékÌ+)ìsÐ>v^IÆ":íoªxNLÅÃî¼Shy.þÅçëûûò×ß0sÝòG©RIÙ¹%ãsMSm ³NgìþÎþ¶Û÷âXsKκ¹åæáb([p¢(KøÃ«÷k²R¨T u/ÄcÜÒÑÛªù$ç,Qª>9z¸V©º¸ð%¹U)·ñÙb 5dO®UÊдOyÑqn¯´,åF#üÍÿDÊKIÔ_bô;¯,ãÖ©\·¼²X¹ {oÎÅH"øGäDè9¸ B©\)'â~^iYÊ)*oAF¹:S¥¬B§ã)È"±½V<HWN¹¼Â n¾üÃL ísREP _§ D*¡ó¡)èxSåJa°î¡li*ó×*Ób86eZLrMg§N&âM ñQvBη,ÅÃ+T`ëç¦&¸xÉç¼Ýr uqq±RhÊJ(\ õÏ/ÅeÏÜ vbRN´¾¦Þæö 7KöyºW\öÌÝz-áÖWI·WRÜ }ÆnyKä$b ©[¹¼"EÛ¥x(Q^ÁùÌV-AïãB.d¸$Å:ȱ+&½CçB¦[®Ì']^Åi»Ý!Ñ®Ø'åD(¼ &hã¢'T¦âáÄÊÌS!ðÉjÔ×Ý^0i+B±¢Û¥bÙÛ'à*ðÉÕptÝ |FWÏ)O%Ðè,z0)&Ñé¡C«:àèW §$¸úøCjiR¬ÿË'ùdhU{Ý?é¦;<¦Ùƺ.50I ZÂ-wÒ<Û+0$ÈøFw½/ã²Éj÷ÅÒn&+*)qdXh-«Ý ¹ÚöÙ*Ì·Æ$ÉõnnȰÜЪ¯C1O¯,[!ëÌ÷Ê&¡ô\¹kK=ÃBYÜt}úgzEĹf --- NEW FILE: double_dash.png --- PNG --- NEW FILE: jbevel.png --- PNG Æ --- NEW FILE: jmiter.png --- PNG Æ --- NEW FILE: jround.png --- PNG Æ --- NEW FILE: onoff_dash.png --- PNG Æ 1¢ÚÒí --- NEW FILE: solid_line.png --- PNG --- capbutt.gif DELETED --- --- capnotlast.gif DELETED --- --- capproj.gif DELETED --- --- capround.gif DELETED --- --- dippy.gif DELETED --- --- double_dash.gif DELETED --- --- jbevel.gif DELETED --- --- jmiter.gif DELETED --- --- jround.gif DELETED --- --- onoff_dash.gif DELETED --- --- solid_line.gif DELETED --- |
From: Lyle J. <ly...@us...> - 2002-05-13 21:58:41
|
Update of /cvsroot/fxruby/FXRuby/examples In directory usw-pr-cvs1:/tmp/cvs-serv7402/examples Modified Files: Tag: release10 dctest.rb Log Message: Converted all of the GIF icon and image files used by DCTest to PNG equivalents. Index: dctest.rb =================================================================== RCS file: /cvsroot/fxruby/FXRuby/examples/Attic/dctest.rb,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** dctest.rb 13 May 2002 21:30:28 -0000 1.1.2.1 --- dctest.rb 13 May 2002 21:58:37 -0000 1.1.2.2 *************** *** 164,168 **** linestyle.padTop = 2 linestyle.padBottom = 2 ! lineSolidBtn = FXButton.new(linestyle, "\tLINE_SOLID", loadIcon("solid_line.gif", 0, IMAGE_OPAQUE), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) lineSolidBtn.connect(SEL_COMMAND) do |sender, sel, ptr| @lineStyle = LINE_SOLID --- 164,168 ---- linestyle.padTop = 2 linestyle.padBottom = 2 ! lineSolidBtn = FXButton.new(linestyle, "\tLINE_SOLID", loadIcon("solid_line.png", 0, IMAGE_OPAQUE), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) lineSolidBtn.connect(SEL_COMMAND) do |sender, sel, ptr| @lineStyle = LINE_SOLID *************** *** 176,180 **** end end ! lineOnOffDashBtn = FXButton.new(linestyle, "\tLINE_ONOFF_DASH", loadIcon("onoff_dash.gif", FXRGB(0xb2, 0xc0, 0xdc), IMAGE_ALPHACOLOR), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) lineOnOffDashBtn.connect(SEL_COMMAND) do |sender, sel, ptr| @lineStyle = LINE_ONOFF_DASH --- 176,180 ---- end end ! lineOnOffDashBtn = FXButton.new(linestyle, "\tLINE_ONOFF_DASH", loadIcon("onoff_dash.png"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) lineOnOffDashBtn.connect(SEL_COMMAND) do |sender, sel, ptr| @lineStyle = LINE_ONOFF_DASH *************** *** 188,192 **** end end ! lineDoubleDashBtn = FXButton.new(linestyle, "\tLINE_DOUBLE_DASH", loadIcon("double_dash.gif", 0, IMAGE_OPAQUE), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) lineDoubleDashBtn.connect(SEL_COMMAND) do |sender, sel, ptr| @lineStyle = LINE_DOUBLE_DASH --- 188,192 ---- end end ! lineDoubleDashBtn = FXButton.new(linestyle, "\tLINE_DOUBLE_DASH", loadIcon("double_dash.png", 0, IMAGE_OPAQUE), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) lineDoubleDashBtn.connect(SEL_COMMAND) do |sender, sel, ptr| @lineStyle = LINE_DOUBLE_DASH *************** *** 208,212 **** capstyle.padTop = 2 capstyle.padBottom = 2 ! btn = FXButton.new(capstyle, "\tCAP_NOT_LAST", loadIcon("capnotlast.gif"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @capStyle = CAP_NOT_LAST --- 208,212 ---- capstyle.padTop = 2 capstyle.padBottom = 2 ! btn = FXButton.new(capstyle, "\tCAP_NOT_LAST", loadIcon("capnotlast.png"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @capStyle = CAP_NOT_LAST *************** *** 220,224 **** end end ! btn = FXButton.new(capstyle, "\tCAP_BUTT", loadIcon("capbutt.gif"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @capStyle = CAP_BUTT --- 220,224 ---- end end ! btn = FXButton.new(capstyle, "\tCAP_BUTT", loadIcon("capbutt.png"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @capStyle = CAP_BUTT *************** *** 232,236 **** end end ! btn = FXButton.new(capstyle, "\tCAP_ROUND", loadIcon("capround.gif"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @capStyle = CAP_ROUND --- 232,236 ---- end end ! btn = FXButton.new(capstyle, "\tCAP_ROUND", loadIcon("capround.png"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @capStyle = CAP_ROUND *************** *** 244,248 **** end end ! btn = FXButton.new(capstyle, "\tCAP_PROJECTING", loadIcon("capproj.gif"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @capStyle = CAP_PROJECTING --- 244,248 ---- end end ! btn = FXButton.new(capstyle, "\tCAP_PROJECTING", loadIcon("capproj.png"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @capStyle = CAP_PROJECTING *************** *** 264,268 **** joinstyle.padTop = 2 joinstyle.padBottom = 2 ! btn = FXButton.new(joinstyle, "\tJOIN_MITER", loadIcon("jmiter.gif"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @joinStyle = JOIN_MITER --- 264,268 ---- joinstyle.padTop = 2 joinstyle.padBottom = 2 ! btn = FXButton.new(joinstyle, "\tJOIN_MITER", loadIcon("jmiter.png"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @joinStyle = JOIN_MITER *************** *** 276,280 **** end end ! btn = FXButton.new(joinstyle, "\tJOIN_ROUND", loadIcon("jround.gif"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @joinStyle = JOIN_ROUND --- 276,280 ---- end end ! btn = FXButton.new(joinstyle, "\tJOIN_ROUND", loadIcon("jround.png"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @joinStyle = JOIN_ROUND *************** *** 288,292 **** end end ! btn = FXButton.new(joinstyle, "\tJOIN_BEVEL", loadIcon("jbevel.gif"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @joinStyle = JOIN_BEVEL --- 288,292 ---- end end ! btn = FXButton.new(joinstyle, "\tJOIN_BEVEL", loadIcon("jbevel.png"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @joinStyle = JOIN_BEVEL *************** *** 539,543 **** FXMenuTitle.new(menubar, "&File", nil, @filemenu) ! @birdImage = FXGIFImage.new(getApp(), File.open("icons/dippy.gif", "rb").read) @bitmap = FXBitmap.new(getApp(), $bitmap_bits, 0, 64, 64) --- 539,543 ---- FXMenuTitle.new(menubar, "&File", nil, @filemenu) ! @birdImage = FXPNGImage.new(getApp(), File.open("icons/dippy.png", "rb").read) @bitmap = FXBitmap.new(getApp(), $bitmap_bits, 0, 64, 64) *************** *** 681,685 **** def loadIcon(filename, clr = FXRGB(192, 192, 192), opts = 0) filename = File.join("icons", filename) ! FXGIFIcon.new(getApp(), File.open(filename, "rb").read, clr, opts) end end --- 681,685 ---- def loadIcon(filename, clr = FXRGB(192, 192, 192), opts = 0) filename = File.join("icons", filename) ! FXPNGIcon.new(getApp(), File.open(filename, "rb").read, clr, opts) end end |
From: Lyle J. <ly...@us...> - 2002-05-13 21:33:12
|
Update of /cvsroot/fxruby/FXRuby/lib/fox In directory usw-pr-cvs1:/tmp/cvs-serv26835 Modified Files: Tag: release10 aliases.rb Log Message: Added missing aliases FXDataTarget#target, FXDataTarget#target=, FXDataTarget#selector, and FXDataTarget#selector=. Index: aliases.rb =================================================================== RCS file: /cvsroot/fxruby/FXRuby/lib/fox/aliases.rb,v retrieving revision 1.24.2.3 retrieving revision 1.24.2.4 diff -C2 -d -r1.24.2.3 -r1.24.2.4 *** aliases.rb 8 May 2002 16:35:05 -0000 1.24.2.3 --- aliases.rb 13 May 2002 21:33:09 -0000 1.24.2.4 *************** *** 183,186 **** --- 183,192 ---- alias hotY getHotY end + class FX_DataTarget + alias target getTarget + alias target= setTarget + alias selector getSelector + alias selector= setSelector + end class FXDataTarget alias value getValue |
From: Lyle J. <ly...@us...> - 2002-05-13 21:30:31
|
Update of /cvsroot/fxruby/FXRuby/examples/icons In directory usw-pr-cvs1:/tmp/cvs-serv25452/icons Added Files: Tag: release10 capbutt.gif capnotlast.gif capproj.gif capround.gif dippy.gif double_dash.gif jbevel.gif jmiter.gif jround.gif onoff_dash.gif solid_line.gif Log Message: Added the dctest.rb example program and associated icons. --- NEW FILE: capbutt.gif --- GIF87a --- NEW FILE: capnotlast.gif --- GIF87a %¢ëÙ --- NEW FILE: capproj.gif --- GIF87a --- NEW FILE: capround.gif --- GIF87a --- NEW FILE: dippy.gif --- GIF89a H Hogsks-20602b`LB_^chq\kqkkussp{ µ11¦..{vUf_VZcc{{kkk{{s^ZkcZg¥g©¥g J´¨Ñ£HsÆû´éZãÌ%µ9k+WºdÝÚ¥Ó?¢NmgY @¢P©bEëo»~ýn¬I8f' Ìi¾" $Dg]tÖ¥dúH `}óØ63ÙåB2ɽ$2È"\õÜBC"I ÝøIÊþ# ì/ è Ø`<H¾*V1 Q3¤@Ô8<þåÐ!Øaý(ÀÈã(NAÅ# ºÐt"ðu( .t96xó¢Ü,ã7ÿ9ƨH+@ uM©A%GÀB=}IÓÚ´¦Â¤¡*m8¼GRS¤âêZ@ leŨRÊTBþ§¤!*×HÕ6.Àª,8C.b ìó«úë=ÇOA ÛáÉaÁMãì˱@UoHá!#à±`GþþB` é~$YÙ¸þnàðHpnp¸Í¥ü¸á¸ù$I° ñÙ vÁ ö¾)Ú¯9pp:Q ±9ê:ÛA¢ªù΢:x8¡êIæÕ¡Æyð®Q%ú¤ú@Ú §Zú~Z§Eú§B¥ÙQ:Az º|/G§ Kz!IzP+:¦Ø©*§8¤ÿ ©»Ùp"²<«ÓGJ_*"÷©¥Ê¡£ZJÐ"X¬MI©±¬ºÍÕ"Á «÷¶¦Ô)«bÏ«¿:ܪ!#Óª¥xöh̬Oo:ñÐ Lz!k@øÖÇ*h»ùVâsݪDáÊ.Jõú¨ßZ=Á¹`2÷y¯¯}ê ¡Ú°ö¿9&ÿö¯¸µ¶ª¬ØW& £ñð÷¹þ®&Û®b¨¥Ù;à)'[¤Z6: ««¨,Ëe Z`oqY´ÏŲÙÙpÉáØ³Ñ¦@ª·~V{]qJ~ªø ¥ _ú°Z ¸h;lYE`|eà·û¶â8ú°JÀF0IGpͶÿ~·qZ¾VoçpËy£a;pp²ZiIµ~ú¹>£²å g© ²q¨UF·"ê'ñP¨õ¤¿»xpZz®ÇËyÊþ;ZçÁ+»q ½§ÜZ½LÒy´ëg ¼q»±Ëi¦ j·"b¾âû¤é½êû½¦°àsò{!Ék=c(·íëû¼ú{Zn`Z ù¿¢¼ÉZ|¿¿oÎæ;eàµGA³a«¥) Ú~À¾ë½¦B*ÌÁF1ºBY´"Ün±À˾p½:ìÀóÁLK"¬=¨VëF<g©ÃH?äÛ"تZ©=R,½e ¾ðhÖ"ÐÍ"Öº²gÀan<m7 -`%À]åÌgAÞàÎà,`%÷ÝqQZ`VuáWámá¿Í ¾/Àà=á4âÃóN«{dþ-I-Na(ÞáÖ¸âÁ~ã® @ )Î|?þ"åâVNa.® VÒ«Y×Äã`¾ §@ß@A«H¡ j#£æ Píð <Ð ¯ðouo¬ t>åM^â"êÑ¥Pêá 0` >aé7éA ~~UÀ/*på¾§Pß±§ utìü#p4;"Ëq]nÞà!ð08.`Ó ¦àÝÐîÝð½p ¦ 0"æ ¡íÐÖµ÷N×ñP (æëCNu$n7`<!0äÿéàÜá s·nç0þsð³~UáCòuNç)ïò8à52ú !þçÚ^.Ø.I%pí/ÞóôP bööÐ÷Ñ28ÄðP.0<èÖ>ôÌNôÌN_ôªÏàY bC2G¯ÆSGÜÏðàn# #ÀöoöÆ?÷vßþìßHöÀ ® 1.`ñÏãG!E$YÒä)¨d¹#¶S$¨ t0ÑN 9 Êh %.%a0 h¿ BÄÄ\/.É¢åc$T¤b2 ¡CgV9ègÏþ¡qBZÈ*T"$¨ñë×)¾*töÁ%³ïM.^ü®ñßÇ'g®M/`O_Lòõ(¨ºröî Å&ÿYR¤SgõbØ÷c¿¦¨ÝA!¨ïý¼pÀÿ dX@3Úsp¤v"ð:ÂË~*oÃñ:D£É¢çA?Âæ¶ÙR´mÀ$Qî9Î$BN§æf´q¹ÑFqÁKô dé)7Y½8T²CïP£ TñqJUâ³r>, ä>@ »F¤7&Y{R½N=}PäË] 㯮ûD®ìU¬ íCM3b¡zK cÕua æõ¢°®}$Å |;Þ»ÌêÁ§|!!8N÷ÜuWvÙÜÃ|D·L²dOnjg¦zæùcÜ#ë§@¬ 6qöáÁ&Ìi¨v8áÓS5HaP¥öùëÁf*h 9.`N»¦òXPJe¸;e¹ëfùîÓ4ÓjUÐx°Q ^H!lÄÅNq!Ñ3:Ú¿qÆFRØv;jÌÖ<ó¬°ÀÈC©^o;ÅSO<`æýuo¥ò¶£ûvs7HÍa÷}+ÒMgápÕAдïßg¬Á ¯ÝiýV~ú×ÚÑEËo¦~{î»÷þ{ðÃ|òË7ÿ|ôÓW}öÛß* --- NEW FILE: double_dash.gif --- GIF87a --- NEW FILE: jbevel.gif --- GIF87a --- NEW FILE: jmiter.gif --- GIF87a «ñN1ÜÊ53Cw³6ëñv´EéRIÁ --- NEW FILE: jround.gif --- GIF87a ¿Ã¥"߯tR --- NEW FILE: onoff_dash.gif --- GIF87a --- NEW FILE: solid_line.gif --- GIF87a ©Ëí£¬ |
From: Lyle J. <ly...@us...> - 2002-05-13 21:30:31
|
Update of /cvsroot/fxruby/FXRuby/examples In directory usw-pr-cvs1:/tmp/cvs-serv25452 Added Files: Tag: release10 dctest.rb Log Message: Added the dctest.rb example program and associated icons. --- NEW FILE: dctest.rb --- require 'fox' include Fox $bitmap_bits = [ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x20, 0x80, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x80, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, 0x80, 0x01, 0x00, 0x02, 0x00, 0x00, 0x40, 0x00, 0x80, 0x01, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x80, 0x01, 0x00, 0x08, 0x00, 0x00, 0x10, 0x00, 0x80, 0x01, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x80, 0x01, 0x00, 0x20, 0x00, 0x00, 0x04, 0x00, 0x80, 0x01, 0x00, 0x40, 0x00, 0x00, 0x02, 0x00, 0x80, 0x01, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x80, 0x01, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x80, 0x01, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x80, 0x01, 0x00, 0x40, 0x00, 0x00, 0x02, 0x00, 0x80, 0x01, 0x00, 0x20, 0x00, 0x00, 0x04, 0x00, 0x80, 0x01, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x80, 0x01, 0x00, 0x08, 0x00, 0x00, 0x10, 0x00, 0x80, 0x01, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x80, 0x01, 0x00, 0x02, 0x00, 0x00, 0x40, 0x00, 0x80, 0x01, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x10, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x20, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff] $bitmap_bits = $bitmap_bits.pack("c*") $blit_modes = { BLT_CLR => "Clear\tBLT_CLR", BLT_SRC_AND_DST => "And\tBLT_SRC_AND_DST", BLT_SRC_AND_NOT_DST => "AndRev\tBLT_SRC_AND_NOT_DST", BLT_SRC => "Copy\tBLT_SRC", BLT_NOT_SRC_AND_DST => "AndInv\tBLT_NOT_SRC_AND_DST", BLT_DST=> "NoOp\tBLT_DST", BLT_SRC_XOR_DST => "Xor\tBLT_SRC_XOR_DST", BLT_SRC_OR_DST => "Or\tBLT_SRC_OR_DST", BLT_NOT_SRC_AND_NOT_DST => "Nor\tBLT_NOT_SRC_AND_NOT_DST", BLT_NOT_SRC_XOR_DST => "Equiv\tBLT_NOT_SRC_XOR_DST", BLT_NOT_DST => "Invert\tBLT_NOT_DST", BLT_SRC_OR_NOT_DST => "OrRev\tBLT_SRC_OR_NOT_DST", BLT_NOT_SRC => "CopyInv\tBLT_NOT_SRC", BLT_NOT_SRC_OR_DST => "OrInv\tBLT_NOT_SRC_OR_DST", BLT_NOT_SRC_OR_NOT_DST => "Nand\tBLT_NOT_SRC_OR_NOT_DST", BLT_SET => "Set\tBLT_SET" } $fill_styles = { FILL_SOLID => "FILL_SOLID", FILL_TILED => "FILL_TILED", FILL_STIPPLED => "FILL_STIPPLED", FILL_OPAQUESTIPPLED => "FILL_OPAQUESTIPPLED" } $stipples = { STIPPLE_NONE => "NONE\tSTIPPLE_NONE", STIPPLE_BLACK => "BLACK\tSTIPPLE_BLACK", STIPPLE_WHITE => "WHITE\tSTIPPLE_WHITE", STIPPLE_0 => "0\tSTIPPLE_0", STIPPLE_1 => "1\tSTIPPLE_1", STIPPLE_2 => "2\tSTIPPLE_2", STIPPLE_3 => "3\tSTIPPLE_3", STIPPLE_4 => "4\tSTIPPLE_4", STIPPLE_5 => "5\tSTIPPLE_5", STIPPLE_6 => "6\tSTIPPLE_6", STIPPLE_7 => "7\tSTIPPLE_7", STIPPLE_8 => "8\tSTIPPLE_8", STIPPLE_9 => "9\tSTIPPLE_9", STIPPLE_10 => "10\tSTIPPLE_10", STIPPLE_11 => "11\tSTIPPLE_11", STIPPLE_12 => "12\tSTIPPLE_12", STIPPLE_13 => "13\tSTIPPLE_13", STIPPLE_14 => "14\tSTIPPLE_14", STIPPLE_15 => "15\tSTIPPLE_15", STIPPLE_16 => "16\tSTIPPLE_16", STIPPLE_HORZ => "HORZ\tSTIPPLE_HORZ", STIPPLE_VERT => "VERT\tSTIPPLE_VERT", STIPPLE_CROSS => "CROSS\tSTIPPLE_CROSS", STIPPLE_DIAG => "DIAG\tSTIPPLE_DIAG", STIPPLE_REVDIAG => "REVDIAG\tSTIPPLE_REVDIAG", STIPPLE_CROSSDIAG => "CROSSDIAG\tSTIPPLE_CROSSDIAG", } class DCTestWindow < FXMainWindow def initialize(app) # Initialize base class first super(app, "Device Context Test", nil, nil, DECOR_ALL, 0, 0, 850, 740) opts = FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y # Preferred line attributes @lineStyle = LINE_SOLID @capStyle = CAP_BUTT @joinStyle = JOIN_MITER # Create a tooltip tooltip = FXTooltip.new(getApp()) # Menu bar menubar = FXMenubar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) # Separator FXHorizontalSeparator.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X|SEPARATOR_GROOVE) # Contents contents = FXHorizontalFrame.new(self, LAYOUT_SIDE_TOP|FRAME_NONE|LAYOUT_FILL_X|LAYOUT_FILL_Y|PACK_UNIFORM_WIDTH) # Controls on right controls = FXVerticalFrame.new(contents, LAYOUT_RIGHT|LAYOUT_FILL_Y) # Block for BLIT modes FXLabel.new(controls, "BLIT Function:", nil, LAYOUT_LEFT) blitgrid = FXMatrix.new(controls, 4, FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH) blitgrid.padLeft = 2 blitgrid.padRight = 2 blitgrid.padTop = 2 blitgrid.padBottom = 2 # One button for each mode $blit_modes.each do |blit_mode, desc| btn = FXButton.new(blitgrid, desc, nil, nil, 0, BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.userData = blit_mode btn.connect(SEL_COMMAND) do |sender, sel, ptr| @function = sender.userData @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) end btn.connect(SEL_UPDATE) do |sender, sel, ptr| if sender.userData == @function sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil) else sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil) end end end # Line dash style FXLabel.new(controls, "Line Style:", nil, LAYOUT_LEFT) linestyle = FXMatrix.new(controls, 3, FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X) linestyle.padLeft = 2 linestyle.padRight = 2 linestyle.padTop = 2 linestyle.padBottom = 2 lineSolidBtn = FXButton.new(linestyle, "\tLINE_SOLID", loadIcon("solid_line.gif", 0, IMAGE_OPAQUE), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) lineSolidBtn.connect(SEL_COMMAND) do |sender, sel, ptr| @lineStyle = LINE_SOLID @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) end lineSolidBtn.connect(SEL_UPDATE) do |sender, sel, ptr| if @lineStyle == LINE_SOLID sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil) else sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil) end end lineOnOffDashBtn = FXButton.new(linestyle, "\tLINE_ONOFF_DASH", loadIcon("onoff_dash.gif", FXRGB(0xb2, 0xc0, 0xdc), IMAGE_ALPHACOLOR), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) lineOnOffDashBtn.connect(SEL_COMMAND) do |sender, sel, ptr| @lineStyle = LINE_ONOFF_DASH @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) end lineOnOffDashBtn.connect(SEL_UPDATE) do |sender, sel, ptr| if @lineStyle == LINE_ONOFF_DASH sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil) else sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil) end end lineDoubleDashBtn = FXButton.new(linestyle, "\tLINE_DOUBLE_DASH", loadIcon("double_dash.gif", 0, IMAGE_OPAQUE), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) lineDoubleDashBtn.connect(SEL_COMMAND) do |sender, sel, ptr| @lineStyle = LINE_DOUBLE_DASH @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) end lineDoubleDashBtn.connect(SEL_UPDATE) do |sender, sel, ptr| if @lineStyle == LINE_DOUBLE_DASH sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil) else sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil) end end # Line cap style FXLabel.new(controls, "Cap Style:", nil, LAYOUT_LEFT) capstyle = FXMatrix.new(controls, 4, FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X) capstyle.padLeft = 2 capstyle.padRight = 2 capstyle.padTop = 2 capstyle.padBottom = 2 btn = FXButton.new(capstyle, "\tCAP_NOT_LAST", loadIcon("capnotlast.gif"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @capStyle = CAP_NOT_LAST @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) end btn.connect(SEL_UPDATE) do |sender, sel, ptr| if @capStyle == CAP_NOT_LAST sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil) else sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil) end end btn = FXButton.new(capstyle, "\tCAP_BUTT", loadIcon("capbutt.gif"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @capStyle = CAP_BUTT @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) end btn.connect(SEL_UPDATE) do |sender, sel, ptr| if @capStyle == CAP_BUTT sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil) else sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil) end end btn = FXButton.new(capstyle, "\tCAP_ROUND", loadIcon("capround.gif"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @capStyle = CAP_ROUND @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) end btn.connect(SEL_UPDATE) do |sender, sel, ptr| if @capStyle == CAP_ROUND sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil) else sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil) end end btn = FXButton.new(capstyle, "\tCAP_PROJECTING", loadIcon("capproj.gif"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @capStyle = CAP_PROJECTING @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) end btn.connect(SEL_UPDATE) do |sender, sel, ptr| if @capStyle == CAP_PROJECTING sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil) else sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil) end end # Line join style FXLabel.new(controls, "Join Style:", nil, LAYOUT_LEFT) joinstyle = FXMatrix.new(controls, 3, FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X) joinstyle.padLeft = 2 joinstyle.padRight = 2 joinstyle.padTop = 2 joinstyle.padBottom = 2 btn = FXButton.new(joinstyle, "\tJOIN_MITER", loadIcon("jmiter.gif"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @joinStyle = JOIN_MITER @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) end btn.connect(SEL_UPDATE) do |sender, sel, ptr| if @joinStyle == JOIN_MITER sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil) else sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil) end end btn = FXButton.new(joinstyle, "\tJOIN_ROUND", loadIcon("jround.gif"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @joinStyle = JOIN_ROUND @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) end btn.connect(SEL_UPDATE) do |sender, sel, ptr| if @joinStyle == JOIN_ROUND sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil) else sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil) end end btn = FXButton.new(joinstyle, "\tJOIN_BEVEL", loadIcon("jbevel.gif"), nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.connect(SEL_COMMAND) do |sender, sel, ptr| @joinStyle = JOIN_BEVEL @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) end btn.connect(SEL_UPDATE) do |sender, sel, ptr| if @joinStyle == JOIN_BEVEL sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil) else sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil) end end # Colors FXLabel.new(controls, "Colors:", nil, LAYOUT_LEFT) pairs = FXMatrix.new(controls, 2, FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X) pairs.padLeft = 2 pairs.padRight = 2 pairs.padTop = 2 pairs.padBottom = 2 pairs.hSpacing = 5 pairs.vSpacing = 5 # Back Color FXLabel.new(pairs, "Back Color:") @backWell = FXColorWell.new(pairs, FXRGB(0, 0, 255), nil, 0, FRAME_SUNKEN|FRAME_THICK|ICON_AFTER_TEXT|LAYOUT_FILL_X|LAYOUT_FILL_COLUMN) @backWell.connect(SEL_COMMAND) do |sender, sel, clr| @backcolor = clr @linesCanvas.update @shapesCanvas.update @imagesCanvas.update end @backWell.connect(SEL_CHANGED) do |sender, sel, clr| @backcolor = clr @linesCanvas.update @shapesCanvas.update @imagesCanvas.update end @backWell.connect(SEL_UPDATE) do |sender, sel, ptr| sender.handle(self, MKUINT(ID_SETVALUE, SEL_COMMAND), @backcolor) end # Fore Color FXLabel.new(pairs, "Fore Color:") @foreWell = FXColorWell.new(pairs, FXRGB(255, 0, 0), nil, 0, FRAME_SUNKEN|FRAME_THICK|ICON_AFTER_TEXT|LAYOUT_FILL_X|LAYOUT_FILL_COLUMN) @foreWell.connect(SEL_COMMAND) do |sender, sel, clr| @forecolor = clr @linesCanvas.update @shapesCanvas.update @imagesCanvas.update end @foreWell.connect(SEL_CHANGED) do |sender, sel, clr| @forecolor = clr @linesCanvas.update @shapesCanvas.update @imagesCanvas.update end @foreWell.connect(SEL_UPDATE) do |sender, sel, ptr| sender.handle(self, MKUINT(ID_SETVALUE, SEL_COMMAND), @forecolor) end # Erase Color FXLabel.new(pairs, "Erase Color:") @eraseWell = FXColorWell.new(pairs, FXRGB(255, 255, 255), nil, 0, FRAME_SUNKEN|FRAME_THICK|ICON_AFTER_TEXT|LAYOUT_FILL_X|LAYOUT_FILL_COLUMN) @eraseWell.connect(SEL_COMMAND) do |sender, sel, clr| @erasecolor = clr @linesCanvas.update @shapesCanvas.update @imagesCanvas.update end @eraseWell.connect(SEL_CHANGED) do |sender, sel, clr| @erasecolor = clr @linesCanvas.update @shapesCanvas.update @imagesCanvas.update end @eraseWell.connect(SEL_UPDATE) do |sender, sel, ptr| sender.handle(self, MKUINT(ID_SETVALUE, SEL_COMMAND), @erasecolor) end # Line width linew = FXMatrix.new(controls, 2, FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X) linew.padLeft = 2 linew.padRight = 2 linew.padTop = 2 linew.padBottom = 2 FXLabel.new(linew, "Line Width:") @lineWidthSpinner = FXSpinner.new(linew, 4, nil, 0, SPIN_NORMAL|FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_COLUMN) @lineWidthSpinner.connect(SEL_COMMAND) { @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) } @lineWidthSpinner.setRange(1, 255) @lineWidthSpinner.value = 1 # Stipple stip = FXMatrix.new(controls, 2, FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X) stip.padLeft = 2 stip.padRight = 2 stip.padTop = 2 stip.padBottom = 2 FXLabel.new(stip, "Stipples:") pop = FXPopup.new(self) $stipples.each do |pat, desc| opt = FXOption.new(pop, desc, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT) opt.userData = pat opt.connect(SEL_COMMAND) do |sender, sel, ptr| @stipple = sender.userData @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) end end FXOptionMenu.new(stip, pop, LAYOUT_TOP|FRAME_RAISED|FRAME_THICK|JUSTIFY_HZ_APART|ICON_AFTER_TEXT) # Fill Style FXLabel.new(controls, "Fill Style:", nil, LAYOUT_LEFT) fillstyle = FXMatrix.new(controls, 2, FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X) fillstyle.padLeft = 2 fillstyle.padRight = 2 fillstyle.padTop = 2 fillstyle.padBottom = 2 $fill_styles.each do |fs, desc| btn = FXButton.new(fillstyle, desc, nil, nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN) btn.userData = fs btn.connect(SEL_COMMAND) do |sender, sel, ptr| @fillStyle = sender.userData @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) end btn.connect(SEL_UPDATE) do |sender, sel, ptr| if sender.userData == @fillStyle sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil) else sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil) end end end # Angles for arcs FXLabel.new(controls, "Arc angles:", nil, LAYOUT_LEFT) arcangles = FXMatrix.new(controls, 3, FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X) arcangles.padLeft = 2 arcangles.padRight = 2 arcangles.padTop = 2 arcangles.padBottom = 2 arcangles.hSpacing = 4 arcangles.vSpacing = 4 @ang1 = FXDataTarget.new(0) FXLabel.new(arcangles, "Ang1:", nil, LAYOUT_LEFT) FXTextField.new(arcangles, 4, @ang1, FXDataTarget::ID_VALUE, TEXTFIELD_INTEGER|JUSTIFY_RIGHT|FRAME_SUNKEN|FRAME_THICK) sang1 = FXSlider.new(arcangles, @ang1, FXDataTarget::ID_VALUE, LAYOUT_CENTER_Y|LAYOUT_FILL_X|SLIDER_INSIDE_BAR|LAYOUT_FILL_COLUMN) sang1.setRange(-360, 360) @ang2 = FXDataTarget.new(90) FXLabel.new(arcangles, "Ang2:", nil, LAYOUT_LEFT) FXTextField.new(arcangles, 4, @ang2, FXDataTarget::ID_VALUE, TEXTFIELD_INTEGER|JUSTIFY_RIGHT|FRAME_SUNKEN|FRAME_THICK) sang2 = FXSlider.new(arcangles, @ang2, FXDataTarget::ID_VALUE, LAYOUT_CENTER_Y|LAYOUT_FILL_X|SLIDER_INSIDE_BAR|LAYOUT_FILL_COLUMN) sang2.setRange(-360, 360) # Font fonts = FXHorizontalFrame.new(controls, FRAME_RIDGE|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH) fonts.padLeft = 2 fonts.padRight = 2 fonts.padTop = 2 fonts.padBottom = 2 btn = FXButton.new(fonts, "Font Dialog...\tChange the text font", nil, nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y) btn.connect(SEL_COMMAND, method(:onCmdFont)) # Printing printer = FXHorizontalFrame.new(controls, FRAME_RIDGE|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH) printer.padLeft = 2 printer.padRight = 2 printer.padTop = 2 printer.padBottom = 2 btn = FXButton.new(printer, "Print Dialog...\tPrint it out", nil, nil, 0, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y) btn.connect(SEL_COMMAND, method(:onCmdPrint)) # Quit quitter = FXHorizontalFrame.new(controls, FRAME_RIDGE|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH) quitter.padLeft = 2 quitter.padRight = 2 quitter.padTop = 2 quitter.padBottom = 2 FXButton.new(quitter, "Bye Bye!\tHasta la vista, baby!", nil, getApp(), FXApp::ID_QUIT, BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y) # Switcher tabbook = FXTabBook.new(contents, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_RIGHT) # First page shows various line styles linesTab = FXTabItem.new(tabbook, "&Lines", nil) linesPage = FXPacker.new(tabbook, FRAME_THICK|FRAME_RAISED) frame = FXHorizontalFrame.new(linesPage, FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y) frame.padLeft = 0 frame.padRight = 0 frame.padTop = 0 frame.padBottom = 0 @linesCanvas = FXCanvas.new(frame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y) @linesCanvas.connect(SEL_PAINT) do |canvas, sel, ev| dc = FXDCWindow.new(canvas, ev) drawPage(dc, canvas.width, canvas.height) end # Second page shows various shapes shapesTab = FXTabItem.new(tabbook, "&Shapes", nil) shapesPage = FXPacker.new(tabbook, FRAME_THICK|FRAME_RAISED) frame = FXHorizontalFrame.new(shapesPage, FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y) frame.padLeft = 0 frame.padRight = 0 frame.padTop = 0 frame.padBottom = 0 @shapesCanvas = FXCanvas.new(frame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y) @shapesCanvas.connect(SEL_PAINT) do |canvas, sel, ev| dc = FXDCWindow.new(canvas, ev) dc.foreground = @eraseWell.rgba dc.fillRectangle(0, 0, canvas.width, canvas.height) dc.foreground = @foreWell.rgba dc.background = @backWell.rgba dc.drawRectangle(5, 5, 50, 50) dc.fillRectangle(60, 5, 50, 50) dc.foreground = @foreWell.rgba dc.background = @backWell.rgba dc.drawArc(5, 60, 50, 50, 0, 64*90) dc.fillArc(60, 60, 50, 50, 64*90, 64*180) dc.foreground = @foreWell.rgba dc.background = @backWell.rgba dc.drawBitmap(@bitmap, 115, 5) end # Third page shows images imagesTab = FXTabItem.new(tabbook, "&Images", nil) imagesPage = FXPacker.new(tabbook, FRAME_THICK|FRAME_RAISED) frame = FXHorizontalFrame.new(imagesPage, FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y) frame.padLeft = 0 frame.padRight = 0 frame.padTop = 0 frame.padBottom = 0 @imagesCanvas = FXCanvas.new(frame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y) @imagesCanvas.connect(SEL_PAINT) do |canvas, sel, ev| dc = FXDCWindow.new(canvas, ev) dc.foreground = @eraseWell.rgba dc.fillRectangle(0, 0, canvas.width, canvas.height) dc.drawImage(@birdImage, 0, 0) end # File menu @filemenu = FXMenuPane.new(self) FXMenuCommand.new(@filemenu, "&Print...\tCtl-P").connect(SEL_COMMAND, method(:onCmdPrint)) FXMenuCommand.new(@filemenu, "&Font...\tCtl-F").connect(SEL_COMMAND, method(:onCmdFont)) FXMenuCommand.new(@filemenu, "&Quit\tCtl-Q", nil, getApp(), FXApp::ID_QUIT) FXMenuTitle.new(menubar, "&File", nil, @filemenu) @birdImage = FXGIFImage.new(getApp(), File.open("icons/dippy.gif", "rb").read) @bitmap = FXBitmap.new(getApp(), $bitmap_bits, 0, 64, 64) @function = BLT_SRC @lineStyle = LINE_SOLID @capStyle = CAP_BUTT @joinStyle = JOIN_MITER @fillStyle = FILL_SOLID @fillRule = RULE_EVEN_ODD @stipple = STIPPLE_NONE @forecolor = FXRGB(255, 0, 0) # red @backcolor = FXRGB(0, 0, 255) # blue @erasecolor = FXRGB(255, 255, 255) # white @testFont = FXFont.new(getApp(), "helvetica", 20) end def create super @birdImage.create @testFont.create @bitmap.create show(PLACEMENT_SCREEN) end def detach super @birdImage.detach @testFont.detach @bitmap.detach end def drawPage(dc, w, h) dc.foreground = @erasecolor dc.fillRectangle(0, 0, w, h) dc.foreground = @forecolor dc.background = @backcolor dc.lineStyle = @lineStyle dc.lineCap = @capStyle dc.lineJoin = @joinStyle dc.function = @function dc.stipple = @stipple dc.fillStyle = @fillStyle dc.lineWidth = @lineWidthSpinner.value # Here's a single line dc.drawLine(20, 200, w - 20, 200) # Here are some connected lines (to show join styles) points = [] points << FXPoint.new(10, 3*h/4) points << FXPoint.new(points[0].x+w/6, h/2) points << FXPoint.new(points[1].x+w/6, points[0].y) points << FXPoint.new(points[2].x+w/6, points[1].y) points << FXPoint.new(points[3].x+w/6, points[0].y) points << FXPoint.new(points[4].x+w/6, points[1].y) dc.drawLines(points) dc.textFont = @testFont dc.foreground = @forecolor dc.background = @backcolor s = "Font: #{@testFont.name} Size: #{@testFont.size/10}" dc.drawText(30, h-70, s) dc.drawImageText(30, h-30, s) dc.foreground = @forecolor dc.background = @backcolor dc.drawRectangle(20, 20, 200, 100) dc.fillRectangle(300, 20, 200, 100) dc.drawArc(20, 120, 100, 100, 64*@ang1.value, 64*@ang2.value) dc.fillArc(300, 120, 100, 100, 64*@ang1.value, 64*@ang2.value) poly = [] poly << FXPoint.new(200, 230) poly << FXPoint.new(poly[0].x+40, poly[0].y+20) poly << FXPoint.new(poly[0].x+30, poly[0].y+60) poly << FXPoint.new(poly[0].x-30, poly[0].y+60) poly << FXPoint.new(poly[0].x-40, poly[0].y+20) dc.fillPolygon(poly) poly = [] poly << FXPoint.new(300, 230) poly << FXPoint.new(poly[0].x+30, poly[0].y+60) poly << FXPoint.new(poly[0].x-40, poly[0].y+20) poly << FXPoint.new(poly[0].x+40, poly[0].y+20) poly << FXPoint.new(poly[0].x-30, poly[0].y+60) dc.fillComplexPolygon(poly) poly = [] poly << FXPoint.new(400, 230) poly << FXPoint.new(poly[0].x+30, poly[0].y+60) poly << FXPoint.new(poly[0].x-40, poly[0].y+20) poly << FXPoint.new(poly[0].x+40, poly[0].y+20) poly << FXPoint.new(poly[0].x-30, poly[0].y+60) dc.fillRule = RULE_WINDING dc.fillComplexPolygon(poly) concave = [] concave << FXPoint.new(w-100, h-100) concave << FXPoint.new(concave[0].x+40, concave[0].y-20) concave << FXPoint.new(concave[0].x , concave[0].y+40) concave << FXPoint.new(concave[0].x-40, concave[0].y-20) dc.fillConcavePolygon(concave) # Draw a pale blue dot ;) dc.foreground = FXRGB(128, 128, 255) dc.drawPoint(w-20, h-20) end def onCmdFont(sender, sel, ptr) fontdlg = FXFontDialog.new(self, "Change Font", DECOR_BORDER|DECOR_TITLE) fontdlg.fontSelection = @testFont.fontDesc if fontdlg.execute != 0 @testFont = FXFont.new(getApp(), fontdlg.fontSelection) @testFont.create @linesCanvas.update(0, 0, @linesCanvas.width, @linesCanvas.height) end return 1 end def onCmdPrint(sender, sel, ptr) dlg = FXPrintDialog.new(self, "Print Graphics") if dlg.execute != 0 p = dlg.printer pdc = FXDCPrint.new(getApp()) if !pdc.beginPrint(p) FXMessageBox.error(self, MBOX_OK, "Printer Error", "Unable to print") return 1 end pdc.beginPage(1) drawPage(pdc, 500, 500) pdc.endPage pdc.endPrint end return 1 end def loadIcon(filename, clr = FXRGB(192, 192, 192), opts = 0) filename = File.join("icons", filename) FXGIFIcon.new(getApp(), File.open(filename, "rb").read, clr, opts) end end if __FILE__ == $0 application = FXApp.new("DCTest", "FoxTest") application.init(ARGV) DCTestWindow.new(application) application.create application.run end |
From: Lyle J. <ly...@us...> - 2002-05-10 22:23:47
|
Update of /cvsroot/fxruby/FXRuby/doc In directory usw-pr-cvs1:/tmp/cvs-serv9270/doc Modified Files: Tag: release10 build.html build.xml changes.html differences.html events.html examples.html goals.html goals.xml implementation.html library.html opengl.html scintilla.html Log Message: Miscellaneous documentation updates. Index: build.html =================================================================== RCS file: /cvsroot/fxruby/FXRuby/doc/build.html,v retrieving revision 1.23.2.1 retrieving revision 1.23.2.2 diff -C2 -d -r1.23.2.1 -r1.23.2.2 *** build.html 30 Apr 2002 19:42:23 -0000 1.23.2.1 --- build.html 10 May 2002 22:23:13 -0000 1.23.2.2 *************** *** 1,10 **** <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> ! <title>Chapter 1. Building from Source Code</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><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="goals.html" title="History and Goals"><link rel="next" href="examples.html" title="Chapter 2. Examples"></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 1. Building from Source Code</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="goals.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="examples.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="build"></a>Chapter 1. Building from Source Code</h2></div></div><p>If you're planning to use FXRuby on Windows, with the Pragmatic Programmers' Ruby installer for Windows, you may wish to just download the pre-compiled FXRuby binaries. Otherwise, you will need to compile the shared library for FXRuby from the source code.</p><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e59"></a>The Basics</h2></div></div><p>These instructions assume that you've already downloaded, compiled and installed FOX. Next, you'll need to download the FXRuby source code tarball and unpack it by typing:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">$ <b>tar xzf FXRuby-1.0.3.tar.gz</b></pre></td></tr></table><p>This will create a new directory called <tt>FXRuby-1.0.3</tt>. Change to the top-level directory and configure the build by typing:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">$ <b>ruby install.rb config</b></pre></td></tr></table><p>By default, the <tt>install.rb</tt> script will look for the FOX include files and library in the standard <tt>/usr/local/include/fox</tt> and <tt>/usr/local/lib</tt> directories, respectively. You can override these locations by passing a few additional arguments to <tt>install.rb</tt> during this step, e.g.</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">$ <b>ruby install.rb config -- \ --with-fox-include=/home/lyle/fox-1.0.3/include \ --with-fox-lib=/home/lyle/fox-1.0.3/src/.libs</b></pre></td></tr></table><p>Once the build has been configured, you can start the build by typing:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">$ <b>ruby install.rb setup</b></pre></td></tr></table><p>It will take quite awhile to build FXRuby, even on a fast machine, so this might be a good time to take a coffee break. If you run into problems during the compilation, please check the <a href="build.html#tragedies" title="Things That Can Go Wrong">list of things that can go wrong</a> for workarounds for those problems.</p><p>Once it's finished compiling, install FXRuby by typing:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">$ <b>ruby install.rb install</b></pre></td></tr></table><p>As a quick sanity check, to make sure that all is well, you should probably fire up <tt>irb</tt> and try to import FXRuby:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">$ <b>irb</b> irb(main):001:0> <b><tt>require 'fox'</tt></b> true ! irb(main):002:0></pre></td></tr></table><p>If the import failed (usually with a message along the lines of "Cannot load library"), check the <a href="build.html#tragedies" title="Things That Can Go Wrong">list of things that can go wrong</a> for known problems. If that still doesn't solve your problem, drop me an e-mail or ask around on the Ruby newsgroup or mailing list; it's quite likely that someone else has run into this problem too. Once you do have a working FXRuby installation, you're ready to check out the example programs.</p></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e130"></a>Building with Visual C++</h2></div></div><p>This section describes how to compile FXRuby using Microsoft Visual C++, for use with a Ruby that was also compiled using Visual C++.</p><p>This discussion assumes that you've built Ruby using the instructions and build files distributed with the standard Ruby source code. To review, you should have started by unpacking the source code tarball, changing into the top-level source code directory (e.g. <tt>C:\ruby-1.6.7</tt>) and then typing:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">C:\ruby-1.6.7><b>win32\configure</b> type 'nmake' to make ruby for mswin32. C:\ruby-1.6.7><b>nmake</b></pre></td></tr></table><p>After the compilation finished, you installed Ruby somewhere by typing, e.g.,</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">C:\ruby-1.6.7><b>nmake DESTDIR=C:\ruby install</b></pre></td></tr></table><p>Similarly, I'm assuming that you built the FOX library using the Developer Studio project files distributed with the standard FOX source code distribution. Although it's possible to build FXRuby against either the static library build of FOX (<tt>fox.lib</tt>) or the DLL build (<tt>foxdll.dll</tt>), these instructions currently cover only the static library build. Before you get started building FXRuby itself, you'll need to rename the static FOX library from its default filename (<tt>fox.lib</tt>) to <tt>foxst.lib</tt>. The reason for this rename is a charming little quirk in Microsoft's LINK utility and the fact that the eventual output name for the FXRuby DLL is also <tt>fox.so</tt>; for now, just take my word for it. So if your FOX source code distribution and build are found in the <tt>C:\fox-1.0.3</tt> directory, you'd need to rename the file:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">C:\fox-1.0.3\lib><b>rename fox.lib foxst.lib</b></pre></td></tr></table><p>Now you can configure the FXRuby build by typing:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">C:\FXRuby-1.0.3><b>ruby install.rb config --make-prog=nmake -- \ --- 1,14 ---- <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> ! <title>Chapter 1. Building from Source Code</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><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="goals.html" title="History and Goals"><link rel="next" href="examples.html" title="Chapter 2. Examples"></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 1. Building from Source Code</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="goals.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="examples.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="build"></a>Chapter 1. Building from Source Code</h2></div></div><p>If you're planning to use FXRuby on Windows, with the Pragmatic ! Programmers' Ruby installer for Windows, you may wish to just download the ! pre-compiled FXRuby binaries. Linux RPMs are also available for download. ! Otherwise, you will need to compile the shared library for FXRuby from the ! source code.</p><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e62"></a>The Basics</h2></div></div><p>These instructions assume that you've already downloaded, compiled and installed FOX. Next, you'll need to download the FXRuby source code tarball and unpack it by typing:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">$ <b>tar xzf FXRuby-1.0.3.tar.gz</b></pre></td></tr></table><p>This will create a new directory called <tt>FXRuby-1.0.3</tt>. Change to the top-level directory and configure the build by typing:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">$ <b>ruby install.rb config</b></pre></td></tr></table><p>By default, the <tt>install.rb</tt> script will look for the FOX include files and library in the standard <tt>/usr/local/include/fox</tt> and <tt>/usr/local/lib</tt> directories, respectively. You can override these locations by passing a few additional arguments to <tt>install.rb</tt> during this step, e.g.</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">$ <b>ruby install.rb config -- \ --with-fox-include=/home/lyle/fox-1.0.3/include \ --with-fox-lib=/home/lyle/fox-1.0.3/src/.libs</b></pre></td></tr></table><p>Once the build has been configured, you can start the build by typing:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">$ <b>ruby install.rb setup</b></pre></td></tr></table><p>It will take quite awhile to build FXRuby, even on a fast machine, so this might be a good time to take a coffee break. If you run into problems during the compilation, please check the <a href="build.html#tragedies" title="Things That Can Go Wrong">list of things that can go wrong</a> for workarounds for those problems.</p><p>Once it's finished compiling, install FXRuby by typing:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">$ <b>ruby install.rb install</b></pre></td></tr></table><p>As a quick sanity check, to make sure that all is well, you should probably fire up <tt>irb</tt> and try to import FXRuby:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">$ <b>irb</b> irb(main):001:0> <b><tt>require 'fox'</tt></b> true ! irb(main):002:0></pre></td></tr></table><p>If the import failed (usually with a message along the lines of "Cannot load library"), check the <a href="build.html#tragedies" title="Things That Can Go Wrong">list of things that can go wrong</a> for known problems. If that still doesn't solve your problem, drop me an e-mail or ask around on the Ruby newsgroup or mailing list; it's quite likely that someone else has run into this problem too. Once you do have a working FXRuby installation, you're ready to check out the example programs.</p></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e133"></a>Building with Visual C++</h2></div></div><p>This section describes how to compile FXRuby using Microsoft Visual C++, for use with a Ruby that was also compiled using Visual C++.</p><p>This discussion assumes that you've built Ruby using the instructions and build files distributed with the standard Ruby source code. To review, you should have started by unpacking the source code tarball, changing into the top-level source code directory (e.g. <tt>C:\ruby-1.6.7</tt>) and then typing:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">C:\ruby-1.6.7><b>win32\configure</b> type 'nmake' to make ruby for mswin32. C:\ruby-1.6.7><b>nmake</b></pre></td></tr></table><p>After the compilation finished, you installed Ruby somewhere by typing, e.g.,</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">C:\ruby-1.6.7><b>nmake DESTDIR=C:\ruby install</b></pre></td></tr></table><p>Similarly, I'm assuming that you built the FOX library using the Developer Studio project files distributed with the standard FOX source code distribution. Although it's possible to build FXRuby against either the static library build of FOX (<tt>fox.lib</tt>) or the DLL build (<tt>foxdll.dll</tt>), these instructions currently cover only the static library build. Before you get started building FXRuby itself, you'll need to rename the static FOX library from its default filename (<tt>fox.lib</tt>) to <tt>foxst.lib</tt>. The reason for this rename is a charming little quirk in Microsoft's LINK utility and the fact that the eventual output name for the FXRuby DLL is also <tt>fox.so</tt>; for now, just take my word for it. So if your FOX source code distribution and build are found in the <tt>C:\fox-1.0.3</tt> directory, you'd need to rename the file:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">C:\fox-1.0.3\lib><b>rename fox.lib foxst.lib</b></pre></td></tr></table><p>Now you can configure the FXRuby build by typing:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="screen">C:\FXRuby-1.0.3><b>ruby install.rb config --make-prog=nmake -- \ Index: build.xml =================================================================== RCS file: /cvsroot/fxruby/FXRuby/doc/build.xml,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** build.xml 25 Apr 2002 02:34:32 -0000 1.5.2.1 --- build.xml 10 May 2002 22:23:13 -0000 1.5.2.2 *************** *** 1,5 **** <chapter id="build"> <title>Building from Source Code</title> ! <para>If you're planning to use FXRuby on Windows, with the Pragmatic Programmers' Ruby installer for Windows, you may wish to just download the pre-compiled FXRuby binaries. Otherwise, you will need to compile the shared library for FXRuby from the source code.</para> <simplesect> <title>The Basics</title> --- 1,9 ---- <chapter id="build"> <title>Building from Source Code</title> ! <para>If you're planning to use FXRuby on Windows, with the Pragmatic ! Programmers' Ruby installer for Windows, you may wish to just download the ! pre-compiled FXRuby binaries. Linux RPMs are also available for download. ! Otherwise, you will need to compile the shared library for FXRuby from the ! source code.</para> <simplesect> <title>The Basics</title> Index: changes.html =================================================================== RCS file: /cvsroot/fxruby/FXRuby/doc/changes.html,v retrieving revision 1.42.2.2 retrieving revision 1.42.2.3 diff -C2 -d -r1.42.2.2 -r1.42.2.3 *** changes.html 10 May 2002 17:22:03 -0000 1.42.2.2 --- changes.html 10 May 2002 22:23:13 -0000 1.42.2.3 *************** *** 1,5 **** <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> ! <title>Chapter 11. Change History</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><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="todo.html" title="Chapter 10. To-do list"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 11. Change History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="todo.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="changes"></a>Chapter 11. Change History</h2></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e1910"></a>Changes Since Version 1.0.3</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Corrected the code for <tt>FXTreeList#clearItems</tt> so that after the C++ objects (the tree items) are destroyed, any Ruby instances holding references to those C++ objects are notified of their demise. This one was inadvertently overlooked when other, similar, fixes were made in the previous release. Thanks to Gilles Filippini for catching this.</p></li><li style="list-style-type: disc"><p>The API for Ruby's <tt>rb_rescue2()</tt> function changed in Ruby 1.6.7, but I missed this since I had only compiled against the Ruby 1.6.6 and Ruby 1.7 header files. The API change led to a compile error for FXRuby.cpp; this has been fixed. Thanks to Bil Kleb for catching this one.</p></li><li style="list-style-type: disc"><p>The <tt>FXApp#enableThreads</tt> and <tt>FXApp#disableThreads</tt> instance methods have been replaced by a single instance method, --- 1,5 ---- <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> ! <title>Chapter 11. Change History</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><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="todo.html" title="Chapter 10. To-do list"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 11. Change History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="todo.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="changes"></a>Chapter 11. Change History</h2></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e1913"></a>Changes Since Version 1.0.3</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Corrected the code for <tt>FXTreeList#clearItems</tt> so that after the C++ objects (the tree items) are destroyed, any Ruby instances holding references to those C++ objects are notified of their demise. This one was inadvertently overlooked when other, similar, fixes were made in the previous release. Thanks to Gilles Filippini for catching this.</p></li><li style="list-style-type: disc"><p>The API for Ruby's <tt>rb_rescue2()</tt> function changed in Ruby 1.6.7, but I missed this since I had only compiled against the Ruby 1.6.6 and Ruby 1.7 header files. The API change led to a compile error for FXRuby.cpp; this has been fixed. Thanks to Bil Kleb for catching this one.</p></li><li style="list-style-type: disc"><p>The <tt>FXApp#enableThreads</tt> and <tt>FXApp#disableThreads</tt> instance methods have been replaced by a single instance method, *************** *** 14,16 **** now be called in either of these equivalent forms:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">glviewer.backgroundColor = FXHVec.new(0.5, 0.5, 0.5, 1.0)</pre></td></tr></table> or ! <table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">glviewer.backgroundColor = [0.5, 0.5, 0.5, 1.0]</pre></td></tr></table></li><li style="list-style-type: disc"><p>Updated the test case for <tt>FXMaterial</tt>, added a new test case for <tt>FXFileStream</tt>.</p></li><li style="list-style-type: disc"><p>Added aliases <tt>posVisible?</tt> (for <tt>FXTextField#isPosVisible</tt>), <tt>posSelected?</tt> (for <tt>FXTextField#isPosSelected</tt>), <tt>itemCurrent?</tt> (for <tt>FXComboBox#isItemCurrent</tt>), <tt>hasAccel?</tt> (for <tt>FXAccelTable#hasAccel</tt>), <tt>error=</tt> (for <tt>FXStream#setError</tt>), <tt>position=</tt> (for <tt>FXStream#setPosition</tt>) and <tt>position</tt> (for <tt>FXStream#getPosition</tt>).</p></li><li style="list-style-type: disc"><p>The <tt>FXStream</tt>, <tt>FXFileStream</tt> and <tt>FXMemoryStream</tt> classes were not implemented properly, in the sense that if you subclassed one of these classes and then attempted to override one of their virtual functions, that override might not get called (see <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=535955&group_id=20243&atid=120243" target="_top">SourceForge Bug #535955</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>Did some more work on completing the <tt>FXDC</tt> interface, including adding a test case for the same.</p></li><li style="list-style-type: disc"><p>All GIF image files have now been replaced with PNG equivalents. For more information on why this is a good idea, see <a href="http://burnallgifs.org" target="_top">this site</a>.</p></li><li style="list-style-type: disc"><p>Starting with this release, Red Hat Linux 7.2 RPMs are now provided in addition to the Windows installer.</p></li><li style="list-style-type: disc"><p>The previous implementation of <tt>FXImage#data</tt> returned a copy of the underlying image pixel data instead of a pointer to the actual data (see <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=550996&group_id=20243&atid=120243" target="_top">SourceForge Bug #550996</a>). This has been fixed. <tt>FXImage#data</tt> now returns an instance of <tt>FXMemoryBuffer</tt> which is an array or string-like class that acts as a very thin layer over the pointer to the pixel data. The <tt>initialize</tt> methods for images and icons were also updated so that they will now accept either strings (as before) or <tt>FXMemoryBuffer</tt> instances as inputs for the image data.</p></li><li style="list-style-type: disc"><p>Lots of other little fixes here and there...</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2087"></a>Changes Since Version 0.99.189</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Upgraded to the latest version of Minero Aoki's <tt>install.rb</tt> script.</p></li><li style="list-style-type: disc"><p>Switched from using DocBook/SGML to DocBook/XML for the FXRuby documentation. This is mainly a maintenance issue; it's just much less complicated to "publish" documents using DocBook/XML as compared to DocBook/SGML. You should see few (if any) differences in the resulting HTML pages, but let me know if you notice anything squirrely.</p></li><li style="list-style-type: disc"><p>Improved support for customized sorting of list items for the <tt>FXComboBox</tt>, <tt>FXIconList</tt>, <tt>FXList</tt>, <tt>FXListBox</tt>, <tt>FXTreeList</tt> and <tt>FXTreeListBox</tt> classes. The model is different from that used in the C++ FOX library, where you set a global sorting function for each list instance. For FXRuby, you instead just override the list item's <tt><=></tt> method to compare one list item to another. Thanks to Martin Stannard for prompting me to resolve this problem.</p></li><li style="list-style-type: disc"><p>Added instructions about how to modify your <tt>/etc/ld.so.conf</tt> file (on Linux) to include the <tt>libFOX.so</tt> installation directory. Thanks to Giuseppe Cacopardo for providing this information.</p></li><li style="list-style-type: disc"><p>Updated the test cases (again) for use with Nathaniel Talbott's <a href="http://testunit.talbott.ws" target="_top">TestUnit</a>, which is apparently the successor to Lapidary.</p></li><li style="list-style-type: disc"><p>Added support for the <tt>FXCURCursor</tt>, <tt>FXRGBIcon</tt>, <tt>FXRGBImage</tt> classes.</p></li><li style="list-style-type: disc"><p>Fixed a longstanding bug related to the ownership (for garbage collection purposes) of <tt>FXGLGroup</tt> and <tt>FXGLShape</tt> instances. This is the bug that was causing the <tt>glviewer.rb</tt> example program to crash on exit.</p></li><li style="list-style-type: disc"><p>Fixed a different (but also longstanding) bug related to FXRuby's hanging on to "stale" Ruby object references after those Ruby objects had already been garbage-collected. This bug manifested itself in a number of ways, but the most common symptom would be for an object (like an <tt>FXEvent</tt> instance) to suddenly lose its mind and believe it was some other object. Oh, and your program would usually crash at that point. I think this problem is now fixed.</p></li><li style="list-style-type: disc"><p>Added some safeguards for "destructive" functions like <tt>FXList#clearItems</tt>, which can destroy the C++ objects backing-up Ruby objects in FXRuby, so that any outstanding Ruby references to those destroyed C++ objects are left in a safe state when accessed by Ruby's garbage collector.</p></li><li style="list-style-type: disc"><p>Performed a major overhaul on the <tt>shutter.rb</tt> example program, which still demonstrates the <tt>FXShutter</tt> widget but otherwise doesn't resemble its previous incarnation at all.</p></li><li style="list-style-type: disc"><p>Added a new example program (<tt>raabrowser.rb</tt>) that allows you to browse the Ruby Application Archive via its SOAP interface. Requires the <a href="http://www.jin.gr.jp/~nahi/Ruby/SOAP4R" target="_top">SOAP4R</a> extension.</p></li><li style="list-style-type: disc"><p>Added a new example program (<tt>babelfish.rb</tt>) that allows you to use the Babelfish translator web service via its SOAP interface. Requires the <a href="http://www.jin.gr.jp/~nahi/Ruby/SOAP4R" target="_top">SOAP4R</a> extension.</p></li><li style="list-style-type: disc"><p>Added a new page to the documentation to briefly describe each of the example programs (including screenshots).</p></li><li style="list-style-type: disc"><p>The CVS repository for FXRuby is now hosted at the SourceForge site. For those who would like access to the latest version of FXRuby (in-between official releases) this is now an option. For more details, see the instructions at the <a href="http://sourceforge.net/cvs/?group_id=20243" target="_top">SourceForge project CVS page</a>.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="http://www.fox-toolkit.org/ftp/fox-1.0.3.tar.gz" target="_top">fox-1.0.3</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2217"></a>Changes Since Version 0.99.188</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Fixed a big bug related to the <tt>FXApp#addSignal</tt> and <tt>FXApp#removeSignal</tt> functions, which should accept a string signal name as an argument. The list of recognized signal names was not constructed properly and as a result most any call to these methods with a string signal name would fail. This has been corrected, and the methods now throw exceptions like those thrown from <tt>Process::kill</tt> when the signal name is unrecognized or the argument type is wrong.</p></li><li style="list-style-type: disc"><p>The <tt>imageviewer.rb</tt> example program now supports loading TARGA, ICO and TIFF image files.</p></li><li style="list-style-type: disc"><p>The configuration process on Windows should now detect the presence of <tt>libtiff.lib</tt> properly.</p></li><li style="list-sty le-type: disc"><p>Updated the interfaces for compatibility with <a href="http://www.fox-toolkit.org/ftp/fox-0.99.189.tar.gz" target="_top">fox-0.99.189</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2251"></a>Changes Since Version 0.99.181</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Removed the <tt>-fno-strict-prototype</tt> and <tt>-fpermissive</tt> flags from the <tt>CFLAGS</tt> for Linux builds, since these two flags are no longer supported for more recent versions of gcc. Thanks to Thomas Lundqvist for reporting this.</p></li><li style="list-style-type: disc"><p>Some of the source files included in the previous release had DOS-style line endings and this caused gcc to choke while compiling them; this has been fixed. Thanks to Thomas Lundqvist for reporting this.</p></li><li style="list-style-type: disc"><p>Updated the FXRuby test cases (such as they are) to use Nathaniel Talbott's <a href="http://lapidary.sourceforge.net" target="_top">Lapidary</a> unit testing framework.</p></li><li style="list-style-type: disc"><p>Migrated yet more code from the C++ extension to pure Ruby versions. Most of the code for the <tt>FXPoint</tt>, <tt>FXRectangle</tt> and <tt>FXSize</tt> classes is now implemented in Ruby.</p></li><li style="list-style-type: disc"><p>Fixed a bug in the <tt>browser.rb</tt> example. I had meant for the methods and constants lists to be sorted but had failed to use the in-place <tt>sort!</tt> method. Thanks to Robert Gustavsson for reporting this.</p></li><li style="list-style-type: disc"><p>Completed a lot of the initial work for integrating the FXScintilla widget into FXRuby. This is not usable yet, but I'm working with Rich Kilmer and others to try to make this happen.</p></li><li style="list-style-type: disc"><p>Updated the build instructions to provide more information about building the Visual C++ version of FXRuby (i.e. for use with the Visual C++ build of Ruby) on Windows. Thanks to a final tip from Martin Stannard we now have a working build for this compiler.</p></li><li style="list-style-type: disc"><p>For fun, added a new example program that downloads today's Dilbert cartoon from the <a href="http://www.dilbertzone.com" target="_top">DilbertZone</a> web site and displays it in an <tt>FXImageViewer</tt> widget. Requires the <tt>html-parser</tt> module, listed in the <a href="http://www.ruby-lang.org/en/raa.html" target="_top">Ruby Application Archive</a>.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="http://www.fox-toolkit.org/ftp/fox-0.99.188.tar.gz" target="_top">fox-0.99.188</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2324"></a>Changes Since Version 0.99.180</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Added <tt>slices</tt>, <tt>stacks</tt> and <tt>loops</tt> accessors for the <tt>FXGLCone</tt> and <tt>FXGLCylinder</tt> classes, to provide finer control over the rendering fidelity for these shapes (this was already done for <tt>FXGLSphere</tt> in the previous release).</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.fox-toolkit.org/pub/fox-0.99.181.tar.gz" target="_top">fox-0.99.181</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2355"></a>Changes Since Version 0.99.174</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Moved the class definitions for <tt>FXGLPoint</tt>, <tt>FXGLLine</tt>, <tt>FXGLCube</tt>, <tt>FXGLCylinder</tt>, <tt>FXGLSphere</tt> and <tt>FXGLCone</tt> to a new library module <tt>fox/glshapes.rb</tt>. The interfaces are the same as the C++ versions of these classes, this is just a "pure Ruby" implementation of the classes instead of wrappers around the C++ classes. See <tt>examples/glviewer.rb</tt> for an example of their use.</p></li><li style="list-style-type: disc"><p>Fixed a bug related to object ownership for GL objects added to a <tt>FXGLGroup</tt>.</p></li><li style="list-style-type: disc"><p>Added support for overriding the virtual <tt>layout</tt> method in classes derived from <tt>FXWindow</tt>. This will allow developers to, for example, develop new kinds of layout managers.</p></li><li style="list-style-type: disc"><p>Replaced the previous WISE-based installer for the Windows version with an Inno Setup-based installer and reorganized things to better reflect the organization used in the standard Ruby installer.</p></li><li style="list-style-type: disc"><p>Updated the setup and build script to the latest version of Minero Aoki's scripts (version 3.0.2). The main change for FXRuby end-users is that the name of the build script is now <tt>install.rb</tt> instead of <tt>setup.rb</tt>.</p></li><li style="list-style-type: disc"><p>Added the <tt>colors.rb</tt> library file, for predefined color names in the <tt>FXColor</tt> namespace. The use of this module allows you to use symbolic names like <tt>FXColor::Red</tt> instead of an RGB constant like FXRGB(255, 0, 0). Many thanks to Jeff Heard for this suggestion and the contributed file.</p></li><li style="list-style-type: disc"><p>The <tt>FXRegion</tt> was accidentally being renamed to <tt>FX_Region</tt> (a little behind-the-scenes magic I'm doing in FXRuby) and as a result you couldn't use this class. Thanks to Steven Grady for catching this bug.</p></li><li style="list-style-type: disc"><p>The <tt>FXFileStream</tt> class now supports a Ruby-style <tt>open</tt> singleton method that provides transactional control for closing the file stream when it's done. See the <tt>image.rb</tt> and <tt>imageviewer.rb</tt> examples for how this works.</p></li><li style="list-style-type: disc"><p>After some discussions at RubyConf and follow-up discussions on the comp.lang.ruby newsgroup, the procedure for attaching events handlers to FXRuby widgets has been greatly simplified. Most of the example programs have been updated to reflect these changes, and a new documentation section has been added to describe how it works. For some of the background, please see <a href="http://www.rubygarden.org/ruby?FXRubyComments" target="_top">this page</a> on the RubyGarden Wiki.</p></li><li style="list-style-type: disc"><p>Added support for the <tt>each_row</tt> and <tt>each_column</tt> iterators for the <tt>FXTable</tt> class. These iterators yield an array of references to <tt>FXTableItem</tt> instances, one per row or column, respectively. Note that the <tt>each</tt> method is just an alias for <tt>each_row</tt>.</p></li><li style="list-style-type: disc"><p>Removed the interfaces for <tt>fxrandom</tt>, <tt>fxmalloc</tt>, <tt>fxcalloc</tt>, <tt>fxresize</tt>, <tt>fxmemdump</tt>, and <tt>fxfree</tt>. These utility functions are not relevant for FXRuby.</p></li><li style="list-style-type: disc"><p>Corrected interfaces for <tt>fxhsv_to_rgb</tt> and <tt>fxrgb_to_hsv</tt> so that they return three-element arrays of the converted color components.</p></li><li style="list-style-type: disc"><p>Corrected interfaces for <tt>FXWindow#acquireSelection</tt>, <tt>FXWindow#acquireClipboard</tt> and <tt>FXWindow#beginDrag</tt> to take an array of drag types.</p></li><li style="list-style-type: disc"><p>Corrected interfaces for <tt>fxsaveBMP</tt>, <tt>fxsaveGIF</tt>, <tt>fxsaveICO</tt>, <tt>fxsavePCX</tt>, <tt>fxsavePNG</tt>, <tt>fxsaveTIF</tt> and <tt>fxsaveXPM</tt> so that they expect a Ruby string (containing the image pixel data) as their second argument.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.fox-toolkit.org/pub/fox-0.99.180.tar.gz" target="_top">fox-0.99.180</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2548"></a>Changes Since Version 0.99.173</h2></div></div><div class="itemizedlist"><ul type="bullet">< li style="list-style-type: disc"><p>Moved all of the method name aliases out of the C interface code and into a new library file (<tt>fox/aliases.rb</tt>). This file is loaded automatically so you don't need to change your code. Similarly, moved all of the iterator methods out of the C code and into a library file (<tt>fox/iterators.rb</tt>). The main purpose of these changes is to reduce the size of the C++ code (especially <tt>core_wrap.cpp</tt>) where possible. Obviously, compared to recompiling the C++ source code, it's also much more efficient to quickly patch the Ruby files and re-run when there are problems.</p></li><li style="list-style-type: disc"><p>A few errors made it into the <tt>undolist.rb</tt> library module and the <tt>textedit.rb</tt> example last time; I think these have been fixed.</p></li><li style="list-style-type: disc"><p>I meant to add support for the new <tt>FXPCXIcon</tt> and <tt>FXPCXImage</tt> classes with the last release, but somehow I overlooked those. They are now supported, along with the other new classes introduced by FOX version 0.99.174: <tt>FXTIFIcon</tt>, <tt>FXTIFImage</tt> and <tt>FXProgressDialog</tt>.</p></li><li style="list-style-type: disc"><p>Fixed a bug in the GC-related code for "marking" C++ objects. I had not accounted for the possibility that the pointer passed to my mark functions could be a <tt>NULL</tt> pointer, and as a result the code would seg fault during garbage collection, under some circumstances. Many thanks to Ralf Canis for catching this bug.</p></li><li style="list-style-type: disc"><p>Updated the source code and <tt>extconf.rb</tt> files so that FXRuby configures and builds correctly for the "mswin32" builds. Thanks very much to Lorien Dunn for prompting me to get this stuff up-to-date!</p></li><li style="list-style-type: disc"><p>Fixed things so that the <tt>FXApp#addInput</tt> and <tt>FXApp#removeInput</tt> instance methods work properly for generating input messages. The first argument to both of these methods should be an <tt>IO</tt> object of some kind (specifically, an object that implements a <tt>fileno</tt> method). For more information about how this works, see the "Timers, Chores, Signals and Input Messages" section of the FOX documentation. Also see the new <tt>inputs.rb</tt> program in the <tt>examples</tt> directory for an example of how this works. Thanks to Ralf Canis for reminding me that I left this broken!</p></li><li style="list-style-type: disc"><p>Completed the basic code changes required for <tt>FXObject#handle</tt> to properly convert its message data into something that the C++ objects recognize (see the first item in the FXRuby To-Do List for more information). A lot of message types and identifiers are now handled correctly, especially those that are common to all <tt>FXWindow</tt>s. Most of the more widget-specific messages are not handled yet, and this is going to take awhile to complete; it's just a tedious process.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.cfdrc.com/pub/FOX/fox-0.99.174.tar.gz" target="_top">fox-0.99.174</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2639"></a>Changes Since Version 0.99.172</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Changed the build and installation process to use Minero Aoki's <tt>setup.rb</tt> tools. Looking ahead I can see that FXRuby will probably consist of a core C++ extension module and a collection of Ruby library scripts, and so now was the right time to make that transition.</p><p>If you have previously installed FXRuby (and written programs with the same) there are a few changes that may affect you. First, <tt>setup.rb</tt> will install the shared library (<tt>fox.so</tt>) in your <tt>site_ruby</tt> directory instead of the "core" libraries directory, where it was previously installed. So you should be sure to remove the old version of <tt>fox.so</tt> before installing and using this one.</p><p>The other change to be aware of is that there is now a <tt>fox</tt> directory containing FXRuby library scripts, and the <tt>responder.rb</tt> module is the first entry for this directory. You can import this file into your Ruby scripts with the line:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">require 'fox/responder'</pre></td></tr></table><p>and it's no longer necessary to drag copies of that file around.</p></li><li style="list-style-type: disc"><p>Aliased the <tt>getText</tt> instance method to <tt>to_s</tt> for a number of classes. This change should make things a little more convenient when inspecting the contents of widgets whose primary purpose is text entry or display. Thanks to Barry Shultz for this suggestion.</p></li><li style="list-style-type: disc"><p>Added the <tt>FXWindow#removeChild</tt> method for removing child widgets from a container window. This method doesn't exist for the C++ <tt>FXWindow</tt> class because it isn't needed; in C++ programs you simply delete the C++ object and it automatically gets removed from its parent. Note that after you call <tt>FXWindow#removeChild</tt> any outstanding references to the recently deceased child widget are invalid and should be set to <tt>nil</tt> or otherwise disposed of. Thanks to Ted Meng for noticing this omission.</p></li><li style="list-style-type: disc"><p>Modified some of the OpenGL method calls in <tt>gltest.rb</tt> for compatibility with Ruby/OpenGL 0.32. You should now be able to use Ruby/OpenGL with FXRuby unmodified.</p></li><li style="list-style-type: disc"><p>Added <tt>each()</tt> instance methods for <tt>FXComboBox</tt>, <tt>FXGLGroup</tt>, <tt>FXHeader</tt>, <tt>FXIconList</tt>, <tt>FXList</tt>, <tt>FXListBox</tt>, <tt>FXTreeItem</tt>, <tt>FXTreeList</tt> and <tt>FXTreeListBox</tt> in support of iterating over their sub-items. Also mixed the <tt>Enumerable</tt> module into all of these classes.</p></li><li style="list-style-type: disc"><p>Corrected the implementations of <tt>getData()</tt> and <tt>setData()</tt> for a variety of classes. You should now be able to attach arbitrary (application-defined) data to any FOX object that supports these APIs.</p></li><li style="list-style-type: disc"><p>As a debugging tool, you can now optionally catch exceptions raised in message handlers. To turn on this feature, call the <tt>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></li><li style="list-style-type: disc"><p>Extended the interfaces for <tt>FXApp#addSignal</tt> and <tt>FXApp#removeSignal</tt> 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 <tt>Process.kill</tt> module method). For examples of how to use this, see the <tt>datatarget.rb</tt> or <tt>imageviewer.rb</tt> example programs.</p></li><li style="list-style-type: disc"><p>Corrected the implementations of <tt>fxparsefontdesc()</tt> and <tt>fxunparsefontdesc()</tt> module methods.</p></li><li style="list-style-type: disc"><p>Added a pure Ruby implementation of the standard <tt>FXCommand</tt> and <tt>FXUndoList</tt> classes from the standard FOX library.</p></li><li style="list-style-type: disc"><p>Added the <tt>splitter.rb</tt> example, to demonstrate the <tt>FXSplitter</tt> class and its options.</p></li><li style="list-style-type: disc"><p>Completed the initial version of <tt>browser.rb</tt>, which is just a simple tool to inspect the methods and constants exposed by different FOX classes. Thanks to Albert Wagner for pointing out some bugs in this one and providing me with the motivation to complete it. I don't know how useful it is, but it seems to be a required utility for every GUI toolkit for Ruby ;) If you'd like to suggest further im provements, please feel free!</p></li><li style="list-style-type: disc"><p>Corrected the constructors for <tt>FXXPMIcon</tt> and <tt>FXXPMImage</tt> so that they accept a list of strings as their second argument. The list of strings should be an XPM format image file. You can also pass <tt>nil</tt> to construct an initially-empty icon or image.</p></li><li style="list-style-type: disc"><p>Corrected the message data sent by <tt>FXList</tt> to its message target for the <tt>SEL_SELECTED</tt>, <tt>SEL_DESELECTED</tt>, <tt>SEL_INSERTED</tt>, <tt>SEL_DELETED</tt>, and <tt>SEL_REPLACED</tt> messages. For each of these messages, the data should be an integer indicating the affected list item's index.</p></li><li style="list-style-type: disc"><p>Added typemaps to convert Ruby message data back into C++ void pointers when calling the base class versions of message handlers. Please see the to-do list for a brief discussion of the issues that this fix addressed, and what remains to be done.</p></li><li style="list-style-type: disc"><p>Fixed a subtle GC bug related to object ownership. I'll use the <tt>FXList</tt> and <tt>FXListItem</tt> classes to describe the problem, but it's also relevant for several other FOX classes.</p><p>There are two ways to add a new list item to an <tt>FXList</tt> instance. One of those ways involves creating a new <tt>FXListItem</tt> instance explicitly (i.e. using <tt>FXListItem.new</tt>) and then passing it into an <tt>FXList</tt> instance method like <tt>FXList#appendItem</tt>. Before you add the item to the list, the item is "self-owned"; in other words, if Ruby's garbage collector decides to kill off that <tt>FXListItem</tt> instance, it is appropriate to also destroy the underlying C++ object. After the list item has been added to an <tt>FXList</tt>, however, the <tt>FXList</tt> owns that list item and is responsible for destroying it.</p><p>This bug became an issue when you added <tt>FXListItem</tt> instances to a list, because the code didn't properly recognize the fact that "ownership" of the list item had been transferred from the <tt>FXListItem</tt> instance to the <tt>FXList</tt>. More to the point, Ruby's garbage collector assumed that it was still OK to destroy the <tt>FXListItem</tt> instances that it knew about, and so objects could get deleted twice. This would usually result in a core dump.</p><p>Many thanks to Albert Wagner for submitting an example program that demonstrated this problem.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.fox-toolkit.org/pub/fox-0.99.173.tar.gz" target="_top">fox-0.99.173</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2903"></a>Changes Since Version 0.99.167</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Completed the coding for "safe" coexistence with Ruby's garbage collector; it should no longer be necessary to call <tt>GC.disable</tt> at the top of your FXRuby programs. Although all of the example programs now work correctly without disabling the garbage collector, this doesn't mean that there aren't still some bugs lurking. If your FXRuby program(s) crash mysteriously, try adding <tt>GC.disable</tt> to the top to see if it fixes things. If this does make a difference, <span class="emphasis"><em>please</em></span> send me the program (or another that reproduces the problem) so I can track down what's going wrong.</p></li><li style="list-style-type: disc"><p>Added aliases for all classes' accessor functions so that the related properties can be accessed more directly; for example, <tt>FXLabel#getText</tt> is aliased to <tt>FXLabel#text</tt> and <tt>FXLabel#setText</tt> is aliased to <tt>FXLabel#text=</tt>. Although the different forms are functionally equivalent, the new form is often easier to read. For example, consider this snippet of code that modifies a label's text:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">aLabel.setText(aLabel.getText() + " (modified)")</pre></td></tr></table><p>and this version of the same, now using the propery accessor functions:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">aLabel.text += " (modified)"</pre></td></tr></table><p>None of the standard FOX class APIs have been removed, so you shouldn't need to modify any already-working code.</p></li><li style="list-style-type: disc"><p>Corrected the message data sent from the <tt>FXText</tt> widget to its message target for the <tt>SEL_SELECTED</tt>, <tt>SEL_DESELECTED</tt>, <tt>SEL_INSERTED</tt>, <tt>SEL_DELETED</tt> and <tt>SEL_REPLACED</tt> message types. For the first four messages, the associated message data sent to the target will be an array of two integers indicating the starting position in the text buffer and text length for the affected text. For the <tt>SEL_REPLACED</tt> message type, the message data will be an array of three integers, indicating the starting position in the text buffer, the length of the old (replaced) text, and the length of the new text.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.fox-toolkit.org/pub/fox-0.99.172.tar.gz" target="_top">fox-0.99.172</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2972"></a>Changes Since Version 0.99.166-1</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Corrected the interfaces for <tt>FXInputDialog.getString</tt>, <tt>FXInputDialog.getReal</tt> and <tt>FXInputDialog.getInteger</tt> to either return the requested type or <tt>nil</tt> if the user cancels the dialog.</p></li><li style="list-style-type: disc"><p>Added code at the top of all the examples to disable Ruby's garbage collector, until the issues with GC are resolved.</p></li><li style="list-style-type: disc"><p>Corrected implementations for the overloaded versions of <tt>FXWindow#update</tt>. This method can be invoke with no arguments (in which case it updates the entire window) or with four arguments indicating the x, y, w and h of the client area to be updated.</p></li><li style="list-style-type: disc"><p>Modified how the return values from Ruby message handler functions are interpreted, to make things a little more convenient for programmers. If the result is a numeric type (<tt>Fixnum</tt>, <tt>Bignum</tt> or <tt>Float</tt>) we try to cast it to a long integer but also trap the value to either zero or one. If it's a boolean result we map <tt>false</tt> and <tt>true</tt> to zero and one, respectively. For any other return type (<tt>nil</tt>, strings, etc.) we just assume they meant to return 1. Thanks to Ted Meng for this suggestion.</p></li><li style="list-style-type: disc"><p>Modified the interfaces for <tt>FXFileDialog#getPatternList</tt>, <tt>FXFileSelector#getPatternList</tt>, <tt>FXFileDialog#setPatternList</tt> and <tt>FXFileSelector#setPatternList</tt> to take (or return) an array of strings (one array item per pattern) of the form "C/C++ Files (*.cpp)". This is sort-of a compromise between the currently available overloaded C++ versions of these functions, both of which look pretty awkward in Ruby. For an example of how this works now, see the <tt>imageviewer.rb</tt> example program.</p></li><li style="list-style-type: disc"><p>Added the FOX key cap definitions (i.e. the symbols from <tt>fxkeys.h</tt>) into FXRuby. Thanks to Benedikt Grundmann for pointing out this omission.</p></li><li style="list-style-type: disc"><p>Added initial support for multithreaded FXRuby applications. 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. As a simple example, I modified the <tt>groupbox.rb</tt> example program so that the clock label that appears in the lower right-hand corner is continuously updated (by a separate thread) instead of just displaying static text.</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>FXApp</tt> object's <i><tt>sleepTime</tt></i> attribute. The default value for <i><tt>FXApp#sleepTime</tt></i> is 100 milliseconds. You can also disable the threads support completely by calling <tt>FXApp#disableThreads</tt> (and subsequently re-enable it with <tt>FXApp#enableThreads</tt>.</p></li><li style="list-style-type: disc"><p>Started adding <a href="http://homepage1.nifty.com/markey/ruby/rubyunit/index_e.html" target="_top">RubyUnit</a>-style test cases to the <tt>tests</tt> subdirectory. There's not much there yet but we've got to start somewhere!</p></li><li style="list-style-type: disc"><p>Converted most of the documentation over to <a href="http://www.docbook.org" target="_top">DocBook</a> format and reorganized the web page accordingly.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.cfdrc.com/pub/FOX/fox-0.99.167.tar.gz" target="_top">fox-0.99.167</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e3089"></a>Changes Since Version 0.99.166</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Corrected a problem with the binary distribution (i.e. the <tt>fox.so</tt> file) for Windows, which made it unusable on most Windows installations. This problem was related to an incompatibility between the versions of Cygwin that I was using to compile FOX and FXRuby, and the version used to compile the standard Ruby 1.6.2 distribution for Windows. Many, many thanks to Pete, Bene and Robert for helping me to test and resolve this issue!</p></li><li style="list-style-type: disc"><p>Added support for FOX data targets, as demonstrated by the new <tt>datatarget.rb</tt> example in the <tt>examples</tt> directory. A data target is a special kind of FOX object that can be designated as the message target of any widget that has an associated "value", and then the value of the data target and that widget become automatically linked to each other. For example, you can create a data target with a string value and then make it the message target for an <tt>FXTextField</tt> widget. From then on, changes made to the text field will be automatically reflected in the data target's value and vice versa. (For those familiar with Tk, this is the same principal as its <tt>TkVariable</tt> class.)</p></li><li style="list-style-type: disc"><p>Made the <tt>extconf.rb</tt> script a lot more intelligent and robust. Now, if you don't explicitly specify the <tt>--with-fox-include</tt> and <tt>--with-fox-lib</tt> arguments it will look in the standard FOX installation locations (<tt>/usr/local/include/fox</tt> and <tt>/usr/local/lib</tt>, respectively). If it doesn't find the appropriate files there either, it will stop with an error message. The new <tt>extconf.rb</tt> script also compares the FOX version number from the FOX's <tt>fxver.h</tt> file to be sure it's consistent with the version of FXRuby that you're building.</p></li><li style="list-style-type: disc"><p>Revived the missing <tt>FXApp#addTimeout</tt> and <tt>FXApp#removeTimeout</tt> methods, which accidentally got clobbered in the 0.99.166 release.</p></li><li style="list-style-type: disc"><p>Corrected the implementation of <tt>FXWindow#getCursorPosition</tt>. Previously it thought it needed three inputs when in fact it doesn't; this method takes no arguments and returns a 3-element array containing the current <tt>x</tt> and <tt>y</tt> positions (in local window coordinates) and a flag indicating the mouse button states.</p></li><li style="list-style-type: disc"><p>Corrected the implementation of <tt>FXDebugTarget.messageTypeName</tt> to return an array of strings instead of an array of symbols (IDs).</p></li><li style="list-style-type: disc"><p>Added missing wrappers for the <tt>FXJPEGImage</tt> and <tt>FXJPEGIcon</tt> classes; somehow these got overlooked previously.</p></li><li style="list-style-type: disc"><p>Corrected several bugs in the example programs <tt>groupbox.rb</tt>, <tt>imageviewer.rb</tt> and <tt>table.rb</tt>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e3186"></a>Changes Since Version 0.99.161</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>In previous releases of FXRuby, not all of the constructor arguments for some class constructors were exposed; this was due to an obscure problem with how SWIG generated code for functions with more than nine default arguments. This problem has been corrected and all class constructor argument lists should now be consistent with the C++ library versions of the same.</p></li><li style="list-style-type: disc"><p>Corrected several bugs related to the conversions between FOX's FXbool (boolean) type and Ruby's <tt>true</tt> and <tt>false</tt> values. These bugs manifested themselves in many weird and wonderful ways; the most obvious one was the way that opening up pulldown menus (for example, in the <tt>foursplit.rb</tt> example) would cause the entire program to lock up. If you were seeing some unusual behavior like this in the previous release my best advice is to see if you can still reproduce the problem (and if so, contact me).</p></li><li style="list-style-type: disc"><p>Added several new example programs (<tt>dialog.rb</tt>, <tt>dirlist.rb</tt>, <tt>groupbox.rb</tt>, <tt>header.rb</tt>, <tt>imageviewer.rb</tt>, <tt>tabbook.rb</tt> and <tt>table.rb</tt>) in the <tt>examples</tt> subdirectory.</p></li><li style="list-style-type: disc"><p>Added support for the <tt>FXFile</tt> class' singleton methods. Most or all of this functionality is already available in Ruby's standard library but <tt>FXFile</tt> is included for completeness.</p></li><li style="list-style-type: disc"><p>Generally speaking, I corrected the (Ruby-side) implementations of a lot of functions and I believe that all of the important ones are exposed correctly. See the <tt>ChangeLog</tt> file for specific cases.</p></li><li style="list-style-type: disc"><p>Started work on tutorial documentation (in the <tt>doc</tt> subdirectory) but this isn't very useful yet. Plans are to beef this up considerably next time.</p></li><li style="list-style-type: disc"><p>Updated the API for compatibility with FOX version 0.99.166.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e3259"></a>Changes Since Version 0.99.147</h2></div></div><div class="itemizedlist"><ul type="disc"><li><p>The code has been reworked a good deal in an effort to reduce the compile time (although more can and will be done). One part of this change was to break the extension code up into multiple files instead of a single file. The more significant change was to move a lot of inlined template function instantiations out of the FXRuby header file (<tt>FXRuby.h</tt>) and into a separate source code file that only needs to be compiled once. To give you an idea of the compile times after this change, I can now compile FXRuby under Cygwin-on-Win2000 in about 6 minutes (on a Pentium III-700MHz) or under Linux in about 30 minutes (on a Pentium "classic" 133MHz).</p></li><li><p>For classes <tt>FXHeader</tt>, <tt>FXIconList</tt> and <tt>FXList</tt>, added support for the overloaded member functions <tt>appendItem</tt>, <tt>insertItem</tt>, <tt>prependItem</tt>, and <tt>replaceItem</tt>. For classes <tt>FXTreeList</tt> and <tt>FXTreeListBox</tt>, added support for the overloaded member functions <tt>addItemAfter</tt>, <tt>addItemBefore<... [truncated message content] |
From: Lyle J. <ly...@us...> - 2002-05-10 22:23:46
|
Update of /cvsroot/fxruby/FXRuby In directory usw-pr-cvs1:/tmp/cvs-serv9270 Modified Files: Tag: release10 index.html Log Message: Miscellaneous documentation updates. Index: index.html =================================================================== RCS file: /cvsroot/fxruby/FXRuby/index.html,v retrieving revision 1.19 retrieving revision 1.19.2.1 diff -C2 -d -r1.19 -r1.19.2.1 *** index.html 21 Mar 2002 21:44:39 -0000 1.19 --- index.html 10 May 2002 22:23:12 -0000 1.19.2.1 *************** *** 21,39 **** <td ALIGN=LEFT VALIGN=TOP><b>Downloads</b></td> ! <td>The latest version of FXRuby, including the source code distribution ! and binaries for Microsoft Windows, are always available from the ! <a href="http://sourceforge.net/projects/fxruby">SourceForge project page</a>. The SourceForge releases should always have accompanying release notes describing the changes for that release, and a cumulative ! <tt>ChangeLog</tt> ! file is also included in the FXRuby source code distribution. The file ! names will always be of the form <i>FXRuby-version.ext</i>, and the <i>version</i> ! indicates the compatible version of the FOX library that you'll need if ! you're building from source. The binary distribution for Windows is compatible ! with the standard Ruby installer for Windows that's available for download ! from <a href="http://www.pragmaticprogrammer.com/ruby/downloads/ruby-install.html"> The Pragmatic Programmers Site</a>.<p> ! Note that the precompiled binary for Windows is built with OpenGL support, and thus depends on the OpenGL runtime libraries (<tt>opengl32.dll</tt> and <tt>glu32.dll</tt>). These libraries were <i>not</i> included with Windows 95 (earlier than OSR2), so if you're using Ruby and FXRuby on a Windows 95 machine, you may need to download the <a href="http://download.microsoft.com/download/win95upg/info/1/W95/EN-US/Opengl95.exe">OpenGL runtime libraries</a>. You must have these libraries installed even if you don't plan to do anything OpenGL-related with FXRuby. </td> </tr> --- 21,50 ---- <td ALIGN=LEFT VALIGN=TOP><b>Downloads</b></td> ! <td>The latest version of FXRuby, including the source code distribution, ! a binary installer for Microsoft Windows, and Linux RPMs are always available ! from the <a href="http://sourceforge.net/projects/fxruby">SourceForge project page</a>. The SourceForge releases should always have accompanying release notes describing the changes for that release, and a cumulative ! <tt>ChangeLog</tt> file is also included in the FXRuby source code distribution. ! The binary distribution for Windows is compatible with the standard Ruby ! installer for Windows that's available for download from ! <a href="http://www.pragmaticprogrammer.com/ruby/downloads/ruby-install.html"> The Pragmatic Programmers Site</a>.<p> ! Note that the precompiled binary for Windows is built with OpenGL support, and ! thus depends on the OpenGL runtime libraries (<tt>opengl32.dll</tt> and ! <tt>glu32.dll</tt>). These libraries were <i>not</i> included with Windows 95 ! (earlier than OSR2), so if you're using Ruby and FXRuby on a Windows 95 machine, ! you may need to download the <a href="http://download.microsoft.com/download/win95upg/info/1/W95/EN-US/Opengl95.exe">OpenGL runtime libraries</a>. ! You must have these libraries installed even if you don't plan to do anything ! OpenGL-related with FXRuby. </td> + </tr> + + <tr> + <td ALIGN=LEFT VALIGN=TOP> + <b>Versions</b> + </td> + <td>As of the FOX 1.0 release, any FXRuby version 1.0.x release should be + compatible with any FOX 1.0.x release.</td> </tr> |
Update of /cvsroot/fxruby/FXRuby/ext/fox In directory usw-pr-cvs1:/tmp/cvs-serv9270/ext/fox Modified Files: Tag: release10 dialogs_wrap.cpp layout_wrap.cpp mdi_wrap.cpp opengl_wrap.cpp scintilla_wrap.cpp ui_wrap.cpp Log Message: Miscellaneous documentation updates. Index: dialogs_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/dialogs_wrap.cpp,v retrieving revision 1.34.2.9 retrieving revision 1.34.2.10 diff -C2 -d -r1.34.2.9 -r1.34.2.10 *** dialogs_wrap.cpp 8 May 2002 21:32:13 -0000 1.34.2.9 --- dialogs_wrap.cpp 10 May 2002 22:23:13 -0000 1.34.2.10 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020508-1438 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of Index: layout_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/layout_wrap.cpp,v retrieving revision 1.8.2.9 retrieving revision 1.8.2.10 diff -C2 -d -r1.8.2.9 -r1.8.2.10 *** layout_wrap.cpp 8 May 2002 21:32:14 -0000 1.8.2.9 --- layout_wrap.cpp 10 May 2002 22:23:14 -0000 1.8.2.10 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020508-1438 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of Index: mdi_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/mdi_wrap.cpp,v retrieving revision 1.36.2.9 retrieving revision 1.36.2.10 diff -C2 -d -r1.36.2.9 -r1.36.2.10 *** mdi_wrap.cpp 8 May 2002 21:32:14 -0000 1.36.2.9 --- mdi_wrap.cpp 10 May 2002 22:23:14 -0000 1.36.2.10 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020508-1438 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of Index: opengl_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/opengl_wrap.cpp,v retrieving revision 1.41.2.10 retrieving revision 1.41.2.11 diff -C2 -d -r1.41.2.10 -r1.41.2.11 *** opengl_wrap.cpp 8 May 2002 21:32:14 -0000 1.41.2.10 --- opengl_wrap.cpp 10 May 2002 22:23:14 -0000 1.41.2.11 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020508-1438 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of Index: scintilla_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/scintilla_wrap.cpp,v retrieving revision 1.16.2.5 retrieving revision 1.16.2.6 diff -C2 -d -r1.16.2.5 -r1.16.2.6 *** scintilla_wrap.cpp 8 May 2002 21:32:15 -0000 1.16.2.5 --- scintilla_wrap.cpp 10 May 2002 22:23:17 -0000 1.16.2.6 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020508-1438 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of Index: ui_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/ui_wrap.cpp,v retrieving revision 1.9.2.9 retrieving revision 1.9.2.10 diff -C2 -d -r1.9.2.9 -r1.9.2.10 *** ui_wrap.cpp 8 May 2002 21:32:15 -0000 1.9.2.9 --- ui_wrap.cpp 10 May 2002 22:23:17 -0000 1.9.2.10 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020508-1438 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of |
From: Lyle J. <ly...@us...> - 2002-05-10 21:30:42
|
Update of /cvsroot/fxruby/FXRuby/ext/fox In directory usw-pr-cvs1:/tmp/cvs-serv27731 Modified Files: Tag: release10 extconf.rb extconf.rb.in Log Message: Various cleanups for the extconf.rb script, mainly to support searching multiple default directories to auto-detect the location of FOX. Index: extconf.rb =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/extconf.rb,v retrieving revision 1.27.2.2 retrieving revision 1.27.2.3 diff -C2 -d -r1.27.2.2 -r1.27.2.3 *** extconf.rb 6 May 2002 15:58:52 -0000 1.27.2.2 --- extconf.rb 10 May 2002 21:30:39 -0000 1.27.2.3 *************** *** 4,41 **** require 'mkmf' def getInstalledFOXVersion ! incdir = "/usr/local/include/fox" ! ARGV.each { |arg| if arg =~ /--with-fox-include/ ! incdir = arg.split('=')[1] end ! } ! filename = File.join(incdir, "fxver.h") ! if FileTest.exists?(filename) ! foxMajor, foxMinor, foxLevel = nil, nil, nil ! File.foreach(filename) { |line| ! if line =~ /FOX_MAJOR/ ! foxMajor = line.split()[2] ! elsif line =~ /FOX_MINOR/ ! foxMinor = line.split()[2] ! elsif line =~ /FOX_LEVEL/ ! foxLevel = line.split()[2] ! end ! } ! if foxMajor && foxMinor && foxLevel ! return foxMajor + "." + foxMinor + "." + foxLevel ! else ! return "" end ! else ! puts "I couldn't locate the standard FOX header file \"fxver.h\" at this location:" ! puts "" ! puts " #{filename}" ! puts "" ! puts "Please specify the locations for the FOX header files and library using the" ! puts "--with-fox-include and --with-fox-lib options to extconf.rb as described in" ! puts "the FXRuby installation instructions." ! exit ! end end --- 4,51 ---- require 'mkmf' + def read_fox_version(filename) + foxMajor, foxMinor, foxLevel = nil, nil, nil + File.foreach(filename) do |line| + if line =~ /FOX_MAJOR/ + foxMajor = line.split()[2] + elsif line =~ /FOX_MINOR/ + foxMinor = line.split()[2] + elsif line =~ /FOX_LEVEL/ + foxLevel = line.split()[2] + end + end + [foxMajor, foxMinor, foxLevel] + end + def getInstalledFOXVersion ! # incdirs is an array of directories that we'll search (in order) ! # looking for the FOX header files ! incdirs = ["/usr/include/fox", "/usr/local/include/fox"] ! ARGV.each do |arg| if arg =~ /--with-fox-include/ ! option, value = arg.split('=') ! incdirs = [ value ] + incdirs end ! end ! ! incdirs.each do |incdir| ! filename = File.join(incdir, "fxver.h") ! if FileTest.exists?(filename) ! foxMajor, foxMinor, foxLevel = read_fox_version(filename) ! idircflag = "-I" + incdir ! $CPPFLAGS += " " + idircflag unless $CPPFLAGS.split.include?(idircflag) ! return [foxMajor, foxMinor, foxLevel].join('.') end ! end ! ! # Couldn't find it ! puts "I couldn't locate \"fxver.h\" in any of the following directories:" ! puts "" ! incdirs.each { |incdir| puts " #{incdir}" } ! puts "" ! puts "Please specify the locations for the FOX header files and library using the" ! puts "--with-fox-include and --with-fox-lib options to extconf.rb as described in" ! puts "the FXRuby installation instructions." ! exit end *************** *** 47,51 **** # This directive processes the "--with-fox-include" and "--with-fox-lib" # command line switches and modifies the CFLAGS and LDFLAGS accordingly. ! dir_config('fox', '/usr/local/include/fox', '/usr/local/lib') # This directive processes the "--with-scintilla-include" and --- 57,61 ---- # This directive processes the "--with-fox-include" and "--with-fox-lib" # command line switches and modifies the CFLAGS and LDFLAGS accordingly. ! dir_config('fox', nil, '/usr/local/lib') # This directive processes the "--with-scintilla-include" and *************** *** 55,61 **** # Verify version number for FOX from the installed header files ! installedVer = getInstalledFOXVersion().split('.') ! thisVer = "1.0.10".split('.') ! if (installedVer[0] != thisVer[0]) || (installedVer[1] != thisVer[1]) puts "The version number for this installation of FOX appears to be inconsistent" puts "with this release of FXRuby (1.0.10)." --- 65,71 ---- # Verify version number for FOX from the installed header files ! instMajor, instMinor, instLevel = getInstalledFOXVersion().split('.') ! thisMajor, thisMinor, thisLevel = "1.0.10".split('.') ! unless (instMajor == thisMajor) && (instMinor == thisMinor) puts "The version number for this installation of FOX appears to be inconsistent" puts "with this release of FXRuby (1.0.10)." Index: extconf.rb.in =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/Attic/extconf.rb.in,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** extconf.rb.in 10 May 2002 05:04:01 -0000 1.1.2.1 --- extconf.rb.in 10 May 2002 21:30:39 -0000 1.1.2.2 *************** *** 4,41 **** require 'mkmf' def getInstalledFOXVersion ! incdir = "/usr/local/include/fox" ! ARGV.each { |arg| if arg =~ /--with-fox-include/ ! incdir = arg.split('=')[1] end ! } ! filename = File.join(incdir, "fxver.h") ! if FileTest.exists?(filename) ! foxMajor, foxMinor, foxLevel = nil, nil, nil ! File.foreach(filename) { |line| ! if line =~ /FOX_MAJOR/ ! foxMajor = line.split()[2] ! elsif line =~ /FOX_MINOR/ ! foxMinor = line.split()[2] ! elsif line =~ /FOX_LEVEL/ ! foxLevel = line.split()[2] ! end ! } ! if foxMajor && foxMinor && foxLevel ! return foxMajor + "." + foxMinor + "." + foxLevel ! else ! return "" end ! else ! puts "I couldn't locate the standard FOX header file \"fxver.h\" at this location:" ! puts "" ! puts " #{filename}" ! puts "" ! puts "Please specify the locations for the FOX header files and library using the" ! puts "--with-fox-include and --with-fox-lib options to extconf.rb as described in" ! puts "the FXRuby installation instructions." ! exit ! end end --- 4,51 ---- require 'mkmf' + def read_fox_version(filename) + foxMajor, foxMinor, foxLevel = nil, nil, nil + File.foreach(filename) do |line| + if line =~ /FOX_MAJOR/ + foxMajor = line.split()[2] + elsif line =~ /FOX_MINOR/ + foxMinor = line.split()[2] + elsif line =~ /FOX_LEVEL/ + foxLevel = line.split()[2] + end + end + [foxMajor, foxMinor, foxLevel] + end + def getInstalledFOXVersion ! # incdirs is an array of directories that we'll search (in order) ! # looking for the FOX header files ! incdirs = ["/usr/include/fox", "/usr/local/include/fox"] ! ARGV.each do |arg| if arg =~ /--with-fox-include/ ! option, value = arg.split('=') ! incdirs = [ value ] + incdirs end ! end ! ! incdirs.each do |incdir| ! filename = File.join(incdir, "fxver.h") ! if FileTest.exists?(filename) ! foxMajor, foxMinor, foxLevel = read_fox_version(filename) ! idircflag = "-I" + incdir ! $CPPFLAGS += " " + idircflag unless $CPPFLAGS.split.include?(idircflag) ! return [foxMajor, foxMinor, foxLevel].join('.') end ! end ! ! # Couldn't find it ! puts "I couldn't locate \"fxver.h\" in any of the following directories:" ! puts "" ! incdirs.each { |incdir| puts " #{incdir}" } ! puts "" ! puts "Please specify the locations for the FOX header files and library using the" ! puts "--with-fox-include and --with-fox-lib options to extconf.rb as described in" ! puts "the FXRuby installation instructions." ! exit end *************** *** 47,51 **** # This directive processes the "--with-fox-include" and "--with-fox-lib" # command line switches and modifies the CFLAGS and LDFLAGS accordingly. ! dir_config('fox', '/usr/local/include/fox', '/usr/local/lib') # This directive processes the "--with-scintilla-include" and --- 57,61 ---- # This directive processes the "--with-fox-include" and "--with-fox-lib" # command line switches and modifies the CFLAGS and LDFLAGS accordingly. ! dir_config('fox', nil, '/usr/local/lib') # This directive processes the "--with-scintilla-include" and *************** *** 55,61 **** # Verify version number for FOX from the installed header files ! installedVer = getInstalledFOXVersion().split('.') ! thisVer = "@@FOX_VERSION@@".split('.') ! if (installedVer[0] != thisVer[0]) || (installedVer[1] != thisVer[1]) puts "The version number for this installation of FOX appears to be inconsistent" puts "with this release of FXRuby (@@FXRUBY_VERSION@@)." --- 65,71 ---- # Verify version number for FOX from the installed header files ! instMajor, instMinor, instLevel = getInstalledFOXVersion().split('.') ! thisMajor, thisMinor, thisLevel = "@@FOX_VERSION@@".split('.') ! unless (instMajor == thisMajor) && (instMinor == thisMinor) puts "The version number for this installation of FOX appears to be inconsistent" puts "with this release of FXRuby (@@FXRUBY_VERSION@@)." |
From: Lyle J. <ly...@us...> - 2002-05-10 21:29:20
|
Update of /cvsroot/fxruby/FXRuby In directory usw-pr-cvs1:/tmp/cvs-serv27442 Modified Files: Tag: release10 Makefile Makefile.in Log Message: Corrected the "make check" target so that it can run the tests before you actually install FXRuby. Index: Makefile =================================================================== RCS file: /cvsroot/fxruby/FXRuby/Attic/Makefile,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** Makefile 10 May 2002 19:47:55 -0000 1.1.2.4 --- Makefile 10 May 2002 21:29:17 -0000 1.1.2.5 *************** *** 41,46 **** check: ! cd tests ! ruby TS_All.rb install: all --- 41,45 ---- check: ! cd tests ; ruby -I../ext/fox -I../lib TS_All.rb install: all Index: Makefile.in =================================================================== RCS file: /cvsroot/fxruby/FXRuby/Attic/Makefile.in,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** Makefile.in 10 May 2002 19:56:52 -0000 1.1.2.2 --- Makefile.in 10 May 2002 21:29:17 -0000 1.1.2.3 *************** *** 41,46 **** check: ! cd tests ! ruby TS_All.rb install: all --- 41,45 ---- check: ! cd tests ; ruby -I../ext/fox -I../lib TS_All.rb install: all |
From: Lyle J. <ly...@us...> - 2002-05-10 20:13:02
|
Update of /cvsroot/fxruby/FXRuby/swig-interfaces In directory usw-pr-cvs1:/tmp/cvs-serv3253/swig-interfaces Modified Files: Tag: release10 typemaps.i FXImage.i FXIcon.i Log Message: Corrected input typemaps for "const void *pix" and "const FXuchar *PIXELS"; these should not in fact accept FXMemoryBuffer instances as inputs. But modified the constructors for FXIcon and FXImage to accept this. Index: typemaps.i =================================================================== RCS file: /cvsroot/fxruby/FXRuby/swig-interfaces/typemaps.i,v retrieving revision 1.35.2.4 retrieving revision 1.35.2.5 diff -C2 -d -r1.35.2.4 -r1.35.2.5 *** typemaps.i 9 May 2002 20:22:28 -0000 1.35.2.4 --- typemaps.i 10 May 2002 20:12:29 -0000 1.35.2.5 *************** *** 71,85 **** /** * Used by constructors for icons and images that require an array ! * of bytes as input; uses a Ruby string or a MemoryBuffer instance ! * instead. Also accepts "nil" in place of a NULL pointer. */ %typemap(ruby, in) const void* pix, const FXuchar* PIXELS { if ($input != Qnil) { if (TYPE($input) == T_STRING) { ! $1 = reinterpret_cast<$1_ltype>(RSTRING($input)->ptr); } else { FXMemoryBuffer *memoryBuffer = reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr($input, FXRbTypeQuery("FXMemoryBuffer *"))); ! $1 = reinterpret_cast<$1_ltype>(memoryBuffer->getData()); } } else { --- 71,99 ---- /** * Used by constructors for icons and images that require an array ! * of bytes as input; accepts a Ruby string instance instead. Also ! * accepts "nil" in place of a NULL pointer. */ %typemap(ruby, in) const void* pix, const FXuchar* PIXELS { if ($input != Qnil) { + Check_Type($input, T_STRING); + $1 = reinterpret_cast<$1_ltype>(RSTRING($input)->ptr); + } else { + $1 = NULL; + } + } + + /** + * Used by FXImage constructor for the image pixel data; accepts a Ruby + * string instance or an FXMemoryBuffer from some other image instead. Also + * accepts "nil" in place of a NULL pointer. + */ + %typemap(ruby, in) const void* IMGPIXELS { + if ($input != Qnil) { if (TYPE($input) == T_STRING) { ! $1 = reinterpret_cast<void *>(RSTRING($input)->ptr); } else { FXMemoryBuffer *memoryBuffer = reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr($input, FXRbTypeQuery("FXMemoryBuffer *"))); ! $1 = reinterpret_cast<void *>(memoryBuffer->getData()); } } else { Index: FXImage.i =================================================================== RCS file: /cvsroot/fxruby/FXRuby/swig-interfaces/FXImage.i,v retrieving revision 1.15.2.2 retrieving revision 1.15.2.3 diff -C2 -d -r1.15.2.2 -r1.15.2.3 *** FXImage.i 8 May 2002 16:45:09 -0000 1.15.2.2 --- FXImage.i 10 May 2002 20:12:29 -0000 1.15.2.3 *************** *** 70,74 **** /// Create an image ! FXImage(FXApp* a,const void *pix=NULL,FXuint opts=0,FXint w=1,FXint h=1); /// To get to the pixel data --- 70,74 ---- /// Create an image ! FXImage(FXApp* a,const void *IMGPIXELS=NULL,FXuint opts=0,FXint w=1,FXint h=1); /// To get to the pixel data *************** *** 145,149 **** public: // Constructor ! FXRbImage(FXApp* a,const void *pix=NULL,FXuint opts=0,FXint w=1,FXint h=1); // Destructor --- 145,149 ---- public: // Constructor ! FXRbImage(FXApp* a,const void *IMGPIXELS=NULL,FXuint opts=0,FXint w=1,FXint h=1); // Destructor Index: FXIcon.i =================================================================== RCS file: /cvsroot/fxruby/FXRuby/swig-interfaces/FXIcon.i,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** FXIcon.i 19 Mar 2002 23:18:40 -0000 1.9 --- FXIcon.i 10 May 2002 20:12:29 -0000 1.9.2.1 *************** *** 38,42 **** * and options as in FXImage. */ ! FXIcon(FXApp* a,const void *pix=NULL,FXColor clr=0,FXuint opts=0,FXint w=1,FXint h=1); /// Create the icon resource --- 38,42 ---- * and options as in FXImage. */ ! FXIcon(FXApp* a,const void *IMGPIXELS=NULL,FXColor clr=0,FXuint opts=0,FXint w=1,FXint h=1); /// Create the icon resource *************** *** 70,74 **** public: // Constructor ! FXRbIcon(FXApp* a,const void *pix=NULL,FXColor clr=0,FXuint opts=0,FXint w=1,FXint h=1); // Destructor --- 70,74 ---- public: // Constructor ! FXRbIcon(FXApp* a,const void *IMGPIXELS=NULL,FXColor clr=0,FXuint opts=0,FXint w=1,FXint h=1); // Destructor |
From: Lyle J. <ly...@us...> - 2002-05-10 20:12:41
|
Update of /cvsroot/fxruby/FXRuby/ext/fox In directory usw-pr-cvs1:/tmp/cvs-serv3253/ext/fox Modified Files: Tag: release10 image_wrap.cpp icons_wrap.cpp core_wrap.cpp Log Message: Corrected input typemaps for "const void *pix" and "const FXuchar *PIXELS"; these should not in fact accept FXMemoryBuffer instances as inputs. But modified the constructors for FXIcon and FXImage to accept this. Index: image_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/image_wrap.cpp,v retrieving revision 1.39.2.10 retrieving revision 1.39.2.11 diff -C2 -d -r1.39.2.10 -r1.39.2.11 *** image_wrap.cpp 9 May 2002 20:22:37 -0000 1.39.2.10 --- image_wrap.cpp 10 May 2002 20:12:30 -0000 1.39.2.11 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020508-1438 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of *************** *** 551,561 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 551,556 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 780,790 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 775,780 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 1779,1789 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 1769,1774 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 1835,1845 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 1820,1825 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 2135,2145 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 2115,2120 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 2191,2201 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 2166,2171 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 2491,2501 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 2461,2466 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 2547,2557 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 2512,2517 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 2847,2857 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 2807,2812 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 2934,2944 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 2889,2894 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 3276,3286 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 3226,3231 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 3332,3342 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 3277,3282 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 3632,3642 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 3572,3577 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 3718,3728 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 3653,3658 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 4018,4028 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 3948,3953 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 4074,4084 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 3999,4004 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 4382,4392 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<FXuchar *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 4302,4307 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 4426,4436 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 4341,4346 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 4482,4492 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 4392,4397 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 4790,4800 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<FXuchar *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 4695,4700 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 4834,4844 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 4734,4739 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 4951,4961 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 4846,4851 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 5260,5270 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<FXuchar *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 5150,5155 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; Index: icons_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/icons_wrap.cpp,v retrieving revision 1.37.2.10 retrieving revision 1.37.2.11 diff -C2 -d -r1.37.2.10 -r1.37.2.11 *** icons_wrap.cpp 9 May 2002 20:22:37 -0000 1.37.2.10 --- icons_wrap.cpp 10 May 2002 20:12:30 -0000 1.37.2.11 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020508-1438 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of *************** *** 997,1007 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 997,1002 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 1057,1067 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 1052,1057 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 1368,1378 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<FXuchar *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 1358,1363 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 1413,1423 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 1398,1403 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 1473,1483 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 1453,1458 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 1777,1787 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 1752,1757 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 1837,1847 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 1807,1812 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 2148,2158 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<FXuchar *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 2113,2118 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 2193,2203 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 2153,2158 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 2284,2294 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 2239,2244 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 2588,2598 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 2538,2543 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 2648,2658 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 2593,2598 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 2959,2969 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<FXuchar *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 2899,2904 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 3004,3014 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 2939,2944 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 3094,3104 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 3024,3029 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 3405,3415 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<FXuchar *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 3330,3335 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 3450,3460 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 3370,3375 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 3510,3520 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 3425,3430 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 3814,3824 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 3724,3729 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 3874,3884 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 3779,3784 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 4178,4188 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 4078,4083 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 4269,4279 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 4164,4169 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 4942,4952 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<FXuchar *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 4832,4837 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; Index: core_wrap.cpp =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/core_wrap.cpp,v retrieving revision 1.62.2.11 retrieving revision 1.62.2.12 diff -C2 -d -r1.62.2.11 -r1.62.2.12 *** core_wrap.cpp 9 May 2002 20:22:28 -0000 1.62.2.11 --- core_wrap.cpp 10 May 2002 20:12:31 -0000 1.62.2.12 *************** *** 1,5 **** /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020508-1438 * * This file is not intended to be easily readable and contains a number of --- 1,5 ---- /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). ! * Version 1.3.12u-20020510-1423 * * This file is not intended to be easily readable and contains a number of *************** *** 8632,8642 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 8632,8637 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 8674,8684 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 8669,8674 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 8867,8877 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 8857,8862 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 8913,8923 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<void *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 8898,8903 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<void *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; *************** *** 9090,9100 **** { if (argv[1] != Qnil) { ! if (TYPE(argv[1]) == T_STRING) { ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); ! }else { ! FXMemoryBuffer *memoryBuffer = ! reinterpret_cast<FXMemoryBuffer*>(FXRbConvertPtr(argv[1], FXRbTypeQuery("FXMemoryBuffer *"))); ! arg2 = reinterpret_cast<FXuchar *>(memoryBuffer->getData()); ! } }else { arg2 = NULL; --- 9070,9075 ---- { if (argv[1] != Qnil) { ! Check_Type(argv[1], T_STRING); ! arg2 = reinterpret_cast<FXuchar *>(RSTRING(argv[1])->ptr); }else { arg2 = NULL; |
From: Lyle J. <ly...@us...> - 2002-05-10 19:56:55
|
Update of /cvsroot/fxruby/FXRuby In directory usw-pr-cvs1:/tmp/cvs-serv31456 Modified Files: Tag: release10 Makefile.in setversions.rb Added Files: Tag: release10 FXRuby.spec.in Log Message: --- NEW FILE: FXRuby.spec.in --- Summary: FXRuby Name: FXRuby Version: @@FXRUBY_VERSION@@ Release: 1 Copyright: LGPL Group: System Environment/Libraries Source: @@FXRUBY_SRC_URL@@ URL: @@FXRUBY_HOME_URL@@ Packager: Lyle Johnson (ly...@us...) BuildRoot: %{_tmppath}/%{name}-buildroot %description FXRuby is a Ruby extension module that provides an interface to the FOX Graphical User Interface toolkit. %prep %setup -q %build ruby install.rb config --prefix=$RPM_BUILD_ROOT/usr ruby install.rb setup %install ruby install.rb install %clean ruby install.rb clean %files %defattr(-,root,root) /usr/lib/ruby/site_ruby/1.6/fox /usr/lib/ruby/site_ruby/1.6/i686-linux/fox.so %doc ChangeLog ANNOUNCE README LICENSE index.html doc examples %changelog * Thu May 09 2002 Lyle Johnson <ly...@us...> - Fixed %files section entries for the examples - Removed requirements for ruby 1.6 * Thu May 09 2002 Lyle Johnson <ly...@us...> - Updated --prefix value (in %build section) and file installation paths (in %files section) for consistency with Red Hat 7.2's Ruby RPMs. - Added the examples to the files list * Thu May 09 2002 Lyle Johnson <ly...@us...> - Removed the mkdir steps in the %install section. Those don't appear to be necessary after all! - Added the Packager tag at the top - Filled in the %description section * Thu May 09 2002 Lyle Johnson <ly...@us...> - Changed the Name field from 'fxruby' to 'FXRuby' - Added the --prefix=$RPM_BUILD_ROOT/usr/local option to the config part of the %build step - Added the mkdir steps before running install (in %install) - Fixed the %files entries for doc and doc/images * Thu May 09 2002 Lyle Johnson <ly...@us...> - initial package Index: Makefile.in =================================================================== RCS file: /cvsroot/fxruby/FXRuby/Attic/Makefile.in,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** Makefile.in 10 May 2002 05:04:01 -0000 1.1.2.1 --- Makefile.in 10 May 2002 19:56:52 -0000 1.1.2.2 *************** *** 9,12 **** --- 9,14 ---- LICENSE \ README \ + Makefile \ + FXRuby.spec \ install.rb \ index.html \ *************** *** 42,46 **** ruby TS_All.rb ! install: ruby install.rb install --- 44,48 ---- ruby TS_All.rb ! install: all ruby install.rb install *************** *** 61,62 **** --- 63,74 ---- cp -p $$file $(distdir)/`dirname $$file`; \ done + + changelog: + @cvs2cl.pl -F release10 + + website: + tar cvzf website.tar.gz index.html doc/*.html doc/images/*.png + scp website.tar.gz ly...@fx...:/home/groups/f/fx/fxruby/htdocs + -rm -f website.tar.gz + + .PHONY: changelog clean website Index: setversions.rb =================================================================== RCS file: /cvsroot/fxruby/FXRuby/setversions.rb,v retrieving revision 1.15.2.2 retrieving revision 1.15.2.3 diff -C2 -d -r1.15.2.2 -r1.15.2.3 *** setversions.rb 10 May 2002 05:04:01 -0000 1.15.2.2 --- setversions.rb 10 May 2002 19:56:52 -0000 1.15.2.3 *************** *** 32,35 **** --- 32,36 ---- setversions("ANNOUNCE") + setversions("FXRuby.spec") setversions("Makefile") setversions("ext/fox/extconf.rb") |
From: Lyle J. <ly...@us...> - 2002-05-10 19:47:58
|
Update of /cvsroot/fxruby/FXRuby In directory usw-pr-cvs1:/tmp/cvs-serv28421 Modified Files: Tag: release10 Makefile Removed Files: Tag: release10 update_website.sh Log Message: Moved code from the update_website.sh script into the Makefile as target 'website'. Index: Makefile =================================================================== RCS file: /cvsroot/fxruby/FXRuby/Attic/Makefile,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** Makefile 10 May 2002 19:43:07 -0000 1.1.2.3 --- Makefile 10 May 2002 19:47:55 -0000 1.1.2.4 *************** *** 44,48 **** ruby TS_All.rb ! install: ruby install.rb install --- 44,48 ---- ruby TS_All.rb ! install: all ruby install.rb install *************** *** 67,69 **** @cvs2cl.pl -F release10 ! .PHONY: changelog --- 67,74 ---- @cvs2cl.pl -F release10 ! website: ! tar cvzf website.tar.gz index.html doc/*.html doc/images/*.png ! scp website.tar.gz ly...@fx...:/home/groups/f/fx/fxruby/htdocs ! -rm -f website.tar.gz ! ! .PHONY: changelog clean website --- update_website.sh DELETED --- |
From: Lyle J. <ly...@us...> - 2002-05-10 19:43:11
|
Update of /cvsroot/fxruby/FXRuby In directory usw-pr-cvs1:/tmp/cvs-serv27125 Modified Files: Tag: release10 ChangeLog Makefile Log Message: Index: ChangeLog =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ChangeLog,v retrieving revision 1.24.2.2 retrieving revision 1.24.2.3 diff -C2 -d -r1.24.2.2 -r1.24.2.3 *** ChangeLog 30 Apr 2002 19:42:23 -0000 1.24.2.2 --- ChangeLog 10 May 2002 19:43:07 -0000 1.24.2.3 *************** *** 1,2 **** --- 1,308 ---- + 2002-05-10 12:22 lyle + + * doc/implementation.xml: file implementation.xml was initially + added on branch release10. + + 2002-05-10 12:22 lyle + + * doc/implementation.html: file implementation.html was initially + added on branch release10. + + 2002-05-10 12:22 lyle + + * doc/: book.html, book.xml, changes.html, changes.xml, + implementation.html, implementation.xml, library.html, todo.html, + tutorial1.html: Added a new documentation section + + 2002-05-10 09:58 lyle + + * Makefile: Added the Makefile and the FXRuby.spec file to the list + of files packaged into the source tarball. + + 2002-05-10 00:04 lyle + + * ext/fox/extconf.rb.in: file extconf.rb.in was initially added on + branch release10. + + 2002-05-10 00:04 lyle + + * ANNOUNCE.in, ANNOUNCE.tmpl, Makefile.in, setversions.rb, + ext/fox/extconf.rb.in, ext/fox/extconf.rb.tmpl: [no log message] + + 2002-05-10 00:04 lyle + + * ANNOUNCE.in: file ANNOUNCE.in was initially added on branch + release10. + + 2002-05-10 00:04 lyle + + * Makefile.in: file Makefile.in was initially added on branch + release10. + + 2002-05-10 00:00 lyle + + * update_website.sh: [no log message] + + 2002-05-09 23:50 lyle + + * FXRuby.spec: [no log message] + + 2002-05-09 22:44 lyle + + * Makefile, make-drop.sh: [no log message] + + 2002-05-09 22:44 lyle + + * Makefile: file Makefile was initially added on branch release10. + + 2002-05-09 19:37 lyle + + * FXRuby.spec: [no log message] + + 2002-05-09 18:25 lyle + + * FXRuby.spec: [no log message] + + 2002-05-09 17:25 lyle + + * FXRuby.spec: [no log message] + + 2002-05-09 16:39 lyle + + * drop-win32.sh, make-drop.sh: [no log message] + + 2002-05-09 16:35 lyle + + * FXRuby.spec: Initial version of an RPM spec file. + + 2002-05-09 16:35 lyle + + * FXRuby.spec: file FXRuby.spec was initially added on branch + release10. + + 2002-05-09 16:28 lyle + + * doc/images/tutorial1.png: file tutorial1.png was initially added + on branch release10. + + 2002-05-09 16:28 lyle + + * doc/: tutorial1.png, tutorial1.xml, images/tutorial1.png: Moved + tutorial1.png from doc/ to doc/images. + + 2002-05-09 15:22 lyle + + * ext/fox/core_wrap.cpp, swig-interfaces/typemaps.i, + ext/fox/icons_wrap.cpp, ext/fox/image_wrap.cpp: Modified the input + typemaps for "const void *pix" and "const FXuchar* PIXELS" so that + the constructors for icons and images can accept either strings (as + before) or MemoryBuffer instances (see SF Bug #550996). + + 2002-05-08 17:37 lyle + + * ext/fox/: FXRuby.cpp, include/FXRuby.h: Further attempts to get + GC correct. + + 2002-05-08 16:43 lyle + + * ext/fox/core_wrap.cpp, lib/fox/overloads.rb, + swig-interfaces/FXRegion.i, tests/TC_FXHMat.rb, tests/TC_FXHVec.rb, + tests/TC_FXRegion.rb, tests/stress1.rb: Updates to test cases + TC_FXHVec.rb and TC_FXHMat.rb to test the new clone instance + methods for these classes. Added support for overloaded + FXRegion#contains? and a new test case for this class. + + 2002-05-08 16:29 lyle + + * tests/TC_FXRegion.rb, ext/fox/core_wrap.cpp, + ext/fox/dialogs_wrap.cpp, ext/fox/icons_wrap.cpp, + ext/fox/image_wrap.cpp, ext/fox/layout_wrap.cpp, + ext/fox/mdi_wrap.cpp, ext/fox/opengl_wrap.cpp, + ext/fox/scintilla_wrap.cpp, ext/fox/ui_wrap.cpp: [no log message] + + 2002-05-08 16:29 lyle + + * tests/TC_FXRegion.rb: file TC_FXRegion.rb was initially added on + branch release10. + + 2002-05-08 16:09 lyle + + * swig-interfaces/: FXHMat.i, FXHVec.i, FXRegion.i: Latest SWIG has + support for copy constructors, so the copy constructors for these + classes (FXHMat, FXHVec and FXRegion) are now exposed in FXRuby as + the instance methods FXHMat#clone, FXHVec#clone and FXRegion#clone. + + 2002-05-08 14:53 lyle + + * swig-interfaces/FXScintilla.i: Incorporated Gilles' stuff for + Scintilla TextRange struct. + + 2002-05-08 11:50 lyle + + * ext/fox/: core_wrap.cpp, dialogs_wrap.cpp, icons_wrap.cpp, + image_wrap.cpp, layout_wrap.cpp, mdi_wrap.cpp, opengl_wrap.cpp, + scintilla_wrap.cpp, ui_wrap.cpp: [no log message] + + 2002-05-08 11:49 lyle + + * swig-interfaces/image.i: Make sure that FXMemoryBuffer.i gets + wrapped along with image.i. + + 2002-05-08 11:48 lyle + + * swig-interfaces/Makefile: Marked "clean" as a .PHONY target. + + 2002-05-08 11:45 lyle + + * swig-interfaces/FXMemoryBuffer.i: file FXMemoryBuffer.i was + initially added on branch release10. + + 2002-05-08 11:45 lyle + + * ext/fox/include/FXMemoryBuffer.h: file FXMemoryBuffer.h was + initially added on branch release10. + + 2002-05-08 11:45 lyle + + * examples/image.rb, ext/fox/include/FXMemoryBuffer.h, + ext/fox/include/FXRuby.h, swig-interfaces/FXImage.i, + swig-interfaces/FXMemoryBuffer.i: Modified the interface to + FXImage#data so that it returns an FXMemoryBuffer instance instead + of a string (See SF Bug #550996). The primary difference is that + FXMemoryBuffer wraps the actual data pointer stored by the FXImage + instead of making a copy; this way you should be able to modify the + buffer and re-render the image as you can in C++. + + 2002-05-08 11:35 lyle + + * lib/fox/aliases.rb: Added aliases: + + FXDC#tile= (for FXDC#setTile) + FXDC#stipple= (for FXDC#setStipple) + FXDC#clipRegion= (for FXDC#setClipRegion) + FXDC#clipRectangle= (for FXDC#setClipRectangle) + + 2002-05-08 11:33 lyle + + * ext/fox/FXRuby.cpp: Modified order of requires so that aliases.rb + is loaded after overloads.rb. + + 2002-05-08 11:32 lyle + + * examples/image.rb: Minor updates to the image.rb example to + replace calls with shorter aliases, e.g. replacing + @canvas.getWidth() and @canvas.getHeight() with @canvas.width and + @canvas.height. + + 2002-05-08 11:24 lyle + + * lib/fox/aliases.rb: Corrected a typo; the alias for + FXColorWell#getRGBA was supposed to be "rgba" but was actually + "rbga". This has been fixed! + + 2002-05-08 10:25 lyle + + * ext/fox/include/FXRbGIFCursor.h, swig-interfaces/FXCursor.i, + swig-interfaces/FXGIFCursor.i: Modified the constructors for + FXCursor and FXGIFCursor so that the hot spot coordinates (hx and + hy) no longer have default values of -1. Although FOX allows this, + it's not correct for Windows where you *must* specify a reasonable + value for those arguments; so I'm removing the temptation for + FXRuby ;) + + 2002-05-07 21:08 lyle + + * ext/fox/markfuncs.cpp: Revert to previous version of + markfuncs.cpp. + + 2002-05-06 15:16 lyle + + * ext/fox/markfuncs.cpp: Commented out what are (I think) some + unnecessary calls to FXRbGcMark() for things like tree items and + the like (see SourceForge Bug #534365). But I'm not sure this + fixes Gilles' problem with stack overflow (if that is indeed the + problem). + + 2002-05-06 14:16 lyle + + * ext/fox/core_wrap.cpp, ext/fox/dialogs_wrap.cpp, + ext/fox/icons_wrap.cpp, ext/fox/image_wrap.cpp, + ext/fox/layout_wrap.cpp, ext/fox/mdi_wrap.cpp, + ext/fox/opengl_wrap.cpp, ext/fox/scintilla_wrap.cpp, + ext/fox/ui_wrap.cpp, swig-interfaces/FXApp.i, + swig-interfaces/FXColorSelector.i, swig-interfaces/FXComboBox.i, + swig-interfaces/FXDC.i, swig-interfaces/FXDebugTarget.i, + swig-interfaces/FXDial.i, swig-interfaces/FXDict.i, + swig-interfaces/FXFileDialog.i, swig-interfaces/FXFileDict.i, + swig-interfaces/FXFileSelector.i, swig-interfaces/FXFont.i, + swig-interfaces/FXFontDialog.i, swig-interfaces/FXFontSelector.i, + swig-interfaces/FXGLObject.i, swig-interfaces/FXGLShape.i, + swig-interfaces/FXGLViewer.i, swig-interfaces/FXHMat.i, + swig-interfaces/FXHVec.i, swig-interfaces/FXHeader.i, + swig-interfaces/FXIconList.i, swig-interfaces/FXId.i, + swig-interfaces/FXImage.i, swig-interfaces/FXInputDialog.i, + swig-interfaces/FXList.i, swig-interfaces/FXListBox.i, + swig-interfaces/FXPrintDialog.i, swig-interfaces/FXQuat.i, + swig-interfaces/FXRange.i, swig-interfaces/FXRegion.i, + swig-interfaces/FXScintilla.i, swig-interfaces/FXScrollArea.i, + swig-interfaces/FXSlider.i, swig-interfaces/FXSpinner.i, + swig-interfaces/FXStatusline.i, swig-interfaces/FXStream.i, + swig-interfaces/FXTable.i, swig-interfaces/FXText.i, + swig-interfaces/FXTreeList.i, swig-interfaces/FXTreeListBox.i, + swig-interfaces/FXVec.i, swig-interfaces/FXWindow.i: Replaced + %addmethods directives with %extend in a number of SWIG interface + files. Fixed the default argument values for FXIconDict and + FXRbIconDict constructors (in FXFileDict.i) from + "FXIconDict::defaultIconPath" to just "defaultIconPath"; otherwise + SWIG expands this incorrectly. + + 2002-05-06 11:22 lyle + + * FXRuby.iss: Updated Inno Setup script for the Windows installer. + + 2002-05-06 11:09 lyle + + * tests/TC_FXFileStream.rb: [no log message] + + 2002-05-06 10:58 lyle + + * ext/fox/: extconf.rb, extconf.rb.tmpl: Reversed order of + have_library() calls for libpng and zlib so that libs are picked up + properly (has this changed for Ruby 1.7?) + + 2002-05-01 09:18 lyle + + * swig-interfaces/FXApp.i: Corrected the %rename directive for + FXRbApp::setThreadsEnabled(). + + 2002-04-30 17:12 lyle + + * tests/TC_FXAccelTable.rb: Added a test case for FXAccelTable. + + 2002-04-30 17:12 lyle + + * tests/TC_FXAccelTable.rb: file TC_FXAccelTable.rb was initially + added on branch release10. + + 2002-04-30 14:45 anoncvs_tsshp + + * examples/: datatarget.rb, glviewer.rb, textedit/textedit.rb: + Replaced calls to FXApp#disableThreads with calls to + FXApp#threadsEnabled = false in these example programs. + + 2002-04-30 14:42 lyle + + * doc/custom.xsl: file custom.xsl was initially added on branch + release10. + + 2002-04-30 14:42 lyle + + * ChangeLog, doc/Makefile, doc/book.html, doc/build.html, + doc/changes.html, doc/changes.xml, doc/custom.xsl, + doc/differences.html, doc/differences.xml, doc/events.html, + doc/examples.html, doc/goals.html, doc/library.html, + doc/opengl.html, doc/scintilla.html, doc/todo.html, + doc/tutorial1.html: Updated change history. + 2002-04-30 14:05 lyle Index: Makefile =================================================================== RCS file: /cvsroot/fxruby/FXRuby/Attic/Makefile,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** Makefile 10 May 2002 14:58:09 -0000 1.1.2.2 --- Makefile 10 May 2002 19:43:07 -0000 1.1.2.3 *************** *** 63,64 **** --- 63,69 ---- cp -p $$file $(distdir)/`dirname $$file`; \ done + + changelog: + @cvs2cl.pl -F release10 + + .PHONY: changelog |
From: Lyle J. <ly...@us...> - 2002-05-10 17:22:06
|
Update of /cvsroot/fxruby/FXRuby/doc In directory usw-pr-cvs1:/tmp/cvs-serv16449 Modified Files: Tag: release10 book.html book.xml changes.html changes.xml library.html todo.html tutorial1.html Added Files: Tag: release10 implementation.html implementation.xml Log Message: Added a new documentation section --- NEW FILE: implementation.html --- <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Chapter 9. Implementation</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><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="library.html" title="Chapter 8. The FXRuby Standard Library"><link rel="next" href="todo.html" title="Chapter 10. To-do list"></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 9. Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="library.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="todo.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="implementation"></a>Chapter 9. Implementation</h2></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e1736"></a>Code Generation</h2></div></div><p>The development and maintenance of FXRuby would be almost impossible without the help of Dave Beazley's excellent <a href="http://www.swig.org" target="_top">SWIG</a>. The complete set of SWIG interface files used to generate FXRuby is included in the standard FXRuby source code distribution, and if you'd like you can even regenerate the FXRuby sources using SWIG. Because FXRuby relies on functionality in the latest development version of SWIG, you will need to check out that version from the SWIG CVS repository. For instructions on how to do so, please see <a href="http://www.swig.org/cvs.html" target="_top"> this page</a>.</p><p>To regenerate the FXRuby sources from the SWIG interface files, change directories to the <tt>swig-interfaces </tt> subdirectory of the FXRuby source tree and type <b>make </b>. Any time that you make a change to the SWIG interface files, you'll need to repeat this step to update the C++ sources.</p></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e1755"></a>Object Life Cycles and Garbage Collection</h2></div></div><p>One of the more difficult issues to deal with was understanding the "life cycle" of FOX objects (that is, the actual C++ objects) and their relationship to the associated Ruby instances. Understanding this relationship is critical when dealing with Ruby's garbage collector, to ensure that objects are disposed of at the right time.</p><p>For our purposes, we can divide the set of all objects in an FXRuby program into two groups, those objects that Ruby "owns" and those that it doesn't. The first group (the "owned" objects) includes those that you create explicitly from Ruby code. This is usually done by calling a class' <tt>new</tt> method, e.g.</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">myIcon = FXPNGIcon.new(myApp, File.open("icon.png", "rb").read) myButton = FXButton.new(parentWin, "Hello, World!", myIcon)</pre></td></tr></table><p>It's important to keep in mind that when you create an object like this you're not only creating the Ruby instance part (i.e. whatever overhead is usually associated with a Ruby instance) but a C++ FOX object as well. Because we created these objects, we would reasonably expect them to be destroyed when they are garbage-collected so that our programs don't leak memory.</p><p>The other group of objects (those not owned by Ruby) are those returned from most class instance methods; they are references to already- existing objects. For example, <tt>FXStatusBar#statusline </tt> returns a reference to the status bar's enclosed status line instance.</p></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e1774"></a>Virtual Functions</h2></div></div><p>One of my design requirements for FXRuby was to ensure that any virtual function calls made on a FOX object (from the C++ library layer) are routed to the proper Ruby instance method, even if that method has been overridden in a derived class.</p><p>For example, many of the FXRuby example programs are structured with a main window class that subclasses <tt>FXMainWindow</tt> and then overrides its <tt>create</tt> instance method. This <tt> create</tt> method isn't called directly from Ruby code, however; it's called as a side effect of calling <tt>FXApp#create</tt>. Inside the C++ FOX library, the <tt>FXApp::create()</tt> member function recursively calls <tt>create()</tt> on all of the application's windows and eventually calls the virtual <tt>FXMainWindow::create()</tt> member function as well. To ensure that our main window's overridden <tt>create </tt> method is invoked instead of the base class implementation, we obviously need some special machinery in place.</p><p>For every C++ class that declares virtual member functions, we derive a new C++ class that overrides all of those virtual functions with special stubs that know how to make method calls on Ruby instances. The naming convention for these classes is that the "FX" prefix is replaced with "FXRb"; for example, our <tt>FXRbButton</tt> C++ class is derived from FOX's <tt>FXButton</tt>. Although the implementation of these "stubs" varies from function to function, the basic requirements are always the same: </p><div class="orderedlist"><ol type="1"><li><p>Look up the Ruby object associated with this C++ object.</p></li><li><p>Convert each of the function's arguments to their Ruby representation. For example, arguments of type FXint are converted to Ruby <tt>Fixnum</tt>s.</p></li><li><p>Call the Ruby object's method, using the <tt> rb_funcall()</tt> function from Ruby's C API, and capture its result (which is itself a Ruby object).</p></li><li><p>Convert the method call's result back to the virtual function's C++ return type, and then return that result from the C++ function. For example, if the C++ function has a FXbool return type, we would expect the corresponding Ruby method to return either <tt>Qtrue</tt> or <tt>Qfalse</tt>.</p></li></ol></div><p> </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="library.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="book.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="todo.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 8. The FXRuby Standard Library </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 10. To-do list</td></tr></table></div></body></html> --- NEW FILE: implementation.xml --- <chapter id="implementation"> <title>Implementation</title> <simplesect> <title>Code Generation</title> <para>The development and maintenance of FXRuby would be almost impossible without the help of Dave Beazley's excellent <ulink url="http://www.swig.org">SWIG</ulink>. The complete set of SWIG interface files used to generate FXRuby is included in the standard FXRuby source code distribution, and if you'd like you can even regenerate the FXRuby sources using SWIG. Because FXRuby relies on functionality in the latest development version of SWIG, you will need to check out that version from the SWIG CVS repository. For instructions on how to do so, please see <ulink url="http://www.swig.org/cvs.html"> this page</ulink>.</para> <para>To regenerate the FXRuby sources from the SWIG interface files, change directories to the <filename class="directory">swig-interfaces </filename> subdirectory of the FXRuby source tree and type <command>make </command>. Any time that you make a change to the SWIG interface files, you'll need to repeat this step to update the C++ sources.</para> </simplesect> <simplesect> <title>Object Life Cycles and Garbage Collection</title> <para>One of the more difficult issues to deal with was understanding the "life cycle" of FOX objects (that is, the actual C++ objects) and their relationship to the associated Ruby instances. Understanding this relationship is critical when dealing with Ruby's garbage collector, to ensure that objects are disposed of at the right time.</para> <para>For our purposes, we can divide the set of all objects in an FXRuby program into two groups, those objects that Ruby "owns" and those that it doesn't. The first group (the "owned" objects) includes those that you create explicitly from Ruby code. This is usually done by calling a class' <methodname>new</methodname> method, e.g.</para> <programlisting format="linespecific">myIcon = FXPNGIcon.new(myApp, File.open("icon.png", "rb").read) myButton = FXButton.new(parentWin, "Hello, World!", myIcon)</programlisting> <para>It's important to keep in mind that when you create an object like this you're not only creating the Ruby instance part (i.e. whatever overhead is usually associated with a Ruby instance) but a C++ FOX object as well. Because we created these objects, we would reasonably expect them to be destroyed when they are garbage-collected so that our programs don't leak memory.</para> <para>The other group of objects (those not owned by Ruby) are those returned from most class instance methods; they are references to already- existing objects. For example, <methodname>FXStatusBar#statusline </methodname> returns a reference to the status bar's enclosed status line instance.</para> </simplesect> <simplesect> <title>Virtual Functions</title> <para>One of my design requirements for FXRuby was to ensure that any virtual function calls made on a FOX object (from the C++ library layer) are routed to the proper Ruby instance method, even if that method has been overridden in a derived class.</para> <para>For example, many of the FXRuby example programs are structured with a main window class that subclasses <classname>FXMainWindow</classname> and then overrides its <methodname>create</methodname> instance method. This <methodname> create</methodname> method isn't called directly from Ruby code, however; it's called as a side effect of calling <methodname>FXApp#create</methodname>. Inside the C++ FOX library, the <methodname>FXApp::create()</methodname> member function recursively calls <methodname>create()</methodname> on all of the application's windows and eventually calls the virtual <methodname>FXMainWindow::create()</methodname> member function as well. To ensure that our main window's overridden <methodname>create </methodname> method is invoked instead of the base class implementation, we obviously need some special machinery in place.</para> <para>For every C++ class that declares virtual member functions, we derive a new C++ class that overrides all of those virtual functions with special stubs that know how to make method calls on Ruby instances. The naming convention for these classes is that the "FX" prefix is replaced with "FXRb"; for example, our <classname>FXRbButton</classname> C++ class is derived from FOX's <classname>FXButton</classname>. Although the implementation of these "stubs" varies from function to function, the basic requirements are always the same: <orderedlist> <listitem><para>Look up the Ruby object associated with this C++ object.</para></listitem> <listitem><para>Convert each of the function's arguments to their Ruby representation. For example, arguments of type <type>FXint</type> are converted to Ruby <classname>Fixnum</classname>s.</para></listitem> <listitem><para>Call the Ruby object's method, using the <function> rb_funcall()</function> function from Ruby's C API, and capture its result (which is itself a Ruby object).</para></listitem> <listitem><para>Convert the method call's result back to the virtual function's C++ return type, and then return that result from the C++ function. For example, if the C++ function has a <type> FXbool</type> return type, we would expect the corresponding Ruby method to return either <constant>Qtrue</constant> or <constant>Qfalse</constant>.</para></listitem> </orderedlist> </para> </simplesect> </chapter> Index: book.html =================================================================== RCS file: /cvsroot/fxruby/FXRuby/doc/book.html,v retrieving revision 1.35.2.1 retrieving revision 1.35.2.2 diff -C2 -d -r1.35.2.1 -r1.35.2.2 *** book.html 30 Apr 2002 19:42:23 -0000 1.35.2.1 --- book.html 10 May 2002 17:22:02 -0000 1.35.2.2 *************** *** 1,3 **** <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> ! <title>Developing Graphical User Interfaces with FXRuby</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="next" href="goals.html" title="History and Goals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Developing Graphical User Interfaces with FXRuby</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="goals.html">Next</a></td></tr></table><hr></div><div class="book"><div class="titlepage"><div><h1 class="title"><a name="book"></a>Developing Graphical User Interfaces with FXRuby</h1></div><div><div class="author"><h3 class="author">Lyle Johnson</h3></div></div><div><p class="copyright">Copyright © 2001 J. Lyle Johnson</p></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><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="examples.html">Examples</a></dt><dt>3. <a href="tutorial1.html">Hello, World!</a></dt><dt>4. <a href="opengl.html">Using OpenGL with FXRuby</a></dt><dt>5. <a href="scintilla.html">Using Scintilla with FXRuby</a></dt><dt>6. <a href="differences.html">Differences between FOX and FXRuby</a></dt><dt>7. <a href="events.html">FXRuby's Message-Target System</a></dt><dt>8. <a href="library.html">The FXRuby Standard Library</a></dt><dt>9. <a href="todo.html">To-do list</a></dt><dt>10. <a href="changes.html">Change History</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="goals.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> History and Goals</td></tr></table></div></body></html> \ No newline at end of file --- 1,3 ---- <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> ! <title>Developing Graphical User Interfaces with FXRuby</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="next" href="goals.html" title="History and Goals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Developing Graphical User Interfaces with FXRuby</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="goals.html">Next</a></td></tr></table><hr></div><div class="book"><div class="titlepage"><div><h1 class="title"><a name="book"></a>Developing Graphical User Interfaces with FXRuby</h1></div><div><div class="author"><h3 class="author">Lyle Johnson</h3></div></div><div><p class="copyright">Copyright © 2001 J. Lyle Johnson</p></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><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="examples.html">Examples</a></dt><dt>3. <a href="tutorial1.html">Hello, World!</a></dt><dt>4. <a href="opengl.html">Using OpenGL with FXRuby</a></dt><dt>5. <a href="scintilla.html">Using Scintilla with FXRuby</a></dt><dt>6. <a href="differences.html">Differences between FOX and FXRuby</a></dt><dt>7. <a href="events.html">FXRuby's Message-Target System</a></dt><dt>8. <a href="library.html">The FXRuby Standard Library</a></dt><dt>9. <a href="implementation.html">Implementation</a></dt><dt>10. <a href="todo.html">To-do list</a></dt><dt>11. <a href="changes.html">Change History</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="goals.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> History and Goals</td></tr></table></div></body></html> \ No newline at end of file Index: book.xml =================================================================== RCS file: /cvsroot/fxruby/FXRuby/doc/book.xml,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** book.xml 14 Mar 2002 17:03:39 -0000 1.7 --- book.xml 10 May 2002 17:22:03 -0000 1.7.2.1 *************** *** 10,13 **** --- 10,14 ---- <!ENTITY events.xml SYSTEM "events.xml"> <!ENTITY goals.xml SYSTEM "goals.xml"> + <!ENTITY implementation.xml SYSTEM "implementation.xml"> <!ENTITY library.xml SYSTEM "library.xml"> <!ENTITY opengl.xml SYSTEM "opengl.xml"> *************** *** 27,30 **** --- 28,32 ---- &events.xml; &library.xml; + &implementation.xml; &todo.xml; &changes.xml; Index: changes.html =================================================================== RCS file: /cvsroot/fxruby/FXRuby/doc/changes.html,v retrieving revision 1.42.2.1 retrieving revision 1.42.2.2 diff -C2 -d -r1.42.2.1 -r1.42.2.2 *** changes.html 30 Apr 2002 19:42:23 -0000 1.42.2.1 --- changes.html 10 May 2002 17:22:03 -0000 1.42.2.2 *************** *** 1,5 **** <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> ! <title>Chapter 10. Change History</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><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="todo.html" title="Chapter 9. To-do list"></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 10. Change History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="todo.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="changes"></a>Chapter 10. Change History</h2></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e1798"></a>Changes Since Version 1.0.3</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Corrected the code for <tt>FXTreeList#clearItems</tt> so that after the C++ objects (the tree items) are destroyed, any Ruby instances holding references to those C++ objects are notified of their demise. This one was inadvertently overlooked when other, similar, fixes were made in the previous release. Thanks to Gilles Filippini for catching this.</p></li><li style="list-style-type: disc"><p>The API for Ruby's <tt>rb_rescue2()</tt> function changed in Ruby 1.6.7, but I missed this since I had only compiled against the Ruby 1.6.6 and Ruby 1.7 header files. The API change led to a compile error for FXRuby.cpp; this has been fixed. Thanks to Bil Kleb for catching this one.</p></li><li style="list-style-type: disc"><p>The <tt>FXApp#enableThreads</tt> and <tt>FXApp#disableThreads</tt> instance methods have been replaced by a single instance method, --- 1,5 ---- <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> ! <title>Chapter 11. Change History</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><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="todo.html" title="Chapter 10. To-do list"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 11. Change History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="todo.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="changes"></a>Chapter 11. Change History</h2></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e1910"></a>Changes Since Version 1.0.3</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Corrected the code for <tt>FXTreeList#clearItems</tt> so that after the C++ objects (the tree items) are destroyed, any Ruby instances holding references to those C++ objects are notified of their demise. This one was inadvertently overlooked when other, similar, fixes were made in the previous release. Thanks to Gilles Filippini for catching this.</p></li><li style="list-style-type: disc"><p>The API for Ruby's <tt>rb_rescue2()</tt> function changed in Ruby 1.6.7, but I missed this since I had only compiled against the Ruby 1.6.6 and Ruby 1.7 header files. The API change led to a compile error for FXRuby.cpp; this has been fixed. Thanks to Bil Kleb for catching this one.</p></li><li style="list-style-type: disc"><p>The <tt>FXApp#enableThreads</tt> and <tt>FXApp#disableThreads</tt> instance methods have been replaced by a single instance method, *************** *** 8,12 **** Also added a new instance method, <tt>FXApp#threadsEnabled?</tt>, ! which returns the current value for this setting.</p></li><li style="list-style-type: disc"><p>The <tt>FXToolbar#dock</tt> instance method could crash if the default value of <tt>nil</tt> was used for the second argument (see SourceForge Bug #550417). This has been fixed.</p></li><li style="list-style-type: disc"><p>Calls to <tt>FXFileDialog.getOpenFilename</tt> could crash if the fourth argument's default value was used instead of explicitly specifying its value (see SourceForge Bug #550349). This has been fixed.</p></li><li style="list-style-type: disc"><p>Added input typemaps for <tt>FXVec</tt> and <tt>FXHVec</tt>, such that any method which expects one of these types as input will also accept a Ruby array of the same size. --- 8,12 ---- Also added a new instance method, <tt>FXApp#threadsEnabled?</tt>, ! which returns the current value for this setting.</p></li><li style="list-style-type: disc"><p>The <tt>FXToolbar#dock</tt> instance method could crash if the default value of <tt>nil</tt> was used for the second argument (see <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=550417&group_id=20243&atid=120243" target="_top">SourceForge Bug #550417</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>Calls to <tt>FXFileDialog.getOpenFilename</tt> could crash if the fourth argument's default value was used instead of explicitly specifying its value (see <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=550349&group_id=20243&atid=120243" target="_top">SourceForge Bug #550349</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>Added input typemaps for <tt>FXVec</tt> and <tt>FXHVec</tt>, such that any method which expects one of these types as input will also accept a Ruby array of the same size. *************** *** 14,16 **** now be called in either of these equivalent forms:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">glviewer.backgroundColor = FXHVec.new(0.5, 0.5, 0.5, 1.0)</pre></td></tr></table> or ! <table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">glviewer.backgroundColor = [0.5, 0.5, 0.5, 1.0]</pre></td></tr></table></li><li style="list-style-type: disc"><p>Updated the test case for <tt>FXMaterial</tt>, added a new test case for <tt>FXFileStream</tt>.</p></li><li style="list-style-type: disc"><p>Added aliases <tt>posVisible?</tt> (for <tt>FXTextField#isPosVisible</tt>), <tt>posSelected?</tt> (for <tt>FXTextField#isPosSelected</tt>), <tt>itemCurrent?</tt> (for <tt>FXComboBox#isItemCurrent</tt>), <tt>hasAccel?</tt> (for <tt>FXAccelTable#hasAccel</tt>), <tt>error=</tt> (for <tt>FXStream#setError</tt>), <tt>position=</tt> (for <tt>FXStream#setPosition</tt>) and <tt>position</tt> (for <tt>FXStream#getPosition</tt>).</p></li><li style="list-style-type: disc"><p>The <tt>FXStream</tt>, <tt>FXFileStream</tt> and <tt>FXMemoryStream</tt> classes were not implemented properly, in the sense that if you subclassed one of these classes and then attempted to override one of their virtual functions, that override might not get called (see SourceForge Bug #535955). This has been fixed.</p></li><li style="list-style-type: disc"><p>Did some more work on completing the <tt>FXDC</tt> interface, including adding a test case for the same.</p></li><li style="list-style-type: disc"><p>All GIF image files have now been replaced with PNG equivalents. For more information on why this is a good idea, see <a href="http://burnallgifs.org" target="_top">this site</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e1939"></a>Changes Since Version 0.99.189</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Upgraded to the latest version of Minero Aoki's <tt>install.rb</tt> script.</p></li><li style="list-style-type: disc"><p>Switched from using DocBook/SGML to DocBook/XML for the FXRuby documentation. This is mainly a maintenance issue; it's just much less complicated to "publish" documents using DocBook/XML as compared to DocBook/SGML. You should see few (if any) differences in the resulting HTML pages, but let me know if you notice anything squirrely.</p></li><li style="list-style-type: disc"><p>Improved support for customized sorting of list items for the <tt>FXComboBox</tt>, <tt>FXIconList</tt>, <tt>FXList</tt>, <tt>FXListBox</tt>, <tt>FXTreeList</tt> and <tt>FXTreeListBox</tt> classes. The model is different from that used in the C++ FOX library, where you set a global sorting function for each list instance. For FXRuby, you instead just override the list item's <tt><=></tt> method to compare one list item to another. Thanks to Martin Stannard for prompting me to resolve this problem.</p></li><li style="list-style-type: disc"><p>Added instructions about how to modify your <tt>/etc/ld.so.conf</tt> file (on Linux) to include the <tt>libFOX.so</tt> installation directory. Thanks to Giuseppe Cacopardo for providing this information.</p></li><li style="list-style-type: disc"><p>Updated the test cases (again) for use with Nathaniel Talbott's <a href="http://testunit.talbott.ws" target="_top">TestUnit</a>, which is apparently the successor to Lapidary.</p></li><li style="list-style-type: disc"><p>Added support for the <tt>FXCURCursor</tt>, <tt>FXRGBIcon</tt>, <tt>FXRGBImage</tt> classes.</p></li><li style="list-style-type: disc"><p>Fixed a longstanding bug related to the ownership (for garbage collection purposes) of <tt>FXGLGroup</tt> and <tt>FXGLShape</tt> instances. This is the bug that was causing the <tt>glviewer.rb</tt> example program to crash on exit.</p></li><li style="list-style-type: disc"><p>Fixed a different (but also longstanding) bug related to FXRuby's hanging on to "stale" Ruby object references after those Ruby objects had already been garbage-collected. This bug manifested itself in a number of ways, but the most common symptom would be for an object (like an <tt>FXEvent</tt> instance) to suddenly lose its mind and believe it was some other object. Oh, and your program would usually crash at that point. I think this problem is now fixed.</p></li><li style="list-style-type: disc"><p>Added some safeguards for "destructive" functions like <tt>FXList#clearItems</tt>, which can destroy the C++ objects backing-up Ruby objects in FXRuby, so that any outstanding Ruby references to those destroyed C++ objects are left in a safe state when accessed by Ruby's garbage collector.</p></li><li style="list-style-type: disc"><p>Performed a major overhaul on the <tt>shutter.rb</tt> example program, which still demonstrates the <tt>FXShutter</tt> widget but otherwise doesn't resemble its previous incarnation at all.</p></li><li style="list-style-type: disc"><p>Added a new example program (<tt>raabrowser.rb</tt>) that allows you to browse the Ruby Application Archive via its SOAP interface. Requires the <a href="http://www.jin.gr.jp/~nahi/Ruby/SOAP4R" target="_top">SOAP4R</a> extension.</p></li><li style="list-style-type: disc"><p>Added a new example program (<tt>babelfish.rb</tt>) that allows you to use the Babelfish translator web service via its SOAP interface. Requires the <a href="http://www.jin.gr.jp/~nahi/Ruby/SOAP4R" target="_top">SOAP4R</a> extension.</p></li><li style="list-style-type: disc"><p>Added a new page to the documentation to briefly describe each of the example programs (including screenshots).</p></li><li style="list-style-type: disc"><p>The CVS repository for FXRuby is now hosted at the SourceForge site. For those who would like access to the latest version of FXRuby (in-between official releases) this is now an option. For more details, see the instructions at the <a href="http://sourceforge.net/cvs/?group_id=20243" target="_top">SourceForge project CVS page</a>.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="http://www.fox-toolkit.org/ftp/fox-1.0.3.tar.gz" target="_top">fox-1.0.3</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2069"></a>Changes Since Version 0.99.188</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Fixed a big bug related to the <tt>FXApp#addSignal</tt> and <tt>FXApp#removeSignal</tt> functions, which should accept a string signal name as an argument. The list of recognized signal names was not constructed properly and as a result most any call to these methods with a string signal name would fail. This has been corrected, and the methods now throw exceptions like those thrown from <tt>Process::kill</tt> when the signal name is unrecognized or the argument type is wrong.</p></li><li style="list-style-type: disc"><p>The <tt>imageviewer.rb</tt> example program now supports loading TARGA, ICO and TIFF image files.</p></li><li style="list-style-type: disc"><p>The configuration process on Windows should now detect the presence of <tt>libtiff.lib</tt> properly.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="http://www.fox-toolkit.org/ftp/fox-0.99.189.tar.gz" target="_top">fox-0.99.189</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2103"></a>Changes Since Version 0.99.181</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Removed the <tt>-fno-strict-prototype</tt> and <tt>-fpermissive</tt> flags from the <tt>CFLAGS</tt> for Linux builds, since these two flags are no longer supported for more recent versions of gcc. Thanks to Thomas Lundqvist for reporting this.</p></li><li style="list-style-type: disc"><p>Some of the source files included in the previous release had DOS-style line endings and this caused gcc to choke while compiling them; this has been fixed. Thanks to Thomas Lundqvist for reporting this.</p></li><li style="list-style-type: disc"><p>Updated the FXRuby test cases (such as they are) to use Nathaniel Talbott's <a href="http://lapidary.sourceforge.net" target="_top">Lapidary</a> unit testing framework.</p></li><li style="list-style-type: disc"><p>Migrated yet more code from the C++ extension to pure Ruby versions. Most of the code for the <tt>FXPoint</tt>, <tt>FXRectangle</tt> and <tt>FXSize</tt> classes is now implemented in Ruby.</p></li><li style="list-style-type: disc"><p>Fixed a bug in the <tt>browser.rb</tt> example. I had meant for the methods and constants lists to be sorted but had failed to use the in-place <tt>sort!</tt> method. Thanks to Robert Gustavsson for reporting this.</p></li><li style="list-style-type: disc"><p>Completed a lot of the initial work for integrating the FXScintilla widget into FXRuby. This is not usable yet, but I'm working with Rich Kilmer and others to try to make this happen.</p></li><li style="list-style-type: disc"><p>Updated the build instructions to provide more information about building the Visual C++ version of FXRuby (i.e. for use with the Visual C++ build of Ruby) on Windows. Thanks to a final tip from Martin Stannard we now have a working build for this compiler.</p></li><li style="list-style-type: disc"><p>For fun, added a new example program that downloads today's Dilbert cartoon from the <a href="http://www.dilbertzone.com" target="_top">DilbertZone</a> web site and displays it in an <tt>FXImageViewer</tt> widget. Requires the <tt>html-parser</tt> module, listed in the <a href="http://www.ruby-lang.org/en/raa.html" target="_top">Ruby Application Archive</a>.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="http://www.fox-toolkit.org/ftp/fox-0.99.188.tar.gz" target="_top">fox-0.99.188</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2176"></a>Changes Since Version 0.99.180</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Added <tt>slices</tt>, <tt>stacks</tt> and <tt>loops</tt> accessors for the <tt>FXGLCone</tt> and <tt>FXGLCylinder</tt> classes, to provide finer control over the rendering fidelity for these shapes (this was already done for <tt>FXGLSphere</tt> in the previous release).</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.fox-toolkit.org/pub/fox-0.99.181.tar.gz" target="_top">fox-0.99.181</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2207"></a>Changes Since Version 0.99.174</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Moved the class definitions for <tt>FXGLPoint</tt>, <tt>FXGLLine</tt>, <tt>FXGLCube</tt>, <tt>FXGLCylinder</tt>, <tt>FXGLSphere</tt> and <tt>FXGLCone</tt> to a new library module <tt>fox/glshapes.rb</tt>. The interfaces are the same as the C++ versions of these classes, this is just a "pure Ruby" implementation of the classes instead of wrappers around the C++ classes. See <tt>examples/glviewer.rb</tt> for an example of their use.</p></li><li style="list-style-type: disc"><p>Fixed a bug related to object ownership for GL objects added to a <tt>FXGLGroup</tt>.</p></li><li style="list-style-type: disc"><p>Added support for overriding the virtual <tt>layout</tt> method in classes derived from <tt>FXWindow</tt>. This will allow developers to, for example, develop new kinds of layout managers.</p></li><li style="list-style-type: disc"><p>Replaced the previous WISE-based installer for the Windows version with an Inno Setup-based installer and reorganized things to better reflect the organization used in the standard Ruby installer.</p></li><li style="list-style-type: disc"><p>Updated the setup and build script to the latest version of Minero Aoki's scripts (version 3.0.2). The main change for FXRuby end-users is that the name of the build script is now <tt>install.rb</tt> instead of <tt>setup.rb</tt>.</p></li><li style="list-style-type: disc"><p>Added the <tt>colors.rb</tt> library file, for predefined color names in the <tt>FXColor</tt> namespace. The use of this module allows you to use symbolic names like <tt>FXColor::Red</tt> instead of an RGB constant like FXRGB(255, 0, 0). Many thanks to Jeff Heard for this suggestion and the contributed file.</p></li><li style="list-style-type: disc"><p>The <tt>FXRegion</tt> was accidentally being renamed to <tt>FX_Region</tt> (a little behind-the-scenes magic I'm doing in FXRuby) and as a result you couldn't use this class. Thanks to Steven Grady for catching this bug.</p></li><li style="list-style-type: disc"><p>The <tt>FXFileStream</tt> class now supports a Ruby-style <tt>open</tt> singleton method that provides transactional control for closing the file stream when it's done. See the <tt>image.rb</tt> and <tt>imageviewer.rb</tt> examples for how this works.</p></li><li style="list-style-type: disc"><p>After some discussions at RubyConf and follow-up discussions on the comp.lang.ruby newsgroup, the procedure for attaching events handlers to FXRuby widgets has been greatly simplified. Most of the example programs have been updated to reflect these changes, and a new documentation section has been added to describe how it works. For some of the background, please see <a href="http://www.rubygarden.org/ruby?FXRubyComments" target="_top">this page</a> on the RubyGarden Wiki.</p></li><li style="list-style-type: disc"><p>Added support for the <tt>each_row</tt> and <tt>each_column</tt> iterators for the <tt>FXTable</tt> class. These iterators yield an array of references to <tt>FXTableItem</tt> instances, one per row or column, respectively. Note that the <tt>each</tt> method is just an alias for <tt>each_row</tt>.</p></li><li style="list-style-type: disc"><p>Removed the interfaces for <tt>fxrandom</tt>, <tt>fxmalloc</tt>, <tt>fxcalloc</tt>, <tt>fxresize</tt>, <tt>fxmemdump</tt>, and <tt>fxfree</tt>. These utility functions are not relevant for FXRuby.</p></li><li style="list-style-type: disc"><p>Corrected interfaces for <tt>fxhsv_to_rgb</tt> and <tt>fxrgb_to_hsv</tt> so that they return three-element arrays of the converted color components.</p></li><li style="list-style-type: disc"><p>Corrected interfaces for <tt>FXWindow#acquireSelection</tt>, <tt>FXWindow#acquireClipboard</tt> and <tt>FXWindow#beginDrag</tt> to take an array of drag types.</p></li><li style="list-style-type: disc"><p>Corrected interfaces for <tt>fxsaveBMP</tt>, <tt>fxsaveGIF</tt>, <tt>fxsaveICO</tt>, <tt>fxsavePCX</tt>, <tt>fxsavePNG</tt>, <tt>fxsaveTIF</tt> and <tt>fxsaveXPM</tt> so that they expect a Ruby string (containing the image pixel data) as their second argument.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.fox-toolkit.org/pub/fox-0.99.180.tar.gz" target="_top">fox-0.99.180</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2400"></a>Changes Since Version 0.99.173</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Moved all of the method name aliases out of the C interface code and into a new library file (<tt>fox/aliases.rb</tt>). This file is loaded automatically so you don't need to change your code. Similarly, moved all of the iterator methods out of the C code and into a library file (<tt>fox/iterators.rb</tt>). The main purpose of these changes is to reduce the size of the C++ code (especially <tt>core_wrap.cpp</tt>) where possible. Obviously, compared to recompiling the C++ source code, it's also much more efficient to quickly patch the Ruby files and re-run when there are problems.</p></li><li style="list-style-type: disc"><p>A few errors made it into the <tt>undolist.rb</tt> library module and the <tt>textedit.rb</tt> example last time; I think these have been fixed.</p></li><li style="list-style-type: disc"><p>I meant to add support for the new <tt>FXPCXIcon</tt> and <tt>FXPCXImage</tt> classes with the last release, but somehow I overlooked those. They are now supported, along with the other new classes introduced by FOX version 0.99.174: <tt>FXTIFIcon</tt>, <tt>F XTIFImage</tt> and <tt>FXProgressDialog</tt>.</p></li><li style="list-style-type: disc"><p>Fixed a bug in the GC-related code for "marking" C++ objects. I had not accounted for the possibility that the pointer passed to my mark functions could be a <tt>NULL</tt> pointer, and as a result the code would seg fault during garbage collection, under some circumstances. Many thanks to Ralf Canis for catching this bug.</p></li><li style="list-style-type: disc"><p>Updated the source code and <tt>extconf.rb</tt> files so that FXRuby configures and builds correctly for the "mswin32" builds. Thanks very much to Lorien Dunn for prompting me to get this stuff up-to-date!</p></li><li style="list-style-type: disc"><p>Fixed things so that the <tt>FXApp#addInput</tt> and <tt>FXApp#removeInput</tt> instance methods work properly for generating input messages. The first argument to both of these methods should be an <tt>IO</tt> object of some kind (specifically, an object that implements a <tt>fileno</tt> method). For more information about how this works, see the "Timers, Chores, Signals and Input Messages" section of the FOX documentation. Also see the new <tt>inputs.rb</tt> program in the <tt>examples</tt> directory for an example of how this works. Thanks to Ralf Canis for reminding me that I left this broken!</p></li><li style="list-style-type: disc"><p>Completed the basic code changes required for <tt>FXObject#handle</tt> to properly convert its message data into something that the C++ objects recognize (see the first item in the FXRuby To-Do List for more information). A lot of message types and identifiers are now handled correctly, especially those that are common to all <tt>FXWindow</tt>s. Most of the more widget-specific messages are not handled yet, and this is going to take awhile to complete; it's just a tedious process.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.cfdrc.com/pub/FOX/fox-0.99.174.tar.gz" target="_top">fox-0.99.174</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2491"></a>Changes Since Version 0.99.172</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Changed the build and installation process to use Minero Aoki's <tt>setup.rb</tt> tools. Looking ahead I can see that FXRuby will probably consist of a core C++ extension module and a collection of Ruby library scripts, and so now was the right time to make that transition.</p><p>If you have previously installed FXRuby (and written programs with the same) there are a few changes that may affect you. First, <tt>setup.rb</tt> will install the shared library (<tt>fox.so</tt>) in your <tt>site_ruby</tt> directory instead of the "core" libraries directory, where it was previously installed. So you should be sure to remove the old version of <tt>fox.so</tt> before installing and using this one.</p><p>The other change to be aware of is that there is now a <tt>fox</tt> directory containing FXRuby library scripts, and the <tt>responder.rb</tt> module is the first entry for this directory. You can import this file into your Ruby scripts with the line:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">require 'fox/responder'</pre></td></tr></table><p>and it's no longer necessary to drag copies of that file around.</p></li><li style="list-style-type: disc"><p>Aliased the <tt>getText</tt> instance method to <tt>to_s</tt> for a number of classes. This change should make things a little more convenient when inspecting the contents of widgets whose primary purpose is text entry or display. Thanks to Barry Shultz for this suggestion.</p></li><li style="list-style-type: disc"><p>Added the <tt>FXWindow#removeChild</tt> method for removing child widgets from a container window. This method doesn't exist for the C++ <tt>FXWindow</tt> class because it isn't needed; in C++ programs you simply delete the C++ object and it automatically gets removed from its parent. Note that after you call <tt>FXWindow#removeChild</tt> any outstanding references to the recently deceased child widget are invalid and should be set to <tt>nil</tt> or otherwise disposed of. Thanks to Ted Meng for noticing this omission.</p></li><li style="list-style-type: disc"><p>Modified some of the OpenGL method calls in <tt>gltest.rb</tt> for compatibility with Ruby/OpenGL 0.32. You should now be able to use Ruby/OpenGL with FXRuby unmodified.</p></li><li style="list-style-type: disc"><p>Added <tt>each()</tt> instance methods for <tt>FXComboBox</tt>, <tt>FXGLGroup</tt>, <tt>FXHeader</tt>, <tt>FXIconList</tt>, <tt>FXList</tt>, <tt>FXListBox</tt>, <tt>FXTreeItem</tt>, <tt>FXTreeList</tt> and <tt>FXTreeListBox</tt> in support of iterating over their sub-items. Also mixed the <tt>Enumerable</tt> module into all of these classes.</p></li><li style="list-style-type: disc"><p>Corrected the implementations of <tt>getData()</tt> and <tt>setData()</tt> for a variety of classes. You should now be able to attach arbitrary (application-defined) data to any FOX object that supports these APIs.</p></li><li style="list-style-type: disc"><p>As a debugging tool, you can now optionally catch exceptions raised in message handlers. To turn on this feature, call the <tt>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></li><li style="list-style-type: disc"><p>Extended the interfaces for <tt>FXApp#addSignal</tt> and <tt>FXApp#removeSignal</tt> 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 <tt>Process.kill</tt> module method). For examples of how to use this, see the <tt>datatarget.rb</tt> or <tt>imageviewer.rb</tt> example programs.</p></li><li style="list-style-type: disc"><p>Corrected the implementations of <tt>fxparsefontdesc()</tt> and <tt>fxunparsefontdesc()</tt> module methods.</p></li><li style="list-style-type: disc"><p>Added a pure Ruby implementation of the standard <tt>FXCommand</tt> and <tt>FXUndoList</tt> classes from the standard FOX library.</p></li><li style="list-style-type: disc"><p>Added the <tt>splitter.rb</tt> example, to demonstrate the <tt>FXSplitter</tt> class and its options.</p></li><li style="list-style-type: disc"><p>Completed the initial version of <tt>browser.rb</tt>, which is just a simple tool to inspect the methods and constants exposed by different FOX classes. Thanks to Albert Wagner for pointing out some bugs in this one and providing me with the motivation to complete it. I don't know how useful it is, but it seems to be a required utility for every GUI toolkit for Ruby ;) If you'd like to suggest further improvements, please feel free!</p></li><li style="list-style-type: disc"><p>Corrected the constructors for <tt>FXXPMIcon</tt> and <tt>FXXPMImage</tt> so that they accept a list of strings as their second argument. The list of strings should be an XPM format image file. You can also pass <tt>nil</tt> to construct an initially-empty icon or image.</p></li><li style="list-style-type: disc"><p>Corrected the message data sent by <tt>FXList</tt> to its message target for the <tt>SEL_SELECTED</tt>, <tt>SEL_DESELECTED</tt>, <tt>SEL_INSERTED</tt>, <tt>SEL_DELETED</tt>, and <tt>SEL_REPLACED</tt> messages. For each of these messages, the data should be an integer indicating the affected list item's index.</p></li><li style="list-style-type: disc"><p>Added typemaps to convert Ruby message data back into C++ void pointers when calling the base class versions of message handlers. Please see the to-do list for a brief discussion of the issues that this fix addressed, and what remains to be done.</p></li><li style="list-style-type: disc"><p>Fixed a subtle GC bug related to object ownership. I'll use the <tt>FXList</t t> and <tt>FXListItem</tt> classes to describe the problem, but it's also relevant for several other FOX classes.</p><p>There are two ways to add a new list item to an <tt>FXList</tt> instance. One of those ways involves creating a new <tt>FXListItem</tt> instance explicitly (i.e. using <tt>FXListItem.new</tt>) and then passing it into an <tt>FXList</tt> instance method like <tt>FXList#appendItem</tt>. Before you add the item to the list, the item is "self-owned"; in other words, if Ruby's garbage collector decides to kill off that <tt>FXListItem</tt> instance, it is appropriate to also destroy the underlying C++ object. After the list item has been added to an <tt>FXList</tt>, however, the <tt>FXList</tt> owns that list item and is responsible for destroying it.</p><p>This bug became an issue when you added <tt>FXListItem</tt> instances to a list, because the code didn't properly recognize the fact that "ownership" of the list item had been transferred from the <tt>FXListItem</tt> instance to the <tt>FXList</tt>. More to the point, Ruby's garbage collector assumed that it was still OK to destroy the <tt>FXListItem</tt> instances that it knew about, and so objects could get deleted twice. This would usually result in a core dump.</p><p>Many thanks to Albert Wagner for submitting an example program that demonstrated this problem.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.fox-toolkit.org/pub/fox-0.99.173.tar.gz" target="_top">fox-0.99.173</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2755"></a>Changes Since Version 0.99.167</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Completed the coding for "safe" coexistence with Ruby's garbage collector; it should no longer be necessary to call <tt>GC.disable</tt> at the top of your FXRuby programs. Although all of the example programs now work correctly without disabling the garbage collector, this doesn't mean that there aren't still some bugs lurking. If your FXRuby program(s) crash mysteriously, try adding <tt>GC.disable</tt> to the top to see if it fixes things. If this does make a difference, <span class="emphasis"><em>please</em></span> send me the program (or another that reproduces the problem) so I can track down what's going wrong.</p></li><li style="list-style-type: disc"><p>Added aliases for all classes' accessor functions so that the related properties can be accessed more directly; for example, <tt>FXLabel#getText</tt> is aliased to <tt>FXLabel#text</tt> and <tt>FXLabel#setText</tt> is aliased to <tt>FXLabel#text=</tt>. Although the different forms are functionally equivalent, the new form is often easier to read. For example, consider this snippet of code that modifies a label's text:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">aLabel.setText(aLabel.getText() + " (modified)")</pre></td></tr></table><p>and this version of the same, now using the propery accessor functions:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">aLabel.text += " (modified)"</pre></td></tr></table><p>None of the standard FOX class APIs have been removed, so you shouldn't need to modify any already-working code.</p></li><li style="list-style-type: disc"><p>Corrected the message data sent from the <tt>FXText</tt> widget to its message target for the <tt>SEL_SELECTED</tt>, <tt>SEL_DESELECTED</tt>, <tt>SEL_INSERTED</tt>, <tt>SEL_DELETED</tt> and <tt>SEL_REPLACED</tt> message types. For the first four messages, the associated message data sent to the target will be an array of two integers indicating the starting position in the text buffer and text length for the affected text. For the <tt>SEL_REPLACED</tt> message type, the message data will be an array of three integers, indicating the starting position in the text buffer, the length of the old (replaced) text, and the length of the new text.</p></li><li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.fox-toolkit.org/pub/fox-0.99.172.tar.gz" target="_top">fox-0.99.172</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2824"></a>Changes Since Version 0.99.166-1</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Corrected the interfaces for <tt>FXInputDialog.getString</tt>, <tt>FXInputDialog.getReal</tt> and <tt>FXInputDialog.getInteger</tt> to either return the requested type or <tt>nil</tt> if the user cancels the dialog.</p></li><li style="list-style-type: disc"><p>Added code at the top of all the examples to disable Ruby's garbage collector, until the issues with GC are resolved.</p></li><li style="list-style-type: disc"><p>Corrected implementations for the overloaded versions of <tt>FXWindow#update</tt>. This method can be invoke with no arguments (in which case it updates the entire window) or with four arguments indicating the x, y, w and h of the client area to be updated.</p></li><li style="list-style-type: disc"><p>Modified how the return values from Ruby message handler functions are interpreted, to make things a little more convenient for programmers. If the result is a numeric type (<tt>Fixnum</tt>, <tt>Bignum</tt> or <tt>Float</tt>) we try to cast it to a long integer but also trap the value to either zero or one. If it's a boolean result we map <tt>false</tt> and <tt>true</tt> to zero and one, respectively. For any other return type (<tt>nil</tt>, strings, etc.) we just assume they meant to return 1. Thanks to Ted Meng for this suggestion.</p></li><li style="list-style-type: disc"><p>Modified the interfaces for <tt>FXFileDialog#getPatternList</tt>, <tt>FXFileSelector#getPatternList</tt>, <tt>FXFileDialog#setPatternList</tt> and <tt>FXFileSelector#setPatternList</tt> to take (or return) an array of strings (one array item per pattern) of the form "C/C++ Files (*.cpp)". This is sort-of a compromise between the currently available overloaded C++ versions of these functions, both of which look pretty awkward in Ruby. For an example of how this works now, see the <tt>imageviewer.rb</tt> example program.</p></li><li style="list-style-type: disc"><p>Added the FOX key cap definitions (i.e. the symbols from <tt>fxkeys.h</tt>) into FXRuby. Thanks to Benedikt Grundmann for pointing out this omission.</p></li><li style="list-style-type: disc"><p>Added initial support for multithreaded FXRuby applications. 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. As a simple example, I modified the <tt>groupbox.rb</tt> example program so that the clock label that appears in the lower right-hand corner is continuously updated (by a separate thread) instead of just displaying static text.</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>FXApp</tt> object's <i><tt>sleepTime</tt></i> attribute. The default value for <i><tt>FXApp#sleepTime</tt></i> is 100 milliseconds. You can also disable the threads support completely by calling <tt>FXApp#disableThreads</tt> (and subsequently re-enable it with <tt>FXApp#enableThreads</tt>.</p></li><li style="list-style-type: disc"><p>Started adding <a href="http://homepage1.nifty.com/markey/ruby/rubyunit/index_e.html" target="_top">RubyUnit</a>-style test cases to the <tt>tests</tt> subdirectory. There's not much there yet but we've got to start somewhere!</p></li><li style="list-style-type: disc"><p>Converted most of the documentation over to <a href="http://www.docbook.org" target="_top">DocBook</a> format and reorganized the web page accordingly.</p></li> <li style="list-style-type: disc"><p>Updated the interfaces for compatibility with <a href="ftp://ftp.cfdrc.com/pub/FOX/fox-0.99.167.tar.gz" target="_top">fox-0.99.167</a>.</p></li></ul></div></div><div class="simplesect"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2941"></a>Changes Since Version 0.99.166</h2></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Corrected a problem with the binary distribution (i.e. the <tt>fox.so</tt> file) for Windows, which made it unusable on most Windows installations. This problem was related to an incompatibility between the versions of Cygwin that I was using to compile FOX and FXRuby, and the version used to compile the standard Ruby 1.6.2 distribution for Windows. Many, many thanks to Pete, Bene and Robert for helping me to test and resolve this issue!</p></li><li style="list-style-type: disc"><p>Added support for FOX data targets, as demonstrated by the new <tt>datatarget.rb</tt> example in the <tt>examples</tt> directory. A data target is a special kind of FOX object that can be designated as the message target of any widget that has an associated "value", and then the value of the data target and that widget become automatically linked to each other. For example, you can create a data target with a string value and then make it the message target for an <tt>FXTextField</tt> widget. From then on, changes made to the text field will be automatically reflected in the data target's value and vice versa. (For those familiar with Tk, this is the same principal as its <tt>TkVariable</tt> class.)</p></li><li style="list-style-type: disc"><p>Made the <tt>extconf.rb</tt> script a lot more intelligent and robust. Now,... [truncated message content] |
From: Lyle J. <ly...@us...> - 2002-05-10 14:58:12
|
Update of /cvsroot/fxruby/FXRuby In directory usw-pr-cvs1:/tmp/cvs-serv31306 Modified Files: Tag: release10 Makefile Log Message: Added the Makefile and the FXRuby.spec file to the list of files packaged into the source tarball. Index: Makefile =================================================================== RCS file: /cvsroot/fxruby/FXRuby/Attic/Makefile,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** Makefile 10 May 2002 03:44:30 -0000 1.1.2.1 --- Makefile 10 May 2002 14:58:09 -0000 1.1.2.2 *************** *** 9,12 **** --- 9,14 ---- LICENSE \ README \ + Makefile \ + FXRuby.spec \ install.rb \ index.html \ |