wxruby3 0.9.0.pre.beta.10-x64-mingw-ucrt → 0.9.0.pre.beta.13-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (283) hide show
  1. checksums.yaml +4 -4
  2. data/INSTALL.md +85 -0
  3. data/README.md +2 -0
  4. data/assets/logo.png +0 -0
  5. data/assets/logo.svg +170 -0
  6. data/assets/logo.xcf +0 -0
  7. data/ext/wxbase32u_gcc_custom.dll +0 -0
  8. data/ext/wxbase32u_net_gcc_custom.dll +0 -0
  9. data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
  10. data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
  11. data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
  12. data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
  13. data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
  14. data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
  15. data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
  16. data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
  17. data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
  18. data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
  19. data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
  20. data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
  21. data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
  22. data/lib/wx/core/array_ext.rb +26 -0
  23. data/lib/wx/core/art_locator.rb +92 -0
  24. data/lib/wx/core/artprovider.rb +1 -1
  25. data/lib/wx/core/bitmap.rb +90 -53
  26. data/lib/wx/core/cursor.rb +12 -0
  27. data/lib/wx/core/data_object.rb +74 -6
  28. data/lib/wx/core/dataformat.rb +3 -1
  29. data/lib/wx/core/dc.rb +76 -52
  30. data/lib/wx/core/enum.rb +4 -0
  31. data/lib/wx/core/event.rb +38 -5
  32. data/lib/wx/core/events/evt_list.rb +3 -2
  33. data/lib/wx/core/evthandler.rb +64 -23
  34. data/lib/wx/core/icon.rb +50 -35
  35. data/lib/wx/core/id_helper.rb +32 -0
  36. data/lib/wx/core/image.rb +63 -53
  37. data/lib/wx/core/point.rb +35 -10
  38. data/lib/wx/core/real_point.rb +35 -10
  39. data/lib/wx/core/rect.rb +44 -9
  40. data/lib/wx/core/region_iterator.rb +37 -0
  41. data/lib/wx/core/size.rb +32 -5
  42. data/lib/wx/core/window.rb +8 -31
  43. data/lib/wx/doc/array_ext.rb +27 -0
  44. data/lib/wx/doc/art_locator.rb +57 -0
  45. data/lib/wx/doc/bitmap.rb +27 -0
  46. data/lib/wx/doc/clipboard.rb +12 -0
  47. data/lib/wx/doc/const.rb +77 -0
  48. data/lib/wx/doc/cursor.rb +16 -0
  49. data/lib/wx/doc/data_object.rb +103 -0
  50. data/lib/wx/doc/dc.rb +63 -46
  51. data/lib/wx/doc/event.rb +24 -0
  52. data/lib/wx/doc/events.rb +14 -0
  53. data/lib/wx/doc/evthandler.rb +24 -3
  54. data/lib/wx/doc/extra/00_starting.md +1 -1
  55. data/lib/wx/doc/extra/06_geometry.md +10 -4
  56. data/lib/wx/doc/extra/10_art.md +105 -0
  57. data/lib/wx/doc/gc_dc.rb +21 -0
  58. data/lib/wx/doc/gdi_common.rb +155 -6
  59. data/lib/wx/doc/gen/about_dialog_info.rb +1 -4
  60. data/lib/wx/doc/gen/animation.rb +3 -3
  61. data/lib/wx/doc/gen/animation_ctrl.rb +4 -4
  62. data/lib/wx/doc/gen/any_button.rb +1 -1
  63. data/lib/wx/doc/gen/aui/aui_floating_frame.rb +1 -1
  64. data/lib/wx/doc/gen/aui/aui_manager.rb +2 -2
  65. data/lib/wx/doc/gen/aui/aui_mdi_child_frame.rb +3 -3
  66. data/lib/wx/doc/gen/aui/aui_mdi_parent_frame.rb +3 -3
  67. data/lib/wx/doc/gen/aui/aui_notebook.rb +2 -2
  68. data/lib/wx/doc/gen/aui/aui_tool_bar.rb +6 -6
  69. data/lib/wx/doc/gen/bitmap.rb +1 -1
  70. data/lib/wx/doc/gen/bitmap_button.rb +2 -2
  71. data/lib/wx/doc/gen/book_ctrl_base.rb +4 -4
  72. data/lib/wx/doc/gen/brush.rb +1 -1
  73. data/lib/wx/doc/gen/button.rb +2 -2
  74. data/lib/wx/doc/gen/calendar_ctrl.rb +3 -3
  75. data/lib/wx/doc/gen/calendar_date_attr.rb +1 -1
  76. data/lib/wx/doc/gen/check_box.rb +2 -2
  77. data/lib/wx/doc/gen/check_list_box.rb +3 -3
  78. data/lib/wx/doc/gen/choice.rb +2 -2
  79. data/lib/wx/doc/gen/choicebook.rb +2 -2
  80. data/lib/wx/doc/gen/collapsible_pane.rb +2 -2
  81. data/lib/wx/doc/gen/colour.rb +1 -3
  82. data/lib/wx/doc/gen/colour_dialog.rb +1 -2
  83. data/lib/wx/doc/gen/colour_picker_ctrl.rb +2 -2
  84. data/lib/wx/doc/gen/combo_box.rb +4 -4
  85. data/lib/wx/doc/gen/context_help_button.rb +1 -1
  86. data/lib/wx/doc/gen/control.rb +3 -3
  87. data/lib/wx/doc/gen/core.rb +2 -2
  88. data/lib/wx/doc/gen/data_format.rb +1 -1
  89. data/lib/wx/doc/gen/data_object.rb +6 -26
  90. data/lib/wx/doc/gen/data_object_simple_base.rb +10 -0
  91. data/lib/wx/doc/gen/date_picker_ctrl.rb +2 -2
  92. data/lib/wx/doc/gen/dc.rb +9 -9
  93. data/lib/wx/doc/gen/defs.rb +0 -4
  94. data/lib/wx/doc/gen/dialog.rb +3 -3
  95. data/lib/wx/doc/gen/dir_dialog.rb +2 -4
  96. data/lib/wx/doc/gen/dir_filter_list_ctrl.rb +2 -2
  97. data/lib/wx/doc/gen/dir_picker_ctrl.rb +2 -2
  98. data/lib/wx/doc/gen/drag_drop.rb +13 -1
  99. data/lib/wx/doc/gen/editable_list_box.rb +2 -2
  100. data/lib/wx/doc/gen/event.rb +0 -1
  101. data/lib/wx/doc/gen/event_list.rb +18 -16
  102. data/lib/wx/doc/gen/events.rb +87 -2
  103. data/lib/wx/doc/gen/ext_help_controller.rb +2 -2
  104. data/lib/wx/doc/gen/file_dialog.rb +1 -1
  105. data/lib/wx/doc/gen/file_picker_ctrl.rb +2 -2
  106. data/lib/wx/doc/gen/font.rb +6 -6
  107. data/lib/wx/doc/gen/font_dialog.rb +1 -2
  108. data/lib/wx/doc/gen/font_picker_ctrl.rb +2 -2
  109. data/lib/wx/doc/gen/frame.rb +5 -5
  110. data/lib/wx/doc/gen/fs_file.rb +2 -2
  111. data/lib/wx/doc/gen/gauge.rb +2 -2
  112. data/lib/wx/doc/gen/gdi_common.rb +18 -21
  113. data/lib/wx/doc/gen/generic_dir_ctrl.rb +2 -2
  114. data/lib/wx/doc/gen/graphics_context.rb +4 -4
  115. data/lib/wx/doc/gen/graphics_object.rb +2 -2
  116. data/lib/wx/doc/gen/grid/grid_cell_bool_editor.rb +1 -1
  117. data/lib/wx/doc/gen/grid/grid_cell_date_time_renderer.rb +1 -1
  118. data/lib/wx/doc/gen/grid/grid_cell_enum_editor.rb +1 -1
  119. data/lib/wx/doc/gen/grid/grid_cell_enum_renderer.rb +1 -1
  120. data/lib/wx/doc/gen/grid/grid_cell_float_editor.rb +1 -1
  121. data/lib/wx/doc/gen/grid/grid_cell_float_renderer.rb +1 -1
  122. data/lib/wx/doc/gen/grid/grid_ctrl.rb +7 -7
  123. data/lib/wx/doc/gen/help_controller.rb +1 -1
  124. data/lib/wx/doc/gen/html/html_cell.rb +4 -4
  125. data/lib/wx/doc/gen/html/html_easy_printing.rb +6 -6
  126. data/lib/wx/doc/gen/html/html_help_controller.rb +6 -6
  127. data/lib/wx/doc/gen/html/html_help_frame.rb +2 -2
  128. data/lib/wx/doc/gen/html/html_help_window.rb +6 -6
  129. data/lib/wx/doc/gen/html/html_list_box.rb +6 -6
  130. data/lib/wx/doc/gen/html/html_printout.rb +4 -4
  131. data/lib/wx/doc/gen/html/html_window.rb +4 -4
  132. data/lib/wx/doc/gen/icon.rb +6 -6
  133. data/lib/wx/doc/gen/image.rb +7 -7
  134. data/lib/wx/doc/gen/list_box.rb +4 -4
  135. data/lib/wx/doc/gen/list_ctrl.rb +5 -5
  136. data/lib/wx/doc/gen/listbook.rb +2 -2
  137. data/lib/wx/doc/gen/locale.rb +8 -8
  138. data/lib/wx/doc/gen/log.rb +2 -2
  139. data/lib/wx/doc/gen/mdi_frame.rb +5 -5
  140. data/lib/wx/doc/gen/media_ctrl.rb +4 -4
  141. data/lib/wx/doc/gen/menu.rb +12 -12
  142. data/lib/wx/doc/gen/menu_item.rb +1 -1
  143. data/lib/wx/doc/gen/message_dialog.rb +2 -4
  144. data/lib/wx/doc/gen/mini_frame.rb +2 -2
  145. data/lib/wx/doc/gen/notebook.rb +3 -3
  146. data/lib/wx/doc/gen/number_entry_dialog.rb +0 -1
  147. data/lib/wx/doc/gen/object.rb +0 -1
  148. data/lib/wx/doc/gen/panel.rb +2 -2
  149. data/lib/wx/doc/gen/pen.rb +2 -2
  150. data/lib/wx/doc/gen/pg/pg_array_editor_dialog.rb +1 -1
  151. data/lib/wx/doc/gen/pg/pg_cell.rb +1 -1
  152. data/lib/wx/doc/gen/pg/pg_properties.rb +20 -20
  153. data/lib/wx/doc/gen/pg/pg_property.rb +12 -12
  154. data/lib/wx/doc/gen/pg/property_grid.rb +3 -3
  155. data/lib/wx/doc/gen/pg/property_grid_interface.rb +14 -14
  156. data/lib/wx/doc/gen/pg/property_grid_manager.rb +3 -3
  157. data/lib/wx/doc/gen/pg/property_grid_page.rb +2 -2
  158. data/lib/wx/doc/gen/pg/property_grid_page_state.rb +2 -2
  159. data/lib/wx/doc/gen/popup_window.rb +3 -3
  160. data/lib/wx/doc/gen/property_sheet_dialog.rb +3 -3
  161. data/lib/wx/doc/gen/prt/print_abort_dialog.rb +1 -1
  162. data/lib/wx/doc/gen/prt/printer.rb +1 -1
  163. data/lib/wx/doc/gen/radio_box.rb +4 -4
  164. data/lib/wx/doc/gen/radio_button.rb +2 -2
  165. data/lib/wx/doc/gen/rbn/ribbon_bar.rb +2 -2
  166. data/lib/wx/doc/gen/rbn/ribbon_button_bar.rb +12 -12
  167. data/lib/wx/doc/gen/rbn/ribbon_control.rb +1 -1
  168. data/lib/wx/doc/gen/rbn/ribbon_gallery.rb +2 -2
  169. data/lib/wx/doc/gen/rbn/ribbon_page.rb +2 -2
  170. data/lib/wx/doc/gen/rbn/ribbon_panel.rb +2 -2
  171. data/lib/wx/doc/gen/rbn/ribbon_tool_bar.rb +11 -11
  172. data/lib/wx/doc/gen/region.rb +1 -1
  173. data/lib/wx/doc/gen/region_iterator.rb +76 -0
  174. data/lib/wx/doc/gen/rtc/rich_text_buffer.rb +10 -10
  175. data/lib/wx/doc/gen/rtc/rich_text_ctrl.rb +19 -19
  176. data/lib/wx/doc/gen/rtc/rich_text_file_handler.rb +2 -2
  177. data/lib/wx/doc/gen/rtc/rich_text_header_footer_data.rb +4 -4
  178. data/lib/wx/doc/gen/rtc/rich_text_html_handler.rb +1 -1
  179. data/lib/wx/doc/gen/rtc/rich_text_printing.rb +6 -6
  180. data/lib/wx/doc/gen/rtc/rich_text_xml_handler.rb +1 -1
  181. data/lib/wx/doc/gen/rtc/symbol_picker_dialog.rb +2 -2
  182. data/lib/wx/doc/gen/sash_event.rb +1 -1
  183. data/lib/wx/doc/gen/sash_layout_window.rb +2 -2
  184. data/lib/wx/doc/gen/sash_window.rb +1 -1
  185. data/lib/wx/doc/gen/scaled_dc.rb +10 -0
  186. data/lib/wx/doc/gen/scroll_bar.rb +150 -0
  187. data/lib/wx/doc/gen/scrolled_canvas.rb +2 -2
  188. data/lib/wx/doc/gen/scrolled_control.rb +2 -2
  189. data/lib/wx/doc/gen/scrolled_window.rb +2 -2
  190. data/lib/wx/doc/gen/simplebook.rb +2 -2
  191. data/lib/wx/doc/gen/sizer.rb +3 -3
  192. data/lib/wx/doc/gen/slider.rb +2 -2
  193. data/lib/wx/doc/gen/spin_button.rb +2 -2
  194. data/lib/wx/doc/gen/spin_ctrl.rb +2 -2
  195. data/lib/wx/doc/gen/splash_screen.rb +1 -1
  196. data/lib/wx/doc/gen/splitter_window.rb +2 -2
  197. data/lib/wx/doc/gen/static_bitmap.rb +2 -2
  198. data/lib/wx/doc/gen/static_box.rb +4 -4
  199. data/lib/wx/doc/gen/static_box_sizer.rb +1 -1
  200. data/lib/wx/doc/gen/static_line.rb +2 -2
  201. data/lib/wx/doc/gen/static_text.rb +2 -2
  202. data/lib/wx/doc/gen/status_bar.rb +2 -2
  203. data/lib/wx/doc/gen/stc/styled_text_ctrl.rb +3 -3
  204. data/lib/wx/doc/gen/task_bar_icon.rb +2 -2
  205. data/lib/wx/doc/gen/text_attr.rb +3 -3
  206. data/lib/wx/doc/gen/text_ctrl.rb +3 -3
  207. data/lib/wx/doc/gen/text_entry_dialog.rb +6 -8
  208. data/lib/wx/doc/gen/text_validator.rb +1 -1
  209. data/lib/wx/doc/gen/time_picker_ctrl.rb +2 -2
  210. data/lib/wx/doc/gen/tip_provider.rb +1 -3
  211. data/lib/wx/doc/gen/toggle_button.rb +2 -2
  212. data/lib/wx/doc/gen/tool_bar.rb +10 -10
  213. data/lib/wx/doc/gen/toolbook.rb +2 -2
  214. data/lib/wx/doc/gen/top_level_window.rb +4 -4
  215. data/lib/wx/doc/gen/tree_ctrl.rb +4 -4
  216. data/lib/wx/doc/gen/treebook.rb +2 -2
  217. data/lib/wx/doc/gen/utils.rb +5 -42
  218. data/lib/wx/doc/gen/v_list_box.rb +2 -2
  219. data/lib/wx/doc/gen/v_scrolled_window.rb +2 -2
  220. data/lib/wx/doc/gen/variant.rb +10 -10
  221. data/lib/wx/doc/gen/window.rb +9 -14
  222. data/lib/wx/doc/gen/wizard.rb +2 -2
  223. data/lib/wx/doc/gen/wizard_event.rb +1 -1
  224. data/lib/wx/doc/gen/xml_node.rb +2 -2
  225. data/lib/wx/doc/gen/xml_resource.rb +3 -3
  226. data/lib/wx/doc/graphics_context.rb +42 -0
  227. data/lib/wx/doc/icon.rb +18 -0
  228. data/lib/wx/doc/id_helper.rb +25 -0
  229. data/lib/wx/doc/image.rb +33 -0
  230. data/lib/wx/doc/region_iterator.rb +31 -0
  231. data/lib/wx/doc/scaled_dc.rb +17 -0
  232. data/lib/wx/doc/window.rb +18 -0
  233. data/lib/wx/global_const.rb +4 -3
  234. data/lib/wx/version.rb +1 -1
  235. data/lib/wx/wxruby/cmd/sampler.rb +3 -21
  236. data/lib/wxruby_aui.so +0 -0
  237. data/lib/wxruby_core.so +0 -0
  238. data/lib/wxruby_grid.so +0 -0
  239. data/lib/wxruby_html.so +0 -0
  240. data/lib/wxruby_pg.so +0 -0
  241. data/lib/wxruby_prt.so +0 -0
  242. data/lib/wxruby_rbn.so +0 -0
  243. data/lib/wxruby_rtc.so +0 -0
  244. data/lib/wxruby_stc.so +0 -0
  245. data/rakelib/lib/config.rb +4 -4
  246. data/samples/art/wxruby-128x128.png +0 -0
  247. data/samples/art/wxruby-256x256.png +0 -0
  248. data/samples/art/wxruby-64x64.png +0 -0
  249. data/samples/art/wxruby.ico +0 -0
  250. data/samples/art/wxruby.png +0 -0
  251. data/samples/drawing/graphics_drawing.rb +1 -2
  252. data/samples/propgrid/propgrid.rb +65 -65
  253. data/samples/sample.xpm +246 -470
  254. data/samples/treectrl/treectrl.rb +1 -1
  255. data/tests/art/my_art/sample.xpm +251 -0
  256. data/tests/art/sample3.xpm +251 -0
  257. data/tests/art/test_art/bitmap/sample.xpm +251 -0
  258. data/tests/art/test_art/bitmap/wxruby.bmp +0 -0
  259. data/tests/art/test_art/bitmap/wxruby.png +0 -0
  260. data/tests/art/test_art/bitmap/wxruby.xpm +251 -0
  261. data/tests/art/test_art/cursor/wxruby.bmp +0 -0
  262. data/tests/art/test_art/icon/sample.xpm +251 -0
  263. data/tests/art/test_art/icon/wxruby.ico +0 -0
  264. data/tests/art/test_art/icon/wxruby.png +0 -0
  265. data/tests/art/test_art/image/sample.xpm +251 -0
  266. data/tests/art/test_art/image/wxruby.jpg +0 -0
  267. data/tests/art/test_art/image/wxruby.png +0 -0
  268. data/tests/art/test_art/sample2.xpm +251 -0
  269. data/tests/lib/wxapp_runner.rb +64 -0
  270. data/tests/test_art.rb +91 -0
  271. data/tests/test_basic.rb +0 -5
  272. data/tests/test_clipboard.rb +149 -17
  273. data/tests/test_dc.rb +70 -0
  274. data/tests/test_dialog.rb +2 -13
  275. data/tests/test_event_handling.rb +2 -13
  276. data/tests/test_events.rb +14 -6
  277. data/tests/test_geometry.rb +67 -17
  278. data/tests/test_intl.rb +2 -15
  279. data/tests/test_item_data.rb +2 -15
  280. data/tests/test_variant.rb +1 -15
  281. data/tests/testapp.rb +0 -5
  282. data/tests/testapp_noframe.rb +0 -5
  283. metadata +55 -3
