wxruby3 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (347) hide show
  1. checksums.yaml +4 -4
  2. data/INSTALL.md +35 -29
  3. data/README.md +24 -15
  4. data/ext/wxruby3/include/wxruby-ClientData.h +48 -0
  5. data/ext/wxruby3/include/wxruby-Validator.h +39 -0
  6. data/ext/wxruby3/include/wxruby-ValidatorBinding.h +64 -0
  7. data/ext/wxruby3/swig/custom/director.swg +8 -0
  8. data/ext/wxruby3/swig/mark_free_impl.i +0 -33
  9. data/lib/wx/core/bitmap_combobox.rb +17 -21
  10. data/lib/wx/core/combobox.rb +13 -3
  11. data/lib/wx/core/controlwithitems.rb +40 -130
  12. data/lib/wx/core/enum.rb +17 -1
  13. data/lib/wx/core/event.rb +6 -1
  14. data/lib/wx/core/evthandler.rb +8 -2
  15. data/lib/wx/core/generic_validator.rb +312 -0
  16. data/lib/wx/core/listbox.rb +2 -2
  17. data/lib/wx/core/log.rb +1 -1
  18. data/lib/wx/core/owner_drawn_combobox.rb +45 -0
  19. data/lib/wx/core/size.rb +4 -0
  20. data/lib/wx/core/sizer.rb +1 -2
  21. data/lib/wx/core/standard_paths.rb +22 -0
  22. data/lib/wx/core/text_entry.rb +4 -1
  23. data/lib/wx/core/validator.rb +70 -5
  24. data/lib/wx/core/window.rb +3 -7
  25. data/lib/wx/doc/art_locator.rb +1 -0
  26. data/lib/wx/doc/comboctrl.rb +18 -0
  27. data/lib/wx/doc/controlwithitems.rb +16 -0
  28. data/lib/wx/doc/date_picker_ctrl.rb +23 -0
  29. data/lib/wx/doc/editable_listbox.rb +44 -0
  30. data/lib/wx/doc/enum.rb +15 -0
  31. data/lib/wx/doc/event.rb +12 -0
  32. data/lib/wx/doc/extra/12_client_data.md +89 -0
  33. data/lib/wx/doc/extra/13_validators.md +139 -0
  34. data/lib/wx/doc/gdi_common.rb +4 -0
  35. data/lib/wx/doc/generic_validator.rb +95 -0
  36. data/lib/wx/doc/html/simple_html_listbox.rb +22 -0
  37. data/lib/wx/doc/num_validator.rb +387 -0
  38. data/lib/wx/doc/owner_drawn_combobox.rb +96 -0
  39. data/lib/wx/doc/pg/numeric_property_validator.rb +33 -0
  40. data/lib/wx/doc/static_bitmap.rb +25 -0
  41. data/lib/wx/doc/text_validator.rb +10 -0
  42. data/lib/wx/doc/validator.rb +113 -0
  43. data/lib/wx/doc/window.rb +30 -0
  44. data/lib/wx/html/simple_html_listbox.rb +24 -91
  45. data/lib/wx/keyword_defs.rb +34 -2
  46. data/lib/wx/rbn/ribbon_gallery.rb +0 -21
  47. data/lib/wx/version.rb +1 -1
  48. data/rakelib/lib/config/mingw.rb +12 -0
  49. data/rakelib/lib/core/include/client_data.inc +65 -0
  50. data/rakelib/lib/core/include/funcall.inc +1 -1
  51. data/rakelib/lib/core/package.rb +17 -2
  52. data/rakelib/lib/core/parameter.rb +1 -1
  53. data/rakelib/lib/core/spec_helper.rb +7 -1
  54. data/rakelib/lib/director/app.rb +18 -0
  55. data/rakelib/lib/director/app_traits.rb +3 -1
  56. data/rakelib/lib/director/bitmap_combobox.rb +2 -2
  57. data/rakelib/lib/director/combobox.rb +22 -0
  58. data/rakelib/lib/director/comboctrl.rb +1 -55
  59. data/rakelib/lib/director/ctrl_with_items.rb +88 -21
  60. data/rakelib/lib/director/date_picker_ctrl.rb +8 -6
  61. data/rakelib/lib/director/editable_listbox.rb +30 -0
  62. data/rakelib/lib/director/event.rb +102 -12
  63. data/rakelib/lib/director/event_handler.rb +3 -2
  64. data/rakelib/lib/director/functions.rb +4 -2
  65. data/rakelib/lib/director/generic_dirctrl.rb +17 -0
  66. data/rakelib/lib/director/grid_cell_attr.rb +0 -2
  67. data/rakelib/lib/director/grid_cell_editor.rb +0 -2
  68. data/rakelib/lib/director/grid_cell_renderer.rb +0 -2
  69. data/rakelib/lib/director/header_ctrl.rb +6 -1
  70. data/rakelib/lib/director/html_listbox.rb +96 -22
  71. data/rakelib/lib/director/num_validator.rb +495 -0
  72. data/rakelib/lib/director/numeric_property_validator.rb +131 -6
  73. data/rakelib/lib/director/owner_drawn_combobox.rb +192 -0
  74. data/rakelib/lib/director/pgproperty.rb +3 -29
  75. data/rakelib/lib/director/ribbon_button_bar.rb +3 -3
  76. data/rakelib/lib/director/ribbon_gallery.rb +3 -5
  77. data/rakelib/lib/director/sizer.rb +15 -4
  78. data/rakelib/lib/director/sizer_item.rb +13 -0
  79. data/rakelib/lib/director/static_bitmap.rb +28 -0
  80. data/rakelib/lib/director/text_entry.rb +4 -0
  81. data/rakelib/lib/director/text_validator.rb +124 -13
  82. data/rakelib/lib/director/toggle_button.rb +1 -0
  83. data/rakelib/lib/director/top_level_window.rb +0 -2
  84. data/rakelib/lib/director/tree_ctrl.rb +35 -0
  85. data/rakelib/lib/director/utils.rb +16 -2
  86. data/rakelib/lib/director/validator.rb +196 -21
  87. data/rakelib/lib/director/window.rb +16 -2
  88. data/rakelib/lib/extractor/function.rb +2 -1
  89. data/rakelib/lib/generate/analyzer.rb +1 -1
  90. data/rakelib/lib/generate/doc.rb +10 -4
  91. data/rakelib/lib/specs/interfaces.rb +2 -0
  92. data/rakelib/lib/swig_runner.rb +55 -9
  93. data/rakelib/lib/typemap/client_data.rb +67 -0
  94. data/rakelib/lib/typemap/common.rb +3 -3
  95. data/rakelib/lib/typemap/datetime.rb +1 -1
  96. data/rakelib/lib/typemap/tree_itemid.rb +2 -2
  97. data/samples/aui/aui.rb +1237 -1233
  98. data/samples/calendar/calendar.rb +293 -289
  99. data/samples/controls/get_item_sample.rb +83 -79
  100. data/samples/controls/htlbox.rb +331 -327
  101. data/samples/dialogs/dialogs.rb +682 -694
  102. data/samples/dialogs/wizard.rb +52 -55
  103. data/samples/dragdrop/dragdrop.rb +146 -142
  104. data/samples/drawing/bitmap.rb +29 -26
  105. data/samples/drawing/bitmap_image.rb +84 -80
  106. data/samples/drawing/graphics_drawing.rb +209 -205
  107. data/samples/drawing/image_prt.rb +344 -340
  108. data/samples/drawing/maths_images.rb +18 -1
  109. data/samples/drawing/rmagic_bitmap_image.rb +88 -84
  110. data/samples/etc/caret.rb +306 -0
  111. data/samples/etc/miniframe.rb +65 -60
  112. data/samples/etc/sash.rb +109 -105
  113. data/samples/etc/scrollwin.rb +86 -80
  114. data/samples/etc/system_settings.rb +216 -209
  115. data/samples/event/activation.rb +72 -67
  116. data/samples/event/event.rb +160 -153
  117. data/samples/event/threaded.rb +8 -1
  118. data/samples/event/update_ui_event.rb +67 -60
  119. data/samples/grid/grid.rb +188 -181
  120. data/samples/grid/gridtablebase.rb +136 -129
  121. data/samples/html/html.rb +208 -204
  122. data/samples/mdi/mdi.rb +59 -54
  123. data/samples/minimal/minimal.rb +54 -51
  124. data/samples/minimal/nothing.rb +1 -0
  125. data/samples/printing/printing.rb +367 -377
  126. data/samples/printing/printing2.rb +203 -198
  127. data/samples/propgrid/propgrid.rb +2312 -2308
  128. data/samples/propgrid/propgrid_minimal.rb +57 -50
  129. data/samples/ribbon/ribbon.rb +780 -774
  130. data/samples/sampler/ext.rb +0 -33
  131. data/samples/sampler/sample.rb +4 -9
  132. data/samples/sampler.rb +1 -1
  133. data/samples/splash/splash.rb +118 -116
  134. data/samples/text/rich_textctrl.rb +207 -201
  135. data/samples/text/richtext.rb +1409 -1405
  136. data/samples/text/scintilla.rb +137 -128
  137. data/samples/text/textctrl.rb +89 -83
  138. data/samples/text/unicode.rb +175 -168
  139. data/samples/treectrl/treectrl.rb +1430 -1426
  140. data/samples/widgets/activityindicator.rb +95 -0
  141. data/samples/widgets/art/widgets/activityindicator.xpm +278 -0
  142. data/samples/widgets/art/widgets/bmpbtn.xpm +37 -0
  143. data/samples/widgets/art/widgets/bmpcombobox.xpm +54 -0
  144. data/samples/widgets/art/widgets/button.xpm +54 -0
  145. data/samples/widgets/art/widgets/checkbox.xpm +54 -0
  146. data/samples/{bigdemo/icons → widgets/art/widgets}/choice.xpm +1 -1
  147. data/samples/widgets/art/widgets/choicebk.xpm +54 -0
  148. data/samples/widgets/art/widgets/clrpicker.xpm +193 -0
  149. data/samples/widgets/art/widgets/combobox.xpm +54 -0
  150. data/samples/widgets/art/widgets/datepick.xpm +200 -0
  151. data/samples/widgets/art/widgets/dirctrl.xpm +54 -0
  152. data/samples/widgets/art/widgets/dirpicker.xpm +213 -0
  153. data/samples/widgets/art/widgets/filepicker.xpm +214 -0
  154. data/samples/widgets/art/widgets/fontpicker.xpm +185 -0
  155. data/samples/widgets/art/widgets/gauge.xpm +54 -0
  156. data/samples/widgets/art/widgets/header.xpm +54 -0
  157. data/samples/widgets/art/widgets/hyperlnk.xpm +54 -0
  158. data/samples/widgets/art/widgets/listbook.xpm +54 -0
  159. data/samples/widgets/art/widgets/listbox.xpm +54 -0
  160. data/samples/widgets/art/widgets/native.xpm +81 -0
  161. data/samples/widgets/art/widgets/notebook.xpm +54 -0
  162. data/samples/widgets/art/widgets/odcombobox.xpm +54 -0
  163. data/samples/widgets/art/widgets/radiobox.xpm +54 -0
  164. data/samples/widgets/art/widgets/scrolbar.xpm +54 -0
  165. data/samples/widgets/art/widgets/slider.xpm +54 -0
  166. data/samples/widgets/art/widgets/spinbtn.xpm +40 -0
  167. data/samples/widgets/art/widgets/statbmp.xpm +40 -0
  168. data/samples/widgets/art/widgets/statbox.xpm +54 -0
  169. data/samples/widgets/art/widgets/stattext.xpm +54 -0
  170. data/samples/widgets/art/widgets/text.xpm +54 -0
  171. data/samples/widgets/art/widgets/timepick.xpm +207 -0
  172. data/samples/widgets/art/widgets/toggle.xpm +54 -0
  173. data/samples/widgets/art/widgets/toucan.png +0 -0
  174. data/samples/widgets/bmpcombobox.rb +651 -0
  175. data/samples/widgets/button.rb +462 -0
  176. data/samples/widgets/checkbox.rb +211 -0
  177. data/samples/widgets/choice.rb +287 -0
  178. data/samples/widgets/clrpicker.rb +156 -0
  179. data/samples/widgets/combobox.rb +516 -0
  180. data/samples/widgets/datepick.rb +215 -0
  181. data/samples/widgets/dirctrl.rb +265 -0
  182. data/samples/widgets/dirpicker.rb +158 -0
  183. data/samples/widgets/editlbox.rb +122 -0
  184. data/samples/widgets/filectrl.rb +216 -0
  185. data/samples/widgets/filepicker.rb +214 -0
  186. data/samples/widgets/fontpicker.rb +135 -0
  187. data/samples/widgets/gauge.rb +311 -0
  188. data/samples/widgets/headerctrl.rb +236 -0
  189. data/samples/widgets/hyperlink.rb +203 -0
  190. data/samples/widgets/itemcontainer.rb +185 -0
  191. data/samples/widgets/listbox.rb +473 -0
  192. data/samples/widgets/notebook.rb +488 -0
  193. data/samples/widgets/odcombobox.rb +608 -0
  194. data/samples/widgets/radiobox.rb +328 -0
  195. data/samples/widgets/searchctrl.rb +159 -0
  196. data/samples/widgets/slider.rb +594 -0
  197. data/samples/widgets/spinbtn.rb +443 -0
  198. data/samples/widgets/statbmp.rb +130 -0
  199. data/samples/widgets/static.rb +436 -0
  200. data/samples/widgets/textctrl.rb +700 -0
  201. data/samples/widgets/timepick.rb +148 -0
  202. data/samples/widgets/tn_widgets.png +0 -0
  203. data/samples/widgets/toggle.rb +385 -0
  204. data/samples/widgets/widgets.rb +1233 -0
  205. data/samples/xrc/custom_xrc_sample.rb +47 -41
  206. data/samples/xrc/xrc_sample.rb +53 -47
  207. data/tests/test_event_handling.rb +52 -34
  208. data/tests/test_events.rb +7 -0
  209. data/tests/test_item_data.rb +24 -0
  210. data/tests/test_sizer.rb +44 -1
  211. data/tests/test_validators.rb +805 -0
  212. metadata +92 -138
  213. data/lib/wx/core/choice.rb +0 -14
  214. data/lib/wx/core/combo_ctrl.rb +0 -110
  215. data/rakelib/lib/typemap/grid_client_data.rb +0 -58
  216. data/samples/bigdemo/About.rbw +0 -39
  217. data/samples/bigdemo/ColorPanel.rbw +0 -23
  218. data/samples/bigdemo/GridSimple.rbw +0 -78
  219. data/samples/bigdemo/MDIDemo.rbw +0 -57
  220. data/samples/bigdemo/PopupMenu.rbw +0 -146
  221. data/samples/bigdemo/ShapedWindow.rbw +0 -128
  222. data/samples/bigdemo/Sizers.rbw +0 -541
  223. data/samples/bigdemo/bigdemo.rb +0 -817
  224. data/samples/bigdemo/demoTemplate.rbw +0 -33
  225. data/samples/bigdemo/helpfile.htb +0 -0
  226. data/samples/bigdemo/icons/Test 015.jpg +0 -0
  227. data/samples/bigdemo/icons/Test 015.png +0 -0
  228. data/samples/bigdemo/icons/choice.bmp +0 -0
  229. data/samples/bigdemo/icons/combo.bmp +0 -0
  230. data/samples/bigdemo/icons/combo.xpm +0 -27
  231. data/samples/bigdemo/icons/copy.xpm +0 -25
  232. data/samples/bigdemo/icons/cut.xpm +0 -24
  233. data/samples/bigdemo/icons/gauge.bmp +0 -0
  234. data/samples/bigdemo/icons/gauge.xpm +0 -27
  235. data/samples/bigdemo/icons/help.xpm +0 -25
  236. data/samples/bigdemo/icons/list.bmp +0 -0
  237. data/samples/bigdemo/icons/list.xpm +0 -27
  238. data/samples/bigdemo/icons/mondrian.ico +0 -0
  239. data/samples/bigdemo/icons/mondrian.xpm +0 -44
  240. data/samples/bigdemo/icons/new.xpm +0 -24
  241. data/samples/bigdemo/icons/ogl.ico +0 -0
  242. data/samples/bigdemo/icons/ogl.xpm +0 -45
  243. data/samples/bigdemo/icons/open.xpm +0 -26
  244. data/samples/bigdemo/icons/paste.bmp +0 -0
  245. data/samples/bigdemo/icons/paste.xpm +0 -38
  246. data/samples/bigdemo/icons/pointy.png +0 -0
  247. data/samples/bigdemo/icons/preview.xpm +0 -26
  248. data/samples/bigdemo/icons/print.xpm +0 -26
  249. data/samples/bigdemo/icons/radio.bmp +0 -0
  250. data/samples/bigdemo/icons/radio.xpm +0 -27
  251. data/samples/bigdemo/icons/robert.xpm +0 -415
  252. data/samples/bigdemo/icons/sashtest.ico +0 -0
  253. data/samples/bigdemo/icons/save.xpm +0 -25
  254. data/samples/bigdemo/icons/smiles.bmp +0 -0
  255. data/samples/bigdemo/icons/smiles.xpm +0 -39
  256. data/samples/bigdemo/icons/smiley.ico +0 -0
  257. data/samples/bigdemo/icons/smiley.xpm +0 -42
  258. data/samples/bigdemo/icons/stattext.xpm +0 -24
  259. data/samples/bigdemo/icons/test2.bmp +0 -0
  260. data/samples/bigdemo/icons/test2.png +0 -0
  261. data/samples/bigdemo/icons/test2.xpm +0 -79
  262. data/samples/bigdemo/icons/text.bmp +0 -0
  263. data/samples/bigdemo/icons/text.xpm +0 -27
  264. data/samples/bigdemo/icons/tog1.bmp +0 -0
  265. data/samples/bigdemo/icons/tog1.xpm +0 -38
  266. data/samples/bigdemo/icons/tog2.bmp +0 -0
  267. data/samples/bigdemo/icons/tog2.xpm +0 -38
  268. data/samples/bigdemo/icons/wxruby-128x128.png +0 -0
  269. data/samples/bigdemo/icons/wxwin.ico +0 -0
  270. data/samples/bigdemo/icons/wxwin16x16.png +0 -0
  271. data/samples/bigdemo/icons/wxwin16x16.xpm +0 -25
  272. data/samples/bigdemo/icons/wxwin32x32.png +0 -0
  273. data/samples/bigdemo/icons/wxwin48x48.png +0 -0
  274. data/samples/bigdemo/run.rb +0 -98
  275. data/samples/bigdemo/tips.txt +0 -7
  276. data/samples/bigdemo/utils.rb +0 -20
  277. data/samples/bigdemo/wxArtProvider.rbw +0 -282
  278. data/samples/bigdemo/wxBitmapButton.rbw +0 -65
  279. data/samples/bigdemo/wxButton.rbw +0 -64
  280. data/samples/bigdemo/wxCalendarCtrl.rbw +0 -59
  281. data/samples/bigdemo/wxCheckBox.rbw +0 -50
  282. data/samples/bigdemo/wxCheckListBox.rbw +0 -65
  283. data/samples/bigdemo/wxChoice.rbw +0 -47
  284. data/samples/bigdemo/wxChoicebook.rbw +0 -78
  285. data/samples/bigdemo/wxColourDialog.rbw +0 -33
  286. data/samples/bigdemo/wxComboBox.rbw +0 -77
  287. data/samples/bigdemo/wxCursor.rbw +0 -136
  288. data/samples/bigdemo/wxDialog.rbw +0 -74
  289. data/samples/bigdemo/wxDirDialog.rbw +0 -29
  290. data/samples/bigdemo/wxDragImage.rbw +0 -70
  291. data/samples/bigdemo/wxFileDialog.rbw +0 -37
  292. data/samples/bigdemo/wxFileDialog_Save.rbw +0 -35
  293. data/samples/bigdemo/wxFindReplaceDialog.rbw +0 -82
  294. data/samples/bigdemo/wxFontDialog.rbw +0 -200
  295. data/samples/bigdemo/wxFrame.rbw +0 -53
  296. data/samples/bigdemo/wxGauge.rbw +0 -65
  297. data/samples/bigdemo/wxGenericDirCtrl.rbw +0 -74
  298. data/samples/bigdemo/wxGrid.rbw +0 -66
  299. data/samples/bigdemo/wxHtmlHelpController.rbw +0 -52
  300. data/samples/bigdemo/wxListBox.rbw +0 -140
  301. data/samples/bigdemo/wxListCtrl_virtual.rbw +0 -112
  302. data/samples/bigdemo/wxMDIWindows.rbw +0 -50
  303. data/samples/bigdemo/wxMenu.rbw +0 -247
  304. data/samples/bigdemo/wxMessageDialog.rbw +0 -27
  305. data/samples/bigdemo/wxMiniFrame.rbw +0 -70
  306. data/samples/bigdemo/wxMultipleChoiceDialog.rbw +0 -29
  307. data/samples/bigdemo/wxNotebook.rbw +0 -136
  308. data/samples/bigdemo/wxProgressDialog.rbw +0 -43
  309. data/samples/bigdemo/wxRadioBox.rbw +0 -72
  310. data/samples/bigdemo/wxRadioButton.rbw +0 -125
  311. data/samples/bigdemo/wxSashWindow.rbw +0 -141
  312. data/samples/bigdemo/wxScrolledMessageDialog.rbw +0 -57
  313. data/samples/bigdemo/wxScrolledWindow.rbw +0 -199
  314. data/samples/bigdemo/wxSingleChoiceDialog.rbw +0 -33
  315. data/samples/bigdemo/wxSlider.rbw +0 -42
  316. data/samples/bigdemo/wxSpinButton.rbw +0 -50
  317. data/samples/bigdemo/wxSpinCtrl.rbw +0 -51
  318. data/samples/bigdemo/wxSplitterWindow.rbw +0 -63
  319. data/samples/bigdemo/wxStaticBitmap.rbw +0 -47
  320. data/samples/bigdemo/wxStaticText.rbw +0 -55
  321. data/samples/bigdemo/wxStatusBar.rbw +0 -126
  322. data/samples/bigdemo/wxTextCtrl.rbw +0 -149
  323. data/samples/bigdemo/wxTextEntryDialog.rbw +0 -31
  324. data/samples/bigdemo/wxToggleButton.rbw +0 -49
  325. data/samples/bigdemo/wxToolBar.rbw +0 -131
  326. data/samples/bigdemo/wxTreeCtrl.rbw +0 -191
  327. data/samples/caret/caret.rb +0 -298
  328. data/samples/caret/mondrian.xpm +0 -44
  329. data/samples/controls/books.rb +0 -189
  330. data/samples/controls/choice.xpm +0 -27
  331. data/samples/controls/combo.xpm +0 -27
  332. data/samples/controls/controls.rb +0 -1099
  333. data/samples/controls/gauge.xpm +0 -27
  334. data/samples/controls/list.xpm +0 -27
  335. data/samples/controls/mondrian.ico +0 -0
  336. data/samples/controls/mondrian.xpm +0 -44
  337. data/samples/controls/radio.xpm +0 -27
  338. data/samples/controls/stattext.xpm +0 -24
  339. data/samples/controls/test2.bmp +0 -0
  340. data/samples/controls/text.xpm +0 -27
  341. data/samples/controls/tn_books.png +0 -0
  342. data/samples/controls/tn_controls.png +0 -0
  343. data/samples/etc/choice.rb +0 -87
  344. data/samples/etc/tn_choice.png +0 -0
  345. data/samples/text/mondrian.ico +0 -0
  346. data/samples/text/mondrian.xpm +0 -44
  347. /data/samples/{caret → etc}/tn_caret.png +0 -0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wxruby3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Corino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-13 00:00:00.000000000 Z
