rhodes 3.3.3.beta.4 → 3.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +7 -5
- data/CREDITS +2215 -0
- data/Rakefile +225 -59
- data/bin/c2dm.rb +0 -0
- data/bin/get-rhodes-info.bat +0 -0
- data/bin/migrate-rhodes-app +0 -0
- data/bin/migrate-rhodes-app.bat +0 -0
- data/bin/rhodes +0 -0
- data/bin/rhodes-setup +0 -0
- data/bin/rhodes-setup.bat +0 -0
- data/bin/rhogen +0 -0
- data/bin/rhogen.bat +0 -0
- data/bin/set-rhodes-sdk +0 -0
- data/bin/set-rhodes-sdk.bat +0 -0
- data/bin/upgrade-rhodes-app +0 -0
- data/bin/upgrade-rhodes-app.bat +0 -0
- data/doc/build.txt +20 -9
- data/doc/configuration.txt +8 -8
- data/doc/connect-to-web-services.txt +1 -1
- data/doc/device-caps.txt +63 -26
- data/doc/extensions.txt +14 -2
- data/doc/install.txt +28 -19
- data/doc/introduction.txt +6 -3
- data/doc/jqt-jqm-transition.txt +10 -9
- data/doc/release.txt +5 -1
- data/doc/rhodes-command-line.txt +130 -0
- data/doc/rhom.txt +16 -11
- data/doc/rhostudio-eclipse.txt +3 -3
- data/doc/simulator.txt +28 -31
- data/doc/syncengine-ajax-api.txt +246 -0
- data/doc/synchronization.txt +21 -3
- data/doc/test-log-debug.txt +3 -1
- data/doc/ui.txt +16 -16
- data/ext/extconf.rb +8 -0
- data/lib/build/jake.rb +5 -5
- data/lib/extensions/barcode/ext/barcode/platform/android/Rakefile +9 -9
- data/lib/extensions/barcode/ext/barcode/platform/android/jni/src/barcode.cpp +81 -1
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/CaptureActivityHandler.java +6 -13
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/android/DecodeHandler.java +2 -6
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/rhomobile/barcode/Barcode.java +12 -1
- data/lib/extensions/barcode/ext/barcode/platform/bb/run.bat +0 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeCallbackHelper.h +2 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeCallbackHelper.mm +36 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeViewController.h +0 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeViewController.m +15 -5
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/barcode.m +64 -1
- data/lib/extensions/barcode/ext/barcode/shared/ruby/barcode.i +35 -1
- data/lib/extensions/barcode/ext/barcode/shared/ruby/barcode_wrap.c +126 -2
- data/lib/extensions/barcode/ext/barcode/shared/src/zbar.c +18 -1
- data/lib/extensions/barcode/ext/build +0 -0
- data/lib/extensions/barcode/ext/build.bat +0 -0
- data/lib/extensions/digest-md5/ext/Rakefile +12 -10
- data/lib/extensions/digest-md5/ext/build +0 -0
- data/lib/extensions/digest-md5/ext/build.bat +0 -0
- data/lib/extensions/digest-md5/ext/digest-md5.sln +2 -2
- data/lib/extensions/digest-md5/ext/digest-md5.vcproj +41 -28
- data/lib/extensions/digest-sha1/ext/Rakefile +11 -10
- data/lib/extensions/digest-sha1/ext/build +0 -0
- data/lib/extensions/digest-sha1/ext/build.bat +0 -0
- data/lib/extensions/digest-sha1/ext/digest-sha1.sln +2 -2
- data/lib/extensions/digest-sha1/ext/digest-sha1.vcproj +41 -28
- data/lib/extensions/digest/ext/Rakefile +12 -11
- data/lib/extensions/digest/ext/build +0 -0
- data/lib/extensions/digest/ext/build.bat +0 -0
- data/lib/extensions/digest/ext/digest.sln +44 -0
- data/lib/extensions/digest/ext/digest.vcproj +40 -27
- data/lib/extensions/esri/ext/build +0 -0
- data/lib/extensions/esri/ext/build.bat +0 -0
- data/lib/extensions/fcntl/ext/Rakefile +10 -9
- data/lib/extensions/fcntl/ext/build +0 -0
- data/lib/extensions/fcntl/ext/build.bat +0 -0
- data/lib/extensions/fcntl/ext/fcntl.vcproj +1 -1
- data/lib/extensions/nfc/ext/build +0 -0
- data/lib/extensions/nfc/ext/build.bat +0 -0
- data/lib/extensions/nfc/ext/nfc/platform/android/Rakefile +11 -11
- data/lib/extensions/nfc/ext/nfc/platform/android/jni/src/nfc.cpp +0 -0
- data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/Nfc.java +12 -10
- data/lib/extensions/nfc/ext/nfc/shared/ruby/nfc_wrap.c +16 -9
- data/lib/extensions/pdf-writer/color.rb +145 -0
- data/lib/extensions/pdf-writer/color/cmyk.rb +279 -0
- data/lib/extensions/pdf-writer/color/css.rb +28 -0
- data/lib/extensions/pdf-writer/color/grayscale.rb +212 -0
- data/lib/extensions/pdf-writer/color/hsl.rb +221 -0
- data/lib/extensions/pdf-writer/color/palette.rb +16 -0
- data/lib/extensions/pdf-writer/color/palette/adobecolor.rb +272 -0
- data/lib/extensions/pdf-writer/color/palette/gimp.rb +116 -0
- data/lib/extensions/pdf-writer/color/palette/monocontrast.rb +180 -0
- data/lib/extensions/pdf-writer/color/rgb-colors.rb +355 -0
- data/lib/extensions/pdf-writer/color/rgb.rb +453 -0
- data/lib/extensions/pdf-writer/color/rgb/metallic.rb +43 -0
- data/lib/extensions/pdf-writer/color/yiq.rb +84 -0
- data/lib/extensions/pdf-writer/ext/LICENSES/color/Licence.txt +27 -0
- data/lib/extensions/pdf-writer/ext/LICENSES/color/README.txt +32 -0
- data/lib/extensions/pdf-writer/ext/LICENSES/pdf-writer/LICENCE +131 -0
- data/lib/extensions/pdf-writer/ext/LICENSES/pdf-writer/README +33 -0
- data/lib/extensions/pdf-writer/ext/LICENSES/transaction-simple/Licence.txt +25 -0
- data/lib/extensions/pdf-writer/ext/LICENSES/transaction-simple/Readme.txt +204 -0
- data/lib/extensions/pdf-writer/pdf/charts.rb +13 -0
- data/lib/extensions/pdf-writer/pdf/charts/stddev.rb +430 -0
- data/lib/extensions/pdf-writer/pdf/math.rb +108 -0
- data/lib/extensions/pdf-writer/pdf/quickref.rb +332 -0
- data/lib/extensions/pdf-writer/pdf/simpletable.rb +947 -0
- data/lib/extensions/pdf-writer/pdf/techbook.rb +901 -0
- data/lib/extensions/pdf-writer/pdf/writer.rb +2729 -0
- data/lib/extensions/pdf-writer/pdf/writer/arc4.rb +63 -0
- data/lib/extensions/pdf-writer/pdf/writer/fontmetrics.rb +203 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Courier-Bold.afm +342 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Courier-BoldOblique.afm +342 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Courier-Oblique.afm +342 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Courier.afm +342 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Helvetica-Bold.afm +2827 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Helvetica-BoldOblique.afm +2827 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Helvetica-Oblique.afm +3051 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Helvetica.afm +3051 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/MustRead.html +19 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Symbol.afm +213 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Times-Bold.afm +2588 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Times-BoldItalic.afm +2384 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Times-Italic.afm +2667 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/Times-Roman.afm +2419 -0
- data/lib/extensions/pdf-writer/pdf/writer/fonts/ZapfDingbats.afm +225 -0
- data/lib/extensions/pdf-writer/pdf/writer/graphics.rb +813 -0
- data/lib/extensions/pdf-writer/pdf/writer/graphics/imageinfo.rb +365 -0
- data/lib/extensions/pdf-writer/pdf/writer/lang.rb +43 -0
- data/lib/extensions/pdf-writer/pdf/writer/lang/en.rb +99 -0
- data/lib/extensions/pdf-writer/pdf/writer/object.rb +23 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/action.rb +35 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/annotation.rb +42 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/catalog.rb +39 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/contents.rb +65 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/destination.rb +40 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/encryption.rb +53 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/font.rb +72 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/fontdescriptor.rb +34 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/fontencoding.rb +40 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/image.rb +304 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/info.rb +51 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/outline.rb +30 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/outlines.rb +30 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/page.rb +195 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/pages.rb +115 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/procset.rb +46 -0
- data/lib/extensions/pdf-writer/pdf/writer/object/viewerpreferences.rb +74 -0
- data/lib/extensions/pdf-writer/pdf/writer/ohash.rb +58 -0
- data/lib/extensions/pdf-writer/pdf/writer/oreader.rb +25 -0
- data/lib/extensions/pdf-writer/pdf/writer/state.rb +48 -0
- data/lib/extensions/pdf-writer/pdf/writer/strokestyle.rb +138 -0
- data/lib/extensions/pdf-writer/transaction/simple.rb +486 -0
- data/lib/extensions/pdf-writer/transaction/simple/group.rb +146 -0
- data/lib/extensions/pdf-writer/transaction/simple/threadsafe.rb +68 -0
- data/lib/extensions/pdf-writer/transaction/simple/threadsafe/group.rb +36 -0
- data/lib/framework/builtinME.rb +0 -0
- data/lib/framework/dateOrig.rb +8 -2
- data/lib/framework/rational.rb +0 -0
- data/lib/framework/res/esri.wm.png +0 -0
- data/lib/framework/rho/rho.rb +6 -0
- data/lib/framework/rho/rhobluetooth.rb +0 -0
- data/lib/framework/rho/rhofsconnector.rb +0 -0
- data/lib/framework/rho/rhonativeviewmanager.rb +0 -0
- data/lib/framework/rhofsconnector.rb +0 -0
- data/lib/framework/rhom/rhom_object_factory.rb +8 -0
- data/lib/framework/rhomotoapi.rb +3 -2
- data/platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h +9 -1
- data/platform/android/Rhodes/jni/include/rhodes/details/rhojava.inc +1 -0
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_file_RhoFileApi.h +26 -2
- data/platform/android/Rhodes/jni/src/callbacks.cpp +0 -5
- data/platform/android/Rhodes/jni/src/camera.cpp +1 -1
- data/platform/android/Rhodes/jni/src/fileapi.cpp +39 -19
- data/platform/android/Rhodes/jni/src/geolocation.cpp +3 -3
- data/platform/android/Rhodes/jni/src/mapview.cpp +206 -64
- data/platform/android/Rhodes/jni/src/nativeview.cpp +1 -1
- data/platform/android/Rhodes/jni/src/rhodes.cpp +13 -0
- data/platform/android/Rhodes/jni/src/rhodesapp.cpp +20 -0
- data/platform/android/Rhodes/jni/src/rhodessystem.cpp +36 -3
- data/platform/android/Rhodes/jni/src/signature.cpp +22 -2
- data/platform/android/Rhodes/res/drawable/alert_info.png +0 -0
- data/platform/android/Rhodes/res/drawable/esri.png +0 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Capabilities.java +17 -16
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Logger.java +4 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/MemoryInfoCollector.java +67 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +139 -114
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +106 -13
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +11 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/WebView.java +71 -16
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraNewService.java +4 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraSemiService.java +4 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/AbstractRhoExtension.java +22 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/Config.java +243 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtManager.java +19 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtension.java +9 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/{RhodesActivityListener.java → extmanager/IRhoListener.java} +16 -12
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManager.java +63 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManagerImpl.java +239 -14
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhodesStartupListeners.java +9 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/WebkitExtension.java +53 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/file/RhoFileApi.java +27 -12
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocation.java +124 -62
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocationImpl.java +49 -137
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +84 -114
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SplashScreen.java +75 -82
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java +3 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/Callout.java +4 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapBitmapManager.java +124 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapView.java +232 -43
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/Request.java +193 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/nativeview/IRhoCustomView.java +13 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/nativeview/RhoNativeViewManager.java +32 -23
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/nativeview/RhoVideoView.java +74 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality.java +6 -7
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality01.java +37 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality03.java +14 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality05.java +51 -38
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality07.java +9 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality08.java +48 -31
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionalityManager.java +15 -16
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/Signature.java +52 -15
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/LocalFileHandler.java +20 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientOld.java +1 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java +77 -34
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/IRhoWebView.java +9 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebChromeClient.java +105 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebViewClient.java +1 -1
- data/platform/android/build/RhodesSRC_build.files +8 -7
- data/platform/android/build/android.rake +326 -216
- data/platform/android/build/androidcommon.rb +27 -13
- data/platform/bb/RubyVM/src/com/rho/file/SimpleFile.java +27 -1
- data/platform/bb/RubyVM/src/j2me/io/File.java +104 -38
- data/platform/bb/build/bb.rake +1 -0
- data/platform/bb/build/runRAPC.bat +0 -0
- data/platform/bb/rhodes/resources/background.png +0 -0
- data/platform/bb/rhodes/resources/esri.png +0 -0
- data/platform/bb/rhodes/resources/mappin.png +0 -0
- data/platform/bb/rhodes/src/com/rho/rubyext/System.java +5 -1
- data/platform/bb/rhodes/src/rhomobile/PushListeningThread.java +2 -2
- data/platform/bb/rhodes/src/rhomobile/mapview/ESRIMapField.java +0 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/ESRIMapProvider.java +0 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/GeoCoding.java +0 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/GoogleGeoCoding.java +0 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/MapTools.java +0 -0
- data/platform/iphone/Classes/AppManager/AppManager.m +7 -1
- data/platform/iphone/Classes/Camera/PickImageDelegate.h +9 -0
- data/platform/iphone/Classes/Camera/PickImageDelegate.m +75 -4
- data/platform/iphone/Classes/GeoLocation/LocationController.h +8 -2
- data/platform/iphone/Classes/GeoLocation/LocationController.m +74 -76
- data/platform/iphone/Classes/InitMemoryInfoCollector.h +33 -0
- data/platform/iphone/Classes/InitMemoryInfoCollector.mm +52 -0
- data/platform/iphone/Classes/NativeView/NVViewController.h +0 -0
- data/platform/iphone/Classes/NativeView/NVViewController.m +34 -2
- data/platform/iphone/Classes/Rhodes.m +22 -2
- data/platform/iphone/Classes/Signature/SignatureDelegate.m +19 -0
- data/platform/iphone/Classes/Signature/SignatureViewController.h +0 -0
- data/platform/iphone/Classes/Signature/SignatureViewController.m +0 -0
- data/platform/iphone/Classes/SimpleMainView.h +0 -0
- data/platform/iphone/Classes/SimpleMainView.m +3 -3
- data/platform/iphone/ESRI/BluePushpin.png +0 -0
- data/platform/iphone/ESRI/BluePushpin@2x.png +0 -0
- data/platform/iphone/ESRI/esri.png +0 -0
- data/platform/iphone/ESRI/esri@2x.png +0 -0
- data/platform/iphone/rbuild/iphone.rake +75 -7
- data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +13 -4
- data/platform/linux/target/compiler/rubylinux +0 -0
- data/platform/mac/target/compiler/RubyMac +0 -0
- data/platform/osx/Rhodes Launcher/rhorunner.app/rhorunner b/data/platform/osx/Rhodes → Launcher/rhorunner.app/rhorunner +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtGui.framework/Resources/qt_menu.nib/keyedobjects.nib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtNetwork.framework/Versions/4/QtNetwork +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtWebKit.framework/Versions/4/QtWebKit +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Info.plist +1 -1
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/MacOS/RhoSimulator +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/accessible/libqtaccessiblewidgets.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqcorewlanbearer.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqgenericbearer.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqcncodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqjpcodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqkrcodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqtwcodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/graphicssystems/libqtracegraphicssystem.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqgif.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqico.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqjpeg.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqmng.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqtga.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqtiff.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/qmltooling/libqmldbg_inspector.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/qmltooling/libqmldbg_tcp.dylib +0 -0
- data/platform/osx/build/osx.rake +6 -8
- data/platform/shared/RhoConnectClient/RhoConnectClient.cpp +165 -33
- data/platform/shared/RhoConnectClient/RhoConnectClient.h +10 -1
- data/platform/shared/common/BundleManager.cpp +27 -16
- data/platform/shared/common/ExtManager.h +15 -2
- data/platform/shared/common/RhoConf.cpp +17 -2
- data/platform/shared/common/RhoConf.h +3 -1
- data/platform/shared/common/RhoDefs.h +6 -6
- data/platform/shared/common/RhoFatalError.h +1 -1
- data/platform/shared/common/RhoFile.cpp +9 -9
- data/platform/shared/common/RhoFilePath.h +7 -3
- data/platform/shared/common/RhoPort.h +3 -3
- data/platform/shared/common/RhoSystem.h +1 -1
- data/platform/shared/common/RhodesApp.cpp +426 -26
- data/platform/shared/common/RhodesApp.h +11 -3
- data/platform/shared/common/RhodesAppBase.cpp +4 -1
- data/platform/shared/common/StringConverter.h +3 -3
- data/platform/shared/common/app_build_capabilities.h +8 -0
- data/platform/shared/common/map/BaseMapEngine.cpp +302 -21
- data/platform/shared/common/map/BaseMapEngine.h +132 -6
- data/platform/shared/common/map/ESRIMapEngine.cpp +2 -1
- data/platform/shared/common/map/GeocodingMapEngine.cpp +22 -4
- data/platform/shared/common/map/GeocodingMapEngine.h +40 -0
- data/platform/shared/common/map/GoogleMapEngine.cpp +13 -1
- data/platform/shared/common/map/MapEngine.h +7 -0
- data/platform/shared/common/map/OSMMapEngine.cpp +12 -1
- data/platform/shared/json/JSONIterator.cpp +1 -1
- data/platform/shared/json/RJSONTokener.c +2 -0
- data/platform/shared/json/config.h +3 -3
- data/platform/shared/logging/RhoLog.cpp +12 -3
- data/platform/shared/logging/RhoLog.h +2 -1
- data/platform/shared/logging/RhoLogConf.cpp +147 -11
- data/platform/shared/logging/RhoLogConf.h +39 -1
- data/platform/shared/logging/RhoLogSink.cpp +1 -1
- data/platform/shared/net/HttpServer.cpp +8 -4
- data/platform/shared/net/INetRequest.cpp +7 -0
- data/platform/shared/net/INetRequest.h +2 -0
- data/platform/shared/net/RawSocket.cpp +1 -1
- data/platform/shared/qt/pbxproj2pro.pl +0 -0
- data/platform/shared/qt/pro_vcproj_diff.pl +0 -0
- data/platform/shared/qt/rhodes/QtMainWindow.cpp +1 -1
- data/platform/shared/qt/rhodes/impl/RhoClassFactoryImpl.h +2 -2
- data/platform/shared/qt/rhodes/impl/RhoThreadImpl.cpp +2 -2
- data/platform/shared/qt/rhodes/impl/SystemImpl.cpp +11 -1
- data/platform/shared/qt/rhodes/main.cpp +5 -5
- data/platform/shared/ruby/ext/alert/alert_wrap.c +8 -8
- data/platform/shared/ruby/ext/bluetooth/bluetooth.i +0 -0
- data/platform/shared/ruby/ext/bluetooth/bluetooth_wrap.c +16 -9
- data/platform/shared/ruby/ext/camera/camera.i +2 -2
- data/platform/shared/ruby/ext/camera/camera_wrap.c +18 -3
- data/platform/shared/ruby/ext/datetimepicker/datetimepicker_wrap.c +37 -8
- data/platform/shared/ruby/ext/geolocation/geolocation_wrap.c +8 -8
- data/platform/shared/ruby/ext/mapview/mapview_wrap.c +16 -9
- data/platform/shared/ruby/ext/nativebar/nativebar_wrap.c +16 -9
- data/platform/shared/ruby/ext/nativeviewmanager/nativeviewmanager.i +0 -0
- data/platform/shared/ruby/ext/nativeviewmanager/nativeviewmanager_wrap.c +16 -9
- data/platform/shared/ruby/ext/phonebook/phonebook_wrap.c +8 -1
- data/platform/shared/ruby/ext/rho/rhoruby.c +7 -1
- data/platform/shared/ruby/ext/rho/rhoruby.h +1 -0
- data/platform/shared/ruby/ext/rhoconf/rhoconf_wrap.c +16 -9
- data/platform/shared/ruby/ext/signature/signature.i +0 -0
- data/platform/shared/ruby/ext/signature/signature_wrap.c +9 -9
- data/platform/shared/ruby/ext/syncengine/syncengine_wrap.c +16 -9
- data/platform/shared/ruby/ext/system/system_wrap.c +16 -9
- data/platform/shared/ruby/ext/webview/webview_wrap.c +16 -9
- data/platform/shared/ruby/gc.c +1 -0
- data/platform/shared/ruby/regint.h +6 -4
- data/platform/shared/ruby/vm.c +1 -0
- data/platform/shared/ruby/wince/wince.h +1 -1
- data/platform/shared/rubyext/System.cpp +1 -1
- data/platform/shared/shttpd/src/rdispatcher.c +3 -3
- data/platform/shared/shttpd/src/std_includes.h +1 -1
- data/platform/shared/sqlite/sqlite3.c +1 -0
- data/platform/shared/statistic/test/TestProfiling.cpp +1 -1
- data/platform/shared/stlport/build/lib/configure +0 -0
- data/platform/shared/stlport/build/lib/configure.bat +0 -0
- data/platform/shared/sync/SyncEngine.cpp +9 -12
- data/platform/shared/sync/SyncNotify.cpp +36 -3
- data/platform/shared/sync/SyncNotify.h +11 -4
- data/platform/shared/sync/SyncSource.cpp +32 -16
- data/platform/shared/sync/SyncSource.h +2 -3
- data/platform/shared/sync/SyncThread.cpp +13 -4
- data/platform/shared/sync/SyncThread.h +4 -0
- data/platform/shared/tcmalloc/page_heap.h +1 -1
- data/platform/shared/tcmalloc/rhomem.h +1 -1
- data/platform/shared/tcmalloc/windows/port.cpp +12 -3
- data/platform/shared/test/Tests.cpp +4 -4
- data/platform/shared/test/test_helper.cpp +4 -4
- data/platform/symbian/sqlite3/src/sqlite3.h +1 -1
- data/platform/win32/RhoSimulator/Microsoft.VC90.CRT.manifest +6 -0
- data/platform/win32/RhoSimulator/Microsoft.VC90.OpenMP.manifest +6 -0
- data/platform/win32/RhoSimulator/QtCore4.dll +0 -0
- data/platform/win32/RhoSimulator/QtGui4.dll +0 -0
- data/platform/win32/RhoSimulator/QtNetwork4.dll +0 -0
- data/platform/win32/RhoSimulator/QtWebKit4.dll +0 -0
- data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
- data/platform/win32/RhoSimulator/imageformats/qgif4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qico4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qjpeg4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qmng4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qsvg4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qtiff4.dll +0 -0
- data/platform/win32/RhoSimulator/libeay32.dll +0 -0
- data/platform/win32/RhoSimulator/msvcm90.dll +0 -0
- data/platform/win32/RhoSimulator/msvcp90.dll +0 -0
- data/platform/win32/RhoSimulator/msvcr90.dll +0 -0
- data/platform/win32/RhoSimulator/phonon4.dll +0 -0
- data/platform/win32/RhoSimulator/ssleay32.dll +0 -0
- data/platform/win32/RhoSimulator/vcomp90.dll +0 -0
- data/platform/win32/target/replaceicon/replaceicon.exe +0 -0
- data/platform/win32/target/updateresstring/updateresstring.exe +0 -0
- data/platform/wm/RhoLib/RhoLib.vcproj +394 -69
- data/platform/wm/build/build_inf.js +83 -23
- data/platform/wm/build/wm.rake +127 -81
- data/platform/wm/rhodes.sln +6 -6
- data/platform/wm/rhodes/DateTimePicker.h +2 -2
- data/platform/wm/rhodes/IBrowserEngine.h +3 -0
- data/platform/wm/rhodes/IEBrowserEngine.cpp +34 -2
- data/platform/wm/rhodes/IEBrowserEngine.h +4 -1
- data/platform/wm/rhodes/LicenseStub.cpp +73 -0
- data/platform/{android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientNew.java → wm/rhodes/LogMemory.cpp} +32 -20
- data/platform/{android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettings.java → wm/rhodes/LogMemory.h} +11 -8
- data/platform/wm/rhodes/LogOptionsDlg.h +1 -1
- data/platform/wm/rhodes/LogView.cpp +10 -10
- data/platform/wm/rhodes/LogView.h +10 -10
- data/platform/wm/rhodes/MainWindow.cpp +431 -173
- data/platform/wm/rhodes/MainWindow.h +37 -19
- data/platform/wm/rhodes/MapView/MapViewManager.h +1 -1
- data/platform/wm/rhodes/OkCancelModalDialog.h +1 -1
- data/platform/wm/rhodes/Rhodes.cpp +210 -47
- data/platform/wm/rhodes/Rhodes.rc +38 -0
- data/platform/wm/rhodes/bluetooth/Bluetooth.cpp +2 -2
- data/platform/wm/rhodes/bluetooth/Bluetooth.h +3 -3
- data/platform/wm/rhodes/camera/Camera.cpp +2 -1
- data/platform/wm/rhodes/camera/Camera.h +1 -1
- data/platform/wm/rhodes/resource.h +1 -1
- data/platform/wm/rhodes/rho/common/ExtManager.cpp +93 -5
- data/platform/wm/rhodes/rho/net/NetRequestImpl.cpp +2 -2
- data/platform/wm/rhodes/rho/rubyext/NativeToolbar.cpp +2 -2
- data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +13 -7
- data/platform/wm/rhodes/rhodes.vcproj +1409 -1008
- data/platform/wm/rhodes/simulator/MainWindowQt.h +1 -1
- data/platform/wm/rhodes/stdafx.h +2 -2
- data/platform/wm/rhoelements.sln +7 -9
- data/platform/wm/rubylib/rubylib.vcproj +62 -1
- data/platform/wm/sqlite3/sqlite3.vcproj +62 -1
- data/platform/wm/syncengine/syncengine.vcproj +62 -1
- data/platform/wm/tcmalloc/tcmalloc.vcproj +72 -53
- data/platform/wm/tools/detool/detool.cpp +1435 -1357
- data/platform/wp7/RhoRubyExtGen/GenerateInitializers.cmd +0 -0
- data/platform/wp7/RhoRubyLib/common/RhoLicense.cs +105 -0
- data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +23 -5
- data/platform/wp7/RhoRubyLib/sync/SyncNotify.cs +5 -0
- data/platform/wp7/RhoRubyLib/views/RhoView.xaml.cs +22 -3
- data/platform/wp7/build/wp.rake +1 -0
- data/platform/wp7/rhodes/MainPage.xaml.cs +11 -0
- data/rakefile.rb +225 -59
- data/res/build-tools/7za.exe +0 -0
- data/res/build-tools/RhoAppRunner.exe +0 -0
- data/res/build-tools/RhoLogServer.exe +0 -0
- data/res/build-tools/RhoRuby.exe +0 -0
- data/res/build-tools/RubyMac +0 -0
- data/res/build-tools/detool.exe +0 -0
- data/res/build-tools/iphonesim/Source/iPhoneSimulator.m +1 -1
- data/res/build-tools/iphonesim/build/Release/iphonesim +0 -0
- data/res/build-tools/iphonesim/build/Release/iphonesim_43 +0 -0
- data/res/build-tools/license_rc.dll +0 -0
- data/res/build-tools/make.exe +0 -0
- data/res/build-tools/rubylinux +0 -0
- data/res/build-tools/swig_patch/Lib/typemaps/fragments.swg +235 -0
- data/res/build-tools/wmdc_connect.exe +0 -0
- data/res/build-tools/wp7explorer.exe +0 -0
- data/res/generators/rhogen.rb +2 -2
- data/res/generators/templates/application/app/Settings/controller.rb +1 -1
- data/res/generators/templates/application/app/layout.erb +1 -1
- data/res/generators/templates/application/app/loading.png +0 -0
- data/res/generators/templates/application/public/css/re_webkit.css +736 -0
- data/res/generators/templates/application/public/css/windows_mobile.css +0 -0
- data/res/generators/templates/application/public/images/listArrow.png +0 -0
- data/res/generators/templates/application/public/jqmobile/images/ajax-loader.png +0 -0
- data/res/generators/templates/application/public/jqmobile/images/icons-18-black.png +0 -0
- data/res/generators/templates/application/public/jqmobile/images/icons-18-white.png +0 -0
- data/res/generators/templates/application/public/jqmobile/images/icons-36-black.png +0 -0
- data/res/generators/templates/application/public/jqmobile/images/icons-36-white.png +0 -0
- data/res/generators/templates/application/public/js/syncengine.js +409 -52
- data/res/generators/templates/extension/extensions/montana/ext/build +0 -0
- data/res/generators/templates/extension/extensions/montana/ext/build.bat +0 -0
- data/res/generators/templates/extension/extensions/montana/ext/montana/platform/android/Rakefile +10 -10
- data/res/generators/templates/spec/app/SpecRunner/controller.rb +2 -0
- data/res/libs/motorolalicence/android/MotorolaLicence.h +13 -0
- data/res/libs/motorolalicence/android/libMotorolaLicence.a +0 -0
- data/res/libs/motorolalicence/iphone/MotorolaLicence.h +13 -0
- data/res/libs/motorolalicence/iphone/libMotorolaLicence.a +0 -0
- data/rhodes.gemspec +1 -1
- data/spec/framework_spec/app/SpecRunner/controller.rb +2 -0
- data/spec/phone_spec/app/SpecRunner/controller.rb +2 -0
- data/version +1 -1
- metadata +487 -412
- data/Manifest.txt +0 -7960
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivityStartupListeners.java +0 -12
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsNew.java +0 -52
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsOld.java +0 -62
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/phonon.framework/Versions/4/phonon +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/phonon_backend/libphonon_qt7.dylib +0 -0
- data/platform/win32/RhoSimulator/Microsoft.VC80.CRT.manifest +0 -8
- data/platform/win32/RhoSimulator/Microsoft.VC80.OpenMP.manifest +0 -7
- data/platform/win32/RhoSimulator/msvcm80.dll +0 -0
- data/platform/win32/RhoSimulator/msvcp80.dll +0 -0
- data/platform/win32/RhoSimulator/msvcr80.dll +0 -0
- data/platform/win32/RhoSimulator/vcomp.dll +0 -0
- data/rhomobile-debug-1.0.6.gem +0 -0
@@ -0,0 +1,115 @@
|
|
1
|
+
#--
|
2
|
+
# PDF::Writer for Ruby.
|
3
|
+
# http://rubyforge.org/projects/ruby-pdf/
|
4
|
+
# Copyright 2003 - 2005 Austin Ziegler.
|
5
|
+
#
|
6
|
+
# Licensed under a MIT-style licence. See LICENCE in the main distribution
|
7
|
+
# for full licensing information.
|
8
|
+
#
|
9
|
+
# $Id: pages.rb 50 2005-05-16 03:59:21Z austin $
|
10
|
+
#++
|
11
|
+
# object which is a parent to the pages in the document
|
12
|
+
class PDF::Writer::Object::Pages < PDF::Writer::Object
|
13
|
+
def initialize(parent)
|
14
|
+
super(parent)
|
15
|
+
|
16
|
+
@parent.catalog.pages = self
|
17
|
+
|
18
|
+
@pages = []
|
19
|
+
@procset = nil
|
20
|
+
@media_box = nil
|
21
|
+
@fonts = []
|
22
|
+
@xObjects = []
|
23
|
+
@bleed_box = nil
|
24
|
+
@trim_box = nil
|
25
|
+
end
|
26
|
+
|
27
|
+
def size
|
28
|
+
@pages.size
|
29
|
+
end
|
30
|
+
|
31
|
+
def first_page
|
32
|
+
@pages[0]
|
33
|
+
end
|
34
|
+
|
35
|
+
# Add the page ID to the end of the page list.
|
36
|
+
def <<(p)
|
37
|
+
if p.kind_of?(PDF::Writer::Object::Page)
|
38
|
+
@pages << p
|
39
|
+
elsif p.kind_of?(PDF::Writer::Object::Font)
|
40
|
+
@fonts << p
|
41
|
+
elsif p.kind_of?(PDF::Writer::External)
|
42
|
+
@xObjects << p
|
43
|
+
else
|
44
|
+
raise ArgumentError, PDF::Message[:req_FPXO]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# Add a page to the page list. If p is just a Page, then it will be
|
49
|
+
# added to the page list. Otherwise, it will be treated as a Hash with
|
50
|
+
# keys :page, :pos, and :rpage. :page is the Page to be added to the
|
51
|
+
# list; :pos is :before or :after; :rpage is the Page to which the
|
52
|
+
# new Page will be added relative to.
|
53
|
+
def add(p)
|
54
|
+
if p.kind_of?(PDF::Writer::Object::Page)
|
55
|
+
@pages << p
|
56
|
+
elsif p.kind_of?(PDF::Writer::FontMetrics)
|
57
|
+
@fonts << p
|
58
|
+
elsif p.kind_of?(PDF::Writer::External)
|
59
|
+
@xObjects << p
|
60
|
+
elsif p.kind_of?(Hash)
|
61
|
+
# Find a match.
|
62
|
+
i = @pages.index(p[:rpage])
|
63
|
+
unless i.nil?
|
64
|
+
# There is a match; insert the page.
|
65
|
+
case p[:pos]
|
66
|
+
when :before
|
67
|
+
@pages[i, 0] = p[:page]
|
68
|
+
when :after
|
69
|
+
@pages[i + 1, 0] = p[:page]
|
70
|
+
else
|
71
|
+
raise ArgumentError, PDF::Message[:invalid_pos]
|
72
|
+
end
|
73
|
+
end
|
74
|
+
else
|
75
|
+
raise ArgumentError, PDF::Message[:req_FPXOH]
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
attr_accessor :procset
|
80
|
+
# Each of the following should be an array of 4 numbers, the x and y
|
81
|
+
# coordinates of the lower left and upper right bounds of the box.
|
82
|
+
attr_accessor :media_box
|
83
|
+
attr_accessor :bleed_box
|
84
|
+
attr_accessor :trim_box
|
85
|
+
|
86
|
+
def to_s
|
87
|
+
unless @pages.empty?
|
88
|
+
res = "\n#{@oid} 0 obj\n<< /Type /Pages\n/Kids ["
|
89
|
+
@pages.uniq! # uniqify the data...
|
90
|
+
@pages.each { |p| res << "#{p.oid} 0 R\n" }
|
91
|
+
res << "]\n/Count #{@pages.size}"
|
92
|
+
unless @fonts.empty? and @procset.nil?
|
93
|
+
res << "\n/Resources <<"
|
94
|
+
res << "\n/ProcSet #{@procset.oid} 0 R" unless @procset.nil?
|
95
|
+
unless @fonts.empty?
|
96
|
+
res << "\n/Font << "
|
97
|
+
@fonts.each { |f| res << "\n/F#{f.font_id} #{f.oid} 0 R" }
|
98
|
+
res << " >>"
|
99
|
+
end
|
100
|
+
unless @xObjects.empty?
|
101
|
+
res << "\n/XObject << "
|
102
|
+
@xObjects.each { |x| res << "\n/#{x.label} #{x.oid} 0 R" }
|
103
|
+
res << " >>"
|
104
|
+
end
|
105
|
+
res << "\n>>"
|
106
|
+
res << "\n/MediaBox [#{@media_box.join(' ')}]" unless @media_box.nil? or @media_box.empty?
|
107
|
+
res << "\n/BleedBox [#{@bleed_box.join(' ')}]" unless @bleed_box.nil? or @bleed_box.empty?
|
108
|
+
res << "\n/TrimBox [#{@trim_box.join(' ')}]" unless @trim_box.nil? or @trim_box.empty?
|
109
|
+
end
|
110
|
+
res << "\n >>\nendobj"
|
111
|
+
else
|
112
|
+
"\n#{@oid} 0 obj\n<< /Type /Pages\n/Count 0\n>>\nendobj"
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#--
|
2
|
+
# PDF::Writer for Ruby.
|
3
|
+
# http://rubyforge.org/projects/ruby-pdf/
|
4
|
+
# Copyright 2003 - 2005 Austin Ziegler.
|
5
|
+
#
|
6
|
+
# Licensed under a MIT-style licence. See LICENCE in the main distribution
|
7
|
+
# for full licensing information.
|
8
|
+
#
|
9
|
+
# $Id: procset.rb 50 2005-05-16 03:59:21Z austin $
|
10
|
+
#++
|
11
|
+
# The document Procedure Set. Not necessary in PDF 1.4 or later, but
|
12
|
+
# producing applications are recommended to provide the /ProcSet /Resource
|
13
|
+
# in any case for older viewers. Viewing applications are *not*
|
14
|
+
# recommended to rely on this information being correct.
|
15
|
+
#
|
16
|
+
# These procedure sets are used only when the content stream is printed to
|
17
|
+
# a PostScript output device; the names identify PostScript procedure sets
|
18
|
+
# that must be sent to the device to interpret the PDF operators in the
|
19
|
+
# content stream. Each element of this array must be one of the following
|
20
|
+
# predefined names: 'PDF', 'Text', 'ImageB', 'ImageC', and 'ImageI'. See
|
21
|
+
# also Appendix H note 102.
|
22
|
+
class PDF::Writer::Object::Procset < PDF::Writer::Object
|
23
|
+
def initialize(parent)
|
24
|
+
super
|
25
|
+
|
26
|
+
@info = ["PDF", "Text"]
|
27
|
+
@parent.pages.procset = self
|
28
|
+
@parent.procset = self
|
29
|
+
end
|
30
|
+
|
31
|
+
# This is to add new items to the procset list, despite the fact that
|
32
|
+
# this is considered obselete, the items are required for printing to
|
33
|
+
# some PostsCript printers.
|
34
|
+
#
|
35
|
+
# +p+ may be 'ImageB', 'ImageC', or 'ImageI'.
|
36
|
+
def <<(p)
|
37
|
+
@info << p
|
38
|
+
end
|
39
|
+
|
40
|
+
def to_s
|
41
|
+
info = @info.uniq
|
42
|
+
res = "\n#{@oid} 0 obj\n["
|
43
|
+
@info.each { |k| res << "/#{k} " }
|
44
|
+
res << "]\nendobj"
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
#--
|
2
|
+
# PDF::Writer for Ruby.
|
3
|
+
# http://rubyforge.org/projects/ruby-pdf/
|
4
|
+
# Copyright 2003 - 2005 Austin Ziegler.
|
5
|
+
#
|
6
|
+
# Licensed under a MIT-style licence. See LICENCE in the main distribution
|
7
|
+
# for full licensing information.
|
8
|
+
#
|
9
|
+
# $Id: viewerpreferences.rb 50 2005-05-16 03:59:21Z austin $
|
10
|
+
#++
|
11
|
+
# Set the viewer preferences.
|
12
|
+
#
|
13
|
+
# HideToolbar:: boolean (Optional) A flag specifying whether to hide the
|
14
|
+
# viewer application? tool bars when the document is
|
15
|
+
# active. Default value: false.
|
16
|
+
# HideMenubar:: boolean (Optional) A flag specifying whether to hide the
|
17
|
+
# viewer application? menu bar when the document is
|
18
|
+
# active. Default value: false.
|
19
|
+
# HideWindowUI:: boolean (Optional) A flag specifying whether to hide
|
20
|
+
# user interface elements in the document? window (such as
|
21
|
+
# scroll bars and navigation controls), leaving only the
|
22
|
+
# document? contents displayed. Default value: false.
|
23
|
+
# FitWindow:: boolean (Optional) A flag specifying whether to resize
|
24
|
+
# the document? window to fit the size of the first
|
25
|
+
# displayed page. Default value: false.
|
26
|
+
# CenterWindow:: boolean (Optional) A flag specifying whether to position
|
27
|
+
# the document? window in the center of the screen.
|
28
|
+
# Default value: false.
|
29
|
+
# NonFullScreenPageMode:: name (Optional) The document? page mode,
|
30
|
+
# specifying how to display the document on
|
31
|
+
# exiting full-screen mode. This entry is
|
32
|
+
# meaningful only if the value of the PageMode
|
33
|
+
# entry in the catalog dictionary is FullScreen;
|
34
|
+
# it is ignored otherwise. Default value: UseNone.
|
35
|
+
# Direction:: name (Optional; PDF 1.3) The predominant reading
|
36
|
+
# order for text: L2R Left to right R2L Right to
|
37
|
+
# left (including vertical writing systems such as
|
38
|
+
# Chinese, Japanese, and Korean) This entry has no
|
39
|
+
# direct effect on the document? contents or page
|
40
|
+
# numbering, but can be used to determine the
|
41
|
+
# relative positioning of pages when displayed
|
42
|
+
# side by side or printed n-up. Default value:
|
43
|
+
# L2R.
|
44
|
+
#
|
45
|
+
# NonFullScreenPageMode Names
|
46
|
+
# UseNone:: Neither document outline nor thumbnail images visible
|
47
|
+
# UseOutlines:: Document outline visible
|
48
|
+
# UseThumbs:: Thumbnail images visible
|
49
|
+
#
|
50
|
+
# Note that boolean values are represented by the values 'true' and
|
51
|
+
# 'false'. Also note that I have not done much testing on changing these
|
52
|
+
# values and am not sure how responsive the various viewers and browsers
|
53
|
+
# are to them (and setting the direction would be fairly meaningless as
|
54
|
+
# none of these character sets are avaliable yet.
|
55
|
+
class PDF::Writer::Object::ViewerPreferences < PDF::Writer::Object
|
56
|
+
Preferences = %w{HideToolbar HideMenubar HideWindowUI FitWindow CenterWindow NonFullScreenPageMode Direction}
|
57
|
+
|
58
|
+
def initialize(parent)
|
59
|
+
super(parent)
|
60
|
+
end
|
61
|
+
|
62
|
+
Preferences.each do |s|
|
63
|
+
attr_accessor s.downcase.intern
|
64
|
+
end
|
65
|
+
|
66
|
+
def to_s
|
67
|
+
res = "\n#{@id} 0 obj\n<< "
|
68
|
+
Preferences.each do |s|
|
69
|
+
v = __send__("#{s.downcase}".intern)
|
70
|
+
res << "\n/#{s} /#{v}" unless v.nil?
|
71
|
+
end
|
72
|
+
res << "\n>>\n"
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#--
|
2
|
+
# PDF::Writer for Ruby.
|
3
|
+
# http://rubyforge.org/projects/ruby-pdf/
|
4
|
+
# Copyright 2003 - 2005 Austin Ziegler.
|
5
|
+
#
|
6
|
+
# Licensed under a MIT-style licence. See LICENCE in the main distribution
|
7
|
+
# for full licensing information.
|
8
|
+
#
|
9
|
+
# $Id: ohash.rb 50 2005-05-16 03:59:21Z austin $
|
10
|
+
#++
|
11
|
+
# Based on [ruby-talk:20551]. Updated to (hopefully) be 1.8 friendly.
|
12
|
+
class PDF::Writer::OHash < Hash
|
13
|
+
alias_method :store, :[]=
|
14
|
+
alias_method :each_pair, :each
|
15
|
+
|
16
|
+
def initialize(*args)
|
17
|
+
@keys = []
|
18
|
+
super
|
19
|
+
end
|
20
|
+
|
21
|
+
def []=(key, val)
|
22
|
+
@keys << key unless has_key?(key)
|
23
|
+
super
|
24
|
+
end
|
25
|
+
|
26
|
+
def delete(key)
|
27
|
+
@keys.delete(key) if has_key?(key)
|
28
|
+
super
|
29
|
+
end
|
30
|
+
|
31
|
+
def each
|
32
|
+
@keys.each { |k| yield k, self[k] }
|
33
|
+
end
|
34
|
+
|
35
|
+
def each_key
|
36
|
+
@keys.each { |k| yield k }
|
37
|
+
end
|
38
|
+
|
39
|
+
def each_value
|
40
|
+
@keys.each { |k| yield self[k] }
|
41
|
+
end
|
42
|
+
|
43
|
+
def first
|
44
|
+
self[@keys[0]]
|
45
|
+
end
|
46
|
+
|
47
|
+
def last
|
48
|
+
self[@keys[-1]]
|
49
|
+
end
|
50
|
+
|
51
|
+
def first?(item)
|
52
|
+
self[@keys[0]] == item
|
53
|
+
end
|
54
|
+
|
55
|
+
def last?(item)
|
56
|
+
self[@keys[-1]] == item
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#--
|
2
|
+
# PDF::Writer for Ruby.
|
3
|
+
# http://rubyforge.org/projects/ruby-pdf/
|
4
|
+
# Copyright 2003 - 2005 Austin Ziegler.
|
5
|
+
#
|
6
|
+
# Licensed under a MIT-style licence. See LICENCE in the main distribution
|
7
|
+
# for full licensing information.
|
8
|
+
#
|
9
|
+
# $Id: oreader.rb 50 2005-05-16 03:59:21Z austin $
|
10
|
+
#++
|
11
|
+
module PDF::Writer::OffsetReader
|
12
|
+
def read_o(length = 1, offset = nil)
|
13
|
+
@offset ||= 0
|
14
|
+
@offset = offset if offset
|
15
|
+
ret = self[@offset, length]
|
16
|
+
@offset += length
|
17
|
+
ret
|
18
|
+
end
|
19
|
+
def offset
|
20
|
+
@offset
|
21
|
+
end
|
22
|
+
def offset=(o)
|
23
|
+
@offset = o || 0
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
#--
|
2
|
+
# PDF::Writer for Ruby.
|
3
|
+
# http://rubyforge.org/projects/ruby-pdf/
|
4
|
+
# Copyright 2003 - 2005 Austin Ziegler.
|
5
|
+
#
|
6
|
+
# Licensed under a MIT-style licence. See LICENCE in the main distribution
|
7
|
+
# for full licensing information.
|
8
|
+
#
|
9
|
+
# $Id: state.rb 50 2005-05-16 03:59:21Z austin $
|
10
|
+
#++
|
11
|
+
class PDF::Writer
|
12
|
+
class State
|
13
|
+
attr_accessor :fill_color
|
14
|
+
attr_accessor :stroke_color
|
15
|
+
attr_accessor :text_render_style
|
16
|
+
attr_accessor :stroke_style
|
17
|
+
|
18
|
+
def initialize(vals = {})
|
19
|
+
@fill_color = vals[:fill_color]
|
20
|
+
@stroke_color = vals[:stroke_color]
|
21
|
+
@text_render_style = vals[:text_render_style]
|
22
|
+
@stroke_style = vals[:stroke_style]
|
23
|
+
|
24
|
+
yield self if block_given?
|
25
|
+
end
|
26
|
+
|
27
|
+
def blank?
|
28
|
+
@fill_color.nil? and @stroke_color.nil? and @stroke_style.nil?
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class StateStack < ::Array
|
33
|
+
alias_method :__push__, :push
|
34
|
+
# alias_method :__pop__, :pop
|
35
|
+
|
36
|
+
def push(obj)
|
37
|
+
return self if obj.nil?
|
38
|
+
raise TypeError unless obj.kind_of?(PDF::Writer::State)
|
39
|
+
return self if obj.blank?
|
40
|
+
__push__(obj)
|
41
|
+
end
|
42
|
+
|
43
|
+
# def pop
|
44
|
+
# ret = __pop__
|
45
|
+
# ret
|
46
|
+
# end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,138 @@
|
|
1
|
+
#--
|
2
|
+
# PDF::Writer for Ruby.
|
3
|
+
# http://rubyforge.org/projects/ruby-pdf/
|
4
|
+
# Copyright 2003 - 2005 Austin Ziegler.
|
5
|
+
#
|
6
|
+
# Licensed under a MIT-style licence. See LICENCE in the main distribution
|
7
|
+
# for full licensing information.
|
8
|
+
#
|
9
|
+
# $Id: strokestyle.rb 75 2005-06-02 21:20:35Z austin $
|
10
|
+
#++
|
11
|
+
# A class that represents a style with which lines will be drawn.
|
12
|
+
class PDF::Writer::StrokeStyle
|
13
|
+
LINE_CAPS = { :butt => 0, :round => 1, :square => 2 }
|
14
|
+
LINE_JOINS = { :miter => 0, :round => 1, :bevel => 2 }
|
15
|
+
SOLID_LINE = { :pattern => [], :phase => 0 }
|
16
|
+
|
17
|
+
def initialize(width = 1, options = {})
|
18
|
+
@width = width
|
19
|
+
@cap = options[:cap]
|
20
|
+
@join = options[:join]
|
21
|
+
@dash = options[:dash]
|
22
|
+
@miter_limit = options[:miter_limit]
|
23
|
+
|
24
|
+
yield self if block_given?
|
25
|
+
end
|
26
|
+
|
27
|
+
DEFAULT = self.new(1, :cap => :butt, :join => :miter, :dash => SOLID_LINE)
|
28
|
+
|
29
|
+
# The thickness of the line in PDF units.
|
30
|
+
attr_accessor :width
|
31
|
+
# The type of cap to put on the line.
|
32
|
+
#
|
33
|
+
# <tt>:butt</tt>:: The stroke is squared off at the endpoint of the
|
34
|
+
# path. There is no projection beyond the end of the
|
35
|
+
# path.
|
36
|
+
# <tt>:round</tt>:: A semicircular arc with a diameter equal to the
|
37
|
+
# line width is drawn around the endpoint and filled
|
38
|
+
# in.
|
39
|
+
# <tt>:square</tt>:: The stroke continues beyond the endpoint of the
|
40
|
+
# path for a distance equal to half the line width
|
41
|
+
# and is squared off.
|
42
|
+
# +nil+:: Keeps the current line cap.
|
43
|
+
attr_accessor :cap
|
44
|
+
def cap=(c) #:nodoc:
|
45
|
+
if c.nil? or LINE_CAPS.include?(c)
|
46
|
+
@cap = c
|
47
|
+
else
|
48
|
+
raise ArgumentError, "Line cap styles must be nil (none), butt, round, or square."
|
49
|
+
end
|
50
|
+
end
|
51
|
+
# How two lines join together.
|
52
|
+
#
|
53
|
+
# <tt>:miter</tt>:: The outer edges of the strokes for the two
|
54
|
+
# segments are extended until they meet at an angle,
|
55
|
+
# as in a picture frame. If the segments meet at too
|
56
|
+
# sharp an angle (as defined by the #miter_limit), a
|
57
|
+
# bevel join is used instead.
|
58
|
+
# <tt>:round</tt>:: An arc of a circle with a diameter equal to the
|
59
|
+
# line width is drawn around the point where the two
|
60
|
+
# segments meet, connecting the outer edges of the
|
61
|
+
# strokes for the two segments. This pie-slice
|
62
|
+
# shaped figure is filled in, producing a rounded
|
63
|
+
# corner.
|
64
|
+
# <tt>:bevel</tt>:: The two segments are finished with butt caps and
|
65
|
+
# the the resulting notch beyond the ends of the
|
66
|
+
# segments is filled with a triangle, forming a
|
67
|
+
# flattened edge on the join.
|
68
|
+
# +nil+:: Keeps the current line join.
|
69
|
+
attr_accessor :join
|
70
|
+
def join=(j) #:nodoc:
|
71
|
+
if j.nil? or LINE_JOINS.include?(j)
|
72
|
+
@join = j
|
73
|
+
else
|
74
|
+
raise ArgumentError, "Line join styles must be nil (none), miter, round, or bevel."
|
75
|
+
end
|
76
|
+
end
|
77
|
+
# When two line segments meet and <tt>:miter</tt> joins have been
|
78
|
+
# specified, the miter may extend far beyond the thickness of the line
|
79
|
+
# stroking the path. #miter_limit imposes a maximum ratio miter length
|
80
|
+
# to line width at which point the join will be converted from a miter
|
81
|
+
# to a bevel. Adobe points out that the ratio is directly related to the
|
82
|
+
# angle between the segments in user space. With [p] representing the
|
83
|
+
# angle at which the segments meet:
|
84
|
+
#
|
85
|
+
# miter_length / line_width == 1 / (sin ([p] / 2))
|
86
|
+
#
|
87
|
+
# A miter limit of 1.414 converts miters to bevels for [p] less than 90
|
88
|
+
# degrees, a limit of 2.0 converts them for [p] less than 60 degrees,
|
89
|
+
# and a limit of 10.0 converts them for [p] less than approximately 11.5
|
90
|
+
# degrees.
|
91
|
+
attr_accessor :miter_limit
|
92
|
+
# Controls the pattern of dashes and gaps used to stroke paths. This
|
93
|
+
# value must either be +nil+, or a hash with the following values:
|
94
|
+
#
|
95
|
+
# <tt>:pattern</tt>:: An array of numbers specifying the lengths (in PDF
|
96
|
+
# userspace units) of alternating dashes and gaps.
|
97
|
+
# The array is processed cyclically, so that a
|
98
|
+
# <tt>:pattern</tt> of [3] represents three units
|
99
|
+
# on, three units off, and a <tt>:pattern</tt> of
|
100
|
+
# [2, 1] represents two units on, one unit off.
|
101
|
+
#
|
102
|
+
# # - represents on, _ represents off
|
103
|
+
# ---___---___--- # pattern [3]
|
104
|
+
# --_--_--_--_--_ # pattern [2, 1]
|
105
|
+
#
|
106
|
+
# <tt>:phase</tt>:: The offset in the <tt>:pattern</tt> where the
|
107
|
+
# drawing of the stroke begins. Using a
|
108
|
+
# <tt>:phase</tt> of 1, the <tt>:pattern</tt> [3]
|
109
|
+
# will start offset by one phase, for two units on,
|
110
|
+
# three units off, three units on.
|
111
|
+
#
|
112
|
+
# --___---___---_ # pattern [3], phase 1
|
113
|
+
# -_--_--_--_--_- # pattern [2, 1], phase 1
|
114
|
+
#
|
115
|
+
# The constant SOLID_LINE may be used to restore line drawing to a solid
|
116
|
+
# line; this corresponds to an empty pattern with zero phase ([] 0).
|
117
|
+
#
|
118
|
+
# Dashed lines wrap around curves and corners just as solid stroked
|
119
|
+
# lines do, with normal cap and join handling with no consideration of
|
120
|
+
# the dash pattern. A path with several subpaths treats each subpath
|
121
|
+
# independently; the complete dash pattern is restarted at the beginning
|
122
|
+
# of each subpath.
|
123
|
+
attr_accessor :dash
|
124
|
+
|
125
|
+
def render(debug = false)
|
126
|
+
s = ""
|
127
|
+
s << "#{width} w" if @width > 0
|
128
|
+
s << " #{LINE_CAPS[@cap]} J" if @cap
|
129
|
+
s << " #{LINE_JOINS[@join]} j" if @join
|
130
|
+
s << " #{@miter_limit} M" if @miter_limit
|
131
|
+
if @dash
|
132
|
+
s << " ["
|
133
|
+
@dash[:pattern].each { |len| s << " #{len}" }
|
134
|
+
s << " ] #{@dash[:phase] or 0} d"
|
135
|
+
end
|
136
|
+
s
|
137
|
+
end
|
138
|
+
end
|