data/tests/test_dc.rb ADDED
@@ -0,0 +1,70 @@
1
+
2
+ require_relative './lib/wxapp_runner'
3
+
4
+ class TestDC < Test::Unit::TestCase
5
+
6
+ def test_memory_dc
7
+ bmp = Wx::Bitmap.new(100, 100)
8
+ assert_nothing_raised do
9
+ Wx::MemoryDC.draw_on(bmp) do |mdc|
10
+ mdc.set_background(Wx::WHITE_BRUSH)
11
+ mdc.clear
12
+ mdc.set_pen(Wx::BLACK_PEN)
13
+ mdc.set_brush(Wx::WHITE_BRUSH)
14
+ mdc.draw_rectangle(0, 0, 60, 15)
15
+ mdc.draw_line(0, 0, 59, 14)
16
+ mdc.set_text_foreground(Wx::BLACK)
17
+ mdc.draw_text("x1", 0, 0)
18
+ end
19
+ end
20
+ end
21
+
22
+ def test_gc_dc
23
+ bmp = Wx::Bitmap.new(100, 100)
24
+ assert_nothing_raised do
25
+ Wx::MemoryDC.draw_on(bmp) do |mdc|
26
+ Wx::GCDC.draw_on(mdc) do |gdc|
27
+ gdc.set_background(Wx::WHITE_BRUSH)
28
+ gdc.clear
29
+ gdc.set_pen(Wx::BLACK_PEN)
30
+ gdc.set_brush(Wx::WHITE_BRUSH)
31
+ GC.start
32
+ gdc.draw_rectangle(0, 0, 60, 15)
33
+ gdc.draw_line(0, 0, 59, 14)
34
+ gdc.set_text_foreground(Wx::BLACK)
35
+ gdc.draw_text("x1", 0, 0)
36
+ GC.start
37
+ end
38
+ end
39
+ end
40
+ end
41
+
42
+ def test_gc_dc_stress
43
+ 10.times do
44
+ bmp = Wx::Bitmap.new(100, 100)
45
+ assert_nothing_raised do
46
+ Wx::MemoryDC.draw_on(bmp) do |mdc|
47
+ Wx::GCDC.draw_on(mdc) do |gdc|
48
+
49
+ gc = gdc.get_graphics_context
50
+ gc.scale(0.9, 0.9)
51
+
52
+ 10.times do |i|
53
+ gdc.set_background(Wx::WHITE_BRUSH)
54
+ gdc.clear
55
+ gdc.set_pen(Wx::BLACK_PEN)
56
+ gdc.set_brush(Wx::WHITE_BRUSH)
57
+ GC.start
58
+ gdc.draw_rectangle(0, 0, 60, 15)
59
+ gdc.draw_line(0, 0, 59, 14)
60
+ gdc.set_text_foreground(Wx::BLACK)
61
+ gdc.draw_text("x1", 0, 0)
62
+ GC.start
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+
70
+ end
data/tests/test_dialog.rb CHANGED
@@ -1,6 +1,5 @@
1
- require 'test/unit'
2
- require 'test/unit/ui/console/testrunner'
3
- require 'wx'
1
+
2
+ require_relative './lib/wxapp_runner'
4
3
 