11
+ date: 2023-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -98,8 +98,11 @@ files:
98
98
  - bin/wxruby
99
99
  - ext/mkrf_conf_srcgem.rb
100
100
  - ext/wxruby3/include/wxRubyApp.h
101
+ - ext/wxruby3/include/wxruby-ClientData.h
101
102
  - ext/wxruby3/include/wxruby-Config.h
102
103
  - ext/wxruby3/include/wxruby-ScaledDC.h
104
+ - ext/wxruby3/include/wxruby-Validator.h
105
+ - ext/wxruby3/include/wxruby-ValidatorBinding.h
103
106
  - ext/wxruby3/include/wxruby-runtime.h
104
107
  - ext/wxruby3/swig/RubyStockObjects.i
105
108
  - ext/wxruby3/swig/common.i
@@ -137,13 +140,11 @@ files:
137
140
  - lib/wx/core/bitmap_combobox.rb
138
141
  - lib/wx/core/brush.rb
139
142
  - lib/wx/core/busycursor.rb
140
- - lib/wx/core/choice.rb
141
143
  - lib/wx/core/choicedlg.rb
142
144
  - lib/wx/core/clientdc.rb
143
145
  - lib/wx/core/clipboard.rb
144
146
  - lib/wx/core/collapsible_pane.rb
