fxruby 1.6.19-x86-mingw32

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