wxruby3 0.9.0.pre.rc.1-x64-mingw-ucrt → 0.9.0.pre.rc.3-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (383) hide show
  1. checksums.yaml +4 -4
  2. data/INSTALL.md +73 -22
  3. data/README.md +40 -8
  4. data/assets/hello_button-macos.png +0 -0
  5. data/assets/hello_button-msw.png +0 -0
  6. data/assets/hello_button_clicked-macos.png +0 -0
  7. data/assets/hello_button_clicked-msw.png +0 -0
  8. data/assets/hello_button_clicked_combi.png +0 -0
  9. data/assets/hello_world-macos.png +0 -0
  10. data/assets/hello_world-msw.png +0 -0
  11. data/assets/hello_world_combi.png +0 -0
  12. data/ext/wxbase32u_gcc_custom.dll +0 -0
  13. data/ext/wxbase32u_net_gcc_custom.dll +0 -0
  14. data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
  15. data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
  16. data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
  17. data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
  18. data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
  19. data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
  20. data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
  21. data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
  22. data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
  23. data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
  24. data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
  25. data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
  26. data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
  27. data/lib/wx/core/brush.rb +6 -0
  28. data/lib/wx/core/event_loop.rb +7 -0
  29. data/lib/wx/core/events/evt_list.rb +7 -0
  30. data/lib/wx/core/evthandler.rb +12 -2
  31. data/lib/wx/core/font.rb +22 -14
  32. data/lib/wx/core/helpprovider.rb +2 -2
  33. data/lib/wx/core/image.rb +33 -0
  34. data/lib/wx/core/listctrl.rb +17 -13
  35. data/lib/wx/core/log.rb +90 -0
  36. data/lib/wx/core/menu.rb +5 -0
  37. data/lib/wx/core/pen.rb +6 -0
  38. data/lib/wx/core/window.rb +28 -1
  39. data/lib/wx/doc/app.rb +40 -0
  40. data/lib/wx/doc/bitmap.rb +11 -15
  41. data/lib/wx/doc/brush.rb +17 -0
  42. data/lib/wx/doc/event_loop.rb +7 -0
  43. data/lib/wx/doc/extra/00_starting.md +6 -6
  44. data/lib/wx/doc/extra/02_lifecycles.md +9 -8
  45. data/lib/wx/doc/extra/09_exceptions.md +1 -1
  46. data/lib/wx/doc/extra/11_drawing_and_dc.md +4 -4
  47. data/lib/wx/doc/font.rb +27 -0
  48. data/lib/wx/doc/functions.rb +51 -23
  49. data/lib/wx/doc/gc_dc.rb +1 -1
  50. data/lib/wx/doc/gen/about_dialog_info.rb +1 -1
  51. data/lib/wx/doc/gen/accelerator.rb +6 -6
  52. data/lib/wx/doc/gen/accessible.rb +6 -2
  53. data/lib/wx/doc/gen/activity_indicator.rb +65 -0
  54. data/lib/wx/doc/gen/animation.rb +7 -7
  55. data/lib/wx/doc/gen/animation_ctrl.rb +7 -6
  56. data/lib/wx/doc/gen/any_button.rb +1 -1
  57. data/lib/wx/doc/gen/app.rb +17 -11
  58. data/lib/wx/doc/gen/art_provider.rb +61 -1
  59. data/lib/wx/doc/gen/aui/aui_dock_art.rb +12 -12
  60. data/lib/wx/doc/gen/aui/aui_floating_frame.rb +6 -6
  61. data/lib/wx/doc/gen/aui/aui_manager.rb +45 -27
  62. data/lib/wx/doc/gen/aui/aui_manager_event.rb +12 -6
  63. data/lib/wx/doc/gen/aui/aui_mdi_child_frame.rb +6 -6
  64. data/lib/wx/doc/gen/aui/aui_mdi_client_window.rb +6 -6
  65. data/lib/wx/doc/gen/aui/aui_mdi_parent_frame.rb +10 -10
  66. data/lib/wx/doc/gen/aui/aui_notebook.rb +34 -7
  67. data/lib/wx/doc/gen/aui/aui_notebook_event.rb +17 -2
  68. data/lib/wx/doc/gen/aui/aui_pane_info.rb +51 -51
  69. data/lib/wx/doc/gen/aui/aui_tab_art.rb +6 -6
  70. data/lib/wx/doc/gen/aui/aui_tool_bar.rb +35 -20
  71. data/lib/wx/doc/gen/aui/aui_tool_bar_art.rb +16 -16
  72. data/lib/wx/doc/gen/aui/aui_tool_bar_event.rb +4 -4
  73. data/lib/wx/doc/gen/aui/aui_tool_bar_item.rb +4 -4
  74. data/lib/wx/doc/gen/bitmap.rb +32 -26
  75. data/lib/wx/doc/gen/bitmap_button.rb +10 -6
  76. data/lib/wx/doc/gen/bitmap_combo_box.rb +12 -7
  77. data/lib/wx/doc/gen/book_ctrl_base.rb +7 -3
  78. data/lib/wx/doc/gen/book_ctrl_event.rb +2 -2
  79. data/lib/wx/doc/gen/box_sizer.rb +1 -1
  80. data/lib/wx/doc/gen/brush.rb +16 -4
  81. data/lib/wx/doc/gen/busy_info.rb +1 -1
  82. data/lib/wx/doc/gen/button.rb +19 -7
  83. data/lib/wx/doc/gen/calculate_layout_event.rb +2 -1
  84. data/lib/wx/doc/gen/calendar_ctrl.rb +28 -16
  85. data/lib/wx/doc/gen/calendar_date_attr.rb +2 -2
  86. data/lib/wx/doc/gen/calendar_event.rb +3 -3
  87. data/lib/wx/doc/gen/caret.rb +2 -2
  88. data/lib/wx/doc/gen/check_box.rb +10 -6
  89. data/lib/wx/doc/gen/check_list_box.rb +8 -7
  90. data/lib/wx/doc/gen/choice.rb +7 -6
  91. data/lib/wx/doc/gen/choicebook.rb +12 -6
  92. data/lib/wx/doc/gen/client_dc.rb +1 -1
  93. data/lib/wx/doc/gen/clipboard.rb +1 -1
  94. data/lib/wx/doc/gen/collapsible_pane.rb +9 -6
  95. data/lib/wx/doc/gen/collapsible_pane_event.rb +2 -1
  96. data/lib/wx/doc/gen/colour.rb +16 -6
  97. data/lib/wx/doc/gen/colour_dialog.rb +6 -6
  98. data/lib/wx/doc/gen/colour_picker_ctrl.rb +15 -9
  99. data/lib/wx/doc/gen/colour_picker_event.rb +7 -4
  100. data/lib/wx/doc/gen/combo_box.rb +22 -13
  101. data/lib/wx/doc/gen/context_help_button.rb +50 -1
  102. data/lib/wx/doc/gen/control.rb +9 -6
  103. data/lib/wx/doc/gen/core.rb +5 -2
  104. data/lib/wx/doc/gen/cursor.rb +16 -11
  105. data/lib/wx/doc/gen/data_format.rb +2 -2
  106. data/lib/wx/doc/gen/data_object.rb +23 -16
  107. data/lib/wx/doc/gen/date_event.rb +3 -3
  108. data/lib/wx/doc/gen/date_picker_ctrl.rb +11 -6
  109. data/lib/wx/doc/gen/dc.rb +37 -12
  110. data/lib/wx/doc/gen/defs.rb +16 -16
  111. data/lib/wx/doc/gen/dialog.rb +19 -5
  112. data/lib/wx/doc/gen/dir_dialog.rb +6 -2
  113. data/lib/wx/doc/gen/dir_filter_list_ctrl.rb +2 -2
  114. data/lib/wx/doc/gen/dir_picker_ctrl.rb +14 -9
  115. data/lib/wx/doc/gen/drag_drop.rb +15 -15
  116. data/lib/wx/doc/gen/drag_image.rb +6 -6
  117. data/lib/wx/doc/gen/editable_list_box.rb +7 -3
  118. data/lib/wx/doc/gen/event.rb +44 -13
  119. data/lib/wx/doc/gen/event_blocker.rb +19 -17
  120. data/lib/wx/doc/gen/event_filter.rb +43 -47
  121. data/lib/wx/doc/gen/event_list.rb +22 -15
  122. data/lib/wx/doc/gen/events.rb +215 -79
  123. data/lib/wx/doc/gen/evt_handler.rb +1 -1
  124. data/lib/wx/doc/gen/ext_help_controller.rb +1 -1
  125. data/lib/wx/doc/gen/file_dialog.rb +64 -56
  126. data/lib/wx/doc/gen/file_dir_picker_event.rb +5 -3
  127. data/lib/wx/doc/gen/file_picker_ctrl.rb +16 -8
  128. data/lib/wx/doc/gen/find_dialog_event.rb +7 -2
  129. data/lib/wx/doc/gen/find_replace_data.rb +1 -1
  130. data/lib/wx/doc/gen/find_replace_dialog.rb +1 -1
  131. data/lib/wx/doc/gen/flex_grid_sizer.rb +12 -6
  132. data/lib/wx/doc/gen/font.rb +39 -29
  133. data/lib/wx/doc/gen/font_data.rb +9 -5
  134. data/lib/wx/doc/gen/font_dialog.rb +3 -3
  135. data/lib/wx/doc/gen/font_picker_ctrl.rb +10 -6
  136. data/lib/wx/doc/gen/font_picker_event.rb +2 -1
  137. data/lib/wx/doc/gen/frame.rb +34 -11
  138. data/lib/wx/doc/gen/fs_file.rb +4 -17
  139. data/lib/wx/doc/gen/gauge.rb +11 -7
  140. data/lib/wx/doc/gen/gcdc.rb +5 -1
  141. data/lib/wx/doc/gen/gdi_common.rb +35 -33
  142. data/lib/wx/doc/gen/gdi_object.rb +1 -1
  143. data/lib/wx/doc/gen/generic_dir_ctrl.rb +13 -7
  144. data/lib/wx/doc/gen/graphics_context.rb +29 -28
  145. data/lib/wx/doc/gen/graphics_object.rb +1 -1
  146. data/lib/wx/doc/gen/grid/grid_cell_activatable_editor.rb +2 -2
  147. data/lib/wx/doc/gen/grid/grid_cell_attr.rb +10 -10
  148. data/lib/wx/doc/gen/grid/grid_cell_auto_wrap_string_editor.rb +1 -1
  149. data/lib/wx/doc/gen/grid/grid_cell_auto_wrap_string_renderer.rb +1 -1
  150. data/lib/wx/doc/gen/grid/grid_cell_bool_editor.rb +1 -1
  151. data/lib/wx/doc/gen/grid/grid_cell_bool_renderer.rb +1 -1
  152. data/lib/wx/doc/gen/grid/grid_cell_choice_editor.rb +2 -2
  153. data/lib/wx/doc/gen/grid/grid_cell_date_editor.rb +1 -1
  154. data/lib/wx/doc/gen/grid/grid_cell_date_renderer.rb +1 -1
  155. data/lib/wx/doc/gen/grid/grid_cell_date_time_renderer.rb +1 -1
  156. data/lib/wx/doc/gen/grid/grid_cell_editor.rb +13 -10
  157. data/lib/wx/doc/gen/grid/grid_cell_enum_editor.rb +1 -1
  158. data/lib/wx/doc/gen/grid/grid_cell_enum_renderer.rb +1 -1
  159. data/lib/wx/doc/gen/grid/grid_cell_float_editor.rb +1 -1
  160. data/lib/wx/doc/gen/grid/grid_cell_float_renderer.rb +1 -1
  161. data/lib/wx/doc/gen/grid/grid_cell_number_editor.rb +1 -1
  162. data/lib/wx/doc/gen/grid/grid_cell_number_renderer.rb +1 -1
  163. data/lib/wx/doc/gen/grid/grid_cell_renderer.rb +12 -12
  164. data/lib/wx/doc/gen/grid/grid_cell_string_renderer.rb +1 -1
  165. data/lib/wx/doc/gen/grid/grid_cell_text_editor.rb +1 -1
  166. data/lib/wx/doc/gen/grid/grid_ctrl.rb +32 -18
  167. data/lib/wx/doc/gen/grid/grid_editor_created_event.rb +5 -3
  168. data/lib/wx/doc/gen/grid/grid_event.rb +20 -3
  169. data/lib/wx/doc/gen/grid/grid_range_select_event.rb +7 -3
  170. data/lib/wx/doc/gen/grid/grid_size_event.rb +9 -3
  171. data/lib/wx/doc/gen/grid/grid_string_table.rb +2 -2
  172. data/lib/wx/doc/gen/grid/grid_table_base.rb +7 -7
  173. data/lib/wx/doc/gen/grid/grid_table_message.rb +5 -5
  174. data/lib/wx/doc/gen/grid_bag_sizer.rb +5 -5
  175. data/lib/wx/doc/gen/grid_sizer.rb +4 -4
  176. data/lib/wx/doc/gen/gui_event_loop.rb +132 -0
  177. data/lib/wx/doc/gen/help_controller.rb +18 -12
  178. data/lib/wx/doc/gen/html/html_cell.rb +36 -18
  179. data/lib/wx/doc/gen/html/html_cell_event.rb +5 -3
  180. data/lib/wx/doc/gen/html/html_easy_printing.rb +9 -4
  181. data/lib/wx/doc/gen/html/html_help_controller.rb +34 -8
  182. data/lib/wx/doc/gen/html/html_help_data.rb +3 -3
  183. data/lib/wx/doc/gen/html/html_help_frame.rb +6 -6
  184. data/lib/wx/doc/gen/html/html_help_window.rb +12 -8
  185. data/lib/wx/doc/gen/html/html_link_event.rb +4 -3
  186. data/lib/wx/doc/gen/html/html_list_box.rb +15 -7
  187. data/lib/wx/doc/gen/html/html_printout.rb +15 -5
  188. data/lib/wx/doc/gen/html/html_window.rb +19 -8
  189. data/lib/wx/doc/gen/hyperlink_ctrl.rb +152 -0
  190. data/lib/wx/doc/gen/hyperlink_event.rb +44 -0
  191. data/lib/wx/doc/gen/icon.rb +14 -14
  192. data/lib/wx/doc/gen/image.rb +119 -64
  193. data/lib/wx/doc/gen/image_list.rb +10 -6
  194. data/lib/wx/doc/gen/keyboard_state.rb +7 -7
  195. data/lib/wx/doc/gen/list_box.rb +30 -21
  196. data/lib/wx/doc/gen/list_ctrl.rb +169 -78
  197. data/lib/wx/doc/gen/list_event.rb +24 -2
  198. data/lib/wx/doc/gen/listbook.rb +12 -6
  199. data/lib/wx/doc/gen/locale.rb +11 -36
  200. data/lib/wx/doc/gen/log.rb +122 -45
  201. data/lib/wx/doc/gen/mdi_client_window.rb +2 -2
  202. data/lib/wx/doc/gen/mdi_frame.rb +15 -9
  203. data/lib/wx/doc/gen/media_ctrl.rb +7 -4
  204. data/lib/wx/doc/gen/media_event.rb +8 -2
  205. data/lib/wx/doc/gen/memory_dc.rb +23 -27
  206. data/lib/wx/doc/gen/menu.rb +9 -9
  207. data/lib/wx/doc/gen/menu_bar.rb +4 -10
  208. data/lib/wx/doc/gen/menu_item.rb +115 -34
  209. data/lib/wx/doc/gen/message_dialog.rb +48 -30
  210. data/lib/wx/doc/gen/mini_frame.rb +12 -3
  211. data/lib/wx/doc/gen/mouse_state.rb +1 -1
  212. data/lib/wx/doc/gen/multi_choice_dialog.rb +4 -2
  213. data/lib/wx/doc/gen/non_owned_window.rb +6 -7
  214. data/lib/wx/doc/gen/notebook.rb +20 -15
  215. data/lib/wx/doc/gen/number_entry_dialog.rb +2 -2
  216. data/lib/wx/doc/gen/object.rb +2 -2
  217. data/lib/wx/doc/gen/palette.rb +3 -3
  218. data/lib/wx/doc/gen/panel.rb +4 -3
  219. data/lib/wx/doc/gen/pen.rb +25 -12
  220. data/lib/wx/doc/gen/pg/numeric_property_validator.rb +1 -1
  221. data/lib/wx/doc/gen/pg/pg_array_editor_dialog.rb +3 -3
  222. data/lib/wx/doc/gen/pg/pg_cell.rb +12 -12
  223. data/lib/wx/doc/gen/pg/pg_editor.rb +76 -74
  224. data/lib/wx/doc/gen/pg/pg_multi_button.rb +3 -3
  225. data/lib/wx/doc/gen/pg/pg_properties.rb +221 -138
  226. data/lib/wx/doc/gen/pg/pg_property.rb +103 -54
  227. data/lib/wx/doc/gen/pg/pg_validation_info.rb +1 -1
  228. data/lib/wx/doc/gen/pg/property_grid.rb +19 -19
  229. data/lib/wx/doc/gen/pg/property_grid_event.rb +18 -5
  230. data/lib/wx/doc/gen/pg/property_grid_interface.rb +36 -24
  231. data/lib/wx/doc/gen/pg/property_grid_manager.rb +12 -12
  232. data/lib/wx/doc/gen/pg/property_grid_page.rb +12 -11
  233. data/lib/wx/doc/gen/pg/property_grid_page_state.rb +8 -8
  234. data/lib/wx/doc/gen/picker_base.rb +12 -11
  235. data/lib/wx/doc/gen/platform_info.rb +7 -7
  236. data/lib/wx/doc/gen/popup_window.rb +6 -6
  237. data/lib/wx/doc/gen/progress_dialog.rb +1 -1
  238. data/lib/wx/doc/gen/property_sheet_dialog.rb +19 -17
  239. data/lib/wx/doc/gen/prt/page_setup_dialog.rb +2 -2
  240. data/lib/wx/doc/gen/prt/preview_frame.rb +4 -1
  241. data/lib/wx/doc/gen/prt/print_abort_dialog.rb +1 -1
  242. data/lib/wx/doc/gen/prt/print_data.rb +24 -18
  243. data/lib/wx/doc/gen/prt/print_dialog.rb +4 -4
  244. data/lib/wx/doc/gen/prt/printer.rb +22 -22
  245. data/lib/wx/doc/gen/query_layout_info_event.rb +2 -1
  246. data/lib/wx/doc/gen/radio_box.rb +12 -18
  247. data/lib/wx/doc/gen/radio_button.rb +8 -6
  248. data/lib/wx/doc/gen/rbn/ribbon_art_provider.rb +39 -39
  249. data/lib/wx/doc/gen/rbn/ribbon_bar.rb +25 -7
  250. data/lib/wx/doc/gen/rbn/ribbon_bar_event.rb +5 -5
  251. data/lib/wx/doc/gen/rbn/ribbon_button_bar.rb +9 -2
  252. data/lib/wx/doc/gen/rbn/ribbon_button_bar_event.rb +5 -5
  253. data/lib/wx/doc/gen/rbn/ribbon_control.rb +4 -4
  254. data/lib/wx/doc/gen/rbn/ribbon_gallery.rb +6 -2
  255. data/lib/wx/doc/gen/rbn/ribbon_gallery_event.rb +5 -5
  256. data/lib/wx/doc/gen/rbn/ribbon_page.rb +5 -5
  257. data/lib/wx/doc/gen/rbn/ribbon_panel.rb +12 -6
  258. data/lib/wx/doc/gen/rbn/ribbon_panel_event.rb +5 -5
  259. data/lib/wx/doc/gen/rbn/ribbon_tool_bar.rb +4 -2
  260. data/lib/wx/doc/gen/rbn/ribbon_tool_bar_event.rb +5 -5
  261. data/lib/wx/doc/gen/region.rb +9 -8
  262. data/lib/wx/doc/gen/region_iterator.rb +2 -2
  263. data/lib/wx/doc/gen/rtc/rich_text_buffer.rb +92 -92
  264. data/lib/wx/doc/gen/rtc/rich_text_ctrl.rb +56 -34
  265. data/lib/wx/doc/gen/rtc/rich_text_event.rb +23 -4
  266. data/lib/wx/doc/gen/rtc/rich_text_file_handler.rb +6 -6
  267. data/lib/wx/doc/gen/rtc/rich_text_header_footer_data.rb +9 -5
  268. data/lib/wx/doc/gen/rtc/rich_text_html_handler.rb +6 -2
  269. data/lib/wx/doc/gen/rtc/rich_text_printing.rb +12 -12
  270. data/lib/wx/doc/gen/rtc/rich_text_xml_handler.rb +1 -1
  271. data/lib/wx/doc/gen/rtc/symbol_picker_dialog.rb +2 -2
  272. data/lib/wx/doc/gen/sash_event.rb +3 -1
  273. data/lib/wx/doc/gen/sash_layout_window.rb +5 -3
  274. data/lib/wx/doc/gen/sash_window.rb +8 -3
  275. data/lib/wx/doc/gen/scroll_bar.rb +29 -8
  276. data/lib/wx/doc/gen/scrolled_canvas.rb +41 -23
  277. data/lib/wx/doc/gen/scrolled_control.rb +41 -23
  278. data/lib/wx/doc/gen/scrolled_window.rb +41 -23
  279. data/lib/wx/doc/gen/search_ctrl.rb +15 -8
  280. data/lib/wx/doc/gen/simplebook.rb +2 -2
  281. data/lib/wx/doc/gen/single_choice_dialog.rb +4 -2
  282. data/lib/wx/doc/gen/sizer.rb +29 -28
  283. data/lib/wx/doc/gen/slider.rb +49 -16
  284. data/lib/wx/doc/gen/spin_button.rb +15 -9
  285. data/lib/wx/doc/gen/spin_ctrl.rb +12 -6
  286. data/lib/wx/doc/gen/spin_event.rb +5 -2
  287. data/lib/wx/doc/gen/splash_screen.rb +16 -12
  288. data/lib/wx/doc/gen/splitter_event.rb +6 -2
  289. data/lib/wx/doc/gen/splitter_window.rb +20 -4
  290. data/lib/wx/doc/gen/static_bitmap.rb +5 -5
  291. data/lib/wx/doc/gen/static_box.rb +36 -32
  292. data/lib/wx/doc/gen/static_box_sizer.rb +13 -10
  293. data/lib/wx/doc/gen/static_line.rb +5 -4
  294. data/lib/wx/doc/gen/static_text.rb +12 -6
  295. data/lib/wx/doc/gen/status_bar.rb +14 -5
  296. data/lib/wx/doc/gen/stc/styled_text_ctrl.rb +55 -7
  297. data/lib/wx/doc/gen/stc/styled_text_event.rb +224 -49
  298. data/lib/wx/doc/gen/std_dialog_button_sizer.rb +11 -2
  299. data/lib/wx/doc/gen/svg_file_dc.rb +3 -3
  300. data/lib/wx/doc/gen/system_options.rb +11 -1
  301. data/lib/wx/doc/gen/system_settings.rb +3 -3
  302. data/lib/wx/doc/gen/task_bar_icon.rb +10 -2
  303. data/lib/wx/doc/gen/task_bar_icon_event.rb +3 -3
  304. data/lib/wx/doc/gen/text_attr.rb +11 -7
  305. data/lib/wx/doc/gen/text_ctrl.rb +61 -92
  306. data/lib/wx/doc/gen/text_entry.rb +28 -40
  307. data/lib/wx/doc/gen/text_entry_dialog.rb +19 -19
  308. data/lib/wx/doc/gen/text_validator.rb +0 -11
  309. data/lib/wx/doc/gen/time_picker_ctrl.rb +6 -5
  310. data/lib/wx/doc/gen/timer.rb +8 -4
  311. data/lib/wx/doc/gen/timer_event.rb +19 -26
  312. data/lib/wx/doc/gen/tip_provider.rb +1 -1
  313. data/lib/wx/doc/gen/toggle_button.rb +6 -5
  314. data/lib/wx/doc/gen/tool_bar.rb +41 -24
  315. data/lib/wx/doc/gen/tool_tip.rb +2 -2
  316. data/lib/wx/doc/gen/toolbook.rb +6 -3
  317. data/lib/wx/doc/gen/top_level_window.rb +35 -25
  318. data/lib/wx/doc/gen/tree_ctrl.rb +63 -13
  319. data/lib/wx/doc/gen/tree_event.rb +23 -2
  320. data/lib/wx/doc/gen/treebook.rb +6 -2
  321. data/lib/wx/doc/gen/ui_action_simulator.rb +1 -1
  322. data/lib/wx/doc/gen/utils.rb +9 -3
  323. data/lib/wx/doc/gen/v_list_box.rb +2 -2
  324. data/lib/wx/doc/gen/v_scrolled_window.rb +2 -2
  325. data/lib/wx/doc/gen/validator.rb +7 -5
  326. data/lib/wx/doc/gen/variant.rb +34 -97
  327. data/lib/wx/doc/gen/window.rb +157 -102
  328. data/lib/wx/doc/gen/window_dc.rb +1 -1
  329. data/lib/wx/doc/gen/with_images.rb +1 -1
  330. data/lib/wx/doc/gen/wizard.rb +17 -4
  331. data/lib/wx/doc/gen/wizard_event.rb +9 -2
  332. data/lib/wx/doc/gen/wizard_page.rb +1 -1
  333. data/lib/wx/doc/gen/wizard_page_simple.rb +7 -7
  334. data/lib/wx/doc/gen/xml_node.rb +3 -3
  335. data/lib/wx/doc/gen/xml_resource.rb +12 -9
  336. data/lib/wx/doc/image.rb +42 -12
  337. data/lib/wx/doc/list_ctrl.rb +32 -0
  338. data/lib/wx/doc/log.rb +28 -0
  339. data/lib/wx/doc/pen.rb +17 -0
  340. data/lib/wx/doc/prt/printer_dc.rb +2 -2
  341. data/lib/wx/doc/radio_box.rb +20 -0
  342. data/lib/wx/doc/scaled_dc.rb +1 -1
  343. data/lib/wx/doc/text_validator.rb +12 -0
  344. data/lib/wx/doc/window.rb +27 -0
  345. data/lib/wx/keyword_defs.rb +77 -76
  346. data/lib/wx/prt/keyword_defs.rb +5 -1
  347. data/lib/wx/version.rb +1 -1
  348. data/lib/wxruby_aui.so +0 -0
  349. data/lib/wxruby_core.so +0 -0
  350. data/lib/wxruby_grid.so +0 -0
  351. data/lib/wxruby_html.so +0 -0
  352. data/lib/wxruby_pg.so +0 -0
  353. data/lib/wxruby_prt.so +0 -0
  354. data/lib/wxruby_rbn.so +0 -0
  355. data/lib/wxruby_rtc.so +0 -0
  356. data/lib/wxruby_stc.so +0 -0
  357. data/rakelib/install.rb +17 -6
  358. data/rakelib/lib/config/linux.rb +4 -2
  359. data/rakelib/lib/config/macosx.rb +120 -1
  360. data/rakelib/lib/config/mingw.rb +6 -1
  361. data/rakelib/lib/config/unixish.rb +26 -11
  362. data/rakelib/lib/config.rb +15 -6
  363. data/samples/aui/aui.rb +432 -363
  364. data/samples/propgrid/propgrid.rb +3 -0
  365. data/samples/sampler/editor.rb +33 -25
  366. data/samples/sampler/sample.rb +2 -2
  367. data/samples/sampler/stc_editor.rb +4 -2
  368. data/tests/lib/item_container_tests.rb +82 -0
  369. data/tests/lib/text_entry_tests.rb +80 -0
  370. data/tests/lib/wxapp_runner.rb +12 -0
  371. data/tests/lib/wxframe_runner.rb +89 -4
  372. data/tests/test_art.rb +9 -0
  373. data/tests/test_box_sizer.rb +161 -0
  374. data/tests/test_ext_controls.rb +28 -0
  375. data/tests/test_font.rb +239 -0
  376. data/tests/test_grid_sizer.rb +148 -0
  377. data/tests/test_intl.rb +5 -1
  378. data/tests/test_list_ctrl.rb +53 -0
  379. data/tests/test_log.rb +163 -0
  380. data/tests/test_std_controls.rb +321 -37
  381. data/tests/test_timer.rb +95 -0
  382. data/tests/test_window.rb +340 -0
  383. metadata +36 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b0789682f3f41499d529e24441bcff8b0ec200db6b1a84cbac198e445f73f33