145
147
  - lib/wx/core/colour.rb
146
- - lib/wx/core/combo_ctrl.rb
147
148
  - lib/wx/core/combobox.rb
148
149
  - lib/wx/core/config.rb
149
150
  - lib/wx/core/const.rb
@@ -165,6 +166,7 @@ files:
165
166
  - lib/wx/core/font.rb
166
167
  - lib/wx/core/functions.rb
167
168
  - lib/wx/core/gauge.rb
169
+ - lib/wx/core/generic_validator.rb
168
170
  - lib/wx/core/genericdirctrl.rb
169
171
  - lib/wx/core/hboxsizer.rb
170
172
  - lib/wx/core/helpcontroller.rb
@@ -183,6 +185,7 @@ files:
183
185
  - lib/wx/core/menuitem.rb
184
186
  - lib/wx/core/notebook.rb
185
187
  - lib/wx/core/object.rb
188
+ - lib/wx/core/owner_drawn_combobox.rb
186
189
  - lib/wx/core/paintdc.rb
187
190
  - lib/wx/core/pen.rb
188
191
  - lib/wx/core/pen_info.rb
@@ -195,6 +198,7 @@ files:
195
198
  - lib/wx/core/size.rb
196
199
  - lib/wx/core/sizer.rb
197
200
  - lib/wx/core/splash_screen.rb