5
4
  class DialogTests < Test::Unit::TestCase
6
5
 
@@ -16,13 +15,3 @@ class DialogTests < Test::Unit::TestCase
16
15
  assert_kind_of(Wx::Window, dlg)
17
16
  end
18
17
  end
19
-
20
- class TestApp < Wx::App
21
- def on_init
22
- Test::Unit::UI::Console::TestRunner.run(DialogTests)
23
- false
24
- end
25
- end
26
-
27
- app = TestApp.new
28
- app.run
@@ -1,6 +1,5 @@
1
- require 'test/unit'
2
- require 'test/unit/ui/console/testrunner'
3
- require 'wx'
1
+
2
+ require_relative './lib/wxapp_runner'
4
3
 
5
4
  class EventHandlingTests < Test::Unit::TestCase
6
5
 
@@ -91,13 +90,3 @@ class EventHandlingTests < Test::Unit::TestCase
91
90
  assert_boolean(!win.child.test_cmd_event)
92
91
  end
93
92
  end
94
-
95
- class TestApp < Wx::App
96
- def on_init
97
- Test::Unit::UI::Console::TestRunner.run(EventHandlingTests)
98
- false
99
- end
100
- end
101
-
102
- app = TestApp.new
103
- app.run
data/tests/test_events.rb CHANGED
@@ -1,6 +1,5 @@
1
- require 'test/unit'
2
- require 'test/unit/ui/console/testrunner'
3
- require 'wx'
1
+
2
+ require_relative './lib/wxapp_runner'
4
3
 
