fxruby 1.6.13-mswin32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (496) hide show
  1. data/LICENSE +456 -0
  2. data/README +39 -0
  3. data/doc/apes02.html +21 -0
  4. data/doc/apes03.html +39 -0
  5. data/doc/book.html +3 -0
  6. data/doc/build.html +133 -0
  7. data/doc/ch03s02.html +23 -0
  8. data/doc/ch03s03.html +52 -0
  9. data/doc/ch03s04.html +36 -0
  10. data/doc/ch03s05.html +60 -0
  11. data/doc/ch04s02.html +71 -0
  12. data/doc/ch04s03.html +37 -0
  13. data/doc/ch04s04.html +72 -0
  14. data/doc/ch05s02.html +260 -0
  15. data/doc/ch05s03.html +127 -0
  16. data/doc/changes.html +685 -0
  17. data/doc/clipboardtut.html +67 -0
  18. data/doc/differences.html +190 -0
  19. data/doc/dragdroptut.html +263 -0
  20. data/doc/events.html +36 -0
  21. data/doc/examples.html +104 -0
  22. data/doc/gems.html +73 -0
  23. data/doc/goals.html +41 -0
  24. data/doc/images/babelfish.png +0 -0
  25. data/doc/images/browser.png +0 -0
  26. data/doc/images/button.png +0 -0
  27. data/doc/images/call-chain-example.png +0 -0
  28. data/doc/images/colordialog.png +0 -0
  29. data/doc/images/datatarget.png +0 -0
  30. data/doc/images/dialog.png +0 -0
  31. data/doc/images/dilbert.png +0 -0
  32. data/doc/images/dirlist.png +0 -0
  33. data/doc/images/dropsite-droprejected.png +0 -0
  34. data/doc/images/foursplit.png +0 -0
  35. data/doc/images/gltest.png +0 -0
  36. data/doc/images/glviewer.png +0 -0
  37. data/doc/images/groupbox.png +0 -0
  38. data/doc/images/header.png +0 -0
  39. data/doc/images/hello-with-button.png +0 -0
  40. data/doc/images/hello-with-icon-1.png +0 -0
  41. data/doc/images/hello-with-icon-2.png +0 -0
  42. data/doc/images/hello-with-icon-3.png +0 -0
  43. data/doc/images/hello-with-tooltip.png +0 -0
  44. data/doc/images/hello-without-button.png +0 -0
  45. data/doc/images/hello.png +0 -0
  46. data/doc/images/hello2.png +0 -0
  47. data/doc/images/iconlist-bigicons.png +0 -0
  48. data/doc/images/iconlist-details.png +0 -0
  49. data/doc/images/image.png +0 -0
  50. data/doc/images/imageviewer.png +0 -0
  51. data/doc/images/inheritance.png +0 -0
  52. data/doc/images/mditest.png +0 -0
  53. data/doc/images/raabrowser.png +0 -0
  54. data/doc/images/scribble.png +0 -0
  55. data/doc/images/shutter.png +0 -0
  56. data/doc/images/splitter.png +0 -0
  57. data/doc/images/tabbook.png +0 -0
  58. data/doc/images/table.png +0 -0
  59. data/doc/images/tutorial1.png +0 -0
  60. data/doc/implementation.html +16 -0
  61. data/doc/infosources.html +33 -0
  62. data/doc/library.html +30 -0
  63. data/doc/opengl.html +73 -0
  64. data/doc/pt01.html +3 -0
  65. data/doc/pt02.html +3 -0
  66. data/doc/scintilla.html +36 -0
  67. data/doc/style.css +247 -0
  68. data/doc/subversion.html +21 -0
  69. data/doc/tutorial1.html +90 -0
  70. data/doc/unicode.html +56 -0
  71. data/examples/RAA.rb +25 -0
  72. data/examples/README +53 -0
  73. data/examples/babelfish.rb +93 -0
  74. data/examples/bounce.rb +159 -0
  75. data/examples/browser.rb +191 -0
  76. data/examples/button.rb +168 -0
  77. data/examples/datatarget.rb +223 -0
  78. data/examples/dctest.rb +696 -0
  79. data/examples/dialog.rb +143 -0
  80. data/examples/dilbert.rb +67 -0
  81. data/examples/dirlist.rb +63 -0
  82. data/examples/dragdrop.rb +97 -0
  83. data/examples/dragsource.rb +80 -0
  84. data/examples/dropsite.rb +59 -0
  85. data/examples/foursplit.rb +97 -0
  86. data/examples/gltest.rb +330 -0
  87. data/examples/glviewer.rb +576 -0
  88. data/examples/groupbox.rb +392 -0
  89. data/examples/header.rb +149 -0
  90. data/examples/hello.rb +12 -0
  91. data/examples/hello2.rb +51 -0
  92. data/examples/iRAA.rb +153 -0
  93. data/examples/iconlist.rb +92 -0
  94. data/examples/icons/AngryGuyInBunnySuit.ico +0 -0
  95. data/examples/icons/FatBot.ico +0 -0
  96. data/examples/icons/FlippedySwitch.ico +0 -0
  97. data/examples/icons/LeGoon.ico +0 -0
  98. data/examples/icons/Net.ico +0 -0
  99. data/examples/icons/RedMacOS.ico +0 -0
  100. data/examples/icons/SawBlade.ico +0 -0
  101. data/examples/icons/backview.png +0 -0
  102. data/examples/icons/big.png +0 -0
  103. data/examples/icons/bigfolder.png +0 -0
  104. data/examples/icons/bigpenguin.png +0 -0
  105. data/examples/icons/bottomview.png +0 -0
  106. data/examples/icons/camera.png +0 -0
  107. data/examples/icons/capbutt.png +0 -0
  108. data/examples/icons/capnotlast.png +0 -0
  109. data/examples/icons/capproj.png +0 -0
  110. data/examples/icons/capround.png +0 -0
  111. data/examples/icons/colorpal.png +0 -0
  112. data/examples/icons/copy.png +0 -0
  113. data/examples/icons/cut.png +0 -0
  114. data/examples/icons/delimit.png +0 -0
  115. data/examples/icons/dippy.png +0 -0
  116. data/examples/icons/double_dash.png +0 -0
  117. data/examples/icons/filenew.png +0 -0
  118. data/examples/icons/fileopen.png +0 -0
  119. data/examples/icons/filesave.png +0 -0
  120. data/examples/icons/filesaveas.png +0 -0
  121. data/examples/icons/fonts.png +0 -0
  122. data/examples/icons/fox.png +0 -0
  123. data/examples/icons/foxicon.png +0 -0
  124. data/examples/icons/frontview.png +0 -0
  125. data/examples/icons/gem_big.png +0 -0
  126. data/examples/icons/gem_small.png +0 -0
  127. data/examples/icons/hello2.png +0 -0
  128. data/examples/icons/help.png +0 -0
  129. data/examples/icons/indent.png +0 -0
  130. data/examples/icons/jbevel.png +0 -0
  131. data/examples/icons/jmiter.png +0 -0
  132. data/examples/icons/jround.png +0 -0
  133. data/examples/icons/kill.png +0 -0
  134. data/examples/icons/leftview.png +0 -0
  135. data/examples/icons/light.png +0 -0
  136. data/examples/icons/minidoc.png +0 -0
  137. data/examples/icons/minifolder.png +0 -0
  138. data/examples/icons/minifolderopen.png +0 -0
  139. data/examples/icons/newfolder.png +0 -0
  140. data/examples/icons/nolight.png +0 -0
  141. data/examples/icons/onoff_dash.png +0 -0
  142. data/examples/icons/palette.png +0 -0
  143. data/examples/icons/parallel.png +0 -0
  144. data/examples/icons/paste.png +0 -0
  145. data/examples/icons/pattern.png +0 -0
  146. data/examples/icons/penguin.png +0 -0
  147. data/examples/icons/perspective.png +0 -0
  148. data/examples/icons/printicon.png +0 -0
  149. data/examples/icons/prop.png +0 -0
  150. data/examples/icons/redo.png +0 -0
  151. data/examples/icons/rightview.png +0 -0
  152. data/examples/icons/saveas.png +0 -0
  153. data/examples/icons/shutter1.png +0 -0
  154. data/examples/icons/shutter2.png +0 -0
  155. data/examples/icons/small.png +0 -0
  156. data/examples/icons/smoothlight.png +0 -0
  157. data/examples/icons/solid_line.png +0 -0
  158. data/examples/icons/tbuplevel.png +0 -0
  159. data/examples/icons/topview.png +0 -0
  160. data/examples/icons/undo.png +0 -0
  161. data/examples/icons/winapp.png +0 -0
  162. data/examples/icons/zoom.png +0 -0
  163. data/examples/image.rb +279 -0
  164. data/examples/imageviewer.rb +509 -0
  165. data/examples/inputs.rb +83 -0
  166. data/examples/mditest.rb +180 -0
  167. data/examples/pig.rb +77 -0
  168. data/examples/raabrowser.rb +122 -0
  169. data/examples/ratio.rb +80 -0
  170. data/examples/rulerview.rb +27 -0
  171. data/examples/scintilla-test.rb +81 -0
  172. data/examples/scribble-orig.rb +186 -0
  173. data/examples/scribble.rb +162 -0
  174. data/examples/shutter.rb +158 -0
  175. data/examples/splitter.rb +211 -0
  176. data/examples/styledtext.rb +82 -0
  177. data/examples/tabbook.rb +165 -0
  178. data/examples/table.rb +187 -0
  179. data/examples/textedit/commands.rb +114 -0
  180. data/examples/textedit/helpwindow.rb +299 -0
  181. data/examples/textedit/prefdialog.rb +239 -0
  182. data/examples/textedit/textedit.rb +1763 -0
  183. data/examples/unicode.rb +36 -0
  184. data/ext/fox16/fox16.so +0 -0
  185. data/index.html +14 -0
  186. data/lib/fox16/aliases.rb +5598 -0
  187. data/lib/fox16/calendar.rb +217 -0
  188. data/lib/fox16/chore.rb +105 -0
  189. data/lib/fox16/colors.rb +280 -0
  190. data/lib/fox16/core.rb +681 -0
  191. data/lib/fox16/dict.rb +35 -0
  192. data/lib/fox16/execute_nonmodal.rb +70 -0
  193. data/lib/fox16/glgroup.rb +166 -0
  194. data/lib/fox16/glshapes.rb +456 -0
  195. data/lib/fox16/input.rb +59 -0
  196. data/lib/fox16/irb.rb +178 -0
  197. data/lib/fox16/iterators.rb +371 -0
  198. data/lib/fox16/keys.rb +1374 -0
  199. data/lib/fox16/kwargs.rb +2725 -0
  200. data/lib/fox16/missingdep.rb +14 -0
  201. data/lib/fox16/pseudokeyboard.rb +40 -0
  202. data/lib/fox16/pseudomouse.rb +87 -0
  203. data/lib/fox16/responder.rb +70 -0
  204. data/lib/fox16/responder2.rb +131 -0
  205. data/lib/fox16/scintilla.rb +3641 -0
  206. data/lib/fox16/settings.rb +18 -0
  207. data/lib/fox16/signal.rb +71 -0
  208. data/lib/fox16/splashscreen.rb +82 -0
  209. data/lib/fox16/timeout.rb +136 -0
  210. data/lib/fox16/undolist.rb +455 -0
  211. data/lib/fox16/version.rb +9 -0
  212. data/rdoc-sources/FX4Splitter.rb +156 -0
  213. data/rdoc-sources/FX7Segment.rb +54 -0
  214. data/rdoc-sources/FXAccelTable.rb +102 -0
  215. data/rdoc-sources/FXApp.rb +545 -0
  216. data/rdoc-sources/FXArrowButton.rb +69 -0
  217. data/rdoc-sources/FXBMPIcon.rb +67 -0
  218. data/rdoc-sources/FXBMPImage.rb +30 -0
  219. data/rdoc-sources/FXBitmap.rb +115 -0
  220. data/rdoc-sources/FXBitmapFrame.rb +31 -0
  221. data/rdoc-sources/FXBitmapView.rb +44 -0
  222. data/rdoc-sources/FXButton.rb +59 -0
  223. data/rdoc-sources/FXCURCursor.rb +13 -0
  224. data/rdoc-sources/FXCanvas.rb +18 -0
  225. data/rdoc-sources/FXCheckButton.rb +58 -0
  226. data/rdoc-sources/FXChoiceBox.rb +49 -0
  227. data/rdoc-sources/FXColorBar.rb +48 -0
  228. data/rdoc-sources/FXColorDialog.rb +37 -0
  229. data/rdoc-sources/FXColorList.rb +55 -0
  230. data/rdoc-sources/FXColorRing.rb +49 -0
  231. data/rdoc-sources/FXColorSelector.rb +65 -0
  232. data/rdoc-sources/FXColorWell.rb +65 -0
  233. data/rdoc-sources/FXColorWheel.rb +57 -0
  234. data/rdoc-sources/FXComboBox.rb +211 -0
  235. data/rdoc-sources/FXComposite.rb +34 -0
  236. data/rdoc-sources/FXCursor.rb +67 -0
  237. data/rdoc-sources/FXDC.rb +720 -0
  238. data/rdoc-sources/FXDCPrint.rb +127 -0
  239. data/rdoc-sources/FXDCWindow.rb +33 -0
  240. data/rdoc-sources/FXDataTarget.rb +66 -0
  241. data/rdoc-sources/FXDebugTarget.rb +25 -0
  242. data/rdoc-sources/FXDelegator.rb +23 -0
  243. data/rdoc-sources/FXDial.rb +107 -0
  244. data/rdoc-sources/FXDialogBox.rb +32 -0
  245. data/rdoc-sources/FXDict.rb +79 -0
  246. data/rdoc-sources/FXDirBox.rb +55 -0
  247. data/rdoc-sources/FXDirDialog.rb +47 -0
  248. data/rdoc-sources/FXDirList.rb +149 -0
  249. data/rdoc-sources/FXDirSelector.rb +64 -0
  250. data/rdoc-sources/FXDockBar.rb +151 -0
  251. data/rdoc-sources/FXDockHandler.rb +26 -0
  252. data/rdoc-sources/FXDockSite.rb +104 -0
  253. data/rdoc-sources/FXDockTitle.rb +26 -0
  254. data/rdoc-sources/FXDocument.rb +29 -0
  255. data/rdoc-sources/FXDragCorner.rb +19 -0
  256. data/rdoc-sources/FXDrawable.rb +27 -0
  257. data/rdoc-sources/FXDriveBox.rb +46 -0
  258. data/rdoc-sources/FXExtentd.rb +85 -0
  259. data/rdoc-sources/FXExtentf.rb +85 -0
  260. data/rdoc-sources/FXFileDialog.rb +217 -0
  261. data/rdoc-sources/FXFileDict.rb +131 -0
  262. data/rdoc-sources/FXFileList.rb +208 -0
  263. data/rdoc-sources/FXFileSelector.rb +184 -0
  264. data/rdoc-sources/FXFileStream.rb +27 -0
  265. data/rdoc-sources/FXFoldingList.rb +504 -0
  266. data/rdoc-sources/FXFont.rb +361 -0
  267. data/rdoc-sources/FXFontDialog.rb +14 -0
  268. data/rdoc-sources/FXFontSelector.rb +37 -0
  269. data/rdoc-sources/FXFrame.rb +53 -0
  270. data/rdoc-sources/FXGIFCursor.rb +50 -0
  271. data/rdoc-sources/FXGIFIcon.rb +31 -0
  272. data/rdoc-sources/FXGIFImage.rb +29 -0
  273. data/rdoc-sources/FXGLCanvas.rb +45 -0
  274. data/rdoc-sources/FXGLContext.rb +40 -0
  275. data/rdoc-sources/FXGLObject.rb +75 -0
  276. data/rdoc-sources/FXGLShape.rb +69 -0
  277. data/rdoc-sources/FXGLViewer.rb +332 -0
  278. data/rdoc-sources/FXGLVisual.rb +94 -0
  279. data/rdoc-sources/FXGradientBar.rb +301 -0
  280. data/rdoc-sources/FXGroupBox.rb +33 -0
  281. data/rdoc-sources/FXHeader.rb +408 -0
  282. data/rdoc-sources/FXHorizontalFrame.rb +29 -0
  283. data/rdoc-sources/FXICOIcon.rb +65 -0
  284. data/rdoc-sources/FXICOImage.rb +31 -0
  285. data/rdoc-sources/FXIcon.rb +38 -0
  286. data/rdoc-sources/FXIconDict.rb +48 -0
  287. data/rdoc-sources/FXIconList.rb +447 -0
  288. data/rdoc-sources/FXIconSource.rb +100 -0
  289. data/rdoc-sources/FXId.rb +34 -0
  290. data/rdoc-sources/FXImage.rb +286 -0
  291. data/rdoc-sources/FXImageFrame.rb +36 -0
  292. data/rdoc-sources/FXImageView.rb +35 -0
  293. data/rdoc-sources/FXInputDialog.rb +77 -0
  294. data/rdoc-sources/FXJPGIcon.rb +70 -0
  295. data/rdoc-sources/FXJPGImage.rb +38 -0
  296. data/rdoc-sources/FXKnob.rb +76 -0
  297. data/rdoc-sources/FXLabel.rb +69 -0
  298. data/rdoc-sources/FXList.rb +440 -0
  299. data/rdoc-sources/FXListBox.rb +191 -0
  300. data/rdoc-sources/FXMDIButton.rb +67 -0
  301. data/rdoc-sources/FXMDIChild.rb +155 -0
  302. data/rdoc-sources/FXMDIClient.rb +65 -0
  303. data/rdoc-sources/FXMainWindow.rb +26 -0
  304. data/rdoc-sources/FXMatrix.rb +57 -0
  305. data/rdoc-sources/FXMemoryBuffer.rb +28 -0
  306. data/rdoc-sources/FXMemoryStream.rb +50 -0
  307. data/rdoc-sources/FXMenuBar.rb +23 -0
  308. data/rdoc-sources/FXMenuButton.rb +84 -0
  309. data/rdoc-sources/FXMenuCaption.rb +50 -0
  310. data/rdoc-sources/FXMenuCascade.rb +18 -0
  311. data/rdoc-sources/FXMenuCheck.rb +30 -0
  312. data/rdoc-sources/FXMenuCommand.rb +26 -0
  313. data/rdoc-sources/FXMenuPane.rb +13 -0
  314. data/rdoc-sources/FXMenuRadio.rb +33 -0
  315. data/rdoc-sources/FXMenuSeparator.rb +21 -0
  316. data/rdoc-sources/FXMenuTitle.rb +27 -0
  317. data/rdoc-sources/FXMessageBox.rb +72 -0
  318. data/rdoc-sources/FXObject.rb +28 -0
  319. data/rdoc-sources/FXOptionMenu.rb +83 -0
  320. data/rdoc-sources/FXPCXIcon.rb +63 -0
  321. data/rdoc-sources/FXPCXImage.rb +31 -0
  322. data/rdoc-sources/FXPNGIcon.rb +66 -0
  323. data/rdoc-sources/FXPNGImage.rb +34 -0
  324. data/rdoc-sources/FXPPMIcon.rb +36 -0
  325. data/rdoc-sources/FXPPMImage.rb +31 -0
  326. data/rdoc-sources/FXPacker.rb +63 -0
  327. data/rdoc-sources/FXPicker.rb +27 -0
  328. data/rdoc-sources/FXPopup.rb +53 -0
  329. data/rdoc-sources/FXPrintDialog.rb +36 -0
  330. data/rdoc-sources/FXProgressBar.rb +57 -0
  331. data/rdoc-sources/FXProgressDialog.rb +36 -0
  332. data/rdoc-sources/FXQuatd.rb +164 -0
  333. data/rdoc-sources/FXQuatf.rb +173 -0
  334. data/rdoc-sources/FXRGBIcon.rb +64 -0
  335. data/rdoc-sources/FXRGBImage.rb +31 -0
  336. data/rdoc-sources/FXRadioButton.rb +70 -0
  337. data/rdoc-sources/FXRanged.rb +100 -0
  338. data/rdoc-sources/FXRangef.rb +100 -0
  339. data/rdoc-sources/FXRealSlider.rb +101 -0
  340. data/rdoc-sources/FXRealSpinner.rb +140 -0
  341. data/rdoc-sources/FXRecentFiles.rb +77 -0
  342. data/rdoc-sources/FXRectangle.rb +149 -0
  343. data/rdoc-sources/FXRegion.rb +64 -0
  344. data/rdoc-sources/FXRegistry.rb +56 -0
  345. data/rdoc-sources/FXReplaceDialog.rb +56 -0
  346. data/rdoc-sources/FXRootWindow.rb +17 -0
  347. data/rdoc-sources/FXRuler.rb +130 -0
  348. data/rdoc-sources/FXRulerView.rb +225 -0
  349. data/rdoc-sources/FXScintilla.rb +121 -0
  350. data/rdoc-sources/FXScrollArea.rb +86 -0
  351. data/rdoc-sources/FXScrollBar.rb +107 -0
  352. data/rdoc-sources/FXScrollPane.rb +28 -0
  353. data/rdoc-sources/FXScrollWindow.rb +38 -0
  354. data/rdoc-sources/FXSearchDialog.rb +24 -0
  355. data/rdoc-sources/FXSeparator.rb +74 -0
  356. data/rdoc-sources/FXSettings.rb +248 -0
  357. data/rdoc-sources/FXShell.rb +8 -0
  358. data/rdoc-sources/FXShutter.rb +102 -0
  359. data/rdoc-sources/FXSize.rb +95 -0
  360. data/rdoc-sources/FXSlider.rb +98 -0
  361. data/rdoc-sources/FXSphered.rb +80 -0
  362. data/rdoc-sources/FXSpheref.rb +80 -0
  363. data/rdoc-sources/FXSpinner.rb +136 -0
  364. data/rdoc-sources/FXSplashWindow.rb +27 -0
  365. data/rdoc-sources/FXSplitter.rb +89 -0
  366. data/rdoc-sources/FXSpring.rb +61 -0
  367. data/rdoc-sources/FXStatusBar.rb +42 -0
  368. data/rdoc-sources/FXStatusLine.rb +60 -0
  369. data/rdoc-sources/FXStream.rb +142 -0
  370. data/rdoc-sources/FXStringDict.rb +38 -0
  371. data/rdoc-sources/FXSwitcher.rb +78 -0
  372. data/rdoc-sources/FXTGAIcon.rb +63 -0
  373. data/rdoc-sources/FXTGAImage.rb +31 -0
  374. data/rdoc-sources/FXTIFIcon.rb +70 -0
  375. data/rdoc-sources/FXTIFImage.rb +37 -0
  376. data/rdoc-sources/FXTabBar.rb +80 -0
  377. data/rdoc-sources/FXTabBook.rb +41 -0
  378. data/rdoc-sources/FXTabItem.rb +58 -0
  379. data/rdoc-sources/FXTable.rb +967 -0
  380. data/rdoc-sources/FXText.rb +578 -0
  381. data/rdoc-sources/FXTextField.rb +151 -0
  382. data/rdoc-sources/FXToggleButton.rb +69 -0
  383. data/rdoc-sources/FXToolBar.rb +61 -0
  384. data/rdoc-sources/FXToolBarGrip.rb +50 -0
  385. data/rdoc-sources/FXToolBarShell.rb +44 -0
  386. data/rdoc-sources/FXToolBarTab.rb +74 -0
  387. data/rdoc-sources/FXToolTip.rb +36 -0
  388. data/rdoc-sources/FXTopWindow.rb +163 -0
  389. data/rdoc-sources/FXTranslator.rb +32 -0
  390. data/rdoc-sources/FXTreeList.rb +514 -0
  391. data/rdoc-sources/FXTreeListBox.rb +219 -0
  392. data/rdoc-sources/FXTriStateButton.rb +49 -0
  393. data/rdoc-sources/FXVec2d.rb +96 -0
  394. data/rdoc-sources/FXVec2f.rb +96 -0
  395. data/rdoc-sources/FXVec3d.rb +113 -0
  396. data/rdoc-sources/FXVec3f.rb +113 -0
  397. data/rdoc-sources/FXVec4d.rb +129 -0
  398. data/rdoc-sources/FXVec4f.rb +129 -0
  399. data/rdoc-sources/FXVerticalFrame.rb +29 -0
  400. data/rdoc-sources/FXVisual.rb +79 -0
  401. data/rdoc-sources/FXWindow.rb +725 -0
  402. data/rdoc-sources/FXWizard.rb +59 -0
  403. data/rdoc-sources/FXXBMIcon.rb +37 -0
  404. data/rdoc-sources/FXXBMImage.rb +32 -0
  405. data/rdoc-sources/FXXPMIcon.rb +65 -0
  406. data/rdoc-sources/FXXPMImage.rb +31 -0
  407. data/rdoc-sources/README.rdoc +53 -0
  408. data/rdoc-sources/fxdefs.rb +90 -0
  409. data/tests/README +19 -0
  410. data/tests/TC_FXAccelTable.rb +43 -0
  411. data/tests/TC_FXApp.rb +15 -0
  412. data/tests/TC_FXArc.rb +26 -0
  413. data/tests/TC_FXBMPIcon.rb +15 -0
  414. data/tests/TC_FXBMPImage.rb +15 -0
  415. data/tests/TC_FXButton.rb +72 -0
  416. data/tests/TC_FXCheckButton.rb +57 -0
  417. data/tests/TC_FXComboBox.rb +52 -0
  418. data/tests/TC_FXDC.rb +372 -0
  419. data/tests/TC_FXDCPrint.rb +102 -0
  420. data/tests/TC_FXDCWindow.rb +23 -0
  421. data/tests/TC_FXDataTarget.rb +24 -0
  422. data/tests/TC_FXDirList.rb +30 -0
  423. data/tests/TC_FXFileAssoc.rb +62 -0
  424. data/tests/TC_FXFileStream.rb +90 -0
  425. data/tests/TC_FXFoldingList.rb +32 -0
  426. data/tests/TC_FXFont.rb +69 -0
  427. data/tests/TC_FXFontDesc.rb +58 -0
  428. data/tests/TC_FXGLGroup.rb +32 -0
  429. data/tests/TC_FXGLShape.rb +28 -0
  430. data/tests/TC_FXGLViewer.rb +20 -0
  431. data/tests/TC_FXGradientBar.rb +89 -0
  432. data/tests/TC_FXHeader.rb +82 -0
  433. data/tests/TC_FXIconDict.rb +52 -0
  434. data/tests/TC_FXIconList.rb +192 -0
  435. data/tests/TC_FXId.rb +19 -0
  436. data/tests/TC_FXImage.rb +155 -0
  437. data/tests/TC_FXLight.rb +33 -0
  438. data/tests/TC_FXList.rb +116 -0
  439. data/tests/TC_FXListBox.rb +49 -0
  440. data/tests/TC_FXMat4f.rb +228 -0
  441. data/tests/TC_FXMaterial.rb +89 -0
  442. data/tests/TC_FXMemoryStream.rb +97 -0
  443. data/tests/TC_FXMenuCheck.rb +57 -0
  444. data/tests/TC_FXMenuCommand.rb +12 -0
  445. data/tests/TC_FXMenuRadio.rb +57 -0
  446. data/tests/TC_FXPoint.rb +57 -0
  447. data/tests/TC_FXQuatf.rb +77 -0
  448. data/tests/TC_FXRadioButton.rb +57 -0
  449. data/tests/TC_FXRangef.rb +48 -0
  450. data/tests/TC_FXRectangle.rb +88 -0
  451. data/tests/TC_FXRegion.rb +54 -0
  452. data/tests/TC_FXRegistry.rb +27 -0
  453. data/tests/TC_FXScrollArea.rb +28 -0
  454. data/tests/TC_FXScrollWindow.rb +28 -0
  455. data/tests/TC_FXSegment.rb +22 -0
  456. data/tests/TC_FXSettings.rb +34 -0
  457. data/tests/TC_FXShell.rb +26 -0
  458. data/tests/TC_FXSize.rb +54 -0
  459. data/tests/TC_FXStream.rb +11 -0
  460. data/tests/TC_FXTable.rb +368 -0
  461. data/tests/TC_FXTableItem.rb +48 -0
  462. data/tests/TC_FXText.rb +96 -0
  463. data/tests/TC_FXTopWindow.rb +32 -0
  464. data/tests/TC_FXTreeList.rb +100 -0
  465. data/tests/TC_FXTreeListBox.rb +41 -0
  466. data/tests/TC_FXUndoList.rb +43 -0
  467. data/tests/TC_FXVec2d.rb +142 -0
  468. data/tests/TC_FXVec2f.rb +137 -0
  469. data/tests/TC_FXVec3d.rb +150 -0
  470. data/tests/TC_FXVec3f.rb +150 -0
  471. data/tests/TC_FXVec4f.rb +158 -0
  472. data/tests/TC_FXViewport.rb +30 -0
  473. data/tests/TC_FXXBMIcon.rb +15 -0
  474. data/tests/TC_FXXBMImage.rb +15 -0
  475. data/tests/TC_FXXPMIcon.rb +15 -0
  476. data/tests/TC_FXXPMImage.rb +15 -0
  477. data/tests/TC_Misc.rb +157 -0
  478. data/tests/TC_downcast.rb +15 -0
  479. data/tests/TS_All.rb +25 -0
  480. data/tests/blankpage.ps +166 -0
  481. data/tests/howdypage.ps +181 -0
  482. data/tests/stress1.rb +94 -0
  483. data/tests/stress2.rb +51 -0
  484. data/tests/stress3.rb +117 -0
  485. data/tests/testcase.rb +37 -0
  486. data/web/art/fxrubylogo.png +0 -0
  487. data/web/art/fxrubylogo_small.png +0 -0
  488. data/web/art/line.gif +0 -0
  489. data/web/art/oul_grey.gif +0 -0
  490. data/web/art/our.gif +0 -0
  491. data/web/downloads.html +93 -0
  492. data/web/home.html +113 -0
  493. data/web/menu.html +50 -0
  494. data/web/styles.css +167 -0
  495. data/web/top.html +15 -0
  496. metadata +548 -0