201
+ - lib/wx/core/standard_paths.rb
198
202
  - lib/wx/core/task_bar_button.rb
199
203
  - lib/wx/core/text_entry.rb
200
204
  - lib/wx/core/textctrl.rb
@@ -220,14 +224,17 @@ files:
220
224
  - lib/wx/doc/client_dc.rb
221
225
  - lib/wx/doc/clipboard.rb
222
226
  - lib/wx/doc/colour_dialog.rb
227
+ - lib/wx/doc/comboctrl.rb
223
228
  - lib/wx/doc/config.rb
224
229
  - lib/wx/doc/const.rb
225
230
  - lib/wx/doc/controlwithitems.rb
226
231
  - lib/wx/doc/core.rb
227
232
  - lib/wx/doc/cursor.rb
228
233
  - lib/wx/doc/data_object.rb
234
+ - lib/wx/doc/date_picker_ctrl.rb
229
235
  - lib/wx/doc/datetime.rb
230
236
  - lib/wx/doc/dc.rb
237
+ - lib/wx/doc/editable_listbox.rb
231
238
  - lib/wx/doc/enum.rb
232
239
  - lib/wx/doc/event.rb
233
240
  - lib/wx/doc/event_blocker.rb
@@ -246,16 +253,20 @@ files:
246
253
  - lib/wx/doc/extra/09_exceptions.md