5
4
  class EventTests < Test::Unit::TestCase
6
5
 
@@ -32,6 +31,18 @@ class EventTests < Test::Unit::TestCase
32
31
  assert_equal(evt.id, evt_dup.id)
33
32
  assert_equal(evt.string, evt_dup.string)
34
33
  end
34
+
35
+ def test_event_clone
36
+ evt = Wx::MouseEvent.new(Wx::EVT_LEFT_DOWN)
37
+ assert_equal(Wx::EVT_LEFT_DOWN, evt.event_type)
38
+ evt.position = Wx::Point.new(333,666)
39
+ assert_equal(Wx::Point.new(333,666), evt.position)
40
+ evt_dup = evt.clone
41
+ assert_instance_of(Wx::MouseEvent, evt_dup)
42
+ assert_not_equal(evt, evt_dup)
43
+ assert_equal(evt.event_type, evt_dup.event_type)
44
+ assert_equal(evt.position, evt_dup.position)
45
+ end
35
46
  end
36
47
 
37
48
  class TestApp < Wx::App
@@ -40,6 +51,3 @@ class TestApp < Wx::App
40
51
  false
41
52
  end
42
53
  end
43
-
44
- app = TestApp.new
45
- app.run
@@ -12,9 +12,9 @@ class GeometryTests < Test::Unit::TestCase
12
12
  assert_equal(10, w)