@@ -0,0 +1,2725 @@
1
+ require 'fox16'
2
+
3
+ module Fox
4
+
5
+
6
+ class FX4Splitter
7
+ alias old_initialize initialize
8
+ def initialize(p, *args, &blk)
9
+ argument_names = %w{opts x y width height}
10
+ default_params = { :opts => FOURSPLITTER_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
11
+ params = {}
12
+ params = args.pop if args.last.is_a? Hash
13
+ if args.length > 0 && (args.first.nil? || args.first.is_a?(FXObject))
14
+ tgt, sel = args[0], args[1]
15
+ args.each_with_index { |e, i| params[argument_names[i-2].intern] = e if i >= 2 }
16
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
17
+ params = default_params.merge(params)
18
+ old_initialize(p, tgt, sel, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
19
+ else
20
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
21
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
22
+ params = default_params.merge(params)
23
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
24
+ end
25
+ end
26
+ end
27
+
28
+ class FXDockBar
29
+ alias old_initialize initialize
30
+ def initialize(p, *args, &blk)
31
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
32
+ default_params = { :opts => LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 3, :padRight => 3, :padTop => 2, :padBottom => 2, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
33
+ params = {}
34
+ params = args.pop if args.last.is_a? Hash
35
+ if args.length > 0 && (args.first.nil? || args.first.is_a?(FXComposite))
36
+ q = args[0]
37
+ args.each_with_index { |e, i| params[argument_names[i-1].intern] = e if i >= 1 }
38
+ if params.key? :padding
39
+ value = params.delete(:padding)
40
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
41
+ end
42
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
43
+ params = default_params.merge(params)
44
+ old_initialize(p, q, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
45
+ else
46
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
47
+ if params.key? :padding
48
+ value = params.delete(:padding)
49
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
50
+ end
51
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
52
+ params = default_params.merge(params)
53
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
54
+ end
55
+ end
56
+ end
57
+
58
+ class FXFont
59
+
60
+ alias old_initialize initialize
61
+
62
+ def initialize(a, arg1, *args, &blk)
63
+ if args.length > 0
64
+ face, size = arg1, args[0]
65
+ argument_names = %w{weight slant encoding setWidth hints}
66
+ default_params = { :weight => FXFont::Normal, :slant => FXFont::Straight, :encoding => FONTENCODING_DEFAULT, :setWidth => FXFont::NonExpanded, :hints => 0 }
67
+ params = {}
68
+ params = args.pop if args.last.is_a? Hash
69
+ args.each_with_index { |e, i| params[argument_names[i-1].intern] = e if i >= 1 }
70
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
71
+ params = default_params.merge(params)
72
+ old_initialize(a, face, size, params[:weight], params[:slant], params[:encoding], params[:setWidth], params[:hints], &blk)
73
+ else
74
+ old_initialize(a, arg1, &blk)
75
+ end
76
+ end
77
+
78
+ class << self
79
+ alias old_listFonts listFonts
80
+ end
81
+
82
+ def FXFont.listFonts(face, *args)
83
+ argument_names = %w{weight slant setWidth encoding hints}
84
+ default_params = { :weight => 0, :slant => 0, :setWidth => 0, :encoding => 0, :hints => 0 }
85
+ params = {}
86
+ params = args.pop if args.last.is_a? Hash
87
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
88
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
89
+ params = default_params.merge(params)
90
+ old_listFonts(face, params[:weight], params[:slant], params[:setWidth], params[:encoding], params[:hints])
91
+ end
92
+
93
+ end
94
+
95
+ class FXGLCanvas
96
+ alias old_initialize initialize
97
+ def initialize(parent, vis, *args, &blk)
98
+ argument_names = %w{target selector opts x y width height}
99
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
100
+ params = {}
101
+ params = args.pop if args.last.is_a? Hash
102
+ if args.length > 0 && (args[0].is_a?(FXGLCanvas))
103
+ sharegroup = args[0]
104
+ args.each_with_index { |e, i| params[argument_names[i-1].intern] = e if i >= 1 }
105
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
106
+ params = default_params.merge(params)
107
+ old_initialize(parent, vis, sharegroup, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
108
+ else
109
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
110
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
111
+ params = default_params.merge(params)
112
+ old_initialize(parent, vis, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
113
+ end
114
+ end
115
+ end
116
+
117
+ class FXGLViewer
118
+ alias old_initialize initialize
119
+ def initialize(parent, vis, *args, &blk)
120
+ argument_names = %w{target selector opts x y width height}
121
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
122
+ params = {}
123
+ params = args.pop if args.last.is_a? Hash
124
+ if args.length > 0 && (args[0].is_a?(FXGLViewer))
125
+ sharegroup = args[0]
126
+ args.each_with_index { |e, i| params[argument_names[i-1].intern] = e if i >= 1 }
127
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
128
+ params = default_params.merge(params)
129
+ old_initialize(parent, vis, sharegroup, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
130
+ else
131
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
132
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
133
+ params = default_params.merge(params)
134
+ old_initialize(parent, vis, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
135
+ end
136
+ end
137
+ end
138
+
139
+ class FXMenuBar
140
+ alias old_initialize initialize
141
+ def initialize(p, *args, &blk)
142
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
143
+ default_params = { :opts => LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 3, :padRight => 3, :padTop => 2, :padBottom => 2, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
144
+ params = {}
145
+ params = args.pop if args.last.is_a? Hash
146
+ if args.length > 0 && (args[0].nil? || args[0].is_a?(FXComposite))
147
+ q = args[0]
148
+ args.each_with_index { |e, i| params[argument_names[i-1].intern] = e if i >= 1 }
149
+ if params.key? :padding
150
+ value = params.delete(:padding)
151
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
152
+ end
153
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
154
+ params = default_params.merge(params)
155
+ old_initialize(p, q, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
156
+ else
157
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
158
+ if params.key? :padding
159
+ value = params.delete(:padding)
160
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
161
+ end
162
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
163
+ params = default_params.merge(params)
164
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
165
+ end
166
+ end
167
+ end
168
+
169
+ class FXSplitter
170
+ alias old_initialize initialize
171
+ def initialize(p, *args, &blk)
172
+ argument_names = %w{opts x y width height}
173
+ default_params = { :opts => SPLITTER_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
174
+ params = {}
175
+ params = args.pop if args.last.is_a? Hash
176
+ if args.length > 0 && (args.first.nil? || args.first.is_a?(FXObject))
177
+ tgt, sel = args[0], args[1]
178
+ args.each_with_index { |e, i| params[argument_names[i-2].intern] = e if i >= 2 }
179
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
180
+ params = default_params.merge(params)
181
+ old_initialize(p, tgt, sel, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
182
+ else
183
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
184
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
185
+ params = default_params.merge(params)
186
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
187
+ end
188
+ end
189
+ end
190
+
191
+ class FXToolBar
192
+ alias old_initialize initialize
193
+ def initialize(p, *args, &blk)
194
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
195
+ default_params = { :opts => LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 3, :padRight => 3, :padTop => 2, :padBottom => 2, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
196
+ params = {}
197
+ params = args.pop if args.last.is_a? Hash
198
+ if args.length > 0 && (args[0].nil? || args[0].is_a?(FXComposite))
199
+ q = args[0]
200
+ args.each_with_index { |e, i| params[argument_names[i-1].intern] = e if i >= 1 }
201
+ if params.key? :padding
202
+ value = params.delete(:padding)
203
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
204
+ end
205
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
206
+ params = default_params.merge(params)
207
+ old_initialize(p, q, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
208
+ else
209
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
210
+ if params.key? :padding
211
+ value = params.delete(:padding)
212
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
213
+ end
214
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
215
+ params = default_params.merge(params)
216
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
217
+ end
218
+ end
219
+ end
220
+
221
+ class FXWindow
222
+ alias old_initialize initialize
223
+ def initialize(p, *args, &blk)
224
+ if p.is_a? FXApp
225
+ old_initialize(p, *args, &blk)
226
+ else
227
+ argument_names = %w{opts x y width height}
228
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
229
+ params = {}
230
+ params = args.pop if args.last.is_a? Hash
231
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
232
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
233
+ params = default_params.merge(params)
234
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
235
+ end
236
+ end
237
+ end
238
+
239
+ class FX7Segment
240
+ alias old_initialize initialize
241
+ def initialize(p, text, *args, &blk)
242
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
243
+ default_params = { :opts => SEVENSEGMENT_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
244
+ params = {}
245
+ params = args.pop if args.last.is_a? Hash
246
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
247
+ if params.key? :padding
248
+ value = params.delete(:padding)
249
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
250
+ end
251
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
252
+ params = default_params.merge(params)
253
+ old_initialize(p, text, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
254
+ end
255
+ end
256
+
257
+ class FXApp
258
+ alias old_initialize initialize
259
+ def initialize(*args, &blk)
260
+ argument_names = %w{appName vendorName}
261
+ default_params = { :appName => "Application", :vendorName => "FoxDefault" }
262
+ params = {}
263
+ params = args.pop if args.last.is_a? Hash
264
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
265
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
266
+ params = default_params.merge(params)
267
+ old_initialize(params[:appName], params[:vendorName], &blk)
268
+ end
269
+ end
270
+
271
+ class FXArrowButton
272
+ alias old_initialize initialize
273
+ def initialize(parent, *args, &blk)
274
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
275
+ default_params = { :target => nil, :selector => 0, :opts => ARROW_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
276
+ params = {}
277
+ params = args.pop if args.last.is_a? Hash
278
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
279
+ if params.key? :padding
280
+ value = params.delete(:padding)
281
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
282
+ end
283
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
284
+ params = default_params.merge(params)
285
+ old_initialize(parent, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
286
+ end
287
+ end
288
+
289
+ class FXBitmap
290
+ alias old_initialize initialize
291
+ def initialize(app, *args, &blk)
292
+ argument_names = %w{pixels opts width height}
293
+ default_params = { :pixels => nil, :opts => 0, :width => 1, :height => 1 }
294
+ params = {}
295
+ params = args.pop if args.last.is_a? Hash
296
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
297
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
298
+ params = default_params.merge(params)
299
+ old_initialize(app, params[:pixels], params[:opts], params[:width], params[:height], &blk)
300
+ end
301
+ end
302
+
303
+ class FXBitmapFrame
304
+ alias old_initialize initialize
305
+ def initialize(p, bmp, *args, &blk)
306
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
307
+ default_params = { :opts => FRAME_SUNKEN|FRAME_THICK, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0 }
308
+ params = {}
309
+ params = args.pop if args.last.is_a? Hash
310
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
311
+ if params.key? :padding
312
+ value = params.delete(:padding)
313
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
314
+ end
315
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
316
+ params = default_params.merge(params)
317
+ old_initialize(p, bmp, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
318
+ end
319
+ end
320
+
321
+ class FXBitmapView
322
+ alias old_initialize initialize
323
+ def initialize(p, *args, &blk)
324
+ argument_names = %w{bmp target selector opts x y width height}
325
+ default_params = { :bmp => nil, :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
326
+ params = {}
327
+ params = args.pop if args.last.is_a? Hash
328
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
329
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
330
+ params = default_params.merge(params)
331
+ old_initialize(p, params[:bmp], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
332
+ end
333
+ end
334
+
335
+ class FXBMPIcon
336
+ alias old_initialize initialize
337
+ def initialize(a, *args, &blk)
338
+ argument_names = %w{pix clr opts width height}
339
+ default_params = { :pix => nil, :clr => FXRGB(192,192,192), :opts => 0, :width => 1, :height => 1 }
340
+ params = {}
341
+ params = args.pop if args.last.is_a? Hash
342
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
343
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
344
+ params = default_params.merge(params)
345
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
346
+ end
347
+ end
348
+
349
+ class FXBMPImage
350
+ alias old_initialize initialize
351
+ def initialize(a, *args, &blk)
352
+ argument_names = %w{pix opts width height}
353
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
354
+ params = {}
355
+ params = args.pop if args.last.is_a? Hash
356
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
357
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
358
+ params = default_params.merge(params)
359
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
360
+ end
361
+ end
362
+
363
+ class FXButton
364
+ alias old_initialize initialize
365
+ def initialize(parent, text, *args, &blk)
366
+ argument_names = %w{icon target selector opts x y width height padLeft padRight padTop padBottom}
367
+ default_params = { :icon => nil, :target => nil, :selector => 0, :opts => BUTTON_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
368
+ params = {}
369
+ params = args.pop if args.last.is_a? Hash
370
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
371
+ if params.key? :padding
372
+ value = params.delete(:padding)
373
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
374
+ end
375
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
376
+ params = default_params.merge(params)
377
+ old_initialize(parent, text, params[:icon], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
378
+ end
379
+ end
380
+
381
+ class FXCanvas
382
+ alias old_initialize initialize
383
+ def initialize(parent, *args, &blk)
384
+ argument_names = %w{target selector opts x y width height}
385
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
386
+ params = {}
387
+ params = args.pop if args.last.is_a? Hash
388
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
389
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
390
+ params = default_params.merge(params)
391
+ old_initialize(parent, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
392
+ end
393
+ end
394
+
395
+ class FXCheckButton
396
+ alias old_initialize initialize
397
+ def initialize(parent, text, *args, &blk)
398
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
399
+ default_params = { :target => nil, :selector => 0, :opts => CHECKBUTTON_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
400
+ params = {}
401
+ params = args.pop if args.last.is_a? Hash
402
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
403
+ if params.key? :padding
404
+ value = params.delete(:padding)
405
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
406
+ end
407
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
408
+ params = default_params.merge(params)
409
+ old_initialize(parent, text, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
410
+ end
411
+ end
412
+
413
+ class FXChoiceBox
414
+ alias old_initialize initialize
415
+ def initialize(owner, caption, text, icon, choices, *args, &blk)
416
+ argument_names = %w{opts x y width height}
417
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
418
+ params = {}
419
+ params = args.pop if args.last.is_a? Hash
420
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
421
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
422
+ params = default_params.merge(params)
423
+ old_initialize(owner, caption, text, icon, choices, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
424
+ end
425
+ end
426
+
427
+ class FXColorBar
428
+ alias old_initialize initialize
429
+ def initialize(parent, *args, &blk)
430
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
431
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
432
+ params = {}
433
+ params = args.pop if args.last.is_a? Hash
434
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
435
+ if params.key? :padding
436
+ value = params.delete(:padding)
437
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
438
+ end
439
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
440
+ params = default_params.merge(params)
441
+ old_initialize(parent, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
442
+ end
443
+ end
444
+
445
+ class FXColorDialog
446
+ alias old_initialize initialize
447
+ def initialize(owner, title, *args, &blk)
448
+ argument_names = %w{opts x y width height}
449
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
450
+ params = {}
451
+ params = args.pop if args.last.is_a? Hash
452
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
453
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
454
+ params = default_params.merge(params)
455
+ old_initialize(owner, title, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
456
+ end
457
+ end
458
+
459
+ class FXColorItem
460
+ alias old_initialize initialize
461
+ def initialize(text, clr, *args, &blk)
462
+ argument_names = %w{data}
463
+ default_params = { :data => nil }
464
+ params = {}
465
+ params = args.pop if args.last.is_a? Hash
466
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
467
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
468
+ params = default_params.merge(params)
469
+ old_initialize(text, clr, params[:data], &blk)
470
+ end
471
+ end
472
+
473
+ class FXColorList
474
+ alias old_initialize initialize
475
+ def initialize(p, *args, &blk)
476
+ argument_names = %w{target selector opts x y width height}
477
+ default_params = { :target => nil, :selector => 0, :opts => LIST_BROWSESELECT, :x => 0, :y => 0, :width => 0, :height => 0 }
478
+ params = {}
479
+ params = args.pop if args.last.is_a? Hash
480
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
481
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
482
+ params = default_params.merge(params)
483
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
484
+ end
485
+ end
486
+
487
+ class FXColorRing
488
+ alias old_initialize initialize
489
+ def initialize(p, *args, &blk)
490
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
491
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
492
+ params = {}
493
+ params = args.pop if args.last.is_a? Hash
494
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
495
+ if params.key? :padding
496
+ value = params.delete(:padding)
497
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
498
+ end
499
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
500
+ params = default_params.merge(params)
501
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
502
+ end
503
+ end
504
+
505
+ class FXColorSelector
506
+ alias old_initialize initialize
507
+ def initialize(parent, *args, &blk)
508
+ argument_names = %w{target selector opts x y width height}
509
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
510
+ params = {}
511
+ params = args.pop if args.last.is_a? Hash
512
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
513
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
514
+ params = default_params.merge(params)
515
+ old_initialize(parent, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
516
+ end
517
+ end
518
+
519
+ class FXColorWell
520
+ alias old_initialize initialize
521
+ def initialize(parent, *args, &blk)
522
+ argument_names = %w{color target selector opts x y width height padLeft padRight padTop padBottom}
523
+ default_params = { :color => 0, :target => nil, :selector => 0, :opts => COLORWELL_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
524
+ params = {}
525
+ params = args.pop if args.last.is_a? Hash
526
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
527
+ if params.key? :padding
528
+ value = params.delete(:padding)
529
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
530
+ end
531
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
532
+ params = default_params.merge(params)
533
+ old_initialize(parent, params[:color], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
534
+ end
535
+ end
536
+
537
+ class FXColorWheel
538
+ alias old_initialize initialize
539
+ def initialize(p, *args, &blk)
540
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
541
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
542
+ params = {}
543
+ params = args.pop if args.last.is_a? Hash
544
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
545
+ if params.key? :padding
546
+ value = params.delete(:padding)
547
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
548
+ end
549
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
550
+ params = default_params.merge(params)
551
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
552
+ end
553
+ end
554
+
555
+ class FXComboBox
556
+ alias old_initialize initialize
557
+ def initialize(p, cols, *args, &blk)
558
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
559
+ default_params = { :target => nil, :selector => 0, :opts => COMBOBOX_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
560
+ params = {}
561
+ params = args.pop if args.last.is_a? Hash
562
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
563
+ if params.key? :padding
564
+ value = params.delete(:padding)
565
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
566
+ end
567
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
568
+ params = default_params.merge(params)
569
+ old_initialize(p, cols, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
570
+ end
571
+ end
572
+
573
+ class FXComposite
574
+ alias old_initialize initialize
575
+ def initialize(parent, *args, &blk)
576
+ argument_names = %w{opts x y width height}
577
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
578
+ params = {}
579
+ params = args.pop if args.last.is_a? Hash
580
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
581
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
582
+ params = default_params.merge(params)
583
+ old_initialize(parent, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
584
+ end
585
+ end
586
+
587
+ class FXDataTarget
588
+ alias old_initialize initialize
589
+ def initialize(*args, &blk)
590
+ argument_names = %w{value target selector}
591
+ default_params = { :value => nil, :target => nil, :selector => 0 }
592
+ params = {}
593
+ params = args.pop if args.last.is_a? Hash
594
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
595
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
596
+ params = default_params.merge(params)
597
+ old_initialize(params[:value], params[:target], params[:selector], &blk)
598
+ end
599
+ end
600
+
601
+ class FXDelegator
602
+ alias old_initialize initialize
603
+ def initialize(*args, &blk)
604
+ argument_names = %w{delegate}
605
+ default_params = { :delegate => nil }
606
+ params = {}
607
+ params = args.pop if args.last.is_a? Hash
608
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
609
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
610
+ params = default_params.merge(params)
611
+ old_initialize(params[:delegate], &blk)
612
+ end
613
+ end
614
+
615
+ class FXDial
616
+ alias old_initialize initialize
617
+ def initialize(p, *args, &blk)
618
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
619
+ default_params = { :target => nil, :selector => 0, :opts => DIAL_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
620
+ params = {}
621
+ params = args.pop if args.last.is_a? Hash
622
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
623
+ if params.key? :padding
624
+ value = params.delete(:padding)
625
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
626
+ end
627
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
628
+ params = default_params.merge(params)
629
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
630
+ end
631
+ end
632
+
633
+ class FXDialogBox
634
+ alias old_initialize initialize
635
+ def initialize(owner, title, *args, &blk)
636
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
637
+ default_params = { :opts => DECOR_TITLE|DECOR_BORDER, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 10, :padRight => 10, :padTop => 10, :padBottom => 10, :hSpacing => 4, :vSpacing => 4 }
638
+ params = {}
639
+ params = args.pop if args.last.is_a? Hash
640
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
641
+ if params.key? :padding
642
+ value = params.delete(:padding)
643
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
644
+ end
645
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
646
+ params = default_params.merge(params)
647
+ old_initialize(owner, title, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
648
+ end
649
+ end
650
+
651
+ class FXDirBox
652
+ alias old_initialize initialize
653
+ def initialize(p, *args, &blk)
654
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
655
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_SUNKEN|FRAME_THICK|TREELISTBOX_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
656
+ params = {}
657
+ params = args.pop if args.last.is_a? Hash
658
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
659
+ if params.key? :padding
660
+ value = params.delete(:padding)
661
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
662
+ end
663
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
664
+ params = default_params.merge(params)
665
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
666
+ end
667
+ end
668
+
669
+ class FXDirDialog
670
+ alias old_initialize initialize
671
+ def initialize(owner, name, *args, &blk)
672
+ argument_names = %w{opts x y width height}
673
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 500, :height => 300 }
674
+ params = {}
675
+ params = args.pop if args.last.is_a? Hash
676
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
677
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
678
+ params = default_params.merge(params)
679
+ old_initialize(owner, name, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
680
+ end
681
+ end
682
+
683
+ class FXDirItem
684
+ alias old_initialize initialize
685
+ def initialize(text, *args, &blk)
686
+ argument_names = %w{oi ci data}
687
+ default_params = { :oi => nil, :ci => nil, :data => nil }
688
+ params = {}
689
+ params = args.pop if args.last.is_a? Hash
690
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
691
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
692
+ params = default_params.merge(params)
693
+ old_initialize(text, params[:oi], params[:ci], params[:data], &blk)
694
+ end
695
+ end
696
+
697
+ class FXDirList
698
+ alias old_initialize initialize
699
+ def initialize(p, *args, &blk)
700
+ argument_names = %w{target selector opts x y width height}
701
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
702
+ params = {}
703
+ params = args.pop if args.last.is_a? Hash
704
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
705
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
706
+ params = default_params.merge(params)
707
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
708
+ end
709
+ end
710
+
711
+ class FXDirSelector
712
+ alias old_initialize initialize
713
+ def initialize(p, *args, &blk)
714
+ argument_names = %w{target selector opts x y width height}
715
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
716
+ params = {}
717
+ params = args.pop if args.last.is_a? Hash
718
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
719
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
720
+ params = default_params.merge(params)
721
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
722
+ end
723
+ end
724
+
725
+ class FXDockSite
726
+ alias old_initialize initialize
727
+ def initialize(p, *args, &blk)
728
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
729
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0, :hSpacing => 0, :vSpacing => 0 }
730
+ params = {}
731
+ params = args.pop if args.last.is_a? Hash
732
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
733
+ if params.key? :padding
734
+ value = params.delete(:padding)
735
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
736
+ end
737
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
738
+ params = default_params.merge(params)
739
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
740
+ end
741
+ end
742
+
743
+ class FXDockTitle
744
+ alias old_initialize initialize
745
+ def initialize(p, text, *args, &blk)
746
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
747
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_NORMAL|JUSTIFY_CENTER_X|JUSTIFY_CENTER_Y, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0 }
748
+ params = {}
749
+ params = args.pop if args.last.is_a? Hash
750
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
751
+ if params.key? :padding
752
+ value = params.delete(:padding)
753
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
754
+ end
755
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
756
+ params = default_params.merge(params)
757
+ old_initialize(p, text, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
758
+ end
759
+ end
760
+
761
+ class FXDriveBox
762
+ alias old_initialize initialize
763
+ def initialize(p, *args, &blk)
764
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
765
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_SUNKEN|FRAME_THICK|LISTBOX_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
766
+ params = {}
767
+ params = args.pop if args.last.is_a? Hash
768
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
769
+ if params.key? :padding
770
+ value = params.delete(:padding)
771
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
772
+ end
773
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
774
+ params = default_params.merge(params)
775
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
776
+ end
777
+ end
778
+
779
+ class FXFileDialog
780
+ alias old_initialize initialize
781
+ def initialize(owner, name, *args, &blk)
782
+ argument_names = %w{opts x y width height}
783
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 500, :height => 300 }
784
+ params = {}
785
+ params = args.pop if args.last.is_a? Hash
786
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
787
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
788
+ params = default_params.merge(params)
789
+ old_initialize(owner, name, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
790
+ end
791
+ end
792
+
793
+ class FXFileDict
794
+ alias old_initialize initialize
795
+ def initialize(app, *args, &blk)
796
+ argument_names = %w{db}
797
+ default_params = { :db => nil }
798
+ params = {}
799
+ params = args.pop if args.last.is_a? Hash
800
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
801
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
802
+ params = default_params.merge(params)
803
+ old_initialize(app, params[:db], &blk)
804
+ end
805
+ end
806
+
807
+ class FXFileItem
808
+ alias old_initialize initialize
809
+ def initialize(text, *args, &blk)
810
+ argument_names = %w{bi mi ptr}
811
+ default_params = { :bi => nil, :mi => nil, :ptr => nil }
812
+ params = {}
813
+ params = args.pop if args.last.is_a? Hash
814
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
815
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
816
+ params = default_params.merge(params)
817
+ old_initialize(text, params[:bi], params[:mi], params[:ptr], &blk)
818
+ end
819
+ end
820
+
821
+ class FXFileList
822
+ alias old_initialize initialize
823
+ def initialize(p, *args, &blk)
824
+ argument_names = %w{target selector opts x y width height}
825
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
826
+ params = {}
827
+ params = args.pop if args.last.is_a? Hash
828
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
829
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
830
+ params = default_params.merge(params)
831
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
832
+ end
833
+ end
834
+
835
+ class FXFileSelector
836
+ alias old_initialize initialize
837
+ def initialize(p, *args, &blk)
838
+ argument_names = %w{target selector opts x y width height}
839
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
840
+ params = {}
841
+ params = args.pop if args.last.is_a? Hash
842
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
843
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
844
+ params = default_params.merge(params)
845
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
846
+ end
847
+ end
848
+
849
+ class FXFileStream
850
+ alias old_initialize initialize
851
+ def initialize(*args, &blk)
852
+ argument_names = %w{cont}
853
+ default_params = { :cont => nil }
854
+ params = {}
855
+ params = args.pop if args.last.is_a? Hash
856
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
857
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
858
+ params = default_params.merge(params)
859
+ old_initialize(params[:cont], &blk)
860
+ end
861
+ end
862
+
863
+ class FXFoldingItem
864
+ alias old_initialize initialize
865
+ def initialize(text, *args, &blk)
866
+ argument_names = %w{openIcon closedIcon data}
867
+ default_params = { :openIcon => nil, :closedIcon => nil, :data => nil }
868
+ params = {}
869
+ params = args.pop if args.last.is_a? Hash
870
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
871
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
872
+ params = default_params.merge(params)
873
+ old_initialize(text, params[:openIcon], params[:closedIcon], params[:data], &blk)
874
+ end
875
+ end
876
+
877
+ class FXFoldingList
878
+ alias old_initialize initialize
879
+ def initialize(p, *args, &blk)
880
+ argument_names = %w{target selector opts x y width height}
881
+ default_params = { :target => nil, :selector => 0, :opts => TREELIST_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
882
+ params = {}
883
+ params = args.pop if args.last.is_a? Hash
884
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
885
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
886
+ params = default_params.merge(params)
887
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
888
+ end
889
+ end
890
+
891
+ class FXFontDialog
892
+ alias old_initialize initialize
893
+ def initialize(owner, name, *args, &blk)
894
+ argument_names = %w{opts x y width height}
895
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 600, :height => 380 }
896
+ params = {}
897
+ params = args.pop if args.last.is_a? Hash
898
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
899
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
900
+ params = default_params.merge(params)
901
+ old_initialize(owner, name, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
902
+ end
903
+ end
904
+
905
+ class FXFontSelector
906
+ alias old_initialize initialize
907
+ def initialize(p, *args, &blk)
908
+ argument_names = %w{target selector opts x y width height}
909
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
910
+ params = {}
911
+ params = args.pop if args.last.is_a? Hash
912
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
913
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
914
+ params = default_params.merge(params)
915
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
916
+ end
917
+ end
918
+
919
+ class FXFrame
920
+ alias old_initialize initialize
921
+ def initialize(parent, *args, &blk)
922
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
923
+ default_params = { :opts => FRAME_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
924
+ params = {}
925
+ params = args.pop if args.last.is_a? Hash
926
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
927
+ if params.key? :padding
928
+ value = params.delete(:padding)
929
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
930
+ end
931
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
932
+ params = default_params.merge(params)
933
+ old_initialize(parent, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
934
+ end
935
+ end
936
+
937
+ class FXGIFCursor
938
+ alias old_initialize initialize
939
+ def initialize(a, pix, *args, &blk)
940
+ argument_names = %w{hx hy}
941
+ default_params = { :hx => -1, :hy => -1 }
942
+ params = {}
943
+ params = args.pop if args.last.is_a? Hash
944
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
945
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
946
+ params = default_params.merge(params)
947
+ old_initialize(a, pix, params[:hx], params[:hy], &blk)
948
+ end
949
+ end
950
+
951
+ class FXGIFIcon
952
+ alias old_initialize initialize
953
+ def initialize(a, *args, &blk)
954
+ argument_names = %w{pix clr opts width height}
955
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
956
+ params = {}
957
+ params = args.pop if args.last.is_a? Hash
958
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
959
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
960
+ params = default_params.merge(params)
961
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
962
+ end
963
+ end
964
+
965
+ class FXGIFImage
966
+ alias old_initialize initialize
967
+ def initialize(a, *args, &blk)
968
+ argument_names = %w{pix opts width height}
969
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
970
+ params = {}
971
+ params = args.pop if args.last.is_a? Hash
972
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
973
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
974
+ params = default_params.merge(params)
975
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
976
+ end
977
+ end
978
+
979
+ class FXGLContext
980
+ alias old_initialize initialize
981
+ def initialize(app, visual, *args, &blk)
982
+ argument_names = %w{other}
983
+ default_params = { :other => nil }
984
+ params = {}
985
+ params = args.pop if args.last.is_a? Hash
986
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
987
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
988
+ params = default_params.merge(params)
989
+ old_initialize(app, visual, params[:other], &blk)
990
+ end
991
+ end
992
+
993
+ class FXGradientBar
994
+ alias old_initialize initialize
995
+ def initialize(p, *args, &blk)
996
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
997
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
998
+ params = {}
999
+ params = args.pop if args.last.is_a? Hash
1000
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1001
+ if params.key? :padding
1002
+ value = params.delete(:padding)
1003
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1004
+ end
1005
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1006
+ params = default_params.merge(params)
1007
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1008
+ end
1009
+ end
1010
+
1011
+ class FXGroupBox
1012
+ alias old_initialize initialize
1013
+ def initialize(parent, text, *args, &blk)
1014
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
1015
+ default_params = { :opts => GROUPBOX_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
1016
+ params = {}
1017
+ params = args.pop if args.last.is_a? Hash
1018
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1019
+ if params.key? :padding
1020
+ value = params.delete(:padding)
1021
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1022
+ end
1023
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1024
+ params = default_params.merge(params)
1025
+ old_initialize(parent, text, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
1026
+ end
1027
+ end
1028
+
1029
+ class FXHeaderItem
1030
+ alias old_initialize initialize
1031
+ def initialize(text, *args, &blk)
1032
+ argument_names = %w{ic s ptr}
1033
+ default_params = { :ic => nil, :s => 0, :ptr => nil }
1034
+ params = {}
1035
+ params = args.pop if args.last.is_a? Hash
1036
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1037
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1038
+ params = default_params.merge(params)
1039
+ old_initialize(text, params[:ic], params[:s], params[:ptr], &blk)
1040
+ end
1041
+ end
1042
+
1043
+ class FXHeader
1044
+ alias old_initialize initialize
1045
+ def initialize(p, *args, &blk)
1046
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1047
+ default_params = { :target => nil, :selector => 0, :opts => HEADER_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1048
+ params = {}
1049
+ params = args.pop if args.last.is_a? Hash
1050
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1051
+ if params.key? :padding
1052
+ value = params.delete(:padding)
1053
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1054
+ end
1055
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1056
+ params = default_params.merge(params)
1057
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1058
+ end
1059
+ end
1060
+
1061
+ class FXHorizontalFrame
1062
+ alias old_initialize initialize
1063
+ def initialize(p, *args, &blk)
1064
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
1065
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
1066
+ params = {}
1067
+ params = args.pop if args.last.is_a? Hash
1068
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1069
+ if params.key? :padding
1070
+ value = params.delete(:padding)
1071
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1072
+ end
1073
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1074
+ params = default_params.merge(params)
1075
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
1076
+ end
1077
+ end
1078
+
1079
+ class FXICOIcon
1080
+ alias old_initialize initialize
1081
+ def initialize(a, *args, &blk)
1082
+ argument_names = %w{pix clr opts width height}
1083
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
1084
+ params = {}
1085
+ params = args.pop if args.last.is_a? Hash
1086
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1087
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1088
+ params = default_params.merge(params)
1089
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
1090
+ end
1091
+ end
1092
+
1093
+ class FXICOImage
1094
+ alias old_initialize initialize
1095
+ def initialize(a, *args, &blk)
1096
+ argument_names = %w{pix opts width height}
1097
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
1098
+ params = {}
1099
+ params = args.pop if args.last.is_a? Hash
1100
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1101
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1102
+ params = default_params.merge(params)
1103
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
1104
+ end
1105
+ end
1106
+
1107
+ class FXIcon
1108
+ alias old_initialize initialize
1109
+ def initialize(app, *args, &blk)
1110
+ argument_names = %w{pix clr opts width height}
1111
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
1112
+ params = {}
1113
+ params = args.pop if args.last.is_a? Hash
1114
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1115
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1116
+ params = default_params.merge(params)
1117
+ old_initialize(app, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
1118
+ end
1119
+ end
1120
+
1121
+ class FXIconDict
1122
+ alias old_initialize initialize
1123
+ def initialize(app, *args, &blk)
1124
+ argument_names = %w{path}
1125
+ default_params = { :path => FXIconDict.defaultIconPath }
1126
+ params = {}
1127
+ params = args.pop if args.last.is_a? Hash
1128
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1129
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1130
+ params = default_params.merge(params)
1131
+ old_initialize(app, params[:path], &blk)
1132
+ end
1133
+ end
1134
+
1135
+ class FXIconItem
1136
+ alias old_initialize initialize
1137
+ def initialize(text, *args, &blk)
1138
+ argument_names = %w{bigIcon miniIcon data}
1139
+ default_params = { :bigIcon => nil, :miniIcon => nil, :data => nil }
1140
+ params = {}
1141
+ params = args.pop if args.last.is_a? Hash
1142
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1143
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1144
+ params = default_params.merge(params)
1145
+ old_initialize(text, params[:bigIcon], params[:miniIcon], params[:data], &blk)
1146
+ end
1147
+ end
1148
+
1149
+ class FXIconList
1150
+ alias old_initialize initialize
1151
+ def initialize(p, *args, &blk)
1152
+ argument_names = %w{target selector opts x y width height}
1153
+ default_params = { :target => nil, :selector => 0, :opts => ICONLIST_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
1154
+ params = {}
1155
+ params = args.pop if args.last.is_a? Hash
1156
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1157
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1158
+ params = default_params.merge(params)
1159
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1160
+ end
1161
+ end
1162
+
1163
+ class FXImage
1164
+ alias old_initialize initialize
1165
+ def initialize(a, *args, &blk)
1166
+ argument_names = %w{pixels opts width height}
1167
+ default_params = { :pixels => nil, :opts => 0, :width => 1, :height => 1 }
1168
+ params = {}
1169
+ params = args.pop if args.last.is_a? Hash
1170
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1171
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1172
+ params = default_params.merge(params)
1173
+ old_initialize(a, params[:pixels], params[:opts], params[:width], params[:height], &blk)
1174
+ end
1175
+ end
1176
+
1177
+ class FXImageFrame
1178
+ alias old_initialize initialize
1179
+ def initialize(p, img, *args, &blk)
1180
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
1181
+ default_params = { :opts => FRAME_SUNKEN|FRAME_THICK, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0 }
1182
+ params = {}
1183
+ params = args.pop if args.last.is_a? Hash
1184
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1185
+ if params.key? :padding
1186
+ value = params.delete(:padding)
1187
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1188
+ end
1189
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1190
+ params = default_params.merge(params)
1191
+ old_initialize(p, img, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1192
+ end
1193
+ end
1194
+
1195
+ class FXImageView
1196
+ alias old_initialize initialize
1197
+ def initialize(p, *args, &blk)
1198
+ argument_names = %w{img target selector opts x y width height}
1199
+ default_params = { :img => nil, :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1200
+ params = {}
1201
+ params = args.pop if args.last.is_a? Hash
1202
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1203
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1204
+ params = default_params.merge(params)
1205
+ old_initialize(p, params[:img], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1206
+ end
1207
+ end
1208
+
1209
+ class FXInputDialog
1210
+ alias old_initialize initialize
1211
+ def initialize(owner, caption, label, *args, &blk)
1212
+ argument_names = %w{icon opts x y width height}
1213
+ default_params = { :icon => nil, :opts => INPUTDIALOG_STRING, :x => 0, :y => 0, :width => 0, :height => 0 }
1214
+ params = {}
1215
+ params = args.pop if args.last.is_a? Hash
1216
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1217
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1218
+ params = default_params.merge(params)
1219
+ old_initialize(owner, caption, label, params[:icon], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1220
+ end
1221
+ end
1222
+
1223
+ class FXJPGIcon
1224
+ alias old_initialize initialize
1225
+ def initialize(a, *args, &blk)
1226
+ argument_names = %w{pix clr opts width height}
1227
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
1228
+ params = {}
1229
+ params = args.pop if args.last.is_a? Hash
1230
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1231
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1232
+ params = default_params.merge(params)
1233
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
1234
+ end
1235
+ end
1236
+
1237
+ class FXJPGImage
1238
+ alias old_initialize initialize
1239
+ def initialize(a, *args, &blk)
1240
+ argument_names = %w{pix opts width height}
1241
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
1242
+ params = {}
1243
+ params = args.pop if args.last.is_a? Hash
1244
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1245
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1246
+ params = default_params.merge(params)
1247
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
1248
+ end
1249
+ end
1250
+
1251
+ class FXKnob
1252
+ alias old_initialize initialize
1253
+ def initialize(p, *args, &blk)
1254
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1255
+ default_params = { :target => nil, :selector => 0, :opts => KNOB_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1256
+ params = {}
1257
+ params = args.pop if args.last.is_a? Hash
1258
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1259
+ if params.key? :padding
1260
+ value = params.delete(:padding)
1261
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1262
+ end
1263
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1264
+ params = default_params.merge(params)
1265
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1266
+ end
1267
+ end
1268
+
1269
+ class FXLabel
1270
+ alias old_initialize initialize
1271
+ def initialize(parent, text, *args, &blk)
1272
+ argument_names = %w{icon opts x y width height padLeft padRight padTop padBottom}
1273
+ default_params = { :icon => nil, :opts => LABEL_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1274
+ params = {}
1275
+ params = args.pop if args.last.is_a? Hash
1276
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1277
+ if params.key? :padding
1278
+ value = params.delete(:padding)
1279
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1280
+ end
1281
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1282
+ params = default_params.merge(params)
1283
+ old_initialize(parent, text, params[:icon], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1284
+ end
1285
+ end
1286
+
1287
+ class FXListItem
1288
+ alias old_initialize initialize
1289
+ def initialize(text, *args, &blk)
1290
+ argument_names = %w{icon data}
1291
+ default_params = { :icon => nil, :data => nil }
1292
+ params = {}
1293
+ params = args.pop if args.last.is_a? Hash
1294
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1295
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1296
+ params = default_params.merge(params)
1297
+ old_initialize(text, params[:icon], params[:data], &blk)
1298
+ end
1299
+ end
1300
+
1301
+ class FXList
1302
+ alias old_initialize initialize
1303
+ def initialize(p, *args, &blk)
1304
+ argument_names = %w{target selector opts x y width height}
1305
+ default_params = { :target => nil, :selector => 0, :opts => LIST_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
1306
+ params = {}
1307
+ params = args.pop if args.last.is_a? Hash
1308
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1309
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1310
+ params = default_params.merge(params)
1311
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1312
+ end
1313
+ end
1314
+
1315
+ class FXListBox
1316
+ alias old_initialize initialize
1317
+ def initialize(p, *args, &blk)
1318
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1319
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_SUNKEN|FRAME_THICK|LISTBOX_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1320
+ params = {}
1321
+ params = args.pop if args.last.is_a? Hash
1322
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1323
+ if params.key? :padding
1324
+ value = params.delete(:padding)
1325
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1326
+ end
1327
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1328
+ params = default_params.merge(params)
1329
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1330
+ end
1331
+ end
1332
+
1333
+ class FXMainWindow
1334
+ alias old_initialize initialize
1335
+ def initialize(app, title, *args, &blk)
1336
+ argument_names = %w{icon miniIcon opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
1337
+ default_params = { :icon => nil, :miniIcon => nil, :opts => DECOR_ALL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0, :hSpacing => 4, :vSpacing => 4 }
1338
+ params = {}
1339
+ params = args.pop if args.last.is_a? Hash
1340
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1341
+ if params.key? :padding
1342
+ value = params.delete(:padding)
1343
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1344
+ end
1345
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1346
+ params = default_params.merge(params)
1347
+ old_initialize(app, title, params[:icon], params[:miniIcon], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
1348
+ end
1349
+ end
1350
+
1351
+ class FXMatrix
1352
+ alias old_initialize initialize
1353
+ def initialize(parent, *args, &blk)
1354
+ argument_names = %w{n opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
1355
+ default_params = { :n => 1, :opts => MATRIX_BY_ROWS, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
1356
+ params = {}
1357
+ params = args.pop if args.last.is_a? Hash
1358
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1359
+ if params.key? :padding
1360
+ value = params.delete(:padding)
1361
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1362
+ end
1363
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1364
+ params = default_params.merge(params)
1365
+ old_initialize(parent, params[:n], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
1366
+ end
1367
+ end
1368
+
1369
+ class FXMDIDeleteButton
1370
+ alias old_initialize initialize
1371
+ def initialize(p, *args, &blk)
1372
+ argument_names = %w{target selector opts x y width height}
1373
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_RAISED, :x => 0, :y => 0, :width => 0, :height => 0 }
1374
+ params = {}
1375
+ params = args.pop if args.last.is_a? Hash
1376
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1377
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1378
+ params = default_params.merge(params)
1379
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1380
+ end
1381
+ end
1382
+
1383
+ class FXMDIRestoreButton
1384
+ alias old_initialize initialize
1385
+ def initialize(p, *args, &blk)
1386
+ argument_names = %w{target selector opts x y width height}
1387
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_RAISED, :x => 0, :y => 0, :width => 0, :height => 0 }
1388
+ params = {}
1389
+ params = args.pop if args.last.is_a? Hash
1390
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1391
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1392
+ params = default_params.merge(params)
1393
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1394
+ end
1395
+ end
1396
+
1397
+ class FXMDIMaximizeButton
1398
+ alias old_initialize initialize
1399
+ def initialize(p, *args, &blk)
1400
+ argument_names = %w{target selector opts x y width height}
1401
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_RAISED, :x => 0, :y => 0, :width => 0, :height => 0 }
1402
+ params = {}
1403
+ params = args.pop if args.last.is_a? Hash
1404
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1405
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1406
+ params = default_params.merge(params)
1407
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1408
+ end
1409
+ end
1410
+
1411
+ class FXMDIMinimizeButton
1412
+ alias old_initialize initialize
1413
+ def initialize(p, *args, &blk)
1414
+ argument_names = %w{target selector opts x y width height}
1415
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_RAISED, :x => 0, :y => 0, :width => 0, :height => 0 }
1416
+ params = {}
1417
+ params = args.pop if args.last.is_a? Hash
1418
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1419
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1420
+ params = default_params.merge(params)
1421
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1422
+ end
1423
+ end
1424
+
1425
+ class FXMDIWindowButton
1426
+ alias old_initialize initialize
1427
+ def initialize(p, pup, *args, &blk)
1428
+ argument_names = %w{target selector opts x y width height}
1429
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1430
+ params = {}
1431
+ params = args.pop if args.last.is_a? Hash
1432
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1433
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1434
+ params = default_params.merge(params)
1435
+ old_initialize(p, pup, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1436
+ end
1437
+ end
1438
+
1439
+ class FXMDIMenu
1440
+ alias old_initialize initialize
1441
+ def initialize(owner, *args, &blk)
1442
+ argument_names = %w{target}
1443
+ default_params = { :target => nil }
1444
+ params = {}
1445
+ params = args.pop if args.last.is_a? Hash
1446
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1447
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1448
+ params = default_params.merge(params)
1449
+ old_initialize(owner, params[:target], &blk)
1450
+ end
1451
+ end
1452
+
1453
+ class FXMDIChild
1454
+ alias old_initialize initialize
1455
+ def initialize(p, name, *args, &blk)
1456
+ argument_names = %w{ic pup opts x y width height}
1457
+ default_params = { :ic => nil, :pup => nil, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1458
+ params = {}
1459
+ params = args.pop if args.last.is_a? Hash
1460
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1461
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1462
+ params = default_params.merge(params)
1463
+ old_initialize(p, name, params[:ic], params[:pup], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1464
+ end
1465
+ end
1466
+
1467
+ class FXMDIClient
1468
+ alias old_initialize initialize
1469
+ def initialize(p, *args, &blk)
1470
+ argument_names = %w{opts x y width height}
1471
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1472
+ params = {}
1473
+ params = args.pop if args.last.is_a? Hash
1474
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1475
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1476
+ params = default_params.merge(params)
1477
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1478
+ end
1479
+ end
1480
+
1481
+ class FXMemoryStream
1482
+ alias old_initialize initialize
1483
+ def initialize(*args, &blk)
1484
+ argument_names = %w{cont}
1485
+ default_params = { :cont => nil }
1486
+ params = {}
1487
+ params = args.pop if args.last.is_a? Hash
1488
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1489
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1490
+ params = default_params.merge(params)
1491
+ old_initialize(params[:cont], &blk)
1492
+ end
1493
+ end
1494
+
1495
+ class FXMenuButton
1496
+ alias old_initialize initialize
1497
+ def initialize(parent, text, *args, &blk)
1498
+ argument_names = %w{icon popupMenu opts x y width height padLeft padRight padTop padBottom}
1499
+ default_params = { :icon => nil, :popupMenu => nil, :opts => JUSTIFY_NORMAL|ICON_BEFORE_TEXT|MENUBUTTON_DOWN, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING }
1500
+ params = {}
1501
+ params = args.pop if args.last.is_a? Hash
1502
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1503
+ if params.key? :padding
1504
+ value = params.delete(:padding)
1505
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1506
+ end
1507
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1508
+ params = default_params.merge(params)
1509
+ old_initialize(parent, text, params[:icon], params[:popupMenu], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1510
+ end
1511
+ end
1512
+
1513
+ class FXMenuCaption
1514
+ alias old_initialize initialize
1515
+ def initialize(parent, text, *args, &blk)
1516
+ argument_names = %w{icon opts}
1517
+ default_params = { :icon => nil, :opts => 0 }
1518
+ params = {}
1519
+ params = args.pop if args.last.is_a? Hash
1520
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1521
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1522
+ params = default_params.merge(params)
1523
+ old_initialize(parent, text, params[:icon], params[:opts], &blk)
1524
+ end
1525
+ end
1526
+
1527
+ class FXMenuCascade
1528
+ alias old_initialize initialize
1529
+ def initialize(parent, text, *args, &blk)
1530
+ argument_names = %w{icon popupMenu opts}
1531
+ default_params = { :icon => nil, :popupMenu => nil, :opts => 0 }
1532
+ params = {}
1533
+ params = args.pop if args.last.is_a? Hash
1534
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1535
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1536
+ params = default_params.merge(params)
1537
+ old_initialize(parent, text, params[:icon], params[:popupMenu], params[:opts], &blk)
1538
+ end
1539
+ end
1540
+
1541
+ class FXMenuCheck
1542
+ alias old_initialize initialize
1543
+ def initialize(p, text, *args, &blk)
1544
+ argument_names = %w{target selector opts}
1545
+ default_params = { :target => nil, :selector => 0, :opts => 0 }
1546
+ params = {}
1547
+ params = args.pop if args.last.is_a? Hash
1548
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1549
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1550
+ params = default_params.merge(params)
1551
+ old_initialize(p, text, params[:target], params[:selector], params[:opts], &blk)
1552
+ end
1553
+ end
1554
+
1555
+ class FXMenuCommand
1556
+ alias old_initialize initialize
1557
+ def initialize(p, text, *args, &blk)
1558
+ argument_names = %w{ic target selector opts}
1559
+ default_params = { :ic => nil, :target => nil, :selector => 0, :opts => 0 }
1560
+ params = {}
1561
+ params = args.pop if args.last.is_a? Hash
1562
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1563
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1564
+ params = default_params.merge(params)
1565
+ old_initialize(p, text, params[:ic], params[:target], params[:selector], params[:opts], &blk)
1566
+ end
1567
+ end
1568
+
1569
+ class FXMenuPane
1570
+ alias old_initialize initialize
1571
+ def initialize(owner, *args, &blk)
1572
+ argument_names = %w{opts}
1573
+ default_params = { :opts => 0 }
1574
+ params = {}
1575
+ params = args.pop if args.last.is_a? Hash
1576
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1577
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1578
+ params = default_params.merge(params)
1579
+ old_initialize(owner, params[:opts], &blk)
1580
+ end
1581
+ end
1582
+
1583
+ class FXMenuRadio
1584
+ alias old_initialize initialize
1585
+ def initialize(p, text, *args, &blk)
1586
+ argument_names = %w{target selector opts}
1587
+ default_params = { :target => nil, :selector => 0, :opts => 0 }
1588
+ params = {}
1589
+ params = args.pop if args.last.is_a? Hash
1590
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1591
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1592
+ params = default_params.merge(params)
1593
+ old_initialize(p, text, params[:target], params[:selector], params[:opts], &blk)
1594
+ end
1595
+ end
1596
+
1597
+ class FXMenuSeparator
1598
+ alias old_initialize initialize
1599
+ def initialize(parent, *args, &blk)
1600
+ argument_names = %w{opts}
1601
+ default_params = { :opts => 0 }
1602
+ params = {}
1603
+ params = args.pop if args.last.is_a? Hash
1604
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1605
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1606
+ params = default_params.merge(params)
1607
+ old_initialize(parent, params[:opts], &blk)
1608
+ end
1609
+ end
1610
+
1611
+ class FXMenuTitle
1612
+ alias old_initialize initialize
1613
+ def initialize(parent, text, *args, &blk)
1614
+ argument_names = %w{icon popupMenu opts}
1615
+ default_params = { :icon => nil, :popupMenu => nil, :opts => 0 }
1616
+ params = {}
1617
+ params = args.pop if args.last.is_a? Hash
1618
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1619
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1620
+ params = default_params.merge(params)
1621
+ old_initialize(parent, text, params[:icon], params[:popupMenu], params[:opts], &blk)
1622
+ end
1623
+ end
1624
+
1625
+ class FXMessageBox
1626
+ alias old_initialize initialize
1627
+ def initialize(owner, caption, text, *args, &blk)
1628
+ argument_names = %w{ic opts x y}
1629
+ default_params = { :ic => nil, :opts => 0, :x => 0, :y => 0 }
1630
+ params = {}
1631
+ params = args.pop if args.last.is_a? Hash
1632
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1633
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1634
+ params = default_params.merge(params)
1635
+ old_initialize(owner, caption, text, params[:ic], params[:opts], params[:x], params[:y], &blk)
1636
+ end
1637
+ end
1638
+
1639
+ class FXOption
1640
+ alias old_initialize initialize
1641
+ def initialize(p, text, *args, &blk)
1642
+ argument_names = %w{ic target selector opts x y width height padLeft padRight padTop padBottom}
1643
+ default_params = { :ic => nil, :target => nil, :selector => 0, :opts => JUSTIFY_NORMAL|ICON_BEFORE_TEXT, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1644
+ params = {}
1645
+ params = args.pop if args.last.is_a? Hash
1646
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1647
+ if params.key? :padding
1648
+ value = params.delete(:padding)
1649
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1650
+ end
1651
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1652
+ params = default_params.merge(params)
1653
+ old_initialize(p, text, params[:ic], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1654
+ end
1655
+ end
1656
+
1657
+ class FXOptionMenu
1658
+ alias old_initialize initialize
1659
+ def initialize(p, *args, &blk)
1660
+ argument_names = %w{pup opts x y width height padLeft padRight padTop padBottom}
1661
+ default_params = { :pup => nil, :opts => JUSTIFY_NORMAL|ICON_BEFORE_TEXT, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1662
+ params = {}
1663
+ params = args.pop if args.last.is_a? Hash
1664
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1665
+ if params.key? :padding
1666
+ value = params.delete(:padding)
1667
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1668
+ end
1669
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1670
+ params = default_params.merge(params)
1671
+ old_initialize(p, params[:pup], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1672
+ end
1673
+ end
1674
+
1675
+ class FXPacker
1676
+ alias old_initialize initialize
1677
+ def initialize(parent, *args, &blk)
1678
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
1679
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
1680
+ params = {}
1681
+ params = args.pop if args.last.is_a? Hash
1682
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1683
+ if params.key? :padding
1684
+ value = params.delete(:padding)
1685
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1686
+ end
1687
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1688
+ params = default_params.merge(params)
1689
+ old_initialize(parent, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
1690
+ end
1691
+ end
1692
+
1693
+ class FXPCXIcon
1694
+ alias old_initialize initialize
1695
+ def initialize(a, *args, &blk)
1696
+ argument_names = %w{pix clr opts width height}
1697
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
1698
+ params = {}
1699
+ params = args.pop if args.last.is_a? Hash
1700
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1701
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1702
+ params = default_params.merge(params)
1703
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
1704
+ end
1705
+ end
1706
+
1707
+ class FXPCXImage
1708
+ alias old_initialize initialize
1709
+ def initialize(a, *args, &blk)
1710
+ argument_names = %w{pix opts width height}
1711
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
1712
+ params = {}
1713
+ params = args.pop if args.last.is_a? Hash
1714
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1715
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1716
+ params = default_params.merge(params)
1717
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
1718
+ end
1719
+ end
1720
+
1721
+ class FXPicker
1722
+ alias old_initialize initialize
1723
+ def initialize(p, text, *args, &blk)
1724
+ argument_names = %w{ic target selector opts x y width height padLeft padRight padTop padBottom}
1725
+ default_params = { :ic => nil, :target => nil, :selector => 0, :opts => BUTTON_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1726
+ params = {}
1727
+ params = args.pop if args.last.is_a? Hash
1728
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1729
+ if params.key? :padding
1730
+ value = params.delete(:padding)
1731
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1732
+ end
1733
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1734
+ params = default_params.merge(params)
1735
+ old_initialize(p, text, params[:ic], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1736
+ end
1737
+ end
1738
+
1739
+ class FXPNGIcon
1740
+ alias old_initialize initialize
1741
+ def initialize(a, *args, &blk)
1742
+ argument_names = %w{pix clr opts width height}
1743
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
1744
+ params = {}
1745
+ params = args.pop if args.last.is_a? Hash
1746
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1747
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1748
+ params = default_params.merge(params)
1749
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
1750
+ end
1751
+ end
1752
+
1753
+ class FXPNGImage
1754
+ alias old_initialize initialize
1755
+ def initialize(a, *args, &blk)
1756
+ argument_names = %w{pix opts width height}
1757
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
1758
+ params = {}
1759
+ params = args.pop if args.last.is_a? Hash
1760
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1761
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1762
+ params = default_params.merge(params)
1763
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
1764
+ end
1765
+ end
1766
+
1767
+ class FXPopup
1768
+ alias old_initialize initialize
1769
+ def initialize(owner, *args, &blk)
1770
+ argument_names = %w{opts x y width height}
1771
+ default_params = { :opts => POPUP_VERTICAL|FRAME_RAISED|FRAME_THICK, :x => 0, :y => 0, :width => 0, :height => 0 }
1772
+ params = {}
1773
+ params = args.pop if args.last.is_a? Hash
1774
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1775
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1776
+ params = default_params.merge(params)
1777
+ old_initialize(owner, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1778
+ end
1779
+ end
1780
+
1781
+ class FXPPMIcon
1782
+ alias old_initialize initialize
1783
+ def initialize(a, *args, &blk)
1784
+ argument_names = %w{pix clr opts width height}
1785
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
1786
+ params = {}
1787
+ params = args.pop if args.last.is_a? Hash
1788
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1789
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1790
+ params = default_params.merge(params)
1791
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
1792
+ end
1793
+ end
1794
+
1795
+ class FXPPMImage
1796
+ alias old_initialize initialize
1797
+ def initialize(a, *args, &blk)
1798
+ argument_names = %w{pix opts width height}
1799
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
1800
+ params = {}
1801
+ params = args.pop if args.last.is_a? Hash
1802
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1803
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1804
+ params = default_params.merge(params)
1805
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
1806
+ end
1807
+ end
1808
+
1809
+ class FXPrintDialog
1810
+ alias old_initialize initialize
1811
+ def initialize(owner, name, *args, &blk)
1812
+ argument_names = %w{opts x y width height}
1813
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1814
+ params = {}
1815
+ params = args.pop if args.last.is_a? Hash
1816
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1817
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1818
+ params = default_params.merge(params)
1819
+ old_initialize(owner, name, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1820
+ end
1821
+ end
1822
+
1823
+ class FXProgressBar
1824
+ alias old_initialize initialize
1825
+ def initialize(p, *args, &blk)
1826
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1827
+ default_params = { :target => nil, :selector => 0, :opts => PROGRESSBAR_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1828
+ params = {}
1829
+ params = args.pop if args.last.is_a? Hash
1830
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1831
+ if params.key? :padding
1832
+ value = params.delete(:padding)
1833
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1834
+ end
1835
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1836
+ params = default_params.merge(params)
1837
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1838
+ end
1839
+ end
1840
+
1841
+ class FXProgressDialog
1842
+ alias old_initialize initialize
1843
+ def initialize(owner, caption, label, *args, &blk)
1844
+ argument_names = %w{opts x y width height}
1845
+ default_params = { :opts => PROGRESSDIALOG_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
1846
+ params = {}
1847
+ params = args.pop if args.last.is_a? Hash
1848
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1849
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1850
+ params = default_params.merge(params)
1851
+ old_initialize(owner, caption, label, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1852
+ end
1853
+ end
1854
+
1855
+ class FXRadioButton
1856
+ alias old_initialize initialize
1857
+ def initialize(parent, text, *args, &blk)
1858
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1859
+ default_params = { :target => nil, :selector => 0, :opts => RADIOBUTTON_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1860
+ params = {}
1861
+ params = args.pop if args.last.is_a? Hash
1862
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1863
+ if params.key? :padding
1864
+ value = params.delete(:padding)
1865
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1866
+ end
1867
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1868
+ params = default_params.merge(params)
1869
+ old_initialize(parent, text, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1870
+ end
1871
+ end
1872
+
1873
+ class FXRealSlider
1874
+ alias old_initialize initialize
1875
+ def initialize(p, *args, &blk)
1876
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1877
+ default_params = { :target => nil, :selector => 0, :opts => REALSLIDER_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0 }
1878
+ params = {}
1879
+ params = args.pop if args.last.is_a? Hash
1880
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1881
+ if params.key? :padding
1882
+ value = params.delete(:padding)
1883
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1884
+ end
1885
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1886
+ params = default_params.merge(params)
1887
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1888
+ end
1889
+ end
1890
+
1891
+ class FXRealSpinner
1892
+ alias old_initialize initialize
1893
+ def initialize(p, cols, *args, &blk)
1894
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1895
+ default_params = { :target => nil, :selector => 0, :opts => REALSPIN_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1896
+ params = {}
1897
+ params = args.pop if args.last.is_a? Hash
1898
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1899
+ if params.key? :padding
1900
+ value = params.delete(:padding)
1901
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1902
+ end
1903
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1904
+ params = default_params.merge(params)
1905
+ old_initialize(p, cols, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1906
+ end
1907
+ end
1908
+
1909
+ class FXRegistry
1910
+ alias old_initialize initialize
1911
+ def initialize(*args, &blk)
1912
+ argument_names = %w{appKey vendorKey}
1913
+ default_params = { :appKey => "", :vendorKey => "" }
1914
+ params = {}
1915
+ params = args.pop if args.last.is_a? Hash
1916
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1917
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1918
+ params = default_params.merge(params)
1919
+ old_initialize(params[:appKey], params[:vendorKey], &blk)
1920
+ end
1921
+ end
1922
+
1923
+ class FXReplaceDialog
1924
+ alias old_initialize initialize
1925
+ def initialize(owner, caption, *args, &blk)
1926
+ argument_names = %w{ic opts x y width height}
1927
+ default_params = { :ic => nil, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1928
+ params = {}
1929
+ params = args.pop if args.last.is_a? Hash
1930
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1931
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1932
+ params = default_params.merge(params)
1933
+ old_initialize(owner, caption, params[:ic], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1934
+ end
1935
+ end
1936
+
1937
+ class FXRGBIcon
1938
+ alias old_initialize initialize
1939
+ def initialize(a, *args, &blk)
1940
+ argument_names = %w{pix clr opts width height}
1941
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
1942
+ params = {}
1943
+ params = args.pop if args.last.is_a? Hash
1944
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1945
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1946
+ params = default_params.merge(params)
1947
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
1948
+ end
1949
+ end
1950
+
1951
+ class FXRGBImage
1952
+ alias old_initialize initialize
1953
+ def initialize(a, *args, &blk)
1954
+ argument_names = %w{pix opts width height}
1955
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
1956
+ params = {}
1957
+ params = args.pop if args.last.is_a? Hash
1958
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1959
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1960
+ params = default_params.merge(params)
1961
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
1962
+ end
1963
+ end
1964
+
1965
+ class FXRuler
1966
+ alias old_initialize initialize
1967
+ def initialize(p, *args, &blk)
1968
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1969
+ default_params = { :target => nil, :selector => 0, :opts => RULER_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1970
+ params = {}
1971
+ params = args.pop if args.last.is_a? Hash
1972
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1973
+ if params.key? :padding
1974
+ value = params.delete(:padding)
1975
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1976
+ end
1977
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1978
+ params = default_params.merge(params)
1979
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1980
+ end
1981
+ end
1982
+
1983
+ class FXRulerView
1984
+ alias old_initialize initialize
1985
+ def initialize(p, *args, &blk)
1986
+ argument_names = %w{target selector opts x y width height}
1987
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1988
+ params = {}
1989
+ params = args.pop if args.last.is_a? Hash
1990
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1991
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1992
+ params = default_params.merge(params)
1993
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1994
+ end
1995
+ end
1996
+
1997
+ class FXScintilla
1998
+ alias old_initialize initialize
1999
+ def initialize(p, *args, &blk)
2000
+ argument_names = %w{target selector opts x y width height}
2001
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
2002
+ params = {}
2003
+ params = args.pop if args.last.is_a? Hash
2004
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2005
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2006
+ params = default_params.merge(params)
2007
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2008
+ end
2009
+ end
2010
+
2011
+ class FXScrollArea
2012
+ alias old_initialize initialize
2013
+ def initialize(parent, *args, &blk)
2014
+ argument_names = %w{opts x y width height}
2015
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
2016
+ params = {}
2017
+ params = args.pop if args.last.is_a? Hash
2018
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2019
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2020
+ params = default_params.merge(params)
2021
+ old_initialize(parent, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2022
+ end
2023
+ end
2024
+
2025
+ class FXScrollBar
2026
+ alias old_initialize initialize
2027
+ def initialize(p, *args, &blk)
2028
+ argument_names = %w{target selector opts x y width height}
2029
+ default_params = { :target => nil, :selector => 0, :opts => SCROLLBAR_VERTICAL, :x => 0, :y => 0, :width => 0, :height => 0 }
2030
+ params = {}
2031
+ params = args.pop if args.last.is_a? Hash
2032
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2033
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2034
+ params = default_params.merge(params)
2035
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2036
+ end
2037
+ end
2038
+
2039
+ class FXScrollPane
2040
+ alias old_initialize initialize
2041
+ def initialize(owner, nvis, *args, &blk)
2042
+ argument_names = %w{opts}
2043
+ default_params = { :opts => 0 }
2044
+ params = {}
2045
+ params = args.pop if args.last.is_a? Hash
2046
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2047
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2048
+ params = default_params.merge(params)
2049
+ old_initialize(owner, nvis, params[:opts], &blk)
2050
+ end
2051
+ end
2052
+
2053
+ class FXScrollWindow
2054
+ alias old_initialize initialize
2055
+ def initialize(p, *args, &blk)
2056
+ argument_names = %w{opts x y width height}
2057
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
2058
+ params = {}
2059
+ params = args.pop if args.last.is_a? Hash
2060
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2061
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2062
+ params = default_params.merge(params)
2063
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2064
+ end
2065
+ end
2066
+
2067
+ class FXSearchDialog
2068
+ alias old_initialize initialize
2069
+ def initialize(owner, caption, *args, &blk)
2070
+ argument_names = %w{ic opts x y width height}
2071
+ default_params = { :ic => nil, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
2072
+ params = {}
2073
+ params = args.pop if args.last.is_a? Hash
2074
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2075
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2076
+ params = default_params.merge(params)
2077
+ old_initialize(owner, caption, params[:ic], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2078
+ end
2079
+ end
2080
+
2081
+ class FXSeparator
2082
+ alias old_initialize initialize
2083
+ def initialize(p, *args, &blk)
2084
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
2085
+ default_params = { :opts => SEPARATOR_GROOVE|LAYOUT_FILL_X, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0 }
2086
+ params = {}
2087
+ params = args.pop if args.last.is_a? Hash
2088
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2089
+ if params.key? :padding
2090
+ value = params.delete(:padding)
2091
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2092
+ end
2093
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2094
+ params = default_params.merge(params)
2095
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2096
+ end
2097
+ end
2098
+
2099
+ class FXHorizontalSeparator
2100
+ alias old_initialize initialize
2101
+ def initialize(p, *args, &blk)
2102
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
2103
+ default_params = { :opts => SEPARATOR_GROOVE|LAYOUT_FILL_X, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 1, :padRight => 1, :padTop => 0, :padBottom => 0 }
2104
+ params = {}
2105
+ params = args.pop if args.last.is_a? Hash
2106
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2107
+ if params.key? :padding
2108
+ value = params.delete(:padding)
2109
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2110
+ end
2111
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2112
+ params = default_params.merge(params)
2113
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2114
+ end
2115
+ end
2116
+
2117
+ class FXVerticalSeparator
2118
+ alias old_initialize initialize
2119
+ def initialize(p, *args, &blk)
2120
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
2121
+ default_params = { :opts => SEPARATOR_GROOVE|LAYOUT_FILL_Y, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 1, :padBottom => 1 }
2122
+ params = {}
2123
+ params = args.pop if args.last.is_a? Hash
2124
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2125
+ if params.key? :padding
2126
+ value = params.delete(:padding)
2127
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2128
+ end
2129
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2130
+ params = default_params.merge(params)
2131
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2132
+ end
2133
+ end
2134
+
2135
+ class FXShutterItem
2136
+ alias old_initialize initialize
2137
+ def initialize(p, *args, &blk)
2138
+ argument_names = %w{text icon opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
2139
+ default_params = { :text => "", :icon => nil, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
2140
+ params = {}
2141
+ params = args.pop if args.last.is_a? Hash
2142
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2143
+ if params.key? :padding
2144
+ value = params.delete(:padding)
2145
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2146
+ end
2147
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2148
+ params = default_params.merge(params)
2149
+ old_initialize(p, params[:text], params[:icon], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
2150
+ end
2151
+ end
2152
+
2153
+ class FXShutter
2154
+ alias old_initialize initialize
2155
+ def initialize(p, *args, &blk)
2156
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
2157
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
2158
+ params = {}
2159
+ params = args.pop if args.last.is_a? Hash
2160
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2161
+ if params.key? :padding
2162
+ value = params.delete(:padding)
2163
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2164
+ end
2165
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2166
+ params = default_params.merge(params)
2167
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
2168
+ end
2169
+ end
2170
+
2171
+ class FXSlider
2172
+ alias old_initialize initialize
2173
+ def initialize(p, *args, &blk)
2174
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2175
+ default_params = { :target => nil, :selector => 0, :opts => SLIDER_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0 }
2176
+ params = {}
2177
+ params = args.pop if args.last.is_a? Hash
2178
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2179
+ if params.key? :padding
2180
+ value = params.delete(:padding)
2181
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2182
+ end
2183
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2184
+ params = default_params.merge(params)
2185
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2186
+ end
2187
+ end
2188
+
2189
+ class FXSpinner
2190
+ alias old_initialize initialize
2191
+ def initialize(p, cols, *args, &blk)
2192
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2193
+ default_params = { :target => nil, :selector => 0, :opts => SPIN_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
2194
+ params = {}
2195
+ params = args.pop if args.last.is_a? Hash
2196
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2197
+ if params.key? :padding
2198
+ value = params.delete(:padding)
2199
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2200
+ end
2201
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2202
+ params = default_params.merge(params)
2203
+ old_initialize(p, cols, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2204
+ end
2205
+ end
2206
+
2207
+ class FXSplashWindow
2208
+ alias old_initialize initialize
2209
+ def initialize(owner, icon, *args, &blk)
2210
+ argument_names = %w{opts ms}
2211
+ default_params = { :opts => SPLASH_SIMPLE, :ms => 5000 }
2212
+ params = {}
2213
+ params = args.pop if args.last.is_a? Hash
2214
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2215
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2216
+ params = default_params.merge(params)
2217
+ old_initialize(owner, icon, params[:opts], params[:ms], &blk)
2218
+ end
2219
+ end
2220
+
2221
+ class FXSpring
2222
+ alias old_initialize initialize
2223
+ def initialize(p, *args, &blk)
2224
+ argument_names = %w{opts relw relh x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
2225
+ default_params = { :opts => 0, :relw => 0, :relh => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
2226
+ params = {}
2227
+ params = args.pop if args.last.is_a? Hash
2228
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2229
+ if params.key? :padding
2230
+ value = params.delete(:padding)
2231
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2232
+ end
2233
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2234
+ params = default_params.merge(params)
2235
+ old_initialize(p, params[:opts], params[:relw], params[:relh], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
2236
+ end
2237
+ end
2238
+
2239
+ class FXStatusBar
2240
+ alias old_initialize initialize
2241
+ def initialize(p, *args, &blk)
2242
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
2243
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 3, :padRight => 3, :padTop => 2, :padBottom => 2, :hSpacing => 4, :vSpacing => 0 }
2244
+ params = {}
2245
+ params = args.pop if args.last.is_a? Hash
2246
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2247
+ if params.key? :padding
2248
+ value = params.delete(:padding)
2249
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2250
+ end
2251
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2252
+ params = default_params.merge(params)
2253
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
2254
+ end
2255
+ end
2256
+
2257
+ class FXStatusLine
2258
+ alias old_initialize initialize
2259
+ def initialize(p, *args, &blk)
2260
+ argument_names = %w{target selector}
2261
+ default_params = { :target => nil, :selector => 0 }
2262
+ params = {}
2263
+ params = args.pop if args.last.is_a? Hash
2264
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2265
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2266
+ params = default_params.merge(params)
2267
+ old_initialize(p, params[:target], params[:selector], &blk)
2268
+ end
2269
+ end
2270
+
2271
+ class FXStream
2272
+ alias old_initialize initialize
2273
+ def initialize(*args, &blk)
2274
+ argument_names = %w{cont}
2275
+ default_params = { :cont => nil }
2276
+ params = {}
2277
+ params = args.pop if args.last.is_a? Hash
2278
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2279
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2280
+ params = default_params.merge(params)
2281
+ old_initialize(params[:cont], &blk)
2282
+ end
2283
+ end
2284
+
2285
+ class FXSwitcher
2286
+ alias old_initialize initialize
2287
+ def initialize(p, *args, &blk)
2288
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
2289
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING }
2290
+ params = {}
2291
+ params = args.pop if args.last.is_a? Hash
2292
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2293
+ if params.key? :padding
2294
+ value = params.delete(:padding)
2295
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2296
+ end
2297
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2298
+ params = default_params.merge(params)
2299
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2300
+ end
2301
+ end
2302
+
2303
+ class FXTabBar
2304
+ alias old_initialize initialize
2305
+ def initialize(p, *args, &blk)
2306
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2307
+ default_params = { :target => nil, :selector => 0, :opts => TABBOOK_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING }
2308
+ params = {}
2309
+ params = args.pop if args.last.is_a? Hash
2310
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2311
+ if params.key? :padding
2312
+ value = params.delete(:padding)
2313
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2314
+ end
2315
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2316
+ params = default_params.merge(params)
2317
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2318
+ end
2319
+ end
2320
+
2321
+ class FXTabBook
2322
+ alias old_initialize initialize
2323
+ def initialize(p, *args, &blk)
2324
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2325
+ default_params = { :target => nil, :selector => 0, :opts => TABBOOK_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING }
2326
+ params = {}
2327
+ params = args.pop if args.last.is_a? Hash
2328
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2329
+ if params.key? :padding
2330
+ value = params.delete(:padding)
2331
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2332
+ end
2333
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2334
+ params = default_params.merge(params)
2335
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2336
+ end
2337
+ end
2338
+
2339
+ class FXTabItem
2340
+ alias old_initialize initialize
2341
+ def initialize(p, text, *args, &blk)
2342
+ argument_names = %w{ic opts x y width height padLeft padRight padTop padBottom}
2343
+ default_params = { :ic => nil, :opts => TAB_TOP_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
2344
+ params = {}
2345
+ params = args.pop if args.last.is_a? Hash
2346
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2347
+ if params.key? :padding
2348
+ value = params.delete(:padding)
2349
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2350
+ end
2351
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2352
+ params = default_params.merge(params)
2353
+ old_initialize(p, text, params[:ic], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2354
+ end
2355
+ end
2356
+
2357
+ class FXTableItem
2358
+ alias old_initialize initialize
2359
+ def initialize(text, *args, &blk)
2360
+ argument_names = %w{icon data}
2361
+ default_params = { :icon => nil, :data => nil }
2362
+ params = {}
2363
+ params = args.pop if args.last.is_a? Hash
2364
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2365
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2366
+ params = default_params.merge(params)
2367
+ old_initialize(text, params[:icon], params[:data], &blk)
2368
+ end
2369
+ end
2370
+
2371
+ class FXTable
2372
+ alias old_initialize initialize
2373
+ def initialize(p, *args, &blk)
2374
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2375
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_MARGIN, :padRight => DEFAULT_MARGIN, :padTop => DEFAULT_MARGIN, :padBottom => DEFAULT_MARGIN }
2376
+ params = {}
2377
+ params = args.pop if args.last.is_a? Hash
2378
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2379
+ if params.key? :padding
2380
+ value = params.delete(:padding)
2381
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2382
+ end
2383
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2384
+ params = default_params.merge(params)
2385
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2386
+ end
2387
+ end
2388
+
2389
+ class FXText
2390
+ alias old_initialize initialize
2391
+ def initialize(p, *args, &blk)
2392
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2393
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 3, :padRight => 3, :padTop => 2, :padBottom => 2 }
2394
+ params = {}
2395
+ params = args.pop if args.last.is_a? Hash
2396
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2397
+ if params.key? :padding
2398
+ value = params.delete(:padding)
2399
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2400
+ end
2401
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2402
+ params = default_params.merge(params)
2403
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2404
+ end
2405
+ end
2406
+
2407
+ class FXTextField
2408
+ alias old_initialize initialize
2409
+ def initialize(p, ncols, *args, &blk)
2410
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2411
+ default_params = { :target => nil, :selector => 0, :opts => TEXTFIELD_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
2412
+ params = {}
2413
+ params = args.pop if args.last.is_a? Hash
2414
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2415
+ if params.key? :padding
2416
+ value = params.delete(:padding)
2417
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2418
+ end
2419
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2420
+ params = default_params.merge(params)
2421
+ old_initialize(p, ncols, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2422
+ end
2423
+ end
2424
+
2425
+ class FXTGAIcon
2426
+ alias old_initialize initialize
2427
+ def initialize(a, *args, &blk)
2428
+ argument_names = %w{pix clr opts width height}
2429
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
2430
+ params = {}
2431
+ params = args.pop if args.last.is_a? Hash
2432
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2433
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2434
+ params = default_params.merge(params)
2435
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
2436
+ end
2437
+ end
2438
+
2439
+ class FXTGAImage
2440
+ alias old_initialize initialize
2441
+ def initialize(a, *args, &blk)
2442
+ argument_names = %w{pix opts width height}
2443
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
2444
+ params = {}
2445
+ params = args.pop if args.last.is_a? Hash
2446
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2447
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2448
+ params = default_params.merge(params)
2449
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
2450
+ end
2451
+ end
2452
+
2453
+ class FXTIFIcon
2454
+ alias old_initialize initialize
2455
+ def initialize(a, *args, &blk)
2456
+ argument_names = %w{pix clr opts width height}
2457
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
2458
+ params = {}
2459
+ params = args.pop if args.last.is_a? Hash
2460
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2461
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2462
+ params = default_params.merge(params)
2463
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
2464
+ end
2465
+ end
2466
+
2467
+ class FXTIFImage
2468
+ alias old_initialize initialize
2469
+ def initialize(a, *args, &blk)
2470
+ argument_names = %w{pix opts width height}
2471
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
2472
+ params = {}
2473
+ params = args.pop if args.last.is_a? Hash
2474
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2475
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2476
+ params = default_params.merge(params)
2477
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
2478
+ end
2479
+ end
2480
+
2481
+ class FXToggleButton
2482
+ alias old_initialize initialize
2483
+ def initialize(p, text1, text2, *args, &blk)
2484
+ argument_names = %w{icon1 icon2 target selector opts x y width height padLeft padRight padTop padBottom}
2485
+ default_params = { :icon1 => nil, :icon2 => nil, :target => nil, :selector => 0, :opts => TOGGLEBUTTON_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
2486
+ params = {}
2487
+ params = args.pop if args.last.is_a? Hash
2488
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2489
+ if params.key? :padding
2490
+ value = params.delete(:padding)
2491
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2492
+ end
2493
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2494
+ params = default_params.merge(params)
2495
+ old_initialize(p, text1, text2, params[:icon1], params[:icon2], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2496
+ end
2497
+ end
2498
+
2499
+ class FXToolBarGrip
2500
+ alias old_initialize initialize
2501
+ def initialize(p, *args, &blk)
2502
+ argument_names = %w{target selector opts x y width height}
2503
+ default_params = { :target => nil, :selector => 0, :opts => TOOLBARGRIP_SINGLE, :x => 0, :y => 0, :width => 0, :height => 0 }
2504
+ params = {}
2505
+ params = args.pop if args.last.is_a? Hash
2506
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2507
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2508
+ params = default_params.merge(params)
2509
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2510
+ end
2511
+ end
2512
+
2513
+ class FXToolBarShell
2514
+ alias old_initialize initialize
2515
+ def initialize(owner, *args, &blk)
2516
+ argument_names = %w{opts x y width height hSpacing vSpacing}
2517
+ default_params = { :opts => FRAME_RAISED|FRAME_THICK, :x => 0, :y => 0, :width => 0, :height => 0, :hSpacing => 4, :vSpacing => 4 }
2518
+ params = {}
2519
+ params = args.pop if args.last.is_a? Hash
2520
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2521
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2522
+ params = default_params.merge(params)
2523
+ old_initialize(owner, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:hSpacing], params[:vSpacing], &blk)
2524
+ end
2525
+ end
2526
+
2527
+ class FXToolBarTab
2528
+ alias old_initialize initialize
2529
+ def initialize(p, *args, &blk)
2530
+ argument_names = %w{target selector opts x y width height}
2531
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_RAISED, :x => 0, :y => 0, :width => 0, :height => 0 }
2532
+ params = {}
2533
+ params = args.pop if args.last.is_a? Hash
2534
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2535
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2536
+ params = default_params.merge(params)
2537
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2538
+ end
2539
+ end
2540
+
2541
+ class FXToolTip
2542
+ alias old_initialize initialize
2543
+ def initialize(app, *args, &blk)
2544
+ argument_names = %w{opts x y width height}
2545
+ default_params = { :opts => TOOLTIP_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
2546
+ params = {}
2547
+ params = args.pop if args.last.is_a? Hash
2548
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2549
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2550
+ params = default_params.merge(params)
2551
+ old_initialize(app, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2552
+ end
2553
+ end
2554
+
2555
+ class FXTreeItem
2556
+ alias old_initialize initialize
2557
+ def initialize(text, *args, &blk)
2558
+ argument_names = %w{openIcon closedIcon data}
2559
+ default_params = { :openIcon => nil, :closedIcon => nil, :data => nil }
2560
+ params = {}
2561
+ params = args.pop if args.last.is_a? Hash
2562
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2563
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2564
+ params = default_params.merge(params)
2565
+ old_initialize(text, params[:openIcon], params[:closedIcon], params[:data], &blk)
2566
+ end
2567
+ end
2568
+
2569
+ class FXTreeList
2570
+ alias old_initialize initialize
2571
+ def initialize(p, *args, &blk)
2572
+ argument_names = %w{target selector opts x y width height}
2573
+ default_params = { :target => nil, :selector => 0, :opts => TREELIST_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
2574
+ params = {}
2575
+ params = args.pop if args.last.is_a? Hash
2576
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2577
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2578
+ params = default_params.merge(params)
2579
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2580
+ end
2581
+ end
2582
+
2583
+ class FXTreeListBox
2584
+ alias old_initialize initialize
2585
+ def initialize(p, *args, &blk)
2586
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2587
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_SUNKEN|FRAME_THICK|TREELISTBOX_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
2588
+ params = {}
2589
+ params = args.pop if args.last.is_a? Hash
2590
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2591
+ if params.key? :padding
2592
+ value = params.delete(:padding)
2593
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2594
+ end
2595
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2596
+ params = default_params.merge(params)
2597
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2598
+ end
2599
+ end
2600
+
2601
+ class FXTriStateButton
2602
+ alias old_initialize initialize
2603
+ def initialize(p, text1, text2, text3, *args, &blk)
2604
+ argument_names = %w{icon1 icon2 icon3 target selector opts x y width height padLeft padRight padTop padBottom}
2605
+ default_params = { :icon1 => nil, :icon2 => nil, :icon3 => nil, :target => nil, :selector => 0, :opts => TOGGLEBUTTON_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
2606
+ params = {}
2607
+ params = args.pop if args.last.is_a? Hash
2608
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2609
+ if params.key? :padding
2610
+ value = params.delete(:padding)
2611
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2612
+ end
2613
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2614
+ params = default_params.merge(params)
2615
+ old_initialize(p, text1, text2, text3, params[:icon1], params[:icon2], params[:icon3], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2616
+ end
2617
+ end
2618
+
2619
+ class FXVerticalFrame
2620
+ alias old_initialize initialize
2621
+ def initialize(p, *args, &blk)
2622
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
2623
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
2624
+ params = {}
2625
+ params = args.pop if args.last.is_a? Hash
2626
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2627
+ if params.key? :padding
2628
+ value = params.delete(:padding)
2629
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2630
+ end
2631
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2632
+ params = default_params.merge(params)
2633
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
2634
+ end
2635
+ end
2636
+
2637
+ class FXVisual
2638
+ alias old_initialize initialize
2639
+ def initialize(a, flgs, *args, &blk)
2640
+ argument_names = %w{d}
2641
+ default_params = { :d => 32 }
2642
+ params = {}
2643
+ params = args.pop if args.last.is_a? Hash
2644
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2645
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2646
+ params = default_params.merge(params)
2647
+ old_initialize(a, flgs, params[:d], &blk)
2648
+ end
2649
+ end
2650
+
2651
+ class FXWizard
2652
+ alias old_initialize initialize
2653
+ def initialize(owner, name, image, *args, &blk)
2654
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
2655
+ default_params = { :opts => DECOR_TITLE|DECOR_BORDER|DECOR_RESIZE, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 10, :padRight => 10, :padTop => 10, :padBottom => 10, :hSpacing => 10, :vSpacing => 10 }
2656
+ params = {}
2657
+ params = args.pop if args.last.is_a? Hash
2658
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2659
+ if params.key? :padding
2660
+ value = params.delete(:padding)
2661
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2662
+ end
2663
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2664
+ params = default_params.merge(params)
2665
+ old_initialize(owner, name, image, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
2666
+ end
2667
+ end
2668
+
2669
+ class FXXBMIcon
2670
+ alias old_initialize initialize
2671
+ def initialize(a, *args, &blk)
2672
+ argument_names = %w{pixels mask clr opts width height}
2673
+ default_params = { :pixels => nil, :mask => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
2674
+ params = {}
2675
+ params = args.pop if args.last.is_a? Hash
2676
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2677
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2678
+ params = default_params.merge(params)
2679
+ old_initialize(a, params[:pixels], params[:mask], params[:clr], params[:opts], params[:width], params[:height], &blk)
2680
+ end
2681
+ end
2682
+
2683
+ class FXXBMImage
2684
+ alias old_initialize initialize
2685
+ def initialize(a, *args, &blk)
2686
+ argument_names = %w{pixels mask opts width height}
2687
+ default_params = { :pixels => nil, :mask => nil, :opts => 0, :width => 1, :height => 1 }
2688
+ params = {}
2689
+ params = args.pop if args.last.is_a? Hash
2690
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2691
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2692
+ params = default_params.merge(params)
2693
+ old_initialize(a, params[:pixels], params[:mask], params[:opts], params[:width], params[:height], &blk)
2694
+ end
2695
+ end
2696
+
2697
+ class FXXPMIcon
2698
+ alias old_initialize initialize
2699
+ def initialize(a, *args, &blk)
2700
+ argument_names = %w{pix clr opts width height}
2701
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
2702
+ params = {}
2703
+ params = args.pop if args.last.is_a? Hash
2704
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2705
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2706
+ params = default_params.merge(params)
2707
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
2708
+ end
2709
+ end
2710
+
2711
+ class FXXPMImage
2712
+ alias old_initialize initialize
2713
+ def initialize(a, *args, &blk)
2714
+ argument_names = %w{pix opts width height}
2715
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
2716
+ params = {}
2717
+ params = args.pop if args.last.is_a? Hash
2718
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2719
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2720
+ params = default_params.merge(params)
2721
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
2722
+ end
2723
+ end
2724
+
2725
+ end