247
254
  - lib/wx/doc/extra/10_art.md
248
255
  - lib/wx/doc/extra/11_drawing_and_dc.md
256
+ - lib/wx/doc/extra/12_client_data.md
257
+ - lib/wx/doc/extra/13_validators.md
249
258
  - lib/wx/doc/font.rb
250
259
  - lib/wx/doc/font_data.rb
251
260
  - lib/wx/doc/functions.rb
252
261
  - lib/wx/doc/gc_dc.rb
253
262
  - lib/wx/doc/gdi_common.rb
263
+ - lib/wx/doc/generic_validator.rb
254
264
  - lib/wx/doc/graphics_context.rb
255
265
  - lib/wx/doc/grid/grid.rb
256
266
  - lib/wx/doc/hboxsizer.rb
257
267
  - lib/wx/doc/help_controller.rb
258
268
  - lib/wx/doc/html/html_help_controller.rb
269
+ - lib/wx/doc/html/simple_html_listbox.rb
259
270
  - lib/wx/doc/icon.rb
260
271
  - lib/wx/doc/id_helper.rb
261
272
  - lib/wx/doc/image.rb
@@ -265,8 +276,11 @@ files:
265
276
  - lib/wx/doc/menu.rb
266
277
  - lib/wx/doc/mirror_dc.rb
267
278
  - lib/wx/doc/notebook.rb
279
+ - lib/wx/doc/num_validator.rb
280
+ - lib/wx/doc/owner_drawn_combobox.rb
268
281
  - lib/wx/doc/pen.rb
269
282
  - lib/wx/doc/pg/events.rb
283
+ - lib/wx/doc/pg/numeric_property_validator.rb
270
284
  - lib/wx/doc/pg/pg_property.rb
271
285
  - lib/wx/doc/pg/pgeditor.rb
272
286
  - lib/wx/doc/pg/property_grid.rb
@@ -293,6 +307,7 @@ files:
293
307
  - lib/wx/doc/scaled_dc.rb
294
308
  - lib/wx/doc/screen_dc.rb
295
309
  - lib/wx/doc/sizer.rb
310
+ - lib/wx/doc/static_bitmap.rb
296
311
  - lib/wx/doc/stc/styled_text_ctrl.rb
297
312
  - lib/wx/doc/stock_objects.rb
298
313
  - lib/wx/doc/stream.rb
@@ -304,6 +319,7 @@ files:
304
319
  - lib/wx/doc/tree_event.rb
305
320
  - lib/wx/doc/treebook.rb
306
321
  - lib/wx/doc/v_list_box.rb
322
+ - lib/wx/doc/validator.rb
307
323
  - lib/wx/doc/variant.rb
308
324
  - lib/wx/doc/vboxsizer.rb
309
325
  - lib/wx/doc/window.rb
@@ -383,6 +399,7 @@ files:
383
399
  - rakelib/lib/config/mingw.rb
384
400
  - rakelib/lib/config/netbsd.rb
385
401
  - rakelib/lib/config/unixish.rb
402
+ - rakelib/lib/core/include/client_data.inc
386
403
  - rakelib/lib/core/include/enum.inc
387
404
  - rakelib/lib/core/include/funcall.inc
388
405
  - rakelib/lib/core/include/init.inc
@@ -521,8 +538,10 @@ files:
521
538
  - rakelib/lib/director/menu_bar.rb
522
539
  - rakelib/lib/director/menu_item.rb
523
540
  - rakelib/lib/director/mouse_state.rb
541
+ - rakelib/lib/director/num_validator.rb
524
542
  - rakelib/lib/director/numeric_property_validator.rb
525
543
  - rakelib/lib/director/object.rb
544
+ - rakelib/lib/director/owner_drawn_combobox.rb
526
545
  - rakelib/lib/director/page_setup_dialog.rb
527
546
  - rakelib/lib/director/palette.rb
528
547
  - rakelib/lib/director/panel.rb
@@ -728,12 +747,12 @@ files:
728
747
  - rakelib/lib/streams.rb
729
748
  - rakelib/lib/swig_runner.rb
730
749
  - rakelib/lib/typemap/array_int_selections.rb
750
+ - rakelib/lib/typemap/client_data.rb
731
751
  - rakelib/lib/typemap/common.rb
732
752
  - rakelib/lib/typemap/config.rb
733
753
  - rakelib/lib/typemap/data_format.rb
734
754
  - rakelib/lib/typemap/data_object_data.rb
735
755
  - rakelib/lib/typemap/datetime.rb
736
- - rakelib/lib/typemap/grid_client_data.rb
737
756
  - rakelib/lib/typemap/grid_coords.rb
738
757
  - rakelib/lib/typemap/html_cell.rb
739
758
  - rakelib/lib/typemap/io_streams.rb
@@ -765,139 +784,10 @@ files:
765
784
  - samples/art/wxruby.png
766
785
  - samples/aui/aui.rb
767
786
  - samples/aui/tn_aui.png