4
- data.tar.gz: f48166b2c460c774916a7d2b177b73bdc353c0c7f3f35c760de3d6aa9a66dd57
3
+ metadata.gz: cb68ca47dc52aa1c4ff478322597d44502782a0d58228d94a448d41963614ba6
4
+ data.tar.gz: 7799517b7e2018421436f41dce8e3f7a5faa9c0cd2b2c4df93b6e2558904a464
5
5
  SHA512:
6
- metadata.gz: 8f817d5543dcf138ff6c21b161beff6e8e93677db8922d37da6bcebb4a2940a44400c16b9800ee44ccce4b574eecd1eb2c0db909ab464bcbfb0a0cb89870063c
7
- data.tar.gz: 113af98388e9253f223fb5176f9722a61b7485f7a4a56dd79080a6eb55aafc3c6929522977d95e0564e7761e4655c8fdc3dde22796a108f8c5ba853329ca4ee0
6
+ metadata.gz: 87cffdbf4f24e354a0b68337a01923c4f5c04084f5cebd02e5a8f7a065e7d92c8fa413852fd008bce63e841f2e031bd776d43009fdb997dd04cbaf1516b9024f
7
+ data.tar.gz: 434e080088dd9b85becebeb57c56f48c7465940553c56717a946cddf4e3eed31f81e4cccf22e9a715761007696e012f5a2f441edc8f21b307b405f41dfcf0d96
data/INSTALL.md CHANGED
@@ -4,32 +4,56 @@
4
4
 
