fxruby 1.4.6 → 1.4.7
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/apes02.html +6 -6
- data/doc/apes03.html +11 -11
- data/doc/book.html +1 -1
- data/doc/build.html +63 -63
- data/doc/ch03s02.html +7 -7
- data/doc/ch03s03.html +18 -18
- data/doc/ch03s04.html +11 -11
- data/doc/ch03s05.html +14 -14
- data/doc/ch04s02.html +14 -14
- data/doc/ch04s03.html +15 -15
- data/doc/ch04s04.html +28 -28
- data/doc/ch05s02.html +49 -49
- data/doc/ch05s03.html +8 -8
- data/doc/changes.html +176 -176
- data/doc/clipboardtut.html +11 -11
- data/doc/cvs.html +10 -10
- data/doc/differences.html +4 -4
- data/doc/dragdroptut.html +50 -50
- data/doc/events.html +11 -11
- data/doc/examples.html +47 -47
- data/doc/gems.html +37 -37
- data/doc/goals.html +4 -4
- data/doc/images/iconlist-bigicons.png +0 -0
- data/doc/images/iconlist-details.png +0 -0
- data/doc/implementation.html +4 -4
- data/doc/infosources.html +6 -6
- data/doc/library.html +19 -19
- data/doc/opengl.html +31 -31
- data/doc/pt01.html +1 -1
- data/doc/pt02.html +1 -1
- data/doc/scintilla.html +15 -15
- data/doc/todo.html +5 -5
- data/doc/tutorial1.html +34 -34
- data/examples/dilbert.rb +1 -1
- data/ext/fox14/FXRbApp.cpp +1 -1
- data/ext/fox14/FXRbDataTarget.cpp +1 -1
- data/ext/fox14/FXRbGLViewer.cpp +1 -1
- data/ext/fox14/FXRuby.cpp +1 -1
- data/ext/fox14/core_wrap.cpp +0 -12
- data/ext/fox14/dialogs_wrap.cpp +43 -19
- data/ext/fox14/frames_wrap.cpp +1130 -308
- data/ext/fox14/fx3d_wrap.cpp +38 -13
- data/ext/fox14/icons_wrap.cpp +24 -6
- data/ext/fox14/image_wrap.cpp +24 -6
- data/ext/fox14/include/FXMemoryBuffer.h +1 -1
- data/ext/fox14/include/FXRb4Splitter.h +1 -1
- data/ext/fox14/include/FXRb7Segment.h +1 -1
- data/ext/fox14/include/FXRbAccelTable.h +1 -1
- data/ext/fox14/include/FXRbApp.h +1 -1
- data/ext/fox14/include/FXRbArrowButton.h +1 -1
- data/ext/fox14/include/FXRbBMPIcon.h +1 -1
- data/ext/fox14/include/FXRbBMPImage.h +1 -1
- data/ext/fox14/include/FXRbBitmap.h +1 -1
- data/ext/fox14/include/FXRbBitmapFrame.h +1 -1
- data/ext/fox14/include/FXRbBitmapView.h +1 -1
- data/ext/fox14/include/FXRbButton.h +1 -1
- data/ext/fox14/include/FXRbCURCursor.h +1 -1
- data/ext/fox14/include/FXRbCanvas.h +1 -1
- data/ext/fox14/include/FXRbCheckButton.h +1 -1
- data/ext/fox14/include/FXRbChoiceBox.h +1 -1
- data/ext/fox14/include/FXRbColorBar.h +1 -1
- data/ext/fox14/include/FXRbColorDialog.h +1 -1
- data/ext/fox14/include/FXRbColorSelector.h +1 -1
- data/ext/fox14/include/FXRbColorWell.h +1 -1
- data/ext/fox14/include/FXRbColorWheel.h +1 -1
- data/ext/fox14/include/FXRbComboBox.h +1 -1
- data/ext/fox14/include/FXRbCommon.h +1 -1
- data/ext/fox14/include/FXRbComposite.h +1 -1
- data/ext/fox14/include/FXRbCursor.h +1 -1
- data/ext/fox14/include/FXRbDC.h +1 -1
- data/ext/fox14/include/FXRbDCPrint.h +1 -1
- data/ext/fox14/include/FXRbDCWindow.h +1 -1
- data/ext/fox14/include/FXRbDataTarget.h +1 -1
- data/ext/fox14/include/FXRbDebugTarget.h +1 -1
- data/ext/fox14/include/FXRbDelegator.h +1 -1
- data/ext/fox14/include/FXRbDial.h +1 -1
- data/ext/fox14/include/FXRbDialogBox.h +1 -1
- data/ext/fox14/include/FXRbDict.h +1 -1
- data/ext/fox14/include/FXRbDirBox.h +1 -1
- data/ext/fox14/include/FXRbDirDialog.h +1 -1
- data/ext/fox14/include/FXRbDirList.h +1 -1
- data/ext/fox14/include/FXRbDirSelector.h +1 -1
- data/ext/fox14/include/FXRbDockBar.h +1 -1
- data/ext/fox14/include/FXRbDockHandler.h +1 -1
- data/ext/fox14/include/FXRbDockSite.h +1 -1
- data/ext/fox14/include/FXRbDockTitle.h +1 -1
- data/ext/fox14/include/FXRbDocument.h +1 -1
- data/ext/fox14/include/FXRbDragCorner.h +1 -1
- data/ext/fox14/include/FXRbDrawable.h +1 -1
- data/ext/fox14/include/FXRbDriveBox.h +1 -1
- data/ext/fox14/include/FXRbFileDialog.h +1 -1
- data/ext/fox14/include/FXRbFileDict.h +1 -1
- data/ext/fox14/include/FXRbFileList.h +1 -1
- data/ext/fox14/include/FXRbFileSelector.h +1 -1
- data/ext/fox14/include/FXRbFoldingList.h +1 -1
- data/ext/fox14/include/FXRbFont.h +1 -1
- data/ext/fox14/include/FXRbFontDialog.h +1 -1
- data/ext/fox14/include/FXRbFontSelector.h +1 -1
- data/ext/fox14/include/FXRbFrame.h +1 -1
- data/ext/fox14/include/FXRbGIFCursor.h +1 -1
- data/ext/fox14/include/FXRbGIFIcon.h +1 -1
- data/ext/fox14/include/FXRbGIFImage.h +1 -1
- data/ext/fox14/include/FXRbGLCanvas.h +1 -1
- data/ext/fox14/include/FXRbGLContext.h +1 -1
- data/ext/fox14/include/FXRbGLObject.h +1 -1
- data/ext/fox14/include/FXRbGLShape.h +1 -1
- data/ext/fox14/include/FXRbGLViewer.h +1 -1
- data/ext/fox14/include/FXRbGLVisual.h +1 -1
- data/ext/fox14/include/FXRbGradientBar.h +1 -1
- data/ext/fox14/include/FXRbGroupBox.h +1 -1
- data/ext/fox14/include/FXRbHeader.h +1 -1
- data/ext/fox14/include/FXRbHorizontalFrame.h +1 -1
- data/ext/fox14/include/FXRbICOIcon.h +1 -1
- data/ext/fox14/include/FXRbICOImage.h +1 -1
- data/ext/fox14/include/FXRbIcon.h +1 -1
- data/ext/fox14/include/FXRbIconList.h +1 -1
- data/ext/fox14/include/FXRbIconSource.h +1 -1
- data/ext/fox14/include/FXRbId.h +1 -1
- data/ext/fox14/include/FXRbImage.h +1 -1
- data/ext/fox14/include/FXRbImageFrame.h +1 -1
- data/ext/fox14/include/FXRbImageView.h +1 -1
- data/ext/fox14/include/FXRbInputDialog.h +1 -1
- data/ext/fox14/include/FXRbJPGIcon.h +1 -1
- data/ext/fox14/include/FXRbJPGImage.h +1 -1
- data/ext/fox14/include/FXRbLabel.h +1 -1
- data/ext/fox14/include/FXRbList.h +1 -1
- data/ext/fox14/include/FXRbListBox.h +1 -1
- data/ext/fox14/include/FXRbMDIButton.h +1 -1
- data/ext/fox14/include/FXRbMDIChild.h +1 -1
- data/ext/fox14/include/FXRbMDIClient.h +1 -1
- data/ext/fox14/include/FXRbMainWindow.h +1 -1
- data/ext/fox14/include/FXRbMatrix.h +1 -1
- data/ext/fox14/include/FXRbMenuBar.h +1 -1
- data/ext/fox14/include/FXRbMenuButton.h +1 -1
- data/ext/fox14/include/FXRbMenuCaption.h +1 -1
- data/ext/fox14/include/FXRbMenuCascade.h +1 -1
- data/ext/fox14/include/FXRbMenuCheck.h +1 -1
- data/ext/fox14/include/FXRbMenuCommand.h +1 -1
- data/ext/fox14/include/FXRbMenuPane.h +1 -1
- data/ext/fox14/include/FXRbMenuRadio.h +1 -1
- data/ext/fox14/include/FXRbMenuSeparator.h +1 -1
- data/ext/fox14/include/FXRbMenuTitle.h +1 -1
- data/ext/fox14/include/FXRbMessageBox.h +1 -1
- data/ext/fox14/include/FXRbObject.h +1 -1
- data/ext/fox14/include/FXRbOptionMenu.h +1 -1
- data/ext/fox14/include/FXRbPCXIcon.h +1 -1
- data/ext/fox14/include/FXRbPCXImage.h +1 -1
- data/ext/fox14/include/FXRbPNGIcon.h +1 -1
- data/ext/fox14/include/FXRbPNGImage.h +1 -1
- data/ext/fox14/include/FXRbPPMIcon.h +1 -1
- data/ext/fox14/include/FXRbPPMImage.h +1 -1
- data/ext/fox14/include/FXRbPacker.h +1 -1
- data/ext/fox14/include/FXRbPicker.h +1 -1
- data/ext/fox14/include/FXRbPopup.h +1 -1
- data/ext/fox14/include/FXRbPrintDialog.h +1 -1
- data/ext/fox14/include/FXRbProgressBar.h +1 -1
- data/ext/fox14/include/FXRbProgressDialog.h +1 -1
- data/ext/fox14/include/FXRbRGBIcon.h +1 -1
- data/ext/fox14/include/FXRbRGBImage.h +1 -1
- data/ext/fox14/include/FXRbRadioButton.h +1 -1
- data/ext/fox14/include/FXRbRealSlider.h +1 -1
- data/ext/fox14/include/FXRbRealSpinner.h +1 -1
- data/ext/fox14/include/FXRbRecentFiles.h +1 -1
- data/ext/fox14/include/FXRbRegistry.h +1 -1
- data/ext/fox14/include/FXRbReplaceDialog.h +1 -1
- data/ext/fox14/include/FXRbRootWindow.h +1 -1
- data/ext/fox14/include/FXRbRuler.h +1 -1
- data/ext/fox14/include/FXRbScintilla.h +1 -1
- data/ext/fox14/include/FXRbScrollArea.h +1 -1
- data/ext/fox14/include/FXRbScrollBar.h +1 -1
- data/ext/fox14/include/FXRbScrollPane.h +1 -1
- data/ext/fox14/include/FXRbScrollWindow.h +1 -1
- data/ext/fox14/include/FXRbSearchDialog.h +1 -1
- data/ext/fox14/include/FXRbSeparator.h +1 -1
- data/ext/fox14/include/FXRbSettings.h +1 -1
- data/ext/fox14/include/FXRbShell.h +1 -1
- data/ext/fox14/include/FXRbShutter.h +1 -1
- data/ext/fox14/include/FXRbSlider.h +1 -1
- data/ext/fox14/include/FXRbSpinner.h +1 -1
- data/ext/fox14/include/FXRbSplashWindow.h +1 -1
- data/ext/fox14/include/FXRbSplitter.h +1 -1
- data/ext/fox14/include/FXRbSpring.h +1 -1
- data/ext/fox14/include/FXRbStatusBar.h +1 -1
- data/ext/fox14/include/FXRbStatusLine.h +1 -1
- data/ext/fox14/include/FXRbStream.h +1 -1
- data/ext/fox14/include/FXRbStringDict.h +1 -1
- data/ext/fox14/include/FXRbSwitcher.h +1 -1
- data/ext/fox14/include/FXRbTGAIcon.h +1 -1
- data/ext/fox14/include/FXRbTGAImage.h +1 -1
- data/ext/fox14/include/FXRbTIFIcon.h +1 -1
- data/ext/fox14/include/FXRbTIFImage.h +1 -1
- data/ext/fox14/include/FXRbTabBar.h +1 -1
- data/ext/fox14/include/FXRbTabBook.h +1 -1
- data/ext/fox14/include/FXRbTabItem.h +1 -1
- data/ext/fox14/include/FXRbTable.h +1 -1
- data/ext/fox14/include/FXRbText.h +1 -1
- data/ext/fox14/include/FXRbTextField.h +1 -1
- data/ext/fox14/include/FXRbToggleButton.h +1 -1
- data/ext/fox14/include/FXRbToolBar.h +1 -1
- data/ext/fox14/include/FXRbToolBarGrip.h +1 -1
- data/ext/fox14/include/FXRbToolBarShell.h +1 -1
- data/ext/fox14/include/FXRbToolBarTab.h +1 -1
- data/ext/fox14/include/FXRbToolTip.h +1 -1
- data/ext/fox14/include/FXRbTopWindow.h +1 -1
- data/ext/fox14/include/FXRbTreeList.h +1 -1
- data/ext/fox14/include/FXRbTreeListBox.h +1 -1
- data/ext/fox14/include/FXRbTriStateButton.h +1 -1
- data/ext/fox14/include/FXRbVerticalFrame.h +1 -1
- data/ext/fox14/include/FXRbVisual.h +1 -1
- data/ext/fox14/include/FXRbWindow.h +1 -1
- data/ext/fox14/include/FXRbWizard.h +1 -1
- data/ext/fox14/include/FXRbXBMIcon.h +1 -1
- data/ext/fox14/include/FXRbXBMImage.h +1 -1
- data/ext/fox14/include/FXRbXPMIcon.h +1 -1
- data/ext/fox14/include/FXRbXPMImage.h +1 -1
- data/ext/fox14/include/FXRuby.h +1 -1
- data/ext/fox14/label_wrap.cpp +23 -8
- data/ext/fox14/markfuncs.cpp +8 -1
- data/ext/fox14/mdi_wrap.cpp +47 -17
- data/ext/fox14/menu_wrap.cpp +34 -10
- data/ext/fox14/scintilla_wrap.cpp +31 -7
- data/ext/fox14/table_wrap.cpp +31 -7
- data/ext/fox14/text_wrap.cpp +31 -7
- data/ext/fox14/treelist_wrap.cpp +31 -7
- data/ext/fox14/ui_wrap.cpp +497 -154
- data/ext/fox14/unregisterOwnedObjects.cpp +1 -1
- data/lib/fox14/aliases.rb +3 -3
- data/lib/fox14/colors.rb +282 -282
- data/lib/fox14/core.rb +7 -0
- data/lib/fox14/splashscreen.rb +83 -83
- data/lib/fox14/version.rb +1 -1
- data/rdoc-sources/FX4Splitter.rb +138 -138
- data/rdoc-sources/FXFoldingList.rb +2 -2
- data/rdoc-sources/FXQuatd.rb +171 -1
- data/rdoc-sources/FXQuatf.rb +175 -1
- data/rdoc-sources/FXWindow.rb +0 -3
- data/tests/TC_FXComboBox.rb +10 -1
- data/tests/TC_FXDirList.rb +1 -1
- data/tests/TC_FXGLViewer.rb +2 -0
- data/tests/TC_FXHeader.rb +1 -1
- data/tests/TC_FXIconList.rb +1 -1
- data/tests/TC_FXId.rb +1 -1
- data/tests/TC_FXListBox.rb +1 -1
- data/tests/TC_FXMenuCommand.rb +0 -14
- data/tests/TC_FXTable.rb +0 -32
- data/tests/TC_FXTableItem.rb +1 -1
- data/tests/TC_FXTreeList.rb +1 -1
- data/tests/TC_FXTreeListBox.rb +1 -1
- data/web/top.html +15 -15
- metadata +2 -3
- data/ChangeLog +0 -11094
data/doc/gems.html
CHANGED
@@ -1,73 +1,73 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Chapter 2. Installing from Gems</title><meta name="generator" content="DocBook XSL Stylesheets V1.
|
3
|
+
<title>Chapter 2. Installing from Gems</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt01.html" title="Part I. The Basics"><link rel="prev" href="build.html" title="Chapter 1. Building from Source Code"><link rel="next" href="tutorial1.html" title="Chapter 3. Hello, World!"></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 2. Installing from Gems</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="build.html">Prev</a> </td><th width="60%" align="center">Part I. The Basics</th><td width="20%" align="right"> <a accesskey="n" href="tutorial1.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="gems"></a>Chapter 2. Installing from Gems</h2></div></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e413"></a>Introduction</h2></div></div></div><p>Starting with FXRuby version 1.2, FXRuby uses <a href="http://rubygems.rubyforge.org" target="_top">RubyGems</a> as its packaging and
|
4
4
|
distribution method. The code is available both as</p><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>a "source" gem, which contains source code that must be compiled
|
5
5
|
on your computer before it's installed; and,</p></li><li style="list-style-type: disc"><p>a "binary" gem, which contains a precompiled version of the code
|
6
|
-
for a specific operating system (such as Windows).</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e428"></a>Installing from a Source Gem</h2></div></div
|
7
|
-
typing:</p><
|
6
|
+
for a specific operating system (such as Windows).</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e428"></a>Installing from a Source Gem</h2></div></div></div><p>If you've already downloaded the source gem, you can install it by
|
7
|
+
typing:</p><pre class="screen">$ <span><strong class="command">sudo gem install fxruby-1.4.0.gem</strong></span></pre><p>Note the use of the <span><strong class="command">sudo</strong></span> command to invoke
|
8
8
|
superuser privileges, since you'll typically need superuser privileges to
|
9
9
|
install the library files. By default, the source gem will look for your
|
10
10
|
FOX (and optionally, FXScintilla) installation in a few standard places,
|
11
|
-
such as the <
|
12
|
-
<
|
11
|
+
such as the <code class="filename">/usr</code>, <code class="filename">/usr/local</code> and
|
12
|
+
<code class="filename">/sw</code> directories. If you've installed those libraries
|
13
13
|
under some other directory (for example, in your home directory) you might
|
14
|
-
need to pass some additional arguments on the command line, e.g.</p><
|
15
|
-
type something like:</p><
|
14
|
+
need to pass some additional arguments on the command line, e.g.</p><pre class="screen">$ <span><strong class="command">sudo gem install fxruby-1.4.0.gem --force -- --with-fox-include=/home/lyle/include/fox-1.4 --with-fox-lib=/home/lyle/lib</strong></span></pre><p>If you're installing a source gem on a Windows box, you'd instead
|
15
|
+
type something like:</p><pre class="screen">C:\> <span><strong class="command">gem install fxruby-1.4.0.gem --force -- --with-fox-include=C:\include\fox-1.4 --with-fox-lib=C:\lib</strong></span></pre><p>If you're installing a source gem, it can take quite awhile to build
|
16
16
|
FXRuby, so this might be a good time to take a coffee break. You won't see
|
17
17
|
any compiler output appear on the screen while the gem is compiling, but
|
18
18
|
rest assured that the output is being saved into the
|
19
|
-
<
|
20
|
-
probably fire up <
|
21
|
-
gem once the installation is complete:</p><
|
22
|
-
irb(main):001:0> <
|
19
|
+
<code class="filename">gem_make.out</code> file.</p><p>As a quick sanity check, to make sure that all is well, you should
|
20
|
+
probably fire up <code class="filename">irb</code> and try to require the FXRuby
|
21
|
+
gem once the installation is complete:</p><pre class="screen">$ <span><strong class="command">irb</strong></span>
|
22
|
+
irb(main):001:0> <strong class="userinput"><code><span><strong class="command">require 'rubygems'</strong></span></code></strong>
|
23
23
|
trues
|
24
|
-
irb(main):002:0> <
|
25
|
-
true</pre
|
24
|
+
irb(main):002:0> <span><strong class="command">require 'fox14'</strong></span>
|
25
|
+
true</pre><p>If the import failed (usually with a message along the lines of
|
26
26
|
"Cannot load library"), first check the "Things That Can Go Wrong" section
|
27
27
|
of this chapter. If that doesn't help, drop me an e-mail or ask around on
|
28
28
|
the Ruby newsgroup or mailing list; it's quite likely that someone else
|
29
29
|
has run into this problem too. Once you do have a working FXRuby
|
30
|
-
installation, you're ready to check out the example programs.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e485"></a>Installing from a Binary Gem</h2></div></div
|
31
|
-
probably fire up <
|
32
|
-
gem once the installation is complete:</p><
|
33
|
-
irb(main):001:0> <
|
30
|
+
installation, you're ready to check out the example programs.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e485"></a>Installing from a Binary Gem</h2></div></div></div><p>To install a binary gem for Windows, just type:</p><pre class="screen">C:\> <span><strong class="command">gem install fxruby-1.4.0-mswin32.gem</strong></span></pre><p>As a quick sanity check, to make sure that all is well, you should
|
31
|
+
probably fire up <code class="filename">irb</code> and try to require the FXRuby
|
32
|
+
gem once the installation is complete:</p><pre class="screen">C:\> <span><strong class="command">irb</strong></span>
|
33
|
+
irb(main):001:0> <strong class="userinput"><code><span><strong class="command">require 'rubygems'</strong></span></code></strong>
|
34
34
|
true
|
35
|
-
irb(main):002:0> <
|
36
|
-
true</pre
|
35
|
+
irb(main):002:0> <span><strong class="command">require 'fox14'</strong></span>
|
36
|
+
true</pre><p>If the import failed (usually with a message along the lines of
|
37
37
|
"Cannot load library"), first check the "Things That Can Go Wrong" section
|
38
38
|
of this chapter. If that doesn't help, drop me an e-mail or ask around on
|
39
39
|
the Ruby newsgroup or mailing list; it's quite likely that someone else
|
40
40
|
has run into this problem too. Once you do have a working FXRuby
|
41
|
-
installation, you're ready to check out the example programs.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e513"></a>Things That Can Go Wrong</h2></div></div
|
41
|
+
installation, you're ready to check out the example programs.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e513"></a>Things That Can Go Wrong</h2></div></div></div><p><span class="emphasis"><em>"Cannot load library"</em></span></p><p>On Linux and other Unix systems that support shared libraries, FOX
|
42
42
|
is typically installed as a shared library named
|
43
|
-
<
|
43
|
+
<code class="filename">libFOX-1.4.so</code>. After all of the source files for
|
44
44
|
FXRuby are compiled, the last step is to link all of the FXRuby object
|
45
45
|
files together with the FOX library (and possibly other system libraries)
|
46
46
|
to produce a new shared object that Ruby can import as an extension
|
47
47
|
module.</p><p>There are a few things that can go wrong when you try to import this
|
48
48
|
extension into Ruby. A common problem is that the operating system cannot
|
49
|
-
locate the FOX shared library (<
|
49
|
+
locate the FOX shared library (<code class="filename">libFOX-1.4.so</code>) when it
|
50
50
|
tries to dynamically load the FXRuby extension module; when this happens,
|
51
|
-
the error message will look something like:</p><
|
52
|
-
irb(main):001:0> <
|
51
|
+
the error message will look something like:</p><pre class="screen">$ <span><strong class="command">irb</strong></span>
|
52
|
+
irb(main):001:0> <strong class="userinput"><code>require 'fox'</code></strong>
|
53
53
|
LoadError: libFOX-0.99.so.173: cannot open shared object file: No such file or directory - /usr/local/lib/ruby/1.8/i686-linux/fox.so
|
54
54
|
from (irb):1:in 'require'
|
55
55
|
from (irb):1
|
56
|
-
</pre
|
56
|
+
</pre><p>Note that the wording of this error message may be slightly
|
57
57
|
different, depending on your operating environment. One workaround for
|
58
|
-
this problem is to modify the <
|
58
|
+
this problem is to modify the <code class="constant">LD_LIBRARY_PATH</code>
|
59
59
|
environment variable to include the directory where
|
60
|
-
<
|
61
|
-
<
|
62
|
-
$ <
|
63
|
-
irb(main):001:0> <
|
64
|
-
</pre
|
65
|
-
<
|
60
|
+
<code class="filename">libFOX-1.4.so</code> is installed. For example, if
|
61
|
+
<code class="filename">libFOX-1.4.so</code> is installed in <code class="filename">/usr/local/lib</code>, try setting:</p><pre class="screen">$ <span><strong class="command">export LD_LIBRARY_PATH=/usr/local/lib</strong></span>
|
62
|
+
$ <span><strong class="command">irb</strong></span>
|
63
|
+
irb(main):001:0> <strong class="userinput"><code>require 'fox14'</code></strong>
|
64
|
+
</pre><p>If this works, you can of course permanently add the
|
65
|
+
<code class="constant">LD_LIBRARY_PATH</code> setting to your login file(s) so that
|
66
66
|
you don't have to remember to type it each time. Another approach that
|
67
67
|
should work for Linux is to modify your
|
68
|
-
<
|
69
|
-
directory (e.g. <
|
70
|
-
this instead, you'll need to (as root):</p><div class="orderedlist"><ol type="1" compact><li><p>Edit your <
|
71
|
-
directory where <
|
72
|
-
and,</p></li><li><p>At the shell prompt, type <
|
68
|
+
<code class="filename">/etc/ld.so.conf</code> file to include the installation
|
69
|
+
directory (e.g. <code class="filename">/usr/local/lib</code>). If you'd like to do
|
70
|
+
this instead, you'll need to (as root):</p><div class="orderedlist"><ol type="1" compact><li><p>Edit your <code class="filename">/etc/ld.so.conf</code> file and add the
|
71
|
+
directory where <code class="filename">libFOX.so</code> is installed;
|
72
|
+
and,</p></li><li><p>At the shell prompt, type <span><strong class="command">ldconfig</strong></span> to reload
|
73
73
|
the linker configuration.</p></li></ol></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="build.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="tutorial1.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 1. Building from Source Code </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. Hello, World!</td></tr></table></div></body></html>
|
data/doc/goals.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>History and Goals</title><meta name="generator" content="DocBook XSL Stylesheets V1.
|
3
|
+
<title>History and Goals</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt01.html" title="Part I. The Basics"><link rel="prev" href="pt01.html" title="Part I. The Basics"><link rel="next" href="build.html" title="Chapter 1. Building from Source Code"></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">History and Goals</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pt01.html">Prev</a> </td><th width="60%" align="center">Part I. The Basics</th><td width="20%" align="right"> <a accesskey="n" href="build.html">Next</a></td></tr></table><hr></div><div class="preface" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="goals"></a>History and Goals</h2></div></div></div><p>The primary goal of this project was (and is) to provide a complete
|
4
4
|
interface to <a href="http://www.fox-toolkit.com" target="_top">FOX</a> from
|
5
5
|
<a href="http://www.ruby-lang.org" target="_top">Ruby</a>. Ruby programs should
|
6
6
|
be able to access FOX classes transparently; this includes deriving new
|
@@ -29,9 +29,9 @@
|
|
29
29
|
<a href="http://www.rubyconf.org/2001/talks/lyle/lylefox.htm" target="_top">
|
30
30
|
"Developing GUIs with FOX and Ruby"</a> at the first annual Ruby
|
31
31
|
Conference in Tampa, Florida.</p></li><li style="list-style-type: disc"><p>Although the lack of documentation has been a sore spot for
|
32
|
-
some time, several Ruby books (such as the <
|
33
|
-
Ruby Developer's Guide</
|
34
|
-
Way</
|
32
|
+
some time, several Ruby books (such as the <em class="citetitle">
|
33
|
+
Ruby Developer's Guide</em> and <em class="citetitle">The Ruby
|
34
|
+
Way</em>) feature FXRuby as a Ruby GUI development option.</p></li></ul></div><p>Most recently, work has focused on keeping FXRuby up-to-date with the
|
35
35
|
still evolving FOX library while looking for new ways to make Ruby GUI
|
36
36
|
development fun. For example, FXRuby is under consideration for use as a
|
37
37
|
GUI front-end to the fledgling <a href="http://freeride.rubyforge.org/wiki/wiki.pl" target="_top">
|
Binary file
|
Binary file
|
data/doc/implementation.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>Appendix E. Implementation</title><meta name="generator" content="DocBook XSL Stylesheets V1.
|
3
|
+
<title>Appendix E. Implementation</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt02.html" title="Part II. Appendices"><link rel="prev" href="library.html" title="Appendix D. The FXRuby Standard Library"><link rel="next" href="apes02.html" title="Object Life Cycles and Garbage Collection"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix E. Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="library.html">Prev</a> </td><th width="60%" align="center">Part II. Appendices</th><td width="20%" align="right"> <a accesskey="n" href="apes02.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="implementation"></a>Appendix E. Implementation</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="implementation.html#d0e4514">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#d0e4552">GL Objects</a></span></dt></dl></dd><dt><span class="section"><a href="apes03.html">Virtual Functions</a></span></dt></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4514"></a>Code Generation</h2></div></div></div><p>The development and maintenance of FXRuby would be almost impossible
|
4
4
|
without the help of Dave Beazley's excellent
|
5
5
|
<a href="http://www.swig.org" target="_top">SWIG</a>. The complete set of SWIG
|
6
6
|
interface files used to generate FXRuby is included in the standard
|
@@ -10,7 +10,7 @@
|
|
10
10
|
to check out that version from the SWIG CVS repository. For instructions
|
11
11
|
on how to do so, please see <a href="http://www.swig.org/cvs.html" target="_top">
|
12
12
|
this page</a>.</p><p>To regenerate the FXRuby sources from the SWIG interface files,
|
13
|
-
change directories to the <
|
14
|
-
</
|
15
|
-
</
|
13
|
+
change directories to the <code class="filename">swig-interfaces
|
14
|
+
</code> subdirectory of the FXRuby source tree and type <span><strong class="command">make
|
15
|
+
</strong></span>. Any time that you make a change to the SWIG interface files,
|
16
16
|
you'll need to repeat this step to update the C++ sources.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="library.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apes02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix D. The FXRuby Standard Library </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Object Life Cycles and Garbage Collection</td></tr></table></div></body></html>
|
data/doc/infosources.html
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Chapter 9. Other Sources of Information</title><meta name="generator" content="DocBook XSL Stylesheets V1.
|
4
|
-
but the following Ruby books contain sections on FXRuby:</p><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p><
|
5
|
-
Fulton.</p></li><li style="list-style-type: disc"><p><
|
6
|
-
by Michael Neumann, Robert Feldt and Lyle Johnson.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2325"></a>Reference Documentation</h2></div></div
|
3
|
+
<title>Chapter 9. Other Sources of Information</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt01.html" title="Part I. The Basics"><link rel="prev" href="todo.html" title="Chapter 8. To-do list"><link rel="next" href="changes.html" title="Chapter 10. Change History"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 9. Other Sources of Information</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="todo.html">Prev</a> </td><th width="60%" align="center">Part I. The Basics</th><td width="20%" align="right"> <a accesskey="n" href="changes.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="infosources"></a>Chapter 9. Other Sources of Information</h2></div></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2309"></a>Books</h2></div></div></div><p>There are no books entirely dedicated to programming with FXRuby,
|
4
|
+
but the following Ruby books contain sections on FXRuby:</p><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p><em class="citetitle">The Ruby Way</em>, by Hal
|
5
|
+
Fulton.</p></li><li style="list-style-type: disc"><p><em class="citetitle">Ruby Developer's Guide</em>,
|
6
|
+
by Michael Neumann, Robert Feldt and Lyle Johnson.</p></li></ul></div></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2325"></a>Reference Documentation</h2></div></div></div><p>The current <a href="http://www.fxruby.org/1.2/doc/api" target="_top">FXRuby API
|
7
7
|
Reference Documentation</a> is a work in progress, but serves as a
|
8
8
|
pretty good guide to the available methods and attributes for the
|
9
9
|
different classes. The regular <a href="http://www.fox-toolkit.net/foxdoc-1.2" target="_top">FOX 1.2 API
|
10
10
|
Reference Documentation</a> can be used as a fallback source of
|
11
|
-
information, although it is intended for users of the C++ library.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2336"></a>Web Sites</h2></div></div
|
11
|
+
information, although it is intended for users of the C++ library.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2336"></a>Web Sites</h2></div></div></div><p>The <a href="http://www.fox-toolkit.com" target="_top">FOX toolkit home page</a>
|
12
12
|
is still one of the best places to find information about GUI programming
|
13
13
|
with FOX. This is the site maintained by Jeroen van der Zijp, the creator
|
14
14
|
and primary developer of FOX, and serves as the official download site for
|
@@ -19,7 +19,7 @@
|
|
19
19
|
a little more scattered but tends to be more up-to-date than some
|
20
20
|
information on the main FOX site. This site includes a number of tutorial
|
21
21
|
articles, as well as "cookbook" and "how-to" pages on many
|
22
|
-
topics.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2347"></a>Mailing Lists</h2></div></div
|
22
|
+
topics.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e2347"></a>Mailing Lists</h2></div></div></div><p>One or more of the following mailing lists may be of interest:</p><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>The fxruby-announce@rubyforge.org mailing list is a very
|
23
23
|
low-volume list for FXRuby-related announcements. To subscribe to this
|
24
24
|
list, follow the instructions at <a href="http://rubyforge.org/mailman/listinfo/fxruby-announce" target="_top">http://rubyforge.org/mailman/listinfo/fxruby-announce</a></p></li><li style="list-style-type: disc"><p>The fxruby-users@rubyforge.org mailing list is a
|
25
25
|
higher-volume list for FXRuby-related discussions. To subscribe to
|
data/doc/library.html
CHANGED
@@ -1,30 +1,30 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Appendix D. The FXRuby Standard Library</title><meta name="generator" content="DocBook XSL Stylesheets V1.
|
3
|
+
<title>Appendix D. The FXRuby Standard Library</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt02.html" title="Part II. Appendices"><link rel="prev" href="differences.html" title="Appendix C. Differences between FOX and FXRuby"><link rel="next" href="implementation.html" title="Appendix E. Implementation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix D. The FXRuby Standard Library</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="differences.html">Prev</a> </td><th width="60%" align="center">Part II. Appendices</th><td width="20%" align="right"> <a accesskey="n" href="implementation.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="library"></a>Appendix D. The FXRuby Standard Library</h2></div></div></div><p>While the majority of FXRuby is in fact implemented by an extension module, some parts are provided instead by "pure Ruby" code. This section describes the classes and modules available in the FXRuby standard library.</p><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4376"></a>Undoable Commands</h2></div></div></div><p>The <code class="filename">fox/undolist.rb</code> file provides the <code class="classname">FXCommand</code> and <code class="classname">FXUndoList</code> classes. These serve the same purpose as the <code class="classname">FXCommand</code> and <code class="classname">FXUndoList</code> classes from the standard FOX distribution, but they're implemented entirely in Ruby.</p><p>For a complete description of these classes and how to use them, see the RD documentation in <code class="filename">fox/undolist.rb</code>.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4401"></a>Aliases</h2></div></div></div><p>The <code class="filename">fox/aliases.rb</code> implements most of the accessor-style aliases for methods. This file is loaded automatically when you </p><pre class="programlisting">require 'fox'</pre><p> and so you should never need to load it directly.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4412"></a>Color Names</h2></div></div></div><p>The <code class="filename">fox/colors.rb</code> file, contributed by Jeff
|
4
4
|
Heard, provides a bunch of predefined color values (based on the standard
|
5
5
|
X11 color names). You can use these color constants anywhere that FOX
|
6
|
-
expects an RGB color value, e.g.</p><
|
6
|
+
expects an RGB color value, e.g.</p><pre class="programlisting">dc = FXDCWindow.new(drawable, ev)
|
7
7
|
dc.foreground = FXColor::MistyRose # instead of FXRGB(255, 228, 225)
|
8
|
-
dc.background = FXColor::MidnightBlue # instead of FXRGB( 25, 25, 112)</pre></
|
8
|
+
dc.background = FXColor::MidnightBlue # instead of FXRGB( 25, 25, 112)</pre></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4422"></a>OpenGL Shapes</h2></div></div></div><p>The <code class="filename">fox/glshapes.rb</code> library provides Ruby
|
9
9
|
implementations of a number of basic 3-D shapes (all derived from the
|
10
|
-
built-in <
|
11
|
-
the <
|
12
|
-
in the <
|
10
|
+
built-in <code class="classname">FXGLShape</code> class) that can be used with
|
11
|
+
the <code class="classname">FXGLViewer</code>. Several of these shapes are used
|
12
|
+
in the <code class="filename">glviewer.rb</code> example program. These shapes
|
13
13
|
were originally implemented in C++ and wrapped using SWIG, but they are
|
14
14
|
straightforward enough to implement in Ruby so they were moved out to
|
15
|
-
this library instead.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4439"></a>Iterators</h2></div></div
|
16
|
-
<
|
17
|
-
FXComboBox</
|
18
|
-
FXHeader</
|
19
|
-
FXList</
|
20
|
-
FXTable</
|
21
|
-
FXTreeList</
|
15
|
+
this library instead.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4439"></a>Iterators</h2></div></div></div><p>The <code class="filename">fox/iterators.rb</code> library just adds an
|
16
|
+
<code class="methodname">each</code> instance method for the <code class="classname">
|
17
|
+
FXComboBox</code>, <code class="classname">FXGLGroup</code>, <code class="classname">
|
18
|
+
FXHeader</code>, <code class="classname">FXIconList</code>, <code class="classname">
|
19
|
+
FXList</code>, <code class="classname">FXListBox</code>, <code class="classname">
|
20
|
+
FXTable</code>, <code class="classname">FXTreeItem</code>, <code class="classname">
|
21
|
+
FXTreeList</code> and <code class="classname">FXTreeListBox</code> classes,
|
22
22
|
so that you can iterate over their members in a Ruby-friendly way. It
|
23
|
-
also mixes the <
|
24
|
-
these classes.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4483"></a>Key Codes</h2></div></div
|
25
|
-
key codes (e.g. <
|
26
|
-
code field of an <
|
23
|
+
also mixes the <code class="classname">Enumerable</code> module into each of
|
24
|
+
these classes.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4483"></a>Key Codes</h2></div></div></div><p>The <code class="filename">fox/keys.rb</code> library file defines all of the
|
25
|
+
key codes (e.g. <code class="constant">KEY_space</code>) that might show up in the
|
26
|
+
code field of an <code class="classname">FXEvent</code> instance. This file is
|
27
27
|
loaded automatically when you
|
28
|
-
</p><
|
28
|
+
</p><pre class="programlisting">require 'fox'</pre><p> and
|
29
29
|
so you should never need to load it
|
30
|
-
directly.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4500"></a>Calendar Widget</h2></div></div
|
30
|
+
directly.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e4500"></a>Calendar Widget</h2></div></div></div><p>The <code class="filename">fox/calendar.rb</code> library file provides the <code class="classname">FXCalendar</code> widget, contributed by David Naseby.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="differences.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="implementation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix C. Differences between FOX and FXRuby </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix E. Implementation</td></tr></table></div></body></html>
|
data/doc/opengl.html
CHANGED
@@ -1,48 +1,48 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Appendix A. Using OpenGL with FXRuby</title><meta name="generator" content="DocBook XSL Stylesheets V1.
|
4
|
-
<
|
3
|
+
<title>Appendix A. Using OpenGL with FXRuby</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt02.html" title="Part II. Appendices"><link rel="prev" href="pt02.html" title="Part II. Appendices"><link rel="next" href="scintilla.html" title="Appendix B. Using Scintilla 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">Appendix A. Using OpenGL with FXRuby</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pt02.html">Prev</a> </td><th width="60%" align="center">Part II. Appendices</th><td width="20%" align="right"> <a accesskey="n" href="scintilla.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="opengl"></a>Appendix A. Using OpenGL with FXRuby</h2></div></div></div><div class="abstract"><p class="title"><b>Abstract</b></p><p>FOX provides extensive support for OpenGL through its
|
4
|
+
<code class="classname">FXGLCanvas</code> and <code class="classname">FXGLViewer</code>
|
5
5
|
widgets, and FXRuby in turn provides interfaces to those classes. By
|
6
6
|
combining FXRuby with the OpenGL interface for Ruby (described below) you
|
7
7
|
can develop very powerful 3-D graphics applications. This chapter gives
|
8
|
-
you the information you'll need to get started.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3519"></a>What is OpenGL?</h2></div></div
|
8
|
+
you the information you'll need to get started.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3519"></a>What is OpenGL?</h2></div></div></div><p>OpenGL is a platform-independent API for 2D and 3D graphics. The
|
9
9
|
home page is <a href="http://www.opengl.org" target="_top">http://www.opengl.org</a>. Because it's a
|
10
10
|
fairly open standard, highly optimized OpenGL drivers are available for
|
11
|
-
most operating systems (including Windows and Linux).</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3527"></a>OpenGL Extensions for Ruby</h2></div></div
|
11
|
+
most operating systems (including Windows and Linux).</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3527"></a>OpenGL Extensions for Ruby</h2></div></div></div><p>This extension module, developed by Yoshiyuki Kusano, provides
|
12
12
|
interfaces to not only the basic OpenGL API, but also the GLU and GLUT
|
13
13
|
APIs. As of this writing, the currently released version is 0.32d and is
|
14
14
|
available for download from <a href="http://www2.giganet.net/~yoshi/rbogl-0.32b.tgz" target="_top">http://www2.giganet.net/~yoshi/rbogl-0.32d.tgz</a>.
|
15
15
|
Be sure to check the <a href="http://www.ruby-lang.org/en/raa.html" target="_top">Ruby Application
|
16
16
|
Archive</a> for the latest version of this extension as it is still
|
17
17
|
under development.</p><p>Once you've downloaded the tarball, you should extract its contents
|
18
|
-
to the working directory of your choice by typing:</p><
|
19
|
-
directory and then type:</p><
|
18
|
+
to the working directory of your choice by typing:</p><pre class="screen">$ <span><strong class="command">tar xzf rbogl-0.32d.tgz</strong></span></pre><p>After executing this command you should have a new <code class="filename">opengl</code> (<span class="emphasis"><em>not</em></span> <code class="filename">rbogl-0.32b</code>) subdirectory. Change to this
|
19
|
+
directory and then type:</p><pre class="screen">$ <span><strong class="command">ruby extconf.rb</strong></span></pre><p>This should create a <code class="filename">Makefile</code> configured
|
20
20
|
appropriately for your local Ruby installation. To now build the OpenGL
|
21
|
-
module, type:</p><
|
22
|
-
<
|
23
|
-
<
|
21
|
+
module, type:</p><pre class="screen">$ <span><strong class="command">make</strong></span></pre><p>You can safely ignore the warning(s) about
|
22
|
+
<code class="methodname">glut_KeyboardFunc</code> when it's compiling
|
23
|
+
<code class="filename">glut.c</code>. Well, I ignore them and it hasn't hurt me yet
|
24
24
|
;) Assuming you get an otherwise clean build, install the OpenGL
|
25
|
-
extensions by typing:</p><
|
25
|
+
extensions by typing:</p><pre class="screen">$ <span><strong class="command">make site-install</strong></span></pre><p>Please note that I'm not the maintainer of this particular Ruby
|
26
26
|
extension, so I can't really accept bug fixes for it. But if you're having
|
27
27
|
trouble integrating Ruby/OpenGL with FXRuby, let me know and we'll see
|
28
|
-
what we can do.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3582"></a>The FXGLVisual Class</h2></div></div
|
29
|
-
capabilities of an <
|
30
|
-
<
|
28
|
+
what we can do.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3582"></a>The FXGLVisual Class</h2></div></div></div><p>An <code class="classname">FXGLVisual</code> object describes the
|
29
|
+
capabilities of an <code class="classname">FXGLCanvas</code> or
|
30
|
+
<code class="classname">FXGLViewer</code> window. Typically, an X server supports
|
31
31
|
many different visuals with varying capabilities, but the ones with
|
32
32
|
greater capabilities require more resources than those with fewer
|
33
|
-
capbilities. To construct an <
|
34
|
-
just call <
|
33
|
+
capbilities. To construct an <code class="classname">FXGLVisual</code> object,
|
34
|
+
just call <code class="methodname">FXGLVisual.new</code>:</p><pre class="programlisting">aVisual = FXGLVisual.new(theApp, VISUAL_DOUBLEBUFFER)</pre><p>The first argument to <code class="methodname">FXGLVisual.new</code> is a
|
35
35
|
reference to the application object. The second argument is a set of
|
36
36
|
options indicating the <span class="emphasis"><em>requested</em></span> capabilities for the
|
37
37
|
visual. If one or more of the requested capabilities aren't available, FOX
|
38
38
|
will try to gracefully degrade to a working GL visual; but if you're
|
39
39
|
counting on a specific capability, be sure to check the returned visual to
|
40
40
|
see if it actually supports that capability. For example, say you request
|
41
|
-
a visual with double-buffering and stereographic capabilities:</p><
|
41
|
+
a visual with double-buffering and stereographic capabilities:</p><pre class="programlisting">anotherVisual = FXGLVisual.new(theApp, VISUAL_DOUBLEBUFFER | VISUAL_STEREO)</pre><p>Double-buffering is pretty commonplace these days, but stereo may
|
42
42
|
not be available on the system. We can check to see whether the visual we
|
43
43
|
got supports these capabilities by calling the
|
44
|
-
<
|
45
|
-
<
|
44
|
+
<code class="methodname">FXGLVisual#doubleBuffered?</code> and
|
45
|
+
<code class="methodname">FXGLVisual#stereo?</code> methods:</p><pre class="programlisting">anotherVisual = FXGLVisual.new(theApp, VISUAL_DOUBLEBUFFER | VISUAL_STEREO)
|
46
46
|
if anotherVisual.doubleBuffered?
|
47
47
|
puts "It's double-buffered."
|
48
48
|
else
|
@@ -52,22 +52,22 @@ if anotherVisual.stereo?
|
|
52
52
|
puts "It's stereo."
|
53
53
|
else
|
54
54
|
puts "It isn't stereo."
|
55
|
-
end</pre
|
56
|
-
with every <
|
57
|
-
<
|
58
|
-
separate <
|
55
|
+
end</pre><p>Some <code class="classname">FXGLVisual</code> object must be associated
|
56
|
+
with every <code class="classname">FXGLCanvas</code> or
|
57
|
+
<code class="classname">FXGLViewer</code> window, but you don't need to have a
|
58
|
+
separate <code class="classname">FXGLVisual</code> object for each window. For
|
59
59
|
most applications, you can just construct a single
|
60
|
-
<
|
61
|
-
OpenGL windows.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3641"></a>The FXGLCanvas Class</h2></div></div
|
60
|
+
<code class="classname">FXGLVisual</code> object that's shared among all the
|
61
|
+
OpenGL windows.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3641"></a>The FXGLCanvas Class</h2></div></div></div><p>The <code class="classname">FXGLCanvas</code> widget provides a very simple
|
62
62
|
OpenGL-capable window with minimal functionality. To construct an
|
63
|
-
<
|
64
|
-
<
|
63
|
+
<code class="classname">FXGLCanvas</code>, call
|
64
|
+
<code class="methodname">FXGLCanvas.new</code>:</p><pre class="programlisting">glCanvas = FXGLCanvas.new(parent, vis)</pre><p>The first argument to <code class="methodname">FXGLCanvas.new</code> is the
|
65
65
|
parent (container) widget and the second argument is the
|
66
|
-
<
|
67
|
-
window.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3665"></a>OpenGL objects and the FXGLViewer</h2></div></div
|
66
|
+
<code class="classname">FXGLVisual</code> that should be used for this
|
67
|
+
window.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3665"></a>OpenGL objects and the FXGLViewer</h2></div></div></div><p>The <code class="classname">FXGLViewer</code> widget provides a higher-level
|
68
68
|
OpenGL-capable window with a lot of built-in functionality. To construct
|
69
|
-
an <
|
70
|
-
<
|
69
|
+
an <code class="classname">FXGLViewer</code>, call
|
70
|
+
<code class="methodname">FXGLViewer.new</code>:</p><pre class="programlisting">glViewer = FXGLViewer.new(parent, vis)</pre><p>The first argument to <code class="methodname">FXGLViewer.new</code> is the
|
71
71
|
parent (container) widget and the second argument is the
|
72
|
-
<
|
72
|
+
<code class="classname">FXGLVisual</code> that should be used for this
|
73
73
|
window.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pt02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="scintilla.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part II. Appendices </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix B. Using Scintilla with FXRuby</td></tr></table></div></body></html>
|
data/doc/pt01.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 I. The Basics</title><meta name="generator" content="DocBook XSL Stylesheets V1.
|
3
|
+
<title>Part I. The Basics</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="prev" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="next" href="goals.html" title="History and Goals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part I. The Basics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="book.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="goals.html">Next</a></td></tr></table><hr></div><div class="part" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="d0e17"></a>The Basics</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="goals.html">History and Goals</a></span></dt><dt><span class="chapter"><a href="build.html">1. Building from Source Code</a></span></dt><dt><span class="chapter"><a href="gems.html">2. Installing from Gems</a></span></dt><dt><span class="chapter"><a href="tutorial1.html">3. Hello, World!</a></span></dt><dd><dl><dt><span class="section"><a href="tutorial1.html#d0e597">First Things First</a></span></dt><dt><span class="section"><a href="ch03s02.html">Better living through buttons</a></span></dt><dt><span class="section"><a href="ch03s03.html">Messages</a></span></dt><dt><span class="section"><a href="ch03s04.html">Adding a tool tip</a></span></dt><dt><span class="section"><a href="ch03s05.html">Adding an icon</a></span></dt></dl></dd><dt><span class="chapter"><a href="clipboardtut.html">4. Working With the Clipboard</a></span></dt><dd><dl><dt><span class="section"><a href="clipboardtut.html#d0e986">Basic Application</a></span></dt><dt><span class="section"><a href="ch04s02.html">Acquiring the Clipboard</a></span></dt><dt><span class="section"><a href="ch04s03.html">Sending Data to the Clipboard</a></span></dt><dt><span class="section"><a href="ch04s04.html">Pasting Data from the Clipboard</a></span></dt></dl></dd><dt><span class="chapter"><a href="dragdroptut.html">5. Drag and Drop</a></span></dt><dd><dl><dt><span class="section"><a href="dragdroptut.html#d0e1201">Drop Sites</a></span></dt><dt><span class="section"><a href="ch05s02.html">Drag Sources</a></span></dt><dt><span class="section"><a href="ch05s03.html">Putting It All Together</a></span></dt></dl></dd><dt><span class="chapter"><a href="examples.html">6. Examples</a></span></dt><dt><span class="chapter"><a href="events.html">7. FXRuby's Message-Target System</a></span></dt><dt><span class="chapter"><a href="todo.html">8. To-do list</a></span></dt><dt><span class="chapter"><a href="infosources.html">9. Other Sources of Information</a></span></dt><dt><span class="chapter"><a href="changes.html">10. Change History</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="book.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="goals.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Developing Graphical User Interfaces with FXRuby </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> History and Goals</td></tr></table></div></body></html>
|
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><meta name="generator" content="DocBook XSL Stylesheets V1.
|
3
|
+
<title>Part II. Appendices</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="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="d0e3504"></a>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#d0e4514">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#d0e4552">GL Objects</a></span></dt></dl></dd><dt><span class="section"><a href="apes03.html">Virtual Functions</a></span></dt></dl></dd><dt><span class="appendix"><a href="cvs.html">F. Getting the Sources from CVS</a></span></dt></dl></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,36 +1,36 @@
|
|
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><meta name="generator" content="DocBook XSL Stylesheets V1.
|
3
|
+
<title>Appendix B. Using Scintilla with FXRuby</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="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="d0e3692"></a>What is Scintilla?</h2></div></div></div><p><a href="http://www.scintilla.org" target="_top">Scintilla</a> is a free
|
4
4
|
source code editing component developed by Neil Hodgson for the Win32 and
|
5
|
-
GTK+ platforms.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3699"></a>What is FXScintilla?</h2></div></div
|
5
|
+
GTK+ platforms.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3699"></a>What is FXScintilla?</h2></div></div></div><p><a href="http://savannah.gnu.org/projects/fxscintilla" target="_top">FXScintilla </a> is
|
6
6
|
a FOX widget that wraps around the Scintilla component, or, if you wish,
|
7
7
|
the FOX "port" of Scintilla. It is being developed by Gilles Filippini,
|
8
8
|
and as of this writing the latest release is available for download from
|
9
|
-
<a href="http://savannah.nongnu.org/download/fxscintilla/fxscintilla-1.63.tar.gz" target="_top">http://savannah.nongnu.org/download/fxscintilla/fxscintilla-1.63.tar.gz</a>.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3709"></a>Compiling FXScintilla</h2></div></div
|
9
|
+
<a href="http://savannah.nongnu.org/download/fxscintilla/fxscintilla-1.63.tar.gz" target="_top">http://savannah.nongnu.org/download/fxscintilla/fxscintilla-1.63.tar.gz</a>.</p></div><div class="simplesect" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3709"></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
|
13
|
-
FXScintilla tarball, you should get a new <
|
14
|
-
fxscintilla-1.63</
|
13
|
+
FXScintilla tarball, you should get a new <code class="filename">
|
14
|
+
fxscintilla-1.63</code> directory containing the source code for the
|
15
15
|
FOX port of the Scintilla widget.</p><p>As of the 1.46 release of FXScintilla, the build process has been
|
16
16
|
"autoconfiscated" and should seem very familiar to you if you've built
|
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="d0e3722"></a>Enabling FXScintilla Support in FXRuby</h2></div></div
|
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="d0e3722"></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
|
-
installation directories (e.g. under <
|
23
|
+
installation directories (e.g. under <code class="filename">/usr/include</code> or <code class="filename">/usr/local/include</code>), the regular FXRuby build
|
24
24
|
process should automatically detect it and enable FXScintilla
|
25
25
|
support.</p><p>If you have installed FXScintilla in some non-standard place, or if
|
26
26
|
you're building the code on Microsoft Windows, you will need to specify a
|
27
27
|
few additional configuration options at the beginning.</p><p>You can configure the build on Unix or Linux systems by
|
28
|
-
typing:</p><
|
29
|
-
$ <
|
30
|
-
</pre
|
31
|
-
C:\> <
|
32
|
-
</pre
|
28
|
+
typing:</p><pre class="screen">
|
29
|
+
$ <span><strong class="command">sudo gem install fxruby-1.2.0.gem --force -- --with-fxscintilla-include=/usr/local/include/fxscintilla --with-fxscintilla-lib=/usr/local/lib</strong></span>
|
30
|
+
</pre><p>or, when compiling with Microsoft Visual C++, by typing:</p><pre class="screen">
|
31
|
+
C:\> <span><strong class="command">gem install fxruby-1.2.0.gem --force -- --with-fox-include=C:\fox-1.2.7\include --with-fox-lib=C:\fox-1.2.7\lib --with-fxscintilla-include=C:\fxscintilla-1.63\include --with-fxscintilla-lib=C:\fxscintilla-1.63\lib</strong></span>
|
32
|
+
</pre><p>Past this point, the build and installation process for either
|
33
33
|
platform should be the same as for standard builds. To test your new
|
34
34
|
FXScintilla-enabled build of FXRuby, try running the
|
35
|
-
<
|
36
|
-
<
|
35
|
+
<code class="filename">scintilla-test.rb</code> example program in the FXRuby
|
36
|
+
<code class="filename">examples</code> subdirectory.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="opengl.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="differences.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix A. Using OpenGL with FXRuby </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix C. Differences between FOX and FXRuby</td></tr></table></div></body></html>
|
data/doc/todo.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 8. To-do list</title><meta name="generator" content="DocBook XSL Stylesheets V1.
|
3
|
+
<title>Chapter 8. To-do list</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt01.html" title="Part I. The Basics"><link rel="prev" href="events.html" title="Chapter 7. FXRuby's Message-Target System"><link rel="next" href="infosources.html" title="Chapter 9. Other Sources of Information"></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 8. To-do list</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="events.html">Prev</a> </td><th width="60%" align="center">Part I. The Basics</th><td width="20%" align="right"> <a accesskey="n" href="infosources.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="todo"></a>Chapter 8. To-do list</h2></div></div></div><div class="itemizedlist"><ul type="bullet"><li style="list-style-type: disc"><p>I haven't yet paid much attention to some of the more esoteric
|
4
4
|
issues such as multithreaded applications, or interactions with other
|
5
5
|
popular Ruby extensions. FXRuby seems to cooperate well with Ruby's
|
6
6
|
thread scheduler on all platforms, although threading support for the
|
@@ -11,9 +11,9 @@
|
|
11
11
|
Ruby's special strengths.</p></li><li style="list-style-type: disc"><p>Documentation is of course a big weakness at this point. I am
|
12
12
|
slowly building up a set of "pseudo-sources" with RDoc-style
|
13
13
|
comments that can be used to generate API documentation but this is far
|
14
|
-
from complete (see the <
|
14
|
+
from complete (see the <code class="filename">rdoc-sources</code>
|
15
15
|
directory in the standard source distribution).</p></li><li style="list-style-type: disc"><p>Many people have expressed interest in a framework similar to
|
16
|
-
Tk's <
|
16
|
+
Tk's <code class="classname">Canvas</code> widget that allows you to draw
|
17
17
|
and drag 2-D shapes around, etc. Should be able to implement this kind
|
18
18
|
of thing directly in Ruby code (i.e. no need to write it in C++ first
|
19
19
|
and then "wrap" it).</p></li><li style="list-style-type: disc"><p>There is no native Mac OS X port of FOX, but many people are
|
@@ -29,9 +29,9 @@
|
|
29
29
|
the <a href="http://www.fox-toolkit.net/cgi-bin/wiki.pl?FAQ" target="_top">FAQ</a>
|
30
30
|
at the <a href="http://www.fox-toolkit.net" target="_top">FOX Community Wiki</a>
|
31
31
|
site), and if so, appropriate changes will be made to FXRuby at that
|
32
|
-
time.</p></li><li style="list-style-type: disc"><p>FOX's list-like widgets (such as <
|
32
|
+
time.</p></li><li style="list-style-type: disc"><p>FOX's list-like widgets (such as <code class="classname">FXList</code>)
|
33
33
|
behave differently from Ruby container objects (such as
|
34
|
-
<
|
34
|
+
<code class="classname">Array</code>) in the sense that when a list widget is
|
35
35
|
destroyed, it typically destroys all of its contained items at the same
|
36
36
|
time. One consequence of this behavior is that you can end up with Ruby
|
37
37
|
objects that refer to dead C++ objects (a variation of the dangling
|
data/doc/tutorial1.html
CHANGED
@@ -1,28 +1,28 @@
|
|
1
1
|
<html><head>
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
-
<title>Chapter 3. Hello, World!</title><meta name="generator" content="DocBook XSL Stylesheets V1.
|
3
|
+
<title>Chapter 3. Hello, World!</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="book.html" title="Developing Graphical User Interfaces with FXRuby"><link rel="up" href="pt01.html" title="Part I. The Basics"><link rel="prev" href="gems.html" title="Chapter 2. Installing from Gems"><link rel="next" href="ch03s02.html" title="Better living through buttons"></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 3. Hello, World!</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gems.html">Prev</a> </td><th width="60%" align="center">Part I. The Basics</th><td width="20%" align="right"> <a accesskey="n" href="ch03s02.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="tutorial1"></a>Chapter 3. Hello, World!</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="tutorial1.html#d0e597">First Things First</a></span></dt><dt><span class="section"><a href="ch03s02.html">Better living through buttons</a></span></dt><dt><span class="section"><a href="ch03s03.html">Messages</a></span></dt><dt><span class="section"><a href="ch03s04.html">Adding a tool tip</a></span></dt><dt><span class="section"><a href="ch03s05.html">Adding an icon</a></span></dt></dl></div><p>There are a few things common to all programs that use FXRuby, and the
|
4
4
|
purpose of this chapter is to help you get familiar with those. We'll do
|
5
5
|
this by developing a short program that simply displays a button containing
|
6
6
|
the text, "Hello, World!". For reference, this program is included in the
|
7
|
-
<
|
8
|
-
code distribution.</p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e597"></a>First Things First</h2></div></div
|
9
|
-
the <
|
10
|
-
this gem:</p><
|
11
|
-
<
|
7
|
+
<code class="filename">examples</code> subdirectory of the standard FXRuby source
|
8
|
+
code distribution.</p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e597"></a>First Things First</h2></div></div></div><p>All of the code associated with the FXRuby extension is provided by
|
9
|
+
the <code class="classname">fox14 </code>gem, so we need to start by requiring
|
10
|
+
this gem:</p><pre class="programlisting">require 'fox14'</pre><p>Since all of the FXRuby classes are defined under the
|
11
|
+
<code class="classname">Fox</code> module, you'd normally need to refer to them
|
12
12
|
using their "fully qualified" names (i.e. names that begin with the
|
13
|
-
<
|
13
|
+
<code class="classname">Fox::</code> prefix). Because this can get a little
|
14
14
|
tedious, and because there's not really much chance of name conflicts
|
15
15
|
between FXRuby and other Ruby extensions, I usually like to add an
|
16
|
-
<
|
17
|
-
the <
|
18
|
-
namespace:</p><
|
16
|
+
<code class="methodname">include Fox</code> statement so that all of the names in
|
17
|
+
the <code class="classname">Fox</code> module are "included" into the global
|
18
|
+
namespace:</p><pre class="programlisting">require 'fox14'
|
19
19
|
|
20
|
-
<span class="bold"><
|
21
|
-
<
|
20
|
+
<span class="bold"><strong>include Fox</strong></span></pre><p>Every FXRuby program begins by creating an
|
21
|
+
<code class="classname">FXApp</code> instance:</p><pre class="programlisting">require 'fox14'
|
22
22
|
|
23
23
|
include Fox
|
24
24
|
|
25
|
-
<span class="bold"><
|
25
|
+
<span class="bold"><strong>theApp = FXApp.new</strong></span></pre><p>The <code class="classname">FXApp</code> instance has a lot of
|
26
26
|
responsibilities in an FXRuby application. One of the most frequent ways
|
27
27
|
you'll use it is to kick off the application's main event loop (which
|
28
28
|
you'll see later in this tutorial). The application is also the object
|
@@ -30,27 +30,27 @@ include Fox
|
|
30
30
|
registry. It is a different approach from some other GUI toolkits for
|
31
31
|
Ruby, where these kinds of global resources are accessed using
|
32
32
|
module-level methods. As you continue to develop programs using FXRuby,
|
33
|
-
you'll learn about other ways that the <
|
34
|
-
is used.</p><p>The next step is to create an <
|
33
|
+
you'll learn about other ways that the <code class="classname">FXApp</code> object
|
34
|
+
is used.</p><p>The next step is to create an <code class="classname">FXMainWindow</code>
|
35
35
|
instance to serve as the application's main window. If you've used Ruby/Tk
|
36
|
-
before, this is similar to its <
|
37
|
-
window:</p><
|
36
|
+
before, this is similar to its <code class="classname">TkRoot</code>
|
37
|
+
window:</p><pre class="programlisting">require 'fox14'
|
38
38
|
|
39
39
|
include Fox
|
40
40
|
|
41
41
|
theApp = FXApp.new
|
42
42
|
|
43
|
-
<span class="bold"><
|
44
|
-
<
|
45
|
-
<
|
46
|
-
<
|
47
|
-
<
|
43
|
+
<span class="bold"><strong>theMainWindow = FXMainWindow.new(theApp, "Hello")</strong></span></pre><p>Here, we pass <em class="parameter"><code>theApp</code></em> as the first argument to
|
44
|
+
<code class="methodname">FXMainWindow.new</code> to associate the new
|
45
|
+
<code class="classname">FXMainWindow</code> instance with this
|
46
|
+
<code class="classname">FXApp</code>. The second argument to
|
47
|
+
<code class="methodname">FXMainWindow.new</code> is a string that will be used
|
48
48
|
for the main window's title.</p><p>So far, all we've done is instantiate the client-side objects.
|
49
49
|
Unlike most other toolkits, FOX makes a distinction between client-side
|
50
|
-
data (such as an <
|
50
|
+
data (such as an <code class="classname">FXMainWindow</code> object) and
|
51
51
|
server-side data (such as the X window associated with that Ruby object).
|
52
52
|
To create the server-side objects associated with the already-constructed
|
53
|
-
client-side objects, we call <
|
53
|
+
client-side objects, we call <code class="methodname">FXApp#create</code>:</p><pre class="programlisting">require 'fox14'
|
54
54
|
|
55
55
|
include Fox
|
56
56
|
|
@@ -58,9 +58,9 @@ theApp = FXApp.new
|
|
58
58
|
|
59
59
|
theMainWindow = FXMainWindow.new(theApp, "Hello")
|
60
60
|
|
61
|
-
<span class="bold"><
|
62
|
-
to call our main window's <
|
63
|
-
method:</p><
|
61
|
+
<span class="bold"><strong>theApp.create</strong></span></pre><p>By default, all windows in FXRuby programs are invisible, so we need
|
62
|
+
to call our main window's <code class="methodname">show</code> instance
|
63
|
+
method:</p><pre class="programlisting">require 'fox14'
|
64
64
|
|
65
65
|
include Fox
|
66
66
|
|
@@ -69,9 +69,9 @@ theApp = FXApp.new
|
|
69
69
|
theMainWindow = FXMainWindow.new(theApp, "Hello")
|
70
70
|
theApp.create
|
71
71
|
|
72
|
-
<span class="bold"><
|
73
|
-
<
|
74
|
-
method:</p><
|
72
|
+
<span class="bold"><strong>theMainWindow.show</strong></span></pre><p>The last step is to start the program's main loop by calling
|
73
|
+
<em class="parameter"><code>theApp</code></em>'s <code class="methodname">run</code> instance
|
74
|
+
method:</p><pre class="programlisting">require 'fox14'
|
75
75
|
|
76
76
|
include Fox
|
77
77
|
|
@@ -82,9 +82,9 @@ theApp.create
|
|
82
82
|
|
83
83
|
theMainWindow.show
|
84
84
|
|
85
|
-
<span class="bold"><
|
86
|
-
the program exits. It is similar to the <
|
85
|
+
<span class="bold"><strong>theApp.run</strong></span></pre><p>The <code class="methodname">FXApp#run</code> method doesn't return until
|
86
|
+
the program exits. It is similar to the <code class="methodname">mainloop</code>
|
87
87
|
method used for Ruby/Tk and Ruby/GTK, and you can in fact use
|
88
|
-
<
|
89
|
-
<
|
88
|
+
<code class="methodname">FXApp#mainloop</code> as an alias for
|
89
|
+
<code class="methodname">run</code> if you prefer.</p><p>At this point, we have a working (if not very interesting) program
|
90
90
|
that uses FXRuby. If you run it, you'll see something like this:</p><div class="screenshot"><div class="mediaobject" align="center"><img src="images/hello-without-button.png" align="middle"></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gems.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="ch03s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Installing from Gems </td><td width="20%" align="center"><a accesskey="h" href="book.html">Home</a></td><td width="40%" align="right" valign="top"> Better living through buttons</td></tr></table></div></body></html>
|