fxrubi 1.6.22.pre1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemtest +0 -0
- data/History.txt +10 -0
- data/Manifest.txt +922 -0
- data/README +39 -0
- data/README.txt +483 -0
- data/Rakefile +185 -0
- data/TODO +47 -0
- data/doap.rdf +87 -0
- data/examples/RAA.rb +25 -0
- data/examples/README +53 -0
- data/examples/babelfish.rb +72 -0
- data/examples/bounce.rb +159 -0
- data/examples/browser.rb +191 -0
- data/examples/button.rb +168 -0
- data/examples/charts.rb +35 -0
- data/examples/custom_table_item.rb +170 -0
- data/examples/datatarget.rb +223 -0
- data/examples/dctest.rb +696 -0
- data/examples/dialog.rb +143 -0
- data/examples/dilbert.rb +66 -0
- data/examples/dirlist.rb +63 -0
- data/examples/dragdrop.rb +97 -0
- data/examples/dragsource.rb +80 -0
- data/examples/dropsite.rb +59 -0
- data/examples/foursplit.rb +97 -0
- data/examples/gltest.rb +330 -0
- data/examples/glviewer.rb +576 -0
- data/examples/groupbox.rb +392 -0
- data/examples/header.rb +149 -0
- data/examples/hello.rb +12 -0
- data/examples/hello2.rb +51 -0
- data/examples/iRAA.rb +153 -0
- data/examples/iconlist.rb +92 -0
- data/examples/icons/AngryGuyInBunnySuit.ico +0 -0
- data/examples/icons/FatBot.ico +0 -0
- data/examples/icons/FlippedySwitch.ico +0 -0
- data/examples/icons/LeGoon.ico +0 -0
- data/examples/icons/Net.ico +0 -0
- data/examples/icons/RedMacOS.ico +0 -0
- data/examples/icons/SawBlade.ico +0 -0
- data/examples/icons/backview.png +0 -0
- data/examples/icons/big.png +0 -0
- data/examples/icons/bigfolder.png +0 -0
- data/examples/icons/bigpenguin.png +0 -0
- data/examples/icons/bluebullet14x14.gif +0 -0
- data/examples/icons/bottomview.png +0 -0
- data/examples/icons/camera.png +0 -0
- data/examples/icons/capbutt.png +0 -0
- data/examples/icons/capnotlast.png +0 -0
- data/examples/icons/capproj.png +0 -0
- data/examples/icons/capround.png +0 -0
- data/examples/icons/colorpal.png +0 -0
- data/examples/icons/copy.png +0 -0
- data/examples/icons/cut.png +0 -0
- data/examples/icons/delimit.png +0 -0
- data/examples/icons/dippy.png +0 -0
- data/examples/icons/double_dash.png +0 -0
- data/examples/icons/filenew.png +0 -0
- data/examples/icons/fileopen.png +0 -0
- data/examples/icons/filesave.png +0 -0
- data/examples/icons/filesaveas.png +0 -0
- data/examples/icons/fonts.png +0 -0
- data/examples/icons/fox.png +0 -0
- data/examples/icons/foxicon.png +0 -0
- data/examples/icons/frontview.png +0 -0
- data/examples/icons/gem_big.png +0 -0
- data/examples/icons/gem_small.png +0 -0
- data/examples/icons/hello2.png +0 -0
- data/examples/icons/help.png +0 -0
- data/examples/icons/indent.png +0 -0
- data/examples/icons/jbevel.png +0 -0
- data/examples/icons/jmiter.png +0 -0
- data/examples/icons/jround.png +0 -0
- data/examples/icons/kill.png +0 -0
- data/examples/icons/leftview.png +0 -0
- data/examples/icons/light.png +0 -0
- data/examples/icons/minidoc.png +0 -0
- data/examples/icons/minifolder.png +0 -0
- data/examples/icons/minifolderopen.png +0 -0
- data/examples/icons/newfolder.png +0 -0
- data/examples/icons/nolight.png +0 -0
- data/examples/icons/onoff_dash.png +0 -0
- data/examples/icons/palette.png +0 -0
- data/examples/icons/parallel.png +0 -0
- data/examples/icons/paste.png +0 -0
- data/examples/icons/pattern.png +0 -0
- data/examples/icons/penguin.png +0 -0
- data/examples/icons/perspective.png +0 -0
- data/examples/icons/printicon.png +0 -0
- data/examples/icons/prop.png +0 -0
- data/examples/icons/redo.png +0 -0
- data/examples/icons/rightview.png +0 -0
- data/examples/icons/saveas.png +0 -0
- data/examples/icons/shutter1.png +0 -0
- data/examples/icons/shutter2.png +0 -0
- data/examples/icons/small.png +0 -0
- data/examples/icons/smoothlight.png +0 -0
- data/examples/icons/solid_line.png +0 -0
- data/examples/icons/tbuplevel.png +0 -0
- data/examples/icons/topview.png +0 -0
- data/examples/icons/transpbullet14x14.gif +0 -0
- data/examples/icons/undo.png +0 -0
- data/examples/icons/winapp.png +0 -0
- data/examples/icons/zoom.png +0 -0
- data/examples/image.rb +279 -0
- data/examples/imageviewer.rb +509 -0
- data/examples/inputs.rb +83 -0
- data/examples/mditest.rb +180 -0
- data/examples/pig.rb +77 -0
- data/examples/raabrowser.rb +122 -0
- data/examples/ratio.rb +80 -0
- data/examples/rulerview.rb +27 -0
- data/examples/scintilla-test.rb +81 -0
- data/examples/scribble-orig.rb +186 -0
- data/examples/scribble.rb +162 -0
- data/examples/shutter.rb +158 -0
- data/examples/splitter.rb +211 -0
- data/examples/styledtext.rb +82 -0
- data/examples/tabbook.rb +165 -0
- data/examples/table.rb +182 -0
- data/examples/textedit/commands.rb +114 -0
- data/examples/textedit/helpwindow.rb +299 -0
- data/examples/textedit/prefdialog.rb +239 -0
- data/examples/textedit/textedit.rb +1763 -0
- data/examples/unicode.rb +36 -0
- data/ext/fox16/FXRbApp.cpp +128 -0
- data/ext/fox16/FXRbDataTarget.cpp +110 -0
- data/ext/fox16/FXRbGLViewer.cpp +89 -0
- data/ext/fox16/FXRuby.cpp +2002 -0
- data/ext/fox16/MANIFEST +189 -0
- data/ext/fox16/core_wrap.cpp +11545 -0
- data/ext/fox16/dc_wrap.cpp +2874 -0
- data/ext/fox16/dialogs_wrap.cpp +7963 -0
- data/ext/fox16/extconf.rb +151 -0
- data/ext/fox16/frames_wrap.cpp +11380 -0
- data/ext/fox16/fx3d_wrap.cpp +10651 -0
- data/ext/fox16/iconlist_wrap.cpp +4074 -0
- data/ext/fox16/icons_wrap.cpp +4745 -0
- data/ext/fox16/image_wrap.cpp +4388 -0
- data/ext/fox16/impl.cpp +1156 -0
- data/ext/fox16/include/FXMemoryBuffer.h +52 -0
- data/ext/fox16/include/FXRb4Splitter.h +54 -0
- data/ext/fox16/include/FXRb7Segment.h +51 -0
- data/ext/fox16/include/FXRbAccelTable.h +46 -0
- data/ext/fox16/include/FXRbApp.h +155 -0
- data/ext/fox16/include/FXRbAppVirtuals.h +15 -0
- data/ext/fox16/include/FXRbArrowButton.h +51 -0
- data/ext/fox16/include/FXRbBMPIcon.h +54 -0
- data/ext/fox16/include/FXRbBMPImage.h +54 -0
- data/ext/fox16/include/FXRbBitmap.h +133 -0
- data/ext/fox16/include/FXRbBitmapFrame.h +56 -0
- data/ext/fox16/include/FXRbBitmapView.h +56 -0
- data/ext/fox16/include/FXRbBitmapVirtuals.h +37 -0
- data/ext/fox16/include/FXRbButton.h +51 -0
- data/ext/fox16/include/FXRbCURCursor.h +60 -0
- data/ext/fox16/include/FXRbCanvas.h +51 -0
- data/ext/fox16/include/FXRbCheckButton.h +51 -0
- data/ext/fox16/include/FXRbChoiceBox.h +56 -0
- data/ext/fox16/include/FXRbColorBar.h +51 -0
- data/ext/fox16/include/FXRbColorDialog.h +53 -0
- data/ext/fox16/include/FXRbColorList.h +84 -0
- data/ext/fox16/include/FXRbColorRing.h +51 -0
- data/ext/fox16/include/FXRbColorSelector.h +51 -0
- data/ext/fox16/include/FXRbColorWell.h +51 -0
- data/ext/fox16/include/FXRbColorWheel.h +51 -0
- data/ext/fox16/include/FXRbComboBox.h +56 -0
- data/ext/fox16/include/FXRbCommon.h +95 -0
- data/ext/fox16/include/FXRbComposite.h +51 -0
- data/ext/fox16/include/FXRbCursor.h +87 -0
- data/ext/fox16/include/FXRbCursorVirtuals.h +6 -0
- data/ext/fox16/include/FXRbDC.h +427 -0
- data/ext/fox16/include/FXRbDCPrint.h +49 -0
- data/ext/fox16/include/FXRbDCVirtuals.h +187 -0
- data/ext/fox16/include/FXRbDCWindow.h +64 -0
- data/ext/fox16/include/FXRbDataTarget.h +65 -0
- data/ext/fox16/include/FXRbDebugTarget.h +46 -0
- data/ext/fox16/include/FXRbDelegator.h +46 -0
- data/ext/fox16/include/FXRbDial.h +51 -0
- data/ext/fox16/include/FXRbDialogBox.h +68 -0
- data/ext/fox16/include/FXRbDialogBoxVirtuals.h +3 -0
- data/ext/fox16/include/FXRbDict.h +46 -0
- data/ext/fox16/include/FXRbDirBox.h +52 -0
- data/ext/fox16/include/FXRbDirDialog.h +56 -0
- data/ext/fox16/include/FXRbDirList.h +79 -0
- data/ext/fox16/include/FXRbDirSelector.h +51 -0
- data/ext/fox16/include/FXRbDockBar.h +86 -0
- data/ext/fox16/include/FXRbDockBarVirtuals.h +10 -0
- data/ext/fox16/include/FXRbDockHandler.h +51 -0
- data/ext/fox16/include/FXRbDockSite.h +85 -0
- data/ext/fox16/include/FXRbDockSiteVirtuals.h +13 -0
- data/ext/fox16/include/FXRbDockTitle.h +51 -0
- data/ext/fox16/include/FXRbDocument.h +46 -0
- data/ext/fox16/include/FXRbDragCorner.h +51 -0
- data/ext/fox16/include/FXRbDrawable.h +64 -0
- data/ext/fox16/include/FXRbDrawableVirtuals.h +3 -0
- data/ext/fox16/include/FXRbDriveBox.h +52 -0
- data/ext/fox16/include/FXRbFileDialog.h +56 -0
- data/ext/fox16/include/FXRbFileDict.h +104 -0
- data/ext/fox16/include/FXRbFileDictVirtuals.h +9 -0
- data/ext/fox16/include/FXRbFileList.h +81 -0
- data/ext/fox16/include/FXRbFileSelector.h +51 -0
- data/ext/fox16/include/FXRbFoldingItemVirtuals.h +42 -0
- data/ext/fox16/include/FXRbFoldingList.h +270 -0
- data/ext/fox16/include/FXRbFoldingListVirtuals.h +43 -0
- data/ext/fox16/include/FXRbFont.h +183 -0
- data/ext/fox16/include/FXRbFontDialog.h +53 -0
- data/ext/fox16/include/FXRbFontSelector.h +51 -0
- data/ext/fox16/include/FXRbFontVirtuals.h +55 -0
- data/ext/fox16/include/FXRbFrame.h +51 -0
- data/ext/fox16/include/FXRbGIFCursor.h +60 -0
- data/ext/fox16/include/FXRbGIFIcon.h +54 -0
- data/ext/fox16/include/FXRbGIFImage.h +54 -0
- data/ext/fox16/include/FXRbGLCanvas.h +92 -0
- data/ext/fox16/include/FXRbGLCanvasVirtuals.h +13 -0
- data/ext/fox16/include/FXRbGLContext.h +58 -0
- data/ext/fox16/include/FXRbGLObject.h +103 -0
- data/ext/fox16/include/FXRbGLObjectVirtuals.h +22 -0
- data/ext/fox16/include/FXRbGLShape.h +81 -0
- data/ext/fox16/include/FXRbGLShapeVirtuals.h +8 -0
- data/ext/fox16/include/FXRbGLViewer.h +89 -0
- data/ext/fox16/include/FXRbGLViewerVirtuals.h +10 -0
- data/ext/fox16/include/FXRbGLVisual.h +56 -0
- data/ext/fox16/include/FXRbGradientBar.h +55 -0
- data/ext/fox16/include/FXRbGroupBox.h +51 -0
- data/ext/fox16/include/FXRbHeader.h +129 -0
- data/ext/fox16/include/FXRbHeaderItemVirtuals.h +22 -0
- data/ext/fox16/include/FXRbHorizontalFrame.h +51 -0
- data/ext/fox16/include/FXRbICOIcon.h +54 -0
- data/ext/fox16/include/FXRbICOImage.h +54 -0
- data/ext/fox16/include/FXRbIcon.h +57 -0
- data/ext/fox16/include/FXRbIconItemVirtuals.h +68 -0
- data/ext/fox16/include/FXRbIconList.h +288 -0
- data/ext/fox16/include/FXRbIconListVirtuals.h +35 -0
- data/ext/fox16/include/FXRbIconSource.h +127 -0
- data/ext/fox16/include/FXRbIconSourceVirtuals.h +37 -0
- data/ext/fox16/include/FXRbId.h +74 -0
- data/ext/fox16/include/FXRbIdVirtuals.h +9 -0
- data/ext/fox16/include/FXRbImage.h +162 -0
- data/ext/fox16/include/FXRbImageFrame.h +56 -0
- data/ext/fox16/include/FXRbImageView.h +55 -0
- data/ext/fox16/include/FXRbImageVirtuals.h +51 -0
- data/ext/fox16/include/FXRbInputDialog.h +56 -0
- data/ext/fox16/include/FXRbJPGIcon.h +54 -0
- data/ext/fox16/include/FXRbJPGImage.h +54 -0
- data/ext/fox16/include/FXRbKnob.h +51 -0
- data/ext/fox16/include/FXRbLabel.h +51 -0
- data/ext/fox16/include/FXRbList.h +226 -0
- data/ext/fox16/include/FXRbListBox.h +67 -0
- data/ext/fox16/include/FXRbListBoxVirtuals.h +4 -0
- data/ext/fox16/include/FXRbListItemVirtuals.h +33 -0
- data/ext/fox16/include/FXRbListVirtuals.h +30 -0
- data/ext/fox16/include/FXRbMDIButton.h +162 -0
- data/ext/fox16/include/FXRbMDIChild.h +82 -0
- data/ext/fox16/include/FXRbMDIChildVirtuals.h +12 -0
- data/ext/fox16/include/FXRbMDIClient.h +80 -0
- data/ext/fox16/include/FXRbMDIClientVirtuals.h +12 -0
- data/ext/fox16/include/FXRbMainWindow.h +54 -0
- data/ext/fox16/include/FXRbMatrix.h +51 -0
- data/ext/fox16/include/FXRbMenuBar.h +63 -0
- data/ext/fox16/include/FXRbMenuButton.h +51 -0
- data/ext/fox16/include/FXRbMenuCaption.h +51 -0
- data/ext/fox16/include/FXRbMenuCascade.h +51 -0
- data/ext/fox16/include/FXRbMenuCheck.h +49 -0
- data/ext/fox16/include/FXRbMenuCommand.h +49 -0
- data/ext/fox16/include/FXRbMenuPane.h +52 -0
- data/ext/fox16/include/FXRbMenuRadio.h +49 -0
- data/ext/fox16/include/FXRbMenuSeparator.h +51 -0
- data/ext/fox16/include/FXRbMenuTitle.h +51 -0
- data/ext/fox16/include/FXRbMessageBox.h +56 -0
- data/ext/fox16/include/FXRbObject.h +67 -0
- data/ext/fox16/include/FXRbObjectVirtuals.h +9 -0
- data/ext/fox16/include/FXRbOptionMenu.h +73 -0
- data/ext/fox16/include/FXRbPCXIcon.h +54 -0
- data/ext/fox16/include/FXRbPCXImage.h +54 -0
- data/ext/fox16/include/FXRbPNGIcon.h +54 -0
- data/ext/fox16/include/FXRbPNGImage.h +54 -0
- data/ext/fox16/include/FXRbPPMIcon.h +54 -0
- data/ext/fox16/include/FXRbPPMImage.h +54 -0
- data/ext/fox16/include/FXRbPacker.h +51 -0
- data/ext/fox16/include/FXRbPicker.h +51 -0
- data/ext/fox16/include/FXRbPopup.h +70 -0
- data/ext/fox16/include/FXRbPopupVirtuals.h +6 -0
- data/ext/fox16/include/FXRbPrintDialog.h +53 -0
- data/ext/fox16/include/FXRbProgressBar.h +51 -0
- data/ext/fox16/include/FXRbProgressDialog.h +53 -0
- data/ext/fox16/include/FXRbRGBIcon.h +54 -0
- data/ext/fox16/include/FXRbRGBImage.h +54 -0
- data/ext/fox16/include/FXRbRadioButton.h +51 -0
- data/ext/fox16/include/FXRbRealSlider.h +51 -0
- data/ext/fox16/include/FXRbRealSpinner.h +64 -0
- data/ext/fox16/include/FXRbRealSpinnerVirtuals.h +3 -0
- data/ext/fox16/include/FXRbRecentFiles.h +52 -0
- data/ext/fox16/include/FXRbRegistry.h +46 -0
- data/ext/fox16/include/FXRbReplaceDialog.h +53 -0
- data/ext/fox16/include/FXRbRootWindow.h +51 -0
- data/ext/fox16/include/FXRbRuler.h +56 -0
- data/ext/fox16/include/FXRbRulerView.h +54 -0
- data/ext/fox16/include/FXRbScintilla.h +52 -0
- data/ext/fox16/include/FXRbScrollArea.h +87 -0
- data/ext/fox16/include/FXRbScrollAreaVirtuals.h +13 -0
- data/ext/fox16/include/FXRbScrollBar.h +73 -0
- data/ext/fox16/include/FXRbScrollPane.h +52 -0
- data/ext/fox16/include/FXRbScrollWindow.h +57 -0
- data/ext/fox16/include/FXRbSearchDialog.h +53 -0
- data/ext/fox16/include/FXRbSeparator.h +95 -0
- data/ext/fox16/include/FXRbSettings.h +46 -0
- data/ext/fox16/include/FXRbShell.h +56 -0
- data/ext/fox16/include/FXRbShutter.h +86 -0
- data/ext/fox16/include/FXRbShutterVirtuals.h +3 -0
- data/ext/fox16/include/FXRbSlider.h +51 -0
- data/ext/fox16/include/FXRbSpinner.h +64 -0
- data/ext/fox16/include/FXRbSpinnerVirtuals.h +3 -0
- data/ext/fox16/include/FXRbSplashWindow.h +57 -0
- data/ext/fox16/include/FXRbSplitter.h +54 -0
- data/ext/fox16/include/FXRbSpring.h +51 -0
- data/ext/fox16/include/FXRbStatusBar.h +51 -0
- data/ext/fox16/include/FXRbStatusLine.h +51 -0
- data/ext/fox16/include/FXRbStream.h +101 -0
- data/ext/fox16/include/FXRbStreamVirtuals.h +9 -0
- data/ext/fox16/include/FXRbStringDict.h +46 -0
- data/ext/fox16/include/FXRbSwitcher.h +51 -0
- data/ext/fox16/include/FXRbTGAIcon.h +54 -0
- data/ext/fox16/include/FXRbTGAImage.h +54 -0
- data/ext/fox16/include/FXRbTIFIcon.h +54 -0
- data/ext/fox16/include/FXRbTIFImage.h +54 -0
- data/ext/fox16/include/FXRbTabBar.h +64 -0
- data/ext/fox16/include/FXRbTabBarVirtuals.h +3 -0
- data/ext/fox16/include/FXRbTabBook.h +52 -0
- data/ext/fox16/include/FXRbTabItem.h +51 -0
- data/ext/fox16/include/FXRbTable.h +509 -0
- data/ext/fox16/include/FXRbTableItemVirtuals.h +89 -0
- data/ext/fox16/include/FXRbTableVirtuals.h +89 -0
- data/ext/fox16/include/FXRbText.h +187 -0
- data/ext/fox16/include/FXRbTextField.h +51 -0
- data/ext/fox16/include/FXRbTextVirtuals.h +52 -0
- data/ext/fox16/include/FXRbToggleButton.h +51 -0
- data/ext/fox16/include/FXRbToolBar.h +63 -0
- data/ext/fox16/include/FXRbToolBarGrip.h +51 -0
- data/ext/fox16/include/FXRbToolBarShell.h +52 -0
- data/ext/fox16/include/FXRbToolBarTab.h +51 -0
- data/ext/fox16/include/FXRbToolTip.h +51 -0
- data/ext/fox16/include/FXRbTopWindow.h +91 -0
- data/ext/fox16/include/FXRbTopWindowVirtuals.h +15 -0
- data/ext/fox16/include/FXRbTranslator.h +61 -0
- data/ext/fox16/include/FXRbTranslatorVirtuals.h +4 -0
- data/ext/fox16/include/FXRbTreeItemVirtuals.h +42 -0
- data/ext/fox16/include/FXRbTreeList.h +277 -0
- data/ext/fox16/include/FXRbTreeListBox.h +64 -0
- data/ext/fox16/include/FXRbTreeListBoxVirtuals.h +4 -0
- data/ext/fox16/include/FXRbTreeListVirtuals.h +42 -0
- data/ext/fox16/include/FXRbTriStateButton.h +51 -0
- data/ext/fox16/include/FXRbVerticalFrame.h +51 -0
- data/ext/fox16/include/FXRbVisual.h +56 -0
- data/ext/fox16/include/FXRbWindow.h +248 -0
- data/ext/fox16/include/FXRbWindowVirtuals.h +94 -0
- data/ext/fox16/include/FXRbWizard.h +60 -0
- data/ext/fox16/include/FXRbXBMIcon.h +54 -0
- data/ext/fox16/include/FXRbXBMImage.h +54 -0
- data/ext/fox16/include/FXRbXPMIcon.h +54 -0
- data/ext/fox16/include/FXRbXPMImage.h +54 -0
- data/ext/fox16/include/FXRuby.h +842 -0
- data/ext/fox16/include/impl.h +214 -0
- data/ext/fox16/include/inlinestubs.h +1155 -0
- data/ext/fox16/label_wrap.cpp +5700 -0
- data/ext/fox16/layout_wrap.cpp +6358 -0
- data/ext/fox16/librb.c +647 -0
- data/ext/fox16/list_wrap.cpp +2981 -0
- data/ext/fox16/make_impl.rb +121 -0
- data/ext/fox16/markfuncs.cpp +1651 -0
- data/ext/fox16/mdi_wrap.cpp +5266 -0
- data/ext/fox16/menu_wrap.cpp +5589 -0
- data/ext/fox16/scintilla_wrap.cpp +2518 -0
- data/ext/fox16/table_wrap.cpp +4173 -0
- data/ext/fox16/text_wrap.cpp +3832 -0
- data/ext/fox16/treelist_wrap.cpp +6004 -0
- data/ext/fox16/ui_wrap.cpp +14230 -0
- data/ext/fox16/unregisterOwnedObjects.cpp +120 -0
- data/index.html +14 -0
- data/lib/1.8/fox16.so +0 -0
- data/lib/1.9/fox16.so +0 -0
- data/lib/fox16.rb +8 -0
- data/lib/fox16/accel_table.rb +83 -0
- data/lib/fox16/aliases.rb +5611 -0
- data/lib/fox16/bitmapview.rb +222 -0
- data/lib/fox16/calendar.rb +217 -0
- data/lib/fox16/chore.rb +105 -0
- data/lib/fox16/colors.rb +280 -0
- data/lib/fox16/core.rb +700 -0
- data/lib/fox16/dict.rb +35 -0
- data/lib/fox16/exceptions_for_fxerror.rb +17 -0
- data/lib/fox16/execute_nonmodal.rb +70 -0
- data/lib/fox16/glgroup.rb +166 -0
- data/lib/fox16/glshapes.rb +456 -0
- data/lib/fox16/input.rb +59 -0
- data/lib/fox16/irb.rb +178 -0
- data/lib/fox16/iterators.rb +420 -0
- data/lib/fox16/keys.rb +1374 -0
- data/lib/fox16/kwargs.rb +2738 -0
- data/lib/fox16/missingdep.rb +14 -0
- data/lib/fox16/pseudokeyboard.rb +40 -0
- data/lib/fox16/pseudomouse.rb +87 -0
- data/lib/fox16/responder.rb +70 -0
- data/lib/fox16/responder2.rb +132 -0
- data/lib/fox16/scintilla.rb +5017 -0
- data/lib/fox16/settings.rb +18 -0
- data/lib/fox16/signal.rb +71 -0
- data/lib/fox16/splashscreen.rb +82 -0
- data/lib/fox16/timeout.rb +136 -0
- data/lib/fox16/undolist.rb +455 -0
- data/lib/fox16/version.rb +5 -0
- data/rdoc-sources/FX4Splitter.rb +156 -0
- data/rdoc-sources/FX7Segment.rb +54 -0
- data/rdoc-sources/FXAccelTable.rb +84 -0
- data/rdoc-sources/FXApp.rb +545 -0
- data/rdoc-sources/FXArrowButton.rb +69 -0
- data/rdoc-sources/FXBMPIcon.rb +67 -0
- data/rdoc-sources/FXBMPImage.rb +30 -0
- data/rdoc-sources/FXBitmap.rb +115 -0
- data/rdoc-sources/FXBitmapFrame.rb +31 -0
- data/rdoc-sources/FXBitmapView.rb +44 -0
- data/rdoc-sources/FXButton.rb +59 -0
- data/rdoc-sources/FXCURCursor.rb +13 -0
- data/rdoc-sources/FXCanvas.rb +18 -0
- data/rdoc-sources/FXCheckButton.rb +58 -0
- data/rdoc-sources/FXChoiceBox.rb +49 -0
- data/rdoc-sources/FXColorBar.rb +48 -0
- data/rdoc-sources/FXColorDialog.rb +37 -0
- data/rdoc-sources/FXColorList.rb +55 -0
- data/rdoc-sources/FXColorRing.rb +49 -0
- data/rdoc-sources/FXColorSelector.rb +65 -0
- data/rdoc-sources/FXColorWell.rb +65 -0
- data/rdoc-sources/FXColorWheel.rb +57 -0
- data/rdoc-sources/FXComboBox.rb +214 -0
- data/rdoc-sources/FXComposite.rb +34 -0
- data/rdoc-sources/FXCursor.rb +67 -0
- data/rdoc-sources/FXDC.rb +720 -0
- data/rdoc-sources/FXDCPrint.rb +127 -0
- data/rdoc-sources/FXDCWindow.rb +33 -0
- data/rdoc-sources/FXDataTarget.rb +66 -0
- data/rdoc-sources/FXDebugTarget.rb +25 -0
- data/rdoc-sources/FXDelegator.rb +23 -0
- data/rdoc-sources/FXDial.rb +107 -0
- data/rdoc-sources/FXDialogBox.rb +32 -0
- data/rdoc-sources/FXDict.rb +79 -0
- data/rdoc-sources/FXDirBox.rb +55 -0
- data/rdoc-sources/FXDirDialog.rb +47 -0
- data/rdoc-sources/FXDirList.rb +149 -0
- data/rdoc-sources/FXDirSelector.rb +64 -0
- data/rdoc-sources/FXDockBar.rb +151 -0
- data/rdoc-sources/FXDockHandler.rb +26 -0
- data/rdoc-sources/FXDockSite.rb +104 -0
- data/rdoc-sources/FXDockTitle.rb +26 -0
- data/rdoc-sources/FXDocument.rb +29 -0
- data/rdoc-sources/FXDragCorner.rb +19 -0
- data/rdoc-sources/FXDrawable.rb +27 -0
- data/rdoc-sources/FXDriveBox.rb +46 -0
- data/rdoc-sources/FXExtentd.rb +85 -0
- data/rdoc-sources/FXExtentf.rb +85 -0
- data/rdoc-sources/FXFileDialog.rb +217 -0
- data/rdoc-sources/FXFileDict.rb +131 -0
- data/rdoc-sources/FXFileList.rb +208 -0
- data/rdoc-sources/FXFileSelector.rb +184 -0
- data/rdoc-sources/FXFileStream.rb +27 -0
- data/rdoc-sources/FXFoldingList.rb +504 -0
- data/rdoc-sources/FXFont.rb +361 -0
- data/rdoc-sources/FXFontDialog.rb +14 -0
- data/rdoc-sources/FXFontSelector.rb +37 -0
- data/rdoc-sources/FXFrame.rb +53 -0
- data/rdoc-sources/FXGIFCursor.rb +50 -0
- data/rdoc-sources/FXGIFIcon.rb +31 -0
- data/rdoc-sources/FXGIFImage.rb +29 -0
- data/rdoc-sources/FXGLCanvas.rb +45 -0
- data/rdoc-sources/FXGLContext.rb +40 -0
- data/rdoc-sources/FXGLObject.rb +75 -0
- data/rdoc-sources/FXGLShape.rb +69 -0
- data/rdoc-sources/FXGLViewer.rb +332 -0
- data/rdoc-sources/FXGLVisual.rb +94 -0
- data/rdoc-sources/FXGradientBar.rb +301 -0
- data/rdoc-sources/FXGroupBox.rb +36 -0
- data/rdoc-sources/FXHeader.rb +411 -0
- data/rdoc-sources/FXHorizontalFrame.rb +29 -0
- data/rdoc-sources/FXICOIcon.rb +65 -0
- data/rdoc-sources/FXICOImage.rb +31 -0
- data/rdoc-sources/FXIcon.rb +38 -0
- data/rdoc-sources/FXIconDict.rb +48 -0
- data/rdoc-sources/FXIconList.rb +450 -0
- data/rdoc-sources/FXIconSource.rb +100 -0
- data/rdoc-sources/FXId.rb +34 -0
- data/rdoc-sources/FXImage.rb +292 -0
- data/rdoc-sources/FXImageFrame.rb +36 -0
- data/rdoc-sources/FXImageView.rb +35 -0
- data/rdoc-sources/FXInputDialog.rb +80 -0
- data/rdoc-sources/FXJPGIcon.rb +70 -0
- data/rdoc-sources/FXJPGImage.rb +38 -0
- data/rdoc-sources/FXKnob.rb +76 -0
- data/rdoc-sources/FXLabel.rb +72 -0
- data/rdoc-sources/FXList.rb +443 -0
- data/rdoc-sources/FXListBox.rb +191 -0
- data/rdoc-sources/FXMDIButton.rb +67 -0
- data/rdoc-sources/FXMDIChild.rb +155 -0
- data/rdoc-sources/FXMDIClient.rb +65 -0
- data/rdoc-sources/FXMainWindow.rb +26 -0
- data/rdoc-sources/FXMatrix.rb +57 -0
- data/rdoc-sources/FXMemoryBuffer.rb +28 -0
- data/rdoc-sources/FXMemoryStream.rb +50 -0
- data/rdoc-sources/FXMenuBar.rb +23 -0
- data/rdoc-sources/FXMenuButton.rb +84 -0
- data/rdoc-sources/FXMenuCaption.rb +53 -0
- data/rdoc-sources/FXMenuCascade.rb +18 -0
- data/rdoc-sources/FXMenuCheck.rb +30 -0
- data/rdoc-sources/FXMenuCommand.rb +26 -0
- data/rdoc-sources/FXMenuPane.rb +13 -0
- data/rdoc-sources/FXMenuRadio.rb +33 -0
- data/rdoc-sources/FXMenuSeparator.rb +21 -0
- data/rdoc-sources/FXMenuTitle.rb +27 -0
- data/rdoc-sources/FXMessageBox.rb +73 -0
- data/rdoc-sources/FXObject.rb +28 -0
- data/rdoc-sources/FXOptionMenu.rb +83 -0
- data/rdoc-sources/FXPCXIcon.rb +63 -0
- data/rdoc-sources/FXPCXImage.rb +31 -0
- data/rdoc-sources/FXPNGIcon.rb +66 -0
- data/rdoc-sources/FXPNGImage.rb +34 -0
- data/rdoc-sources/FXPPMIcon.rb +36 -0
- data/rdoc-sources/FXPPMImage.rb +31 -0
- data/rdoc-sources/FXPacker.rb +63 -0
- data/rdoc-sources/FXPicker.rb +27 -0
- data/rdoc-sources/FXPopup.rb +53 -0
- data/rdoc-sources/FXPrintDialog.rb +36 -0
- data/rdoc-sources/FXProgressBar.rb +57 -0
- data/rdoc-sources/FXProgressDialog.rb +36 -0
- data/rdoc-sources/FXQuatd.rb +164 -0
- data/rdoc-sources/FXQuatf.rb +173 -0
- data/rdoc-sources/FXRGBIcon.rb +64 -0
- data/rdoc-sources/FXRGBImage.rb +31 -0
- data/rdoc-sources/FXRadioButton.rb +70 -0
- data/rdoc-sources/FXRanged.rb +100 -0
- data/rdoc-sources/FXRangef.rb +100 -0
- data/rdoc-sources/FXRealSlider.rb +101 -0
- data/rdoc-sources/FXRealSpinner.rb +140 -0
- data/rdoc-sources/FXRecentFiles.rb +77 -0
- data/rdoc-sources/FXRectangle.rb +149 -0
- data/rdoc-sources/FXRegion.rb +64 -0
- data/rdoc-sources/FXRegistry.rb +56 -0
- data/rdoc-sources/FXReplaceDialog.rb +56 -0
- data/rdoc-sources/FXRootWindow.rb +17 -0
- data/rdoc-sources/FXRuler.rb +130 -0
- data/rdoc-sources/FXRulerView.rb +225 -0
- data/rdoc-sources/FXScintilla.rb +121 -0
- data/rdoc-sources/FXScrollArea.rb +86 -0
- data/rdoc-sources/FXScrollBar.rb +107 -0
- data/rdoc-sources/FXScrollPane.rb +28 -0
- data/rdoc-sources/FXScrollWindow.rb +38 -0
- data/rdoc-sources/FXSearchDialog.rb +24 -0
- data/rdoc-sources/FXSeparator.rb +74 -0
- data/rdoc-sources/FXSettings.rb +248 -0
- data/rdoc-sources/FXShell.rb +8 -0
- data/rdoc-sources/FXShutter.rb +102 -0
- data/rdoc-sources/FXSize.rb +95 -0
- data/rdoc-sources/FXSlider.rb +98 -0
- data/rdoc-sources/FXSphered.rb +80 -0
- data/rdoc-sources/FXSpheref.rb +80 -0
- data/rdoc-sources/FXSpinner.rb +136 -0
- data/rdoc-sources/FXSplashWindow.rb +27 -0
- data/rdoc-sources/FXSplitter.rb +89 -0
- data/rdoc-sources/FXSpring.rb +61 -0
- data/rdoc-sources/FXStatusBar.rb +42 -0
- data/rdoc-sources/FXStatusLine.rb +60 -0
- data/rdoc-sources/FXStream.rb +142 -0
- data/rdoc-sources/FXStringDict.rb +38 -0
- data/rdoc-sources/FXSwitcher.rb +78 -0
- data/rdoc-sources/FXTGAIcon.rb +63 -0
- data/rdoc-sources/FXTGAImage.rb +31 -0
- data/rdoc-sources/FXTIFIcon.rb +70 -0
- data/rdoc-sources/FXTIFImage.rb +37 -0
- data/rdoc-sources/FXTabBar.rb +80 -0
- data/rdoc-sources/FXTabBook.rb +41 -0
- data/rdoc-sources/FXTabItem.rb +58 -0
- data/rdoc-sources/FXTable.rb +975 -0
- data/rdoc-sources/FXText.rb +581 -0
- data/rdoc-sources/FXTextField.rb +151 -0
- data/rdoc-sources/FXToggleButton.rb +70 -0
- data/rdoc-sources/FXToolBar.rb +61 -0
- data/rdoc-sources/FXToolBarGrip.rb +50 -0
- data/rdoc-sources/FXToolBarShell.rb +44 -0
- data/rdoc-sources/FXToolBarTab.rb +74 -0
- data/rdoc-sources/FXToolTip.rb +39 -0
- data/rdoc-sources/FXTopWindow.rb +163 -0
- data/rdoc-sources/FXTranslator.rb +32 -0
- data/rdoc-sources/FXTreeList.rb +514 -0
- data/rdoc-sources/FXTreeListBox.rb +219 -0
- data/rdoc-sources/FXTriStateButton.rb +49 -0
- data/rdoc-sources/FXVec2d.rb +96 -0
- data/rdoc-sources/FXVec2f.rb +96 -0
- data/rdoc-sources/FXVec3d.rb +118 -0
- data/rdoc-sources/FXVec3f.rb +118 -0
- data/rdoc-sources/FXVec4d.rb +139 -0
- data/rdoc-sources/FXVec4f.rb +139 -0
- data/rdoc-sources/FXVerticalFrame.rb +29 -0
- data/rdoc-sources/FXVisual.rb +79 -0
- data/rdoc-sources/FXWindow.rb +725 -0
- data/rdoc-sources/FXWizard.rb +59 -0
- data/rdoc-sources/FXXBMIcon.rb +37 -0
- data/rdoc-sources/FXXBMImage.rb +32 -0
- data/rdoc-sources/FXXPMIcon.rb +65 -0
- data/rdoc-sources/FXXPMImage.rb +31 -0
- data/rdoc-sources/Makefile +23 -0
- data/rdoc-sources/README.rdoc +53 -0
- data/rdoc-sources/fxdefs.rb +90 -0
- data/scripts/build-fox.rb +31 -0
- data/scripts/generate_kwargs_lib.rb +412 -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 +77 -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/test/README +19 -0
- data/test/TC_FXAccelTable.rb +57 -0
- data/test/TC_FXApp.rb +62 -0
- data/test/TC_FXArc.rb +26 -0
- data/test/TC_FXBMPIcon.rb +15 -0
- data/test/TC_FXBMPImage.rb +15 -0
- data/test/TC_FXButton.rb +78 -0
- data/test/TC_FXCheckButton.rb +57 -0
- data/test/TC_FXComboBox.rb +63 -0
- data/test/TC_FXDC.rb +372 -0
- data/test/TC_FXDCPrint.rb +102 -0
- data/test/TC_FXDCWindow.rb +25 -0
- data/test/TC_FXDataTarget.rb +24 -0
- data/test/TC_FXDialogBox.rb +12 -0
- data/test/TC_FXDirList.rb +30 -0
- data/test/TC_FXExtentd.rb +21 -0
- data/test/TC_FXExtentf.rb +21 -0
- data/test/TC_FXFileAssoc.rb +62 -0
- data/test/TC_FXFileStream.rb +89 -0
- data/test/TC_FXFoldingList.rb +32 -0
- data/test/TC_FXFont.rb +69 -0
- data/test/TC_FXFontDesc.rb +58 -0
- data/test/TC_FXGLGroup.rb +32 -0
- data/test/TC_FXGLShape.rb +28 -0
- data/test/TC_FXGLViewer.rb +20 -0
- data/test/TC_FXGradientBar.rb +89 -0
- data/test/TC_FXHeader.rb +82 -0
- data/test/TC_FXHiliteStyle.rb +23 -0
- data/test/TC_FXIconDict.rb +52 -0
- data/test/TC_FXIconList.rb +192 -0
- data/test/TC_FXId.rb +19 -0
- data/test/TC_FXImage.rb +155 -0
- data/test/TC_FXLight.rb +33 -0
- data/test/TC_FXList.rb +116 -0
- data/test/TC_FXListBox.rb +49 -0
- data/test/TC_FXMainWindow.rb +19 -0
- data/test/TC_FXMat4f.rb +228 -0
- data/test/TC_FXMaterial.rb +75 -0
- data/test/TC_FXMemoryStream.rb +97 -0
- data/test/TC_FXMenuCheck.rb +57 -0
- data/test/TC_FXMenuCommand.rb +12 -0
- data/test/TC_FXMenuRadio.rb +57 -0
- data/test/TC_FXMessageBox.rb +25 -0
- data/test/TC_FXPoint.rb +57 -0
- data/test/TC_FXQuatf.rb +93 -0
- data/test/TC_FXRadioButton.rb +57 -0
- data/test/TC_FXRanged.rb +42 -0
- data/test/TC_FXRangef.rb +42 -0
- data/test/TC_FXRectangle.rb +88 -0
- data/test/TC_FXRegion.rb +54 -0
- data/test/TC_FXRegistry.rb +27 -0
- data/test/TC_FXScrollArea.rb +28 -0
- data/test/TC_FXScrollWindow.rb +28 -0
- data/test/TC_FXSegment.rb +22 -0
- data/test/TC_FXSettings.rb +34 -0
- data/test/TC_FXShell.rb +26 -0
- data/test/TC_FXSize.rb +54 -0
- data/test/TC_FXStream.rb +11 -0
- data/test/TC_FXTable.rb +561 -0
- data/test/TC_FXTableItem.rb +48 -0
- data/test/TC_FXText.rb +96 -0
- data/test/TC_FXTopWindow.rb +32 -0
- data/test/TC_FXTreeList.rb +100 -0
- data/test/TC_FXTreeListBox.rb +41 -0
- data/test/TC_FXUndoList.rb +43 -0
- data/test/TC_FXVec2d.rb +142 -0
- data/test/TC_FXVec2f.rb +137 -0
- data/test/TC_FXVec3d.rb +150 -0
- data/test/TC_FXVec3f.rb +150 -0
- data/test/TC_FXVec4f.rb +158 -0
- data/test/TC_FXViewport.rb +30 -0
- data/test/TC_FXXBMIcon.rb +15 -0
- data/test/TC_FXXBMImage.rb +15 -0
- data/test/TC_FXXPMIcon.rb +15 -0
- data/test/TC_FXXPMImage.rb +15 -0
- data/test/TC_Misc.rb +157 -0
- data/test/TC_downcast.rb +15 -0
- data/test/TS_All.rb +25 -0
- data/test/blankpage.ps +166 -0
- data/test/howdypage.ps +181 -0
- data/test/stress1.rb +92 -0
- data/test/stress2.rb +51 -0
- data/test/stress3.rb +117 -0
- data/test/testcase.rb +37 -0
- metadata +1107 -0
@@ -0,0 +1,1763 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'fox16'
|
4
|
+
require 'fox16/responder'
|
5
|
+
require 'fox16/undolist'
|
6
|
+
require 'prefdialog'
|
7
|
+
require 'helpwindow'
|
8
|
+
require 'commands'
|
9
|
+
|
10
|
+
include Fox
|
11
|
+
|
12
|
+
class TextWindow < FXMainWindow
|
13
|
+
|
14
|
+
include Responder
|
15
|
+
|
16
|
+
MAXUNDOSIZE, KEEPUNDOSIZE = 1000000, 500000
|
17
|
+
|
18
|
+
# Define message identifiers recognized by this class
|
19
|
+
ID_ABOUT,
|
20
|
+
ID_FILEFILTER,
|
21
|
+
ID_OPEN,
|
22
|
+
ID_OPEN_SELECTED,
|
23
|
+
ID_REOPEN,
|
24
|
+
ID_SAVE,
|
25
|
+
ID_SAVEAS,
|
26
|
+
ID_NEW,
|
27
|
+
ID_TITLE,
|
28
|
+
ID_FONT,
|
29
|
+
ID_QUIT,
|
30
|
+
ID_PRINT,
|
31
|
+
ID_TREELIST,
|
32
|
+
ID_TEXT_BACK,
|
33
|
+
ID_TEXT_FORE,
|
34
|
+
ID_TEXT_SELBACK,
|
35
|
+
ID_TEXT_SELFORE,
|
36
|
+
ID_TEXT_CURSOR,
|
37
|
+
ID_DIR_BACK,
|
38
|
+
ID_DIR_FORE,
|
39
|
+
ID_DIR_SELBACK,
|
40
|
+
ID_DIR_SELFORE,
|
41
|
+
ID_DIR_LINES,
|
42
|
+
ID_RECENTFILE,
|
43
|
+
ID_TOGGLE_WRAP,
|
44
|
+
ID_FIXED_WRAP,
|
45
|
+
ID_SAVE_SETTINGS,
|
46
|
+
ID_TEXT,
|
47
|
+
ID_STRIP_CR,
|
48
|
+
ID_STRIP_SP,
|
49
|
+
ID_INCLUDE_PATH,
|
50
|
+
ID_SHOW_HELP,
|
51
|
+
ID_OVERSTRIKE,
|
52
|
+
ID_READONLY,
|
53
|
+
ID_FILETIME,
|
54
|
+
ID_PREFERENCES,
|
55
|
+
ID_TABCOLUMNS,
|
56
|
+
ID_WRAPCOLUMNS,
|
57
|
+
ID_DELIMITERS,
|
58
|
+
ID_INSERTTABS,
|
59
|
+
ID_AUTOINDENT,
|
60
|
+
ID_BRACEMATCH,
|
61
|
+
ID_NUMCHARS,
|
62
|
+
ID_INSERT_FILE,
|
63
|
+
ID_EXTRACT_FILE,
|
64
|
+
ID_WHEELADJUST,
|
65
|
+
ID_LAST = enum(FXMainWindow::ID_LAST, 47)
|
66
|
+
|
67
|
+
# Load the named icon from a file
|
68
|
+
def loadIcon(filename)
|
69
|
+
begin
|
70
|
+
filename = File.join("..", "icons", filename)
|
71
|
+
icon = nil
|
72
|
+
File.open(filename, "rb") { |f|
|
73
|
+
icon = FXPNGIcon.new(getApp(), f.read)
|
74
|
+
}
|
75
|
+
icon
|
76
|
+
rescue
|
77
|
+
raise RuntimeError, "Couldn't load icon: #{filename}"
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
def initialize(app)
|
82
|
+
# Call base class initialize first
|
83
|
+
super(app, "FOX Text Editor: - untitled", nil, nil, DECOR_ALL,
|
84
|
+
0, 0, 850, 600, 0, 0)
|
85
|
+
|
86
|
+
# Set up the message map for this class
|
87
|
+
FXMAPFUNC(SEL_TIMEOUT, ID_FILETIME, :onCheckFile)
|
88
|
+
FXMAPFUNC(SEL_COMMAND, ID_ABOUT, :onCmdAbout)
|
89
|
+
FXMAPFUNC(SEL_COMMAND, ID_REOPEN, :onCmdReopen)
|
90
|
+
FXMAPFUNC(SEL_UPDATE, ID_REOPEN, :onUpdReopen)
|
91
|
+
FXMAPFUNC(SEL_COMMAND, ID_OPEN, :onCmdOpen)
|
92
|
+
FXMAPFUNC(SEL_COMMAND, ID_OPEN_SELECTED, :onCmdOpenSelected)
|
93
|
+
FXMAPFUNC(SEL_COMMAND, ID_SAVE, :onCmdSave)
|
94
|
+
FXMAPFUNC(SEL_UPDATE, ID_SAVE, :onUpdSave)
|
95
|
+
FXMAPFUNC(SEL_COMMAND, ID_SAVEAS, :onCmdSaveAs)
|
96
|
+
FXMAPFUNC(SEL_COMMAND, ID_NEW, :onCmdNew)
|
97
|
+
FXMAPFUNC(SEL_UPDATE, ID_TITLE, :onUpdTitle)
|
98
|
+
FXMAPFUNC(SEL_COMMAND, ID_FONT, :onCmdFont)
|
99
|
+
FXMAPFUNC(SEL_COMMAND, ID_QUIT, :onCmdQuit)
|
100
|
+
FXMAPFUNC(SEL_SIGNAL, ID_QUIT, :onCmdQuit)
|
101
|
+
FXMAPFUNC(SEL_CLOSE, ID_TITLE, :onCmdQuit)
|
102
|
+
FXMAPFUNC(SEL_COMMAND, ID_PRINT, :onCmdPrint)
|
103
|
+
FXMAPFUNC(SEL_COMMAND, ID_TREELIST, :onCmdTreeList)
|
104
|
+
|
105
|
+
FXMAPFUNC(SEL_COMMAND, ID_TEXT_BACK, :onCmdTextBackColor)
|
106
|
+
FXMAPFUNC(SEL_CHANGED, ID_TEXT_BACK, :onCmdTextBackColor)
|
107
|
+
FXMAPFUNC(SEL_UPDATE, ID_TEXT_BACK, :onUpdTextBackColor)
|
108
|
+
FXMAPFUNC(SEL_COMMAND, ID_TEXT_SELBACK, :onCmdTextSelBackColor)
|
109
|
+
FXMAPFUNC(SEL_CHANGED, ID_TEXT_SELBACK, :onCmdTextSelBackColor)
|
110
|
+
FXMAPFUNC(SEL_UPDATE, ID_TEXT_SELBACK, :onUpdTextSelBackColor)
|
111
|
+
FXMAPFUNC(SEL_COMMAND, ID_TEXT_FORE, :onCmdTextForeColor)
|
112
|
+
FXMAPFUNC(SEL_CHANGED, ID_TEXT_FORE, :onCmdTextForeColor)
|
113
|
+
FXMAPFUNC(SEL_UPDATE, ID_TEXT_FORE, :onUpdTextForeColor)
|
114
|
+
FXMAPFUNC(SEL_COMMAND, ID_TEXT_SELFORE, :onCmdTextSelForeColor)
|
115
|
+
FXMAPFUNC(SEL_CHANGED, ID_TEXT_SELFORE, :onCmdTextSelForeColor)
|
116
|
+
FXMAPFUNC(SEL_UPDATE, ID_TEXT_SELFORE, :onUpdTextSelForeColor)
|
117
|
+
FXMAPFUNC(SEL_COMMAND, ID_TEXT_CURSOR, :onCmdTextCursorColor)
|
118
|
+
FXMAPFUNC(SEL_CHANGED, ID_TEXT_CURSOR, :onCmdTextCursorColor)
|
119
|
+
FXMAPFUNC(SEL_UPDATE, ID_TEXT_CURSOR, :onUpdTextCursorColor)
|
120
|
+
|
121
|
+
FXMAPFUNC(SEL_COMMAND, ID_DIR_BACK, :onCmdDirBackColor)
|
122
|
+
FXMAPFUNC(SEL_CHANGED, ID_DIR_BACK, :onCmdDirBackColor)
|
123
|
+
FXMAPFUNC(SEL_UPDATE, ID_DIR_BACK, :onUpdDirBackColor)
|
124
|
+
FXMAPFUNC(SEL_COMMAND, ID_DIR_FORE, :onCmdDirForeColor)
|
125
|
+
FXMAPFUNC(SEL_CHANGED, ID_DIR_FORE, :onCmdDirForeColor)
|
126
|
+
FXMAPFUNC(SEL_UPDATE, ID_DIR_FORE, :onUpdDirForeColor)
|
127
|
+
FXMAPFUNC(SEL_COMMAND, ID_DIR_SELBACK, :onCmdDirSelBackColor)
|
128
|
+
FXMAPFUNC(SEL_CHANGED, ID_DIR_SELBACK, :onCmdDirSelBackColor)
|
129
|
+
FXMAPFUNC(SEL_UPDATE, ID_DIR_SELBACK, :onUpdDirSelBackColor)
|
130
|
+
FXMAPFUNC(SEL_COMMAND, ID_DIR_SELFORE, :onCmdDirSelForeColor)
|
131
|
+
FXMAPFUNC(SEL_CHANGED, ID_DIR_SELFORE, :onCmdDirSelForeColor)
|
132
|
+
FXMAPFUNC(SEL_UPDATE, ID_DIR_SELFORE, :onUpdDirSelForeColor)
|
133
|
+
FXMAPFUNC(SEL_COMMAND, ID_DIR_LINES, :onCmdDirLineColor)
|
134
|
+
FXMAPFUNC(SEL_CHANGED, ID_DIR_LINES, :onCmdDirLineColor)
|
135
|
+
FXMAPFUNC(SEL_UPDATE, ID_DIR_LINES, :onUpdDirLineColor)
|
136
|
+
|
137
|
+
FXMAPFUNC(SEL_COMMAND, ID_RECENTFILE, :onCmdRecentFile)
|
138
|
+
FXMAPFUNC(SEL_UPDATE, ID_TOGGLE_WRAP, :onUpdWrap)
|
139
|
+
FXMAPFUNC(SEL_COMMAND, ID_TOGGLE_WRAP, :onCmdWrap)
|
140
|
+
FXMAPFUNC(SEL_COMMAND, ID_SAVE_SETTINGS, :onCmdSaveSettings)
|
141
|
+
FXMAPFUNC(SEL_INSERTED, ID_TEXT, :onTextInserted)
|
142
|
+
FXMAPFUNC(SEL_REPLACED, ID_TEXT, :onTextReplaced)
|
143
|
+
FXMAPFUNC(SEL_DELETED, ID_TEXT, :onTextDeleted)
|
144
|
+
FXMAPFUNC(SEL_RIGHTBUTTONRELEASE, ID_TEXT, :onTextRightMouse)
|
145
|
+
FXMAPFUNC(SEL_UPDATE, ID_FIXED_WRAP, :onUpdWrapFixed)
|
146
|
+
FXMAPFUNC(SEL_COMMAND, ID_FIXED_WRAP, :onCmdWrapFixed)
|
147
|
+
FXMAPFUNC(SEL_DND_MOTION, ID_TEXT, :onEditDNDMotion)
|
148
|
+
FXMAPFUNC(SEL_DND_DROP, ID_TEXT, :onEditDNDDrop)
|
149
|
+
FXMAPFUNC(SEL_UPDATE, ID_STRIP_CR, :onUpdStripReturns)
|
150
|
+
FXMAPFUNC(SEL_COMMAND, ID_STRIP_CR, :onCmdStripReturns)
|
151
|
+
FXMAPFUNC(SEL_UPDATE, ID_STRIP_SP, :onUpdStripSpaces)
|
152
|
+
FXMAPFUNC(SEL_COMMAND, ID_STRIP_SP, :onCmdStripSpaces)
|
153
|
+
FXMAPFUNC(SEL_COMMAND, ID_INCLUDE_PATH, :onCmdIncludePaths)
|
154
|
+
FXMAPFUNC(SEL_COMMAND, ID_SHOW_HELP, :onCmdShowHelp)
|
155
|
+
FXMAPFUNC(SEL_COMMAND, ID_FILEFILTER, :onCmdFilter)
|
156
|
+
FXMAPFUNC(SEL_UPDATE, ID_OVERSTRIKE, :onUpdOverstrike)
|
157
|
+
FXMAPFUNC(SEL_UPDATE, ID_READONLY, :onUpdReadOnly)
|
158
|
+
FXMAPFUNC(SEL_UPDATE, ID_NUMCHARS, :onUpdNumChars)
|
159
|
+
FXMAPFUNC(SEL_COMMAND, ID_PREFERENCES, :onCmdPreferences)
|
160
|
+
FXMAPFUNC(SEL_COMMAND, ID_TABCOLUMNS, :onCmdTabColumns)
|
161
|
+
FXMAPFUNC(SEL_UPDATE, ID_TABCOLUMNS, :onUpdTabColumns)
|
162
|
+
FXMAPFUNC(SEL_COMMAND, ID_DELIMITERS, :onCmdDelimiters)
|
163
|
+
FXMAPFUNC(SEL_UPDATE, ID_DELIMITERS, :onUpdDelimiters)
|
164
|
+
FXMAPFUNC(SEL_COMMAND, ID_WRAPCOLUMNS, :onCmdWrapColumns)
|
165
|
+
FXMAPFUNC(SEL_UPDATE, ID_WRAPCOLUMNS, :onUpdWrapColumns)
|
166
|
+
FXMAPFUNC(SEL_COMMAND, ID_AUTOINDENT, :onCmdAutoIndent)
|
167
|
+
FXMAPFUNC(SEL_UPDATE, ID_AUTOINDENT, :onUpdAutoIndent)
|
168
|
+
FXMAPFUNC(SEL_COMMAND, ID_INSERTTABS, :onCmdInsertTabs)
|
169
|
+
FXMAPFUNC(SEL_UPDATE, ID_INSERTTABS, :onUpdInsertTabs)
|
170
|
+
FXMAPFUNC(SEL_COMMAND, ID_BRACEMATCH, :onCmdBraceMatch)
|
171
|
+
FXMAPFUNC(SEL_UPDATE, ID_BRACEMATCH, :onUpdBraceMatch)
|
172
|
+
FXMAPFUNC(SEL_UPDATE, ID_INSERT_FILE, :onUpdInsertFile)
|
173
|
+
FXMAPFUNC(SEL_COMMAND, ID_INSERT_FILE, :onCmdInsertFile)
|
174
|
+
FXMAPFUNC(SEL_UPDATE, ID_EXTRACT_FILE, :onUpdExtractFile)
|
175
|
+
FXMAPFUNC(SEL_COMMAND, ID_EXTRACT_FILE, :onCmdExtractFile)
|
176
|
+
FXMAPFUNC(SEL_UPDATE, ID_WHEELADJUST, :onUpdWheelAdjust)
|
177
|
+
FXMAPFUNC(SEL_COMMAND, ID_WHEELADJUST, :onCmdWheelAdjust)
|
178
|
+
|
179
|
+
# Undoable commands
|
180
|
+
@undolist = FXUndoList.new
|
181
|
+
|
182
|
+
# Default font
|
183
|
+
@font = nil
|
184
|
+
|
185
|
+
# Make some icons
|
186
|
+
@bigicon = loadIcon("big.png")
|
187
|
+
@smallicon = loadIcon("small.png")
|
188
|
+
@newicon = loadIcon("filenew.png")
|
189
|
+
@openicon = loadIcon("fileopen.png")
|
190
|
+
@saveicon = loadIcon("filesave.png")
|
191
|
+
@saveasicon = FXPNGIcon.new(getApp(), File.open(File.join("..", "icons", "saveas.png"), "rb").read(),
|
192
|
+
0, IMAGE_ALPHAGUESS)
|
193
|
+
@printicon = loadIcon("printicon.png")
|
194
|
+
@cuticon = loadIcon("cut.png")
|
195
|
+
@copyicon = loadIcon("copy.png")
|
196
|
+
@pasteicon = loadIcon("paste.png")
|
197
|
+
@deleteicon = loadIcon("kill.png")
|
198
|
+
@undoicon = loadIcon("undo.png")
|
199
|
+
@redoicon = loadIcon("redo.png")
|
200
|
+
@fontsicon = loadIcon("fonts.png")
|
201
|
+
@helpicon = loadIcon("help.png")
|
202
|
+
|
203
|
+
# Application icons
|
204
|
+
setIcon(@bigicon)
|
205
|
+
setMiniIcon(@smallicon)
|
206
|
+
|
207
|
+
# Make main window; set myself as the target
|
208
|
+
setTarget(self)
|
209
|
+
setSelector(ID_TITLE)
|
210
|
+
|
211
|
+
# Help window
|
212
|
+
@helpwindow = HelpWindow.new(self)
|
213
|
+
|
214
|
+
# Make menu bar
|
215
|
+
dragshell1 = FXToolBarShell.new(self, FRAME_RAISED|FRAME_THICK)
|
216
|
+
menubar = FXMenuBar.new(self, dragshell1, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
|
217
|
+
FXToolBarGrip.new(menubar, menubar, FXMenuBar::ID_TOOLBARGRIP,
|
218
|
+
TOOLBARGRIP_DOUBLE)
|
219
|
+
|
220
|
+
# Tool bar
|
221
|
+
dragshell2 = FXToolBarShell.new(self, FRAME_RAISED|FRAME_THICK)
|
222
|
+
toolbar = FXToolBar.new(self, dragshell2,
|
223
|
+
LAYOUT_SIDE_TOP|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH|PACK_UNIFORM_HEIGHT)
|
224
|
+
FXToolBarGrip.new(toolbar, toolbar, FXToolBar::ID_TOOLBARGRIP,
|
225
|
+
TOOLBARGRIP_DOUBLE)
|
226
|
+
|
227
|
+
# Status bar
|
228
|
+
statusbar = FXStatusBar.new(self,
|
229
|
+
LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|STATUSBAR_WITH_DRAGCORNER)
|
230
|
+
|
231
|
+
# Info about the editor
|
232
|
+
FXButton.new(statusbar, "\tThe FOX Text Editor\tAbout the FOX Text Editor.",
|
233
|
+
@smallicon, self, ID_ABOUT, LAYOUT_FILL_Y|LAYOUT_RIGHT)
|
234
|
+
|
235
|
+
# File menu
|
236
|
+
filemenu = FXMenuPane.new(self)
|
237
|
+
FXMenuTitle.new(menubar, "&File", nil, filemenu)
|
238
|
+
|
239
|
+
# Edit Menu
|
240
|
+
editmenu = FXMenuPane.new(self)
|
241
|
+
FXMenuTitle.new(menubar, "&Edit", nil, editmenu)
|
242
|
+
|
243
|
+
# Goto Menu
|
244
|
+
gotomenu = FXMenuPane.new(self)
|
245
|
+
FXMenuTitle.new(menubar, "&Goto", nil, gotomenu)
|
246
|
+
|
247
|
+
# Search Menu
|
248
|
+
searchmenu = FXMenuPane.new(self)
|
249
|
+
FXMenuTitle.new(menubar, "&Search", nil, searchmenu)
|
250
|
+
|
251
|
+
# Options Menu
|
252
|
+
optionmenu = FXMenuPane.new(self)
|
253
|
+
FXMenuTitle.new(menubar, "&Options", nil, optionmenu)
|
254
|
+
|
255
|
+
# View menu
|
256
|
+
viewmenu = FXMenuPane.new(self)
|
257
|
+
FXMenuTitle.new(menubar, "&View", nil, viewmenu)
|
258
|
+
|
259
|
+
# Help menu
|
260
|
+
helpmenu = FXMenuPane.new(self)
|
261
|
+
FXMenuTitle.new(menubar, "&Help", nil, helpmenu, LAYOUT_RIGHT)
|
262
|
+
|
263
|
+
# Splitter
|
264
|
+
splitter = FXSplitter.new(self,
|
265
|
+
LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y|SPLITTER_TRACKING)
|
266
|
+
|
267
|
+
# Sunken border for tree
|
268
|
+
@treebox = FXVerticalFrame.new(splitter, LAYOUT_FILL_X|LAYOUT_FILL_Y,
|
269
|
+
0, 0, 0, 0, 0, 0, 0, 0)
|
270
|
+
|
271
|
+
# Make tree
|
272
|
+
treeframe = FXHorizontalFrame.new(@treebox,
|
273
|
+
FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y,
|
274
|
+
0, 0, 0, 0, 0, 0, 0, 0)
|
275
|
+
@dirlist = FXDirList.new(treeframe, self, ID_TREELIST,
|
276
|
+
(DIRLIST_SHOWFILES|TREELIST_BROWSESELECT|TREELIST_SHOWS_LINES|
|
277
|
+
TREELIST_SHOWS_BOXES|LAYOUT_FILL_X|LAYOUT_FILL_Y))
|
278
|
+
filterframe = FXHorizontalFrame.new(@treebox, LAYOUT_FILL_X)
|
279
|
+
FXLabel.new(filterframe, "Filter:")
|
280
|
+
@filter = FXComboBox.new(filterframe, 25, self, ID_FILEFILTER,
|
281
|
+
COMBOBOX_STATIC|LAYOUT_FILL_X|FRAME_SUNKEN|FRAME_THICK)
|
282
|
+
@filter.numVisible = 4
|
283
|
+
|
284
|
+
# Sunken border for text widget
|
285
|
+
textbox = FXHorizontalFrame.new(splitter,
|
286
|
+
FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y, 0,0,0,0, 0,0,0,0)
|
287
|
+
|
288
|
+
# Make editor window
|
289
|
+
@editor = FXText.new(textbox, self, ID_TEXT, LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
290
|
+
@editor.hiliteMatchTime = 300000
|
291
|
+
|
292
|
+
# Show readonly state in status bar
|
293
|
+
readonly = FXLabel.new(statusbar, nil, nil, FRAME_SUNKEN|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
|
294
|
+
readonly.padLeft = 2
|
295
|
+
readonly.padRight = 2
|
296
|
+
readonly.padTop = 1
|
297
|
+
readonly.padBottom = 1
|
298
|
+
readonly.setTarget(self)
|
299
|
+
readonly.setSelector(ID_READONLY)
|
300
|
+
|
301
|
+
# Show insert mode in status bar
|
302
|
+
overstrike = FXLabel.new(statusbar, nil, nil, FRAME_SUNKEN|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
|
303
|
+
overstrike.padLeft = 2
|
304
|
+
overstrike.padRight = 2
|
305
|
+
overstrike.padTop = 1
|
306
|
+
overstrike.padBottom = 1
|
307
|
+
overstrike.setTarget(self)
|
308
|
+
overstrike.setSelector(ID_OVERSTRIKE)
|
309
|
+
|
310
|
+
# Show size of text in status bar
|
311
|
+
numchars = FXTextField.new(statusbar, 6, self, ID_NUMCHARS,
|
312
|
+
FRAME_SUNKEN|JUSTIFY_RIGHT|LAYOUT_RIGHT|LAYOUT_CENTER_Y,
|
313
|
+
0, 0, 0, 0, 2, 2, 1, 1)
|
314
|
+
numchars.backColor = statusbar.backColor
|
315
|
+
|
316
|
+
# Caption before number
|
317
|
+
FXLabel.new(statusbar, " Size:", nil, LAYOUT_RIGHT|LAYOUT_CENTER_Y)
|
318
|
+
|
319
|
+
# Show column number in status bar
|
320
|
+
columnno = FXTextField.new(statusbar, 4, @editor, FXText::ID_CURSOR_COLUMN,
|
321
|
+
FRAME_SUNKEN|JUSTIFY_RIGHT|LAYOUT_RIGHT|LAYOUT_CENTER_Y,
|
322
|
+
0, 0, 0, 0, 2, 2, 1, 1)
|
323
|
+
columnno.backColor = statusbar.backColor
|
324
|
+
|
325
|
+
# Caption before number
|
326
|
+
FXLabel.new(statusbar, " Col:", nil, LAYOUT_RIGHT|LAYOUT_CENTER_Y)
|
327
|
+
|
328
|
+
# Show line number in status bar
|
329
|
+
rowno = FXTextField.new(statusbar, 4, @editor, FXText::ID_CURSOR_ROW,
|
330
|
+
FRAME_SUNKEN|JUSTIFY_RIGHT|LAYOUT_RIGHT|LAYOUT_CENTER_Y,
|
331
|
+
0, 0, 0, 0, 2, 2, 1, 1)
|
332
|
+
rowno.backColor = statusbar.backColor
|
333
|
+
|
334
|
+
# Caption before number
|
335
|
+
FXLabel.new(statusbar, " Line:", nil, LAYOUT_RIGHT|LAYOUT_CENTER_Y)
|
336
|
+
|
337
|
+
# Toobar buttons: File manipulation
|
338
|
+
FXButton.new(toolbar, "New\tNew\tCreate new document.", @newicon,
|
339
|
+
self, ID_NEW, (ICON_ABOVE_TEXT|BUTTON_TOOLBAR|FRAME_RAISED|
|
340
|
+
LAYOUT_TOP|LAYOUT_LEFT))
|
341
|
+
FXButton.new(toolbar, "Open\tOpen\tOpen document file.", @openicon,
|
342
|
+
self, ID_OPEN, (ICON_ABOVE_TEXT|BUTTON_TOOLBAR|FRAME_RAISED|
|
343
|
+
LAYOUT_TOP|LAYOUT_LEFT))
|
344
|
+
FXButton.new(toolbar, "Save\tSave\tSave document.", @saveicon,
|
345
|
+
self, ID_SAVE, (ICON_ABOVE_TEXT|BUTTON_TOOLBAR|FRAME_RAISED|
|
346
|
+
LAYOUT_TOP|LAYOUT_LEFT))
|
347
|
+
FXButton.new(toolbar, "Save as\tSave As\tSave document to another file.",
|
348
|
+
@saveasicon, self, ID_SAVEAS, (ICON_ABOVE_TEXT|BUTTON_TOOLBAR|
|
349
|
+
FRAME_RAISED|LAYOUT_TOP|LAYOUT_LEFT))
|
350
|
+
|
351
|
+
# Toobar buttons: Print
|
352
|
+
FXFrame.new(toolbar,
|
353
|
+
LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, 0, 0, 5, 5)
|
354
|
+
FXButton.new(toolbar, "Print\tPrint\tPrint document.", @printicon,
|
355
|
+
self, ID_PRINT, (ICON_ABOVE_TEXT|BUTTON_TOOLBAR|FRAME_RAISED|
|
356
|
+
LAYOUT_TOP|LAYOUT_LEFT))
|
357
|
+
|
358
|
+
# Toobar buttons: Editing
|
359
|
+
FXFrame.new(toolbar,
|
360
|
+
LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, 0, 0, 5, 5)
|
361
|
+
FXButton.new(toolbar, "Cut\tCut\tCut selection to clipboard.", @cuticon,
|
362
|
+
@editor, FXText::ID_CUT_SEL, (ICON_ABOVE_TEXT|BUTTON_TOOLBAR|
|
363
|
+
FRAME_RAISED|LAYOUT_TOP|LAYOUT_LEFT))
|
364
|
+
FXButton.new(toolbar, "Copy\tCopy\tCopy selection to clipboard.", @copyicon,
|
365
|
+
@editor, FXText::ID_COPY_SEL, (ICON_ABOVE_TEXT|BUTTON_TOOLBAR|
|
366
|
+
FRAME_RAISED|LAYOUT_TOP|LAYOUT_LEFT))
|
367
|
+
FXButton.new(toolbar, "Paste\tPaste\tPaste clipboard.", @pasteicon,
|
368
|
+
@editor, FXText::ID_PASTE_SEL, (ICON_ABOVE_TEXT|BUTTON_TOOLBAR|
|
369
|
+
FRAME_RAISED|LAYOUT_TOP|LAYOUT_LEFT))
|
370
|
+
FXButton.new(toolbar, "Undo\tUndo\tUndo last change.", @undoicon,
|
371
|
+
@undolist, FXUndoList::ID_UNDO, (ICON_ABOVE_TEXT|BUTTON_TOOLBAR|
|
372
|
+
FRAME_RAISED|LAYOUT_TOP|LAYOUT_LEFT))
|
373
|
+
FXButton.new(toolbar, "Redo\tRedo\tRedo last undo.", @redoicon,
|
374
|
+
@undolist, FXUndoList::ID_REDO, (ICON_ABOVE_TEXT|BUTTON_TOOLBAR|
|
375
|
+
FRAME_RAISED|LAYOUT_TOP|LAYOUT_LEFT))
|
376
|
+
|
377
|
+
# Color
|
378
|
+
FXFrame.new(toolbar,
|
379
|
+
LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, 0, 0, 5, 5)
|
380
|
+
FXButton.new(toolbar, "Fonts\tFonts\tDisplay font dialog.", @fontsicon,
|
381
|
+
self, ID_FONT, (ICON_ABOVE_TEXT|BUTTON_TOOLBAR|FRAME_RAISED|
|
382
|
+
LAYOUT_TOP|LAYOUT_LEFT))
|
383
|
+
|
384
|
+
FXButton.new(toolbar, "Help\tHelp on editor\tDisplay help information.",
|
385
|
+
@helpicon, self, ID_SHOW_HELP, (ICON_ABOVE_TEXT|BUTTON_TOOLBAR|
|
386
|
+
FRAME_RAISED|LAYOUT_TOP|LAYOUT_RIGHT))
|
387
|
+
|
388
|
+
# File Menu entries
|
389
|
+
FXMenuCommand.new(filemenu, "&Open... \tCtl-O\tOpen document file.",
|
390
|
+
@openicon, self, ID_OPEN)
|
391
|
+
FXMenuCommand.new(filemenu,
|
392
|
+
"Open Selected... \tCtl-E\tOpen highlighted document file.", nil,
|
393
|
+
self, ID_OPEN_SELECTED)
|
394
|
+
FXMenuCommand.new(filemenu, "&Reopen...\t\tReopen file.", nil,
|
395
|
+
self, ID_REOPEN)
|
396
|
+
FXMenuCommand.new(filemenu, "&New...\tCtl-N\tCreate new document.",
|
397
|
+
@newicon, self, ID_NEW)
|
398
|
+
FXMenuCommand.new(filemenu, "&Save\tCtl-S\tSave changes to file.",
|
399
|
+
@saveicon, self, ID_SAVE)
|
400
|
+
FXMenuCommand.new(filemenu, "Save &As...\t\tSave document to another file.",
|
401
|
+
@saveasicon, self, ID_SAVEAS)
|
402
|
+
FXMenuSeparator.new(filemenu)
|
403
|
+
FXMenuCommand.new(filemenu, "Insert from file...\t\tInsert text from file.",
|
404
|
+
nil, self, ID_INSERT_FILE)
|
405
|
+
FXMenuCommand.new(filemenu, "Extract to file...\t\tExtract text to file.",
|
406
|
+
nil, self, ID_EXTRACT_FILE)
|
407
|
+
FXMenuCommand.new(filemenu, "&Print...\tCtl-P\tPrint document.", @printicon,
|
408
|
+
self, ID_PRINT)
|
409
|
+
FXMenuCommand.new(filemenu, "&Editable\t\tDocument editable.", nil,
|
410
|
+
@editor, FXText::ID_TOGGLE_EDITABLE)
|
411
|
+
iconifyCmd = FXMenuCommand.new(filemenu, "&Iconify...\t\tIconify editor.")
|
412
|
+
iconifyCmd.connect(SEL_COMMAND) { self.minimize }
|
413
|
+
|
414
|
+
# Recent file menu; this automatically hides if there are no files
|
415
|
+
sep1 = FXMenuSeparator.new(filemenu)
|
416
|
+
sep1.setTarget(@mrufiles)
|
417
|
+
sep1.setSelector(FXRecentFiles::ID_ANYFILES)
|
418
|
+
FXMenuCommand.new(filemenu, nil, nil, @mrufiles, FXRecentFiles::ID_FILE_1)
|
419
|
+
FXMenuCommand.new(filemenu, nil, nil, @mrufiles, FXRecentFiles::ID_FILE_2)
|
420
|
+
FXMenuCommand.new(filemenu, nil, nil, @mrufiles, FXRecentFiles::ID_FILE_3)
|
421
|
+
FXMenuCommand.new(filemenu, nil, nil, @mrufiles, FXRecentFiles::ID_FILE_4)
|
422
|
+
FXMenuCommand.new(filemenu, nil, nil, @mrufiles, FXRecentFiles::ID_FILE_5)
|
423
|
+
FXMenuCommand.new(filemenu, nil, nil, @mrufiles, FXRecentFiles::ID_FILE_6)
|
424
|
+
FXMenuCommand.new(filemenu, nil, nil, @mrufiles, FXRecentFiles::ID_FILE_7)
|
425
|
+
FXMenuCommand.new(filemenu, nil, nil, @mrufiles, FXRecentFiles::ID_FILE_8)
|
426
|
+
FXMenuCommand.new(filemenu, nil, nil, @mrufiles, FXRecentFiles::ID_FILE_9)
|
427
|
+
FXMenuCommand.new(filemenu, nil, nil, @mrufiles, FXRecentFiles::ID_FILE_10)
|
428
|
+
FXMenuCommand.new(filemenu, "&Clear Recent Files", nil,
|
429
|
+
@mrufiles, FXRecentFiles::ID_CLEAR)
|
430
|
+
sep2 = FXMenuSeparator.new(filemenu)
|
431
|
+
sep2.setTarget(@mrufiles)
|
432
|
+
sep2.setSelector(FXRecentFiles::ID_ANYFILES)
|
433
|
+
FXMenuCommand.new(filemenu, "&Quit\tCtl-Q", nil, self, ID_QUIT)
|
434
|
+
|
435
|
+
# Edit Menu entries
|
436
|
+
FXMenuCommand.new(editmenu, "&Undo\tCtl-Z\tUndo last change.", @undoicon,
|
437
|
+
@undolist, FXUndoList::ID_UNDO)
|
438
|
+
FXMenuCommand.new(editmenu, "&Redo\tCtl-Y\tRedo last undo.", @redoicon,
|
439
|
+
@undolist, FXUndoList::ID_REDO)
|
440
|
+
FXMenuCommand.new(editmenu, "&Undo all\t\tUndo all.", nil,
|
441
|
+
@undolist, FXUndoList::ID_UNDO_ALL)
|
442
|
+
FXMenuCommand.new(editmenu, "&Redo all\t\tRedo all.", nil,
|
443
|
+
@undolist, FXUndoList::ID_REDO_ALL)
|
444
|
+
FXMenuCommand.new(editmenu, "&Revert to saved\t\tRevert to saved.", nil,
|
445
|
+
@undolist, FXUndoList::ID_REVERT)
|
446
|
+
FXMenuSeparator.new(editmenu)
|
447
|
+
FXMenuCommand.new(editmenu, "&Copy\tCtl-C\tCopy selection to clipboard.",
|
448
|
+
@copyicon, @editor, FXText::ID_COPY_SEL)
|
449
|
+
FXMenuCommand.new(editmenu, "Cu&t\tCtl-X\tCut selection to clipboard.",
|
450
|
+
@cuticon, @editor, FXText::ID_CUT_SEL)
|
451
|
+
FXMenuCommand.new(editmenu, "&Paste\tCtl-V\tPaste from clipboard.",
|
452
|
+
@pasteicon, @editor, FXText::ID_PASTE_SEL)
|
453
|
+
FXMenuCommand.new(editmenu, "&Delete\t\tDelete selection.", @deleteicon,
|
454
|
+
@editor, FXText::ID_DELETE_SEL)
|
455
|
+
FXMenuSeparator.new(editmenu)
|
456
|
+
FXMenuCommand.new(editmenu, "Lo&wer-case\tCtl-6\tChange to lower case.",
|
457
|
+
nil, @editor, FXText::ID_LOWER_CASE)
|
458
|
+
FXMenuCommand.new(editmenu,
|
459
|
+
"Upp&er-case\tShift-Ctl-^\tChange to upper case.", nil,
|
460
|
+
@editor, FXText::ID_UPPER_CASE)
|
461
|
+
FXMenuCommand.new(editmenu,
|
462
|
+
"Clean indent\t\tClean indentation to either all tabs or all spaces.",
|
463
|
+
nil, @editor, FXText::ID_CLEAN_INDENT)
|
464
|
+
FXMenuCommand.new(editmenu, "Shift left\tCtl-9\tShift text left.", nil,
|
465
|
+
@editor, FXText::ID_SHIFT_LEFT)
|
466
|
+
FXMenuCommand.new(editmenu, "Shift right\tCtl-0\tShift text right.", nil,
|
467
|
+
@editor, FXText::ID_SHIFT_RIGHT)
|
468
|
+
FXMenuCommand.new(editmenu,
|
469
|
+
"Shift tab left\t\tShift text left one tab position.", nil,
|
470
|
+
@editor, FXText::ID_SHIFT_TABLEFT)
|
471
|
+
FXMenuCommand.new(editmenu,
|
472
|
+
"Shift tab right\t\tShift text right one tab position.", nil,
|
473
|
+
@editor, FXText::ID_SHIFT_TABRIGHT)
|
474
|
+
|
475
|
+
# Goto Menu entries
|
476
|
+
FXMenuCommand.new(gotomenu,
|
477
|
+
"&Goto...\tCtl-G\tGoto line number.", nil,
|
478
|
+
@editor, FXText::ID_GOTO_LINE)
|
479
|
+
FXMenuCommand.new(gotomenu,
|
480
|
+
"Goto selected...\tCtl-L\tGoto selected line number.", nil,
|
481
|
+
@editor, FXText::ID_GOTO_SELECTED)
|
482
|
+
FXMenuSeparator.new(gotomenu)
|
483
|
+
FXMenuCommand.new(gotomenu,
|
484
|
+
"Goto {..\tShift-Ctl-{\tGoto start of enclosing block.", nil,
|
485
|
+
@editor, FXText::ID_LEFT_BRACE)
|
486
|
+
FXMenuCommand.new(gotomenu,
|
487
|
+
"Goto ..}\tShift-Ctl-}\tGoto end of enclosing block.", nil,
|
488
|
+
@editor, FXText::ID_RIGHT_BRACE)
|
489
|
+
FXMenuCommand.new(gotomenu,
|
490
|
+
"Goto (..\tShift-Ctl-(\tGoto start of enclosing expression.", nil,
|
491
|
+
@editor, FXText::ID_LEFT_PAREN)
|
492
|
+
FXMenuCommand.new(gotomenu,
|
493
|
+
"Goto ..)\tShift-Ctl-)\tGoto end of enclosing expression.", nil,
|
494
|
+
@editor, FXText::ID_RIGHT_PAREN)
|
495
|
+
FXMenuSeparator.new(gotomenu)
|
496
|
+
FXMenuCommand.new(searchmenu,
|
497
|
+
"Goto matching (..)\tCtl-M\tGoto matching brace or parenthesis.", nil,
|
498
|
+
@editor, FXText::ID_GOTO_MATCHING)
|
499
|
+
|
500
|
+
# Search Menu entries
|
501
|
+
FXMenuCommand.new(searchmenu,
|
502
|
+
"Select matching (..)\tShift-Ctl-M\tSelect matching brace or parenthesis.", nil,
|
503
|
+
@editor, FXText::ID_SELECT_MATCHING)
|
504
|
+
FXMenuCommand.new(searchmenu,
|
505
|
+
"Select block {..}\tShift-Alt-{\tSelect enclosing block.", nil,
|
506
|
+
@editor, FXText::ID_SELECT_BRACE)
|
507
|
+
FXMenuCommand.new(searchmenu,
|
508
|
+
"Select block {..}\tShift-Alt-}\tSelect enclosing block.", nil,
|
509
|
+
@editor, FXText::ID_SELECT_BRACE)
|
510
|
+
FXMenuCommand.new(searchmenu,
|
511
|
+
"Select expression (..)\tShift-Alt-(\tSelect enclosing parentheses.", nil,
|
512
|
+
@editor, FXText::ID_SELECT_PAREN)
|
513
|
+
FXMenuCommand.new(searchmenu,
|
514
|
+
"Select expression (..)\tShift-Alt-)\tSelect enclosing parentheses.", nil,
|
515
|
+
@editor, FXText::ID_SELECT_PAREN)
|
516
|
+
FXMenuSeparator.new(searchmenu)
|
517
|
+
FXMenuCommand.new(searchmenu,
|
518
|
+
"&Search sel. fwd\tCtl-H\tSearch for selection.", nil,
|
519
|
+
@editor, FXText::ID_SEARCH_FORW_SEL)
|
520
|
+
FXMenuCommand.new(searchmenu,
|
521
|
+
"&Search sel. bck\tShift-Ctl-H\tSearch for selection.", nil,
|
522
|
+
@editor, FXText::ID_SEARCH_BACK_SEL)
|
523
|
+
FXMenuCommand.new(searchmenu,
|
524
|
+
"&Search...\tCtl-F\tSearch for a string.", nil,
|
525
|
+
@editor, FXText::ID_SEARCH)
|
526
|
+
FXMenuCommand.new(searchmenu,
|
527
|
+
"R&eplace...\tCtl-R\tSearch for a string.", nil,
|
528
|
+
@editor, FXText::ID_REPLACE)
|
529
|
+
|
530
|
+
# Options menu
|
531
|
+
FXMenuCommand.new(optionmenu,
|
532
|
+
"Preferences...\t\tChange preferences.", nil,
|
533
|
+
self, TextWindow::ID_PREFERENCES)
|
534
|
+
FXMenuCommand.new(optionmenu,
|
535
|
+
"Font...\t\tChange text font.", @fontsicon, self, ID_FONT)
|
536
|
+
FXMenuCommand.new(optionmenu,
|
537
|
+
"Overstrike\t\tToggle overstrike mode.", nil,
|
538
|
+
@editor, FXText::ID_TOGGLE_OVERSTRIKE)
|
539
|
+
FXMenuCommand.new(optionmenu,
|
540
|
+
"Include path...\t\tDirectories to search for include files.", nil,
|
541
|
+
self, TextWindow::ID_INCLUDE_PATH)
|
542
|
+
FXMenuCommand.new(optionmenu,
|
543
|
+
"Save Settings...\t\tSave settings now.", nil,
|
544
|
+
self, TextWindow::ID_SAVE_SETTINGS)
|
545
|
+
|
546
|
+
# View Menu entries
|
547
|
+
FXMenuCommand.new(viewmenu,
|
548
|
+
"Hidden files\t\tShow hidden files and directories.", nil,
|
549
|
+
@dirlist, FXDirList::ID_TOGGLE_HIDDEN)
|
550
|
+
FXMenuCommand.new(viewmenu,
|
551
|
+
"File Browser\t\tDisplay file list.", nil,
|
552
|
+
@treebox,FXWindow::ID_TOGGLESHOWN)
|
553
|
+
FXMenuCommand.new(viewmenu, "Toolbar\t\tDisplay toolbar.", nil,
|
554
|
+
toolbar, FXWindow::ID_TOGGLESHOWN)
|
555
|
+
FXMenuCommand.new(viewmenu, "Status line\t\tDisplay status line.", nil,
|
556
|
+
statusbar, FXWindow::ID_TOGGLESHOWN)
|
557
|
+
|
558
|
+
# Help Menu entries
|
559
|
+
FXMenuCommand.new(helpmenu, "&Help...\t\tDisplay help information.",
|
560
|
+
@helpicon, self, ID_SHOW_HELP, 0)
|
561
|
+
FXMenuSeparator.new(helpmenu)
|
562
|
+
FXMenuCommand.new(helpmenu, "&About TextEdit...\t\tDisplay about panel.",
|
563
|
+
@smallicon, self, ID_ABOUT, 0)
|
564
|
+
|
565
|
+
# Make a tool tip
|
566
|
+
FXToolTip.new(getApp(), 0)
|
567
|
+
|
568
|
+
# Recent files
|
569
|
+
@mrufiles = FXRecentFiles.new
|
570
|
+
@mrufiles.setTarget(self)
|
571
|
+
@mrufiles.setSelector(ID_RECENTFILE)
|
572
|
+
|
573
|
+
# Add some alternative accelerators
|
574
|
+
if getAccelTable()
|
575
|
+
getAccelTable().addAccel(MKUINT(KEY_Z, CONTROLMASK|SHIFTMASK),
|
576
|
+
@undolist,
|
577
|
+
MKUINT(FXUndoList::ID_REDO, SEL_COMMAND))
|
578
|
+
end
|
579
|
+
|
580
|
+
# Initialize file name
|
581
|
+
@filename = "untitled"
|
582
|
+
@filetime = nil
|
583
|
+
@filenameset = false
|
584
|
+
|
585
|
+
# Initialize other stuff
|
586
|
+
@searchpath = "/usr/include"
|
587
|
+
setPatterns(["All Files (*)"])
|
588
|
+
setCurrentPattern(0)
|
589
|
+
@timer = nil
|
590
|
+
@stripcr = true
|
591
|
+
@stripsp = false
|
592
|
+
@undolist.mark
|
593
|
+
end
|
594
|
+
|
595
|
+
|
596
|
+
# Load file
|
597
|
+
def loadFile(file)
|
598
|
+
begin
|
599
|
+
getApp().beginWaitCursor()
|
600
|
+
text = File.open(file, "r").read
|
601
|
+
text.gsub!('\r', '') if @stripcr
|
602
|
+
@editor.text = text
|
603
|
+
ensure
|
604
|
+
getApp().endWaitCursor()
|
605
|
+
end
|
606
|
+
|
607
|
+
# Set stuff
|
608
|
+
@editor.modified = false
|
609
|
+
@editor.editable = File.stat(file).writable?
|
610
|
+
@dirlist.currentFile = file
|
611
|
+
@mrufiles.appendFile(file)
|
612
|
+
@filetime = File.mtime(file)
|
613
|
+
@filename = file
|
614
|
+
@filenameset = true
|
615
|
+
@undolist.clear
|
616
|
+
@undolist.mark
|
617
|
+
end
|
618
|
+
|
619
|
+
|
620
|
+
# Insert file
|
621
|
+
def insertFile(file)
|
622
|
+
begin
|
623
|
+
getApp().beginWaitCursor()
|
624
|
+
text = File.open(file, "r").read
|
625
|
+
text.gsub!('\r', '') if @stripcr
|
626
|
+
@editor.insertText(@editor.cursorPos, text, n, true)
|
627
|
+
@editor.modified = true
|
628
|
+
ensure
|
629
|
+
getApp().endWaitCursor()
|
630
|
+
end
|
631
|
+
end
|
632
|
+
|
633
|
+
|
634
|
+
# Save file
|
635
|
+
def saveFile(file)
|
636
|
+
# Set wait cursor
|
637
|
+
getApp().beginWaitCursor()
|
638
|
+
|
639
|
+
# Get text from editor
|
640
|
+
text = @editor.text
|
641
|
+
|
642
|
+
# Strip trailing spaces
|
643
|
+
if @stripsp
|
644
|
+
lines = text.split('\n')
|
645
|
+
lines.each { |line|
|
646
|
+
line.sub!(/ *$/, "")
|
647
|
+
}
|
648
|
+
text = lines.join('\n')
|
649
|
+
end
|
650
|
+
|
651
|
+
# Write the file
|
652
|
+
File.open(file, "w").write(text)
|
653
|
+
|
654
|
+
# Kill wait cursor
|
655
|
+
getApp().endWaitCursor()
|
656
|
+
|
657
|
+
# Set stuff
|
658
|
+
@editor.modified = false
|
659
|
+
@editor.editable = true
|
660
|
+
@dirlist.currentFile = file
|
661
|
+
@mrufiles.appendFile(file)
|
662
|
+
@filetime = File.mtime(file)
|
663
|
+
@filename = file
|
664
|
+
@filenameset = true
|
665
|
+
@undolist.mark
|
666
|
+
end
|
667
|
+
|
668
|
+
|
669
|
+
# Extract file
|
670
|
+
def extractFile(file)
|
671
|
+
# Set wait cursor
|
672
|
+
getApp().beginWaitCursor()
|
673
|
+
|
674
|
+
# Get text from editor
|
675
|
+
size = @editor.selEndPos - @editor.selStartPos
|
676
|
+
text = @editor.extractText(@editor.selStartPos, size)
|
677
|
+
|
678
|
+
# Strip trailing spaces
|
679
|
+
if @stripsp
|
680
|
+
lines = text.split('\n')
|
681
|
+
lines.each { |line|
|
682
|
+
line.sub!(/ *$/, "")
|
683
|
+
}
|
684
|
+
text = lines.join('\n')
|
685
|
+
end
|
686
|
+
|
687
|
+
# Write the file
|
688
|
+
File.open(file, "w").write(text)
|
689
|
+
|
690
|
+
# Kill wait cursor
|
691
|
+
getApp().endWaitCursor()
|
692
|
+
end
|
693
|
+
|
694
|
+
|
695
|
+
# Read settings from registry
|
696
|
+
def readRegistry
|
697
|
+
# Text colors
|
698
|
+
textback = getApp().reg().readColorEntry("SETTINGS", "textbackground", @editor.backColor)
|
699
|
+
textfore = getApp().reg().readColorEntry("SETTINGS", "textforeground", @editor.textColor)
|
700
|
+
textselback = getApp().reg().readColorEntry("SETTINGS", "textselbackground", @editor.selBackColor)
|
701
|
+
textselfore = getApp().reg().readColorEntry("SETTINGS", "textselforeground", @editor.selTextColor)
|
702
|
+
textcursor = getApp().reg().readColorEntry("SETTINGS", "textcursor", @editor.cursorColor)
|
703
|
+
|
704
|
+
# Directory colors
|
705
|
+
dirback = getApp().reg().readColorEntry("SETTINGS", "browserbackground", @dirlist.backColor)
|
706
|
+
dirfore = getApp().reg().readColorEntry("SETTINGS", "browserforeground", @dirlist.textColor)
|
707
|
+
dirselback = getApp().reg().readColorEntry("SETTINGS", "browserselbackground", @dirlist.selBackColor)
|
708
|
+
dirselfore = getApp().reg().readColorEntry("SETTINGS", "browserselforeground", @dirlist.selTextColor)
|
709
|
+
dirlines = getApp().reg().readColorEntry("SETTINGS", "browserlines", @dirlist.lineColor)
|
710
|
+
|
711
|
+
# Delimiters
|
712
|
+
delimiters = getApp().reg().readStringEntry("SETTINGS", "delimiters", '~.,/\\`\'!@#$%^&*()-=+{}|[]":;<>?')
|
713
|
+
|
714
|
+
# Font
|
715
|
+
fontspec = getApp().reg().readStringEntry("SETTINGS", "font", "")
|
716
|
+
if fontspec != ""
|
717
|
+
font = FXFont.new(getApp(), fontspec)
|
718
|
+
@editor.font = font
|
719
|
+
end
|
720
|
+
|
721
|
+
# Get size
|
722
|
+
xx = getApp().reg().readIntEntry("SETTINGS", "x", 5)
|
723
|
+
yy = getApp().reg().readIntEntry("SETTINGS", "y", 5)
|
724
|
+
ww = getApp().reg().readIntEntry("SETTINGS", "width", 600)
|
725
|
+
hh = getApp().reg().readIntEntry("SETTINGS", "height", 400)
|
726
|
+
|
727
|
+
# Hidden files shown
|
728
|
+
hiddenfiles = getApp().reg().readIntEntry("SETTINGS", "showhiddenfiles", 0)
|
729
|
+
@dirlist.hiddenFilesShown = (hiddenfiles != 0) ? true : false
|
730
|
+
|
731
|
+
# Showing the tree?
|
732
|
+
hidetree = getApp().reg().readIntEntry("SETTINGS", "hidetree", 1)
|
733
|
+
|
734
|
+
# Width of tree
|
735
|
+
treewidth = getApp().reg().readIntEntry("SETTINGS", "treewidth", 100)
|
736
|
+
|
737
|
+
# Word wrapping
|
738
|
+
wrapping = getApp().reg().readIntEntry("SETTINGS", "wordwrap", 0)
|
739
|
+
wrapcols = getApp().reg().readIntEntry("SETTINGS", "wrapcols", 80)
|
740
|
+
fixedwrap = getApp().reg().readIntEntry("SETTINGS", "fixedwrap", 1)
|
741
|
+
|
742
|
+
# Tab settings, autoindent
|
743
|
+
autoindent = getApp().reg().readIntEntry("SETTINGS", "autoindent", 0)
|
744
|
+
hardtabs = getApp().reg().readIntEntry("SETTINGS", "hardtabs", 1)
|
745
|
+
tabcols = getApp().reg().readIntEntry("SETTINGS", "tabcols", 8)
|
746
|
+
|
747
|
+
# Strip returns
|
748
|
+
@stripcr = getApp().reg().readIntEntry("SETTINGS", "stripreturn", 0)
|
749
|
+
@stripcr = (@stripcr != 0) ? true : false
|
750
|
+
@stripsp = getApp().reg().readIntEntry("SETTINGS", "stripspaces", 0)
|
751
|
+
@stripsp = (@stripsp != 0) ? true : false
|
752
|
+
|
753
|
+
# File patterns
|
754
|
+
patterns = getApp().reg().readStringEntry("SETTINGS", "filepatterns", "All Files (*)")
|
755
|
+
setPatterns(patterns.split("\n"))
|
756
|
+
setCurrentPattern(getApp().reg().readIntEntry("SETTINGS", "filepatternno", 0))
|
757
|
+
|
758
|
+
# Search path
|
759
|
+
searchpath = getApp().reg().readStringEntry("SETTINGS", "searchpath", "/usr/include")
|
760
|
+
|
761
|
+
# Change the colors
|
762
|
+
@editor.textColor = textfore
|
763
|
+
@editor.backColor = textback
|
764
|
+
@editor.selBackColor = textselback
|
765
|
+
@editor.selTextColor = textselfore
|
766
|
+
@editor.cursorColor = textcursor
|
767
|
+
|
768
|
+
@dirlist.textColor = dirfore
|
769
|
+
@dirlist.backColor = dirback
|
770
|
+
@dirlist.selBackColor = dirselback
|
771
|
+
@dirlist.selTextColor = dirselfore
|
772
|
+
@dirlist.lineColor = dirlines
|
773
|
+
|
774
|
+
# Change delimiters
|
775
|
+
@editor.delimiters = delimiters
|
776
|
+
|
777
|
+
# Hide tree if asked for
|
778
|
+
@treebox.hide if hidetree
|
779
|
+
|
780
|
+
# Set tree width
|
781
|
+
@treebox.width = treewidth
|
782
|
+
|
783
|
+
# Open toward file
|
784
|
+
@dirlist.currentFile = @filename
|
785
|
+
|
786
|
+
# Wrap mode
|
787
|
+
if wrapping
|
788
|
+
@editor.textStyle |= TEXT_WORDWRAP
|
789
|
+
else
|
790
|
+
@editor.textStyle &= ~TEXT_WORDWRAP
|
791
|
+
end
|
792
|
+
|
793
|
+
# Wrap fixed mode
|
794
|
+
if fixedwrap
|
795
|
+
@editor.textStyle |= TEXT_FIXEDWRAP
|
796
|
+
else
|
797
|
+
@editor.textStyle &= ~TEXT_FIXEDWRAP
|
798
|
+
end
|
799
|
+
|
800
|
+
# Autoindent
|
801
|
+
if autoindent
|
802
|
+
@editor.textStyle |= TEXT_AUTOINDENT
|
803
|
+
else
|
804
|
+
@editor.textStyle &= ~TEXT_AUTOINDENT
|
805
|
+
end
|
806
|
+
|
807
|
+
# Hard tabs
|
808
|
+
if hardtabs
|
809
|
+
@editor.textStyle &= ~TEXT_NO_TABS
|
810
|
+
else
|
811
|
+
@editor.textStyle |= TEXT_NO_TABS
|
812
|
+
end
|
813
|
+
|
814
|
+
# Wrap and tab columns
|
815
|
+
@editor.wrapColumns = wrapcols
|
816
|
+
@editor.tabColumns = tabcols
|
817
|
+
|
818
|
+
# Reposition window
|
819
|
+
position(xx, yy, ww, hh)
|
820
|
+
end
|
821
|
+
|
822
|
+
|
823
|
+
# Save settings to registry
|
824
|
+
def writeRegistry
|
825
|
+
# Colors of text
|
826
|
+
getApp().reg().writeColorEntry("SETTINGS", "textbackground", @editor.backColor)
|
827
|
+
getApp().reg().writeColorEntry("SETTINGS", "textforeground", @editor.textColor)
|
828
|
+
getApp().reg().writeColorEntry("SETTINGS", "textselbackground", @editor.selBackColor)
|
829
|
+
getApp().reg().writeColorEntry("SETTINGS", "textselforeground", @editor.selTextColor)
|
830
|
+
getApp().reg().writeColorEntry("SETTINGS", "textcursor", @editor.cursorColor)
|
831
|
+
|
832
|
+
# Colors of directory
|
833
|
+
getApp().reg().writeColorEntry("SETTINGS", "browserbackground", @dirlist.backColor)
|
834
|
+
getApp().reg().writeColorEntry("SETTINGS", "browserforeground", @dirlist.textColor)
|
835
|
+
getApp().reg().writeColorEntry("SETTINGS", "browserselbackground", @dirlist.selBackColor)
|
836
|
+
getApp().reg().writeColorEntry("SETTINGS", "browserselforeground", @dirlist.selTextColor)
|
837
|
+
getApp().reg().writeColorEntry("SETTINGS", "browserlines", @dirlist.lineColor)
|
838
|
+
|
839
|
+
# Delimiters
|
840
|
+
getApp().reg().writeStringEntry("SETTINGS", "delimiters", @editor.delimiters)
|
841
|
+
|
842
|
+
# Write new window size back to registry
|
843
|
+
getApp().reg().writeIntEntry("SETTINGS", "x", getX())
|
844
|
+
getApp().reg().writeIntEntry("SETTINGS", "y", getY())
|
845
|
+
getApp().reg().writeIntEntry("SETTINGS", "width", getWidth())
|
846
|
+
getApp().reg().writeIntEntry("SETTINGS", "height", getHeight())
|
847
|
+
|
848
|
+
# Were showing hidden files
|
849
|
+
getApp().reg().writeIntEntry("SETTINGS", "showhiddenfiles", @dirlist.hiddenFilesShown? ? 1 : 0)
|
850
|
+
|
851
|
+
# Was tree shown?
|
852
|
+
getApp().reg().writeIntEntry("SETTINGS", "hidetree", @treebox.shown() ? 0 : 1)
|
853
|
+
|
854
|
+
# Width of tree
|
855
|
+
getApp().reg().writeIntEntry("SETTINGS", "treewidth", @treebox.getWidth())
|
856
|
+
|
857
|
+
# Wrap mode
|
858
|
+
getApp().reg().writeIntEntry("SETTINGS", "wordwrap", (@editor.textStyle & TEXT_WORDWRAP) != 0 ? 1 : 0)
|
859
|
+
getApp().reg().writeIntEntry("SETTINGS", "fixedwrap", (@editor.textStyle & TEXT_FIXEDWRAP) != 0 ? 1 : 0)
|
860
|
+
getApp().reg().writeIntEntry("SETTINGS", "wrapcols", @editor.getWrapColumns())
|
861
|
+
|
862
|
+
# Tab settings, autoindent
|
863
|
+
getApp().reg().writeIntEntry("SETTINGS", "autoindent", (@editor.textStyle & TEXT_AUTOINDENT) != 0 ? 1 : 0)
|
864
|
+
getApp().reg().writeIntEntry("SETTINGS", "hardtabs", (@editor.textStyle & TEXT_NO_TABS) == 0 ? 1 : 0)
|
865
|
+
getApp().reg().writeIntEntry("SETTINGS", "tabcols", @editor.getTabColumns())
|
866
|
+
|
867
|
+
# Strip returns
|
868
|
+
getApp().reg().writeIntEntry("SETTINGS", "stripreturn", @stripcr ? 1 : 0)
|
869
|
+
getApp().reg().writeIntEntry("SETTINGS", "stripspaces", @stripsp ? 1 : 0)
|
870
|
+
|
871
|
+
# File patterns
|
872
|
+
getApp().reg().writeIntEntry("SETTINGS", "filepatternno", getCurrentPattern())
|
873
|
+
patterns = getPatterns().join("\n")
|
874
|
+
getApp().reg().writeStringEntry("SETTINGS", "filepatterns", patterns)
|
875
|
+
|
876
|
+
# Search path
|
877
|
+
getApp().reg().writeStringEntry("SETTINGS", "searchpath", @searchpath)
|
878
|
+
|
879
|
+
# Font
|
880
|
+
getApp().reg().writeStringEntry("SETTINGS", "font", @editor.font.font)
|
881
|
+
end
|
882
|
+
|
883
|
+
# About box
|
884
|
+
def onCmdAbout(sender, sel, ptr)
|
885
|
+
about = FXMessageBox.new(self, "FOX Text Editor",
|
886
|
+
"The FOX Text Editor\n\nUsing FOX Library Version #{fxversion[0]}.#{fxversion[1]}.#{fxversion[2]}\n\nCopyright (C) 2000,2001 Jeroen van der Zijp (jvz@cfdrc.com)", @bigicon, MBOX_OK|DECOR_TITLE|DECOR_BORDER)
|
887
|
+
about.execute
|
888
|
+
return 1
|
889
|
+
end
|
890
|
+
|
891
|
+
|
892
|
+
# Change font
|
893
|
+
def onCmdFont(sender, sel, ptr)
|
894
|
+
fontdlg = FXFontDialog.new(self, "Change Font", DECOR_BORDER|DECOR_TITLE)
|
895
|
+
fontdesc = @editor.font.fontDesc
|
896
|
+
fontdlg.fontSelection = fontdesc
|
897
|
+
if fontdlg.execute() != 0
|
898
|
+
fontdesc = fontdlg.fontSelection
|
899
|
+
font = FXFont.new(getApp(), fontdesc)
|
900
|
+
font.create
|
901
|
+
@editor.font = font
|
902
|
+
@editor.update
|
903
|
+
end
|
904
|
+
return 1
|
905
|
+
end
|
906
|
+
|
907
|
+
|
908
|
+
# Save settings
|
909
|
+
def onCmdSaveSettings(sender, sel, ptr)
|
910
|
+
writeRegistry();
|
911
|
+
getApp().reg().write
|
912
|
+
return 1
|
913
|
+
end
|
914
|
+
|
915
|
+
|
916
|
+
# Toggle wrap mode
|
917
|
+
def onCmdWrap(sender, sel, ptr)
|
918
|
+
@editor.textStyle ^= TEXT_WORDWRAP
|
919
|
+
return 1
|
920
|
+
end
|
921
|
+
|
922
|
+
|
923
|
+
# Update toggle wrap mode
|
924
|
+
def onUpdWrap(sender, sel, ptr)
|
925
|
+
if (@editor.textStyle & TEXT_WORDWRAP) != 0
|
926
|
+
sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil)
|
927
|
+
else
|
928
|
+
sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil)
|
929
|
+
end
|
930
|
+
return 1
|
931
|
+
end
|
932
|
+
|
933
|
+
|
934
|
+
# Toggle fixed wrap mode
|
935
|
+
def onCmdWrapFixed(sender, sel, ptr)
|
936
|
+
@editor.textStyle ^= TEXT_FIXEDWRAP
|
937
|
+
return 1
|
938
|
+
end
|
939
|
+
|
940
|
+
|
941
|
+
# Update toggle fixed wrap mode
|
942
|
+
def onUpdWrapFixed(sender, sel, ptr)
|
943
|
+
if (@editor.textStyle & TEXT_FIXEDWRAP) != 0
|
944
|
+
sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil)
|
945
|
+
else
|
946
|
+
sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil)
|
947
|
+
end
|
948
|
+
return 1
|
949
|
+
end
|
950
|
+
|
951
|
+
# Toggle strip returns mode
|
952
|
+
def onCmdStripReturns(sender, sel, ptr)
|
953
|
+
@stripcr = !@stripcr
|
954
|
+
return 1
|
955
|
+
end
|
956
|
+
|
957
|
+
|
958
|
+
# Update toggle strip returns mode
|
959
|
+
def onUpdStripReturns(sender, sel, ptr)
|
960
|
+
if @stripcr
|
961
|
+
sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil)
|
962
|
+
else
|
963
|
+
sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil)
|
964
|
+
end
|
965
|
+
return 1
|
966
|
+
end
|
967
|
+
|
968
|
+
|
969
|
+
# Toggle strip spaces mode
|
970
|
+
def onCmdStripSpaces(sender, sel, ptr)
|
971
|
+
@stripsp = !@stripsp
|
972
|
+
return 1
|
973
|
+
end
|
974
|
+
|
975
|
+
|
976
|
+
# Update toggle strip spaces mode
|
977
|
+
def onUpdStripSpaces(sender, sel, ptr)
|
978
|
+
if @stripsp
|
979
|
+
sender.handle(self, MKUINT(ID_CHECK, SEL_COMMAND), nil)
|
980
|
+
else
|
981
|
+
sender.handle(self, MKUINT(ID_UNCHECK, SEL_COMMAND), nil)
|
982
|
+
end
|
983
|
+
return 1
|
984
|
+
end
|
985
|
+
|
986
|
+
|
987
|
+
# Reopen file
|
988
|
+
def onCmdReopen(sender, sel, ptr)
|
989
|
+
if !@undolist.marked?
|
990
|
+
if FXMessageBox.question(self, MBOX_YES_NO, "Document was changed",
|
991
|
+
"Discard changes to this document?") == MBOX_CLICKED_NO
|
992
|
+
return 1
|
993
|
+
end
|
994
|
+
end
|
995
|
+
loadFile(@filename)
|
996
|
+
return 1
|
997
|
+
end
|
998
|
+
|
999
|
+
|
1000
|
+
# Update reopen file
|
1001
|
+
def onUpdReopen(sender, sel, ptr)
|
1002
|
+
if @filenameset
|
1003
|
+
sender.handle(self, MKUINT(ID_ENABLE, SEL_COMMAND), nil)
|
1004
|
+
else
|
1005
|
+
sender.handle(self, MKUINT(ID_DISABLE, SEL_COMMAND), nil)
|
1006
|
+
end
|
1007
|
+
return 1
|
1008
|
+
end
|
1009
|
+
|
1010
|
+
|
1011
|
+
# Save changes, prompt for new filename
|
1012
|
+
def saveChanges
|
1013
|
+
if !@undolist.marked?
|
1014
|
+
answer = FXMessageBox.question(self, MBOX_YES_NO_CANCEL,
|
1015
|
+
"Unsaved Document", "Save current document to file?")
|
1016
|
+
return false if (answer == MBOX_CLICKED_CANCEL)
|
1017
|
+
if answer == MBOX_CLICKED_YES
|
1018
|
+
file = @filename
|
1019
|
+
if !@filenameset
|
1020
|
+
savedialog = FXFileDialog.new(self, "Save Document")
|
1021
|
+
savedialog.selectMode = SELECTFILE_ANY
|
1022
|
+
savedialog.patternList = getPatterns()
|
1023
|
+
savedialog.currentPattern = getCurrentPattern()
|
1024
|
+
savedialog.filename = file
|
1025
|
+
return false if (savedialog.execute == 0)
|
1026
|
+
setCurrentPattern(savedialog.currentPattern)
|
1027
|
+
file = savedialog.filename
|
1028
|
+
if File.exists?(file)
|
1029
|
+
if MBOX_CLICKED_NO == FXMessageBox.question(self, MBOX_YES_NO,
|
1030
|
+
"Overwrite Document", "Overwrite existing document: #{file}?")
|
1031
|
+
return false
|
1032
|
+
end
|
1033
|
+
end
|
1034
|
+
end
|
1035
|
+
file = savedialog.filename
|
1036
|
+
saveFile(file)
|
1037
|
+
end
|
1038
|
+
end
|
1039
|
+
true
|
1040
|
+
end
|
1041
|
+
|
1042
|
+
|
1043
|
+
# Open
|
1044
|
+
def onCmdOpen(sender, sel, ptr)
|
1045
|
+
return 1 if !saveChanges()
|
1046
|
+
opendialog = FXFileDialog.new(self, "Open Document")
|
1047
|
+
opendialog.selectMode = SELECTFILE_EXISTING
|
1048
|
+
opendialog.patternList = getPatterns()
|
1049
|
+
opendialog.currentPattern = getCurrentPattern()
|
1050
|
+
opendialog.filename = @filename
|
1051
|
+
if opendialog.execute != 0
|
1052
|
+
setCurrentPattern(opendialog.currentPattern)
|
1053
|
+
loadFile(opendialog.filename)
|
1054
|
+
end
|
1055
|
+
return 1
|
1056
|
+
end
|
1057
|
+
|
1058
|
+
|
1059
|
+
# Insert file into buffer
|
1060
|
+
def onCmdInsertFile(sender, sel, ptr)
|
1061
|
+
opendialog = FXFileDialog.new(self, "Open Document")
|
1062
|
+
opendialog.selectMode = SELECTFILE_EXISTING
|
1063
|
+
opendialog.patternList = getPatterns()
|
1064
|
+
opendialog.currentPattern = getCurrentPattern()
|
1065
|
+
if opendialog.execute != 0
|
1066
|
+
setCurrentPattern(opendialog.currentPattern)
|
1067
|
+
insertFile(opendialog.filename)
|
1068
|
+
end
|
1069
|
+
return 1
|
1070
|
+
end
|
1071
|
+
|
1072
|
+
|
1073
|
+
# Update insert file
|
1074
|
+
def onUpdInsertFile(sender, sel, ptr)
|
1075
|
+
if @editor.editable?
|
1076
|
+
sender.handle(self, MKUINT(ID_ENABLE, SEL_COMMAND), nil)
|
1077
|
+
else
|
1078
|
+
sender.handle(self, MKUINT(ID_DISABLE, SEL_COMMAND), nil)
|
1079
|
+
end
|
1080
|
+
return 1
|
1081
|
+
end
|
1082
|
+
|
1083
|
+
|
1084
|
+
# Extract selection to file
|
1085
|
+
def onCmdExtractFile(sender, sel, ptr)
|
1086
|
+
savedialog = FXFileDialog.new(self, "Save Document")
|
1087
|
+
file = "untitled"
|
1088
|
+
savedialog.selectMode = SELECTFILE_ANY
|
1089
|
+
savedialog.patternList = getPatterns()
|
1090
|
+
savedialog.currentPattern = getCurrentPattern()
|
1091
|
+
savedialog.filename = file
|
1092
|
+
if savedialog.execute != 0
|
1093
|
+
setCurrentPattern(savedialog.currentPattern)
|
1094
|
+
file = savedialog.filename
|
1095
|
+
if File.exists?(file)
|
1096
|
+
if MBOX_CLICKED_NO == FXMessageBox.question(self, MBOX_YES_NO,
|
1097
|
+
"Overwrite Document", "Overwrite existing document: #{file}?")
|
1098
|
+
return 1
|
1099
|
+
end
|
1100
|
+
end
|
1101
|
+
extractFile(file)
|
1102
|
+
end
|
1103
|
+
return 1
|
1104
|
+
end
|
1105
|
+
|
1106
|
+
|
1107
|
+
# Update extract file
|
1108
|
+
def onUpdExtractFile(sender, sel, ptr)
|
1109
|
+
if @editor.hasSelection()
|
1110
|
+
sender.handle(self, MKUINT(ID_ENABLE, SEL_COMMAND), nil)
|
1111
|
+
else
|
1112
|
+
sender.handle(self, MKUINT(ID_DISABLE, SEL_COMMAND), nil)
|
1113
|
+
end
|
1114
|
+
return 1
|
1115
|
+
end
|
1116
|
+
|
1117
|
+
|
1118
|
+
# Open Selected
|
1119
|
+
def onCmdOpenSelected(sender, sel, ptr)
|
1120
|
+
string = getDNDData(FROM_SELECTION, stringType)
|
1121
|
+
return 1 if !string
|
1122
|
+
|
1123
|
+
if string.length < 1024
|
1124
|
+
# Where to look for this file?
|
1125
|
+
if @filename.empty?
|
1126
|
+
dir = Dir.getwd
|
1127
|
+
else
|
1128
|
+
dir = File.dirname(@filename) unless @filename.empty?
|
1129
|
+
end
|
1130
|
+
|
1131
|
+
# Strip leading and trailing spaces
|
1132
|
+
string.strip!
|
1133
|
+
|
1134
|
+
# Attempt to extract the file name from various forms
|
1135
|
+
if string =~ /#include \".*\"/
|
1136
|
+
file = File.expand_path(name, dir)
|
1137
|
+
if !File.exists?(file)
|
1138
|
+
Find.find(@searchpath) { |f| file = f if (f == name) }
|
1139
|
+
end
|
1140
|
+
elsif string =~ /#include <.*>/
|
1141
|
+
file = File.expand_path(name, dir)
|
1142
|
+
if !File.exists?(file)
|
1143
|
+
Find.find(@searchpath) { |f| file = f if (f == name) }
|
1144
|
+
end
|
1145
|
+
elsif string =~ /.*:.*:.*/
|
1146
|
+
file = File.expand_path(name, dir)
|
1147
|
+
if !File.exists?(file)
|
1148
|
+
Find.find(@searchpath) { |f| file = f if (f == name) }
|
1149
|
+
end
|
1150
|
+
else
|
1151
|
+
file = File.expand_path(string, dir)
|
1152
|
+
end
|
1153
|
+
|
1154
|
+
if File.exists?(file)
|
1155
|
+
# Different from current file?
|
1156
|
+
if file != @filename
|
1157
|
+
# Save old file first
|
1158
|
+
return 1 if !saveChanges()
|
1159
|
+
|
1160
|
+
# Open the new file
|
1161
|
+
loadFile(file)
|
1162
|
+
end
|
1163
|
+
|
1164
|
+
# Switch line number only
|
1165
|
+
if lineno != 0
|
1166
|
+
pos = @editor.nextLine(0, lineno - 1)
|
1167
|
+
@editor.cursorPos = pos
|
1168
|
+
@editor.centerLine = pos
|
1169
|
+
end
|
1170
|
+
return 1
|
1171
|
+
end
|
1172
|
+
else
|
1173
|
+
getApp().beep # string is too long to be a file name
|
1174
|
+
end
|
1175
|
+
return 1
|
1176
|
+
end
|
1177
|
+
|
1178
|
+
|
1179
|
+
# Open recent file
|
1180
|
+
def onCmdRecentFile(sender, sel, filename)
|
1181
|
+
return 1 if !saveChanges()
|
1182
|
+
loadFile(filename)
|
1183
|
+
return 1
|
1184
|
+
end
|
1185
|
+
|
1186
|
+
|
1187
|
+
# Save
|
1188
|
+
def onCmdSave(sender, sel, ptr)
|
1189
|
+
if !@filenameset
|
1190
|
+
return onCmdSaveAs(sender, sel, ptr)
|
1191
|
+
end
|
1192
|
+
saveFile(@filename)
|
1193
|
+
return 1
|
1194
|
+
end
|
1195
|
+
|
1196
|
+
|
1197
|
+
# Save Update
|
1198
|
+
def onUpdSave(sender, sel, ptr)
|
1199
|
+
msg = (!@undolist.marked?) ? FXWindow::ID_ENABLE : FXWindow::ID_DISABLE
|
1200
|
+
sender.handle(self, MKUINT(msg, SEL_COMMAND), nil)
|
1201
|
+
return 1
|
1202
|
+
end
|
1203
|
+
|
1204
|
+
|
1205
|
+
# Save As
|
1206
|
+
def onCmdSaveAs(sender, sel, ptr)
|
1207
|
+
savedialog = FXFileDialog.new(self, "Save Document")
|
1208
|
+
file = @filename
|
1209
|
+
savedialog.selectMode = SELECTFILE_ANY
|
1210
|
+
savedialog.patternList = getPatterns()
|
1211
|
+
savedialog.currentPattern = getCurrentPattern()
|
1212
|
+
savedialog.filename = file
|
1213
|
+
if savedialog.execute != 0
|
1214
|
+
setCurrentPattern(savedialog.currentPattern)
|
1215
|
+
file = savedialog.filename
|
1216
|
+
if File.exists?(file)
|
1217
|
+
if MBOX_CLICKED_NO == FXMessageBox.question(self, MBOX_YES_NO,
|
1218
|
+
"Overwrite Document", "Overwrite existing document: #{file}?")
|
1219
|
+
return 1
|
1220
|
+
end
|
1221
|
+
end
|
1222
|
+
saveFile(file)
|
1223
|
+
end
|
1224
|
+
return 1
|
1225
|
+
end
|
1226
|
+
|
1227
|
+
|
1228
|
+
# New
|
1229
|
+
def onCmdNew(sender, sel, ptr)
|
1230
|
+
return 1 if !saveChanges()
|
1231
|
+
@filename = "untitled"
|
1232
|
+
@filetime = nil
|
1233
|
+
@filenameset = false
|
1234
|
+
@editor.text = nil
|
1235
|
+
@editor.modified = false
|
1236
|
+
@editor.editable = true
|
1237
|
+
@undolist.clear
|
1238
|
+
@undolist.mark
|
1239
|
+
return 1
|
1240
|
+
end
|
1241
|
+
|
1242
|
+
|
1243
|
+
# Quit
|
1244
|
+
def onCmdQuit(sender, sel, ptr)
|
1245
|
+
return 1 if !saveChanges()
|
1246
|
+
writeRegistry()
|
1247
|
+
getApp().exit(0)
|
1248
|
+
return 1
|
1249
|
+
end
|
1250
|
+
|
1251
|
+
|
1252
|
+
# Update title
|
1253
|
+
def onUpdTitle(sender, sel, ptr)
|
1254
|
+
title = "FOX Text Editor:- " + @filename
|
1255
|
+
title += "*" if !@undolist.marked?
|
1256
|
+
sender.handle(self, MKUINT(FXWindow::ID_SETSTRINGVALUE, SEL_COMMAND), title)
|
1257
|
+
return 1
|
1258
|
+
end
|
1259
|
+
|
1260
|
+
|
1261
|
+
# Print the text
|
1262
|
+
def onCmdPrint(sender, sel, ptr)
|
1263
|
+
dlg = FXPrintDialog.new(self, "Print File")
|
1264
|
+
if dlg.execute != 0
|
1265
|
+
printer = dlg.printer
|
1266
|
+
end
|
1267
|
+
return 1
|
1268
|
+
end
|
1269
|
+
|
1270
|
+
|
1271
|
+
# Command from the tree list
|
1272
|
+
def onCmdTreeList(sender, sel, item)
|
1273
|
+
if !item || !@dirlist.isItemFile(item)
|
1274
|
+
return 1
|
1275
|
+
end
|
1276
|
+
if !saveChanges()
|
1277
|
+
return 1
|
1278
|
+
end
|
1279
|
+
file = @dirlist.getItemPathname(item)
|
1280
|
+
loadFile(file)
|
1281
|
+
return 1
|
1282
|
+
end
|
1283
|
+
|
1284
|
+
|
1285
|
+
# See if we can get it as a filename
|
1286
|
+
def onEditDNDDrop(sender, sel, ptr)
|
1287
|
+
urilist = getDNDData(FROM_DRAGNDROP, FXWindow.urilistType)
|
1288
|
+
if urilist
|
1289
|
+
file = FXURL.fileFromURL(urilist.before('\r'))
|
1290
|
+
return 1 if (file == "")
|
1291
|
+
return 1 if !saveChanges()
|
1292
|
+
loadFile(file)
|
1293
|
+
return 1
|
1294
|
+
end
|
1295
|
+
return 0
|
1296
|
+
end
|
1297
|
+
|
1298
|
+
|
1299
|
+
# See if a filename is being dragged over the window
|
1300
|
+
def onEditDNDMotion(sender, sel, ptr)
|
1301
|
+
if offeredDNDType(FROM_DRAGNDROP, FXWindow.urilistType)
|
1302
|
+
acceptDrop(DRAG_COPY)
|
1303
|
+
return 1
|
1304
|
+
end
|
1305
|
+
return 0
|
1306
|
+
end
|
1307
|
+
|
1308
|
+
|
1309
|
+
# Change both text background color
|
1310
|
+
def onCmdTextBackColor(sender, sel, color)
|
1311
|
+
@editor.backColor = color
|
1312
|
+
return 1
|
1313
|
+
end
|
1314
|
+
|
1315
|
+
|
1316
|
+
# Update background color
|
1317
|
+
def onUpdTextBackColor(sender, sel, ptr)
|
1318
|
+
sender.handle(self, MKUINT(ID_SETINTVALUE, SEL_COMMAND), @editor.backColor)
|
1319
|
+
return 1
|
1320
|
+
end
|
1321
|
+
|
1322
|
+
|
1323
|
+
# Change both text selected background color
|
1324
|
+
def onCmdTextSelBackColor(sender, sel, color)
|
1325
|
+
@editor.selBackColor = color
|
1326
|
+
return 1
|
1327
|
+
end
|
1328
|
+
|
1329
|
+
|
1330
|
+
# Update selected background color
|
1331
|
+
def onUpdTextSelBackColor(sender, sel, ptr)
|
1332
|
+
sender.handle(self, MKUINT(ID_SETINTVALUE, SEL_COMMAND), @editor.selBackColor)
|
1333
|
+
return 1
|
1334
|
+
end
|
1335
|
+
|
1336
|
+
|
1337
|
+
# Change both text and tree text color
|
1338
|
+
def onCmdTextForeColor(sender, sel, color)
|
1339
|
+
@editor.textColor = color
|
1340
|
+
return 1
|
1341
|
+
end
|
1342
|
+
|
1343
|
+
|
1344
|
+
# Forward GUI update to text widget
|
1345
|
+
def onUpdTextForeColor(sender, sel, ptr)
|
1346
|
+
sender.handle(self, MKUINT(ID_SETINTVALUE, SEL_COMMAND), @editor.textColor)
|
1347
|
+
return 1
|
1348
|
+
end
|
1349
|
+
|
1350
|
+
|
1351
|
+
# Change both text and tree text color
|
1352
|
+
def onCmdTextSelForeColor(sender, sel, color)
|
1353
|
+
@editor.selTextColor = color
|
1354
|
+
return 1
|
1355
|
+
end
|
1356
|
+
|
1357
|
+
|
1358
|
+
# Forward GUI update to text widget
|
1359
|
+
def onUpdTextSelForeColor(sender, sel, ptr)
|
1360
|
+
sender.handle(self, MKUINT(ID_SETINTVALUE, SEL_COMMAND), @editor.selTextColor)
|
1361
|
+
return 1
|
1362
|
+
end
|
1363
|
+
|
1364
|
+
|
1365
|
+
# Change cursor color
|
1366
|
+
def onCmdTextCursorColor(sender, sel, color)
|
1367
|
+
@editor.cursorColor = color
|
1368
|
+
return 1
|
1369
|
+
end
|
1370
|
+
|
1371
|
+
|
1372
|
+
# Update cursor color
|
1373
|
+
def onUpdTextCursorColor(sender, sel, ptr)
|
1374
|
+
sender.handle(self, MKUINT(FXWindow::ID_SETINTVALUE, SEL_COMMAND), @editor.cursorColor)
|
1375
|
+
return 1
|
1376
|
+
end
|
1377
|
+
|
1378
|
+
|
1379
|
+
# Change both tree background color
|
1380
|
+
def onCmdDirBackColor(sender, sel, color)
|
1381
|
+
@dirlist.backColor = color
|
1382
|
+
return 1
|
1383
|
+
end
|
1384
|
+
|
1385
|
+
|
1386
|
+
# Update background color
|
1387
|
+
def onUpdDirBackColor(sender, sel, ptr)
|
1388
|
+
sender.handle(self, MKUINT(ID_SETINTVALUE, SEL_COMMAND), @dirlist.backColor)
|
1389
|
+
return 1
|
1390
|
+
end
|
1391
|
+
|
1392
|
+
|
1393
|
+
# Change both text and tree selected background color
|
1394
|
+
def onCmdDirSelBackColor(sender, sel, color)
|
1395
|
+
@dirlist.selBackColor = color
|
1396
|
+
return 1
|
1397
|
+
end
|
1398
|
+
|
1399
|
+
|
1400
|
+
# Update selected background color
|
1401
|
+
def onUpdDirSelBackColor(sender, sel, ptr)
|
1402
|
+
sender.handle(self, MKUINT(ID_SETINTVALUE, SEL_COMMAND), @dirlist.selBackColor)
|
1403
|
+
return 1
|
1404
|
+
end
|
1405
|
+
|
1406
|
+
|
1407
|
+
# Change both text and tree text color
|
1408
|
+
def onCmdDirForeColor(sender, sel, color)
|
1409
|
+
@dirlist.textColor = color
|
1410
|
+
return 1
|
1411
|
+
end
|
1412
|
+
|
1413
|
+
|
1414
|
+
# Forward GUI update to text widget
|
1415
|
+
def onUpdDirForeColor(sender, sel, ptr)
|
1416
|
+
sender.handle(self, MKUINT(ID_SETINTVALUE, SEL_COMMAND), @dirlist.textColor)
|
1417
|
+
return 1
|
1418
|
+
end
|
1419
|
+
|
1420
|
+
|
1421
|
+
# Change both text and tree
|
1422
|
+
def onCmdDirSelForeColor(sender, sel, color)
|
1423
|
+
@dirlist.selTextColor = color
|
1424
|
+
return 1
|
1425
|
+
end
|
1426
|
+
|
1427
|
+
|
1428
|
+
# Forward GUI update to text widget
|
1429
|
+
def onUpdDirSelForeColor(sender, sel, ptr)
|
1430
|
+
sender.handle(sender, MKUINT(FXWindow::ID_SETINTVALUE, SEL_COMMAND), @dirlist.selTextColor)
|
1431
|
+
return 1
|
1432
|
+
end
|
1433
|
+
|
1434
|
+
|
1435
|
+
# Change both text and tree
|
1436
|
+
def onCmdDirLineColor(sender, sel, color)
|
1437
|
+
@dirlist.lineColor = color
|
1438
|
+
return 1
|
1439
|
+
end
|
1440
|
+
|
1441
|
+
|
1442
|
+
# Forward GUI update to text widget
|
1443
|
+
def onUpdDirLineColor(sender, sel, ptr)
|
1444
|
+
sender.handle(sender, MKUINT(FXWindow::ID_SETINTVALUE, SEL_COMMAND), @dirlist.lineColor)
|
1445
|
+
return 1
|
1446
|
+
end
|
1447
|
+
|
1448
|
+
|
1449
|
+
# Text inserted
|
1450
|
+
def onTextInserted(sender, sel, change)
|
1451
|
+
@undolist.add(FXTextInsert.new(@editor, change.pos))
|
1452
|
+
|
1453
|
+
# Keep the undo list in check by trimming it down to KEEPUNDOSIZE
|
1454
|
+
# whenever the amount of undo buffering exceeds MAXUNDOSIZE.
|
1455
|
+
@undolist.trimSize(KEEPUNDOSIZE) if (@undolist.undoSize() > MAXUNDOSIZE)
|
1456
|
+
return 1
|
1457
|
+
end
|
1458
|
+
|
1459
|
+
|
1460
|
+
# Text deleted
|
1461
|
+
def onTextDeleted(sender, sel, change)
|
1462
|
+
@undolist.add(FXTextDelete.new(@editor, change))
|
1463
|
+
|
1464
|
+
# Keep the undo list in check by trimming it down to KEEPUNDOSIZE
|
1465
|
+
# whenever the amount of undo buffering exceeds MAXUNDOSIZE.
|
1466
|
+
@undolist.trimSize(KEEPUNDOSIZE) if (@undolist.undoSize() > MAXUNDOSIZE)
|
1467
|
+
return 1
|
1468
|
+
end
|
1469
|
+
|
1470
|
+
|
1471
|
+
# Text replaced
|
1472
|
+
def onTextReplaced(sender, sel, change)
|
1473
|
+
@undolist.add(FXTextReplace.new(@editor, change))
|
1474
|
+
|
1475
|
+
# Keep the undo list in check by trimming it down to KEEPUNDOSIZE
|
1476
|
+
# whenever the amount of undo buffering exceeds MAXUNDOSIZE.
|
1477
|
+
@undolist.trimSize(KEEPUNDOSIZE) if (@undolist.undoSize() > MAXUNDOSIZE)
|
1478
|
+
return 1
|
1479
|
+
end
|
1480
|
+
|
1481
|
+
|
1482
|
+
# Released right button
|
1483
|
+
def onTextRightMouse(sender, sel, event)
|
1484
|
+
if !event.moved
|
1485
|
+
pane = FXMenuPane.new(self)
|
1486
|
+
FXMenuCommand.new(pane, "Undo", @undoicon, @undolist, FXUndoList::ID_UNDO)
|
1487
|
+
FXMenuCommand.new(pane, "Redo", @redoicon, @undolist, FXUndoList::ID_REDO)
|
1488
|
+
FXMenuSeparator.new(pane)
|
1489
|
+
FXMenuCommand.new(pane, "Cut", @cuticon, @editor, FXText::ID_CUT_SEL)
|
1490
|
+
FXMenuCommand.new(pane, "Copy", @copyicon, @editor, FXText::ID_COPY_SEL)
|
1491
|
+
FXMenuCommand.new(pane, "Paste", @pasteicon, @editor, FXText::ID_PASTE_SEL)
|
1492
|
+
FXMenuCommand.new(pane, "Select All", nil, @editor, FXText::ID_SELECT_ALL)
|
1493
|
+
pane.create
|
1494
|
+
pane.popup(nil, event.root_x, event.root_y)
|
1495
|
+
getApp().runModalWhileShown(pane)
|
1496
|
+
end
|
1497
|
+
return 1
|
1498
|
+
end
|
1499
|
+
|
1500
|
+
|
1501
|
+
# Set TextWindow path
|
1502
|
+
def onCmdIncludePaths(sender, sel, ptr)
|
1503
|
+
searchpath = FXInputDialog::getString(@searchpath, self,
|
1504
|
+
"Change include file search path",
|
1505
|
+
"Specify a list of directories separated by a `#{File::PATH_SEPARATOR}'" +
|
1506
|
+
" where include files are to be found.\nFor example:\n\n" +
|
1507
|
+
" /usr/include#{File::PATH_SEPARATOR}/usr/local/include\n\n" +
|
1508
|
+
"This list will be used to locate the selected file name.")
|
1509
|
+
@searchpath = searchpath if searchpath != nil
|
1510
|
+
return 1
|
1511
|
+
end
|
1512
|
+
|
1513
|
+
|
1514
|
+
# Change patterns
|
1515
|
+
def setPatterns(patterns)
|
1516
|
+
@filter.clearItems
|
1517
|
+
patterns.each { |pat| @filter.appendItem(pat) }
|
1518
|
+
if @filter.numItems == 0
|
1519
|
+
@filter.appendItem("All Files (*)")
|
1520
|
+
end
|
1521
|
+
setCurrentPattern(0)
|
1522
|
+
end
|
1523
|
+
|
1524
|
+
|
1525
|
+
# Return array of pattern strings
|
1526
|
+
def getPatterns()
|
1527
|
+
patterns = []
|
1528
|
+
@filter.each { |itemText, itemData| patterns.push(itemText) }
|
1529
|
+
patterns
|
1530
|
+
end
|
1531
|
+
|
1532
|
+
|
1533
|
+
# Strip pattern from text if present
|
1534
|
+
def patternFromText(pattern)
|
1535
|
+
if pattern =~ /\(.*\)/
|
1536
|
+
$&[1..2]
|
1537
|
+
else
|
1538
|
+
pattern
|
1539
|
+
end
|
1540
|
+
end
|
1541
|
+
|
1542
|
+
|
1543
|
+
# Set current pattern
|
1544
|
+
def setCurrentPattern(n)
|
1545
|
+
n = [[0, n].max, @filter.getNumItems() - 1].min
|
1546
|
+
@filter.currentItem = n
|
1547
|
+
@dirlist.pattern = patternFromText(@filter.getItemText(n))
|
1548
|
+
end
|
1549
|
+
|
1550
|
+
|
1551
|
+
# Return current pattern
|
1552
|
+
def getCurrentPattern()
|
1553
|
+
@filter.currentItem
|
1554
|
+
end
|
1555
|
+
|
1556
|
+
|
1557
|
+
# Change the pattern
|
1558
|
+
def onCmdFilter(sender, sel, ptr)
|
1559
|
+
@dirlist.pattern = patternFromText(ptr)
|
1560
|
+
return 1
|
1561
|
+
end
|
1562
|
+
|
1563
|
+
|
1564
|
+
# Show help window
|
1565
|
+
def onCmdShowHelp(sender, sel, ptr)
|
1566
|
+
@helpwindow.show(PLACEMENT_CURSOR)
|
1567
|
+
return 1
|
1568
|
+
end
|
1569
|
+
|
1570
|
+
|
1571
|
+
# Show preferences dialog
|
1572
|
+
def onCmdPreferences(sender, sel, ptr)
|
1573
|
+
preferences = PrefDialog.new(self)
|
1574
|
+
preferences.setPatterns(getPatterns())
|
1575
|
+
if preferences.execute != 0
|
1576
|
+
setPatterns(preferences.getPatterns())
|
1577
|
+
end
|
1578
|
+
return 1
|
1579
|
+
end
|
1580
|
+
|
1581
|
+
|
1582
|
+
# Change tab columns
|
1583
|
+
def onCmdTabColumns(sender, sel, ptr)
|
1584
|
+
@editor.tabColumns = sender.text.to_i # sender is an FXTextField
|
1585
|
+
return 1
|
1586
|
+
end
|
1587
|
+
|
1588
|
+
|
1589
|
+
# Update tab columns
|
1590
|
+
def onUpdTabColumns(sender, sel, ptr)
|
1591
|
+
sender.handle(self, MKUINT(ID_SETINTVALUE, SEL_COMMAND), @editor.tabColumns)
|
1592
|
+
return 1
|
1593
|
+
end
|
1594
|
+
|
1595
|
+
|
1596
|
+
# Change wrap columns
|
1597
|
+
def onCmdWrapColumns(sender, sel, ptr)
|
1598
|
+
@editor.wrapColumns sender.text.to_i # sender is an FXTextField
|
1599
|
+
return 1
|
1600
|
+
end
|
1601
|
+
|
1602
|
+
|
1603
|
+
# Update wrap columns
|
1604
|
+
def onUpdWrapColumns(sender, sel, ptr)
|
1605
|
+
sender.handle(self, MKUINT(ID_SETINTVALUE, SEL_COMMAND), @editor.wrapColumns)
|
1606
|
+
return 1
|
1607
|
+
end
|
1608
|
+
|
1609
|
+
|
1610
|
+
# Toggle insertion of tabs
|
1611
|
+
def onCmdInsertTabs(sender, sel, ptr)
|
1612
|
+
@editor.textStyle ^= TEXT_NO_TABS
|
1613
|
+
return 1
|
1614
|
+
end
|
1615
|
+
|
1616
|
+
|
1617
|
+
# Update insertion of tabs
|
1618
|
+
def onUpdInsertTabs(sender, sel, ptr)
|
1619
|
+
sender.handle(self, ((@editor.textStyle & TEXT_NO_TABS) != 0) ?
|
1620
|
+
MKUINT(ID_UNCHECK, SEL_COMMAND) : MKUINT(ID_CHECK, SEL_COMMAND), nil)
|
1621
|
+
return 1
|
1622
|
+
end
|
1623
|
+
|
1624
|
+
|
1625
|
+
# Toggle autoindent
|
1626
|
+
def onCmdAutoIndent(sender, sel, ptr)
|
1627
|
+
@editor.textStyle ^= TEXT_AUTOINDENT
|
1628
|
+
return 1
|
1629
|
+
end
|
1630
|
+
|
1631
|
+
|
1632
|
+
# Update autoindent
|
1633
|
+
def onUpdAutoIndent(sender, sel, ptr)
|
1634
|
+
sender.handle(self, ((@editor.textStyle & TEXT_AUTOINDENT) != 0) ?
|
1635
|
+
MKUINT(ID_CHECK, SEL_COMMAND) : MKUINT(ID_UNCHECK, SEL_COMMAND), nil)
|
1636
|
+
return 1
|
1637
|
+
end
|
1638
|
+
|
1639
|
+
|
1640
|
+
# Set brace match time
|
1641
|
+
def onCmdBraceMatch(sender, sel, ptr)
|
1642
|
+
@editor.hiliteMatchTime = sender.text.to_i # sender is an FXTextField
|
1643
|
+
return 1
|
1644
|
+
end
|
1645
|
+
|
1646
|
+
|
1647
|
+
# Update brace match time
|
1648
|
+
def onUpdBraceMatch(sender, sel, ptr)
|
1649
|
+
sender.handle(self, MKUINT(ID_SETINTVALUE, SEL_COMMAND), @editor.hiliteMatchTime)
|
1650
|
+
return 1
|
1651
|
+
end
|
1652
|
+
|
1653
|
+
|
1654
|
+
# Change word delimiters
|
1655
|
+
def onCmdDelimiters(sender, sel, ptr)
|
1656
|
+
@editor.delimiters = sender.text # sender is an FXTextField
|
1657
|
+
return 1
|
1658
|
+
end
|
1659
|
+
|
1660
|
+
|
1661
|
+
# Update word delimiters
|
1662
|
+
def onUpdDelimiters(sender, sel, ptr)
|
1663
|
+
sender.handle(self, MKUINT(ID_SETSTRINGVALUE, SEL_COMMAND), @editor.delimiters)
|
1664
|
+
return 1
|
1665
|
+
end
|
1666
|
+
|
1667
|
+
|
1668
|
+
# Update box for overstrike mode display
|
1669
|
+
def onUpdOverstrike(sender, sel, ptr)
|
1670
|
+
mode = ((@editor.textStyle & TEXT_OVERSTRIKE) != 0) ? "OVR" : "INS"
|
1671
|
+
sender.handle(self, MKUINT(ID_SETSTRINGVALUE, SEL_COMMAND), mode)
|
1672
|
+
return 1
|
1673
|
+
end
|
1674
|
+
|
1675
|
+
|
1676
|
+
# Update box for readonly display
|
1677
|
+
def onUpdReadOnly(sender, sel, ptr)
|
1678
|
+
rw = ((@editor.textStyle & TEXT_READONLY) != 0) ? "RO" : "RW"
|
1679
|
+
sender.handle(self, MKUINT(ID_SETSTRINGVALUE, SEL_COMMAND), rw)
|
1680
|
+
return 1
|
1681
|
+
end
|
1682
|
+
|
1683
|
+
|
1684
|
+
# Update box for size display
|
1685
|
+
def onUpdNumChars(sender, sel, ptr)
|
1686
|
+
sender.handle(self, MKUINT(ID_SETINTVALUE, SEL_COMMAND), @editor.length)
|
1687
|
+
return 1
|
1688
|
+
end
|
1689
|
+
|
1690
|
+
|
1691
|
+
# Update box for readonly display
|
1692
|
+
def onCheckFile(sender, sel, ptr)
|
1693
|
+
mtime = File.exists?(@filename) ? File.mtime(@filename) : nil
|
1694
|
+
if @filetime && mtime && mtime != @filetime
|
1695
|
+
@filetime = mtime
|
1696
|
+
if MBOX_CLICKED_OK == FXMessageBox.warning(self, MBOX_OK_CANCEL,
|
1697
|
+
"File Was Changed",
|
1698
|
+
"The file was changed by another program\nReload this file from disk?")
|
1699
|
+
loadFile(@filename)
|
1700
|
+
end
|
1701
|
+
end
|
1702
|
+
@timer = getApp().addTimeout(1000, self, ID_FILETIME)
|
1703
|
+
return 1
|
1704
|
+
end
|
1705
|
+
|
1706
|
+
|
1707
|
+
# Set scroll wheel lines
|
1708
|
+
def onCmdWheelAdjust(sender, sel, ptr)
|
1709
|
+
getApp().wheelLines = sender.value # sender is an FXSpinner
|
1710
|
+
return 1;
|
1711
|
+
end
|
1712
|
+
|
1713
|
+
|
1714
|
+
# Update wheel adjustment time
|
1715
|
+
def onUpdWheelAdjust(sender, sel, ptr)
|
1716
|
+
sender.handle(self, MKUINT(ID_SETINTVALUE, SEL_COMMAND), getApp().wheelLines)
|
1717
|
+
return 1
|
1718
|
+
end
|
1719
|
+
|
1720
|
+
|
1721
|
+
# Start the ball rolling
|
1722
|
+
def start(args)
|
1723
|
+
if args.length > 0
|
1724
|
+
loadFile(File.expand_path(args[1]))
|
1725
|
+
end
|
1726
|
+
end
|
1727
|
+
|
1728
|
+
|
1729
|
+
# Create and show window
|
1730
|
+
def create
|
1731
|
+
@urilistType = getApp().registerDragType(FXWindow.urilistTypeName) unless @urilistType
|
1732
|
+
readRegistry
|
1733
|
+
super
|
1734
|
+
show
|
1735
|
+
@timer = getApp().addTimeout(1000, self, ID_FILETIME)
|
1736
|
+
end
|
1737
|
+
end
|
1738
|
+
|
1739
|
+
|
1740
|
+
# Start the whole thing
|
1741
|
+
if __FILE__ == $0
|
1742
|
+
# Make application
|
1743
|
+
application = FXApp.new("TextEdit", "FoxTest")
|
1744
|
+
application.threadsEnabled = false
|
1745
|
+
|
1746
|
+
# Open display
|
1747
|
+
application.init(ARGV)
|
1748
|
+
|
1749
|
+
# Make window
|
1750
|
+
window = TextWindow.new(application)
|
1751
|
+
|
1752
|
+
# Handle interrupt to save stuff nicely
|
1753
|
+
application.addSignal("SIGINT", window, TextWindow::ID_QUIT)
|
1754
|
+
|
1755
|
+
# Create it
|
1756
|
+
application.create
|
1757
|
+
|
1758
|
+
# Start
|
1759
|
+
window.start(ARGV)
|
1760
|
+
|
1761
|
+
# Run
|
1762
|
+
application.run
|
1763
|
+
end
|