13
13
  assert_equal(20, h)
14
14
 
15
- assert(sz == Wx::Size.new(w,h))
16
- assert(sz == [w,h])
17
- assert_raise(TypeError) { sz == '10, 20' }
15
+ assert_equal(sz, Wx::Size.new(w,h))
16
+ assert_equal(sz, [w,h])
17
+ assert_not_equal(sz,'10, 20' )
18
18
 
19
19
  assert(sz.eql? Wx::Size.new(w,h))
20
20
  refute(sz.eql?([w,h]))
@@ -30,6 +30,20 @@ class GeometryTests < Test::Unit::TestCase
30
30
  assert(Wx::Size.new(12,22).eql?(sz + 2))
31
31
  assert(Wx::Size.new(12,23).eql?(sz + Wx::Size.new(2,3)))
32
32
  assert(Wx::Size.new(12,23).eql?(sz + [2,3]))
33
+
34
+ small_sz = Wx::Size.new(10, 10)
35
+ medium_sz = Wx::Size.new(20, 20)
36
+ large_sz = Wx::Size.new(30, 30)
37
+ a = [large_sz, small_sz, medium_sz]
38
+ a.sort!
39
+ assert_equal(a[0], small_sz)
40
+ assert_equal(a[1], medium_sz)
41
+ assert_equal(a[2], large_sz)
42
+
43
+ h = {large_sz => 'Large', small_sz => 'Small', medium_sz => 'Medium'}
44
+ assert_equal(h[Wx::Size.new(10, 10)], 'Small')
45
+ assert_equal(h[Wx::Size.new(20, 20)], 'Medium')
46
+ assert_equal(h[Wx::Size.new(30, 30)], 'Large')
33
47
  end
34
48
 
35
49
  def test_point
@@ -41,9 +55,9 @@ class GeometryTests < Test::Unit::TestCase
41
55
  assert_equal(10, x)
42
56
  assert_equal(20, y)
43
57
 
44
- assert(pt == Wx::Point.new(x,y))
45
- assert(pt == [x,y])
46
- assert_raise(TypeError) { pt == '10, 20' }
58
+ assert_equal(pt, Wx::Point.new(x,y))
59
+ assert_equal(pt, [x,y])
60
+ assert_not_equal(pt, '10, 20')
47
61
 
48
62
  assert(pt.eql? Wx::Point.new(x,y))
49
63
  refute(pt.eql?([x,y]))
@@ -61,6 +75,20 @@ class GeometryTests < Test::Unit::TestCase
61
75
  assert(Wx::Point.new(12,23).eql?(pt + Wx::Point.new(2,3)))
62
76
  assert(Wx::Point.new(12,23).eql?(pt + Wx::Size.new(2,3)))
63
77
  assert(Wx::Point.new(12,23).eql?(pt + [2,3]))
78
+
79
+ nearest_pt = Wx::Point.new(10, 10)
80
+ mid_pt = Wx::Point.new(10, 20)
81
+ furthest_pt = Wx::Point.new(10, 30)
82
+ a = [furthest_pt, nearest_pt, mid_pt]
83
+ a.sort!
84
+ assert_equal(a[0], nearest_pt)
85
+ assert_equal(a[1], mid_pt)
86
+ assert_equal(a[2], furthest_pt)
87
+
88
+ h = {furthest_pt => 'Far', nearest_pt => 'Near', mid_pt => 'Mid'}
89
+ assert_equal(h[Wx::Point.new(10, 10)], 'Near')
90
+ assert_equal(h[Wx::Point.new(10, 20)], 'Mid')
91
+ assert_equal(h[Wx::Point.new(10, 30)], 'Far')
64
92
  end