768
- - samples/bigdemo/About.rbw
769
- - samples/bigdemo/ColorPanel.rbw
770
- - samples/bigdemo/GridSimple.rbw
771
- - samples/bigdemo/MDIDemo.rbw
772
- - samples/bigdemo/PopupMenu.rbw
773
- - samples/bigdemo/ShapedWindow.rbw
774
- - samples/bigdemo/Sizers.rbw
775
- - samples/bigdemo/bigdemo.rb
776
- - samples/bigdemo/demoTemplate.rbw
777
- - samples/bigdemo/helpfile.htb
778
- - samples/bigdemo/icons/Test 015.jpg
779
- - samples/bigdemo/icons/Test 015.png
780
- - samples/bigdemo/icons/choice.bmp
781
- - samples/bigdemo/icons/choice.xpm
782
- - samples/bigdemo/icons/combo.bmp
783
- - samples/bigdemo/icons/combo.xpm
784
- - samples/bigdemo/icons/copy.xpm
785
- - samples/bigdemo/icons/cut.xpm
786
- - samples/bigdemo/icons/gauge.bmp
787
- - samples/bigdemo/icons/gauge.xpm
788
- - samples/bigdemo/icons/help.xpm
789
- - samples/bigdemo/icons/list.bmp
790
- - samples/bigdemo/icons/list.xpm
791
- - samples/bigdemo/icons/mondrian.ico
792
- - samples/bigdemo/icons/mondrian.xpm
793
- - samples/bigdemo/icons/new.xpm
794
- - samples/bigdemo/icons/ogl.ico
795
- - samples/bigdemo/icons/ogl.xpm
796
- - samples/bigdemo/icons/open.xpm
797
- - samples/bigdemo/icons/paste.bmp
798
- - samples/bigdemo/icons/paste.xpm
799
- - samples/bigdemo/icons/pointy.png
800
- - samples/bigdemo/icons/preview.xpm
801
- - samples/bigdemo/icons/print.xpm
802
- - samples/bigdemo/icons/radio.bmp
803
- - samples/bigdemo/icons/radio.xpm
804
- - samples/bigdemo/icons/robert.xpm
805
- - samples/bigdemo/icons/sashtest.ico
806
- - samples/bigdemo/icons/save.xpm
807
- - samples/bigdemo/icons/smiles.bmp
808
- - samples/bigdemo/icons/smiles.xpm
809
- - samples/bigdemo/icons/smiley.ico
810
- - samples/bigdemo/icons/smiley.xpm
811
- - samples/bigdemo/icons/stattext.xpm
812
- - samples/bigdemo/icons/test2.bmp
813
- - samples/bigdemo/icons/test2.png
814
- - samples/bigdemo/icons/test2.xpm
815
- - samples/bigdemo/icons/text.bmp
816
- - samples/bigdemo/icons/text.xpm
817
- - samples/bigdemo/icons/tog1.bmp
818
- - samples/bigdemo/icons/tog1.xpm
819
- - samples/bigdemo/icons/tog2.bmp
820
- - samples/bigdemo/icons/tog2.xpm
821
- - samples/bigdemo/icons/wxruby-128x128.png
822
- - samples/bigdemo/icons/wxwin.ico
823
- - samples/bigdemo/icons/wxwin16x16.png
824
- - samples/bigdemo/icons/wxwin16x16.xpm
825
- - samples/bigdemo/icons/wxwin32x32.png
826
- - samples/bigdemo/icons/wxwin48x48.png
827
- - samples/bigdemo/run.rb
828
- - samples/bigdemo/tips.txt
829
- - samples/bigdemo/utils.rb
830
- - samples/bigdemo/wxArtProvider.rbw
831
- - samples/bigdemo/wxBitmapButton.rbw
832
- - samples/bigdemo/wxButton.rbw
833
- - samples/bigdemo/wxCalendarCtrl.rbw
834
- - samples/bigdemo/wxCheckBox.rbw
835
- - samples/bigdemo/wxCheckListBox.rbw
836
- - samples/bigdemo/wxChoice.rbw
837
- - samples/bigdemo/wxChoicebook.rbw
838
- - samples/bigdemo/wxColourDialog.rbw
839
- - samples/bigdemo/wxComboBox.rbw
840
- - samples/bigdemo/wxCursor.rbw
841
- - samples/bigdemo/wxDialog.rbw
842
- - samples/bigdemo/wxDirDialog.rbw
843
- - samples/bigdemo/wxDragImage.rbw
844
- - samples/bigdemo/wxFileDialog.rbw
845
- - samples/bigdemo/wxFileDialog_Save.rbw
846
- - samples/bigdemo/wxFindReplaceDialog.rbw
847
- - samples/bigdemo/wxFontDialog.rbw
848
- - samples/bigdemo/wxFrame.rbw
849
- - samples/bigdemo/wxGauge.rbw
850
- - samples/bigdemo/wxGenericDirCtrl.rbw
851
- - samples/bigdemo/wxGrid.rbw
852
- - samples/bigdemo/wxHtmlHelpController.rbw
853
- - samples/bigdemo/wxListBox.rbw
854
- - samples/bigdemo/wxListCtrl_virtual.rbw
855
- - samples/bigdemo/wxMDIWindows.rbw
856
- - samples/bigdemo/wxMenu.rbw
857
- - samples/bigdemo/wxMessageDialog.rbw
858
- - samples/bigdemo/wxMiniFrame.rbw
859
- - samples/bigdemo/wxMultipleChoiceDialog.rbw
860
- - samples/bigdemo/wxNotebook.rbw
861
- - samples/bigdemo/wxProgressDialog.rbw
862
- - samples/bigdemo/wxRadioBox.rbw
863
- - samples/bigdemo/wxRadioButton.rbw
864
- - samples/bigdemo/wxSashWindow.rbw
865
- - samples/bigdemo/wxScrolledMessageDialog.rbw
866
- - samples/bigdemo/wxScrolledWindow.rbw
867
- - samples/bigdemo/wxSingleChoiceDialog.rbw
868
- - samples/bigdemo/wxSlider.rbw
869
- - samples/bigdemo/wxSpinButton.rbw
870
- - samples/bigdemo/wxSpinCtrl.rbw
871
- - samples/bigdemo/wxSplitterWindow.rbw
872
- - samples/bigdemo/wxStaticBitmap.rbw
873
- - samples/bigdemo/wxStaticText.rbw
874
- - samples/bigdemo/wxStatusBar.rbw
875
- - samples/bigdemo/wxTextCtrl.rbw
876
- - samples/bigdemo/wxTextEntryDialog.rbw
877
- - samples/bigdemo/wxToggleButton.rbw
878
- - samples/bigdemo/wxToolBar.rbw
879
- - samples/bigdemo/wxTreeCtrl.rbw
880
787
  - samples/calendar/calendar.rb
881
788
  - samples/calendar/tn_calendar.png
882
- - samples/caret/caret.rb
883
- - samples/caret/mondrian.xpm
884
- - samples/caret/tn_caret.png
885
- - samples/controls/books.rb
886
- - samples/controls/choice.xpm
887
- - samples/controls/combo.xpm
888
- - samples/controls/controls.rb
889
- - samples/controls/gauge.xpm
890
789
  - samples/controls/get_item_sample.rb
891
790
  - samples/controls/htlbox.rb
892
- - samples/controls/list.xpm
893
- - samples/controls/mondrian.ico
894
- - samples/controls/mondrian.xpm
895
- - samples/controls/radio.xpm
896
- - samples/controls/stattext.xpm
897
- - samples/controls/test2.bmp
898
- - samples/controls/text.xpm
899
- - samples/controls/tn_books.png
900
- - samples/controls/tn_controls.png
901
791
  - samples/controls/tn_get_item_sample.png
902
792
  - samples/controls/tn_htlbox.png
903
793
  - samples/dialogs/dialogs.rb
@@ -921,12 +811,12 @@ files:
921
811
  - samples/drawing/tn_image_prt.png
922
812
  - samples/drawing/tn_maths_images.png
923
813
  - samples/drawing/tn_rmagic_bitmap_image.png
924
- - samples/etc/choice.rb
814
+ - samples/etc/caret.rb
925
815
  - samples/etc/miniframe.rb
926
816
  - samples/etc/sash.rb
927
817
  - samples/etc/scrollwin.rb
928
818
  - samples/etc/system_settings.rb
929
- - samples/etc/tn_choice.png
819
+ - samples/etc/tn_caret.png
930
820
  - samples/etc/tn_miniframe.png
931
821
  - samples/etc/tn_sash.png
932
822
  - samples/etc/tn_scrollwin.png
@@ -1053,8 +943,6 @@ files:
1053
943
  - samples/text/format-text-bold.png
1054
944
  - samples/text/format-text-italic.png
1055
945
  - samples/text/format-text-underline.png