5
5
  # Installation of wxRuby3
6
6
 
7
+ Below are installation instructions for Linux, Windows, and Mac (both AMD64 and ARM64).
8
+
9
+ ## Minimal requirements for installing wxRuby3
10
+
11
+ The minimal requirements for installing any source based setup (gem, source package or Github clone) of wxRuby3 are:
12
+
13
+ | Sofware | Notes |
14
+ |-----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
15
+ | Ruby | A supported version of the Ruby interpreter needs to be installed. |
16
+ | C++ compiler<br>(incl. dev tools like `make`) | On linux a recent version of the GNU C++ compiler (with c++-14 support) needs to be installed<br>On Windows the RubyInstaller MSYS2-Devkit needs to be installed<br>On MacOS XCode with commandline tools needs to be installed via `sudo xcode-select --install` |
17
+ | Git version control toolkit | |
18
+ | SWIG >= 3.0.12 | On MacOS install [Homebrew](https://brew.sh/) and than `brew install swig` |
19
+ | Doxygen (>= 1.9.1, <= 1.9.6) | Doxygen > 1.9.6 has changes that cause problems with the wxWidgets doxygen files.<br>On MacOS: `brew tap mcorino/wxruby3` and than `brew install doxygen@1.9.6` (default brew recipe installs 1.9.7) |
20
+ | wxWidgets (>= 3.2) | See [wxWidgets installation](#wxwidgets-installation) |
21
+
22
+ The wxRuby3 build process requires `git` to clone a copy of the wxWidgets Github repository to extract the interface
23
+ specifications from.<br>
24
+ The wxRuby3 build process needs doxygen to generated XML files containing wxWidgets interface specs which are used to
25
+ generate SWIG interface definitions from which SWIG to generates C++ source code for the wrapper interfaces from
26
+ which the native extension is compiled.
27
+
7
28
  ## Installation of a wxRuby3 Gem
8
29
 
9
30
  The wxRuby3 project provides gems on [RubyGems](https://rubygems.org) which can be installed with the
10
31
  standard `gem install` command line this:
11
32
 
12
- ```sh
33
+ ```shell
13
34
  gem install wxruby3
14
35
  ```
15
36
 
16
37
  On Linux systems this will install the source based gem which will automatically build the native wxruby3 extension
17
38
  for the platform on which wxRuby3 is being installed.
18
39
  On Windows systems a prebuilt binary gem is available for the latest stable release(s) of [RubyInstaller](https://rubyinstaller.org)
19
- installed rubies that will be installed by default if installing for that platform. Alternatively the source gem can be
20
- installed on Windows by installing with explicit platform specification like this:
40
+ installed rubies that will be installed by default if installing for that platform (including an embedded, latest
41
+ stable version, wxWidgets installation).<br>
42
+ Alternatively the source gem can be installed on Windows by installing with explicit platform specification like this:
21
43
 
22
- ```sh
44
+ ```shell
23
45
  gem install wxruby3 --platform=ruby
24
46
  ```
25
47
 
26
- When installing the source gem the following basic requirements apply:
48
+ When installing the source gem the minimal requirements listed above apply.
27
49
 
28
- - Git version control toolkit
29
- - Ruby 2.5 or later (including development package)
30
- - GNU g++ 4.8 or later on Linux, RubyInstaller+DevKit on Windows
31
- - [SWIG](https://www.swig.org) 3.0.12 or later
32
- - [Doxygen](https://www.doxygen.nl/)
50
+ On MacOS, if wxWidgets was not available, you can pull in the latest wxWidgets and build it by adding the `WITH_WXWIN=1` option:
51
+
52
+ ```shell
53
+ gem install wxruby3 -- WITH_WXWIN=1
54
+ ```
55
+
56
+ ### wxWidgets installation
33
57
 
34
58
  Also a wxWidgets installation (version 3.2 or later) is required for which there are multiple options.
35
59
 
@@ -39,38 +63,65 @@ Also a wxWidgets installation (version 3.2 or later) is required for which there
39
63
  The wxRuby build procedure will determine the availability and version of wxWidgets by locating and calling
40
64
  the `wx-config` utility script. In case no (compatible) wxWidgets version is found installation ends with an error.<br>
41
65
  Please note that even with this method a copy of the wxWidgets project will be checked out from GitHUb as the wxRuby3
42
- build procedure requires access to the wxWidgets interface specification sources (see [here](TODO) for more details).
66
+ build procedure requires access to the wxWidgets interface specification sources which are not normally part of any of
67
+ the standard distribution packages.
43
68
 
69
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;On MacOS, you can install wxWidgets via [Homebrew](https://brew.sh/):
70
+
71
+ ```shell
72
+ brew install wxwidgets
73
+ ```
74
+
75
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Afterwards, you can install the Ruby gem and it will detect wxWidgets in the system automatically:
76
+
77
+ ```shell
78
+ gem install wxruby3
79
+ ```
44
80
 
45
81
  2. User installed wxWidgets version<br>
46
82
  <br>
47
- In case the being system installed on does not provide (a compatible) wxWidgets version or a specific (possibly updated)
83
+ In case the system being installed on does not provide (a compatible) wxWidgets version or a specific (possibly updated)
48
84
  wxWidgets version is required the source gem can be installed using a user installed version like this (where the
49
85
  `WXWIN` path should provide the location where the wxWidgets binaries are installed under `<wxwin path>/bin`):<br>
50
86
 
51
- ```sh
87
+ ```shell
52
88
  gem install wxruby3 -- WXWIN=/path/to/wx/install
53
89
  ```
54
-
55
- 3. Automatic installed wxWidgets version<br>
90
+
91
+ 3. Automatic installed, embedded, wxWidgets version<br>
56
92
  <br>
57
- This is the easiest method when the being system installed on does not provide (a compatible) wxWidgets version (and
93
+ This is the easiest method when the system being installed on does not provide (a compatible) wxWidgets version (and
58
94
  no specific user defined version is required) and can be used by installing the source gem like this (which will
59
- cause automatic checkout and building of the latest wxWidgets release (>= 3.2) from GitHub:
60
-
95
+ cause automatic checkout and building of the latest stable wxWidgets release (>= 3.2) from GitHub:
61
96
 
62
- ```sh
97
+ ```shell
63
98
  gem install wxruby3 -- WITH_WXWIN=1
64
99
  ```
65
100
 
101
+ In case of option **2** it is also possible to do the doxygen XML generation as part of the wxWidgets user installation
102
+ and use that for the gem installation. In that case the user is required to generate the XML interface specs using the
103
+ `regen` script found in the `docs/doxygen` folder of the wxWidgets installation after which the XML output folder can be
104
+ provided to the gem installation as follows:
105
+
106
+ ```shell
107
+ gem install wxruby3 -- WXWIN=/path/to/wx/install WXXML=/path/to/wx/doxygen/xml
108
+ ```
109
+
110
+ Please also not that in case of option two the user is responsible to make sure the wxWidgets shared libraries can be
111
+ found by the system's dynamic loader at runtime.
112
+
66
113
  > **NOTE:** Be patient when installing the source gem. Building wxRuby3 takes a while and when wxWidgets is included event more.
67
114
 
115
+ > **NOTE:** Be aware that for prerelease versions of the gem you should add the `--pre` argument to the `gem install` command.
116
+
68
117
  ## Building from source
69
118
 
70
- Checkout the wxRuby3 sources from [GitHub](https://github.com/mcorino/wxRuby3).
119
+ Checkout the wxRuby3 sources from [GitHub](https://github.com/mcorino/wxRuby3) or download and unpack a release package.
71
120
 
72
- Basic requirements are the same as for installing the source gem. Gem dependencies are listed in the Gemfile in the root
73
- of the wxRuby3 tree.
121
+ Requirements are the same as for installing the source gem. Gem dependencies are listed in the Gemfile in the root
122
+ of the wxRuby3 tree and should be installed by executing `bundle install`.<br>
123
+ To be able to generate HTML documentation the optional `:documentation` group should be included.<br>
124
+ To be able to run the Rake memory check task the option `:develop` group should be included.
74
125
 
75
126
  The wxRuby3 project provides a Rake based build system. Call `rake help` to get an overview of the available commands.
76
127
  As mentioned there the `rake configure` command is required as the very first command. Call `rake configure[--help]` to
data/README.md CHANGED
@@ -1,9 +1,11 @@
1
1
  [![Linux wxGTK](https://github.com/mcorino/wxRuby3/actions/workflows/linux.yml/badge.svg)](https://github.com/mcorino/wxRuby3/actions/workflows/linux.yml)
2
2
  [![Windows wxMSW](https://github.com/mcorino/wxRuby3/actions/workflows/msw.yml/badge.svg)](https://github.com/mcorino/wxRuby3/actions/workflows/msw.yml)
3
+ [![Mac wxOSX](https://github.com/mcorino/wxRuby3/actions/workflows/mac.yml/badge.svg)](https://github.com/mcorino/wxRuby3/actions/workflows/mac.yml)
4
+
3
5
  [![License](https://img.shields.io/badge/license-MIT-yellowgreen.svg)](LICENSE)
4
6
  [![Gem Version](https://badge.fury.io/rb/wxruby3.svg)](https://badge.fury.io/rb/wxruby3)
5
-
6
7
  [![Documentation](https://img.shields.io/badge/docs-pages-blue.svg)](https://mcorino.github.io/wxRuby3)
8
+ [![Chat](https://img.shields.io/gitter/room/mcorino/wxruby)](https://gitter.im/mcorino/wxruby3)
7
9
 
8
10
  # README for wxRuby3
9
11
 
@@ -33,13 +35,13 @@ Wx::App.run do
33
35
  end
34
36
  ```
35
37
 
36
- ![Hello_World](assets/hello_world.png "Hello World sample")
38
+ ![Hello_World](assets/hello_world_combi.png "Hello World sample")
37
39
 
38
40
  ### Hello Button
39
41
 
40
42
  Anyone who is familiar with wxWidgets should feel right at home since the API may be Ruby-fied, it is still easily
41
43
  recognizable (but being Ruby-fied allowing for elegant and compact coding). And for those that do not have previous
42
- experience do not fear, wxRuby3 comes with detailed [documentation](https://mcorino.github.io/wxRuby3/file.00_starting.html) and lots of examples and test.
44
+ experience, do not fear, wxRuby3 comes with detailed [documentation](https://mcorino.github.io/wxRuby3/file.00_starting.html) and lots of examples and tests.
43
45
 
44
46
  ```ruby
45
47
  require 'wx'
@@ -56,8 +58,7 @@ end
56
58
  Wx::App.run { TheFrame.new('Hello world!').show }
57
59
  ```
58
60
 
59
- ![Hello_Button](assets/hello_button.png "Hello Button sample")
60
- ![Hello_Button_Clicked](assets/hello_button_clicked.png "Hello Button sample clicked")
61
+ ![Hello_Button_Clicked](assets/hello_button_clicked_combi.png "Hello Button sample clicked")
61
62
 
62
63
 
63
64
  ## wxRuby3 licence
@@ -99,12 +100,39 @@ Currently the following are fully supported:
99
100
  |----------------------------------------------------------------------------|-----------------| --- |
100
101
  | Windows 10 (tested)<br>(most likely also Windows 11) | Ruby >= 2.5<br>(RubyInstaller MSYS2-DevKit) | wxWidgets >= 3.2 |
101
102
  | Linux (tested; any AMD-64 distribution)<br>(most likely also i686 and ARM) | Ruby >= 2.5 | wxWidgets >= 3.2 |
103
+ | MacOS >= 10.10 using Cocoa (tested on AMD-64 and ARM64 M2 Chip) | Ruby >= 2.5 | wxWidgets >= 3.2 |
102
104
 
103
105
  Support for other platforms is not being actively developed at present,
104
106
  but patches are welcome. It is likely to be much simpler to get wxRuby
105
107
  working on similar modern systems (eg FreeBSD or Solaris with GTK) than
106
108
  on legacy systems (eg Windows 98, Mac OS 9).
107
109
 
110
+ ### How can I install wxRuby3?
111
+
112
+ wxRuby3 is distributed as a Ruby gem on [RubyGems](https://rubygems.org).<br>
113
+ Apart from a regular source-only version of the gem there is also a binary gem version for Windows 10 provided (for the
114
+ latest stable Ruby version at the time of publishing) which includes an embedded wxWidgets installation (also latest
115
+ stable version).
116
+
117
+ Installing the binary gem version on Windows requires no additional software to be installed except for a supported
118
+ version of the Ruby interpreter.<br>
119
+ To install the source-only gem the following software is required:
120
+
121
+ | Sofware | Notes |
122
+ |-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
123
+ | Ruby | A supported version of the Ruby interpreter needs to be installed. |
124
+ | C++ compiler<br>(incl. dev tools like `make`) | On linux a recent version of the GNU C++ compiler (with c++-14 support) needs to be installed<br>On Windows the RubyInstaller MSYS2-Devkit needs to be installed<br>On MacOS XCode with commandline tools needs to be installed |
125
+ | Git version control toolkit | |
126
+ | SWIG >= 3.0.12 | On MacOS install [Homebrew](https://brew.sh/) and than `brew install swig` |
127
+ | Doxygen (>= 1.9.1, <= 1.9.6) | Doxygen > 1.9.6 has changes that cause problems with the wxWidgets doxygen files.<br>On MacOS: `brew tap mcorino/wxruby3` and than `brew install doxygen@1.9.6` (default brew recipe installs 1.9.7) |
128
+ | wxWidgets >= 3.2 (*OPTIONAL*) | On Linux most distributions provide system installable (development) packages for wxWidgets providing a supported version. Alternatively you can fairly easily install your own preferred version manually (see the [wxWidgets](https://wxwidgets.org) project for details).<br>On Windows and MacOS the process is less straightforward (also here see the [wxWidgets](https://wxwidgets.org) project for details).<br>The wxRuby3 source-only gem can also be installed using a private local wxWidgets installation or an embedded installation (most likely preferred on Windows and MacOS). See [INSTALL](INSTALL.md) for more details. |
129
+
130
+ In case the prerequisites above are met the (source-only or binary) gem can be installed executing the following command:
131
+
132
+ ```shell
133
+ gem install wxruby3
134
+ ```
135
+
108
136
  ### Where can I ask a question, or report a bug?
109
137
 
110
138
  Use GitHUb Issues.
@@ -130,7 +158,7 @@ some use a more modern coding style than others.
130
158
 
131
159
  Complete (more or less) wxRuby API documentation should be part of any
132
160
  complete wxRuby3 build. This tends to focus on providing a reference
133
- of all available modules, classes ad methods and how to use specific
161
+ of all available modules, classes and methods and how to use specific
134
162
  classes and methods, rather than on how to construct an application
135
163
  overall.
136
164
  This documentation (for the latest release) is also available online
@@ -162,7 +190,7 @@ If you know of a feature in wxWidgets that you would like to see
162
190
  supported in wxRuby3 you are free to ask but do not **EXPECT** unconditional
163
191
  agreement or immediate response.
164
192
 
165
- ### How does wxRuby3 relate to the wxRuby 2.0 (and even older 0.6.0 release)?
193
+ ### How does wxRuby3 relate to the wxRuby 2.0 (and even older 0.6.0) release?
166
194
 
167
195
  wxRuby 0.6.0 was the last in a series of releases developed using a
168
196
  different approach in the early days of wxRuby. Work on this series
@@ -180,5 +208,9 @@ maintainable solution.
180
208
 
181
209
  ### I am getting an error trying to install or compile wxRuby3
182
210
 
183
- Please double-check the [INSTALL](INSTALL.md) documents, and search issue archives. If
211
+ Please double-check the instructions above and in the [INSTALL](INSTALL.md) document and search issue archives. If
184
212
  this doesn't help, please post your question using GitHub Issues.
213
+
214
+ ### Is there another, more declarative way, for writing wxRuby3 desktop GUI applications?
215
+
216
+ Yes. [Glimmer DSL for WX](https://github.com/AndyObtiva/glimmer-dsl-wx) enables software engineers to build GUI using wxruby3 following the Ruby way with the least amount of code possible. That is by offering a minimalistic declarative high-level DSL that maps visually to the way software engineers think about the GUI hierarchy in addition to adopting Rails' strategy of Convention over Configuration via smart defaults and automation of wxruby3 low-level details. You can check out the [Glimmer DSL for WX README "Coming From wxruby3" section](https://github.com/AndyObtiva/glimmer-dsl-wx#coming-from-wxruby3) for more information on how to translate wxruby3 apps to [Glimmer DSL for WX](https://github.com/AndyObtiva/glimmer-dsl-wx) syntax.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,6 @@
1
+
2
+ module Wx
3
+
4
+ TheBrushList = Wx::Brush
5
+
6
+ end
@@ -0,0 +1,7 @@
1
+
2
+ module Wx
3
+
4
+ # simply an alias
5
+ EventLoop = GUIEventLoop
6
+
7
+ end
@@ -1002,6 +1002,12 @@ class Wx::EvtHandler
1002
1002
  Wx::EVT_MEDIA_PAUSE,
1003
1003
  Wx::MediaEvent
1004
1004
  ] if Wx.const_defined?(:EVT_MEDIA_PAUSE)
1005
+ # from wxHyperlinkEvent
1006
+ self.register_event_type EventType[
1007
+ 'evt_hyperlink', 1,
1008
+ Wx::EVT_HYPERLINK,
1009
+ Wx::HyperlinkEvent
1010
+ ] if Wx.const_defined?(:EVT_HYPERLINK)
1005
1011
  # from wxCommandEvent
1006
1012
  self.register_event_type EventType[
1007
1013
  'evt_button', 1,
@@ -1388,4 +1394,5 @@ class Wx::EvtHandler
1388
1394
  Wx::EVT_DIRCTRL_FILEACTIVATED,
1389
1395
  Wx::GenericDirCtrl
1390
1396
  ] if Wx.const_defined?(:EVT_DIRCTRL_FILEACTIVATED)
1397
+ # from wxHyperlinkCtrl
1391
1398
  end
@@ -22,9 +22,17 @@ class Wx::EvtHandler
22
22
  # methods; used internally by disconnect (see EvtHandler.i)
23
23
  EVENT_NAME_TYPE_MAP = {}
24
24
  private_constant :EVENT_NAME_TYPE_MAP
25
+ # Hash to look up event handler arity from symbol names of evt handler
26
+ # methods; internal use
27
+ EVENT_NAME_EVENT_ARITY_MAP = {}
28
+ private_constant :EVENT_NAME_EVENT_ARITY_MAP
25
29
 
26
30
  class << self
27
31
 
32
+ def event_type_arity(name)
33
+ EVENT_NAME_EVENT_ARITY_MAP[name.to_sym] || 0
34
+ end
35
+
28
36
  def get_event_type_class_map
29
37
  EVENT_TYPE_CLASS_MAP
30
38
  end
@@ -79,8 +87,8 @@ class Wx::EvtHandler
79
87
 
80
88
  # Given the Integer constant Wx::EVT_XXX, returns the convenience
81
89
  # handler method name associated with that type of event.
82
- def self.event_name_for_type(name)
83
- EVENT_NAME_TYPE_MAP.key(name)
90
+ def self.event_name_for_type(evt_id)
91
+ EVENT_NAME_TYPE_MAP.key(evt_id)
84
92
  end
85
93
 
86
94
  # Given an integer value +int_val+, returns the name of the EVT_xxx
@@ -121,6 +129,8 @@ class Wx::EvtHandler
121
129
  return
122
130
  end
123
131
 
132
+ EVENT_NAME_EVENT_ARITY_MAP[ev_type.name.to_sym] = ev_type.arity
133
+
124
134
  # set up the evt_xxx method
125
135
  case ev_type.arity
126
136
  when 0 # events without an id
data/lib/wx/core/font.rb CHANGED
@@ -1,22 +1,30 @@
1
1
 
2
2
  require_relative './font/encoding'
3
3
 
4
- class Wx::Font
5
- class << self
6
- # Returns the name of the platform's default font encoding
7
- def get_default_encoding_name
8
- ENCODING_NAMES[ get_default_encoding ]
9
- end
4
+ module Wx
5
+
6
+ class Font
7
+ class << self
8
+ # Returns the name of the platform's default font encoding
9
+ def get_default_encoding_name
10
+ ENCODING_NAMES[ get_default_encoding ]
11
+ end
10
12
 
11
- # Sets the default encoding to be +enc+, which may be the string
12
- # name of an encoding (eg 'UTF8') or an internal WxWidgets flag
13
- # (eg Wx::FONTENCODING_UTF8).
14
- def set_default_encoding_name(enc)
15
- if flag_int = ENCODING_NAMES.index(enc.upcase)
16
- set_default_encoding(Wx::FontEncoding.new(flag_int))
17
- else
18
- raise ArgumentError, "Unknown font encoding name '#{enc}'"
13
+ # Sets the default encoding to be +enc+, which may be the string
14
+ # name of an encoding (eg 'UTF8') or an internal WxWidgets flag
15
+ # (eg Wx::FONTENCODING_UTF8).
16
+ def set_default_encoding_name(enc)
17
+ if flag_int = ENCODING_NAMES.index(enc.upcase)
18
+ set_default_encoding(Wx::FontEncoding.new(flag_int))
19
+ else
20
+ raise ArgumentError, "Unknown font encoding name '#{enc}'"
21
+ end
19
22
  end
20
23
  end
21
24
  end
25
+
26
+ # make this simply an alias for the Font class so the #find_or_create_font methods
27
+ # can be accessed through that name too.
28
+ TheFontList = Font
29
+
22
30
  end
@@ -6,9 +6,9 @@ class Wx::HelpProvider
6
6
  # SWIG Director; it can't be reaped and re-wrapped later. The
7
7
  # easiest way is to make the currently set one an instance variable
8
8
  # of this class
9
- alias :__wx_set :set
9
+ wx_set = instance_method :set
10
10
  define_method(:set) do | help_provider |
11
- __wx_set(help_provider)
11
+ wx_set.bind(self).call(help_provider)
12
12
  @__hp__ = help_provider
13
13
  end
14
14
  end
data/lib/wx/core/image.rb CHANGED
@@ -66,6 +66,39 @@ module Wx
66
66
  def convert_to_bitmap
67
67
  Wx::Bitmap.from_image(self)
68
68
  end
69
+
70
+ module Histogram
71
+
72
+ def make_key(r, g, b)
73
+ (r << 16) | (g << 8) | b
74
+ end
75
+
76
+ def find_first_unused_colour(r=1, g=0, b=0)
77
+ while self.has_key?(make_key(r,g,b))
78
+ if r >= 254
79
+ r = 0
80
+ if g >= 254
81
+ return nil if b >= 254
82
+ g = 0
83
+ b += 1
84
+ else
85
+ g += 1
86
+ end
87
+ else
88
+ r += 1
89
+ end
90
+ end
91
+ [r, g, b]
92
+ end
93
+
94
+ end
95
+
96
+ wx_compute_histogram = instance_method :compute_histogram
97
+ define_method :compute_histogram do
98
+ hist_hash = wx_compute_histogram.bind(self).call
99
+ hist_hash.extend Histogram
100
+ hist_hash
101
+ end
69
102
  end
70
103
 
71
104
  def self.Image(name, bmp_type = nil, *rest)
@@ -3,8 +3,23 @@ class Wx::ListCtrl
3
3
  # Make these ruby enumerables so find, find_all, map are available
4
4
  include Enumerable
5
5
  # Passes each valid item index into the passed block
6
- def each
7
- 0.upto(item_count - 1) { | i | yield i }
6
+ def each(&block)
7
+ if block_given?
8
+ 0.upto(item_count - 1) { | i | block.call(i) }
9
+ else
10
+ ::Enumerator.new { |y| each { | i | y << i } }
11
+ end
12
+ end
13
+
14
+ def each_selected(&block)
15
+ if block_given?
16
+ item = -1
17
+ while (item = get_next_item(item, Wx::LIST_NEXT_ALL, Wx::LIST_STATE_SELECTED)) >= 0
18
+ block.call(item)
19
+ end
20
+ else
21
+ ::Enumerator.new { |y| each_selected { | i | y << i } }
22
+ end
8
23
  end
9
24
 
10
25
  # Returns an Array containing the indexes of the currently selected
@@ -19,15 +34,4 @@ class Wx::ListCtrl
19
34
  selections
20
35
  end
21
36
 
22
- # # Stub version for LC_VIRTUAL controls that does nothing; may be
23
- # # overridden in subclasses.
24
- # def on_get_item_attr(i)
25
- # nil
26
- # end
27
- #
28
- # # Stub version for LC_VIRTUAL|LC_REPORT controls that does nothing;
29
- # # may be overridden in subclasses.
30
- # def on_get_item_column_image(i, col)
31
- # -1
32
- # end
33
37
  end
data/lib/wx/core/log.rb CHANGED
@@ -14,7 +14,97 @@ module Wx
14
14
  alias :timestamp= :set_timestamp
15
15
  alias :verbose :get_verbose
16
16
  alias :verbose= :set_verbose
17
+
18
+ def set_component(comp)
19
+ @component = comp ? comp.to_s : comp
20
+ end
21
+ private :set_component
22
+
23
+ def component
24
+ @component
25
+ end
26
+
27
+ def for_component(comp, &block)
28
+ old_comp = component
29
+ set_component(comp)
30
+ begin
31
+ block.call if block_given?
32
+ ensure
33
+ set_component(old_comp)
34
+ end
35
+ end
36
+
37
+ end
38
+
39
+ end
40
+
41
+ class << self
42
+
43
+ def setup_log_info(fmt, args, filename, line, func, component)
44
+ # as wxRuby apps will ever only log from the main thread the only reason why
45
+ # log info data may be retained beyond the execution scope of the current
46
+ # log action is because of log repetition counting which will retain the
47
+ # first log info instance of a repeating message sequence
48
+
49
+ # format message
50
+ msg = fmt % args
51
+ log_info = {
52
+ filename: if filename
53
+ filename.to_s
54
+ else
55
+ filename
56
+ end,
57
+ line: line,
58
+ func: if func
59
+ func.to_s
60
+ else
61
+ func
62
+ end,
63
+ component: if component
64
+ component.to_s
65
+ else
66
+ Log.component
67
+ end
68
+ }
69
+ if Wx::Log.get_repetition_counting && @last_msg != msg
70
+ # refresh cache
71
+ @last_msg = msg
72
+ @last_info = log_info
73
+ end
74
+ [msg, log_info]
75
+ end
76
+ private :setup_log_info
77
+
78
+ wx_log_generic = self.instance_method :log_generic
79
+ define_method :log_generic do |lvl, fmt, *args, filename: nil, line: 0, func: nil, component: nil|
80
+ wx_log_generic.bind(self).call(lvl, *setup_log_info(fmt, args, filename, line, func, component))
17
81
  end
82
+
83
+ wx_log_info = self.instance_method :log_info
84
+ define_method :log_info do |fmt, *args, filename: nil, line: 0, func: nil, component: nil|
85
+ wx_log_info.bind(self).call(*setup_log_info(fmt, args, filename, line, func, component))
86
+ end
87
+
88
+ wx_log_verbose = self.instance_method :log_verbose
89
+ define_method :log_verbose do |fmt, *args, filename: nil, line: 0, func: nil, component: nil|
90
+ wx_log_verbose.bind(self).call(*setup_log_info(fmt, args, filename, line, func, component))
91
+ end
92
+
93
+ wx_log_message = self.instance_method :log_message
94
+ define_method :log_message do |fmt, *args, filename: nil, line: 0, func: nil, component: nil|
95
+ wx_log_message.bind(self).call(*setup_log_info(fmt, args, filename, line, func, component))
96
+ end
97
+
98
+ wx_log_warning = self.instance_method :log_warning
99
+ define_method :log_warning do |fmt, *args, filename: nil, line: 0, func: nil, component: nil|
100
+ wx_log_warning.bind(self).call(*setup_log_info(fmt, args, filename, line, func, component))
101
+ end
102
+
103
+ wx_log_error = self.instance_method :log_error
104
+ define_method :log_error do |fmt, *args, filename: nil, line: 0, func: nil, component: nil|
105
+ wx_log_error.bind(self).call(*setup_log_info(fmt, args, filename, line, func, component))
106
+ end
107
+
18
108
  end
19
109
 
20
110
  end