65
93
 
66
94
  def test_real_point
@@ -72,9 +100,9 @@ class GeometryTests < Test::Unit::TestCase
72
100
  assert_equal(10.0, x)
73
101
  assert_equal(20.0, y)
74
102
 
75
- assert(pt == Wx::RealPoint.new(x,y))
76
- assert(pt == [x,y])
77
- assert_raise(TypeError) { pt == '10.0, 20.0' }
103
+ assert_equal(pt, Wx::RealPoint.new(x,y))
104
+ assert_equal(pt, [x,y])
105
+ assert_not_equal(pt, '10.0, 20.0')
78
106
 
79
107
  assert(pt.eql? Wx::RealPoint.new(x,y))
80
108
  refute(pt.eql?([x,y]))
@@ -94,6 +122,20 @@ class GeometryTests < Test::Unit::TestCase
94
122
  assert(Wx::RealPoint.new(12.0,23.0).eql?(pt + Wx::Point.new(2,3)))
95
123
  assert(Wx::RealPoint.new(12.0,23.0).eql?(pt + Wx::Size.new(2,3)))
96
124
  assert(Wx::RealPoint.new(12.0,23.0).eql?(pt + [2,3]))
125
+
126
+ nearest_pt = Wx::RealPoint.new(10, 10)
127
+ mid_pt = Wx::RealPoint.new(10, 20)
128
+ furthest_pt = Wx::RealPoint.new(10, 30)
129
+ a = [furthest_pt, nearest_pt, mid_pt]
130
+ a.sort!
131
+ assert_equal(a[0], nearest_pt)
132
+ assert_equal(a[1], mid_pt)
133
+ assert_equal(a[2], furthest_pt)
134
+
135
+ h = {furthest_pt => 'Far', nearest_pt => 'Near', mid_pt => 'Mid'}
136
+ assert_equal(h[Wx::RealPoint.new(10, 10)], 'Near')
137
+ assert_equal(h[Wx::RealPoint.new(10, 20)], 'Mid')
138
+ assert_equal(h[Wx::RealPoint.new(10, 30)], 'Far')
97
139
  end
98
140
 
99
141
  def test_rect
@@ -113,9 +155,9 @@ class GeometryTests < Test::Unit::TestCase
113
155
  assert_equal(100, w)
114
156
  assert_equal(300, h)
115
157
 
116
- assert(rect == Wx::Rect.new(x,y,w,h))
117
- assert(rect == [x,y,w,h])
118
- assert_raise(TypeError) { rect == '10,0,20,0' }
158
+ assert_equal(rect, Wx::Rect.new(x,y,w,h))
159
+ assert_equal(rect, [x,y,w,h])
160
+ assert_not_equal(rect, '10,0,20,0')
119
161
 
120
162
  assert(rect.eql? Wx::Rect.new(x,y,w,h))
121
163
  refute(rect.eql?([x,y,w,h]))
@@ -131,11 +173,19 @@ class GeometryTests < Test::Unit::TestCase
131
173
  assert_equal(Wx::Rect.new(2, 20, 0, 290), (rect * Wx::Rect.new(2, 20, 0, 300)))
132
174
  assert_equal(Wx::Rect.new(102, 20, 0, 0), (rect & Wx::Rect.new(102, 20, 100, 300)))
133
175
  assert_equal(Wx::Rect.new(102, 20, -1, 290), (rect * Wx::Rect.new(102, 20, 100, 300)))
134
- end
135
176
 
136
- end
177
+ rect = Wx::Rect.new(5,5,10,10)
178
+ assert_equal([3,3,14,14], rect.inflate([2,2]))
179
+ assert_not_equal(rect.object_id, rect.inflate(2,2))
180
+ assert_equal([3,3,14,14], rect.inflate!(2))
181
+ assert_equal([3,3,14,14], rect)
182
+ assert_equal([5,5,10,10], rect.deflate([2,2]))
183
+ assert_not_equal(rect.object_id, rect.deflate(2,2))
184
+ assert_equal([5,5,10,10], rect.deflate!(2))
185
+ assert_equal([5,5,10,10], rect)
186
+ assert_equal([6,7,10,10], rect.offset(1,2))
187
+ assert_equal([6,7,10,10], rect.offset!(Wx::Point.new(1,2)))
188
+ assert_equal([6,7,10,10], rect)
189
+ end
137
190
 
138
- if $0 == __FILE__
139
- require 'test/unit/ui/console/testrunner'
140
- Test::Unit::UI::Console::TestRunner.run(GeometryTests)
141
191
  end
data/tests/test_intl.rb CHANGED
@@ -1,14 +1,5 @@
1
- require 'test/unit'
2
- require 'test/unit/ui/console/testrunner'
3
- require 'wx'
4
-
5
- class TestApp < Wx::App
6
- attr_accessor :test_class
7
- def on_init
8
- Test::Unit::UI::Console::TestRunner.run(self.test_class)
9
- false # exit after tests
10
- end
11
- end
1
+
2
+ require_relative './lib/wxapp_runner'
12
3
 
13
4
  class TestInternationalisation < Test::Unit::TestCase
14
5
  def test_encodings
@@ -101,7 +92,3 @@ class TestInternationalisation < Test::Unit::TestCase
101
92
  locale = Wx::Locale.new(Wx::LANGUAGE_DEFAULT)
102
93
  end
103
94
  end
104
-
105
- app = TestApp.new
106
- app.test_class = TestInternationalisation
107
- app.run
@@ -1,14 +1,5 @@
1
- require 'test/unit'
2
- require 'test/unit/ui/console/testrunner'
3
- require 'wx'
4
-
5
- class TestApp < Wx::App
6
- attr_accessor :test_class
7
- def on_init
8
- Test::Unit::UI::Console::TestRunner.run(self.test_class)
9
- false
10
- end
11
- end
1
+
2
+ require_relative './lib/wxapp_runner'
12
3
 
