fxruby 1.6.19 → 1.6.20
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +10 -0
- data/Manifest.txt +922 -0
- data/{LICENSE → README.txt} +27 -1
- data/Rakefile +191 -0
- data/TODO +47 -0
- data/doap.rdf +87 -0
- data/examples/icons/bluebullet14x14.gif +0 -0
- data/examples/icons/transpbullet14x14.gif +0 -0
- data/ext/fox16/FXRbApp.cpp +2 -2
- data/ext/fox16/FXRbDataTarget.cpp +2 -2
- data/ext/fox16/FXRbGLViewer.cpp +2 -2
- data/ext/fox16/FXRuby.cpp +7 -3
- data/ext/fox16/extconf.rb +18 -85
- data/ext/fox16/impl.cpp +0 -0
- data/ext/fox16/include/FXMemoryBuffer.h +2 -2
- data/ext/fox16/include/FXRb4Splitter.h +2 -2
- data/ext/fox16/include/FXRb7Segment.h +2 -2
- data/ext/fox16/include/FXRbAccelTable.h +2 -2
- data/ext/fox16/include/FXRbApp.h +2 -2
- data/ext/fox16/include/FXRbAppVirtuals.h +0 -0
- data/ext/fox16/include/FXRbArrowButton.h +2 -2
- data/ext/fox16/include/FXRbBMPIcon.h +2 -2
- data/ext/fox16/include/FXRbBMPImage.h +2 -2
- data/ext/fox16/include/FXRbBitmap.h +2 -2
- data/ext/fox16/include/FXRbBitmapFrame.h +1 -1
- data/ext/fox16/include/FXRbBitmapView.h +2 -2
- data/ext/fox16/include/FXRbBitmapVirtuals.h +0 -0
- data/ext/fox16/include/FXRbButton.h +2 -2
- data/ext/fox16/include/FXRbCURCursor.h +2 -2
- data/ext/fox16/include/FXRbCanvas.h +2 -2
- data/ext/fox16/include/FXRbCheckButton.h +2 -2
- data/ext/fox16/include/FXRbChoiceBox.h +1 -1
- data/ext/fox16/include/FXRbColorBar.h +2 -2
- data/ext/fox16/include/FXRbColorDialog.h +2 -2
- data/ext/fox16/include/FXRbColorList.h +2 -2
- data/ext/fox16/include/FXRbColorRing.h +2 -2
- data/ext/fox16/include/FXRbColorSelector.h +2 -2
- data/ext/fox16/include/FXRbColorWell.h +2 -2
- data/ext/fox16/include/FXRbColorWheel.h +2 -2
- data/ext/fox16/include/FXRbComboBox.h +2 -2
- data/ext/fox16/include/FXRbCommon.h +2 -2
- data/ext/fox16/include/FXRbComposite.h +2 -2
- data/ext/fox16/include/FXRbCursor.h +2 -2
- data/ext/fox16/include/FXRbCursorVirtuals.h +0 -0
- data/ext/fox16/include/FXRbDC.h +2 -2
- data/ext/fox16/include/FXRbDCPrint.h +2 -2
- data/ext/fox16/include/FXRbDCVirtuals.h +0 -0
- data/ext/fox16/include/FXRbDCWindow.h +2 -2
- data/ext/fox16/include/FXRbDataTarget.h +2 -2
- data/ext/fox16/include/FXRbDebugTarget.h +2 -2
- data/ext/fox16/include/FXRbDelegator.h +2 -2
- data/ext/fox16/include/FXRbDial.h +2 -2
- data/ext/fox16/include/FXRbDialogBox.h +2 -2
- data/ext/fox16/include/FXRbDialogBoxVirtuals.h +0 -0
- data/ext/fox16/include/FXRbDict.h +2 -2
- data/ext/fox16/include/FXRbDirBox.h +2 -2
- data/ext/fox16/include/FXRbDirDialog.h +2 -2
- data/ext/fox16/include/FXRbDirList.h +2 -2
- data/ext/fox16/include/FXRbDirSelector.h +2 -2
- data/ext/fox16/include/FXRbDockBar.h +1 -1
- data/ext/fox16/include/FXRbDockBarVirtuals.h +0 -0
- data/ext/fox16/include/FXRbDockHandler.h +2 -2
- data/ext/fox16/include/FXRbDockSite.h +0 -0
- data/ext/fox16/include/FXRbDockSiteVirtuals.h +0 -0
- data/ext/fox16/include/FXRbDockTitle.h +2 -2
- data/ext/fox16/include/FXRbDocument.h +2 -2
- data/ext/fox16/include/FXRbDragCorner.h +2 -2
- data/ext/fox16/include/FXRbDrawable.h +2 -2
- data/ext/fox16/include/FXRbDrawableVirtuals.h +0 -0
- data/ext/fox16/include/FXRbDriveBox.h +2 -2
- data/ext/fox16/include/FXRbFileDialog.h +2 -2
- data/ext/fox16/include/FXRbFileDict.h +2 -2
- data/ext/fox16/include/FXRbFileDictVirtuals.h +0 -0
- data/ext/fox16/include/FXRbFileList.h +2 -2
- data/ext/fox16/include/FXRbFileSelector.h +2 -2
- data/ext/fox16/include/FXRbFoldingItemVirtuals.h +0 -0
- data/ext/fox16/include/FXRbFoldingList.h +2 -2
- data/ext/fox16/include/FXRbFoldingListVirtuals.h +0 -0
- data/ext/fox16/include/FXRbFont.h +2 -2
- data/ext/fox16/include/FXRbFontDialog.h +2 -2
- data/ext/fox16/include/FXRbFontSelector.h +2 -2
- data/ext/fox16/include/FXRbFontVirtuals.h +0 -0
- data/ext/fox16/include/FXRbFrame.h +2 -2
- data/ext/fox16/include/FXRbGIFCursor.h +2 -2
- data/ext/fox16/include/FXRbGIFIcon.h +2 -2
- data/ext/fox16/include/FXRbGIFImage.h +2 -2
- data/ext/fox16/include/FXRbGLCanvas.h +2 -2
- data/ext/fox16/include/FXRbGLCanvasVirtuals.h +0 -0
- data/ext/fox16/include/FXRbGLContext.h +2 -2
- data/ext/fox16/include/FXRbGLObject.h +2 -2
- data/ext/fox16/include/FXRbGLObjectVirtuals.h +0 -0
- data/ext/fox16/include/FXRbGLShape.h +2 -2
- data/ext/fox16/include/FXRbGLShapeVirtuals.h +0 -0
- data/ext/fox16/include/FXRbGLViewer.h +2 -2
- data/ext/fox16/include/FXRbGLViewerVirtuals.h +0 -0
- data/ext/fox16/include/FXRbGLVisual.h +2 -2
- data/ext/fox16/include/FXRbGradientBar.h +1 -1
- data/ext/fox16/include/FXRbGroupBox.h +2 -2
- data/ext/fox16/include/FXRbHeader.h +2 -2
- data/ext/fox16/include/FXRbHeaderItemVirtuals.h +0 -0
- data/ext/fox16/include/FXRbHorizontalFrame.h +2 -2
- data/ext/fox16/include/FXRbICOIcon.h +2 -2
- data/ext/fox16/include/FXRbICOImage.h +2 -2
- data/ext/fox16/include/FXRbIcon.h +2 -2
- data/ext/fox16/include/FXRbIconItemVirtuals.h +0 -0
- data/ext/fox16/include/FXRbIconList.h +2 -2
- data/ext/fox16/include/FXRbIconListVirtuals.h +0 -0
- data/ext/fox16/include/FXRbIconSource.h +2 -2
- data/ext/fox16/include/FXRbIconSourceVirtuals.h +0 -0
- data/ext/fox16/include/FXRbId.h +2 -2
- data/ext/fox16/include/FXRbIdVirtuals.h +0 -0
- data/ext/fox16/include/FXRbImage.h +2 -2
- data/ext/fox16/include/FXRbImageFrame.h +1 -1
- data/ext/fox16/include/FXRbImageView.h +2 -2
- data/ext/fox16/include/FXRbImageVirtuals.h +0 -0
- data/ext/fox16/include/FXRbInputDialog.h +2 -2
- data/ext/fox16/include/FXRbJPGIcon.h +2 -2
- data/ext/fox16/include/FXRbJPGImage.h +2 -2
- data/ext/fox16/include/FXRbKnob.h +2 -2
- data/ext/fox16/include/FXRbLabel.h +2 -2
- data/ext/fox16/include/FXRbList.h +2 -2
- data/ext/fox16/include/FXRbListBox.h +2 -2
- data/ext/fox16/include/FXRbListBoxVirtuals.h +0 -0
- data/ext/fox16/include/FXRbListItemVirtuals.h +0 -0
- data/ext/fox16/include/FXRbListVirtuals.h +0 -0
- data/ext/fox16/include/FXRbMDIButton.h +2 -2
- data/ext/fox16/include/FXRbMDIChild.h +2 -2
- data/ext/fox16/include/FXRbMDIChildVirtuals.h +0 -0
- data/ext/fox16/include/FXRbMDIClient.h +2 -2
- data/ext/fox16/include/FXRbMDIClientVirtuals.h +0 -0
- data/ext/fox16/include/FXRbMainWindow.h +2 -2
- data/ext/fox16/include/FXRbMatrix.h +2 -2
- data/ext/fox16/include/FXRbMenuBar.h +1 -1
- data/ext/fox16/include/FXRbMenuButton.h +2 -2
- data/ext/fox16/include/FXRbMenuCaption.h +2 -2
- data/ext/fox16/include/FXRbMenuCascade.h +2 -2
- data/ext/fox16/include/FXRbMenuCheck.h +1 -1
- data/ext/fox16/include/FXRbMenuCommand.h +2 -2
- data/ext/fox16/include/FXRbMenuPane.h +2 -2
- data/ext/fox16/include/FXRbMenuRadio.h +1 -1
- data/ext/fox16/include/FXRbMenuSeparator.h +2 -2
- data/ext/fox16/include/FXRbMenuTitle.h +2 -2
- data/ext/fox16/include/FXRbMessageBox.h +2 -2
- data/ext/fox16/include/FXRbObject.h +2 -2
- data/ext/fox16/include/FXRbObjectVirtuals.h +0 -0
- data/ext/fox16/include/FXRbOptionMenu.h +2 -2
- data/ext/fox16/include/FXRbPCXIcon.h +2 -2
- data/ext/fox16/include/FXRbPCXImage.h +2 -2
- data/ext/fox16/include/FXRbPNGIcon.h +2 -2
- data/ext/fox16/include/FXRbPNGImage.h +2 -2
- data/ext/fox16/include/FXRbPPMIcon.h +2 -2
- data/ext/fox16/include/FXRbPPMImage.h +2 -2
- data/ext/fox16/include/FXRbPacker.h +2 -2
- data/ext/fox16/include/FXRbPicker.h +2 -2
- data/ext/fox16/include/FXRbPopup.h +2 -2
- data/ext/fox16/include/FXRbPopupVirtuals.h +0 -0
- data/ext/fox16/include/FXRbPrintDialog.h +2 -2
- data/ext/fox16/include/FXRbProgressBar.h +2 -2
- data/ext/fox16/include/FXRbProgressDialog.h +2 -2
- data/ext/fox16/include/FXRbRGBIcon.h +2 -2
- data/ext/fox16/include/FXRbRGBImage.h +2 -2
- data/ext/fox16/include/FXRbRadioButton.h +2 -2
- data/ext/fox16/include/FXRbRealSlider.h +2 -2
- data/ext/fox16/include/FXRbRealSpinner.h +2 -2
- data/ext/fox16/include/FXRbRealSpinnerVirtuals.h +0 -0
- data/ext/fox16/include/FXRbRecentFiles.h +2 -2
- data/ext/fox16/include/FXRbRegistry.h +2 -2
- data/ext/fox16/include/FXRbReplaceDialog.h +2 -2
- data/ext/fox16/include/FXRbRootWindow.h +2 -2
- data/ext/fox16/include/FXRbRuler.h +1 -1
- data/ext/fox16/include/FXRbRulerView.h +1 -1
- data/ext/fox16/include/FXRbScintilla.h +2 -2
- data/ext/fox16/include/FXRbScrollArea.h +2 -2
- data/ext/fox16/include/FXRbScrollAreaVirtuals.h +0 -0
- data/ext/fox16/include/FXRbScrollBar.h +1 -1
- data/ext/fox16/include/FXRbScrollPane.h +2 -2
- data/ext/fox16/include/FXRbScrollWindow.h +2 -2
- data/ext/fox16/include/FXRbSearchDialog.h +2 -2
- data/ext/fox16/include/FXRbSeparator.h +2 -2
- data/ext/fox16/include/FXRbSettings.h +2 -2
- data/ext/fox16/include/FXRbShell.h +2 -2
- data/ext/fox16/include/FXRbShutter.h +2 -2
- data/ext/fox16/include/FXRbShutterVirtuals.h +0 -0
- data/ext/fox16/include/FXRbSlider.h +2 -2
- data/ext/fox16/include/FXRbSpinner.h +2 -2
- data/ext/fox16/include/FXRbSpinnerVirtuals.h +0 -0
- data/ext/fox16/include/FXRbSplashWindow.h +2 -2
- data/ext/fox16/include/FXRbSplitter.h +2 -2
- data/ext/fox16/include/FXRbSpring.h +2 -2
- data/ext/fox16/include/FXRbStatusBar.h +1 -1
- data/ext/fox16/include/FXRbStatusLine.h +1 -1
- data/ext/fox16/include/FXRbStream.h +2 -2
- data/ext/fox16/include/FXRbStreamVirtuals.h +0 -0
- data/ext/fox16/include/FXRbStringDict.h +2 -2
- data/ext/fox16/include/FXRbSwitcher.h +2 -2
- data/ext/fox16/include/FXRbTGAIcon.h +2 -2
- data/ext/fox16/include/FXRbTGAImage.h +2 -2
- data/ext/fox16/include/FXRbTIFIcon.h +2 -2
- data/ext/fox16/include/FXRbTIFImage.h +2 -2
- data/ext/fox16/include/FXRbTabBar.h +2 -2
- data/ext/fox16/include/FXRbTabBarVirtuals.h +0 -0
- data/ext/fox16/include/FXRbTabBook.h +2 -2
- data/ext/fox16/include/FXRbTabItem.h +2 -2
- data/ext/fox16/include/FXRbTable.h +2 -2
- data/ext/fox16/include/FXRbTableItemVirtuals.h +0 -0
- data/ext/fox16/include/FXRbTableVirtuals.h +0 -0
- data/ext/fox16/include/FXRbText.h +2 -2
- data/ext/fox16/include/FXRbTextField.h +2 -2
- data/ext/fox16/include/FXRbTextVirtuals.h +0 -0
- data/ext/fox16/include/FXRbToggleButton.h +2 -2
- data/ext/fox16/include/FXRbToolBar.h +1 -1
- data/ext/fox16/include/FXRbToolBarGrip.h +1 -1
- data/ext/fox16/include/FXRbToolBarShell.h +1 -1
- data/ext/fox16/include/FXRbToolBarTab.h +1 -1
- data/ext/fox16/include/FXRbToolTip.h +1 -1
- data/ext/fox16/include/FXRbTopWindow.h +2 -2
- data/ext/fox16/include/FXRbTopWindowVirtuals.h +0 -0
- data/ext/fox16/include/FXRbTranslator.h +2 -2
- data/ext/fox16/include/FXRbTranslatorVirtuals.h +0 -0
- data/ext/fox16/include/FXRbTreeItemVirtuals.h +0 -0
- data/ext/fox16/include/FXRbTreeList.h +2 -2
- data/ext/fox16/include/FXRbTreeListBox.h +2 -2
- data/ext/fox16/include/FXRbTreeListBoxVirtuals.h +0 -0
- data/ext/fox16/include/FXRbTreeListVirtuals.h +0 -0
- data/ext/fox16/include/FXRbTriStateButton.h +2 -2
- data/ext/fox16/include/FXRbVerticalFrame.h +2 -2
- data/ext/fox16/include/FXRbVisual.h +2 -2
- data/ext/fox16/include/FXRbWindow.h +2 -2
- data/ext/fox16/include/FXRbWindowVirtuals.h +0 -0
- data/ext/fox16/include/FXRbWizard.h +1 -1
- data/ext/fox16/include/FXRbXBMIcon.h +2 -2
- data/ext/fox16/include/FXRbXBMImage.h +2 -2
- data/ext/fox16/include/FXRbXPMIcon.h +2 -2
- data/ext/fox16/include/FXRbXPMImage.h +2 -2
- data/ext/fox16/include/FXRuby.h +2 -2
- data/ext/fox16/include/impl.h +2 -2
- data/ext/fox16/make_impl.rb +121 -0
- data/ext/fox16/markfuncs.cpp +0 -0
- data/lib/fox16.rb +8 -0
- data/lib/fox16/bitmapview.rb +223 -0
- data/lib/fox16/scintilla.rb +103 -3
- data/lib/fox16/version.rb +1 -5
- data/rdoc-sources/Makefile +23 -0
- data/scripts/build-fox.rb +31 -0
- data/scripts/generate_kwargs_lib.rb +414 -0
- data/scripts/iface.rb +391 -0
- data/swig-interfaces/FX4Splitter.i +149 -0
- data/swig-interfaces/FX7Segment.i +141 -0
- data/swig-interfaces/FXAccelTable.i +100 -0
- data/swig-interfaces/FXApp.i +735 -0
- data/swig-interfaces/FXArrowButton.i +136 -0
- data/swig-interfaces/FXBMPIcon.i +88 -0
- data/swig-interfaces/FXBMPImage.i +54 -0
- data/swig-interfaces/FXBitmap.i +90 -0
- data/swig-interfaces/FXBitmapFrame.i +72 -0
- data/swig-interfaces/FXBitmapView.i +94 -0
- data/swig-interfaces/FXButton.i +130 -0
- data/swig-interfaces/FXCURCursor.i +49 -0
- data/swig-interfaces/FXCanvas.i +61 -0
- data/swig-interfaces/FXCheckButton.i +108 -0
- data/swig-interfaces/FXChoiceBox.i +91 -0
- data/swig-interfaces/FXColorBar.i +110 -0
- data/swig-interfaces/FXColorDialog.i +79 -0
- data/swig-interfaces/FXColorList.i +99 -0
- data/swig-interfaces/FXColorRing.i +148 -0
- data/swig-interfaces/FXColorSelector.i +157 -0
- data/swig-interfaces/FXColorWell.i +133 -0
- data/swig-interfaces/FXColorWheel.i +108 -0
- data/swig-interfaces/FXComboBox.i +280 -0
- data/swig-interfaces/FXComposeContext.i +66 -0
- data/swig-interfaces/FXComposite.i +103 -0
- data/swig-interfaces/FXCursor.i +120 -0
- data/swig-interfaces/FXDC.i +280 -0
- data/swig-interfaces/FXDCPrint.i +141 -0
- data/swig-interfaces/FXDCWindow.i +75 -0
- data/swig-interfaces/FXDataTarget.i +115 -0
- data/swig-interfaces/FXDebugTarget.i +60 -0
- data/swig-interfaces/FXDelegator.i +56 -0
- data/swig-interfaces/FXDial.i +168 -0
- data/swig-interfaces/FXDialogBox.i +131 -0
- data/swig-interfaces/FXDict.i +200 -0
- data/swig-interfaces/FXDirBox.i +68 -0
- data/swig-interfaces/FXDirDialog.i +97 -0
- data/swig-interfaces/FXDirList.i +274 -0
- data/swig-interfaces/FXDirSelector.i +142 -0
- data/swig-interfaces/FXDockBar.i +180 -0
- data/swig-interfaces/FXDockHandler.i +94 -0
- data/swig-interfaces/FXDockSite.i +91 -0
- data/swig-interfaces/FXDockTitle.i +91 -0
- data/swig-interfaces/FXDocument.i +70 -0
- data/swig-interfaces/FXDragCorner.i +72 -0
- data/swig-interfaces/FXDrawable.i +90 -0
- data/swig-interfaces/FXDriveBox.i +63 -0
- data/swig-interfaces/FXExtentd.i +131 -0
- data/swig-interfaces/FXExtentf.i +131 -0
- data/swig-interfaces/FXFileDialog.i +268 -0
- data/swig-interfaces/FXFileDict.i +121 -0
- data/swig-interfaces/FXFileList.i +345 -0
- data/swig-interfaces/FXFileSelector.i +347 -0
- data/swig-interfaces/FXFileStream.i +49 -0
- data/swig-interfaces/FXFoldingList.i +556 -0
- data/swig-interfaces/FXFont.i +333 -0
- data/swig-interfaces/FXFontDialog.i +63 -0
- data/swig-interfaces/FXFontSelector.i +127 -0
- data/swig-interfaces/FXFrame.i +245 -0
- data/swig-interfaces/FXGIFCursor.i +86 -0
- data/swig-interfaces/FXGIFIcon.i +54 -0
- data/swig-interfaces/FXGIFImage.i +54 -0
- data/swig-interfaces/FXGLCanvas.i +90 -0
- data/swig-interfaces/FXGLContext.i +85 -0
- data/swig-interfaces/FXGLObject.i +70 -0
- data/swig-interfaces/FXGLShape.i +152 -0
- data/swig-interfaces/FXGLViewer.i +691 -0
- data/swig-interfaces/FXGLVisual.i +136 -0
- data/swig-interfaces/FXGradientBar.i +310 -0
- data/swig-interfaces/FXGroupBox.i +94 -0
- data/swig-interfaces/FXHeader.i +432 -0
- data/swig-interfaces/FXHorizontalFrame.i +60 -0
- data/swig-interfaces/FXICOIcon.i +92 -0
- data/swig-interfaces/FXICOImage.i +54 -0
- data/swig-interfaces/FXIcon.i +128 -0
- data/swig-interfaces/FXIconDict.i +90 -0
- data/swig-interfaces/FXIconList.i +596 -0
- data/swig-interfaces/FXIconSource.i +55 -0
- data/swig-interfaces/FXId.i +103 -0
- data/swig-interfaces/FXImage.i +197 -0
- data/swig-interfaces/FXImageFrame.i +66 -0
- data/swig-interfaces/FXImageView.i +88 -0
- data/swig-interfaces/FXInputDialog.i +180 -0
- data/swig-interfaces/FXJPGIcon.i +101 -0
- data/swig-interfaces/FXJPGImage.i +67 -0
- data/swig-interfaces/FXKnob.i +182 -0
- data/swig-interfaces/FXLabel.i +199 -0
- data/swig-interfaces/FXList.i +476 -0
- data/swig-interfaces/FXListBox.i +234 -0
- data/swig-interfaces/FXMDIButton.i +173 -0
- data/swig-interfaces/FXMDIChild.i +242 -0
- data/swig-interfaces/FXMDIClient.i +149 -0
- data/swig-interfaces/FXMainWindow.i +53 -0
- data/swig-interfaces/FXMat3d.i +102 -0
- data/swig-interfaces/FXMat3f.i +102 -0
- data/swig-interfaces/FXMat4d.i +122 -0
- data/swig-interfaces/FXMat4f.i +138 -0
- data/swig-interfaces/FXMatrix.i +101 -0
- data/swig-interfaces/FXMemoryBuffer.i +64 -0
- data/swig-interfaces/FXMemoryStream.i +73 -0
- data/swig-interfaces/FXMenuBar.i +67 -0
- data/swig-interfaces/FXMenuButton.i +152 -0
- data/swig-interfaces/FXMenuCaption.i +176 -0
- data/swig-interfaces/FXMenuCascade.i +76 -0
- data/swig-interfaces/FXMenuCheck.i +90 -0
- data/swig-interfaces/FXMenuCommand.i +69 -0
- data/swig-interfaces/FXMenuPane.i +60 -0
- data/swig-interfaces/FXMenuRadio.i +93 -0
- data/swig-interfaces/FXMenuSeparator.i +65 -0
- data/swig-interfaces/FXMenuTitle.i +74 -0
- data/swig-interfaces/FXMessageBox.i +128 -0
- data/swig-interfaces/FXObject.i +169 -0
- data/swig-interfaces/FXOptionMenu.i +140 -0
- data/swig-interfaces/FXPCXIcon.i +91 -0
- data/swig-interfaces/FXPCXImage.i +55 -0
- data/swig-interfaces/FXPNGIcon.i +95 -0
- data/swig-interfaces/FXPNGImage.i +59 -0
- data/swig-interfaces/FXPPMIcon.i +91 -0
- data/swig-interfaces/FXPPMImage.i +55 -0
- data/swig-interfaces/FXPacker.i +255 -0
- data/swig-interfaces/FXPicker.i +54 -0
- data/swig-interfaces/FXPoint.i +52 -0
- data/swig-interfaces/FXPopup.i +162 -0
- data/swig-interfaces/FXPrintDialog.i +154 -0
- data/swig-interfaces/FXProgressBar.i +133 -0
- data/swig-interfaces/FXProgressDialog.i +105 -0
- data/swig-interfaces/FXQuatd.i +128 -0
- data/swig-interfaces/FXQuatf.i +122 -0
- data/swig-interfaces/FXRGBIcon.i +90 -0
- data/swig-interfaces/FXRGBImage.i +56 -0
- data/swig-interfaces/FXRadioButton.i +117 -0
- data/swig-interfaces/FXRanged.i +163 -0
- data/swig-interfaces/FXRangef.i +172 -0
- data/swig-interfaces/FXRealSlider.i +166 -0
- data/swig-interfaces/FXRealSpinner.i +215 -0
- data/swig-interfaces/FXRecentFiles.i +119 -0
- data/swig-interfaces/FXRectangle.i +104 -0
- data/swig-interfaces/FXRegion.i +88 -0
- data/swig-interfaces/FXRegistry.i +96 -0
- data/swig-interfaces/FXReplaceDialog.i +131 -0
- data/swig-interfaces/FXRootWindow.i +50 -0
- data/swig-interfaces/FXRuler.i +245 -0
- data/swig-interfaces/FXRulerView.i +233 -0
- data/swig-interfaces/FXScintilla.i +192 -0
- data/swig-interfaces/FXScrollArea.i +211 -0
- data/swig-interfaces/FXScrollBar.i +178 -0
- data/swig-interfaces/FXScrollPane.i +83 -0
- data/swig-interfaces/FXScrollWindow.i +67 -0
- data/swig-interfaces/FXSearchDialog.i +48 -0
- data/swig-interfaces/FXSeparator.i +138 -0
- data/swig-interfaces/FXSettings.i +160 -0
- data/swig-interfaces/FXShell.i +91 -0
- data/swig-interfaces/FXShutter.i +140 -0
- data/swig-interfaces/FXSize.i +71 -0
- data/swig-interfaces/FXSlider.i +181 -0
- data/swig-interfaces/FXSphered.i +126 -0
- data/swig-interfaces/FXSpheref.i +126 -0
- data/swig-interfaces/FXSpinner.i +212 -0
- data/swig-interfaces/FXSplashWindow.i +82 -0
- data/swig-interfaces/FXSplitter.i +123 -0
- data/swig-interfaces/FXSpring.i +79 -0
- data/swig-interfaces/FXStatusBar.i +68 -0
- data/swig-interfaces/FXStatusLine.i +100 -0
- data/swig-interfaces/FXStream.i +150 -0
- data/swig-interfaces/FXStringDict.i +61 -0
- data/swig-interfaces/FXSwitcher.i +110 -0
- data/swig-interfaces/FXTGAIcon.i +85 -0
- data/swig-interfaces/FXTGAImage.i +56 -0
- data/swig-interfaces/FXTIFIcon.i +73 -0
- data/swig-interfaces/FXTIFImage.i +93 -0
- data/swig-interfaces/FXTabBar.i +121 -0
- data/swig-interfaces/FXTabBook.i +70 -0
- data/swig-interfaces/FXTabItem.i +82 -0
- data/swig-interfaces/FXTable.i +861 -0
- data/swig-interfaces/FXText.i +763 -0
- data/swig-interfaces/FXTextField.i +290 -0
- data/swig-interfaces/FXToggleButton.i +136 -0
- data/swig-interfaces/FXToolBar.i +75 -0
- data/swig-interfaces/FXToolBarGrip.i +82 -0
- data/swig-interfaces/FXToolBarShell.i +98 -0
- data/swig-interfaces/FXToolBarTab.i +114 -0
- data/swig-interfaces/FXToolTip.i +93 -0
- data/swig-interfaces/FXTopWindow.i +263 -0
- data/swig-interfaces/FXTranslator.i +55 -0
- data/swig-interfaces/FXTreeList.i +549 -0
- data/swig-interfaces/FXTreeListBox.i +317 -0
- data/swig-interfaces/FXTriStateButton.i +77 -0
- data/swig-interfaces/FXURL.i +35 -0
- data/swig-interfaces/FXVec2d.i +87 -0
- data/swig-interfaces/FXVec2f.i +87 -0
- data/swig-interfaces/FXVec3d.i +111 -0
- data/swig-interfaces/FXVec3f.i +109 -0
- data/swig-interfaces/FXVec4d.i +115 -0
- data/swig-interfaces/FXVec4f.i +115 -0
- data/swig-interfaces/FXVerticalFrame.i +69 -0
- data/swig-interfaces/FXVisual.i +162 -0
- data/swig-interfaces/FXWindow.i +851 -0
- data/swig-interfaces/FXWizard.i +125 -0
- data/swig-interfaces/FXXBMIcon.i +56 -0
- data/swig-interfaces/FXXBMImage.i +118 -0
- data/swig-interfaces/FXXPMIcon.i +122 -0
- data/swig-interfaces/FXXPMImage.i +56 -0
- data/swig-interfaces/README +17 -0
- data/swig-interfaces/common.i +48 -0
- data/swig-interfaces/core.i +85 -0
- data/swig-interfaces/dcmodule.i +36 -0
- data/swig-interfaces/dialogs.i +49 -0
- data/swig-interfaces/exceptions.i +249 -0
- data/swig-interfaces/framesmodule.i +54 -0
- data/swig-interfaces/freefuncs.i +93 -0
- data/swig-interfaces/fx3d.i +60 -0
- data/swig-interfaces/fxdefs.i +419 -0
- data/swig-interfaces/handlers.i +615 -0
- data/swig-interfaces/iconlistmodule.i +37 -0
- data/swig-interfaces/icons.i +48 -0
- data/swig-interfaces/ignore-message-handlers.rb +16 -0
- data/swig-interfaces/image.i +49 -0
- data/swig-interfaces/labelmodule.i +47 -0
- data/swig-interfaces/layout.i +47 -0
- data/swig-interfaces/listmodule.i +37 -0
- data/swig-interfaces/macros.i +1326 -0
- data/swig-interfaces/markfuncs.i +210 -0
- data/swig-interfaces/mdi.i +38 -0
- data/swig-interfaces/menumodule.i +44 -0
- data/swig-interfaces/ruby-typemaps.i +772 -0
- data/swig-interfaces/scintilla.i +57 -0
- data/swig-interfaces/table-module.i +36 -0
- data/swig-interfaces/text-module.i +36 -0
- data/swig-interfaces/treelist-module.i +37 -0
- data/swig-interfaces/ui.i +63 -0
- data/{tests → test}/README +0 -0
- data/{tests → test}/TC_FXAccelTable.rb +0 -0
- data/{tests → test}/TC_FXApp.rb +0 -0
- data/{tests → test}/TC_FXArc.rb +0 -0
- data/{tests → test}/TC_FXBMPIcon.rb +0 -0
- data/{tests → test}/TC_FXBMPImage.rb +0 -0
- data/{tests → test}/TC_FXButton.rb +0 -0
- data/{tests → test}/TC_FXCheckButton.rb +0 -0
- data/{tests → test}/TC_FXComboBox.rb +0 -0
- data/{tests → test}/TC_FXDC.rb +0 -0
- data/{tests → test}/TC_FXDCPrint.rb +0 -0
- data/{tests → test}/TC_FXDCWindow.rb +0 -0
- data/{tests → test}/TC_FXDataTarget.rb +0 -0
- data/{tests → test}/TC_FXDialogBox.rb +0 -0
- data/{tests → test}/TC_FXDirList.rb +0 -0
- data/{tests → test}/TC_FXExtentd.rb +0 -0
- data/{tests → test}/TC_FXExtentf.rb +0 -0
- data/{tests → test}/TC_FXFileAssoc.rb +0 -0
- data/{tests → test}/TC_FXFileStream.rb +0 -0
- data/{tests → test}/TC_FXFoldingList.rb +0 -0
- data/{tests → test}/TC_FXFont.rb +0 -0
- data/{tests → test}/TC_FXFontDesc.rb +0 -0
- data/{tests → test}/TC_FXGLGroup.rb +0 -0
- data/{tests → test}/TC_FXGLShape.rb +0 -0
- data/{tests → test}/TC_FXGLViewer.rb +0 -0
- data/{tests → test}/TC_FXGradientBar.rb +0 -0
- data/{tests → test}/TC_FXHeader.rb +0 -0
- data/{tests → test}/TC_FXHiliteStyle.rb +0 -0
- data/{tests → test}/TC_FXIconDict.rb +0 -0
- data/{tests → test}/TC_FXIconList.rb +0 -0
- data/{tests → test}/TC_FXId.rb +0 -0
- data/{tests → test}/TC_FXImage.rb +0 -0
- data/{tests → test}/TC_FXLight.rb +0 -0
- data/{tests → test}/TC_FXList.rb +0 -0
- data/{tests → test}/TC_FXListBox.rb +0 -0
- data/{tests → test}/TC_FXMainWindow.rb +0 -0
- data/{tests → test}/TC_FXMat4f.rb +0 -0
- data/{tests → test}/TC_FXMaterial.rb +0 -0
- data/{tests → test}/TC_FXMemoryStream.rb +0 -0
- data/{tests → test}/TC_FXMenuCheck.rb +0 -0
- data/{tests → test}/TC_FXMenuCommand.rb +0 -0
- data/{tests → test}/TC_FXMenuRadio.rb +0 -0
- data/{tests → test}/TC_FXMessageBox.rb +0 -0
- data/{tests → test}/TC_FXPoint.rb +0 -0
- data/{tests → test}/TC_FXQuatf.rb +0 -0
- data/{tests → test}/TC_FXRadioButton.rb +0 -0
- data/{tests → test}/TC_FXRanged.rb +0 -0
- data/{tests → test}/TC_FXRangef.rb +0 -0
- data/{tests → test}/TC_FXRectangle.rb +0 -0
- data/{tests → test}/TC_FXRegion.rb +0 -0
- data/{tests → test}/TC_FXRegistry.rb +0 -0
- data/{tests → test}/TC_FXScrollArea.rb +0 -0
- data/{tests → test}/TC_FXScrollWindow.rb +0 -0
- data/{tests → test}/TC_FXSegment.rb +0 -0
- data/{tests → test}/TC_FXSettings.rb +0 -0
- data/{tests → test}/TC_FXShell.rb +0 -0
- data/{tests → test}/TC_FXSize.rb +0 -0
- data/{tests → test}/TC_FXStream.rb +0 -0
- data/{tests → test}/TC_FXTable.rb +0 -0
- data/{tests → test}/TC_FXTableItem.rb +0 -0
- data/{tests → test}/TC_FXText.rb +0 -0
- data/{tests → test}/TC_FXTopWindow.rb +0 -0
- data/{tests → test}/TC_FXTreeList.rb +0 -0
- data/{tests → test}/TC_FXTreeListBox.rb +0 -0
- data/{tests → test}/TC_FXUndoList.rb +0 -0
- data/{tests → test}/TC_FXVec2d.rb +0 -0
- data/{tests → test}/TC_FXVec2f.rb +0 -0
- data/{tests → test}/TC_FXVec3d.rb +0 -0
- data/{tests → test}/TC_FXVec3f.rb +0 -0
- data/{tests → test}/TC_FXVec4f.rb +0 -0
- data/{tests → test}/TC_FXViewport.rb +0 -0
- data/{tests → test}/TC_FXXBMIcon.rb +0 -0
- data/{tests → test}/TC_FXXBMImage.rb +0 -0
- data/{tests → test}/TC_FXXPMIcon.rb +0 -0
- data/{tests → test}/TC_FXXPMImage.rb +0 -0
- data/{tests → test}/TC_Misc.rb +0 -0
- data/{tests → test}/TC_downcast.rb +0 -0
- data/{tests → test}/TS_All.rb +0 -0
- data/{tests → test}/blankpage.ps +0 -0
- data/{tests → test}/howdypage.ps +0 -0
- data/{tests → test}/stress1.rb +0 -0
- data/{tests → test}/stress2.rb +0 -0
- data/{tests → test}/stress3.rb +0 -0
- data/{tests → test}/testcase.rb +0 -0
- metadata +718 -458
- data/doc/apes02.html +0 -21
- data/doc/apes03.html +0 -39
- data/doc/book.html +0 -3
- data/doc/build.html +0 -132
- data/doc/ch03s02.html +0 -23
- data/doc/ch03s03.html +0 -52
- data/doc/ch03s04.html +0 -36
- data/doc/ch03s05.html +0 -60
- data/doc/ch04s02.html +0 -71
- data/doc/ch04s03.html +0 -37
- data/doc/ch04s04.html +0 -72
- data/doc/ch05s02.html +0 -260
- data/doc/ch05s03.html +0 -127
- data/doc/changes.html +0 -777
- data/doc/clipboardtut.html +0 -67
- data/doc/differences.html +0 -190
- data/doc/dragdroptut.html +0 -263
- data/doc/events.html +0 -36
- data/doc/examples.html +0 -104
- data/doc/gems.html +0 -73
- data/doc/goals.html +0 -41
- data/doc/images/babelfish.png +0 -0
- data/doc/images/browser.png +0 -0
- data/doc/images/button.png +0 -0
- data/doc/images/call-chain-example.png +0 -0
- data/doc/images/colordialog.png +0 -0
- data/doc/images/datatarget.png +0 -0
- data/doc/images/dialog.png +0 -0
- data/doc/images/dilbert.png +0 -0
- data/doc/images/dirlist.png +0 -0
- data/doc/images/dropsite-droprejected.png +0 -0
- data/doc/images/foursplit.png +0 -0
- data/doc/images/gltest.png +0 -0
- data/doc/images/glviewer.png +0 -0
- data/doc/images/groupbox.png +0 -0
- data/doc/images/header.png +0 -0
- data/doc/images/hello-with-button.png +0 -0
- data/doc/images/hello-with-icon-1.png +0 -0
- data/doc/images/hello-with-icon-2.png +0 -0
- data/doc/images/hello-with-icon-3.png +0 -0
- data/doc/images/hello-with-tooltip.png +0 -0
- data/doc/images/hello-without-button.png +0 -0
- data/doc/images/hello.png +0 -0
- data/doc/images/hello2.png +0 -0
- data/doc/images/iconlist-bigicons.png +0 -0
- data/doc/images/iconlist-details.png +0 -0
- data/doc/images/image.png +0 -0
- data/doc/images/imageviewer.png +0 -0
- data/doc/images/inheritance.png +0 -0
- data/doc/images/mditest.png +0 -0
- data/doc/images/raabrowser.png +0 -0
- data/doc/images/scribble.png +0 -0
- data/doc/images/shutter.png +0 -0
- data/doc/images/splitter.png +0 -0
- data/doc/images/tabbook.png +0 -0
- data/doc/images/table.png +0 -0
- data/doc/images/tutorial1.png +0 -0
- data/doc/implementation.html +0 -16
- data/doc/infosources.html +0 -33
- data/doc/library.html +0 -30
- data/doc/opengl.html +0 -73
- data/doc/pt01.html +0 -3
- data/doc/pt02.html +0 -3
- data/doc/scintilla.html +0 -36
- data/doc/style.css +0 -247
- data/doc/subversion.html +0 -21
- data/doc/tutorial1.html +0 -90
- data/doc/unicode.html +0 -56
- data/web/community.html +0 -81
- data/web/documentation.html +0 -83
- data/web/downloads.html +0 -85
- data/web/index.html +0 -88
@@ -0,0 +1,73 @@
|
|
1
|
+
/***********************************************************************
|
2
|
+
* FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
|
3
|
+
* Copyright (c) 2001-2009 by Lyle Johnson. All Rights Reserved.
|
4
|
+
*
|
5
|
+
* This library is free software; you can redistribute it and/or
|
6
|
+
* modify it under the terms of the GNU Lesser General Public
|
7
|
+
* License as published by the Free Software Foundation; either
|
8
|
+
* version 2.1 of the License, or (at your option) any later version.
|
9
|
+
*
|
10
|
+
* This library is distributed in the hope that it will be useful,
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
* Lesser General Public License for more details.
|
14
|
+
*
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
16
|
+
* License along with this library; if not, write to the Free Software
|
17
|
+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
18
|
+
*
|
19
|
+
* For further information please contact the author by e-mail
|
20
|
+
* at "lyle@lylejohnson.name".
|
21
|
+
***********************************************************************/
|
22
|
+
|
23
|
+
%rename("supported?") FXTIFIcon::isSupported();
|
24
|
+
|
25
|
+
/// TIFF Icon class
|
26
|
+
class FXTIFIcon : public FXIcon {
|
27
|
+
protected:
|
28
|
+
FXushort codec;
|
29
|
+
protected:
|
30
|
+
FXTIFIcon(){}
|
31
|
+
public:
|
32
|
+
%extend {
|
33
|
+
static VALUE fileExt() {
|
34
|
+
return rb_str_new2(FXTIFIcon::fileExt);
|
35
|
+
}
|
36
|
+
|
37
|
+
static VALUE mimeType() {
|
38
|
+
return rb_str_new2(FXTIFIcon::mimeType);
|
39
|
+
}
|
40
|
+
|
41
|
+
/// True if format is supported
|
42
|
+
static bool isSupported() { return FXTIFIcon::supported; }
|
43
|
+
}
|
44
|
+
public:
|
45
|
+
|
46
|
+
/// Construct an icon from memory stream formatted in TIFF format
|
47
|
+
%extend {
|
48
|
+
FXTIFIcon(FXApp *a,const void *pix=NULL,FXColor clr=0,FXuint opts=0,FXint w=1,FXint h=1){
|
49
|
+
return new FXRbTIFIcon(a,pix,clr,opts,w,h);
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
/// Set codec to save with
|
54
|
+
void setCodec(FXuint c);
|
55
|
+
|
56
|
+
/// Get codec setting
|
57
|
+
FXuint getCodec() const;
|
58
|
+
|
59
|
+
/// Destroy
|
60
|
+
virtual ~FXTIFIcon();
|
61
|
+
};
|
62
|
+
|
63
|
+
|
64
|
+
DECLARE_FXOBJECT_VIRTUALS(FXTIFIcon)
|
65
|
+
DECLARE_FXID_VIRTUALS(FXTIFIcon)
|
66
|
+
DECLARE_FXDRAWABLE_VIRTUALS(FXTIFIcon)
|
67
|
+
DECLARE_FXIMAGE_VIRTUALS(FXTIFIcon)
|
68
|
+
|
69
|
+
/**
|
70
|
+
* Check if stream contains a bitmap, return TRUE if so.
|
71
|
+
*/
|
72
|
+
bool fxcheckTIF(FXStream& store);
|
73
|
+
|
@@ -0,0 +1,93 @@
|
|
1
|
+
/***********************************************************************
|
2
|
+
* FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
|
3
|
+
* Copyright (c) 2001-2009 by Lyle Johnson. All Rights Reserved.
|
4
|
+
*
|
5
|
+
* This library is free software; you can redistribute it and/or
|
6
|
+
* modify it under the terms of the GNU Lesser General Public
|
7
|
+
* License as published by the Free Software Foundation; either
|
8
|
+
* version 2.1 of the License, or (at your option) any later version.
|
9
|
+
*
|
10
|
+
* This library is distributed in the hope that it will be useful,
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
* Lesser General Public License for more details.
|
14
|
+
*
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
16
|
+
* License along with this library; if not, write to the Free Software
|
17
|
+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
18
|
+
*
|
19
|
+
* For further information please contact the author by e-mail
|
20
|
+
* at "lyle@lylejohnson.name".
|
21
|
+
***********************************************************************/
|
22
|
+
|
23
|
+
%rename("supported?") FXTIFImage::isSupported();
|
24
|
+
|
25
|
+
/// TIFF Image class
|
26
|
+
class FXTIFImage : public FXImage {
|
27
|
+
protected:
|
28
|
+
FXushort codec;
|
29
|
+
protected:
|
30
|
+
FXTIFImage(){}
|
31
|
+
public:
|
32
|
+
%extend {
|
33
|
+
static VALUE fileExt() {
|
34
|
+
return rb_str_new2(FXTIFImage::fileExt);
|
35
|
+
}
|
36
|
+
|
37
|
+
static VALUE mimeType() {
|
38
|
+
return rb_str_new2(FXTIFImage::mimeType);
|
39
|
+
}
|
40
|
+
|
41
|
+
/// True if format is supported
|
42
|
+
static bool isSupported() { return FXTIFImage::supported; }
|
43
|
+
}
|
44
|
+
public:
|
45
|
+
|
46
|
+
/// Construct an image from memory stream formatted in TIFF format
|
47
|
+
%extend {
|
48
|
+
FXTIFImage(FXApp *a,const void *pix=NULL,FXuint opts=0,FXint w=1,FXint h=1){
|
49
|
+
return new FXRbTIFImage(a,pix,opts,w,h);
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
/// Set codec to save with
|
54
|
+
void setCodec(FXuint c);
|
55
|
+
|
56
|
+
/// Get codec setting
|
57
|
+
FXuint getCodec() const;
|
58
|
+
|
59
|
+
/// Destroy
|
60
|
+
virtual ~FXTIFImage();
|
61
|
+
};
|
62
|
+
|
63
|
+
|
64
|
+
DECLARE_FXOBJECT_VIRTUALS(FXTIFImage)
|
65
|
+
DECLARE_FXID_VIRTUALS(FXTIFImage)
|
66
|
+
DECLARE_FXDRAWABLE_VIRTUALS(FXTIFImage)
|
67
|
+
DECLARE_FXIMAGE_VIRTUALS(FXTIFImage)
|
68
|
+
|
69
|
+
|
70
|
+
%inline %{
|
71
|
+
/// Load a tiff from a stream
|
72
|
+
VALUE fxloadTIF(FXStream& store){
|
73
|
+
FXColor* data;
|
74
|
+
FXint width;
|
75
|
+
FXint height;
|
76
|
+
FXushort codec;
|
77
|
+
if(fxloadTIF(store,data,width,height,codec)){
|
78
|
+
VALUE ary=rb_ary_new();
|
79
|
+
rb_ary_push(ary,FXRbMakeColorArray(data,width,height));
|
80
|
+
FXFREE(&data);
|
81
|
+
rb_ary_push(ary,to_ruby(width));
|
82
|
+
rb_ary_push(ary,to_ruby(height));
|
83
|
+
rb_ary_push(ary,to_ruby(codec));
|
84
|
+
return ary;
|
85
|
+
}
|
86
|
+
else{
|
87
|
+
return Qnil;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
%}
|
91
|
+
|
92
|
+
/// Save a tiff to a stream
|
93
|
+
bool fxsaveTIF(FXStream& store,const FXColor* PIXELS,FXint width,FXint height,FXushort codec);
|
@@ -0,0 +1,121 @@
|
|
1
|
+
/***********************************************************************
|
2
|
+
* FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
|
3
|
+
* Copyright (c) 2001-2009 by Lyle Johnson. All Rights Reserved.
|
4
|
+
*
|
5
|
+
* This library is free software; you can redistribute it and/or
|
6
|
+
* modify it under the terms of the GNU Lesser General Public
|
7
|
+
* License as published by the Free Software Foundation; either
|
8
|
+
* version 2.1 of the License, or (at your option) any later version.
|
9
|
+
*
|
10
|
+
* This library is distributed in the hope that it will be useful,
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
* Lesser General Public License for more details.
|
14
|
+
*
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
16
|
+
* License along with this library; if not, write to the Free Software
|
17
|
+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
18
|
+
*
|
19
|
+
* For further information please contact the author by e-mail
|
20
|
+
* at "lyle@lylejohnson.name".
|
21
|
+
***********************************************************************/
|
22
|
+
|
23
|
+
// Tab Book options
|
24
|
+
enum {
|
25
|
+
TABBOOK_TOPTABS = 0, // Tabs on top (default)
|
26
|
+
TABBOOK_BOTTOMTABS = 0x00020000, // Tabs on bottom
|
27
|
+
TABBOOK_SIDEWAYS = 0x00040000, // Tabs on left
|
28
|
+
TABBOOK_LEFTTABS = TABBOOK_SIDEWAYS|TABBOOK_TOPTABS, // Tabs on left
|
29
|
+
TABBOOK_RIGHTTABS = TABBOOK_SIDEWAYS|TABBOOK_BOTTOMTABS, // Tabs on right
|
30
|
+
TABBOOK_NORMAL = TABBOOK_TOPTABS
|
31
|
+
};
|
32
|
+
|
33
|
+
|
34
|
+
/**
|
35
|
+
* The tab bar layout manager arranges tab items side by side,
|
36
|
+
* and raises the active tab item above the neighboring tab items.
|
37
|
+
* In a the horizontal arrangement, the tab bar can have the tab
|
38
|
+
* items on the top or on the bottom. In the vertical arrangement,
|
39
|
+
* the tabs can be on the left or on the right.
|
40
|
+
* When one of the tab items is pressed, the tab bar's setCurrent()
|
41
|
+
* is called with notify=TRUE. Thus causes the tab bar to send a
|
42
|
+
* SEL_COMMAND message to its target.
|
43
|
+
*/
|
44
|
+
class FXTabBar : public FXPacker {
|
45
|
+
protected:
|
46
|
+
FXint current; // Current tab index
|
47
|
+
FXint shift; // Shift amount
|
48
|
+
protected:
|
49
|
+
FXTabBar(){}
|
50
|
+
public:
|
51
|
+
long onPaint(FXObject*,FXSelector,void* PTR_EVENT);
|
52
|
+
long onFocusNext(FXObject*,FXSelector,void* PTR_EVENT);
|
53
|
+
long onFocusPrev(FXObject*,FXSelector,void* PTR_EVENT);
|
54
|
+
long onFocusUp(FXObject*,FXSelector,void* PTR_EVENT);
|
55
|
+
long onFocusDown(FXObject*,FXSelector,void* PTR_EVENT);
|
56
|
+
long onFocusLeft(FXObject*,FXSelector,void* PTR_EVENT);
|
57
|
+
long onFocusRight(FXObject*,FXSelector,void* PTR_EVENT);
|
58
|
+
long onCmdOpenItem(FXObject*,FXSelector,void* PTR_IGNORE);
|
59
|
+
long onCmdSetValue(FXObject*,FXSelector,void* PTR_INT);
|
60
|
+
long onCmdSetIntValue(FXObject*,FXSelector,void* PTR_PINT);
|
61
|
+
long onCmdGetIntValue(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
62
|
+
long onCmdOpen(FXObject*,FXSelector,void* PTR_IGNORE);
|
63
|
+
long onUpdOpen(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
64
|
+
public:
|
65
|
+
enum {
|
66
|
+
ID_OPEN_ITEM=FXPacker::ID_LAST, /// Sent from one of the FXTabItems
|
67
|
+
ID_OPEN_FIRST, /// Switch to panel ID_OPEN_FIRST+i
|
68
|
+
ID_OPEN_SECOND,
|
69
|
+
ID_OPEN_THIRD,
|
70
|
+
ID_OPEN_FOURTH,
|
71
|
+
ID_OPEN_FIFTH,
|
72
|
+
ID_OPEN_SIXTH,
|
73
|
+
ID_OPEN_SEVENTH,
|
74
|
+
ID_OPEN_EIGHTH,
|
75
|
+
ID_OPEN_NINETH,
|
76
|
+
ID_OPEN_TENTH,
|
77
|
+
ID_OPEN_LAST=ID_OPEN_FIRST+100,
|
78
|
+
ID_LAST
|
79
|
+
};
|
80
|
+
public:
|
81
|
+
/// Construct a tab bar
|
82
|
+
%extend {
|
83
|
+
FXTabBar(FXComposite* p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=TABBOOK_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_SPACING,FXint pr=DEFAULT_SPACING,FXint pt=DEFAULT_SPACING,FXint pb=DEFAULT_SPACING){
|
84
|
+
return new FXRbTabBar(p,tgt,sel,opts,x,y,w,h,pl,pr,pt,pb);
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
/// Return the currently active tab item
|
89
|
+
FXint getCurrent() const;
|
90
|
+
|
91
|
+
/// Return tab bar style
|
92
|
+
FXuint getTabStyle() const;
|
93
|
+
|
94
|
+
/// Change tab tab style
|
95
|
+
void setTabStyle(FXuint style);
|
96
|
+
|
97
|
+
/// Destructor
|
98
|
+
virtual ~FXTabBar();
|
99
|
+
};
|
100
|
+
|
101
|
+
|
102
|
+
DECLARE_FXOBJECT_VIRTUALS(FXTabBar)
|
103
|
+
DECLARE_FXID_VIRTUALS(FXTabBar)
|
104
|
+
DECLARE_FXDRAWABLE_VIRTUALS(FXTabBar)
|
105
|
+
DECLARE_FXWINDOW_VIRTUALS(FXTabBar)
|
106
|
+
DECLARE_FXTABBAR_VIRTUALS(FXTabBar)
|
107
|
+
|
108
|
+
%{
|
109
|
+
static swig_type_info *FXTabBar_dynamic_cast(void **ptr) {
|
110
|
+
FXTabBar **ppTabBar = reinterpret_cast<FXTabBar **>(ptr);
|
111
|
+
FXTabBook *pTabBook=dynamic_cast<FXTabBook*>(*ppTabBar);
|
112
|
+
if(pTabBook){
|
113
|
+
*ptr=reinterpret_cast<void*>(pTabBook);
|
114
|
+
return SWIG_TypeQuery("FXTabBook *");
|
115
|
+
}
|
116
|
+
return 0;
|
117
|
+
}
|
118
|
+
%}
|
119
|
+
|
120
|
+
DYNAMIC_CAST(SWIGTYPE_p_FXTabBar, FXTabBar_dynamic_cast);
|
121
|
+
|
@@ -0,0 +1,70 @@
|
|
1
|
+
/***********************************************************************
|
2
|
+
* FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
|
3
|
+
* Copyright (c) 2001-2009 by Lyle Johnson. All Rights Reserved.
|
4
|
+
*
|
5
|
+
* This library is free software; you can redistribute it and/or
|
6
|
+
* modify it under the terms of the GNU Lesser General Public
|
7
|
+
* License as published by the Free Software Foundation; either
|
8
|
+
* version 2.1 of the License, or (at your option) any later version.
|
9
|
+
*
|
10
|
+
* This library is distributed in the hope that it will be useful,
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
* Lesser General Public License for more details.
|
14
|
+
*
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
16
|
+
* License along with this library; if not, write to the Free Software
|
17
|
+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
18
|
+
*
|
19
|
+
* For further information please contact the author by e-mail
|
20
|
+
* at "lyle@lylejohnson.name".
|
21
|
+
***********************************************************************/
|
22
|
+
|
23
|
+
|
24
|
+
/**
|
25
|
+
* The tab book layout manager arranges pairs of children;
|
26
|
+
* the even numbered children (0,2,4,...) are usually tab items,
|
27
|
+
* and are placed on the top. The odd numbered children are
|
28
|
+
* usually layout managers, and are placed below; all the odd
|
29
|
+
* numbered children are placed on top of each other, similar
|
30
|
+
* to the switcher widget. When the user presses one of the
|
31
|
+
* tab items, the tab item is raised above the neighboring tabs,
|
32
|
+
* and the corresponding panel is raised to the top.
|
33
|
+
* Thus, a tab book can be used to present many GUI controls
|
34
|
+
* in a small space by placing several panels on top of each
|
35
|
+
* other and using tab items to select the desired panel.
|
36
|
+
* When one of the tab items is pressed, the tab book's setCurrent()
|
37
|
+
* is called with notify=TRUE. Thus causes the tab book to send a
|
38
|
+
* SEL_COMMAND message to its target.
|
39
|
+
*/
|
40
|
+
class FXTabBook : public FXTabBar {
|
41
|
+
protected:
|
42
|
+
FXTabBook(){}
|
43
|
+
public:
|
44
|
+
long onPaint(FXObject*,FXSelector,void* PTR_EVENT);
|
45
|
+
long onFocusNext(FXObject*,FXSelector,void* PTR_EVENT);
|
46
|
+
long onFocusPrev(FXObject*,FXSelector,void* PTR_EVENT);
|
47
|
+
long onFocusUp(FXObject*,FXSelector,void* PTR_EVENT);
|
48
|
+
long onFocusDown(FXObject*,FXSelector,void* PTR_EVENT);
|
49
|
+
long onFocusLeft(FXObject*,FXSelector,void* PTR_EVENT);
|
50
|
+
long onFocusRight(FXObject*,FXSelector,void* PTR_EVENT);
|
51
|
+
long onCmdOpenItem(FXObject*,FXSelector,void* PTR_IGNORE);
|
52
|
+
public:
|
53
|
+
/// Construct tab book
|
54
|
+
%extend {
|
55
|
+
FXTabBook(FXComposite* p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=TABBOOK_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_SPACING,FXint pr=DEFAULT_SPACING,FXint pt=DEFAULT_SPACING,FXint pb=DEFAULT_SPACING){
|
56
|
+
return new FXRbTabBook(p,tgt,sel,opts,x,y,w,h,pl,pr,pt,pb);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
/// Destructor
|
61
|
+
virtual ~FXTabBook();
|
62
|
+
};
|
63
|
+
|
64
|
+
|
65
|
+
DECLARE_FXOBJECT_VIRTUALS(FXTabBook)
|
66
|
+
DECLARE_FXID_VIRTUALS(FXTabBook)
|
67
|
+
DECLARE_FXDRAWABLE_VIRTUALS(FXTabBook)
|
68
|
+
DECLARE_FXWINDOW_VIRTUALS(FXTabBook)
|
69
|
+
DECLARE_FXTABBAR_VIRTUALS(FXTabBook)
|
70
|
+
|
@@ -0,0 +1,82 @@
|
|
1
|
+
/***********************************************************************
|
2
|
+
* FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
|
3
|
+
* Copyright (c) 2001-2009 by Lyle Johnson. All Rights Reserved.
|
4
|
+
*
|
5
|
+
* This library is free software; you can redistribute it and/or
|
6
|
+
* modify it under the terms of the GNU Lesser General Public
|
7
|
+
* License as published by the Free Software Foundation; either
|
8
|
+
* version 2.1 of the License, or (at your option) any later version.
|
9
|
+
*
|
10
|
+
* This library is distributed in the hope that it will be useful,
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
* Lesser General Public License for more details.
|
14
|
+
*
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
16
|
+
* License along with this library; if not, write to the Free Software
|
17
|
+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
18
|
+
*
|
19
|
+
* For further information please contact the author by e-mail
|
20
|
+
* at "lyle@lylejohnson.name".
|
21
|
+
***********************************************************************/
|
22
|
+
|
23
|
+
// Tab Item orientations which affect border
|
24
|
+
enum {
|
25
|
+
TAB_TOP = 0, // Top side tabs
|
26
|
+
TAB_LEFT = 0x00800000, // Left side tabs
|
27
|
+
TAB_RIGHT = 0x01000000, // Right side tabs
|
28
|
+
TAB_BOTTOM = 0x01800000, // Bottom side tabs
|
29
|
+
TAB_TOP_NORMAL = JUSTIFY_NORMAL|ICON_BEFORE_TEXT|TAB_TOP|FRAME_RAISED|FRAME_THICK,
|
30
|
+
TAB_BOTTOM_NORMAL= JUSTIFY_NORMAL|ICON_BEFORE_TEXT|TAB_BOTTOM|FRAME_RAISED|FRAME_THICK,
|
31
|
+
TAB_LEFT_NORMAL = JUSTIFY_LEFT|JUSTIFY_CENTER_Y|ICON_BEFORE_TEXT|TAB_LEFT|FRAME_RAISED|FRAME_THICK,
|
32
|
+
TAB_RIGHT_NORMAL = JUSTIFY_LEFT|JUSTIFY_CENTER_Y|ICON_BEFORE_TEXT|TAB_RIGHT|FRAME_RAISED|FRAME_THICK
|
33
|
+
};
|
34
|
+
|
35
|
+
|
36
|
+
/**
|
37
|
+
* A tab item is placed in a tab bar or tab book.
|
38
|
+
* When selected, the tab item sends a message to its
|
39
|
+
* parent, and causes itself to become the active tab,
|
40
|
+
* and raised slightly above the other tabs.
|
41
|
+
* In the tab book, activating a tab item also causes
|
42
|
+
* the corresponding panel to be raised to the top.
|
43
|
+
*/
|
44
|
+
class FXTabItem : public FXLabel {
|
45
|
+
protected:
|
46
|
+
FXTabItem();
|
47
|
+
public:
|
48
|
+
long onPaint(FXObject*,FXSelector,void* PTR_EVENT);
|
49
|
+
long onFocusIn(FXObject*,FXSelector,void* PTR_EVENT);
|
50
|
+
long onFocusOut(FXObject*,FXSelector,void* PTR_EVENT);
|
51
|
+
long onUngrabbed(FXObject*,FXSelector,void* PTR_EVENT);
|
52
|
+
long onLeftBtnPress(FXObject*,FXSelector,void* PTR_EVENT);
|
53
|
+
long onLeftBtnRelease(FXObject*,FXSelector,void* PTR_EVENT);
|
54
|
+
long onKeyPress(FXObject*,FXSelector,void* PTR_EVENT);
|
55
|
+
long onKeyRelease(FXObject*,FXSelector,void* PTR_EVENT);
|
56
|
+
long onHotKeyPress(FXObject*,FXSelector,void* PTR_EVENT);
|
57
|
+
long onHotKeyRelease(FXObject*,FXSelector,void* PTR_EVENT);
|
58
|
+
public:
|
59
|
+
|
60
|
+
/// Construct a tab item
|
61
|
+
%extend {
|
62
|
+
FXTabItem(FXTabBar* p,const FXString& text,FXIcon* ic=0,FXuint opts=TAB_TOP_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_PAD,FXint pr=DEFAULT_PAD,FXint pt=DEFAULT_PAD,FXint pb=DEFAULT_PAD){
|
63
|
+
return new FXRbTabItem(p,text,ic,opts,x,y,w,h,pl,pr,pt,pb);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
/// Return current tab item orientation
|
68
|
+
FXuint getTabOrientation() const;
|
69
|
+
|
70
|
+
/// Change tab item orientation
|
71
|
+
void setTabOrientation(FXuint style);
|
72
|
+
|
73
|
+
/// Destructor
|
74
|
+
virtual ~FXTabItem();
|
75
|
+
};
|
76
|
+
|
77
|
+
|
78
|
+
DECLARE_FXOBJECT_VIRTUALS(FXTabItem)
|
79
|
+
DECLARE_FXID_VIRTUALS(FXTabItem)
|
80
|
+
DECLARE_FXDRAWABLE_VIRTUALS(FXTabItem)
|
81
|
+
DECLARE_FXWINDOW_VIRTUALS(FXTabItem)
|
82
|
+
|
@@ -0,0 +1,861 @@
|
|
1
|
+
/***********************************************************************
|
2
|
+
* FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
|
3
|
+
* Copyright (c) 2001-2009 by Lyle Johnson. All Rights Reserved.
|
4
|
+
*
|
5
|
+
* This library is free software; you can redistribute it and/or
|
6
|
+
* modify it under the terms of the GNU Lesser General Public
|
7
|
+
* License as published by the Free Software Foundation; either
|
8
|
+
* version 2.1 of the License, or (at your option) any later version.
|
9
|
+
*
|
10
|
+
* This library is distributed in the hope that it will be useful,
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
* Lesser General Public License for more details.
|
14
|
+
*
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
16
|
+
* License along with this library; if not, write to the Free Software
|
17
|
+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
18
|
+
*
|
19
|
+
* For further information please contact the author by e-mail
|
20
|
+
* at "lyle@lylejohnson.name".
|
21
|
+
***********************************************************************/
|
22
|
+
|
23
|
+
class FXTable;
|
24
|
+
|
25
|
+
// Default cell margin
|
26
|
+
enum { DEFAULT_MARGIN = 2 };
|
27
|
+
|
28
|
+
|
29
|
+
/// Table options
|
30
|
+
enum {
|
31
|
+
TABLE_COL_SIZABLE = 0x00100000, /// Columns are resizable
|
32
|
+
TABLE_ROW_SIZABLE = 0x00200000, /// Rows are resizable
|
33
|
+
TABLE_NO_COLSELECT = 0x00400000, /// Disallow column selections
|
34
|
+
TABLE_NO_ROWSELECT = 0x00800000, /// Disallow row selections
|
35
|
+
TABLE_READONLY = 0x01000000, /// Table is NOT editable
|
36
|
+
TABLE_COL_RENUMBER = 0x02000000, /// Renumber columns
|
37
|
+
TABLE_ROW_RENUMBER = 0x04000000 /// Renumber rows
|
38
|
+
};
|
39
|
+
|
40
|
+
|
41
|
+
// Position in table
|
42
|
+
struct FXTablePos {
|
43
|
+
FXTablePos();
|
44
|
+
FXint row;
|
45
|
+
FXint col;
|
46
|
+
~FXTablePos();
|
47
|
+
};
|
48
|
+
|
49
|
+
|
50
|
+
// Range of table cells
|
51
|
+
struct FXTableRange {
|
52
|
+
FXTableRange();
|
53
|
+
FXTablePos fm;
|
54
|
+
FXTablePos to;
|
55
|
+
~FXTableRange();
|
56
|
+
};
|
57
|
+
|
58
|
+
|
59
|
+
/// Item in table
|
60
|
+
class FXTableItem : public FXObject {
|
61
|
+
protected:
|
62
|
+
FXString label;
|
63
|
+
FXIcon *icon;
|
64
|
+
void *data;
|
65
|
+
FXuint state;
|
66
|
+
protected:
|
67
|
+
FXTableItem():icon(NULL),data(NULL),state(0){}
|
68
|
+
FXint textWidth(const FXTable* table) const;
|
69
|
+
FXint textHeight(const FXTable* table) const;
|
70
|
+
virtual void draw(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
|
71
|
+
virtual void drawBorders(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
|
72
|
+
virtual void drawContent(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
|
73
|
+
virtual void drawPattern(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
|
74
|
+
virtual void drawBackground(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
|
75
|
+
protected:
|
76
|
+
FXTableItem();
|
77
|
+
public:
|
78
|
+
enum{
|
79
|
+
SELECTED = 0x00000001, /// Selected
|
80
|
+
FOCUS = 0x00000002, /// Focus
|
81
|
+
DISABLED = 0x00000004, /// Disabled
|
82
|
+
DRAGGABLE = 0x00000008, /// Draggable
|
83
|
+
RESERVED1 = 0x00000010, /// Reserved
|
84
|
+
RESERVED2 = 0x00000020, /// Reserved
|
85
|
+
ICONOWNED = 0x00000040, /// Icon owned by table item
|
86
|
+
RIGHT = 0x00002000, /// Align on right (default)
|
87
|
+
LEFT = 0x00004000, /// Align on left
|
88
|
+
CENTER_X = 0, /// Align centered horizontally
|
89
|
+
TOP = 0x00008000, /// Align on top
|
90
|
+
BOTTOM = 0x00010000, /// Align on bottom
|
91
|
+
CENTER_Y = 0, /// Align centered vertically (default)
|
92
|
+
BEFORE = 0x00020000, /// Icon before the text
|
93
|
+
AFTER = 0x00040000, /// Icon after the text
|
94
|
+
ABOVE = 0x00080000, /// Icon above the text
|
95
|
+
BELOW = 0x00100000, /// Icon below the text
|
96
|
+
LBORDER = 0x00200000, /// Draw left border
|
97
|
+
RBORDER = 0x00400000, /// Draw right border
|
98
|
+
TBORDER = 0x00800000, /// Draw top border
|
99
|
+
BBORDER = 0x01000000 /// Draw bottom border
|
100
|
+
};
|
101
|
+
public:
|
102
|
+
%extend {
|
103
|
+
// Construct new table item
|
104
|
+
FXTableItem(const FXString& text,FXIcon* ic=NULL,void* ITEMDATA=NULL){
|
105
|
+
return new FXRbTableItem(text,ic,ITEMDATA);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
%extend {
|
110
|
+
// Change item's user data
|
111
|
+
void setData(VALUE ptr){
|
112
|
+
self->setData(reinterpret_cast<void*>(ptr));
|
113
|
+
}
|
114
|
+
|
115
|
+
// Get item's user data
|
116
|
+
VALUE getData() const {
|
117
|
+
return self->getData() ? reinterpret_cast<VALUE>(self->getData()) : Qnil;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
// Return true if item has focus
|
122
|
+
FXbool hasFocus() const;
|
123
|
+
|
124
|
+
// Return true if item is selected
|
125
|
+
FXbool isSelected() const;
|
126
|
+
|
127
|
+
// Return true if item is enabled
|
128
|
+
FXbool isEnabled() const;
|
129
|
+
|
130
|
+
// Return true if item is draggable
|
131
|
+
FXbool isDraggable() const;
|
132
|
+
|
133
|
+
// Return item content justification
|
134
|
+
FXuint getJustify() const;
|
135
|
+
|
136
|
+
// Return item icon position
|
137
|
+
FXuint getIconPosition() const;
|
138
|
+
|
139
|
+
// Return item borders
|
140
|
+
FXuint getBorders() const;
|
141
|
+
|
142
|
+
// Return item background stipple
|
143
|
+
FXStipplePattern getStipple() const;
|
144
|
+
|
145
|
+
// Destructor
|
146
|
+
virtual ~FXTableItem();
|
147
|
+
};
|
148
|
+
|
149
|
+
|
150
|
+
DECLARE_FXOBJECT_VIRTUALS(FXTableItem)
|
151
|
+
DECLARE_FXTABLEITEM_VIRTUALS(FXTableItem)
|
152
|
+
|
153
|
+
// Enforce row numbers that are within bounds 0 <= row < numRows
|
154
|
+
%typemap(check) FXint TABLE_ROW_INDEX {
|
155
|
+
if ($1 < 0 || $1 >= arg1->getNumRows()) {
|
156
|
+
rb_raise(rb_eIndexError, "table row out of bounds");
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
// Enforce row numbers that are within bounds 0 <= row <= numRows
|
161
|
+
%typemap(check) FXint TABLE_ROW_ALL {
|
162
|
+
if ($1 < 0 || $1 > arg1->getNumRows()) {
|
163
|
+
rb_raise(rb_eIndexError, "table row out of bounds");
|
164
|
+
}
|
165
|
+
}
|
166
|
+
|
167
|
+
// Enforce row = 0 or row = 1 only
|
168
|
+
%typemap(check) FXint ROW_ZERO_OR_ONE {
|
169
|
+
if ($1 != 0 && $1 != 1) {
|
170
|
+
rb_raise(rb_eIndexError, "table row out of bounds");
|
171
|
+
}
|
172
|
+
}
|
173
|
+
|
174
|
+
// Special for removeRows()
|
175
|
+
%typemap(check) (FXint row,FXint nr) {
|
176
|
+
if ($1 < 0 || $1 + $2 > arg1->getNumRows()) {
|
177
|
+
rb_raise(rb_eIndexError,"table row out of bounds");
|
178
|
+
}
|
179
|
+
}
|
180
|
+
|
181
|
+
// Enforce column numbers that are within bounds 0 <= column < numColumns
|
182
|
+
%typemap(check) FXint TABLE_COLUMN_INDEX {
|
183
|
+
if ($1 < 0 || $1 >= arg1->getNumColumns()) {
|
184
|
+
rb_raise(rb_eIndexError, "table column out of bounds");
|
185
|
+
}
|
186
|
+
}
|
187
|
+
|
188
|
+
// Enforce column numbers that are within bounds 0 <= column <= numColumns
|
189
|
+
%typemap(check) FXint TABLE_COLUMN_ALL {
|
190
|
+
if ($1 < 0 || $1 > arg1->getNumColumns()) {
|
191
|
+
rb_raise(rb_eIndexError, "table column out of bounds");
|
192
|
+
}
|
193
|
+
}
|
194
|
+
|
195
|
+
// Enforce column = 0 or column = 1 only
|
196
|
+
%typemap(check) FXint COLUMN_ZERO_OR_ONE {
|
197
|
+
if ($1 != 0 && $1 != 1) {
|
198
|
+
rb_raise(rb_eIndexError, "table column out of bounds");
|
199
|
+
}
|
200
|
+
}
|
201
|
+
|
202
|
+
// Special for removeColumns()
|
203
|
+
%typemap(check) (FXint col,FXint nc) {
|
204
|
+
if ($1 < 0 || $1 + $2 > arg1->getNumColumns()) {
|
205
|
+
rb_raise(rb_eIndexError,"table column out of bounds");
|
206
|
+
}
|
207
|
+
}
|
208
|
+
|
209
|
+
%apply FXint TABLE_ROW_INDEX { FXint row, FXint r, FXint startrow, FXint endrow };
|
210
|
+
%apply FXint TABLE_COLUMN_INDEX { FXint col, FXint c, FXint startcol, FXint endcol };
|
211
|
+
|
212
|
+
%rename("editable=") FXTable::setEditable(FXbool);
|
213
|
+
%rename("editable?") FXTable::isEditable() const;
|
214
|
+
%rename("cornerButton") FXTable::getCornerButton() const;
|
215
|
+
%rename("columnRenumbering=") FXTable::setColumnRenumbering(FXbool flag);
|
216
|
+
%rename("columnRenumbering?") FXTable::getColumnRenumbering() const;
|
217
|
+
%rename("rowRenumbering=") FXTable::setRowRenumbering(FXbool flag);
|
218
|
+
%rename("rowRenumbering?") FXTable::getRowRenumbering() const;
|
219
|
+
|
220
|
+
/// Table Widget
|
221
|
+
class FXTable : public FXScrollArea {
|
222
|
+
public:
|
223
|
+
static FXDragType csvType;
|
224
|
+
static const FXchar csvTypeName[];
|
225
|
+
public:
|
226
|
+
long onPaint(FXObject*,FXSelector,void* PTR_EVENT);
|
227
|
+
long onFocusIn(FXObject*,FXSelector,void* PTR_EVENT);
|
228
|
+
long onFocusOut(FXObject*,FXSelector,void* PTR_EVENT);
|
229
|
+
long onMotion(FXObject*,FXSelector,void* PTR_EVENT);
|
230
|
+
long onKeyPress(FXObject*,FXSelector,void* PTR_EVENT);
|
231
|
+
long onKeyRelease(FXObject*,FXSelector,void* PTR_EVENT);
|
232
|
+
long onLeftBtnPress(FXObject*,FXSelector,void* PTR_EVENT);
|
233
|
+
long onLeftBtnRelease(FXObject*,FXSelector,void* PTR_EVENT);
|
234
|
+
long onRightBtnPress(FXObject*,FXSelector,void* PTR_EVENT);
|
235
|
+
long onRightBtnRelease(FXObject*,FXSelector,void* PTR_EVENT);
|
236
|
+
long onUngrabbed(FXObject*,FXSelector,void* PTR_EVENT);
|
237
|
+
long onSelectionLost(FXObject*,FXSelector,void* PTR_EVENT);
|
238
|
+
long onSelectionGained(FXObject*,FXSelector,void* PTR_EVENT);
|
239
|
+
long onSelectionRequest(FXObject*,FXSelector,void* PTR_EVENT);
|
240
|
+
long onClipboardLost(FXObject*,FXSelector,void* PTR_EVENT);
|
241
|
+
long onClipboardGained(FXObject*,FXSelector,void* PTR_EVENT);
|
242
|
+
long onClipboardRequest(FXObject*,FXSelector,void* PTR_EVENT);
|
243
|
+
long onAutoScroll(FXObject*,FXSelector,void* PTR_EVENT);
|
244
|
+
long onCommand(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
245
|
+
long onClicked(FXObject*,FXSelector,void* PTR_EVENT);
|
246
|
+
long onDoubleClicked(FXObject*,FXSelector,void* PTR_EVENT);
|
247
|
+
long onTripleClicked(FXObject*,FXSelector,void* PTR_EVENT);
|
248
|
+
|
249
|
+
long onCmdToggleEditable(FXObject*,FXSelector,void* PTR_IGNORE);
|
250
|
+
long onUpdToggleEditable(FXObject*,FXSelector,void* PTR_IGNORE);
|
251
|
+
|
252
|
+
// Visual characteristics
|
253
|
+
long onCmdHorzGrid(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
254
|
+
long onUpdHorzGrid(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
255
|
+
long onCmdVertGrid(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
256
|
+
long onUpdVertGrid(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
257
|
+
|
258
|
+
// Row/Column manipulations
|
259
|
+
long onCmdDeleteColumn(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
260
|
+
long onUpdDeleteColumn(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
261
|
+
long onCmdDeleteRow(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
262
|
+
long onUpdDeleteRow(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
263
|
+
long onCmdInsertColumn(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
264
|
+
long onUpdInsertColumn(FXObject*,FXSelector,void* PTR_IGNORE);
|
265
|
+
long onCmdInsertRow(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
266
|
+
long onUpdInsertRow(FXObject*,FXSelector,void* PTR_IGNORE);
|
267
|
+
|
268
|
+
// Movement
|
269
|
+
long onCmdMoveRight(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
270
|
+
long onCmdMoveLeft(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
271
|
+
long onCmdMoveUp(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
272
|
+
long onCmdMoveDown(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
273
|
+
long onCmdMoveHome(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
274
|
+
long onCmdMoveEnd(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
275
|
+
long onCmdMoveTop(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
276
|
+
long onCmdMoveBottom(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
277
|
+
long onCmdMovePageDown(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
278
|
+
long onCmdMovePageUp(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
279
|
+
|
280
|
+
// Mark and extend
|
281
|
+
long onCmdMark(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
282
|
+
long onCmdExtend(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
283
|
+
|
284
|
+
// Changing Selection
|
285
|
+
long onUpdSelectCell(FXObject*,FXSelector,void*); // FIXME
|
286
|
+
long onCmdSelectCell(FXObject*,FXSelector,void* PTR_IGNORE);
|
287
|
+
long onUpdSelectRow(FXObject*,FXSelector,void*); // FIXME
|
288
|
+
long onCmdSelectRow(FXObject*,FXSelector,void* PTR_IGNORE);
|
289
|
+
long onUpdSelectColumn(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
290
|
+
long onCmdSelectColumn(FXObject*,FXSelector,void* PTR_IGNORE);
|
291
|
+
long onCmdSelectRowIndex(FXObject*,FXSelector,void* PTR_IGNORE);
|
292
|
+
long onCmdSelectColumnIndex(FXObject*,FXSelector,void* PTR_IGNORE);
|
293
|
+
long onUpdSelectAll(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
294
|
+
long onCmdSelectAll(FXObject*,FXSelector,void* PTR_IGNORE);
|
295
|
+
long onUpdDeselectAll(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
|
296
|
+
long onCmdDeselectAll(FXObject*,FXSelector,void* PTR_IGNORE);
|
297
|
+
|
298
|
+
// Manipulation Selection
|
299
|
+
long onCmdCutSel(FXObject*,FXSelector,void* PTR_IGNORE);
|
300
|
+
long onCmdCopySel(FXObject*,FXSelector,void* PTR_IGNORE);
|
301
|
+
long onCmdDeleteSel(FXObject*,FXSelector,void* PTR_IGNORE);
|
302
|
+
long onCmdPasteSel(FXObject*,FXSelector,void* PTR_IGNORE);
|
303
|
+
long onUpdHaveSelection(FXObject*,FXSelector,void* PTR_IGNORE);
|
304
|
+
|
305
|
+
// Edit control
|
306
|
+
long onCmdStartInput(FXObject*,FXSelector,void* PTR_IGNORE);
|
307
|
+
long onUpdStartInput(FXObject*,FXSelector,void* PTR_IGNORE);
|
308
|
+
long onCmdAcceptInput(FXObject*,FXSelector,void* PTR_IGNORE);
|
309
|
+
long onUpdAcceptInput(FXObject*,FXSelector,void* PTR_IGNORE);
|
310
|
+
long onCmdCancelInput(FXObject*,FXSelector,void* PTR_IGNORE);
|
311
|
+
|
312
|
+
public:
|
313
|
+
|
314
|
+
enum {
|
315
|
+
ID_HORZ_GRID=FXScrollArea::ID_LAST,
|
316
|
+
ID_VERT_GRID,
|
317
|
+
ID_TOGGLE_EDITABLE,
|
318
|
+
ID_DELETE_COLUMN,
|
319
|
+
ID_DELETE_ROW,
|
320
|
+
ID_INSERT_COLUMN,
|
321
|
+
ID_INSERT_ROW,
|
322
|
+
ID_SELECT_COLUMN_INDEX,
|
323
|
+
ID_SELECT_ROW_INDEX,
|
324
|
+
ID_SELECT_COLUMN,
|
325
|
+
ID_SELECT_ROW,
|
326
|
+
ID_SELECT_CELL,
|
327
|
+
ID_SELECT_ALL,
|
328
|
+
ID_DESELECT_ALL,
|
329
|
+
ID_MOVE_LEFT,
|
330
|
+
ID_MOVE_RIGHT,
|
331
|
+
ID_MOVE_UP,
|
332
|
+
ID_MOVE_DOWN,
|
333
|
+
ID_MOVE_HOME,
|
334
|
+
ID_MOVE_END,
|
335
|
+
ID_MOVE_TOP,
|
336
|
+
ID_MOVE_BOTTOM,
|
337
|
+
ID_MOVE_PAGEDOWN,
|
338
|
+
ID_MOVE_PAGEUP,
|
339
|
+
ID_START_INPUT,
|
340
|
+
ID_CANCEL_INPUT,
|
341
|
+
ID_ACCEPT_INPUT,
|
342
|
+
ID_MARK,
|
343
|
+
ID_EXTEND,
|
344
|
+
ID_CUT_SEL,
|
345
|
+
ID_COPY_SEL,
|
346
|
+
ID_PASTE_SEL,
|
347
|
+
ID_DELETE_SEL,
|
348
|
+
ID_LAST
|
349
|
+
};
|
350
|
+
|
351
|
+
public:
|
352
|
+
|
353
|
+
/**
|
354
|
+
* Construct a new table.
|
355
|
+
* The table is initially empty, and reports a default size based on
|
356
|
+
* the scroll areas's scrollbar placement policy.
|
357
|
+
*/
|
358
|
+
%extend {
|
359
|
+
FXTable(FXComposite* p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_MARGIN,FXint pr=DEFAULT_MARGIN,FXint pt=DEFAULT_MARGIN,FXint pb=DEFAULT_MARGIN){
|
360
|
+
return new FXRbTable(p,tgt,sel,opts,x,y,w,h,pl,pr,pt,pb);
|
361
|
+
}
|
362
|
+
}
|
363
|
+
|
364
|
+
/// Return button in the top/left corner
|
365
|
+
FXButton* getCornerButton() const;
|
366
|
+
|
367
|
+
/// Return column header control
|
368
|
+
FXHeader* getColumnHeader() const;
|
369
|
+
|
370
|
+
/// Return row header control
|
371
|
+
FXHeader* getRowHeader() const;
|
372
|
+
|
373
|
+
/// Change number of visible rows
|
374
|
+
void setVisibleRows(FXint nvrows);
|
375
|
+
|
376
|
+
/// Return number of visible rows
|
377
|
+
FXint getVisibleRows() const;
|
378
|
+
|
379
|
+
// Change number of visible columns
|
380
|
+
void setVisibleColumns(FXint nvcols);
|
381
|
+
|
382
|
+
// Return number of visible columns
|
383
|
+
FXint getVisibleColumns() const;
|
384
|
+
|
385
|
+
/// Return TRUE if table is editable
|
386
|
+
FXbool isEditable() const;
|
387
|
+
|
388
|
+
/// Set editable flag
|
389
|
+
void setEditable(FXbool edit=TRUE);
|
390
|
+
|
391
|
+
/// Show or hide horizontal grid
|
392
|
+
void showHorzGrid(FXbool on=TRUE);
|
393
|
+
|
394
|
+
/// Is horizontal grid shown
|
395
|
+
FXbool isHorzGridShown() const;
|
396
|
+
|
397
|
+
/// Show or hide vertical grid
|
398
|
+
void showVertGrid(FXbool on=TRUE);
|
399
|
+
|
400
|
+
/// Is vertical grid shown
|
401
|
+
FXbool isVertGridShown() const;
|
402
|
+
|
403
|
+
/// Get number of rows
|
404
|
+
FXint getNumRows() const;
|
405
|
+
|
406
|
+
/// Get number of columns
|
407
|
+
FXint getNumColumns() const;
|
408
|
+
|
409
|
+
/// Change top cell margin
|
410
|
+
void setMarginTop(FXint pt);
|
411
|
+
|
412
|
+
/// Return top cell margin
|
413
|
+
FXint getMarginTop() const;
|
414
|
+
|
415
|
+
/// Change bottom cell margin
|
416
|
+
void setMarginBottom(FXint pb);
|
417
|
+
|
418
|
+
/// Return bottom cell margin
|
419
|
+
FXint getMarginBottom() const;
|
420
|
+
|
421
|
+
/// Change left cell margin
|
422
|
+
void setMarginLeft(FXint pl);
|
423
|
+
|
424
|
+
/// Return left cell margin
|
425
|
+
FXint getMarginLeft() const;
|
426
|
+
|
427
|
+
/// Change right cell margin
|
428
|
+
void setMarginRight(FXint pr);
|
429
|
+
|
430
|
+
/// Return right cell margin
|
431
|
+
FXint getMarginRight() const;
|
432
|
+
|
433
|
+
/**
|
434
|
+
* Determine column containing x.
|
435
|
+
* Returns -1 if x left of first column, and ncols if x right of last column;
|
436
|
+
* otherwise, returns column in table containing x.
|
437
|
+
*/
|
438
|
+
FXint colAtX(FXint x) const;
|
439
|
+
|
440
|
+
/**
|
441
|
+
* Determine row containing y.
|
442
|
+
* Returns -1 if y above first row, and nrows if y below last row;
|
443
|
+
* otherwise, returns row in table containing y.
|
444
|
+
*/
|
445
|
+
FXint rowAtY(FXint y) const;
|
446
|
+
|
447
|
+
/// Return the item at the given index
|
448
|
+
FXTableItem *getItem(FXint row,FXint col) const;
|
449
|
+
|
450
|
+
%extend {
|
451
|
+
/// Replace the item with a [possibly subclassed] item
|
452
|
+
void setItem(FXint row,FXint col,FXTableItem* item,FXbool notify=FALSE){
|
453
|
+
if(item!=0 && item->isMemberOf(FXMETACLASS(FXRbTableItem))){
|
454
|
+
dynamic_cast<FXRbTableItem*>(item)->owned=TRUE;
|
455
|
+
}
|
456
|
+
self->setItem(row,col,item,notify);
|
457
|
+
}
|
458
|
+
}
|
459
|
+
|
460
|
+
// Return TRUE if item partially visible
|
461
|
+
FXbool isItemVisible(FXint r,FXint c) const;
|
462
|
+
|
463
|
+
/**
|
464
|
+
* Change column header height mode to fixed or variable.
|
465
|
+
* In variable height mode, the column header will size to
|
466
|
+
* fit the contents in it. In fixed mode, the size is
|
467
|
+
* explicitly set using setColumnHeaderHeight().
|
468
|
+
*/
|
469
|
+
void setColumnHeaderMode(FXuint hint=LAYOUT_FIX_HEIGHT);
|
470
|
+
|
471
|
+
/// Return column header height mode
|
472
|
+
FXuint getColumnHeaderMode() const;
|
473
|
+
|
474
|
+
/**
|
475
|
+
* Change row header width mode to fixed or variable.
|
476
|
+
* In variable width mode, the row header will size to
|
477
|
+
* fit the contents in it. In fixed mode, the size is
|
478
|
+
* explicitly set using setRowHeaderWidth().
|
479
|
+
*/
|
480
|
+
void setRowHeaderMode(FXuint hint=LAYOUT_FIX_WIDTH);
|
481
|
+
|
482
|
+
/// Return row header width mode
|
483
|
+
FXuint getRowHeaderMode() const;
|
484
|
+
|
485
|
+
/// Set column header font
|
486
|
+
void setColumnHeaderFont(FXFont* fnt);
|
487
|
+
|
488
|
+
/// Return column header font
|
489
|
+
FXFont* getColumnHeaderFont() const;
|
490
|
+
|
491
|
+
/// Set row header font
|
492
|
+
void setRowHeaderFont(FXFont* fnt);
|
493
|
+
|
494
|
+
/// Return row header font
|
495
|
+
FXFont* getRowHeaderFont() const;
|
496
|
+
|
497
|
+
/// Change column header height
|
498
|
+
void setColumnHeaderHeight(FXint h);
|
499
|
+
|
500
|
+
/// Return column header height
|
501
|
+
FXint getColumnHeaderHeight() const;
|
502
|
+
|
503
|
+
/// Change row header width
|
504
|
+
void setRowHeaderWidth(FXint w);
|
505
|
+
|
506
|
+
/// Return row header width
|
507
|
+
FXint getRowHeaderWidth() const;
|
508
|
+
|
509
|
+
%extend {
|
510
|
+
FXint getColumnX(FXint colEdge) const {
|
511
|
+
if(colEdge<0 || self->getColumnHeader()->getNumItems()<=colEdge){
|
512
|
+
rb_raise(rb_eIndexError,"table column out of bounds");
|
513
|
+
}
|
514
|
+
return self->getColumnX(colEdge);
|
515
|
+
}
|
516
|
+
|
517
|
+
/// Change Y coordinate of row r
|
518
|
+
FXint getRowY(FXint rowEdge) const {
|
519
|
+
if(rowEdge<0 || self->getRowHeader()->getNumItems()<=rowEdge){
|
520
|
+
rb_raise(rb_eIndexError,"table row out of bounds");
|
521
|
+
}
|
522
|
+
return self->getRowY(rowEdge);
|
523
|
+
}
|
524
|
+
}
|
525
|
+
|
526
|
+
/// Get column width
|
527
|
+
FXint getColumnWidth(FXint col) const;
|
528
|
+
|
529
|
+
/// Get row height
|
530
|
+
FXint getRowHeight(FXint row) const;
|
531
|
+
|
532
|
+
/// Change default column width
|
533
|
+
void setDefColumnWidth(FXint cwidth);
|
534
|
+
|
535
|
+
/// Get default column width
|
536
|
+
FXint getDefColumnWidth() const;
|
537
|
+
|
538
|
+
/// Change default row height
|
539
|
+
void setDefRowHeight(FXint rheight);
|
540
|
+
|
541
|
+
/// Get default row height
|
542
|
+
FXint getDefRowHeight() const;
|
543
|
+
|
544
|
+
/// Return minimum row height
|
545
|
+
FXint getMinRowHeight(FXint r) const;
|
546
|
+
|
547
|
+
/// Return minimum column width
|
548
|
+
FXint getMinColumnWidth(FXint c) const;
|
549
|
+
|
550
|
+
/// Fit row heights to contents
|
551
|
+
void fitRowsToContents(FXint row,FXint nr=1);
|
552
|
+
|
553
|
+
/// Fit column widths to contents
|
554
|
+
void fitColumnsToContents(FXint col,FXint nc=1);
|
555
|
+
|
556
|
+
/// Change column header
|
557
|
+
void setColumnText(FXint TABLE_COLUMN_INDEX,const FXString& text);
|
558
|
+
|
559
|
+
/// Return text of column header at index
|
560
|
+
FXString getColumnText(FXint TABLE_COLUMN_INDEX) const;
|
561
|
+
|
562
|
+
/// Change row header
|
563
|
+
void setRowText(FXint TABLE_ROW_INDEX,const FXString& text);
|
564
|
+
|
565
|
+
/// Return text of row header at index
|
566
|
+
FXString getRowText(FXint TABLE_ROW_INDEX) const;
|
567
|
+
|
568
|
+
/// Change column header icon
|
569
|
+
void setColumnIcon(FXint TABLE_COLUMN_INDEX,FXIcon* icon);
|
570
|
+
|
571
|
+
/// Return icon of column header at index
|
572
|
+
FXIcon* getColumnIcon(FXint TABLE_COLUMN_INDEX) const;
|
573
|
+
|
574
|
+
/// Change row header icon
|
575
|
+
void setRowIcon(FXint TABLE_ROW_INDEX,FXIcon* icon);
|
576
|
+
|
577
|
+
/// Return icon of row header at index
|
578
|
+
FXIcon* getRowIcon(FXint TABLE_ROW_INDEX) const;
|
579
|
+
|
580
|
+
/// Change column header icon position, e.g. FXHeaderItem::BEFORE, etc.
|
581
|
+
void setColumnIconPosition(FXint TABLE_COLUMN_INDEX,FXuint mode);
|
582
|
+
|
583
|
+
/// Return icon position of column header at index
|
584
|
+
FXuint getColumnIconPosition(FXint TABLE_COLUMN_INDEX) const;
|
585
|
+
|
586
|
+
/// Change row header icon position, e.g. FXHeaderItem::BEFORE, etc.
|
587
|
+
void setRowIconPosition(FXint TABLE_ROW_INDEX,FXuint mode);
|
588
|
+
|
589
|
+
/// Return icon position of row header at index
|
590
|
+
FXuint getRowIconPosition(FXint TABLE_ROW_INDEX) const;
|
591
|
+
|
592
|
+
/// Change column header justify, e.g. FXHeaderItem::RIGHT, etc.
|
593
|
+
void setColumnJustify(FXint TABLE_COLUMN_INDEX,FXuint justify);
|
594
|
+
|
595
|
+
/// Return justify of column header at index
|
596
|
+
FXuint getColumnJustify(FXint TABLE_COLUMN_INDEX) const;
|
597
|
+
|
598
|
+
/// Change row header justify, e.g. FXHeaderItem::RIGHT, etc.
|
599
|
+
void setRowJustify(FXint TABLE_ROW_INDEX,FXuint justify);
|
600
|
+
|
601
|
+
/// Return justify of row header at index
|
602
|
+
FXuint getRowJustify(FXint TABLE_ROW_INDEX) const;
|
603
|
+
|
604
|
+
%extend {
|
605
|
+
/// Modify cell text
|
606
|
+
void setItemText(FXint r,FXint c,const FXString& text,FXbool notify=FALSE){
|
607
|
+
FXRbTableItem* item;
|
608
|
+
self->setItemText(r,c,text,notify);
|
609
|
+
item=dynamic_cast<FXRbTableItem*>(self->getItem(r,c));
|
610
|
+
if(item!=0){
|
611
|
+
item->owned=TRUE;
|
612
|
+
}
|
613
|
+
}
|
614
|
+
}
|
615
|
+
|
616
|
+
// Get cell text
|
617
|
+
FXString getItemText(FXint r,FXint c) const;
|
618
|
+
|
619
|
+
%extend {
|
620
|
+
/// Modify cell icon, deleting the old icon if it was owned
|
621
|
+
void setItemIcon(FXint r,FXint c,FXIcon* icon,FXbool notify=FALSE){
|
622
|
+
FXRbTableItem* item;
|
623
|
+
self->setItemIcon(r,c,icon,notify);
|
624
|
+
item=dynamic_cast<FXRbTableItem*>(self->getItem(r,c));
|
625
|
+
if(item!=0){
|
626
|
+
item->owned=TRUE;
|
627
|
+
}
|
628
|
+
}
|
629
|
+
}
|
630
|
+
|
631
|
+
// Get the item's icon
|
632
|
+
FXIcon* getItemIcon(FXint r,FXint c) const;
|
633
|
+
|
634
|
+
%extend {
|
635
|
+
/// Modify cell user-data
|
636
|
+
void setItemData(FXint r,FXint c,VALUE ptr){
|
637
|
+
FXRbTableItem* item;
|
638
|
+
self->setItemData(r,c,reinterpret_cast<void*>(ptr));
|
639
|
+
item=dynamic_cast<FXRbTableItem*>(self->getItem(r,c));
|
640
|
+
if(item!=0){
|
641
|
+
item->owned=TRUE;
|
642
|
+
}
|
643
|
+
}
|
644
|
+
|
645
|
+
/// Get cell user data
|
646
|
+
VALUE getItemData(FXint r,FXint c) const {
|
647
|
+
void* ptr=self->getItemData(r,c);
|
648
|
+
return (ptr!=0) ? reinterpret_cast<VALUE>(ptr) : Qnil;
|
649
|
+
}
|
650
|
+
}
|
651
|
+
|
652
|
+
%extend {
|
653
|
+
/// Extract cells from given range as text.
|
654
|
+
VALUE extractText(FXint startrow,FXint endrow,FXint startcol,FXint endcol,const FXchar* cs="\t",const FXchar* rs="\n") const {
|
655
|
+
FXString str;
|
656
|
+
VALUE result;
|
657
|
+
if(startrow<0 || startcol<0 || self->getNumRows()<=endrow || self->getNumColumns()<=endcol) rb_raise(rb_eIndexError,"index out of bounds");
|
658
|
+
self->extractText(str,startrow,endrow,startcol,endcol,cs,rs);
|
659
|
+
result=rb_str_new2(str.text());
|
660
|
+
return result;
|
661
|
+
}
|
662
|
+
|
663
|
+
/// Overlay text over given cell range
|
664
|
+
void overlayText(FXint startrow,FXint endrow,FXint startcol,FXint endcol,VALUE str,const FXchar* cs="\t",const FXchar* rs="\n",FXbool notify=FALSE){
|
665
|
+
if(startrow<0 || startcol<0 || self->getNumRows()<=endrow || self->getNumColumns()<=endcol) rb_raise(rb_eIndexError,"index out of bounds");
|
666
|
+
const FXchar* text=reinterpret_cast<FXchar*>(StringValuePtr(str));
|
667
|
+
FXint size=RSTRING_LEN(str);
|
668
|
+
self->overlayText(startrow,endrow,startcol,endcol,text,size,cs,rs,notify);
|
669
|
+
}
|
670
|
+
}
|
671
|
+
|
672
|
+
%extend {
|
673
|
+
/**
|
674
|
+
* Determine the number of rows and columns in a block of text
|
675
|
+
* where columns are separated by characters from the set cs, and rows
|
676
|
+
* are separated by characters from the set rs.
|
677
|
+
*/
|
678
|
+
VALUE countText(const FXString& text,const FXchar* cs="\t,",const FXchar* rs="\n") const {
|
679
|
+
FXint nr,nc;
|
680
|
+
self->countText(nr,nc,text,cs,rs);
|
681
|
+
return rb_ary_new3(2,INT2NUM(nr),INT2NUM(nc));
|
682
|
+
}
|
683
|
+
}
|
684
|
+
|
685
|
+
/// Return TRUE if its a spanning cell
|
686
|
+
FXbool isItemSpanning(FXint r,FXint c) const;
|
687
|
+
|
688
|
+
%extend {
|
689
|
+
/// Repaint cells between grid lines sr,er and grid lines sc,ec
|
690
|
+
void updateRange(FXint sr,FXint er,FXint sc,FXint ec) const {
|
691
|
+
if(sr<0 || sc<0 || self->getNumRows()<=er || self->getNumColumns()<=ec) rb_raise(rb_eIndexError,"index out of bounds");
|
692
|
+
self->updateRange(sr,er,sc,ec);
|
693
|
+
}
|
694
|
+
}
|
695
|
+
|
696
|
+
/// Repaint cell at r,c
|
697
|
+
void updateItem(FXint r,FXint c) const;
|
698
|
+
|
699
|
+
// Is item enabled?
|
700
|
+
FXbool isItemEnabled(FXint r,FXint c) const;
|
701
|
+
|
702
|
+
/**
|
703
|
+
* Change item justification. Horizontal justification is controlled by passing
|
704
|
+
* FXTableItem::RIGHT, FXTableItem::LEFT, or FXTableItem::CENTER_X.
|
705
|
+
* Vertical justification is controlled by FXTableItem::TOP, FXTableItem::BOTTOM,
|
706
|
+
* or FXTableItem::CENTER_Y.
|
707
|
+
* The default is a combination of FXTableItem::RIGHT and FXTableItem::CENTER_Y.
|
708
|
+
*/
|
709
|
+
void setItemJustify(FXint r,FXint c,FXuint justify);
|
710
|
+
|
711
|
+
/// Return item justification
|
712
|
+
FXuint getItemJustify(FXint r,FXint c) const;
|
713
|
+
|
714
|
+
/**
|
715
|
+
* Change relative position of icon and text of item.
|
716
|
+
* Passing FXTableItem::BEFORE or FXTableItem::AFTER places the icon
|
717
|
+
* before or after the text, and passing FXTableItem::ABOVE or
|
718
|
+
* FXTableItem::BELOW places it above or below the text, respectively.
|
719
|
+
* The default is 0 which places the text on top of the icon.
|
720
|
+
*/
|
721
|
+
void setItemIconPosition(FXint r,FXint c,FXuint mode);
|
722
|
+
|
723
|
+
/// Return relative icon and text position
|
724
|
+
FXuint getItemIconPosition(FXint r,FXint c) const;
|
725
|
+
|
726
|
+
/**
|
727
|
+
* Change item borders style. Borders on each side of the item can be turned
|
728
|
+
* controlled individually using FXTableItem::LBORDER, FXTableItem::RBORDER,
|
729
|
+
* FXTableItem::TBORDER and FXTableItem::BBORDER.
|
730
|
+
*/
|
731
|
+
void setItemBorders(FXint r,FXint c,FXuint borders);
|
732
|
+
|
733
|
+
/// Return item border style
|
734
|
+
FXuint getItemBorders(FXint r,FXint c) const;
|
735
|
+
|
736
|
+
/// Change item background stipple style
|
737
|
+
void setItemStipple(FXint r,FXint c,FXStipplePattern pat);
|
738
|
+
|
739
|
+
/// Return item background stipple style
|
740
|
+
FXStipplePattern getItemStipple(FXint r,FXint c) const;
|
741
|
+
|
742
|
+
/// Get row number of current item
|
743
|
+
FXint getCurrentRow() const;
|
744
|
+
|
745
|
+
/// Get column number of current item
|
746
|
+
FXint getCurrentColumn() const;
|
747
|
+
|
748
|
+
/// Is this the current item?
|
749
|
+
FXbool isItemCurrent(FXint r,FXint c) const;
|
750
|
+
|
751
|
+
/// Change anchor item
|
752
|
+
void setAnchorItem(FXint r,FXint c);
|
753
|
+
|
754
|
+
/// Get row number of anchor item
|
755
|
+
FXint getAnchorRow() const;
|
756
|
+
|
757
|
+
/// Get column number of anchor item
|
758
|
+
FXint getAnchorColumn() const;
|
759
|
+
|
760
|
+
/// Get selection start row; returns -1 if no selection
|
761
|
+
FXint getSelStartRow() const;
|
762
|
+
|
763
|
+
/// Get selection start column; returns -1 if no selection
|
764
|
+
FXint getSelStartColumn() const;
|
765
|
+
|
766
|
+
/// Get selection end row; returns -1 if no selection
|
767
|
+
FXint getSelEndRow() const;
|
768
|
+
|
769
|
+
/// Get selection end column; returns -1 if no selection
|
770
|
+
FXint getSelEndColumn() const;
|
771
|
+
|
772
|
+
/// Is item selected?
|
773
|
+
FXbool isItemSelected(FXint r,FXint c) const;
|
774
|
+
|
775
|
+
/// Is row of cells selected
|
776
|
+
FXbool isRowSelected(FXint r) const;
|
777
|
+
|
778
|
+
/// Is column selected
|
779
|
+
FXbool isColumnSelected(FXint c) const;
|
780
|
+
|
781
|
+
/// Is anything selected
|
782
|
+
FXbool isAnythingSelected() const;
|
783
|
+
|
784
|
+
/// Change font
|
785
|
+
void setFont(FXFont* fnt);
|
786
|
+
FXFont* getFont() const;
|
787
|
+
|
788
|
+
/// Obtain colors of various parts
|
789
|
+
FXColor getTextColor() const;
|
790
|
+
FXColor getBaseColor() const;
|
791
|
+
FXColor getHiliteColor() const;
|
792
|
+
FXColor getShadowColor() const;
|
793
|
+
FXColor getBorderColor() const;
|
794
|
+
FXColor getSelBackColor() const;
|
795
|
+
FXColor getSelTextColor() const;
|
796
|
+
FXColor getGridColor() const;
|
797
|
+
FXColor getStippleColor() const;
|
798
|
+
FXColor getCellBorderColor() const;
|
799
|
+
|
800
|
+
/// Change colors of various parts
|
801
|
+
void setTextColor(FXColor clr);
|
802
|
+
void setBaseColor(FXColor clr);
|
803
|
+
void setHiliteColor(FXColor clr);
|
804
|
+
void setShadowColor(FXColor clr);
|
805
|
+
void setBorderColor(FXColor clr);
|
806
|
+
void setSelBackColor(FXColor clr);
|
807
|
+
void setSelTextColor(FXColor clr);
|
808
|
+
void setGridColor(FXColor clr);
|
809
|
+
void setStippleColor(FXColor clr);
|
810
|
+
void setCellBorderColor(FXColor clr);
|
811
|
+
|
812
|
+
/// Change cell background color for even/odd rows/columns
|
813
|
+
void setCellColor(FXint ROW_ZERO_OR_ONE,FXint COLUMN_ZERO_OR_ONE,FXColor clr);
|
814
|
+
|
815
|
+
/// Obtain cell background color for even/odd rows/columns
|
816
|
+
FXColor getCellColor(FXint ROW_ZERO_OR_ONE,FXint COLUMN_ZERO_OR_ONE) const;
|
817
|
+
|
818
|
+
/// Change cell border width
|
819
|
+
void setCellBorderWidth(FXint borderwidth);
|
820
|
+
|
821
|
+
/// Return cell border width
|
822
|
+
FXint getCellBorderWidth() const;
|
823
|
+
|
824
|
+
/// Change table style
|
825
|
+
FXuint getTableStyle() const;
|
826
|
+
void setTableStyle(FXuint style);
|
827
|
+
|
828
|
+
/// Set column renumbering
|
829
|
+
void setColumnRenumbering(FXbool flag);
|
830
|
+
|
831
|
+
/// Get column renumbering
|
832
|
+
FXbool getColumnRenumbering() const;
|
833
|
+
|
834
|
+
/// Set row renumbering
|
835
|
+
void setRowRenumbering(FXbool flag);
|
836
|
+
|
837
|
+
/// Get row renumbering
|
838
|
+
FXbool getRowRenumbering() const;
|
839
|
+
|
840
|
+
/// Change help text
|
841
|
+
void setHelpText(const FXString& text);
|
842
|
+
|
843
|
+
/// Get help text
|
844
|
+
const FXString& getHelpText() const;
|
845
|
+
|
846
|
+
/// Destructor
|
847
|
+
virtual ~FXTable();
|
848
|
+
};
|
849
|
+
|
850
|
+
%clear FXint r;
|
851
|
+
%clear FXint row;
|
852
|
+
%clear FXint c;
|
853
|
+
%clear FXint col;
|
854
|
+
|
855
|
+
DECLARE_FXOBJECT_VIRTUALS(FXTable)
|
856
|
+
DECLARE_FXID_VIRTUALS(FXTable)
|
857
|
+
DECLARE_FXDRAWABLE_VIRTUALS(FXTable)
|
858
|
+
DECLARE_FXWINDOW_VIRTUALS(FXTable)
|
859
|
+
DECLARE_FXSCROLLAREA_VIRTUALS(FXTable)
|
860
|
+
DECLARE_FXTABLE_VIRTUALS(FXTable)
|
861
|
+
|