1056
- - samples/text/mondrian.ico
1057
- - samples/text/mondrian.xpm
1058
946
  - samples/text/preferences-desktop-font.png
1059
947
  - samples/text/rich_textctrl.rb
1060
948
  - samples/text/richtext.rb
@@ -1081,6 +969,71 @@ files:
1081
969
  - samples/treectrl/tn_treectrl.png
1082
970
  - samples/treectrl/treectrl.rb
1083
971
  - samples/treectrl/unchecked.xpm
972
+ - samples/widgets/activityindicator.rb
973
+ - samples/widgets/art/widgets/activityindicator.xpm
974
+ - samples/widgets/art/widgets/bmpbtn.xpm
975
+ - samples/widgets/art/widgets/bmpcombobox.xpm
976
+ - samples/widgets/art/widgets/button.xpm
977
+ - samples/widgets/art/widgets/checkbox.xpm
978
+ - samples/widgets/art/widgets/choice.xpm
979
+ - samples/widgets/art/widgets/choicebk.xpm
980
+ - samples/widgets/art/widgets/clrpicker.xpm
981
+ - samples/widgets/art/widgets/combobox.xpm
982
+ - samples/widgets/art/widgets/datepick.xpm
983
+ - samples/widgets/art/widgets/dirctrl.xpm
984
+ - samples/widgets/art/widgets/dirpicker.xpm
985
+ - samples/widgets/art/widgets/filepicker.xpm
986
+ - samples/widgets/art/widgets/fontpicker.xpm
987
+ - samples/widgets/art/widgets/gauge.xpm
988
+ - samples/widgets/art/widgets/header.xpm
989
+ - samples/widgets/art/widgets/hyperlnk.xpm
990
+ - samples/widgets/art/widgets/listbook.xpm
991
+ - samples/widgets/art/widgets/listbox.xpm
992
+ - samples/widgets/art/widgets/native.xpm
993
+ - samples/widgets/art/widgets/notebook.xpm
994
+ - samples/widgets/art/widgets/odcombobox.xpm
995
+ - samples/widgets/art/widgets/radiobox.xpm
996
+ - samples/widgets/art/widgets/scrolbar.xpm
997
+ - samples/widgets/art/widgets/slider.xpm
998
+ - samples/widgets/art/widgets/spinbtn.xpm
999
+ - samples/widgets/art/widgets/statbmp.xpm
1000
+ - samples/widgets/art/widgets/statbox.xpm
1001
+ - samples/widgets/art/widgets/stattext.xpm
1002
+ - samples/widgets/art/widgets/text.xpm
1003
+ - samples/widgets/art/widgets/timepick.xpm
1004
+ - samples/widgets/art/widgets/toggle.xpm
1005
+ - samples/widgets/art/widgets/toucan.png
1006
+ - samples/widgets/bmpcombobox.rb
1007
+ - samples/widgets/button.rb
1008
+ - samples/widgets/checkbox.rb
1009
+ - samples/widgets/choice.rb
1010
+ - samples/widgets/clrpicker.rb
1011
+ - samples/widgets/combobox.rb
1012
+ - samples/widgets/datepick.rb
1013
+ - samples/widgets/dirctrl.rb
1014
+ - samples/widgets/dirpicker.rb
1015
+ - samples/widgets/editlbox.rb
1016
+ - samples/widgets/filectrl.rb
1017
+ - samples/widgets/filepicker.rb
1018
+ - samples/widgets/fontpicker.rb
1019
+ - samples/widgets/gauge.rb
1020
+ - samples/widgets/headerctrl.rb
1021
+ - samples/widgets/hyperlink.rb
1022
+ - samples/widgets/itemcontainer.rb
1023
+ - samples/widgets/listbox.rb
1024
+ - samples/widgets/notebook.rb
1025
+ - samples/widgets/odcombobox.rb
1026
+ - samples/widgets/radiobox.rb
1027
+ - samples/widgets/searchctrl.rb
1028
+ - samples/widgets/slider.rb
1029
+ - samples/widgets/spinbtn.rb
1030
+ - samples/widgets/statbmp.rb
1031
+ - samples/widgets/static.rb
1032
+ - samples/widgets/textctrl.rb
1033
+ - samples/widgets/timepick.rb
1034
+ - samples/widgets/tn_widgets.png
1035
+ - samples/widgets/toggle.rb
1036
+ - samples/widgets/widgets.rb
1084
1037
  - samples/xrc/custom_dialog.xrc
1085
1038
  - samples/xrc/custom_xrc_sample.rb
1086
1039
  - samples/xrc/samples.xrc
@@ -1145,6 +1098,7 @@ files:
1145
1098
  - tests/test_styled_text_ctrl.rb
1146
1099
  - tests/test_timer.rb
1147
1100
  - tests/test_tree_ctrl.rb
1101
+ - tests/test_validators.rb
1148
1102
  - tests/test_variant.rb
1149
1103
  - tests/test_window.rb
1150
1104
  - tests/testapp.rb