13
4
  class CtrlContainerFrame < Wx::Frame
14
5
  attr_accessor :control
@@ -181,7 +172,3 @@ class TestItemData < Test::Unit::TestCase
181
172
  f.close(true)
182
173
  end
183
174
  end
184
-
185
- app = TestApp.new
186
- app.test_class = TestItemData
187
- app.run
@@ -1,15 +1,5 @@
1
- require 'test/unit'
2
- require 'test/unit/ui/console/testrunner'
3
- require 'wx'
4
1
 
5
- class TestApp < Wx::App
6
- attr_accessor :test_class
7
- def on_init
8
- Test::Unit::UI::Console::TestRunner.run(self.test_class)
9
- GC.start
10
- false # exit after tests
11
- end
12
- end
2
+ require_relative './lib/wxapp_runner'
13
3
 
14
4
  class TestVariant < Test::Unit::TestCase
15
5
 
@@ -145,7 +135,3 @@ class TestVariant < Test::Unit::TestCase
145
135
  end
146
136
 
147
137
  end
148
-
149
- app = TestApp.new
150
- app.test_class = TestVariant
151
- app.run
data/tests/testapp.rb CHANGED
@@ -33,8 +33,3 @@ class TestApp < Test::Unit::TestCase
33
33
  assert(o.did_call_on_exit, "didn't call on_exit?")
34
34
  end
35
35
  end
36
-
37
- if $0 == __FILE__
38
- require 'test/unit/ui/console/testrunner'
39
- Test::Unit::UI::Console::TestRunner.run(TestApp)
40
- end
@@ -21,8 +21,3 @@ class TestApp < Test::Unit::TestCase
21
21
  end
22
22
 
23
23
  end
24
-
25
- if $0 == __FILE__
26
- require 'test/unit/ui/console/testrunner'
27
- Test::Unit::UI::Console::TestRunner.run(TestApp)
28
- end
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.0.pre.beta.10
4
+ version: 0.9.0.pre.beta.13
5
5
  platform: x64-mingw-ucrt
6
6
  authors:
7
7
  - Martin Corino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-01 00:00:00.000000000 Z
11
+ date: 2023-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -64,8 +64,12 @@ files:
64
64
  - ".wxconfig"
65
65
  - ".yardopts"
66
66
  - CREDITS.md
67
+ - INSTALL.md
67
68
  - LICENSE
68
69
  - README.md
70
+ - assets/logo.png
71
+ - assets/logo.svg
72
+ - assets/logo.xcf
69
73
  - bin/wxruby
70
74
  - bin/wxruby.bat
71
75
  - ext/mkrf_conf_bingem.rb
@@ -95,6 +99,8 @@ files:
95
99
  - lib/wx/core/acceleratortable.rb
96
100
  - lib/wx/core/animation.rb
97
101
  - lib/wx/core/app.rb
102
+ - lib/wx/core/array_ext.rb
103
+ - lib/wx/core/art_locator.rb
98
104
  - lib/wx/core/artprovider.rb
99
105
  - lib/wx/core/bitmap.rb
100
106
  - lib/wx/core/busycursor.rb
@@ -106,6 +112,7 @@ files:
106
112
  - lib/wx/core/colour.rb
107
113
  - lib/wx/core/combobox.rb
108
114
  - lib/wx/core/controlwithitems.rb
115
+ - lib/wx/core/cursor.rb
109
116
  - lib/wx/core/data_object.rb
110
117
  - lib/wx/core/dataformat.rb
111
118
  - lib/wx/core/dc.rb
@@ -125,6 +132,7 @@ files:
125
132
  - lib/wx/core/helpcontrollerhelpprovider.rb
126
133
  - lib/wx/core/helpprovider.rb
127
134
  - lib/wx/core/icon.rb
135
+ - lib/wx/core/id_helper.rb
128
136
  - lib/wx/core/image.rb
129
137
  - lib/wx/core/imagelist.rb
130
138
  - lib/wx/core/listbox.rb
@@ -141,6 +149,7 @@ files:
141
149
  - lib/wx/core/point.rb
142
150
  - lib/wx/core/real_point.rb
143
151
  - lib/wx/core/rect.rb
152
+ - lib/wx/core/region_iterator.rb
144
153
  - lib/wx/core/simplehelpprovider.rb
145
154
  - lib/wx/core/size.rb
146
155
  - lib/wx/core/sizer.rb
@@ -156,12 +165,21 @@ files:
156
165
  - lib/wx/core/window.rb
157
166
  - lib/wx/core/window_update_locker.rb
158
167
  - lib/wx/core/xmlresource.rb
168
+ - lib/wx/doc/array_ext.rb
169
+ - lib/wx/doc/art_locator.rb
159
170
  - lib/wx/doc/aui/auimanager.rb
160
171
  - lib/wx/doc/aui/auinotebook.rb
172
+ - lib/wx/doc/bitmap.rb
173
+ - lib/wx/doc/clipboard.rb
161
174
  - lib/wx/doc/colour_dialog.rb
175
+ - lib/wx/doc/const.rb
162
176
  - lib/wx/doc/core.rb
177
+ - lib/wx/doc/cursor.rb
178
+ - lib/wx/doc/data_object.rb
163
179
  - lib/wx/doc/dc.rb
164
180
  - lib/wx/doc/enum.rb
181
+ - lib/wx/doc/event.rb
182
+ - lib/wx/doc/events.rb
165
183
  - lib/wx/doc/evthandler.rb
166
184
  - lib/wx/doc/extra/00_starting.md
167
185
  - lib/wx/doc/extra/01_packages.md
@@ -173,7 +191,9 @@ files:
173
191
  - lib/wx/doc/extra/07_colour_and_font.md
174
192
  - lib/wx/doc/extra/08_extensions.md
175
193
  - lib/wx/doc/extra/09_exceptions.md
194
+ - lib/wx/doc/extra/10_art.md
176
195
  - lib/wx/doc/functions.rb
