fxruby 1.6.11 → 1.6.12
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/changes.html +77 -46
- data/doc/differences.html +9 -9
- data/doc/implementation.html +1 -1
- data/doc/library.html +5 -5
- data/doc/opengl.html +5 -5
- data/doc/pt02.html +1 -1
- data/doc/scintilla.html +4 -4
- data/doc/subversion.html +1 -1
- data/examples/gltest.rb +14 -22
- data/examples/imageviewer.rb +1 -1
- data/examples/inputs.rb +1 -1
- data/examples/styledtext.rb +3 -13
- data/ext/fox16/FXRuby.cpp +51 -52
- data/ext/fox16/text_wrap.cpp +9 -13
- data/lib/fox16/aliases.rb +3 -0
- data/lib/fox16/chore.rb +26 -12
- data/lib/fox16/core.rb +19 -0
- data/lib/fox16/input.rb +13 -8
- data/lib/fox16/kwargs.rb +36 -0
- data/lib/fox16/responder2.rb +39 -30
- data/lib/fox16/signal.rb +11 -6
- data/lib/fox16/timeout.rb +29 -13
- data/lib/fox16/version.rb +1 -1
- data/rdoc-sources/FXButton.rb +1 -1
- data/rdoc-sources/FXCursor.rb +1 -1
- data/rdoc-sources/FXImage.rb +80 -0
- data/rdoc-sources/FXImageFrame.rb +14 -0
- data/rdoc-sources/FXMDIChild.rb +0 -6
- data/rdoc-sources/FXMDIClient.rb +0 -6
- data/rdoc-sources/FXPacker.rb +1 -0
- data/rdoc-sources/FXTable.rb +36 -1
- data/rdoc-sources/FXText.rb +10 -9
- data/rdoc-sources/FXWindow.rb +1 -0
- data/tests/TC_FXText.rb +16 -1
- metadata +15 -8
data/doc/pt02.html
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Part II. Appendices</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="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="prev" href="changes.html" title="Chapter 10. Change History"><link rel="next" href="opengl.html" title="Appendix A. Using OpenGL with FXRuby"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part II. Appendices</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="changes.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="opengl.html">Next</a></td></tr></table><hr></div><div class="part" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="
|
3
|
+
<title>Part II. Appendices</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="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="prev" href="changes.html" title="Chapter 10. Change History"><link rel="next" href="opengl.html" title="Appendix A. Using OpenGL with FXRuby"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part II. Appendices</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="changes.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="opengl.html">Next</a></td></tr></table><hr></div><div class="part" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="d0e4392"></a>Part II. Appendices</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="appendix"><a href="opengl.html">A. Using OpenGL with FXRuby</a></span></dt><dt><span class="appendix"><a href="scintilla.html">B. Using Scintilla with FXRuby</a></span></dt><dt><span class="appendix"><a href="differences.html">C. Differences between FOX and FXRuby</a></span></dt><dt><span class="appendix"><a href="library.html">D. The FXRuby Standard Library</a></span></dt><dt><span class="appendix"><a href="implementation.html">E. Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="implementation.html#d0e5443">Code Generation</a></span></dt><dt><span class="section"><a href="apes02.html">Object Life Cycles and Garbage Collection</a></span></dt><dd><dl><dt><span class="section"><a href="apes02.html#d0e5481">GL Objects</a></span></dt></dl></dd><dt><span class="section"><a href="apes03.html">Virtual Functions</a></span></dt></dl></dd><dt><span class="appendix"><a href="subversion.html">F. Getting the Sources from Subversion</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="changes.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="opengl.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 10. Change History </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix A. Using OpenGL with FXRuby</td></tr></table></div></body></html>
|
data/doc/scintilla.html
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Appendix B. Using Scintilla with FXRuby</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="pt02.html" title="Part II. Appendices"><link rel="prev" href="opengl.html" title="Appendix A. Using OpenGL with FXRuby"><link rel="next" href="differences.html" title="Appendix C. Differences between FOX and FXRuby"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix B. Using Scintilla with FXRuby</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="opengl.html">Prev</a> </td><th width="60%" align="center">Part II. Appendices</th><td width="20%" align="right"> <a accesskey="n" href="differences.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="scintilla"></a>Appendix B. Using Scintilla with FXRuby</h2></div></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
3
|
+
<title>Appendix B. Using Scintilla with FXRuby</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="pt02.html" title="Part II. Appendices"><link rel="prev" href="opengl.html" title="Appendix A. Using OpenGL with FXRuby"><link rel="next" href="differences.html" title="Appendix C. Differences between FOX and FXRuby"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix B. Using Scintilla with FXRuby</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="opengl.html">Prev</a> </td><th width="60%" align="center">Part II. Appendices</th><td width="20%" align="right"> <a accesskey="n" href="differences.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="scintilla"></a>Appendix B. Using Scintilla with FXRuby</h2></div></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4580"></a>What is Scintilla?</h2></div></div></div><p><a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.scintilla.org" target="_top">Scintilla</a> is a free
|
4
4
|
source code editing component developed by Neil Hodgson for the Win32 and
|
5
|
-
GTK+ platforms.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
5
|
+
GTK+ platforms.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4587"></a>What is FXScintilla?</h2></div></div></div><p><a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://savannah.gnu.org/projects/fxscintilla" target="_top">FXScintilla </a> is
|
6
6
|
a FOX widget that wraps around the Scintilla component, or, if you wish,
|
7
7
|
the FOX "port" of Scintilla. Until recently it was developed by Gilles Filippini,
|
8
8
|
and as of this writing the latest release is available for download from
|
9
|
-
<a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://download.savannah.gnu.org/releases/fxscintilla/fxscintilla-1.71.tar.gz" target="_top">http://download.savannah.gnu.org/releases/fxscintilla/fxscintilla-1.71.tar.gz</a>.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
9
|
+
<a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://download.savannah.gnu.org/releases/fxscintilla/fxscintilla-1.71.tar.gz" target="_top">http://download.savannah.gnu.org/releases/fxscintilla/fxscintilla-1.71.tar.gz</a>.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4597"></a>Compiling FXScintilla</h2></div></div></div><p>The FXScintilla distribution contains everything you need to build
|
10
10
|
the FXScintilla widget and begin using it in your C++-based FOX
|
11
11
|
applications. That is to say, you do not have to separately download the
|
12
12
|
Scintilla source code from the Scintilla home page. When you unpack the
|
@@ -17,7 +17,7 @@
|
|
17
17
|
other open-source software (like FOX) from the source code. The
|
18
18
|
<code class="filename">INSTALL</code> file in the top-level directory should
|
19
19
|
provide enough instruction for you to build and install FXScintilla for
|
20
|
-
either Unix or Microsoft Windows.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
20
|
+
either Unix or Microsoft Windows.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4610"></a>Enabling FXScintilla Support in FXRuby</h2></div></div></div><p>The next step is to build a version of FXRuby (from its source code)
|
21
21
|
with the optional FXScintilla support enabled. If you're working on a Unix
|
22
22
|
or Linux system and have installed FXScintilla in one of the standard
|
23
23
|
installation directories (e.g. under <code class="filename">/usr/include</code> or <code class="filename">/usr/local/include</code>), the regular FXRuby build
|
data/doc/subversion.html
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
<a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://svnbook.red-bean.com/" target="_top">book</a>.</p><p>You're also going to need to have a working <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.swig.org/" target="_top">SWIG</a> installation so that you can
|
15
15
|
generate the C++ source files from the SWIG interface files. As of this
|
16
16
|
writing, FXRuby requires SWIG version 1.3.22; later versions of SWIG will
|
17
|
-
not work, nor will versions earlier than about 1.3.15.</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="
|
17
|
+
not work, nor will versions earlier than about 1.3.15.</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e5626"></a>Checking out the code</h2></div></div></div><p>To check out the development version (i.e. the trunk) for FXRuby,
|
18
18
|
type the following command:</p><pre class="screen">svn checkout svn://rubyforge.org/var/svn/fxruby/trunk/FXRuby</pre><p>Next, you'll need to use SWIG to generate the C++ source code from
|
19
19
|
the SWIG interface files. To do that, type:</p><pre class="screen">rake swig</pre><p>At this point, you should be ready to change to the top-level
|
20
20
|
directory and go through the normal build and installation process, as
|
data/examples/gltest.rb
CHANGED
@@ -21,26 +21,6 @@ class GLTestWindow < FXMainWindow
|
|
21
21
|
# How often our timer will fire (in milliseconds)
|
22
22
|
TIMER_INTERVAL = 100
|
23
23
|
|
24
|
-
# Rotate the boxes when a timer message is received
|
25
|
-
def onTimeout(sender, sel, ptr)
|
26
|
-
@angle += 2.0
|
27
|
-
if @angle > 360.0
|
28
|
-
@angle -= 360.0
|
29
|
-
end
|
30
|
-
drawScene()
|
31
|
-
@timer = getApp().addTimeout(TIMER_INTERVAL, method(:onTimeout))
|
32
|
-
end
|
33
|
-
|
34
|
-
# Rotate the boxes when a chore message is received
|
35
|
-
def onChore(sender, sel, ptr)
|
36
|
-
@angle += 2.0
|
37
|
-
if @angle > 360.0
|
38
|
-
@angle -= 360.0
|
39
|
-
end
|
40
|
-
drawScene()
|
41
|
-
@chore = getApp().addChore(method(:onChore))
|
42
|
-
end
|
43
|
-
|
44
24
|
# Draws a simple box using the given corners
|
45
25
|
def drawBox(xmin, ymin, zmin, xmax, ymax, zmax)
|
46
26
|
GL.Begin(GL::TRIANGLE_STRIP)
|
@@ -250,7 +230,13 @@ class GLTestWindow < FXMainWindow
|
|
250
230
|
spinTimerBtn.padTop, spinTimerBtn.padBottom = 5, 5
|
251
231
|
spinTimerBtn.connect(SEL_COMMAND) do
|
252
232
|
@spinning = true
|
253
|
-
@timer = getApp().addTimeout(TIMER_INTERVAL,
|
233
|
+
@timer = getApp().addTimeout(TIMER_INTERVAL, :repeat => true) do
|
234
|
+
@angle += 2.0
|
235
|
+
if @angle > 360.0
|
236
|
+
@angle -= 360.0
|
237
|
+
end
|
238
|
+
drawScene()
|
239
|
+
end
|
254
240
|
end
|
255
241
|
spinTimerBtn.connect(SEL_UPDATE) do |sender, sel, ptr|
|
256
242
|
@spinning ? sender.disable : sender.enable
|
@@ -265,7 +251,13 @@ class GLTestWindow < FXMainWindow
|
|
265
251
|
spinChoreBtn.padTop, spinChoreBtn.padBottom = 5, 5
|
266
252
|
spinChoreBtn.connect(SEL_COMMAND) do
|
267
253
|
@spinning = true
|
268
|
-
@chore = getApp().addChore(
|
254
|
+
@chore = getApp().addChore(:repeat => true) do
|
255
|
+
@angle += 2.0
|
256
|
+
if @angle > 360.0
|
257
|
+
@angle -= 360.0
|
258
|
+
end
|
259
|
+
drawScene()
|
260
|
+
end
|
269
261
|
end
|
270
262
|
spinChoreBtn.connect(SEL_UPDATE) do |sender, sel, ptr|
|
271
263
|
@spinning ? sender.disable : sender.enable
|
data/examples/imageviewer.rb
CHANGED
@@ -86,7 +86,7 @@ class ImageWindow < FXMainWindow
|
|
86
86
|
# Make file list
|
87
87
|
fileframe = FXHorizontalFrame.new(@filebox,
|
88
88
|
FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y,
|
89
|
-
:padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0
|
89
|
+
:padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0, :hSpacing => 0, :vSpacing => 0)
|
90
90
|
@filelist = FXFileList.new(fileframe,
|
91
91
|
:opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|ICONLIST_MINI_ICONS|ICONLIST_AUTOSIZE)
|
92
92
|
@filelist.connect(SEL_DOUBLECLICKED, method(:onCmdFileList))
|
data/examples/inputs.rb
CHANGED
@@ -54,7 +54,7 @@ class InputHandlerWindow < FXMainWindow
|
|
54
54
|
getApp().addInput(@pipe, INPUT_READ|INPUT_EXCEPT) do |sender, sel, ptr|
|
55
55
|
case FXSELTYPE(sel)
|
56
56
|
when SEL_IO_READ
|
57
|
-
text = @pipe.
|
57
|
+
text = @pipe.read_nonblock(256)
|
58
58
|
if text && text.length > 0
|
59
59
|
@cmdOutput.appendText(text)
|
60
60
|
else
|
data/examples/styledtext.rb
CHANGED
@@ -40,24 +40,14 @@ class StyledTextWindow < FXMainWindow
|
|
40
40
|
TEXT_READONLY|TEXT_WORDWRAP|LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
41
41
|
|
42
42
|
# Construct some hilite styles
|
43
|
-
hs1 = FXHiliteStyle.
|
43
|
+
hs1 = FXHiliteStyle.from_text(text)
|
44
44
|
hs1.normalForeColor = FXColor::Red
|
45
45
|
hs1.normalBackColor = FXColor::Blue
|
46
|
-
hs1.
|
47
|
-
hs1.selectBackColor = text.selBackColor
|
48
|
-
hs1.hiliteForeColor = text.hiliteTextColor
|
49
|
-
hs1.hiliteBackColor = text.hiliteBackColor
|
50
|
-
hs1.activeBackColor = text.activeBackColor
|
51
|
-
hs1.style = 0
|
46
|
+
hs1.style = FXText::STYLE_BOLD
|
52
47
|
|
53
|
-
hs2 = FXHiliteStyle.
|
48
|
+
hs2 = FXHiliteStyle.from_text(text)
|
54
49
|
hs2.normalForeColor = FXColor::Blue
|
55
50
|
hs2.normalBackColor = FXColor::Yellow
|
56
|
-
hs2.selectForeColor = text.selTextColor
|
57
|
-
hs2.selectBackColor = text.selBackColor
|
58
|
-
hs2.hiliteForeColor = text.hiliteTextColor
|
59
|
-
hs2.hiliteBackColor = text.hiliteBackColor
|
60
|
-
hs2.activeBackColor = text.activeBackColor
|
61
51
|
hs2.style = FXText::STYLE_UNDERLINE
|
62
52
|
|
63
53
|
# Enable the style buffer for this text widget
|
data/ext/fox16/FXRuby.cpp
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
***********************************************************************/
|
22
22
|
|
23
23
|
/***********************************************************************
|
24
|
-
* $Id: FXRuby.cpp
|
24
|
+
* $Id: FXRuby.cpp 2689 2007-06-30 04:10:18Z lyle $
|
25
25
|
***********************************************************************/
|
26
26
|
|
27
27
|
#ifdef _MSC_VER
|
@@ -1672,145 +1672,144 @@ FXbool FXRbGLViewer::sortProc(FXfloat*& buffer,FXint& used,FXint& size){
|
|
1672
1672
|
|
1673
1673
|
//----------------------------------------------------------------------
|
1674
1674
|
|
1675
|
-
// Copied from the Ruby 1.
|
1675
|
+
// Copied from the Ruby 1.8.6 sources (signal.c)
|
1676
1676
|
static struct signals {
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1677
|
+
char *signm;
|
1678
|
+
int signo;
|
1679
|
+
} siglist [] = {
|
1680
|
+
{"EXIT", 0},
|
1680
1681
|
#ifdef SIGHUP
|
1681
|
-
{
|
1682
|
-
#endif
|
1683
|
-
#ifdef SIGINT
|
1684
|
-
{ "INT", SIGINT },
|
1682
|
+
{"HUP", SIGHUP},
|
1685
1683
|
#endif
|
1684
|
+
{"INT", SIGINT},
|
1686
1685
|
#ifdef SIGQUIT
|
1687
|
-
{
|
1686
|
+
{"QUIT", SIGQUIT},
|
1688
1687
|
#endif
|
1689
1688
|
#ifdef SIGILL
|
1690
|
-
{
|
1689
|
+
{"ILL", SIGILL},
|
1691
1690
|
#endif
|
1692
1691
|
#ifdef SIGTRAP
|
1693
|
-
{
|
1692
|
+
{"TRAP", SIGTRAP},
|
1694
1693
|
#endif
|
1695
1694
|
#ifdef SIGIOT
|
1696
|
-
{
|
1695
|
+
{"IOT", SIGIOT},
|
1697
1696
|
#endif
|
1698
1697
|
#ifdef SIGABRT
|
1699
|
-
{
|
1698
|
+
{"ABRT", SIGABRT},
|
1700
1699
|
#endif
|
1701
1700
|
#ifdef SIGEMT
|
1702
|
-
{
|
1701
|
+
{"EMT", SIGEMT},
|
1703
1702
|
#endif
|
1704
1703
|
#ifdef SIGFPE
|
1705
|
-
{
|
1704
|
+
{"FPE", SIGFPE},
|
1706
1705
|
#endif
|
1707
1706
|
#ifdef SIGKILL
|
1708
|
-
{
|
1707
|
+
{"KILL", SIGKILL},
|
1709
1708
|
#endif
|
1710
1709
|
#ifdef SIGBUS
|
1711
|
-
{
|
1710
|
+
{"BUS", SIGBUS},
|
1712
1711
|
#endif
|
1713
1712
|
#ifdef SIGSEGV
|
1714
|
-
{
|
1713
|
+
{"SEGV", SIGSEGV},
|
1715
1714
|
#endif
|
1716
1715
|
#ifdef SIGSYS
|
1717
|
-
{
|
1716
|
+
{"SYS", SIGSYS},
|
1718
1717
|
#endif
|
1719
1718
|
#ifdef SIGPIPE
|
1720
|
-
{
|
1719
|
+
{"PIPE", SIGPIPE},
|
1721
1720
|
#endif
|
1722
1721
|
#ifdef SIGALRM
|
1723
|
-
{
|
1722
|
+
{"ALRM", SIGALRM},
|
1724
1723
|
#endif
|
1725
1724
|
#ifdef SIGTERM
|
1726
|
-
{
|
1725
|
+
{"TERM", SIGTERM},
|
1727
1726
|
#endif
|
1728
1727
|
#ifdef SIGURG
|
1729
|
-
{
|
1728
|
+
{"URG", SIGURG},
|
1730
1729
|
#endif
|
1731
1730
|
#ifdef SIGSTOP
|
1732
|
-
{
|
1731
|
+
{"STOP", SIGSTOP},
|
1733
1732
|
#endif
|
1734
1733
|
#ifdef SIGTSTP
|
1735
|
-
{
|
1734
|
+
{"TSTP", SIGTSTP},
|
1736
1735
|
#endif
|
1737
1736
|
#ifdef SIGCONT
|
1738
|
-
{
|
1737
|
+
{"CONT", SIGCONT},
|
1739
1738
|
#endif
|
1740
1739
|
#ifdef SIGCHLD
|
1741
|
-
{
|
1740
|
+
{"CHLD", SIGCHLD},
|
1742
1741
|
#endif
|
1743
1742
|
#ifdef SIGCLD
|
1744
|
-
{
|
1743
|
+
{"CLD", SIGCLD},
|
1745
1744
|
#else
|
1746
1745
|
# ifdef SIGCHLD
|
1747
|
-
{
|
1746
|
+
{"CLD", SIGCHLD},
|
1748
1747
|
# endif
|
1749
1748
|
#endif
|
1750
1749
|
#ifdef SIGTTIN
|
1751
|
-
{
|
1750
|
+
{"TTIN", SIGTTIN},
|
1752
1751
|
#endif
|
1753
1752
|
#ifdef SIGTTOU
|
1754
|
-
{
|
1753
|
+
{"TTOU", SIGTTOU},
|
1755
1754
|
#endif
|
1756
1755
|
#ifdef SIGIO
|
1757
|
-
{
|
1756
|
+
{"IO", SIGIO},
|
1758
1757
|
#endif
|
1759
1758
|
#ifdef SIGXCPU
|
1760
|
-
{
|
1759
|
+
{"XCPU", SIGXCPU},
|
1761
1760
|
#endif
|
1762
1761
|
#ifdef SIGXFSZ
|
1763
|
-
{
|
1762
|
+
{"XFSZ", SIGXFSZ},
|
1764
1763
|
#endif
|
1765
1764
|
#ifdef SIGVTALRM
|
1766
|
-
{
|
1765
|
+
{"VTALRM", SIGVTALRM},
|
1767
1766
|
#endif
|
1768
1767
|
#ifdef SIGPROF
|
1769
|
-
{
|
1768
|
+
{"PROF", SIGPROF},
|
1770
1769
|
#endif
|
1771
1770
|
#ifdef SIGWINCH
|
1772
|
-
{
|
1771
|
+
{"WINCH", SIGWINCH},
|
1773
1772
|
#endif
|
1774
1773
|
#ifdef SIGUSR1
|
1775
|
-
{
|
1774
|
+
{"USR1", SIGUSR1},
|
1776
1775
|
#endif
|
1777
1776
|
#ifdef SIGUSR2
|
1778
|
-
{
|
1777
|
+
{"USR2", SIGUSR2},
|
1779
1778
|
#endif
|
1780
1779
|
#ifdef SIGLOST
|
1781
|
-
{
|
1780
|
+
{"LOST", SIGLOST},
|
1782
1781
|
#endif
|
1783
1782
|
#ifdef SIGMSG
|
1784
|
-
{
|
1783
|
+
{"MSG", SIGMSG},
|
1785
1784
|
#endif
|
1786
1785
|
#ifdef SIGPWR
|
1787
|
-
{
|
1786
|
+
{"PWR", SIGPWR},
|
1788
1787
|
#endif
|
1789
1788
|
#ifdef SIGPOLL
|
1790
|
-
{
|
1789
|
+
{"POLL", SIGPOLL},
|
1791
1790
|
#endif
|
1792
1791
|
#ifdef SIGDANGER
|
1793
|
-
{
|
1792
|
+
{"DANGER", SIGDANGER},
|
1794
1793
|
#endif
|
1795
1794
|
#ifdef SIGMIGRATE
|
1796
|
-
{
|
1795
|
+
{"MIGRATE", SIGMIGRATE},
|
1797
1796
|
#endif
|
1798
1797
|
#ifdef SIGPRE
|
1799
|
-
{
|
1798
|
+
{"PRE", SIGPRE},
|
1800
1799
|
#endif
|
1801
1800
|
#ifdef SIGGRANT
|
1802
|
-
{
|
1801
|
+
{"GRANT", SIGGRANT},
|
1803
1802
|
#endif
|
1804
1803
|
#ifdef SIGRETRACT
|
1805
|
-
{
|
1804
|
+
{"RETRACT", SIGRETRACT},
|
1806
1805
|
#endif
|
1807
1806
|
#ifdef SIGSOUND
|
1808
|
-
{
|
1807
|
+
{"SOUND", SIGSOUND},
|
1809
1808
|
#endif
|
1810
1809
|
#ifdef SIGINFO
|
1811
|
-
{
|
1810
|
+
{"INFO", SIGINFO},
|
1812
1811
|
#endif
|
1813
|
-
{
|
1812
|
+
{NULL, 0}
|
1814
1813
|
};
|
1815
1814
|
|
1816
1815
|
FXint FXRbSignalNameToNumber(const char* s){
|
data/ext/fox16/text_wrap.cpp
CHANGED
@@ -627,25 +627,21 @@ VALUE FXText_findText(FXText *self,FXString const &string,FXint start,FXuint fla
|
|
627
627
|
FXint* beg;
|
628
628
|
FXint* end;
|
629
629
|
VALUE ary=Qnil;
|
630
|
-
|
631
|
-
if(!FXMALLOC(&beg,FXint,
|
630
|
+
FXint ngroups=string.contains('(')+1; // FIXME: is this right?
|
631
|
+
if(!FXMALLOC(&beg,FXint,ngroups)){
|
632
632
|
return Qnil;
|
633
|
-
|
634
|
-
|
635
|
-
if(!FXMALLOC(&end,FXint,npar)){
|
633
|
+
}
|
634
|
+
if(!FXMALLOC(&end,FXint,ngroups)){
|
636
635
|
FXFREE(&beg);
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
if(self->findText(string,beg,end,start,flags,npar)){
|
636
|
+
return Qnil;
|
637
|
+
}
|
638
|
+
if(self->findText(string,beg,end,start,flags,ngroups)){
|
641
639
|
ary=rb_ary_new();
|
642
|
-
|
643
|
-
|
640
|
+
rb_ary_push(ary,FXRbMakeArray(beg,ngroups));
|
641
|
+
rb_ary_push(ary,FXRbMakeArray(end,ngroups));
|
644
642
|
}
|
645
|
-
|
646
643
|
FXFREE(&beg);
|
647
644
|
FXFREE(&end);
|
648
|
-
|
649
645
|
return ary;
|
650
646
|
}
|
651
647
|
void FXText_setHiliteStyles(FXText *self,VALUE styles){
|
data/lib/fox16/aliases.rb
CHANGED
data/lib/fox16/chore.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
module Fox
|
2
|
+
|
2
3
|
class FXApp
|
3
4
|
|
4
5
|
alias addChoreOrig addChore # :nodoc:
|
@@ -26,29 +27,41 @@ module Fox
|
|
26
27
|
#
|
27
28
|
# The last form takes a block:
|
28
29
|
#
|
29
|
-
# app.addChore()
|
30
|
+
# app.addChore() do |sender, sel, data|
|
30
31
|
# ... handle the chore ...
|
31
|
-
#
|
32
|
+
# end
|
32
33
|
#
|
33
34
|
# All of these return a reference to an opaque FXChore instance that
|
34
35
|
# can be passed to #removeChore if it is necessary to remove the chore
|
35
36
|
# before it fires.
|
36
37
|
#
|
38
|
+
# For the last two forms, you can pass in the optional +:repeat+ parameter to
|
39
|
+
# cause the chore to be re-registered after it fires, e.g.
|
40
|
+
#
|
41
|
+
# chore = app.addChore(:repeat => true) do |sender, sel, data|
|
42
|
+
# ... handle the chore ...
|
43
|
+
# ... re-add the chore ...
|
44
|
+
# end
|
45
|
+
#
|
37
46
|
def addChore(*args, &block)
|
47
|
+
params = {}
|
48
|
+
params = args.pop if args.last.is_a? Hash
|
38
49
|
tgt, sel = nil, 0
|
39
50
|
if args.length > 0
|
40
51
|
if args[0].respond_to? :call
|
41
|
-
tgt = FXPseudoTarget.new
|
42
|
-
|
52
|
+
tgt = params[:target] || FXPseudoTarget.new
|
53
|
+
tgt.pconnect(SEL_CHORE, args[0], params)
|
43
54
|
else
|
44
|
-
|
55
|
+
tgt, sel = args[0], args[1]
|
45
56
|
end
|
46
57
|
else
|
47
|
-
tgt = FXPseudoTarget.new
|
48
|
-
|
58
|
+
tgt = params[:target] || FXPseudoTarget.new
|
59
|
+
tgt.pconnect(SEL_CHORE, block, params)
|
49
60
|
end
|
50
61
|
addChoreOrig(tgt, sel)
|
51
|
-
|
62
|
+
params[:target] = tgt
|
63
|
+
params[:selector] = sel
|
64
|
+
params
|
52
65
|
end
|
53
66
|
|
54
67
|
#
|
@@ -60,8 +73,8 @@ module Fox
|
|
60
73
|
if args.length == 2
|
61
74
|
removeChoreOrig(args[0], args[1])
|
62
75
|
else
|
63
|
-
|
64
|
-
removeChoreOrig(
|
76
|
+
params = args[0]
|
77
|
+
removeChoreOrig(params[:target], params[:selector])
|
65
78
|
end
|
66
79
|
end
|
67
80
|
|
@@ -87,5 +100,6 @@ module Fox
|
|
87
100
|
end
|
88
101
|
end
|
89
102
|
|
90
|
-
end
|
91
|
-
|
103
|
+
end # class FXApp
|
104
|
+
|
105
|
+
end # module Fox
|