fxruby 1.6.50 → 1.6.51
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.github/workflows/binary.yml +17 -0
- data/.github/workflows/ci.yml +13 -2
- data/Gemfile +7 -2
- data/History.md +14 -0
- data/Rakefile +28 -46
- data/doap.rdf +2 -2
- data/docs/Fox/Canvas/CanvasError.html +2 -2
- data/docs/Fox/Canvas/CircleShape.html +2 -2
- data/docs/Fox/Canvas/ImageShape.html +2 -2
- data/docs/Fox/Canvas/LineShape.html +2 -2
- data/docs/Fox/Canvas/PolygonShape.html +2 -2
- data/docs/Fox/Canvas/RectangleShape.html +2 -2
- data/docs/Fox/Canvas/SelectionPolicy.html +2 -2
- data/docs/Fox/Canvas/Shape.html +3 -3
- data/docs/Fox/Canvas/ShapeCanvas.html +2 -2
- data/docs/Fox/Canvas/ShapeGroup.html +2 -2
- data/docs/Fox/Canvas/SingleSelectionPolicy.html +2 -2
- data/docs/Fox/Canvas/TextShape.html +7 -9
- data/docs/Fox/Canvas.html +3 -3
- data/docs/Fox/FTNonModal.html +2 -2
- data/docs/Fox/FX4Splitter.html +41 -41
- data/docs/Fox/FX7Segment.html +5 -5
- data/docs/Fox/FXAccelTable.html +2 -2
- data/docs/Fox/FXApp.html +54 -54
- data/docs/Fox/FXArc.html +2 -2
- data/docs/Fox/FXArrowButton.html +22 -22
- data/docs/Fox/FXBMPIcon.html +10 -10
- data/docs/Fox/FXBMPImage.html +9 -9
- data/docs/Fox/FXBitmap.html +7 -7
- data/docs/Fox/FXBitmapFrame.html +3 -3
- data/docs/Fox/FXBitmapView.html +4 -4
- data/docs/Fox/FXButton.html +21 -21
- data/docs/Fox/FXCURCursor.html +2 -2
- data/docs/Fox/FXCalendar.html +4 -4
- data/docs/Fox/FXCanvas.html +7 -7
- data/docs/Fox/FXCheckButton.html +13 -13
- data/docs/Fox/FXChoiceBox.html +20 -20
- data/docs/Fox/FXColor.html +2 -2
- data/docs/Fox/FXColorBar.html +10 -10
- data/docs/Fox/FXColorDialog.html +7 -7
- data/docs/Fox/FXColorItem.html +2 -2
- data/docs/Fox/FXColorList.html +2 -2
- data/docs/Fox/FXColorRing.html +7 -7
- data/docs/Fox/FXColorSelector.html +36 -36
- data/docs/Fox/FXColorWell.html +19 -19
- data/docs/Fox/FXColorWheel.html +20 -20
- data/docs/Fox/FXComboBox.html +31 -31
- data/docs/Fox/FXComboTableItem.html +2 -2
- data/docs/Fox/FXCommand.html +2 -2
- data/docs/Fox/FXComposite.html +5 -5
- data/docs/Fox/FXCursor.html +14 -14
- data/docs/Fox/FXDC.html +207 -207
- data/docs/Fox/FXDCPrint.html +2 -2
- data/docs/Fox/FXDCWindow.html +2 -2
- data/docs/Fox/FXDataTarget.html +8 -8
- data/docs/Fox/FXDebugTarget.html +3 -3
- data/docs/Fox/FXDelegator.html +2 -2
- data/docs/Fox/FXDial.html +28 -28
- data/docs/Fox/FXDialogBox.html +5 -5
- data/docs/Fox/FXDict.html +2 -2
- data/docs/Fox/FXDirBox.html +7 -7
- data/docs/Fox/FXDirDialog.html +2 -2
- data/docs/Fox/FXDirItem.html +2 -2
- data/docs/Fox/FXDirList.html +19 -19
- data/docs/Fox/FXDirSelector.html +15 -15
- data/docs/Fox/FXDockBar.html +27 -27
- data/docs/Fox/FXDockHandler.html +5 -5
- data/docs/Fox/FXDockSite.html +14 -14
- data/docs/Fox/FXDockTitle.html +2 -2
- data/docs/Fox/FXDocument.html +5 -5
- data/docs/Fox/FXDragCorner.html +2 -2
- data/docs/Fox/FXDrawable.html +5 -5
- data/docs/Fox/FXDriveBox.html +5 -5
- data/docs/Fox/FXEvent.html +62 -60
- data/docs/Fox/FXExtentd.html +2 -2
- data/docs/Fox/FXExtentf.html +2 -2
- data/docs/Fox/FXFileAssoc.html +2 -2
- data/docs/Fox/FXFileDialog.html +32 -32
- data/docs/Fox/FXFileDict.html +7 -7
- data/docs/Fox/FXFileItem.html +2 -2
- data/docs/Fox/FXFileList.html +27 -27
- data/docs/Fox/FXFileSelector.html +35 -35
- data/docs/Fox/FXFileStream.html +6 -6
- data/docs/Fox/FXFoldingItem.html +2 -2
- data/docs/Fox/FXFoldingList.html +41 -41
- data/docs/Fox/FXFont.html +172 -170
- data/docs/Fox/FXFontDesc.html +2 -2
- data/docs/Fox/FXFontDialog.html +2 -2
- data/docs/Fox/FXFontSelector.html +14 -14
- data/docs/Fox/FXFrame.html +4 -4
- data/docs/Fox/FXGIFCursor.html +2 -2
- data/docs/Fox/FXGIFIcon.html +10 -10
- data/docs/Fox/FXGIFImage.html +9 -9
- data/docs/Fox/FXGLCanvas.html +2 -2
- data/docs/Fox/FXGLCone.html +2 -2
- data/docs/Fox/FXGLContext.html +2 -2
- data/docs/Fox/FXGLCube.html +2 -2
- data/docs/Fox/FXGLCylinder.html +2 -2
- data/docs/Fox/FXGLGroup.html +2 -2
- data/docs/Fox/FXGLLine.html +2 -2
- data/docs/Fox/FXGLObject.html +14 -14
- data/docs/Fox/FXGLPoint.html +2 -2
- data/docs/Fox/FXGLShape.html +26 -26
- data/docs/Fox/FXGLSphere.html +2 -2
- data/docs/Fox/FXGLViewer.html +74 -74
- data/docs/Fox/FXGLVisual.html +2 -2
- data/docs/Fox/FXGradient.html +2 -2
- data/docs/Fox/FXGradientBar.html +34 -34
- data/docs/Fox/FXGroupBox.html +7 -7
- data/docs/Fox/FXHeader.html +20 -20
- data/docs/Fox/FXHeaderItem.html +19 -19
- data/docs/Fox/FXHiliteStyle.html +2 -2
- data/docs/Fox/FXHorizontalFrame.html +15 -15
- data/docs/Fox/FXHorizontalSeparator.html +13 -13
- data/docs/Fox/FXICOIcon.html +10 -10
- data/docs/Fox/FXICOImage.html +9 -9
- data/docs/Fox/FXIcon.html +10 -10
- data/docs/Fox/FXIconDict.html +2 -2
- data/docs/Fox/FXIconItem.html +2 -2
- data/docs/Fox/FXIconList.html +43 -43
- data/docs/Fox/FXIconSource.html +2 -2
- data/docs/Fox/FXId.html +2 -2
- data/docs/Fox/FXImage.html +120 -297
- data/docs/Fox/FXImageFrame.html +14 -14
- data/docs/Fox/FXImageView.html +13 -13
- data/docs/Fox/FXInputDialog.html +7 -7
- data/docs/Fox/FXIrb.html +2 -2
- data/docs/Fox/FXJPGIcon.html +11 -11
- data/docs/Fox/FXJPGImage.html +10 -10
- data/docs/Fox/FXKnob.html +17 -17
- data/docs/Fox/FXLabel.html +25 -25
- data/docs/Fox/FXLight.html +2 -2
- data/docs/Fox/FXList.html +29 -29
- data/docs/Fox/FXListBox.html +8 -8
- data/docs/Fox/FXListItem.html +2 -2
- data/docs/Fox/FXMDIChild.html +21 -21
- data/docs/Fox/FXMDIClient.html +224 -28
- data/docs/Fox/FXMDIDeleteButton.html +2 -2
- data/docs/Fox/FXMDIMaximizeButton.html +2 -2
- data/docs/Fox/FXMDIMenu.html +2 -2
- data/docs/Fox/FXMDIMinimizeButton.html +2 -2
- data/docs/Fox/FXMDIRestoreButton.html +2 -2
- data/docs/Fox/FXMDIWindowButton.html +2 -2
- data/docs/Fox/FXMainWindow.html +4 -4
- data/docs/Fox/FXMaterial.html +2 -2
- data/docs/Fox/FXMatrix.html +5 -5
- data/docs/Fox/FXMemoryBuffer.html +4 -4
- data/docs/Fox/FXMemoryStream.html +8 -8
- data/docs/Fox/FXMenuBar.html +2 -2
- data/docs/Fox/FXMenuButton.html +24 -24
- data/docs/Fox/FXMenuCaption.html +5 -5
- data/docs/Fox/FXMenuCascade.html +2 -2
- data/docs/Fox/FXMenuCheck.html +4 -4
- data/docs/Fox/FXMenuCommand.html +4 -4
- data/docs/Fox/FXMenuPane.html +2 -2
- data/docs/Fox/FXMenuRadio.html +4 -4
- data/docs/Fox/FXMenuSeparator.html +2 -2
- data/docs/Fox/FXMenuTitle.html +7 -7
- data/docs/Fox/FXMessageBox.html +21 -21
- data/docs/Fox/FXObject.html +2 -2
- data/docs/Fox/FXOption.html +8 -8
- data/docs/Fox/FXOptionMenu.html +8 -8
- data/docs/Fox/FXPCXIcon.html +10 -10
- data/docs/Fox/FXPCXImage.html +9 -9
- data/docs/Fox/FXPNGIcon.html +10 -10
- data/docs/Fox/FXPNGImage.html +9 -9
- data/docs/Fox/FXPPMIcon.html +10 -10
- data/docs/Fox/FXPPMImage.html +9 -9
- data/docs/Fox/FXPSBounds.html +2 -2
- data/docs/Fox/FXPacker.html +2 -2
- data/docs/Fox/FXPicker.html +5 -5
- data/docs/Fox/FXPopup.html +6 -6
- data/docs/Fox/FXPrintDialog.html +23 -23
- data/docs/Fox/FXPrinter.html +22 -22
- data/docs/Fox/FXProgressBar.html +8 -8
- data/docs/Fox/FXProgressDialog.html +6 -6
- data/docs/Fox/FXPseudoKeyboard.html +2 -2
- data/docs/Fox/FXPseudoMouse.html +2 -2
- data/docs/Fox/FXPseudoTarget.html +2 -2
- data/docs/Fox/FXQuatd.html +19 -19
- data/docs/Fox/FXQuatf.html +24 -24
- data/docs/Fox/FXRGBIcon.html +10 -10
- data/docs/Fox/FXRGBImage.html +9 -9
- data/docs/Fox/FXRadioButton.html +12 -12
- data/docs/Fox/FXRanged.html +2 -2
- data/docs/Fox/FXRangef.html +2 -2
- data/docs/Fox/FXRealSlider.html +40 -40
- data/docs/Fox/FXRealSpinner.html +32 -32
- data/docs/Fox/FXRecentFiles.html +17 -17
- data/docs/Fox/FXRectangle.html +15 -15
- data/docs/Fox/FXRegion.html +2 -2
- data/docs/Fox/FXRegistry.html +2 -2
- data/docs/Fox/FXReplaceDialog.html +29 -29
- data/docs/Fox/FXRootWindow.html +5 -5
- data/docs/Fox/FXRuler.html +31 -31
- data/docs/Fox/FXRulerView.html +2 -2
- data/docs/Fox/FXScintilla.html +9116 -2763
- data/docs/Fox/FXScrollArea.html +21 -21
- data/docs/Fox/FXScrollBar.html +31 -31
- data/docs/Fox/FXScrollCorner.html +2 -2
- data/docs/Fox/FXScrollPane.html +6 -6
- data/docs/Fox/FXScrollWindow.html +9 -9
- data/docs/Fox/FXSearchDialog.html +11 -11
- data/docs/Fox/FXSegment.html +2 -2
- data/docs/Fox/FXSeparator.html +7 -7
- data/docs/Fox/FXSettings.html +56 -56
- data/docs/Fox/FXShell.html +2 -2
- data/docs/Fox/FXShutter.html +24 -24
- data/docs/Fox/FXShutterItem.html +19 -19
- data/docs/Fox/FXSize.html +12 -12
- data/docs/Fox/FXSlider.html +40 -40
- data/docs/Fox/FXSphered.html +2 -2
- data/docs/Fox/FXSpheref.html +2 -2
- data/docs/Fox/FXSpinner.html +31 -31
- data/docs/Fox/FXSplashScreen.html +3 -3
- data/docs/Fox/FXSplashWindow.html +7 -7
- data/docs/Fox/FXSplitter.html +22 -22
- data/docs/Fox/FXSpring.html +17 -17
- data/docs/Fox/FXStatusBar.html +17 -17
- data/docs/Fox/FXStatusLine.html +8 -8
- data/docs/Fox/FXStream.html +26 -26
- data/docs/Fox/FXStreamAllocError.html +2 -2
- data/docs/Fox/FXStreamEndError.html +2 -2
- data/docs/Fox/FXStreamError.html +2 -2
- data/docs/Fox/FXStreamFailureError.html +2 -2
- data/docs/Fox/FXStreamFormatError.html +2 -2
- data/docs/Fox/FXStreamFullError.html +2 -2
- data/docs/Fox/FXStreamNoReadError.html +2 -2
- data/docs/Fox/FXStreamNoWriteError.html +2 -2
- data/docs/Fox/FXStreamUnknownError.html +2 -2
- data/docs/Fox/FXStringDict.html +2 -2
- data/docs/Fox/FXSwitcher.html +30 -30
- data/docs/Fox/FXTGAIcon.html +10 -10
- data/docs/Fox/FXTGAImage.html +9 -9
- data/docs/Fox/FXTIFIcon.html +10 -10
- data/docs/Fox/FXTIFImage.html +9 -9
- data/docs/Fox/FXTabBar.html +37 -37
- data/docs/Fox/FXTabBook.html +15 -15
- data/docs/Fox/FXTabItem.html +27 -27
- data/docs/Fox/FXTable.html +89 -89
- data/docs/Fox/FXTableItem.html +6 -6
- data/docs/Fox/FXTablePos.html +2 -2
- data/docs/Fox/FXTableRange.html +2 -2
- data/docs/Fox/FXText.html +115 -115
- data/docs/Fox/FXTextChange.html +2 -2
- data/docs/Fox/FXTextField.html +55 -55
- data/docs/Fox/FXToggleButton.html +31 -31
- data/docs/Fox/FXToolBar.html +15 -15
- data/docs/Fox/FXToolBarGrip.html +14 -14
- data/docs/Fox/FXToolBarShell.html +11 -11
- data/docs/Fox/FXToolBarTab.html +21 -21
- data/docs/Fox/FXToolTip.html +12 -10
- data/docs/Fox/FXTopWindow.html +34 -34
- data/docs/Fox/FXTranslator.html +2 -2
- data/docs/Fox/FXTreeItem.html +2 -2
- data/docs/Fox/FXTreeList.html +41 -41
- data/docs/Fox/FXTreeListBox.html +23 -23
- data/docs/Fox/FXTriStateButton.html +21 -21
- data/docs/Fox/FXUndoList.html +3 -3
- data/docs/Fox/FXVec2d.html +2 -2
- data/docs/Fox/FXVec2f.html +2 -2
- data/docs/Fox/FXVec3d.html +2 -2
- data/docs/Fox/FXVec3f.html +2 -2
- data/docs/Fox/FXVec4d.html +2 -2
- data/docs/Fox/FXVec4f.html +2 -2
- data/docs/Fox/FXVerticalFrame.html +15 -15
- data/docs/Fox/FXVerticalSeparator.html +13 -13
- data/docs/Fox/FXViewport.html +2 -2
- data/docs/Fox/FXVisual.html +24 -24
- data/docs/Fox/FXWindow.html +143 -143
- data/docs/Fox/FXWizard.html +5 -5
- data/docs/Fox/FXXBMIcon.html +11 -11
- data/docs/Fox/FXXBMImage.html +10 -10
- data/docs/Fox/FXXPMIcon.html +10 -10
- data/docs/Fox/FXXPMImage.html +9 -9
- data/docs/Fox/NotifyHeader.html +2 -2
- data/docs/Fox/SCNotification.html +2 -2
- data/docs/Fox/TextRange.html +2 -2
- data/docs/Fox.html +89 -89
- data/docs/IRB.html +2 -2
- data/docs/Responder.html +2 -2
- data/docs/Responder2.html +2 -2
- data/docs/_index.html +2 -2
- data/docs/css/style.css +2 -15
- data/docs/file.History.html +1432 -842
- data/docs/file.README.html +9 -9
- data/docs/index.html +94 -53
- data/docs/js/app.js +91 -40
- data/docs/js/full_list.js +22 -20
- data/docs/method_list.html +2854 -2286
- data/docs/top-level-namespace.html +2 -2
- data/examples/canvasdemo.rb +4 -4
- data/examples/iconlist.rb +79 -4
- data/examples/inputs.rb +1 -1
- data/examples/rmagick.rb +9 -9
- data/ext/fox16_c/FXRbApp.cpp +2 -1
- data/ext/fox16_c/FXRbDataTarget.cpp +1 -0
- data/ext/fox16_c/FXRbGLViewer.cpp +1 -0
- data/ext/fox16_c/FXRbObjRegistry.cpp +12 -5
- data/ext/fox16_c/FXRuby.cpp +57 -37
- data/ext/fox16_c/core_wrap.cpp +2593 -2155
- data/ext/fox16_c/dc_wrap.cpp +1033 -707
- data/ext/fox16_c/dialogs_wrap.cpp +1865 -1513
- data/ext/fox16_c/extconf.rb +11 -8
- data/ext/fox16_c/frames_wrap.cpp +3257 -2876
- data/ext/fox16_c/fx3d_wrap.cpp +2170 -1780
- data/ext/fox16_c/gvl_wrappers.cpp +1 -0
- data/ext/fox16_c/iconlist_wrap.cpp +1209 -882
- data/ext/fox16_c/icons_wrap.cpp +1132 -775
- data/ext/fox16_c/image_wrap.cpp +1116 -756
- data/ext/fox16_c/impl.cpp +1 -0
- data/ext/fox16_c/include/FXRbDCWindow.h +1 -1
- data/ext/fox16_c/include/FXRuby.h +6 -6
- data/ext/fox16_c/label_wrap.cpp +1702 -1354
- data/ext/fox16_c/layout_wrap.cpp +1752 -1392
- data/ext/fox16_c/list_wrap.cpp +899 -572
- data/ext/fox16_c/make_impl.rb +1 -0
- data/ext/fox16_c/markfuncs.cpp +1 -0
- data/ext/fox16_c/mdi_wrap.cpp +1220 -881
- data/ext/fox16_c/menu_wrap.cpp +1402 -1057
- data/ext/fox16_c/scintilla_wrap.cpp +658 -337
- data/ext/fox16_c/swigruby.h +262 -119
- data/ext/fox16_c/table_wrap.cpp +1064 -741
- data/ext/fox16_c/text_wrap.cpp +1062 -741
- data/ext/fox16_c/treelist_wrap.cpp +1522 -1189
- data/ext/fox16_c/ui_wrap.cpp +3610 -3216
- data/ext/fox16_c/unregisterOwnedObjects.cpp +1 -0
- data/fxruby.gemspec +6 -1
- data/lib/fox16/canvas.rb +1 -1
- data/lib/fox16/core.rb +97 -26
- data/lib/fox16/undolist.rb +32 -32
- data/lib/fox16/version.rb +1 -1
- data/rdoc-sources/FXApp.rb +12 -0
- data/rdoc-sources/FXFont.rb +2 -0
- data/rdoc-sources/FXMDIClient.rb +15 -0
- data/scripts/iface.rb +1 -0
- data/swig-interfaces/FXScintilla.i +1 -1
- data/swig-interfaces/FXText.i +1 -1
- data/swig-interfaces/freefuncs.i +1 -0
- data/swig-interfaces/ruby-typemaps.i +19 -19
- data/test/TC_FXBMPImage.rb +1 -1
- data/test/TC_FXDC.rb +24 -0
- data/test/TC_FXMat4f.rb +23 -14
- data/test/TC_FXSize.rb +8 -4
- data/test/TS_All.rb +4 -0
- data.tar.gz.sig +0 -0
- metadata +18 -15
- metadata.gz.sig +0 -0
data/fxruby.gemspec
CHANGED
|
@@ -50,7 +50,12 @@ Gem::Specification.new do |spec|
|
|
|
50
50
|
spec.require_paths = ["lib"]
|
|
51
51
|
spec.extensions = ["ext/fox16_c/extconf.rb"]
|
|
52
52
|
spec.metadata['msys2_mingw_dependencies'] = 'fox'
|
|
53
|
-
spec.required_ruby_version = ">=
|
|
53
|
+
spec.required_ruby_version = ">= 3.0"
|
|
54
|
+
|
|
55
|
+
# Automatic apt package installation using rubygems-requirements-system
|
|
56
|
+
spec.requirements << "system: g++: debian: g++"
|
|
57
|
+
spec.requirements << "system: libxrandr: debian: libxrandr-dev"
|
|
58
|
+
spec.requirements << "system: libfox: debian: libfox-1.6-dev"
|
|
54
59
|
|
|
55
60
|
spec.add_runtime_dependency 'mini_portile2', '~> 2.1'
|
|
56
61
|
|
data/lib/fox16/canvas.rb
CHANGED
data/lib/fox16/core.rb
CHANGED
|
@@ -227,12 +227,7 @@ module Fox
|
|
|
227
227
|
end
|
|
228
228
|
end
|
|
229
229
|
|
|
230
|
-
|
|
231
|
-
# Convert to array
|
|
232
|
-
def to_a
|
|
233
|
-
[x, y]
|
|
234
|
-
end
|
|
235
|
-
|
|
230
|
+
module FXVec_to_s
|
|
236
231
|
# Convert to string
|
|
237
232
|
def to_s
|
|
238
233
|
to_a.to_s
|
|
@@ -240,56 +235,130 @@ module Fox
|
|
|
240
235
|
|
|
241
236
|
def inspect; to_a.inspect; end
|
|
242
237
|
end
|
|
238
|
+
private_constant :FXVec_to_s
|
|
239
|
+
|
|
240
|
+
class FXVec2d
|
|
241
|
+
include FXVec_to_s
|
|
242
|
+
# Convert to array
|
|
243
|
+
def to_a
|
|
244
|
+
[x, y]
|
|
245
|
+
end
|
|
246
|
+
end
|
|
243
247
|
|
|
244
248
|
class FXVec2f
|
|
249
|
+
include FXVec_to_s
|
|
245
250
|
# Convert to array
|
|
246
251
|
def to_a; [x, y]; end
|
|
247
|
-
|
|
248
|
-
# Convert to string
|
|
249
|
-
def to_s; to_a.to_s; end
|
|
250
|
-
|
|
251
|
-
def inspect; to_a.inspect; end
|
|
252
252
|
end
|
|
253
253
|
|
|
254
254
|
class FXVec3d
|
|
255
|
+
include FXVec_to_s
|
|
255
256
|
# Convert to array
|
|
256
257
|
def to_a; [x, y, z]; end
|
|
257
|
-
|
|
258
|
-
# Convert to string
|
|
259
|
-
def to_s; to_a.to_s; end
|
|
260
|
-
|
|
261
|
-
def inspect; to_a.inspect; end
|
|
262
258
|
end
|
|
263
259
|
|
|
264
260
|
class FXVec3f
|
|
261
|
+
include FXVec_to_s
|
|
265
262
|
# Convert to array
|
|
266
263
|
def to_a; [x, y, z]; end
|
|
267
|
-
|
|
268
|
-
# Convert to string
|
|
269
|
-
def to_s; to_a.to_s; end
|
|
270
|
-
|
|
271
|
-
def inspect; to_a.inspect; end
|
|
272
264
|
end
|
|
273
265
|
|
|
274
266
|
class FXVec4d
|
|
267
|
+
include FXVec_to_s
|
|
275
268
|
# Convert to array
|
|
276
269
|
def to_a; [x, y, z, w]; end
|
|
270
|
+
end
|
|
277
271
|
|
|
278
|
-
|
|
279
|
-
|
|
272
|
+
class FXVec4f
|
|
273
|
+
include FXVec_to_s
|
|
274
|
+
# Convert to array
|
|
275
|
+
def to_a; [x, y, z, w]; end
|
|
276
|
+
end
|
|
280
277
|
|
|
281
|
-
|
|
278
|
+
class FXVec2d
|
|
279
|
+
include FXVec_to_s
|
|
280
|
+
# Convert to array
|
|
281
|
+
def to_a
|
|
282
|
+
[x, y]
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
class FXVec2f
|
|
287
|
+
include FXVec_to_s
|
|
288
|
+
# Convert to array
|
|
289
|
+
def to_a; [x, y]; end
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
class FXVec3d
|
|
293
|
+
include FXVec_to_s
|
|
294
|
+
# Convert to array
|
|
295
|
+
def to_a; [x, y, z]; end
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
class FXVec3f
|
|
299
|
+
include FXVec_to_s
|
|
300
|
+
# Convert to array
|
|
301
|
+
def to_a; [x, y, z]; end
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
class FXVec4d
|
|
305
|
+
include FXVec_to_s
|
|
306
|
+
# Convert to array
|
|
307
|
+
def to_a; [x, y, z, w]; end
|
|
282
308
|
end
|
|
283
309
|
|
|
284
310
|
class FXVec4f
|
|
311
|
+
include FXVec_to_s
|
|
285
312
|
# Convert to array
|
|
286
313
|
def to_a; [x, y, z, w]; end
|
|
314
|
+
end
|
|
287
315
|
|
|
288
|
-
|
|
289
|
-
def
|
|
316
|
+
module Equality_to_a
|
|
317
|
+
def ==(other)
|
|
318
|
+
other.respond_to?(:to_a) &&
|
|
319
|
+
to_a == other.to_a
|
|
320
|
+
end
|
|
290
321
|
|
|
291
322
|
def inspect; to_a.inspect; end
|
|
292
323
|
end
|
|
324
|
+
private_constant :Equality_to_a
|
|
325
|
+
|
|
326
|
+
module FXMat3_to_a
|
|
327
|
+
include Equality_to_a
|
|
328
|
+
def to_a
|
|
329
|
+
[self[0].to_a,
|
|
330
|
+
self[1].to_a,
|
|
331
|
+
self[2].to_a]
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
private_constant :FXMat3_to_a
|
|
335
|
+
|
|
336
|
+
module FXMat4_to_a
|
|
337
|
+
include Equality_to_a
|
|
338
|
+
def to_a
|
|
339
|
+
[self[0].to_a,
|
|
340
|
+
self[1].to_a,
|
|
341
|
+
self[2].to_a,
|
|
342
|
+
self[3].to_a]
|
|
343
|
+
end
|
|
344
|
+
end
|
|
345
|
+
private_constant :FXMat4_to_a
|
|
346
|
+
|
|
347
|
+
class FXMat3d
|
|
348
|
+
include FXMat3_to_a
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
class FXMat3f
|
|
352
|
+
include FXMat3_to_a
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
class FXMat4d
|
|
356
|
+
include FXMat4_to_a
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
class FXMat4f
|
|
360
|
+
include FXMat4_to_a
|
|
361
|
+
end
|
|
293
362
|
|
|
294
363
|
class FXWindow
|
|
295
364
|
#
|
|
@@ -691,12 +760,14 @@ module Fox
|
|
|
691
760
|
|
|
692
761
|
class FXImage
|
|
693
762
|
alias initialize_without_data_string initialize
|
|
763
|
+
private :initialize_without_data_string
|
|
694
764
|
def initialize(a, pix, *args)
|
|
695
765
|
initialize_without_data_string(a, pix, *args)
|
|
696
766
|
@data_string = (options & IMAGE_OWNED) != 0 ? nil : pix
|
|
697
767
|
end
|
|
698
768
|
|
|
699
769
|
alias setPixels_without_data_string setPixels
|
|
770
|
+
private :setPixels_without_data_string
|
|
700
771
|
def setPixels(pix, *args)
|
|
701
772
|
setPixels_without_data_string(pix, *args)
|
|
702
773
|
@data_string = (options & IMAGE_OWNED) != 0 ? nil : pix
|
data/lib/fox16/undolist.rb
CHANGED
|
@@ -158,12 +158,12 @@ module Fox
|
|
|
158
158
|
#
|
|
159
159
|
def undo
|
|
160
160
|
unless @undolist.empty?
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
161
|
+
command = @undolist.pop
|
|
162
|
+
@size -= command.size
|
|
163
|
+
command.undo
|
|
164
|
+
@redolist.push(command)
|
|
165
|
+
@marker = @marker - 1 unless @marker.nil?
|
|
166
|
+
return true
|
|
167
167
|
end
|
|
168
168
|
return false
|
|
169
169
|
end
|
|
@@ -173,12 +173,12 @@ module Fox
|
|
|
173
173
|
#
|
|
174
174
|
def redo
|
|
175
175
|
unless @redolist.empty?
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
176
|
+
command = @redolist.pop
|
|
177
|
+
command.redo
|
|
178
|
+
@undolist.push(command)
|
|
179
|
+
@size += command.size
|
|
180
|
+
@marker = @marker + 1 unless @marker.nil?
|
|
181
|
+
return true
|
|
182
182
|
end
|
|
183
183
|
return false
|
|
184
184
|
end
|
|
@@ -202,9 +202,9 @@ module Fox
|
|
|
202
202
|
#
|
|
203
203
|
def revert
|
|
204
204
|
unless @marker.nil?
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
205
|
+
undo while (@marker > 0)
|
|
206
|
+
redo while (@marker < 0)
|
|
207
|
+
return true
|
|
208
208
|
end
|
|
209
209
|
return false
|
|
210
210
|
end
|
|
@@ -293,10 +293,10 @@ module Fox
|
|
|
293
293
|
#
|
|
294
294
|
def trimCount(nc)
|
|
295
295
|
if @undolist.size > nc
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
296
|
+
numRemoved = @undolist.size - nc
|
|
297
|
+
@undolist[0, numRemoved].each { |command| @size -= command.size }
|
|
298
|
+
@undolist[0, numRemoved] = nil
|
|
299
|
+
@marker = nil if (@marker != nil && @marker > @undolist.size)
|
|
300
300
|
end
|
|
301
301
|
end
|
|
302
302
|
|
|
@@ -305,14 +305,14 @@ module Fox
|
|
|
305
305
|
#
|
|
306
306
|
def trimSize(sz)
|
|
307
307
|
if @size > sz
|
|
308
|
-
|
|
309
|
-
|
|
308
|
+
s = 0
|
|
309
|
+
@undolist.reverse.each_index { |i|
|
|
310
310
|
j = @undolist.size - (i + 1)
|
|
311
311
|
s += @undolist[j].size
|
|
312
312
|
@undolist[j] = nil if (s > sz)
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
313
|
+
}
|
|
314
|
+
@undolist.compact!
|
|
315
|
+
@marker = nil if (@marker != nil && @marker > @undolist.size)
|
|
316
316
|
end
|
|
317
317
|
end
|
|
318
318
|
|
|
@@ -344,9 +344,9 @@ module Fox
|
|
|
344
344
|
|
|
345
345
|
def onUpdUndo(sender, sel, ptr) # :nodoc:
|
|
346
346
|
if canUndo?
|
|
347
|
-
|
|
347
|
+
sender.handle(self, Fox.MKUINT(FXWindow::ID_ENABLE, SEL_COMMAND), nil)
|
|
348
348
|
else
|
|
349
|
-
|
|
349
|
+
sender.handle(self, Fox.MKUINT(FXWindow::ID_DISABLE, SEL_COMMAND), nil)
|
|
350
350
|
end
|
|
351
351
|
return 1
|
|
352
352
|
end
|
|
@@ -358,9 +358,9 @@ module Fox
|
|
|
358
358
|
|
|
359
359
|
def onUpdRedo(sender, sel, ptr) # :nodoc:
|
|
360
360
|
if canRedo?
|
|
361
|
-
|
|
361
|
+
sender.handle(self, Fox.MKUINT(FXWindow::ID_ENABLE, SEL_COMMAND), nil)
|
|
362
362
|
else
|
|
363
|
-
|
|
363
|
+
sender.handle(self, Fox.MKUINT(FXWindow::ID_DISABLE, SEL_COMMAND), nil)
|
|
364
364
|
end
|
|
365
365
|
return 1
|
|
366
366
|
end
|
|
@@ -372,9 +372,9 @@ module Fox
|
|
|
372
372
|
|
|
373
373
|
def onUpdClear(sender, sel, ptr) # :nodoc:
|
|
374
374
|
if canUndo? || canRedo?
|
|
375
|
-
|
|
375
|
+
sender.handle(self, Fox.MKUINT(FXWindow::ID_ENABLE, SEL_COMMAND), nil)
|
|
376
376
|
else
|
|
377
|
-
|
|
377
|
+
sender.handle(self, Fox.MKUINT(FXWindow::ID_DISABLE, SEL_COMMAND), nil)
|
|
378
378
|
end
|
|
379
379
|
return 1
|
|
380
380
|
end
|
|
@@ -386,9 +386,9 @@ module Fox
|
|
|
386
386
|
|
|
387
387
|
def onUpdRevert(sender, sel, ptr) # :nodoc:
|
|
388
388
|
if canRevert?
|
|
389
|
-
|
|
389
|
+
sender.handle(self, Fox.MKUINT(FXWindow::ID_ENABLE, SEL_COMMAND), nil)
|
|
390
390
|
else
|
|
391
|
-
|
|
391
|
+
sender.handle(self, Fox.MKUINT(FXWindow::ID_DISABLE, SEL_COMMAND), nil)
|
|
392
392
|
end
|
|
393
393
|
return 1
|
|
394
394
|
end
|
data/lib/fox16/version.rb
CHANGED
data/rdoc-sources/FXApp.rb
CHANGED
|
@@ -21,6 +21,18 @@ module Fox
|
|
|
21
21
|
attr_reader :root_y
|
|
22
22
|
|
|
23
23
|
# Keyboard/modifier state [Integer]
|
|
24
|
+
#
|
|
25
|
+
# Bitmask of these:
|
|
26
|
+
# SHIFTMASK = 0x001, /// Shift key is down
|
|
27
|
+
# CAPSLOCKMASK = 0x002, /// Caps Lock key is down
|
|
28
|
+
# CONTROLMASK = 0x004, /// Ctrl key is down
|
|
29
|
+
# ALTMASK = 0x008, /// Alt key is down
|
|
30
|
+
# METAMASK = 0x040, /// Meta key is down
|
|
31
|
+
# NUMLOCKMASK = 0x010, /// Num Lock key is down
|
|
32
|
+
# SCROLLLOCKMASK = 0x0E0, /// Scroll Lock key is down (seems to vary)
|
|
33
|
+
# LEFTBUTTONMASK = 0x100, /// Left mouse button is down
|
|
34
|
+
# MIDDLEBUTTONMASK = 0x200, /// Middle mouse button is down
|
|
35
|
+
# RIGHTBUTTONMASK = 0x400 /// Right mouse button is down
|
|
24
36
|
attr_reader :state
|
|
25
37
|
|
|
26
38
|
# Button, keysym or mode; DDE source [Integer]
|
data/rdoc-sources/FXFont.rb
CHANGED
data/rdoc-sources/FXMDIClient.rb
CHANGED
|
@@ -16,6 +16,14 @@ module Fox
|
|
|
16
16
|
# a menu button connected to the MDI client with the ID_MDI_OVER_X message will be
|
|
17
17
|
# automatically grayed out if there are less than X MDI child windows.
|
|
18
18
|
#
|
|
19
|
+
# MDI client can arrange the MDI child windows in various ways:
|
|
20
|
+
# - it may maximize one of the MDI child windows {FXMDIChild#maximize},
|
|
21
|
+
# - arrange them side-by-side {#horizontal}, {#vertical},
|
|
22
|
+
# - cascade them {#cascade},
|
|
23
|
+
# - or iconify them.
|
|
24
|
+
#
|
|
25
|
+
# MDI child windows are notified about changes in the active MDI child window by the MDI client.
|
|
26
|
+
#
|
|
19
27
|
# === Events
|
|
20
28
|
#
|
|
21
29
|
# The following messages are sent by FXMDIClient to its target:
|
|
@@ -60,6 +68,13 @@ module Fox
|
|
|
60
68
|
# Set active MDI child window for this MDI client to _child_.
|
|
61
69
|
#
|
|
62
70
|
def setActiveChild(child=nil, notify=true); end
|
|
71
|
+
|
|
72
|
+
# Arrange childs as cascade
|
|
73
|
+
def cascade(notify=false); end
|
|
74
|
+
# Arrange childs horizontal
|
|
75
|
+
def horizontal(notify=false); end
|
|
76
|
+
# Arrange childs vertical
|
|
77
|
+
def vertical(notify=false); end
|
|
63
78
|
end
|
|
64
79
|
end
|
|
65
80
|
|
data/scripts/iface.rb
CHANGED
data/swig-interfaces/FXText.i
CHANGED
|
@@ -722,7 +722,7 @@ public:
|
|
|
722
722
|
text->styles=new FXHiliteStyle[text->numStyles];
|
|
723
723
|
for (long i=0; i<text->numStyles; i++){
|
|
724
724
|
FXHiliteStyle* ptr;
|
|
725
|
-
SWIG_ConvertPtr(rb_ary_entry(styles,i),(void **)&ptr,SWIGTYPE_p_FXHiliteStyle,
|
|
725
|
+
SWIG_ConvertPtr(rb_ary_entry(styles,i),(void **)&ptr,SWIGTYPE_p_FXHiliteStyle,SWIG_POINTER_DISOWN);
|
|
726
726
|
text->styles[i]=*ptr;
|
|
727
727
|
}
|
|
728
728
|
self->setHiliteStyles(text->styles);
|
data/swig-interfaces/freefuncs.i
CHANGED
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
%freefunc FXChore "FXRbUnregisterRubyObj";
|
|
55
55
|
%freefunc FXDC "FXRbUnregisterRubyObj";
|
|
56
56
|
%freefunc FXDCPrint "FXRbUnregisterRubyObj";
|
|
57
|
+
%freefunc FXDCWindow "FXRbUnregisterRubyObj";
|
|
57
58
|
%freefunc FXEvent "FXRbUnregisterRubyObj";
|
|
58
59
|
%freefunc FXExtentd "FXRbUnregisterRubyObj";
|
|
59
60
|
%freefunc FXExtentf "FXRbUnregisterRubyObj";
|
|
@@ -247,7 +247,7 @@ inline void* to_FXEvent(VALUE obj){
|
|
|
247
247
|
FXEventTypeInfo=SWIG_TypeQuery("FXEvent *");
|
|
248
248
|
FXASSERT(FXEventTypeInfo!=0);
|
|
249
249
|
}
|
|
250
|
-
SWIG_ConvertPtr(obj,&ptr,FXEventTypeInfo,
|
|
250
|
+
SWIG_ConvertPtr(obj,&ptr,FXEventTypeInfo,SWIG_POINTER_DISOWN);
|
|
251
251
|
return ptr;
|
|
252
252
|
}
|
|
253
253
|
%}
|
|
@@ -278,7 +278,7 @@ inline void* to_FXEvent(VALUE obj){
|
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
/* Convert a Ruby FXDirItem instance into a pointer to a C++ FXDirItem */
|
|
281
|
-
%typemap(in) void* PTR_DIRITEM "SWIG_ConvertPtr($input,&$1,SWIGTYPE_p_FXDirItem,
|
|
281
|
+
%typemap(in) void* PTR_DIRITEM "SWIG_ConvertPtr($input,&$1,SWIGTYPE_p_FXDirItem,SWIG_POINTER_DISOWN);";
|
|
282
282
|
|
|
283
283
|
%typemap(in) void* PTR_EVENT "$1 = to_FXEvent($input);";
|
|
284
284
|
|
|
@@ -293,7 +293,7 @@ inline void* to_FXEvent(VALUE obj){
|
|
|
293
293
|
|
|
294
294
|
/* Convert a Ruby FXIcon reference to a pointer to an FXIcon */
|
|
295
295
|
%typemap(in) void* PTR_ICON(void *tmp) {
|
|
296
|
-
tmp = FXRbConvertPtr($input, FXRbTypeQuery("FXIcon *"));
|
|
296
|
+
tmp = FXRbConvertPtr($input, FXRbTypeQuery("FXIcon *"), SWIG_POINTER_DISOWN);
|
|
297
297
|
$1 = (void *) &tmp;
|
|
298
298
|
}
|
|
299
299
|
|
|
@@ -329,10 +329,10 @@ inline void* to_FXEvent(VALUE obj){
|
|
|
329
329
|
%typemap(in) void* PTR_NULL "$1 = 0;";
|
|
330
330
|
|
|
331
331
|
/* Convert a Ruby FXObject instance into a pointer to a C++ FXObject */
|
|
332
|
-
%typemap(in) void* PTR_OBJECT "SWIG_ConvertPtr($input,&$1,SWIGTYPE_p_FXObject,
|
|
332
|
+
%typemap(in) void* PTR_OBJECT "SWIG_ConvertPtr($input,&$1,SWIGTYPE_p_FXObject,SWIG_POINTER_DISOWN);";
|
|
333
333
|
|
|
334
334
|
/* Convert a Ruby FXPoint instance into a pointer to a C++ FXPoint */
|
|
335
|
-
%typemap(in) void* PTR_POINT "$1 = FXRbConvertPtr($input, FXRbTypeQuery(\"FXPoint *\"));";
|
|
335
|
+
%typemap(in) void* PTR_POINT "$1 = FXRbConvertPtr($input, FXRbTypeQuery(\"FXPoint *\"), SWIG_POINTER_DISOWN);";
|
|
336
336
|
|
|
337
337
|
/* Convert a Ruby number into a pointer to an FXdouble */
|
|
338
338
|
%typemap(in) void* PTR_PDOUBLE(FXdouble value) {
|
|
@@ -353,7 +353,7 @@ inline void* to_FXEvent(VALUE obj){
|
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
/* Convert a Ruby FXTreeItem instance into a pointer to a C++ FXTreeItem */
|
|
356
|
-
%typemap(in) void* PTR_TREEITEM "SWIG_ConvertPtr($input,&$1,SWIGTYPE_p_FXTreeItem,
|
|
356
|
+
%typemap(in) void* PTR_TREEITEM "SWIG_ConvertPtr($input,&$1,SWIGTYPE_p_FXTreeItem,SWIG_POINTER_DISOWN);";
|
|
357
357
|
|
|
358
358
|
/* Convert a Ruby number into an FXuchar */
|
|
359
359
|
%typemap(in) void* PTR_UCHAR "$1 = reinterpret_cast<void*>(NUM2UINT($input));";
|
|
@@ -371,7 +371,7 @@ inline void* to_FXEvent(VALUE obj){
|
|
|
371
371
|
$1 = new FXVec3f(NUM2DBL(rb_ary_entry($input, 0)), NUM2DBL(rb_ary_entry($input, 1)), NUM2DBL(rb_ary_entry($input, 2)));
|
|
372
372
|
} else {
|
|
373
373
|
FXVec3f *p;
|
|
374
|
-
SWIG_ConvertPtr($input, (void **)&p, SWIGTYPE_p_FXVec3f,
|
|
374
|
+
SWIG_ConvertPtr($input, (void **)&p, SWIGTYPE_p_FXVec3f, SWIG_POINTER_DISOWN);
|
|
375
375
|
$1 = new FXVec3f(*p);
|
|
376
376
|
}
|
|
377
377
|
}
|
|
@@ -383,7 +383,7 @@ inline void* to_FXEvent(VALUE obj){
|
|
|
383
383
|
tmp = FXVec3f(NUM2DBL(rb_ary_entry($input, 0)), NUM2DBL(rb_ary_entry($input, 1)), NUM2DBL(rb_ary_entry($input, 2)));
|
|
384
384
|
$1 = &tmp;
|
|
385
385
|
} else {
|
|
386
|
-
|
|
386
|
+
SWIG_ConvertPtr($input, (void **) &$1, SWIGTYPE_p_FXVec3f, SWIG_POINTER_DISOWN);
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
|
|
@@ -397,7 +397,7 @@ inline void* to_FXEvent(VALUE obj){
|
|
|
397
397
|
$1 = new FXVec4f(NUM2DBL(rb_ary_entry($input, 0)), NUM2DBL(rb_ary_entry($input, 1)), NUM2DBL(rb_ary_entry($input, 2)), NUM2DBL(rb_ary_entry($input, 3)));
|
|
398
398
|
} else {
|
|
399
399
|
FXVec4f *p;
|
|
400
|
-
SWIG_ConvertPtr($input,(void **)&p,SWIGTYPE_p_FXVec4f,
|
|
400
|
+
SWIG_ConvertPtr($input,(void **)&p,SWIGTYPE_p_FXVec4f,SWIG_POINTER_DISOWN);
|
|
401
401
|
$1 = new FXVec4f(*p);
|
|
402
402
|
}
|
|
403
403
|
}
|
|
@@ -409,7 +409,7 @@ inline void* to_FXEvent(VALUE obj){
|
|
|
409
409
|
tmp = FXVec4f(NUM2DBL(rb_ary_entry($input, 0)), NUM2DBL(rb_ary_entry($input, 1)), NUM2DBL(rb_ary_entry($input, 2)), NUM2DBL(rb_ary_entry($input, 3)));
|
|
410
410
|
$1 = &tmp;
|
|
411
411
|
} else {
|
|
412
|
-
SWIG_ConvertPtr($input, (void **) &$1, SWIGTYPE_p_FXVec4f,
|
|
412
|
+
SWIG_ConvertPtr($input, (void **) &$1, SWIGTYPE_p_FXVec4f, SWIG_POINTER_DISOWN);
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
|
|
@@ -651,8 +651,8 @@ inline void* to_FXEvent(VALUE obj){
|
|
|
651
651
|
$1 = new FXPoint[RARRAY_LEN($input)];
|
|
652
652
|
$2 = static_cast<FXuint>( RARRAY_LEN($input) );
|
|
653
653
|
for (FXuint i = 0; i < $2; i++) {
|
|
654
|
-
|
|
655
|
-
|
|
654
|
+
VALUE entry = rb_ary_entry($input, i);
|
|
655
|
+
FXPoint *pPoint = (FXPoint*)FXRbConvertPtr(entry, FXRbTypeQuery("FXPoint *"), 0);
|
|
656
656
|
$1[i] = *pPoint;
|
|
657
657
|
}
|
|
658
658
|
}
|
|
@@ -666,8 +666,8 @@ inline void* to_FXEvent(VALUE obj){
|
|
|
666
666
|
$1 = new FXSegment[RARRAY_LEN($input)];
|
|
667
667
|
$2 = static_cast<FXuint>( RARRAY_LEN($input) );
|
|
668
668
|
for (FXuint i = 0; i < $2; i++) {
|
|
669
|
-
|
|
670
|
-
|
|
669
|
+
VALUE entry = rb_ary_entry($input, i);
|
|
670
|
+
FXSegment *pSeg = (FXSegment*)FXRbConvertPtr(entry, SWIGTYPE_p_FXSegment, 0);
|
|
671
671
|
$1[i] = *pSeg;
|
|
672
672
|
}
|
|
673
673
|
}
|
|
@@ -682,8 +682,8 @@ inline void* to_FXEvent(VALUE obj){
|
|
|
682
682
|
$1 = new FXRectangle[RARRAY_LEN($input)];
|
|
683
683
|
$2 = static_cast<FXuint>( RARRAY_LEN($input) );
|
|
684
684
|
for (FXuint i = 0; i < $2; i++) {
|
|
685
|
-
|
|
686
|
-
|
|
685
|
+
VALUE entry = rb_ary_entry($input, i);
|
|
686
|
+
FXRectangle *pRect = (FXRectangle*)FXRbConvertPtr(entry, SWIGTYPE_p_FXRectangle, 0);
|
|
687
687
|
$1[i] = *pRect;
|
|
688
688
|
}
|
|
689
689
|
}
|
|
@@ -698,8 +698,8 @@ inline void* to_FXEvent(VALUE obj){
|
|
|
698
698
|
$1 = new FXArc[RARRAY_LEN($input)];
|
|
699
699
|
$2 = static_cast<FXuint>( RARRAY_LEN($input) );
|
|
700
700
|
for (FXuint i = 0; i < $2; i++) {
|
|
701
|
-
|
|
702
|
-
|
|
701
|
+
VALUE entry = rb_ary_entry($input, i);
|
|
702
|
+
FXArc *pArc = (FXArc*)FXRbConvertPtr(entry, SWIGTYPE_p_FXArc, 0);
|
|
703
703
|
$1[i] = *pArc;
|
|
704
704
|
}
|
|
705
705
|
}
|
|
@@ -766,7 +766,7 @@ inline void* to_FXEvent(VALUE obj){
|
|
|
766
766
|
if (TYPE($input) == T_FIXNUM || TYPE($input) == T_BIGNUM)) {
|
|
767
767
|
$1 = reinterpret_cast<FXWindow *>(static_cast<long>(NUM2INT($input)));
|
|
768
768
|
} else {
|
|
769
|
-
SWIG_ConvertPtr($input, (void **) &$1, SWIGTYPE_p_FXWindow,
|
|
769
|
+
SWIG_ConvertPtr($input, (void **) &$1, SWIGTYPE_p_FXWindow, SWIG_POINTER_DISOWN);
|
|
770
770
|
}
|
|
771
771
|
}
|
|
772
772
|
|
data/test/TC_FXBMPImage.rb
CHANGED
|
@@ -15,7 +15,7 @@ class TC_FXBMPImage < Fox::TestCase
|
|
|
15
15
|
|
|
16
16
|
def test_image_from_pixel_data
|
|
17
17
|
img = FXBMPImage.new app
|
|
18
|
-
img.setPixels
|
|
18
|
+
img.setPixels(+"rgbaRGBA", 0, 1, 2)
|
|
19
19
|
bmp_data = FXMemoryStream.open(FXStreamSave, nil) do |outfile|
|
|
20
20
|
img.savePixels(outfile)
|
|
21
21
|
outfile.takeBuffer
|
data/test/TC_FXDC.rb
CHANGED
|
@@ -59,11 +59,23 @@ class TC_FXDC < Test::Unit::TestCase
|
|
|
59
59
|
@dc.drawLinesRel(points)
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
+
def testDrawLinesRel_TypeError
|
|
63
|
+
points = [ FXPoint.new, FXArc.new ]
|
|
64
|
+
msg = assert_raises(TypeError) { @dc.drawLinesRel(points) }
|
|
65
|
+
assert_match(/wrong.* Fox::FXArc.*expected.* Fox::FXPoint/i, msg.to_s)
|
|
66
|
+
end
|
|
67
|
+
|
|
62
68
|
def testDrawLineSegments
|
|
63
69
|
segments = [ FXSegment.new, FXSegment.new ]
|
|
64
70
|
@dc.drawLineSegments(segments)
|
|
65
71
|
end
|
|
66
72
|
|
|
73
|
+
def testDrawLineSegments_TypeError
|
|
74
|
+
segments = [ FXSegment.new, FXPoint.new ]
|
|
75
|
+
msg = assert_raises(TypeError) { @dc.drawLineSegments(segments) }
|
|
76
|
+
assert_match(/wrong.* Fox::FXPoint.*expected.* Fox::FXSegment/i, msg.to_s)
|
|
77
|
+
end
|
|
78
|
+
|
|
67
79
|
def testDrawArc
|
|
68
80
|
x, y, w, h, ang1, ang2 = 0, 0, 10, 10, 45, 135
|
|
69
81
|
@dc.drawArc(x, y, w, h, ang1, ang2)
|
|
@@ -74,6 +86,12 @@ class TC_FXDC < Test::Unit::TestCase
|
|
|
74
86
|
@dc.drawArcs(arcs)
|
|
75
87
|
end
|
|
76
88
|
|
|
89
|
+
def testDrawArcs_TypeError
|
|
90
|
+
arcs = [ FXPoint.new, FXPoint.new ]
|
|
91
|
+
msg = assert_raises(TypeError) { @dc.drawArcs(arcs) }
|
|
92
|
+
assert_match(/wrong.* Fox::FXPoint.*expected.* Fox::FXArc/i, msg.to_s)
|
|
93
|
+
end
|
|
94
|
+
|
|
77
95
|
def testFillRectangle
|
|
78
96
|
x, y, w, h = 0, 0, 20, 20
|
|
79
97
|
@dc.fillRectangle(x, y, w, h)
|
|
@@ -84,6 +102,12 @@ class TC_FXDC < Test::Unit::TestCase
|
|
|
84
102
|
@dc.fillRectangles(rectangles)
|
|
85
103
|
end
|
|
86
104
|
|
|
105
|
+
def testFillRectangles_TypeError
|
|
106
|
+
rectangles = [ FXRectangle.new, FXPoint.new ]
|
|
107
|
+
msg = assert_raises(TypeError) { @dc.fillRectangles(rectangles) }
|
|
108
|
+
assert_match(/wrong.* Fox::FXPoint.*expected.* Fox::FXRectangle/i, msg.to_s)
|
|
109
|
+
end
|
|
110
|
+
|
|
87
111
|
def testFillArc
|
|
88
112
|
x, y, w, h, ang1, ang2 = 0, 0, 10, 10, 45, 135
|
|
89
113
|
@dc.fillArc(x, y, w, h, ang1, ang2)
|