fxruby 1.6.7 → 1.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/doc/apes02.html +2 -2
- data/doc/apes03.html +1 -1
- data/doc/book.html +1 -1
- data/doc/build.html +24 -24
- data/doc/ch03s02.html +1 -1
- data/doc/ch03s03.html +1 -1
- data/doc/ch03s04.html +1 -1
- data/doc/ch03s05.html +1 -1
- data/doc/ch04s02.html +6 -7
- data/doc/ch04s03.html +1 -1
- data/doc/ch04s04.html +1 -1
- data/doc/ch05s02.html +44 -46
- data/doc/ch05s03.html +21 -22
- data/doc/changes.html +31 -24
- data/doc/clipboardtut.html +7 -8
- data/doc/differences.html +9 -9
- data/doc/dragdroptut.html +52 -55
- data/doc/events.html +7 -7
- data/doc/examples.html +24 -24
- data/doc/gems.html +10 -10
- data/doc/goals.html +8 -6
- data/doc/implementation.html +1 -1
- data/doc/infosources.html +5 -5
- data/doc/library.html +5 -5
- data/doc/opengl.html +5 -5
- data/doc/pt01.html +1 -1
- data/doc/pt02.html +1 -1
- data/doc/scintilla.html +8 -8
- data/doc/style.css +246 -2
- data/doc/subversion.html +1 -1
- data/doc/tutorial1.html +2 -2
- data/doc/unicode.html +2 -2
- data/examples/babelfish.rb +0 -1
- data/examples/bounce.rb +0 -1
- data/examples/button.rb +0 -1
- data/examples/datatarget.rb +0 -1
- data/examples/dialog.rb +0 -1
- data/examples/dilbert.rb +0 -1
- data/examples/dirlist.rb +0 -1
- data/examples/dragdrop.rb +0 -1
- data/examples/dragsource.rb +0 -1
- data/examples/dropsite.rb +1 -2
- data/examples/foursplit.rb +0 -1
- data/examples/gltest.rb +0 -1
- data/examples/glviewer.rb +0 -1
- data/examples/groupbox.rb +0 -1
- data/examples/header.rb +0 -1
- data/examples/iconlist.rb +0 -1
- data/examples/image.rb +0 -1
- data/examples/imageviewer.rb +0 -1
- data/examples/inputs.rb +0 -1
- data/examples/mditest.rb +0 -1
- data/examples/pig.rb +0 -1
- data/examples/raabrowser.rb +0 -1
- data/examples/ratio.rb +0 -1
- data/examples/rulerview.rb +0 -1
- data/examples/scribble.rb +0 -1
- data/examples/shutter.rb +0 -1
- data/examples/splitter.rb +0 -1
- data/examples/tabbook.rb +0 -1
- data/examples/table.rb +0 -1
- data/ext/fox16/FXRuby.cpp +3 -4
- data/lib/fox16/version.rb +1 -1
- metadata +2 -3
- data/doc/todo.html +0 -40
data/doc/changes.html
CHANGED
@@ -1,7 +1,14 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Chapter
|
4
|
-
|
3
|
+
<title>Chapter 10. Change History</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook v5 XSL Stylesheets V1.72.0"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt01.html" title="Part I. The Basics"><link rel="prev" href="infosources.html" title="Chapter 9. Other Sources of Information"><link rel="next" href="pt02.html" title="Part II. Appendices"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 10. Change History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="infosources.html">Prev</a> </td><th width="60%" align="center">Part I. The Basics</th><td width="20%" align="right"> <a accesskey="n" href="pt02.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="changes"></a>Chapter 10. Change History</h2></div></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2394"></a>Changes For Version 1.6.8 (April 5, 2007)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Due to an internal bookkeeping error, applications like the <code class="filename">glviewer.rb</code>
|
4
|
+
example program which create multiple <code class="classname">FXGLViewer</code> instances could cause
|
5
|
+
an assertion to fail. When this assertion fails on Windows, the program simply crashes
|
6
|
+
(see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=9775&group_id=300&atid=1223" target="_top">RubyForge
|
7
|
+
Bug #9775</a>). This problem has been fixed.</p></li><li style="list-style-type: disc"><p>The keyword arguments library, introduced in version 1.6.5, is now included
|
8
|
+
automatically when you load FXRuby; it is no longer necessary to explicitly
|
9
|
+
require it.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.6.25 and
|
10
|
+
FXScintilla version 1.71.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2416"></a>Changes For Version 1.6.7 (March 31, 2007)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.6.25 and
|
11
|
+
FXScintilla version 1.71.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2423"></a>Changes For Version 1.6.6 (February 10, 2007)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Somewhere along the way, the RAA browser example program got
|
5
12
|
broken due to changes in the SOAP interface to RAA (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=7977&group_id=300&atid=1223" target="_top">RubyForge
|
6
13
|
Bug #7977</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>Some debugging code that was meant to detect errors in FXRuby
|
7
14
|
message data conversion was inadvertently causing some user
|
@@ -35,7 +42,7 @@
|
|
35
42
|
hash, that value will be used for any of the four regular padding
|
36
43
|
values that aren't otherwise specified. See the example programs for,
|
37
44
|
you know, examples.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.6.20 and
|
38
|
-
FXScintilla version 1.71.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
45
|
+
FXScintilla version 1.71.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2523"></a>Changes For Version 1.6.5 (January 20, 2007)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Clicking outside of the visible cells for an
|
39
46
|
<code class="classname">FXTable</code> when there was no current selection
|
40
47
|
caused the code to raise an exception (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=5907&group_id=300&atid=1223" target="_top">RubyForge
|
41
48
|
Bug #5907</a>). This problem has been fixed.</p></li><li style="list-style-type: disc"><p>The <code class="methodname">hasTimeout?</code> method for the
|
@@ -55,11 +62,11 @@
|
|
55
62
|
described in the <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.fxruby.org/doc/differences.html" target="_top">"Differences Between
|
56
63
|
FOX and FXRuby"</a> section of the <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.fxruby.org/doc/book.html" target="_top">FXRuby User's
|
57
64
|
Guide</a>.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.6.20 and
|
58
|
-
FXScintilla version 1.71.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
65
|
+
FXScintilla version 1.71.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2599"></a>Changes For Version 1.6.4 (November 30, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>A change made in Ruby 1.8.5 for cyclic requires led to a problem
|
59
66
|
that caused the Ruby interpreter to emit a large number of warnings
|
60
67
|
(see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/?func=detail&aid=5633&group_id=300&atid=1223" target="_top">RubyForge
|
61
68
|
Bug #5633</a>). This problem has been fixed.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.6.16 and
|
62
|
-
FXScintilla version 1.71.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
69
|
+
FXScintilla version 1.71.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2612"></a>Changes For Version 1.6.3 (October 27, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Widgets of some classes (namely
|
63
70
|
<code class="classname">FXTopWindow</code> and
|
64
71
|
<code class="classname">FXMDIChild</code>) weren't properly sending a
|
65
72
|
<code class="constant">SEL_CLOSE</code> message to their message targets (see
|
@@ -96,7 +103,7 @@
|
|
96
103
|
Bug #6211</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>The build script was not compatible with changes made in the
|
97
104
|
recently-released FXScintilla 1.71 (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=6313&group_id=300&atid=1223" target="_top">RubyForge
|
98
105
|
Bug #6313</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.6.16 and
|
99
|
-
FXScintilla version 1.71.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
106
|
+
FXScintilla version 1.71.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2740"></a>Changes For Version 1.6.2 (September 13, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The <code class="methodname">expandTree()</code> and
|
100
107
|
<code class="methodname">collapseTree()</code> methods for the
|
101
108
|
<code class="classname">FXFoldingList</code> class were incorrectly identified
|
102
109
|
as <code class="methodname">expandFolding()</code> and
|
@@ -110,7 +117,7 @@
|
|
110
117
|
Bug #5591</a>). Now it does.</p></li><li style="list-style-type: disc"><p>The <code class="classname">FXGradientBar</code> class was not supported
|
111
118
|
(see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=5746&group_id=300&atid=1223" target="_top">RubyForge
|
112
119
|
Bug #5746</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.6.14 and
|
113
|
-
FXScintilla version 1.67 (from CVS).</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
120
|
+
FXScintilla version 1.67 (from CVS).</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2798"></a>Changes For Version 1.4.7 (September 13, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The <code class="methodname">children</code> instance method for the
|
114
121
|
<code class="classname">FXWindow</code> class always returned an array of
|
115
122
|
<code class="classname">FXWindow</code> instances, even if the actual types
|
116
123
|
should have been instances of subclasses of
|
@@ -131,7 +138,7 @@
|
|
131
138
|
Bug #5591</a>). Now it does.</p></li><li style="list-style-type: disc"><p>The <code class="classname">FXGradientBar</code> class was not supported
|
132
139
|
(see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=5746&group_id=300&atid=1223" target="_top">RubyForge
|
133
140
|
Bug #5746</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.4.34 and
|
134
|
-
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
141
|
+
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2883"></a>Changes For Version 1.6.1 (July 21, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The message data sent along for the
|
135
142
|
<code class="constant">SEL_INSERTED</code>, <code class="constant">SEL_DELETED</code>
|
136
143
|
and <code class="constant">SEL_REPLACED</code> messages from an a
|
137
144
|
<code class="classname">FXText</code> widget to its target was not being
|
@@ -166,7 +173,7 @@
|
|
166
173
|
the sole means for loading FXRuby. Such programs should instead
|
167
174
|
use:</p><pre class="programlisting">require 'fox16'</pre><p>which will work
|
168
175
|
for either gem based or non-gem based installations.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.6.8 and
|
169
|
-
FXScintilla version 1.67 (from CVS).</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
176
|
+
FXScintilla version 1.67 (from CVS).</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2980"></a>Changes For Version 1.6.0 (May 29, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>This is the first release of FXRuby compatible with FOX version
|
170
177
|
1.6. One of the most signficant changes for FOX 1.6 has been the
|
171
178
|
addition of Unicode support; all FOX widgets and internal string
|
172
179
|
processing routines are now Unicode aware. For a comprehensive
|
@@ -192,7 +199,7 @@
|
|
192
199
|
Bug #4342</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>The <code class="filename">dilbert.rb</code> example program was broken
|
193
200
|
due to a change in the Dilbert.com web site structure (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=4597&group_id=300&atid=1223" target="_top">RubyForge
|
194
201
|
Bug #4597</a>). This has been fixed.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.6.5 and
|
195
|
-
FXScintilla version 1.67 (from CVS).</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
202
|
+
FXScintilla version 1.67 (from CVS).</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3074"></a>Changes For Version 1.4.6 (April 26, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>FXRuby would not compile properly on some x86-64 systems (see
|
196
203
|
<a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=3729&group_id=300&atid=1223" target="_top">RubyForge
|
197
204
|
Bug #3729</a>). This error has been corrected. Thanks to Javier
|
198
205
|
Goizueta for initially reporting this problem, and especially to
|
@@ -218,7 +225,7 @@
|
|
218
225
|
<code class="constant">SEL_COMMAND</code> message type (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=4255&group_id=300&atid=1223" target="_top">RubyForge
|
219
226
|
Bug #4255</a>). This error has been corrected. Thanks to Gerard
|
220
227
|
Menochet for reporting this problem.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.4.29 and
|
221
|
-
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
228
|
+
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3153"></a>Changes For Version 1.4.5 (April 10, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The <code class="classname">FXTextField</code> class was not properly
|
222
229
|
responding to the <code class="constant">ID_INSERT_STRING</code> command (see
|
223
230
|
<a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=3320&group_id=300&atid=1223" target="_top">RubyForge
|
224
231
|
Bug #3320</a>). This error has been corrected. Thanks to Uwe Hartl
|
@@ -261,7 +268,7 @@
|
|
261
268
|
third argument, but this wasn't working properly (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=4005&group_id=300&atid=1223" target="_top">RubyForge
|
262
269
|
Bug #4005</a>). This error has been corrected. Thanks to Mark
|
263
270
|
Volkman for reporting this problem.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.4.29 and
|
264
|
-
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
271
|
+
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3274"></a>Changes For Version 1.4.4 (January 21, 2006)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The build instructions for Unix platforms had not been updated
|
265
272
|
recently and as such contained some errors (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=3014&group_id=300&atid=1223" target="_top">RubyForge
|
266
273
|
Bug #3014</a>). These errors have been corrected. Thanks to Dave
|
267
274
|
Burns for reporting this problem.</p></li><li style="list-style-type: disc"><p>The <code class="methodname">extendSelection</code> method for the
|
@@ -284,7 +291,7 @@
|
|
284
291
|
RDoc documentation for the <code class="classname">FXTable</code> class. All
|
285
292
|
of these problems have been corrected. Thanks to _blackdog for
|
286
293
|
reporting this problem.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.4.29 and
|
287
|
-
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
294
|
+
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3338"></a>Changes For Version 1.4.3 (November 7, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The <code class="constant">TOGGLEBUTTON_KEEPSTATE</code> option for the
|
288
295
|
<code class="classname">FXToggleButton</code> class was not documented (see
|
289
296
|
<a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=2286&group_id=300&atid=1223" target="_top">RubyForge
|
290
297
|
Bug #2286</a>). This oversight has been corrected. Thanks to Tim
|
@@ -319,7 +326,7 @@
|
|
319
326
|
been fixed, and the documentation for
|
320
327
|
<code class="methodname">makePositionVisible</code> has been updated
|
321
328
|
accordingly. Thanks to Ralf Jonas for reporting this problem.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.4.21 and
|
322
|
-
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
329
|
+
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3423"></a>Changes For Version 1.4.2 (August 22, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Due to a bug in the implementation, the
|
323
330
|
<code class="methodname">checked?</code> method for the
|
324
331
|
<code class="classname">FXCheckButton</code> class always returned
|
325
332
|
<code class="constant">false</code> (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=1852&group_id=300&atid=1223" target="_top">RubyForge
|
@@ -346,7 +353,7 @@
|
|
346
353
|
<code class="classname">FXFileStream</code> class were broken (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=2275&group_id=300&atid=1223" target="_top">RubyForge
|
347
354
|
Bug #2275</a>). This problem has been corrected. Thanks to Gonzalo
|
348
355
|
Garramuno for reporting this problem.</p></li><li style="list-style-type: disc"><p>Merged in all of the fixes for FXRuby 1.2.6.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.4.17 and
|
349
|
-
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
356
|
+
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3514"></a>Changes For Version 1.4.1 (August 20, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>This is the second release of FXRuby which is compatible with
|
350
357
|
FOX 1.4, and as such should be considered an "unstable" release. For a
|
351
358
|
history of the changes made during the FOX 1.3 and 1.4 development,
|
352
359
|
see the <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.fox-toolkit.com/news.html" target="_top">News</a>
|
@@ -355,11 +362,11 @@
|
|
355
362
|
feature, and were still looking at <code class="constant">fox12</code>. This
|
356
363
|
has been corrected.</p></li><li style="list-style-type: disc"><p>A number of minor problems were corrected for the Windows build
|
357
364
|
of FXRuby.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.4.17 and
|
358
|
-
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
365
|
+
FXScintilla version 1.63.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3542"></a>Changes For Version 1.4.0 (August 19, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>This is the first release of FXRuby which is compatible with FOX
|
359
366
|
1.4, and as such should be considered an "unstable" release. For a
|
360
367
|
history of the changes made during the FOX 1.3 and 1.4 development,
|
361
368
|
see the <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.fox-toolkit.com/news.html" target="_top">News</a>
|
362
|
-
page at the FOX Web site.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
369
|
+
page at the FOX Web site.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3552"></a>Changes For Version 1.2.6 (April 15, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Some additional problems related to calling the
|
363
370
|
<code class="methodname">setTableSize</code> method for an
|
364
371
|
<code class="classname">FXTable</code> were discovered (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=1597&group_id=300&atid=1223" target="_top">RubyForge
|
365
372
|
Bug #1597</a>). This problem has been corrected. Thanks to Joel
|
@@ -407,7 +414,7 @@
|
|
407
414
|
to be unavailable as well (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=1771&group_id=300&atid=1223" target="_top">RubyForge
|
408
415
|
Bug #1771</a>). This error has been corrected. Thanks to Jannis
|
409
416
|
Pohlmann for reporting this problem.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.16 and
|
410
|
-
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
417
|
+
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3688"></a>Changes For Version 1.2.5 (March 1, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The change made for FXRuby version 1.2.4 regarding garbage
|
411
418
|
collection for table items corrected only one of the problems
|
412
419
|
described in <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=1445&group_id=300&atid=1223" target="_top">RubyForge
|
413
420
|
Bug #1445</a>; There was still a problem related to the
|
@@ -437,7 +444,7 @@
|
|
437
444
|
<code class="methodname">selectRange</code> method under the hood (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=1562&group_id=300&atid=1223" target="_top">RubyForge
|
438
445
|
Bug #1562</a>). Thanks to Joel VanderWerf for this
|
439
446
|
suggestion.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.13 and
|
440
|
-
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
447
|
+
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3773"></a>Changes For Version 1.2.4 (February 23, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Due to a change in some of the internal Ruby C APIs, a
|
441
448
|
compile-time error for FXRuby was introduced in some of the Ruby 1.8.2
|
442
449
|
preview releases (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=1039&group_id=300&atid=1223" target="_top">RubyForge
|
443
450
|
Bug #1039</a>). One should not see any compile-time errors when
|
@@ -487,7 +494,7 @@
|
|
487
494
|
<code class="classname">FXTable</code> class (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=1426&group_id=300&atid=1226" target="_top">RubyForge
|
488
495
|
Feature Request #1295</a>). Thanks to Brett Hallett for this
|
489
496
|
suggestion.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.13 and
|
490
|
-
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
497
|
+
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3876"></a>Changes For Version 1.2.3 (January 22, 2005)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>Since group boxes containing radio buttons no longer enforce the
|
491
498
|
radio behavior of radio buttons (i.e. keeping only one radio button
|
492
499
|
selected at a time), some of the example programs were no longer
|
493
500
|
working as desired (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=751&group_id=300&atid=1223" target="_top">RubyForge
|
@@ -550,7 +557,7 @@
|
|
550
557
|
documented incorrectly (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubyforge.org/tracker/index.php?func=detail&aid=1325&group_id=300&atid=1223" target="_top">RubyForge
|
551
558
|
Bug #1325</a>). These have been corrected. Thanks to Karl El-Koura
|
552
559
|
for reporting this problem.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.13 and
|
553
|
-
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
560
|
+
FXScintilla version 1.62.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4048"></a>Changes For Version 1.2.2 (October 1, 2004)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>In order to avoid versioning problems when dealing with a mix of
|
554
561
|
applications based on either FXRuby 1.0 or 1.2, the feature name for
|
555
562
|
FXRuby has been changed from "fox" to "fox12". For most application
|
556
563
|
developers, this means that you will need to modify the source code
|
@@ -558,7 +565,7 @@
|
|
558
565
|
changes should be required for legacy applications targeted at FXRuby
|
559
566
|
1.0.</p></li><li style="list-style-type: disc"><p>Made a number of updates to the documentation, to reflect API
|
560
567
|
changes for FXRuby 1.2.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.9 and
|
561
|
-
FXScintilla version 1.61.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
568
|
+
FXScintilla version 1.61.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4065"></a>Changes For Version 1.2a2 (July 10, 2004)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>This is the second "alpha" release of FXRuby 1.2. This release
|
562
569
|
should be compatible with any FOX library version 1.2; it is not
|
563
570
|
compatible with any previous FOX library versions. As this is an alpha
|
564
571
|
release, users should expect a certain amount of instability, bugs,
|
@@ -600,7 +607,7 @@
|
|
600
607
|
or JPEG image support built-in (see <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://sourceforge.net/tracker/index.php?func=detail&aid=986180&group_id=20243&atid=120243" target="_top">SourceForge
|
601
608
|
Bug #986180</a>). This has been fixed. Thanks to Bil Bas for
|
602
609
|
reporting this problem.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.7 and
|
603
|
-
FXScintilla version 1.61.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
610
|
+
FXScintilla version 1.61.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4174"></a>Changes For Version 1.2a1 (June 28, 2004)</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>This is the first "alpha" release of FXRuby 1.2. This release
|
604
611
|
should be compatible with any FOX library version 1.2; it is not
|
605
612
|
compatible with any previous FOX library versions. As this is an alpha
|
606
613
|
release, users should expect a certain amount of instability, bugs,
|
@@ -622,4 +629,4 @@
|
|
622
629
|
the new <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://rubygems.rubyforge.org" target="_top">RubyGems</a>-based packaging
|
623
630
|
of FXRuby and to begin to work out the inevitable kinks in that
|
624
631
|
system.</p></li><li style="list-style-type: disc"><p>The binary gem for Windows was built with FOX version 1.2.4 and
|
625
|
-
FXScintilla version 1.57.</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="infosources.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt01.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="pt02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter
|
632
|
+
FXScintilla version 1.57.</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="infosources.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt01.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="pt02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 9. Other Sources of Information </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Part II. Appendices</td></tr></table></div></body></html>
|
data/doc/clipboardtut.html
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Chapter 4. Working With the Clipboard</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook v5 XSL Stylesheets V1.72.0"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt01.html" title="Part I. The Basics"><link rel="prev" href="ch03s05.html" title="Adding an icon"><link rel="next" href="ch04s02.html" title="Acquiring the Clipboard"></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 4. Working With the Clipboard</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s05.html">Prev</a> </td><th width="60%" align="center">Part I. The Basics</th><td width="20%" align="right"> <a accesskey="n" href="ch04s02.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="clipboardtut"></a>Chapter 4. Working With the Clipboard</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="clipboardtut.html#
|
3
|
+
<title>Chapter 4. Working With the Clipboard</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook v5 XSL Stylesheets V1.72.0"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt01.html" title="Part I. The Basics"><link rel="prev" href="ch03s05.html" title="Adding an icon"><link rel="next" href="ch04s02.html" title="Acquiring the Clipboard"></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 4. Working With the Clipboard</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s05.html">Prev</a> </td><th width="60%" align="center">Part I. The Basics</th><td width="20%" align="right"> <a accesskey="n" href="ch04s02.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="clipboardtut"></a>Chapter 4. Working With the Clipboard</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="clipboardtut.html#d0e1003">Basic Application</a></span></dt><dt><span class="section"><a href="ch04s02.html">Acquiring the Clipboard</a></span></dt><dt><span class="section"><a href="ch04s03.html">Sending Data to the Clipboard</a></span></dt><dt><span class="section"><a href="ch04s04.html">Pasting Data from the Clipboard</a></span></dt></dl></div><p>Two of the standard FOX widgets, <code class="classname">FXText</code> and
|
4
4
|
<code class="classname">FXTextField</code>, provide clipboard support out of the
|
5
5
|
box. For example, you can select some text in an
|
6
6
|
<code class="classname">FXTextField</code> and then press Ctrl+C to copy that text
|
@@ -9,11 +9,10 @@
|
|
9
9
|
<code class="classname">FXText</code> or <code class="classname">FXTextField</code> widget.
|
10
10
|
The purpose of this tutorial is to demonstrate how to interact with the
|
11
11
|
clipboard programmatically, so that you can integrate additional clipboard
|
12
|
-
support into your FXRuby applications.</p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
12
|
+
support into your FXRuby applications.</p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e1003"></a>Basic Application</h2></div></div></div><p>In order to illustrate how to integrate cut and paste operations
|
13
13
|
into your application, we'll start from a simple FXRuby application that
|
14
14
|
doesn't yet provide any clipboard support. This application simply
|
15
|
-
presents a list of customers (from some external source).</p><pre class="programlisting">require '
|
16
|
-
require_gem 'fxruby'
|
15
|
+
presents a list of customers (from some external source).</p><pre class="programlisting">require 'fox16'
|
17
16
|
require 'customer'
|
18
17
|
|
19
18
|
include Fox
|
@@ -21,14 +20,14 @@ include Fox
|
|
21
20
|
class ClipMainWindow < FXMainWindow
|
22
21
|
def initialize(anApp)
|
23
22
|
# Initialize base class first
|
24
|
-
super(anApp, "Clipboard Example",
|
23
|
+
super(anApp, "Clipboard Example", :opts => DECOR_ALL, :width => 400, :height => 300)
|
25
24
|
|
26
25
|
# Place the list in a sunken frame
|
27
|
-
sunkenFrame = FXVerticalFrame.new(self,
|
28
|
-
|
26
|
+
sunkenFrame = FXVerticalFrame.new(self,
|
27
|
+
LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN|FRAME_THICK, :padding => 0)
|
29
28
|
|
30
29
|
# Customer list
|
31
|
-
customerList = FXList.new(sunkenFrame,
|
30
|
+
customerList = FXList.new(sunkenFrame, :opts => LIST_BROWSESELECT|LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
32
31
|
$customers.each do |customer|
|
33
32
|
customerList.appendItem(customer.name, nil, customer)
|
34
33
|
end
|
data/doc/differences.html
CHANGED
@@ -12,14 +12,14 @@
|
|
12
12
|
Similarly, functions that would return an <span class="type">FXString</span> will instead
|
13
13
|
return a Ruby string. For functions that would normally accept a
|
14
14
|
<code class="constant">NULL</code> or empty string argument, just pass
|
15
|
-
<code class="constant">nil</code> or an empty string ("").</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
15
|
+
<code class="constant">nil</code> or an empty string ("").</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4469"></a>Functions that expect arrays of objects</h2></div></div></div><p>One common pattern in FOX member function argument lists is to
|
16
16
|
expect a pointer to an array of values, followed by an integer indicating
|
17
17
|
the number of values in the array. This of course isn't necessary in Ruby,
|
18
18
|
where <code class="classname">Array</code> objects "know" their lengths. As a
|
19
19
|
result, functions such as
|
20
20
|
<code class="methodname">FXWindow::acquireClipboard()</code>, whose C++
|
21
21
|
declaration looks like this:</p><pre class="programlisting">FXbool acquireClipboard(const FXDragType *types, FXuint numTypes);</pre><p>are called from Ruby code by passing in a single
|
22
|
-
<code class="classname">Array</code> argument, e.g.</p><pre class="programlisting">myWindow.acquireClipboard(typesArray)</pre></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
22
|
+
<code class="classname">Array</code> argument, e.g.</p><pre class="programlisting">myWindow.acquireClipboard(typesArray)</pre></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4489"></a>Functions that return values by reference</h2></div></div></div><p>Many FOX methods take advantage of the C++ language feature of
|
23
23
|
returning values by reference. For example, the
|
24
24
|
<code class="methodname">getCursorPos()</code> member function for class
|
25
25
|
<code class="classname">FXWindow</code> has the declaration:</p><pre class="programlisting">FXint getCursorPos(FXint& x, FXint& y, FXint& buttons) const;</pre><p>which indicates that the function takes references to three integers
|
@@ -65,7 +65,7 @@ if (window->getCursorPosition(x, y, buttons))
|
|
65
65
|
y)</code></td><td>Returns the translated coordinates as an array [x,
|
66
66
|
y]</td></tr><tr><td><code class="methodname">FXWindow#translateCoordinatesTo(window, x,
|
67
67
|
y)</code></td><td>Returns the translated coordinates as an array [x,
|
68
|
-
y]</td></tr></tbody></table></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
68
|
+
y]</td></tr></tbody></table></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4779"></a>Iterators</h2></div></div></div><p>Several classes have been extended with an
|
69
69
|
<code class="methodname">each</code> method to provide Ruby-style iterators.
|
70
70
|
These classes include <code class="classname">FXComboBox</code>,
|
71
71
|
<code class="classname">FXGLGroup</code>, <code class="classname">FXHeader</code>,
|
@@ -83,7 +83,7 @@ if (window->getCursorPosition(x, y, buttons))
|
|
83
83
|
puts "text for this item = #{itemText}"
|
84
84
|
}</pre><p>The following table shows the block parameters for each of these
|
85
85
|
classes' iterators:</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th align="center">Class</th><th align="center">Block Parameters</th></tr></thead><tbody><tr><td><code class="classname">FXComboBox</code></td><td>the item text (a string) and user data</td></tr><tr><td><code class="classname">FXGLGroup</code></td><td>an <code class="classname">FXGLObject</code> instance</td></tr><tr><td><code class="classname">FXHeader</code></td><td>an <code class="classname">FXHeaderItem</code> instance</td></tr><tr><td><code class="classname">FXIconList</code></td><td>an <code class="classname">FXIconItem</code> instance</td></tr><tr><td><code class="classname">FXList</code></td><td>an <code class="classname">FXListItem</code> instance</td></tr><tr><td><code class="classname">FXListBox</code></td><td>the item text (a string), icon (an
|
86
|
-
<code class="classname">FXIcon</code> instance) and user data</td></tr><tr><td><code class="classname">FXTreeItem</code></td><td>an <code class="classname">FXTreeItem</code> instance</td></tr><tr><td><code class="classname">FXTreeList</code></td><td>an <code class="classname">FXTreeItem</code> instance</td></tr><tr><td><code class="classname">FXTreeListBox</code></td><td>an <code class="classname">FXTreeItem</code> instance</td></tr></tbody></table></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
86
|
+
<code class="classname">FXIcon</code> instance) and user data</td></tr><tr><td><code class="classname">FXTreeItem</code></td><td>an <code class="classname">FXTreeItem</code> instance</td></tr><tr><td><code class="classname">FXTreeList</code></td><td>an <code class="classname">FXTreeItem</code> instance</td></tr><tr><td><code class="classname">FXTreeListBox</code></td><td>an <code class="classname">FXTreeItem</code> instance</td></tr></tbody></table></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4923"></a>Attribute Accessors</h2></div></div></div><p>FOX strictly handles access to all object attributes through member
|
87
87
|
functions, e.g. <code class="methodname">setBackgroundColor</code> and
|
88
88
|
<code class="methodname">getBackgroundColor</code> or
|
89
89
|
<code class="methodname">setText</code> and <code class="methodname">getText</code>.
|
@@ -96,7 +96,7 @@ if (window->getCursorPosition(x, y, buttons))
|
|
96
96
|
<code class="methodname">backgroundColor</code>, respectively.</p><p>In many cases these aliases allow you to write more compact and
|
97
97
|
legible code. For example, consider this code snippet:</p><pre class="programlisting">aLabel.setText(aLabel.getText() + " (modified)")</pre><p>Now consider a different code snippet, using the aliased accessor
|
98
98
|
method names:</p><pre class="programlisting">aLabel.text += " (modified)"</pre><p>While these two are functionally equivalent, the latter is a bit
|
99
|
-
easier to read and understand at first glance.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
99
|
+
easier to read and understand at first glance.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4962"></a>Message Passing</h2></div></div></div><p>FOX message maps are implemented as static C++ class members. With
|
100
100
|
FXRuby, you just associate messages with message handlers in the class
|
101
101
|
<code class="methodname">initialize</code> method using the
|
102
102
|
<code class="methodname">FXMAPFUNC()</code>,
|
@@ -121,14 +121,14 @@ if (window->getCursorPosition(x, y, buttons))
|
|
121
121
|
well's <code class="methodname">getRGBA()</code> member function to retrieve its
|
122
122
|
color. Similarly, if you get a <code class="constant">SEL_COMMAND</code> message
|
123
123
|
from a tree list, call its <code class="methodname">getCurrentItem()</code>
|
124
|
-
method to find out which item was selected.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
124
|
+
method to find out which item was selected.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e5011"></a>Catching Operating System Signals</h2></div></div></div><p>The <code class="methodname">FXApp#addSignal</code> and
|
125
125
|
<code class="methodname">FXApp#removeSignal</code> methods have been enhanced to
|
126
126
|
accept either a string or integer as their first argument. If it's a
|
127
127
|
string (e.g. "SIGINT" or just "INT") the code will determine the
|
128
128
|
corresponding signal number for you (similar to the standard Ruby
|
129
129
|
library's <code class="methodname">Process.kill</code> module method). For
|
130
130
|
examples of how to use this, see the <code class="filename">datatarget.rb</code> or
|
131
|
-
<code class="filename">imageviewer.rb</code> example programs.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
131
|
+
<code class="filename">imageviewer.rb</code> example programs.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e5031"></a>Support for Multithreaded Applications</h2></div></div></div><p>There is some support for multithreaded FXRuby applications, but
|
132
132
|
it's not wonderful. The current implementation does what is also done in
|
133
133
|
Ruby/GTK; it turns over some idle processing time to the Ruby thread
|
134
134
|
scheduler to let other threads do their thing. As I learn more about
|
@@ -145,7 +145,7 @@ if (window->getCursorPosition(x, y, buttons))
|
|
145
145
|
also disable the threads support completely by calling
|
146
146
|
<code class="methodname">FXApp#threadsEnabled=false</code> (and subsequently
|
147
147
|
re-enable it with
|
148
|
-
<code class="methodname">FXApp#threadsEnabled=true</code>).</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
148
|
+
<code class="methodname">FXApp#threadsEnabled=true</code>).</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e5056"></a>Keyword-Style Arguments</h2></div></div></div><p>FXRuby 1.6.5 introduced preliminary, experimental support for using
|
149
149
|
keyword-style arguments in FXRuby method calls. The current implementation
|
150
150
|
of this feature only works for class constructors (i.e. the "new" class
|
151
151
|
methods), but the intent is to gradually extend this feature so that it
|
@@ -181,7 +181,7 @@ if (window->getCursorPosition(x, y, buttons))
|
|
181
181
|
arguments scheme (or it's intended to be, at any rate). What that means is
|
182
182
|
that you can immediately start making use of this feature in your existing
|
183
183
|
code, even if you don't have time to update all of the method calls to use
|
184
|
-
keyword arguments.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
184
|
+
keyword arguments.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e5097"></a>Debugging Tricks</h2></div></div></div><p>As a debugging tool, you can optionally catch exceptions raised in
|
185
185
|
message handlers. To turn on this feature, call the
|
186
186
|
<code class="methodname">setIgnoreExceptions(true)</code> module method. When
|
187
187
|
this is enabled, any exceptions raised in message handler functions will
|
data/doc/dragdroptut.html
CHANGED
@@ -1,22 +1,21 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Chapter 5. Drag and Drop</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook v5 XSL Stylesheets V1.72.0"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt01.html" title="Part I. The Basics"><link rel="prev" href="ch04s04.html" title="Pasting Data from the Clipboard"><link rel="next" href="ch05s02.html" title="Drag Sources"></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 5. Drag and Drop</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s04.html">Prev</a> </td><th width="60%" align="center">Part I. The Basics</th><td width="20%" align="right"> <a accesskey="n" href="ch05s02.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="dragdroptut"></a>Chapter 5. Drag and Drop</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="dragdroptut.html#
|
3
|
+
<title>Chapter 5. Drag and Drop</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook v5 XSL Stylesheets V1.72.0"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt01.html" title="Part I. The Basics"><link rel="prev" href="ch04s04.html" title="Pasting Data from the Clipboard"><link rel="next" href="ch05s02.html" title="Drag Sources"></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 5. Drag and Drop</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s04.html">Prev</a> </td><th width="60%" align="center">Part I. The Basics</th><td width="20%" align="right"> <a accesskey="n" href="ch05s02.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="dragdroptut"></a>Chapter 5. Drag and Drop</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="dragdroptut.html#d0e1218">Drop Sites</a></span></dt><dt><span class="section"><a href="ch05s02.html">Drag Sources</a></span></dt><dt><span class="section"><a href="ch05s03.html">Putting It All Together</a></span></dt></dl></div><p>One of the more powerful features available to FOX applications is
|
4
4
|
drag-and-drop. It's also one of the more complicated to understand. For more
|
5
5
|
background, see the standard FOX documentation on <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.fox-toolkit.com/draganddrop.html" target="_top">Drag and
|
6
|
-
Drop</a>.</p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
6
|
+
Drop</a>.</p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e1218"></a>Drop Sites</h2></div></div></div><p>We're going to start by presenting a skeleton application consisting
|
7
7
|
of a main window widget (a <code class="classname">DropSite</code> instance) that
|
8
|
-
parents an <code class="classname">FXCanvas</code> widget:</p><pre class="programlisting">require '
|
9
|
-
require_gem 'fxruby'
|
8
|
+
parents an <code class="classname">FXCanvas</code> widget:</p><pre class="programlisting">require 'fox16'
|
10
9
|
|
11
10
|
include Fox
|
12
11
|
|
13
12
|
class DropSite < FXMainWindow
|
14
13
|
def initialize(anApp)
|
15
14
|
# Initialize base class
|
16
|
-
super(anApp, "Drop Site",
|
15
|
+
super(anApp, "Drop Site", :opts => DECOR_ALL, :width => 400, :height => 300)
|
17
16
|
|
18
17
|
# Fill main window with canvas
|
19
|
-
@canvas = FXCanvas.new(self,
|
18
|
+
@canvas = FXCanvas.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
20
19
|
end
|
21
20
|
|
22
21
|
def create
|
@@ -41,26 +40,25 @@ end
|
|
41
40
|
message target) to draw its contents, we need to handle
|
42
41
|
<code class="constant">SEL_PAINT</code> messages generated by the canvas. We'll do
|
43
42
|
that by adding a handler that clears the canvas to its current background
|
44
|
-
color:</p><pre class="programlisting">require '
|
45
|
-
require_gem 'fxruby'
|
43
|
+
color:</p><pre class="programlisting">require 'fox16'
|
46
44
|
|
47
45
|
include Fox
|
48
46
|
|
49
47
|
class DropSite < FXMainWindow
|
50
48
|
def initialize(anApp)
|
51
49
|
# Initialize base class
|
52
|
-
super(anApp, "Drop Site",
|
50
|
+
super(anApp, "Drop Site", :opts => DECOR_ALL, :width => 400, :height => 300)
|
53
51
|
|
54
52
|
# Fill main window with canvas
|
55
|
-
@canvas = FXCanvas.new(self,
|
53
|
+
@canvas = FXCanvas.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
56
54
|
|
57
55
|
<span class="bold"><strong> # Handle expose events on the canvas
|
58
|
-
@canvas.connect(SEL_PAINT)
|
59
|
-
FXDCWindow.new(@canvas, event)
|
56
|
+
@canvas.connect(SEL_PAINT) do |sender, sel, event|
|
57
|
+
FXDCWindow.new(@canvas, event) do |dc|
|
60
58
|
dc.foreground = @canvas.backColor
|
61
59
|
dc.fillRectangle(event.rect.x, event.rect.y, event.rect.w, event.rect.h)
|
62
|
-
|
63
|
-
|
60
|
+
end
|
61
|
+
end</strong></span>
|
64
62
|
end
|
65
63
|
|
66
64
|
def create
|
@@ -77,21 +75,21 @@ end
|
|
77
75
|
from some other window, such as an <code class="classname">FXColorWell</code>
|
78
76
|
widget, and drop it onto the canvas in order to change the canvas'
|
79
77
|
background color. In order for a FOX widget to be able to accept drops at
|
80
|
-
all, we need to first call its <code class="methodname">dropEnable
|
78
|
+
all, we need to first call its <code class="methodname">dropEnable</code>
|
81
79
|
method:</p><pre class="programlisting">def initialize(anApp)
|
82
80
|
# Initialize base class
|
83
|
-
super(anApp, "Drop Site",
|
81
|
+
super(anApp, "Drop Site", :opts => DECOR_ALL, :width => 400, :height => 300)
|
84
82
|
|
85
83
|
# Fill main window with canvas
|
86
|
-
@canvas = FXCanvas.new(self,
|
84
|
+
@canvas = FXCanvas.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
87
85
|
|
88
86
|
# Handle expose events on the canvas
|
89
|
-
@canvas.connect(SEL_PAINT)
|
90
|
-
FXDCWindow.new(@canvas, event)
|
87
|
+
@canvas.connect(SEL_PAINT) do |sender, sel, event|
|
88
|
+
FXDCWindow.new(@canvas, event) do |dc|
|
91
89
|
dc.foreground = @canvas.backColor
|
92
90
|
dc.fillRectangle(event.rect.x, event.rect.y, event.rect.w, event.rect.h)
|
93
|
-
|
94
|
-
|
91
|
+
end
|
92
|
+
end
|
95
93
|
|
96
94
|
<span class="bold"><strong> # Enable canvas for drag-and-drop messages
|
97
95
|
@canvas.dropEnable
|
@@ -106,37 +104,37 @@ end
|
|
106
104
|
and try to drag a color from one of these color wells onto this window. At
|
107
105
|
this point, the mouse pointer should turn into a stop sign, indicating
|
108
106
|
that the canvas isn't accepting drops of color data yet.</p><p>To correct this problem, we need to use the canvas'
|
109
|
-
<code class="methodname">acceptDrop
|
107
|
+
<code class="methodname">acceptDrop</code> method to indicate whether or not
|
110
108
|
we'll accept certain kinds of drops. You can call
|
111
|
-
<code class="methodname">acceptDrop
|
109
|
+
<code class="methodname">acceptDrop</code> any time after receiving the initial
|
112
110
|
<code class="constant">SEL_DND_ENTER</code> message, but it's usually done in
|
113
111
|
response to a <code class="constant">SEL_DND_MOTION</code> message. Let's add a
|
114
112
|
handler for <code class="constant">SEL_DND_MOTION</code> messages from the canvas
|
115
|
-
in DropSite's initialize
|
113
|
+
in DropSite's <code class="methodname">initialize</code> method. For now, we'll unconditionally accept
|
116
114
|
drops from any drag source, regardless of what kind of data they're
|
117
115
|
offering:</p><pre class="programlisting">def initialize(anApp)
|
118
116
|
# Initialize base class
|
119
|
-
super(anApp, "Drop Site",
|
117
|
+
super(anApp, "Drop Site", :opts => DECOR_ALL, :width => 400, :height => 300)
|
120
118
|
|
121
119
|
# Fill main window with canvas
|
122
|
-
@canvas = FXCanvas.new(self,
|
120
|
+
@canvas = FXCanvas.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
123
121
|
|
124
122
|
# Handle expose events on the canvas
|
125
|
-
@canvas.connect(SEL_PAINT)
|
126
|
-
FXDCWindow.new(@canvas, event)
|
123
|
+
@canvas.connect(SEL_PAINT) do |sender, sel, event|
|
124
|
+
FXDCWindow.new(@canvas, event) do |dc|
|
127
125
|
dc.foreground = @canvas.backColor
|
128
126
|
dc.fillRectangle(event.rect.x, event.rect.y, event.rect.w, event.rect.h)
|
129
|
-
|
130
|
-
|
127
|
+
end
|
128
|
+
end
|
131
129
|
|
132
130
|
# Enable canvas for drag-and-drop messages
|
133
131
|
@canvas.dropEnable
|
134
132
|
|
135
133
|
<span class="bold"><strong> # Handle SEL_DND_MOTION messages from the canvas
|
136
|
-
@canvas.connect(SEL_DND_MOTION)
|
134
|
+
@canvas.connect(SEL_DND_MOTION) do
|
137
135
|
# Accept drops unconditionally (for now)
|
138
136
|
@canvas.acceptDrop
|
139
|
-
|
137
|
+
end
|
140
138
|
</strong></span>end
|
141
139
|
</pre><p>Now try the previous test again. This time, when you try to drag
|
142
140
|
from a color well to the drop-enabled canvas, you should see the mouse
|
@@ -152,7 +150,7 @@ end
|
|
152
150
|
types for any kind of application-specific data that you need; but for
|
153
151
|
now, we're going to use FOX's built-in drag type for color data.</p><p>Drag types (even the standard ones) must be registered before they
|
154
152
|
can be used, and so we'll start by adding a few lines to
|
155
|
-
<code class="classname">DropSite</code>'s <code class="methodname">create
|
153
|
+
<code class="classname">DropSite</code>'s <code class="methodname">create</code> method
|
156
154
|
to register the drag type for color data:</p><pre class="programlisting">def create
|
157
155
|
# Create the main window and canvas
|
158
156
|
super
|
@@ -164,84 +162,83 @@ end
|
|
164
162
|
show(PLACEMENT_SCREEN)
|
165
163
|
end
|
166
164
|
</pre><p>Note that the first time that
|
167
|
-
<code class="methodname">registerDragType
|
165
|
+
<code class="methodname">registerDragType</code> is called for a particular
|
168
166
|
drag type name (such as <code class="methodname">FXWindow.colorTypeName</code>)
|
169
167
|
it will generate a unique identifier for that drag type. Subsequent calls
|
170
|
-
to <code class="methodname">registerDragType
|
168
|
+
to <code class="methodname">registerDragType</code> for the same drag type name
|
171
169
|
will just return the previously-generated drag type. Now, we want to
|
172
170
|
modify our <code class="constant">SEL_DND_MOTION</code> handler so that it's a
|
173
171
|
little more picky about which kinds of drops it will accept:</p><pre class="programlisting"># Handle SEL_DND_MOTION messages from the canvas
|
174
|
-
@canvas.connect(SEL_DND_MOTION)
|
172
|
+
@canvas.connect(SEL_DND_MOTION) do
|
175
173
|
<span class="bold"><strong> if @canvas.offeredDNDType?(FROM_DRAGNDROP, FXWindow.colorType)
|
176
174
|
@canvas.acceptDrop
|
177
175
|
end
|
178
|
-
</strong></span>
|
176
|
+
</strong></span>end
|
179
177
|
</pre><p>Here, we call the canvas' <code class="methodname">offeredDNDType?</code>
|
180
178
|
method to ask if the drag source can provide its data in the requested
|
181
179
|
format. Only if <code class="methodname">offeredDNDType?</code> returns true will
|
182
|
-
we call <code class="methodname">acceptDrop
|
180
|
+
we call <code class="methodname">acceptDrop</code> as before.</p><p>The last step is to actually handle the drop, and for that we add a
|
183
181
|
handler for the <code class="constant">SEL_DND_DROP</code> message:</p><pre class="programlisting"><span class="bold"><strong># Handle SEL_DND_DROP message from the canvas
|
184
|
-
@canvas.connect(SEL_DND_DROP)
|
182
|
+
@canvas.connect(SEL_DND_DROP) do
|
185
183
|
# Try to obtain the data as color values first
|
186
184
|
data = @canvas.getDNDData(FROM_DRAGNDROP, FXWindow.colorType)
|
187
185
|
unless data.nil?
|
188
186
|
# Update canvas background color
|
189
187
|
@canvas.backColor = Fox.fxdecodeColorData(data)
|
190
188
|
end
|
191
|
-
|
192
|
-
requested format, the <code class="methodname">getDNDData
|
193
|
-
return a
|
189
|
+
end</strong></span></pre><p>Assuming that the drag source is able to provide its data in the
|
190
|
+
requested format, the <code class="methodname">getDNDData</code> method will
|
191
|
+
return a string (which for our purposes is just a byte buffer). If you've
|
194
192
|
defined your own application-specific drag types, this data can of course
|
195
193
|
be anything, and we'll see examples of this in a later tutorial. But the
|
196
194
|
data for standard drag types like
|
197
195
|
<code class="methodname">FXWindow.colorType</code> can be decoded using the
|
198
196
|
appropriate built-in library functions. In this case, we use the
|
199
|
-
<code class="methodname">fxdecodeColorData
|
197
|
+
<code class="methodname">fxdecodeColorData</code> method to convert the bytes
|
200
198
|
into a color value that we can use.</p><p>Now comes the moment of truth. Try running your test program again
|
201
199
|
(one that displays a color well). Now, when you drag a color from a color
|
202
200
|
well and drop it onto the <code class="classname">DropSite</code> window, the
|
203
201
|
canvas should change its background color accordingly.</p><p>The complete program is listed below, and is included in the
|
204
202
|
<code class="filename">examples</code> directory under the file
|
205
|
-
name <code class="filename">dropsite.rb</code>.</p><pre class="programlisting">require '
|
206
|
-
require_gem 'fxruby'
|
203
|
+
name <code class="filename">dropsite.rb</code>.</p><pre class="programlisting">require 'fox16'
|
207
204
|
|
208
205
|
include Fox
|
209
206
|
|
210
207
|
class DropSite < FXMainWindow
|
211
208
|
def initialize(anApp)
|
212
209
|
# Initialize base class
|
213
|
-
super(anApp, "Drop Site",
|
210
|
+
super(anApp, "Drop Site", :opts => DECOR_ALL, :width => 400, :height => 300)
|
214
211
|
|
215
212
|
# Fill main window with canvas
|
216
|
-
@canvas = FXCanvas.new(self,
|
213
|
+
@canvas = FXCanvas.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
217
214
|
|
218
215
|
# Handle expose events on the canvas
|
219
|
-
@canvas.connect(SEL_PAINT)
|
220
|
-
FXDCWindow.new(@canvas, event)
|
216
|
+
@canvas.connect(SEL_PAINT) do |sender, sel, event|
|
217
|
+
FXDCWindow.new(@canvas, event) do |dc|
|
221
218
|
dc.foreground = @canvas.backColor
|
222
219
|
dc.fillRectangle(event.rect.x, event.rect.y, event.rect.w, event.rect.h)
|
223
|
-
|
224
|
-
|
220
|
+
end
|
221
|
+
end
|
225
222
|
|
226
223
|
# Enable canvas for drag-and-drop messages
|
227
224
|
@canvas.dropEnable
|
228
225
|
|
229
226
|
# Handle SEL_DND_MOTION messages from the canvas
|
230
|
-
@canvas.connect(SEL_DND_MOTION)
|
227
|
+
@canvas.connect(SEL_DND_MOTION) do
|
231
228
|
if @canvas.offeredDNDType?(FROM_DRAGNDROP, FXWindow.colorType)
|
232
229
|
@canvas.acceptDrop
|
233
230
|
end
|
234
|
-
|
231
|
+
end
|
235
232
|
|
236
233
|
# Handle SEL_DND_DROP message from the canvas
|
237
|
-
@canvas.connect(SEL_DND_DROP)
|
234
|
+
@canvas.connect(SEL_DND_DROP) do
|
238
235
|
# Try to obtain the data as color values first
|
239
236
|
data = @canvas.getDNDData(FROM_DRAGNDROP, FXWindow.colorType)
|
240
237
|
unless data.nil?
|
241
238
|
# Update canvas background color
|
242
239
|
@canvas.backColor = Fox.fxdecodeColorData(data)
|
243
240
|
end
|
244
|
-
|
241
|
+
end
|
245
242
|
end
|
246
243
|
|
247
244
|
def create
|