196
+ - lib/wx/doc/gc_dc.rb
177
197
  - lib/wx/doc/gdi_common.rb
178
198
  - lib/wx/doc/gen/about_dialog_info.rb
179
199
  - lib/wx/doc/gen/accelerator.rb
@@ -237,6 +257,7 @@ files:
237
257
  - lib/wx/doc/gen/cursor.rb
238
258
  - lib/wx/doc/gen/data_format.rb
239
259
  - lib/wx/doc/gen/data_object.rb
260
+ - lib/wx/doc/gen/data_object_simple_base.rb
240
261
  - lib/wx/doc/gen/date_event.rb
241
262
  - lib/wx/doc/gen/date_picker_ctrl.rb
242
263
  - lib/wx/doc/gen/dc.rb
@@ -400,6 +421,7 @@ files:
400
421
  - lib/wx/doc/gen/rbn/ribbon_tool_bar.rb
401
422
  - lib/wx/doc/gen/rbn/ribbon_tool_bar_event.rb
402
423
  - lib/wx/doc/gen/region.rb
424
+ - lib/wx/doc/gen/region_iterator.rb
403
425
  - lib/wx/doc/gen/rtc/event_list.rb
404
426
  - lib/wx/doc/gen/rtc/rich_text_buffer.rb
405
427
  - lib/wx/doc/gen/rtc/rich_text_ctrl.rb
@@ -413,7 +435,9 @@ files:
413
435
  - lib/wx/doc/gen/sash_event.rb
414
436
  - lib/wx/doc/gen/sash_layout_window.rb
415
437
  - lib/wx/doc/gen/sash_window.rb
438
+ - lib/wx/doc/gen/scaled_dc.rb
416
439
  - lib/wx/doc/gen/screen_dc.rb
440
+ - lib/wx/doc/gen/scroll_bar.rb
417
441
  - lib/wx/doc/gen/scrolled_canvas.rb
418
442
  - lib/wx/doc/gen/scrolled_control.rb
419
443
  - lib/wx/doc/gen/scrolled_window.rb
@@ -475,9 +499,13 @@ files:
475
499
  - lib/wx/doc/gen/wizard_page_simple.rb
476
500
  - lib/wx/doc/gen/xml_node.rb
477
501
  - lib/wx/doc/gen/xml_resource.rb
502
+ - lib/wx/doc/graphics_context.rb
478
503
  - lib/wx/doc/grid/grid.rb
479
504
  - lib/wx/doc/help_controller.rb
480
505
  - lib/wx/doc/html/html_help_controller.rb
506
+ - lib/wx/doc/icon.rb
507
+ - lib/wx/doc/id_helper.rb
508
+ - lib/wx/doc/image.rb
481
509
  - lib/wx/doc/pg/events.rb
482
510
  - lib/wx/doc/pg/pg_property.rb
483
511
  - lib/wx/doc/pg/pgeditor.rb
@@ -492,13 +520,16 @@ files:
492
520
  - lib/wx/doc/rbn/ribbon_button_bar.rb
493
521
  - lib/wx/doc/rbn/ribbon_gallery.rb
494
522
  - lib/wx/doc/rbn/ribbon_tool_bar.rb
523
+ - lib/wx/doc/region_iterator.rb
495
524
  - lib/wx/doc/rtc/richtext_printing.rb
525
+ - lib/wx/doc/scaled_dc.rb
496
526
  - lib/wx/doc/screen_dc.rb
497
527
  - lib/wx/doc/stock_objects.rb
498
528
  - lib/wx/doc/stream.rb
499
529
  - lib/wx/doc/system_settings.rb
500
530
  - lib/wx/doc/treebook.rb
501
531
  - lib/wx/doc/variant.rb
532
+ - lib/wx/doc/window.rb
502
533
  - lib/wx/doc/xml_resource.rb
503
534
  - lib/wx/global_const.rb
504
535
  - lib/wx/grid.rb
@@ -888,8 +919,25 @@ files:
888
919
  - samples/xrc/samples.xrc
889
920
  - samples/xrc/tn_xrc_sample.png
890
921
  - samples/xrc/xrc_sample.rb
922
+ - tests/art/my_art/sample.xpm
923
+ - tests/art/sample3.xpm
924
+ - tests/art/test_art/bitmap/sample.xpm
925
+ - tests/art/test_art/bitmap/wxruby.bmp
926
+ - tests/art/test_art/bitmap/wxruby.png
927
+ - tests/art/test_art/bitmap/wxruby.xpm
928
+ - tests/art/test_art/cursor/wxruby.bmp
929
+ - tests/art/test_art/icon/sample.xpm
930
+ - tests/art/test_art/icon/wxruby.ico
931
+ - tests/art/test_art/icon/wxruby.png
932
+ - tests/art/test_art/image/sample.xpm
933
+ - tests/art/test_art/image/wxruby.jpg
934
+ - tests/art/test_art/image/wxruby.png
935
+ - tests/art/test_art/sample2.xpm
936
+ - tests/lib/wxapp_runner.rb
937
+ - tests/test_art.rb
891
938
  - tests/test_basic.rb
892
939
  - tests/test_clipboard.rb
940
+ - tests/test_dc.rb
893
941
  - tests/test_dialog.rb
894
942
  - tests/test_event_handling.rb
895
943
  - tests/test_events.rb
@@ -902,7 +950,11 @@ files:
902
950
  homepage: https://github.com/mcorino/wxRuby3
903
951
  licenses:
904
952
  - MIT
905
- metadata: {}
953
+ metadata:
954
+ bug_tracker_uri: https://github.com/mcorino/wxRuby3/issues
955
+ source_code_uri: https://github.com/mcorino/wxRuby3
956
+ documentation_uri: https://mcorino.github.io/wxRuby3
957
+ homepage_uri: https://github.com/mcorino/wxRuby3
906
958
  post_install_message:
907
959
  rdoc_options:
908
960
  - "--exclude=\\.dll"