@@ -1,14 +0,0 @@
1
- # Copyright (c) 2023 M.J.N. Corino, The Netherlands
2
- #
3
- # This software is released under the MIT license.
4
- #
5
- # Some parts are
6
- # Copyright 2004-2007, wxRuby development team
7
- # released under the MIT-like wxRuby2 license
8
-
9
- require_relative './controlwithitems'
10
-
11
- class Wx::Choice
12
- alias :get_item_data :get_client_data
13
- alias :set_item_data :set_client_data
14
- end
@@ -1,110 +0,0 @@
1
- # Copyright (c) 2023 M.J.N. Corino, The Netherlands
2
- #
3
- # This software is released under the MIT license.
4
-
5
- module Wx
6
- class OwnerDrawnComboBox
7
-
8
- # Make this a Ruby enumerable so find, find_all, map etc are available
9
- include Enumerable
10
-
11
- # Passes each valid item index into the passed block
12
- def each
13
- get_count.times { | i | yield i }
14
- end
15
-
16
- # We need to cache client data in Ruby variables as we cannot access items
17
- # during the GC mark phase as for some platforms (WXMSW at least) that would
18
- # involve calling methods that would break in that phase.
19
-
20
- def client_data_store
21
- @client_data ||= []
22
- end
23
- private :client_data_store
24
-
25
- wx_set_client_data = instance_method :set_client_data
26
- define_method :set_client_data do |item, data|
27
- item = item.to_i
28
- wx_set_client_data.bind(self).call(item, data)
29
- client_data_store[item] = data
30
- end
31
-
32
- def get_client_data(item)
33
- client_data_store[item.to_i]
34
- end
35
-
36
- wx_append = instance_method :append
37
- define_method :append do |item, data=nil|
38
- if data
39
- if ::Array === item
40
- if !(::Array === data)
41
- ::Kernel.raise ::TypeError.new("Expected Array for argument 3")
42
- elsif data.size != item.size
43
- ::Kernel.raise ::ArgumentError.new("item and data array must be equal size")
44
- end
45
- offs = get_count
46
- wx_append.bind(self).call(item)
47
- item.size.times { |ix| set_client_data(offs+ix, data[ix]) }
48
- else
49
- wx_append.bind(self).call(item, data)
50
- client_data_store[get_count-1] = data
51
- end
52
- else
53
- wx_append.bind(self).call(item)
54
- # no changes to data store
55
- end
56
- end
57
-
58
- wx_insert = instance_method :insert
59
- define_method :insert do |item, pos, data=nil|
60
- if data
61
- if ::Array === item
62
- if !(::Array === data)
63
- ::Kernel.raise ::TypeError.new("Expected Array for argument 3")
64
- elsif data.size != item.size
65
- ::Kernel.raise ::ArgumentError.new("item and data array must be equal size")
66
- end
67
- wx_insert.bind(self).call(item, pos)
68
- client_data_store.insert(pos, *::Array.new(item.size))
69
- item.size.times { |ix| set_client_data(pos+ix, data[ix]) }
70
- else
71
- wx_insert.bind(self).call(item, pos, data)
72
- client_data_store.insert(pos, data)
73
- end
74
- else
75
- wx_insert.bind(self).call(item, pos)
76
- if ::Array === item
77
- client_data_store.insert(pos, *::Array.new(item.size))
78
- else
79
- client_data_store.insert(pos, nil)
80
- end
81
- end
82
- end
83
-
84
- wx_set = instance_method :set
85
- define_method :set do |items, data=nil|
86
- if data
87
- if !(::Array === data)
88
- ::Kernel.raise ::TypeError.new("Expected Array for argument 2")
89
- elsif data.size != items.size
90
- ::Kernel.raise ::ArgumentError.new("items and data array must be equal size")
91
- end
92
- end
93
- wx_set.bind(self).call(items)
94
- client_data_store.clear
95
- items.each_with_index { |item, ix| set_client_data(item, data[ix]) }
96
- end
97
-
98
- wx_clear = instance_method :clear
99
- define_method :clear do
100
- wx_clear.bind(self).call
101
- client_data_store.clear
102
- end
103
-
104
- wx_delete = instance_method :delete
105
- define_method :delete do |item|
106
- wx_delete.bind(self).call(item.to_i)
107
- client_data_store.slice!(item.to_i)
108
- end
109
- end
110
- end
@@ -1,58 +0,0 @@
1
- # Copyright (c) 2023 M.J.N. Corino, The Netherlands
2
- #
3
- # This software is released under the MIT license.
4
-
5
- ###
6
- # wxRuby3 Grid client data typemap definition
7
- ###
8
-
9
- require_relative '../core/mapping'
10
-
11
- module WXRuby3
12
-
13
- module Typemap
14
-
15
- # Typemaps for converting returned PGCell references to
16
- # either the correct wxRuby class
17
- module GridClientData
18
-
19
- include Typemap::Module
20
-
21
- define do
22
-
23
- map 'wxClientData *' => 'Object' do
24
- add_header_code <<~__CODE
25
- #include <wx/clntdata.h>
26
- extern void wxRuby_RegisterGridClientData(wxClientData* pcd, VALUE rbval);
27
- extern void wxRuby_UnregisterGridClientData(wxClientData* pcd);
28
-
29
- class WXRBGridClientData : public wxClientData
30
- {
31
- public:
32
- WXRBGridClientData() : rb_data(Qnil) { }
33
- WXRBGridClientData (VALUE data) : rb_data(data) { wxRuby_RegisterGridClientData(this, data); }
34
- virtual ~WXRBGridClientData () { wxRuby_UnregisterGridClientData(this); }
35
- VALUE GetData() const { return rb_data; }
36
- private:
37
- VALUE rb_data;
38
- };
39
-
40
- __CODE
41
- map_in code: '$1 = new WXRBGridClientData($input);'
42
- map_out code: <<~__CODE
43
- $result = Qnil;
44
- if ($1)
45
- {
46
- WXRBGridClientData* pgcd = dynamic_cast<WXRBGridClientData*> ($1);
47
- if (pgcd) $result = pgcd->GetData();
48
- }
49
- __CODE
50
- end
51
-
52
- end
53
-
54
- end
55
-
56
- end
57
-
58
- end
@@ -1,39 +0,0 @@
1
- module About
2
-
3
- class MyAboutBox < Wx::Dialog
4
- def initialize(parent)
5
- super(parent, -1, "About the WxRuby Demo.")
6
- sizer = Wx::BoxSizer.new(Wx::HORIZONTAL)
7
- set_size(Wx::Size.new(600,350))
8
- headerFont = Wx::Font.new(36, Wx::FONTFAMILY_SWISS, Wx::FONTSTYLE_NORMAL, Wx::FONTWEIGHT_NORMAL)
9
- bodyFont = Wx::Font.new(12, Wx::FONTFAMILY_SWISS, Wx::FONTSTYLE_NORMAL, Wx::FONTWEIGHT_NORMAL)
10
- title = Wx::StaticText.new(self, -1, "WxRuby Demo!", Wx::Point.new(20, 20))
11
- title.set_font(headerFont)
12
-
13
- rVersion = Wx::StaticText.new(self, -1, "Running on Ruby version " + RUBY_VERSION + " on " + RUBY_PLATFORM, Wx::Point.new(20,100))
14
- rVersion.set_font(bodyFont)
15
- rVersion.set_foreground_colour(Wx::RED)
16
-
17
- wxVersion = Wx::StaticText.new(self, -1, Wx::WXWIDGETS_VERSION, Wx::Point.new(20,120))
18
- wxVersion.set_font(bodyFont)
19
- wxVersion.set_foreground_colour(Wx::BLUE)
20
-
21
- str = "Welcome to the WxRuby Demo! This demo has been ported from the \nwxPython demo created by ROBIN DUNN (http://www.wxpython.org).\nGo ahead and click on each demo via the tree or the demo menu.\nLook at the source code - it is an excellent way to learn WxRuby!\n\nPorted by Robert Paul Carlin"
22
- body = Wx::StaticText.new(self, -1, str, Wx::Point.new(20, 160))
23
- body.set_font(bodyFont)
24
-
25
- self.centre_on_parent(Wx::BOTH)
26
-
27
-
28
- end
29
-
30
-
31
- end
32
-
33
- end
34
-
35
- if __FILE__ == $0
36
- run_solo_lib = File.join( File.dirname(__FILE__), 'run.rb')
37
- load run_solo_lib
38
- run File.basename($0)
39
- end
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
- # Freely reusable code: see SAMPLES-LICENSE.TXT for details
4
- begin
5
- require 'rubygems'
6
- rescue LoadError
7
- end
8
- require 'wx'
9
-
10
-
11
-
12
- class ColoredPanel < Wx::Window
13
- def initialize(parent, color)
14
- super(parent, -1, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, Wx::SIMPLE_BORDER)
15
- set_background_colour(color)
16
- end
17
- end
18
-
19
- if __FILE__ == $0
20
- run_solo_lib = File.join( File.dirname(__FILE__), 'run.rb')
21
- load run_solo_lib
22
- run File.basename($0)
23
- end