wxruby3 0.9.0.pre.beta.14-x64-mingw-ucrt → 0.9.0.pre.rc.2-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (278) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -0
  3. data/INSTALL.md +51 -22
  4. data/README.md +81 -6
  5. data/assets/hello_button-macos.png +0 -0
  6. data/assets/hello_button-msw.png +0 -0
  7. data/assets/hello_button.png +0 -0
  8. data/assets/hello_button_clicked-macos.png +0 -0
  9. data/assets/hello_button_clicked-msw.png +0 -0
  10. data/assets/hello_button_clicked.png +0 -0
  11. data/assets/hello_button_clicked_combi.png +0 -0
  12. data/assets/hello_world-macos.png +0 -0
  13. data/assets/hello_world-msw.png +0 -0
  14. data/assets/hello_world.png +0 -0
  15. data/assets/hello_world_combi.png +0 -0
  16. data/assets/repo-social-preview.png +0 -0
  17. data/ext/wxbase32u_gcc_custom.dll +0 -0
  18. data/ext/wxbase32u_net_gcc_custom.dll +0 -0
  19. data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
  20. data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
  21. data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
  22. data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
  23. data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
  24. data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
  25. data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
  26. data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
  27. data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
  28. data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
  29. data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
  30. data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
  31. data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
  32. data/lib/wx/core/art_locator.rb +2 -2
  33. data/lib/wx/core/artprovider.rb +2 -2
  34. data/lib/wx/core/bitmap.rb +6 -5
  35. data/lib/wx/core/bitmap_combobox.rb +34 -0
  36. data/lib/wx/core/brush.rb +6 -0
  37. data/lib/wx/core/controlwithitems.rb +52 -14
  38. data/lib/wx/core/cursor.rb +1 -1
  39. data/lib/wx/core/dc.rb +0 -20
  40. data/lib/wx/core/event_blocker.rb +14 -0
  41. data/lib/wx/core/events/evt_list.rb +19 -0
  42. data/lib/wx/core/evthandler.rb +48 -2
  43. data/lib/wx/core/find_replace_dialog.rb +24 -0
  44. data/lib/wx/core/font.rb +22 -14
  45. data/lib/wx/core/helpprovider.rb +2 -2
  46. data/lib/wx/core/icon.rb +1 -1
  47. data/lib/wx/core/image.rb +1 -1
  48. data/lib/wx/core/menu.rb +5 -0
  49. data/lib/wx/core/paintdc.rb +8 -0
  50. data/lib/wx/core/pen.rb +6 -0
  51. data/lib/wx/core/text_entry.rb +15 -0
  52. data/lib/wx/core/v_list_box.rb +13 -0
  53. data/lib/wx/core/window.rb +29 -2
  54. data/lib/wx/doc/app.rb +40 -0
  55. data/lib/wx/doc/brush.rb +17 -0
  56. data/lib/wx/doc/busy_info.rb +21 -0
  57. data/lib/wx/doc/client_dc.rb +28 -0
  58. data/lib/wx/doc/controlwithitems.rb +11 -0
  59. data/lib/wx/doc/dc.rb +0 -14
  60. data/lib/wx/doc/event_blocker.rb +27 -0
  61. data/lib/wx/doc/evthandler.rb +4 -0
  62. data/lib/wx/doc/extra/02_lifecycles.md +49 -0
  63. data/lib/wx/doc/extra/10_art.md +1 -1
  64. data/lib/wx/doc/extra/11_drawing_and_dc.md +62 -0
  65. data/lib/wx/doc/font.rb +27 -0
  66. data/lib/wx/doc/gen/about_dialog_info.rb +27 -24
  67. data/lib/wx/doc/gen/accelerator.rb +11 -12
  68. data/lib/wx/doc/gen/activity_indicator.rb +65 -0
  69. data/lib/wx/doc/gen/app.rb +6 -3
  70. data/lib/wx/doc/gen/art_provider.rb +53 -29
  71. data/lib/wx/doc/gen/aui/aui_manager.rb +4 -0
  72. data/lib/wx/doc/gen/aui/aui_mdi_child_frame.rb +1 -1
  73. data/lib/wx/doc/gen/aui/aui_pane_info.rb +2 -0
  74. data/lib/wx/doc/gen/aui/aui_tab_ctrl.rb +2 -0
  75. data/lib/wx/doc/gen/aui/aui_tool_bar.rb +2 -2
  76. data/lib/wx/doc/gen/bitmap.rb +25 -25
  77. data/lib/wx/doc/gen/bitmap_combo_box.rb +157 -0
  78. data/lib/wx/doc/gen/box_sizer.rb +6 -8
  79. data/lib/wx/doc/gen/brush.rb +2 -0
  80. data/lib/wx/doc/gen/busy_info.rb +52 -46
  81. data/lib/wx/doc/gen/caret.rb +0 -4
  82. data/lib/wx/doc/gen/check_list_box.rb +0 -2
  83. data/lib/wx/doc/gen/choice.rb +1 -5
  84. data/lib/wx/doc/gen/client_dc.rb +13 -18
  85. data/lib/wx/doc/gen/clipboard.rb +30 -27
  86. data/lib/wx/doc/gen/collapsible_pane.rb +11 -9
  87. data/lib/wx/doc/gen/colour.rb +6 -3
  88. data/lib/wx/doc/gen/colour_dialog.rb +111 -23
  89. data/lib/wx/doc/gen/combo_box.rb +2 -4
  90. data/lib/wx/doc/gen/context_help_button.rb +48 -0
  91. data/lib/wx/doc/gen/control.rb +20 -18
  92. data/lib/wx/doc/gen/core.rb +2 -2
  93. data/lib/wx/doc/gen/cursor.rb +18 -50
  94. data/lib/wx/doc/gen/data_format.rb +0 -2
  95. data/lib/wx/doc/gen/data_object.rb +37 -44
  96. data/lib/wx/doc/gen/dc.rb +16 -24
  97. data/lib/wx/doc/gen/defs.rb +3 -40
  98. data/lib/wx/doc/gen/dialog.rb +21 -17
  99. data/lib/wx/doc/gen/dir_dialog.rb +10 -8
  100. data/lib/wx/doc/gen/event.rb +2 -2
  101. data/lib/wx/doc/gen/event_blocker.rb +51 -0
  102. data/lib/wx/doc/gen/event_filter.rb +88 -0
  103. data/lib/wx/doc/gen/event_list.rb +23 -2
  104. data/lib/wx/doc/gen/events.rb +103 -112
  105. data/lib/wx/doc/gen/evt_handler.rb +28 -52
  106. data/lib/wx/doc/gen/file_dialog.rb +53 -50
  107. data/lib/wx/doc/gen/find_replace_dialog.rb +1 -1
  108. data/lib/wx/doc/gen/font.rb +19 -2
  109. data/lib/wx/doc/gen/font_data.rb +2 -0
  110. data/lib/wx/doc/gen/font_dialog.rb +1 -1
  111. data/lib/wx/doc/gen/frame.rb +4 -3
  112. data/lib/wx/doc/gen/fs_file.rb +8 -0
  113. data/lib/wx/doc/gen/gcdc.rb +2 -22
  114. data/lib/wx/doc/gen/gdi_common.rb +18 -2
  115. data/lib/wx/doc/gen/gdi_object.rb +2 -0
  116. data/lib/wx/doc/gen/graphics_context.rb +4 -43
  117. data/lib/wx/doc/gen/graphics_object.rb +2 -0
  118. data/lib/wx/doc/gen/grid/grid_cell_attr.rb +2 -1
  119. data/lib/wx/doc/gen/grid/grid_ctrl.rb +4 -2
  120. data/lib/wx/doc/gen/grid/grid_table_message.rb +2 -0
  121. data/lib/wx/doc/gen/grid_bag_sizer.rb +4 -0
  122. data/lib/wx/doc/gen/help_controller.rb +4 -1
  123. data/lib/wx/doc/gen/html/html_cell.rb +4 -1
  124. data/lib/wx/doc/gen/html/html_help_controller.rb +4 -1
  125. data/lib/wx/doc/gen/html/html_help_data.rb +4 -0
  126. data/lib/wx/doc/gen/html/html_help_window.rb +2 -1
  127. data/lib/wx/doc/gen/html/html_list_box.rb +138 -11
  128. data/lib/wx/doc/gen/html/html_window.rb +9 -3
  129. data/lib/wx/doc/gen/hyperlink_ctrl.rb +147 -0
  130. data/lib/wx/doc/gen/hyperlink_event.rb +43 -0
  131. data/lib/wx/doc/gen/icon.rb +7 -1
  132. data/lib/wx/doc/gen/icon_location.rb +2 -0
  133. data/lib/wx/doc/gen/image.rb +15 -8
  134. data/lib/wx/doc/gen/keyboard_state.rb +6 -0
  135. data/lib/wx/doc/gen/list_box.rb +0 -11
  136. data/lib/wx/doc/gen/list_ctrl.rb +10 -13
  137. data/lib/wx/doc/gen/locale.rb +7 -3
  138. data/lib/wx/doc/gen/log.rb +6 -2
  139. data/lib/wx/doc/gen/mdi_frame.rb +2 -0
  140. data/lib/wx/doc/gen/media_ctrl.rb +2 -0
  141. data/lib/wx/doc/gen/memory_dc.rb +105 -18
  142. data/lib/wx/doc/gen/menu.rb +4 -2
  143. data/lib/wx/doc/gen/menu_bar.rb +0 -8
  144. data/lib/wx/doc/gen/menu_item.rb +9 -3
  145. data/lib/wx/doc/gen/message_dialog.rb +6 -3
  146. data/lib/wx/doc/gen/mirror_dc.rb +2 -8
  147. data/lib/wx/doc/gen/mouse_state.rb +2 -0
  148. data/lib/wx/doc/gen/multi_choice_dialog.rb +0 -2
  149. data/lib/wx/doc/gen/non_owned_window.rb +2 -1
  150. data/lib/wx/doc/gen/notebook.rb +4 -2
  151. data/lib/wx/doc/gen/paint_dc.rb +2 -6
  152. data/lib/wx/doc/gen/palette.rb +3 -3
  153. data/lib/wx/doc/gen/pen.rb +6 -1
  154. data/lib/wx/doc/gen/pg/pg_editor.rb +2 -1
  155. data/lib/wx/doc/gen/pg/pg_multi_button.rb +4 -0
  156. data/lib/wx/doc/gen/pg/pg_properties.rb +30 -3
  157. data/lib/wx/doc/gen/pg/pg_property.rb +30 -4
  158. data/lib/wx/doc/gen/pg/pg_validation_info.rb +2 -0
  159. data/lib/wx/doc/gen/pg/property_grid.rb +5 -2
  160. data/lib/wx/doc/gen/pg/property_grid_interface.rb +6 -2
  161. data/lib/wx/doc/gen/pg/property_grid_manager.rb +2 -0
  162. data/lib/wx/doc/gen/pg/property_grid_page_state.rb +2 -0
  163. data/lib/wx/doc/gen/picker_base.rb +2 -1
  164. data/lib/wx/doc/gen/platform_info.rb +4 -1
  165. data/lib/wx/doc/gen/property_sheet_dialog.rb +2 -0
  166. data/lib/wx/doc/gen/prt/post_script_dc.rb +2 -8
  167. data/lib/wx/doc/gen/prt/print_data.rb +6 -0
  168. data/lib/wx/doc/gen/prt/printer.rb +0 -3
  169. data/lib/wx/doc/gen/prt/printer_dc.rb +2 -6
  170. data/lib/wx/doc/gen/radio_box.rb +2 -10
  171. data/lib/wx/doc/gen/rbn/ribbon_art_provider.rb +6 -0
  172. data/lib/wx/doc/gen/rbn/ribbon_panel.rb +1 -1
  173. data/lib/wx/doc/gen/region.rb +2 -0
  174. data/lib/wx/doc/gen/rtc/rich_text_buffer.rb +6 -0
  175. data/lib/wx/doc/gen/rtc/rich_text_ctrl.rb +0 -4
  176. data/lib/wx/doc/gen/rtc/rich_text_header_footer_data.rb +2 -0
  177. data/lib/wx/doc/gen/rtc/rich_text_html_handler.rb +2 -1
  178. data/lib/wx/doc/gen/rtc/symbol_picker_dialog.rb +2 -0
  179. data/lib/wx/doc/gen/screen_dc.rb +2 -0
  180. data/lib/wx/doc/gen/scroll_bar.rb +2 -1
  181. data/lib/wx/doc/gen/scrolled_canvas.rb +4 -8
  182. data/lib/wx/doc/gen/scrolled_control.rb +4 -8
  183. data/lib/wx/doc/gen/scrolled_window.rb +4 -8
  184. data/lib/wx/doc/gen/search_ctrl.rb +131 -0
  185. data/lib/wx/doc/gen/single_choice_dialog.rb +0 -2
  186. data/lib/wx/doc/gen/sizer.rb +14 -3
  187. data/lib/wx/doc/gen/splash_screen.rb +2 -0
  188. data/lib/wx/doc/gen/static_box.rb +6 -3
  189. data/lib/wx/doc/gen/static_box_sizer.rb +2 -1
  190. data/lib/wx/doc/gen/status_bar.rb +0 -5
  191. data/lib/wx/doc/gen/stc/styled_text_ctrl.rb +4 -5
  192. data/lib/wx/doc/gen/svg_file_dc.rb +10 -11
  193. data/lib/wx/doc/gen/text_ctrl.rb +10 -3
  194. data/lib/wx/doc/gen/text_entry.rb +8 -3
  195. data/lib/wx/doc/gen/text_entry_dialog.rb +4 -2
  196. data/lib/wx/doc/gen/timer_event.rb +2 -0
  197. data/lib/wx/doc/gen/tool_bar.rb +8 -4
  198. data/lib/wx/doc/gen/top_level_window.rb +5 -2
  199. data/lib/wx/doc/gen/tree_ctrl.rb +0 -6
  200. data/lib/wx/doc/gen/ui_action_simulator.rb +100 -0
  201. data/lib/wx/doc/gen/utils.rb +1 -1
  202. data/lib/wx/doc/gen/v_list_box.rb +36 -26
  203. data/lib/wx/doc/gen/validator.rb +2 -1
  204. data/lib/wx/doc/gen/variant.rb +10 -0
  205. data/lib/wx/doc/gen/window.rb +38 -17
  206. data/lib/wx/doc/gen/window_dc.rb +2 -0
  207. data/lib/wx/doc/gen/window_disabler.rb +2 -0
  208. data/lib/wx/doc/gen/wizard_page_simple.rb +2 -0
  209. data/lib/wx/doc/gen/xml_node.rb +6 -0
  210. data/lib/wx/doc/gen/xml_resource.rb +4 -1
  211. data/lib/wx/doc/memory_dc.rb +75 -0
  212. data/lib/wx/doc/mirror_dc.rb +16 -0
  213. data/lib/wx/doc/pen.rb +17 -0
  214. data/lib/wx/doc/prt/printer_dc.rb +26 -0
  215. data/lib/wx/doc/radio_box.rb +20 -0
  216. data/lib/wx/doc/screen_dc.rb +10 -6
  217. data/lib/wx/doc/svg_file_dc.rb +20 -0
  218. data/lib/wx/doc/v_list_box.rb +9 -0
  219. data/lib/wx/doc/window.rb +27 -0
  220. data/lib/wx/doc/window_disabler.rb +10 -0
  221. data/lib/wx/html/keyword_defs.rb +6 -7
  222. data/lib/wx/html/require.rb +1 -0
  223. data/lib/wx/html/simple_html_listbox.rb +105 -0
  224. data/lib/wx/keyword_defs.rb +83 -75
  225. data/lib/wx/prt/keyword_defs.rb +5 -1
  226. data/lib/wx/version.rb +1 -1
  227. data/lib/wx/wxruby/cmd/test.rb +1 -1
  228. data/lib/wxruby_aui.so +0 -0
  229. data/lib/wxruby_core.so +0 -0
  230. data/lib/wxruby_grid.so +0 -0
  231. data/lib/wxruby_html.so +0 -0
  232. data/lib/wxruby_pg.so +0 -0
  233. data/lib/wxruby_prt.so +0 -0
  234. data/lib/wxruby_rbn.so +0 -0
  235. data/lib/wxruby_rtc.so +0 -0
  236. data/lib/wxruby_stc.so +0 -0
  237. data/rakelib/install.rb +20 -7
  238. data/rakelib/lib/config/linux.rb +4 -2
  239. data/rakelib/lib/config/macosx.rb +120 -1
  240. data/rakelib/lib/config/mingw.rb +6 -1
  241. data/rakelib/lib/config/unixish.rb +26 -11
  242. data/rakelib/lib/config.rb +15 -6
  243. data/rakelib/yard/yard/relative_markdown_links.rb +5 -1
  244. data/samples/aui/aui.rb +432 -363
  245. data/samples/bigdemo/wxArtProvider.rbw +5 -4
  246. data/samples/controls/controls.rb +2 -2
  247. data/samples/controls/htlbox.rb +411 -0
  248. data/samples/controls/tn_htlbox.png +0 -0
  249. data/samples/drawing/graphics_drawing.rb +1 -2
  250. data/samples/drawing/{svgtest.rb → image_prt.rb} +49 -18
  251. data/samples/drawing/tn_image_prt.png +0 -0
  252. data/samples/propgrid/propgrid.rb +26 -21
  253. data/samples/ribbon/ribbon.rb +47 -46
  254. data/samples/sampler/editor.rb +33 -25
  255. data/samples/sampler/sample.rb +2 -2
  256. data/samples/sampler/stc_editor.rb +4 -2
  257. data/tests/lib/item_container_tests.rb +82 -0
  258. data/tests/lib/text_entry_tests.rb +80 -0
  259. data/tests/lib/wxapp_runner.rb +15 -3
  260. data/tests/lib/wxframe_runner.rb +144 -0
  261. data/tests/test_app_event_filter.rb +74 -0
  262. data/tests/test_art_provider.rb +52 -0
  263. data/tests/test_clipboard.rb +2 -1
  264. data/tests/test_event_handling.rb +199 -16
  265. data/tests/test_events.rb +4 -11
  266. data/tests/test_ext_controls.rb +28 -0
  267. data/tests/test_font.rb +239 -0
  268. data/tests/test_gdi_object.rb +161 -0
  269. data/tests/test_intl.rb +16 -15
  270. data/tests/test_item_data.rb +33 -1
  271. data/tests/test_std_controls.rb +373 -0
  272. data/tests/test_window.rb +340 -0
  273. metadata +61 -8
  274. data/lib/wx/doc/gen/auto_buffered_paint_dc.rb +0 -47
  275. data/lib/wx/doc/gen/buffered_dc.rb +0 -95
  276. data/lib/wx/doc/gen/buffered_paint_dc.rb +0 -55
  277. data/lib/wx/doc/gen/colour_data.rb +0 -96
  278. data/samples/drawing/tn_svgtest.png +0 -0
@@ -0,0 +1,340 @@
1
+
2
+ require_relative './lib/wxframe_runner'
3
+
4
+ class WindowTests < WxRuby::Test::GUITests
5
+
6
+ def setup
7
+ super
8
+ @window = Wx::Window.new(test_frame)
9
+ end
10
+
11
+ def cleanup
12
+ test_frame.destroy_children
13
+ @window = nil
14
+ super
15
+ end
16
+
17
+ attr_reader :window
18
+
19
+
20
+ def do_show_hide_event
21
+ count = count_events(window, :evt_show) do
22
+
23
+ assert(window.shown?)
24
+
25
+ window.show(false)
26
+
27
+ assert(!window.shown?)
28
+
29
+ window.show
30
+
31
+ assert(window.shown?)
32
+ end
33
+
34
+ assert_equal(2, count)
35
+ end
36
+
37
+ def test_show_hide_event
38
+
39
+ # normal
40
+ do_show_hide_event
41
+
42
+ # locked
43
+ window.locked do
44
+ assert(window.frozen?)
45
+
46
+ do_show_hide_event
47
+ end
48
+
49
+ end
50
+
51
+ if has_ui_simulator?
52
+
53
+ def test_key_event
54
+ if Wx::PLATFORM == 'WXGTK' || !is_ci_build?
55
+ count_events(window, :evt_key_down) do |c_keydown|
56
+ count_events(window, :evt_key_up) do |c_keyup|
57
+ count_events(window, :evt_char) do |c_keychar|
58
+
59
+ sim = Wx::UIActionSimulator.new
60
+
61
+ window.set_focus
62
+ Wx.get_app.yield
63
+
64
+ sim.text("text")
65
+ sim.char(Wx::K_SHIFT)
66
+ Wx.get_app.yield
67
+
68
+ assert_equal(5, c_keydown.count)
69
+ assert_equal(5, c_keyup.count)
70
+ assert_equal(4, c_keychar.count)
71
+
72
+ end
73
+ end
74
+ end
75
+ end
76
+ end
77
+
78
+ end
79
+
80
+ def test_focus_event
81
+ if Wx::PLATFORM != 'WXOSX'
82
+ count_events(window, :evt_set_focus) do |c_setfocus|
83
+ count_events(window, :evt_kill_focus) do |c_killfocus|
84
+ window.set_focus
85
+
86
+ assert(c_setfocus.wait_event(500))
87
+ assert_equal(window, Wx::Window.find_focus)
88
+
89
+ button = Wx::Button.new(test_frame, Wx::ID_ANY)
90
+
91
+ Wx.get_app.yield
92
+ button.set_focus
93
+
94
+ assert_equal(1, c_killfocus.count)
95
+ assert(!window.has_focus)
96
+ end
97
+ end
98
+ end
99
+ end
100
+
101
+ def test_mouse
102
+ cursor = Wx::Cursor.new(Wx::CURSOR_CHAR)
103
+ window.set_cursor(cursor)
104
+
105
+ assert(window.get_cursor.is_ok)
106
+
107
+ if Wx.has_feature?(:USE_CARET)
108
+ assert(!window.get_caret)
109
+
110
+ caret = nil
111
+
112
+ # Try creating the caret in two different, but normally equivalent, ways.
113
+ assert_nothing_raised("Caret 1-step") do
114
+ caret = Wx::Caret.new(window, [16, 16])
115
+
116
+ window.set_caret(caret)
117
+
118
+ assert(window.get_caret.ok?)
119
+ end
120
+
121
+ assert_nothing_raised("Caret 2-step") do
122
+ caret = Wx::Caret.new
123
+ caret.create(window, [16, 16])
124
+
125
+ window.set_caret(caret)
126
+
127
+ assert(window.get_caret.ok?)
128
+ end
129
+ end
130
+
131
+ window.capture_mouse
132
+
133
+ assert(window.has_capture)
134
+
135
+ window.release_mouse
136
+
137
+ assert(!window.has_capture)
138
+ end
139
+
140
+ def test_properties
141
+ window.set_label("label")
142
+
143
+ assert_equal('label', window.get_label)
144
+
145
+ window.set_name('name')
146
+
147
+ assert_equal('name', window.get_name)
148
+
149
+ #As we used wxID_ANY we should have a negative id
150
+ assert(window.get_id < 0)
151
+
152
+ window.set_id(Wx::ID_HIGHEST + 10)
153
+
154
+ assert_equal(Wx::ID_HIGHEST + 10, window.get_id)
155
+ end
156
+
157
+ if Wx.has_feature?(:USE_TOOLTIPS)
158
+ def test_tool_tip
159
+ assert(!window.get_tool_tip)
160
+ assert_equal('', window.get_tool_tip_text)
161
+
162
+ window.set_tool_tip("text tip")
163
+
164
+ assert_equal('text tip', window.get_tool_tip_text)
165
+
166
+ window.unset_tool_tip
167
+
168
+ assert(!window.get_tool_tip)
169
+ assert_equal('', window.get_tool_tip_text)
170
+
171
+ tip = Wx::ToolTip.new("other tip")
172
+
173
+ window.set_tool_tip(tip)
174
+
175
+ assert_equal(tip, window.get_tool_tip)
176
+ assert_equal('other tip', window.get_tool_tip_text)
177
+ end
178
+ end # wxUSE_TOOLTIPS
179
+
180
+ def test_help
181
+ if Wx.has_feature?(:USE_HELP)
182
+ Wx::HelpProvider.set(Wx::SimpleHelpProvider.new)
183
+
184
+ assert_equal('', window.get_help_text)
185
+
186
+ window.set_help_text("helptext")
187
+
188
+ assert_equal('helptext', window.get_help_text)
189
+ end
190
+ end
191
+
192
+ def test_parent
193
+ assert_equal(nil, window.get_grand_parent)
194
+ assert_equal(test_frame, window.get_parent)
195
+ end
196
+
197
+ def test_sibling
198
+ assert_equal(nil, window.get_next_sibling)
199
+ assert_equal(nil, window.get_prev_sibling)
200
+
201
+ newwin = Wx::Window.new(test_frame, Wx::ID_ANY)
202
+
203
+ assert_equal(newwin, window.get_next_sibling)
204
+ assert_equal(nil, window.get_prev_sibling)
205
+
206
+ assert_equal(nil, newwin.get_next_sibling)
207
+ assert_equal(window, newwin.get_prev_sibling)
208
+ end
209
+
210
+ def test_children
211
+ assert_equal(0, window.get_children.count)
212
+
213
+ child1 = Wx::Window.new(window, Wx::ID_ANY)
214
+
215
+ assert_equal(1, window.get_children.count)
216
+
217
+ window.remove_child(child1)
218
+
219
+ assert_equal(0, window.get_children.count)
220
+
221
+ child1.set_id(Wx::ID_HIGHEST + 1)
222
+ child1.set_name("child1")
223
+
224
+ window.add_child(child1)
225
+
226
+ assert_equal(1, window.get_children.count)
227
+ assert_equal(child1, window.find_window_by_id(Wx::ID_HIGHEST + 1))
228
+ assert_equal(child1, window.find_window_by_name("child1"))
229
+
230
+ window.destroy_children
231
+
232
+ assert_equal(0, window.get_children.count)
233
+ end
234
+
235
+ def test_focus
236
+ if Wx::PLATFORM != 'WXOSX'
237
+ assert(!window.has_focus)
238
+
239
+ if window.accepts_focus
240
+ window.set_focus
241
+ assert_equal(window, Wx::Window.find_focus)
242
+ end
243
+
244
+ # Set the focus back to the main window
245
+ test_frame.set_focus
246
+
247
+ if window.accepts_focus_from_keyboard
248
+ window.set_focus_from_kbd
249
+ assert_equal(window, Wx::Window.find_focus)
250
+ end
251
+ end
252
+ end
253
+
254
+ def test_positioning
255
+ # Some basic tests for consistency
256
+ pos = window.get_position
257
+ assert_equal(pos, window.get_position)
258
+ assert_equal(pos, window.get_rect.top_left)
259
+
260
+ pos = window.get_screen_position
261
+ assert_equal(pos, window.get_screen_position)
262
+ assert_equal(pos, window.get_screen_rect.top_left)
263
+ end
264
+
265
+ def test_show
266
+ assert(window.is_shown)
267
+
268
+ window.hide
269
+
270
+ assert(!window.is_shown)
271
+
272
+ window.show
273
+
274
+ assert(window.is_shown)
275
+
276
+ window.show(false)
277
+
278
+ assert(!window.is_shown)
279
+
280
+ window.show_with_effect(Wx::SHOW_EFFECT_BLEND)
281
+
282
+ assert(window.is_shown)
283
+
284
+ window.hide_with_effect(Wx::SHOW_EFFECT_BLEND)
285
+
286
+ assert(!window.is_shown)
287
+ end
288
+
289
+ def test_enable
290
+ assert(window.is_enabled)
291
+
292
+ window.disable
293
+
294
+ assert(!window.is_enabled)
295
+
296
+ window.enable
297
+
298
+ assert(window.is_enabled)
299
+
300
+ window.enable(false)
301
+
302
+ assert(!window.is_enabled)
303
+ window.enable
304
+
305
+
306
+ child = Wx::Window.new(window, Wx::ID_ANY)
307
+ assert(child.is_enabled)
308
+ assert(child.is_this_enabled)
309
+
310
+ window.disable
311
+ assert(!child.is_enabled)
312
+ assert(child.is_this_enabled)
313
+
314
+ child.disable
315
+ assert(!child.is_enabled)
316
+ assert(!child.is_this_enabled)
317
+
318
+ window.enable
319
+ assert(!child.is_enabled)
320
+ assert(!child.is_this_enabled)
321
+
322
+ child.enable
323
+ assert(child.is_enabled)
324
+ assert(child.is_this_enabled)
325
+ end
326
+
327
+ def test_find_window_by
328
+ window.set_id(Wx::ID_HIGHEST + 1)
329
+ window.set_name("name")
330
+ window.set_label("label")
331
+
332
+ assert_equal(window, Wx::Window.find_window_by_id(Wx::ID_HIGHEST + 1))
333
+ assert_equal(window, Wx::Window.find_window_by_name("name"))
334
+ assert_equal(window, Wx::Window.find_window_by_label("label"))
335
+
336
+ assert_equal(nil, Wx::Window.find_window_by_id(Wx::ID_HIGHEST + 3))
337
+ assert_equal(nil, Wx::Window.find_window_by_name("noname"))
338
+ assert_equal(nil, Wx::Window.find_window_by_label("nolabel"))
339
+ end
340
+ 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.14
4
+ version: 0.9.0.pre.rc.2
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-06-22 00:00:00.000000000 Z
11
+ date: 2023-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -67,9 +67,21 @@ files:
67
67
  - INSTALL.md
68
68
  - LICENSE
69
69
  - README.md
70
+ - assets/hello_button-macos.png
71
+ - assets/hello_button-msw.png
72
+ - assets/hello_button.png
73
+ - assets/hello_button_clicked-macos.png
74
+ - assets/hello_button_clicked-msw.png
75
+ - assets/hello_button_clicked.png
76
+ - assets/hello_button_clicked_combi.png
77
+ - assets/hello_world-macos.png
78
+ - assets/hello_world-msw.png
79
+ - assets/hello_world.png
80
+ - assets/hello_world_combi.png
70
81
  - assets/logo.png
71
82
  - assets/logo.svg
72
83
  - assets/logo.xcf
84
+ - assets/repo-social-preview.png
73
85
  - bin/wxruby
74
86
  - bin/wxruby.bat
75
87
  - ext/mkrf_conf_bingem.rb
@@ -103,6 +115,8 @@ files:
103
115
  - lib/wx/core/art_locator.rb
104
116
  - lib/wx/core/artprovider.rb
105
117
  - lib/wx/core/bitmap.rb
118
+ - lib/wx/core/bitmap_combobox.rb
119
+ - lib/wx/core/brush.rb
106
120
  - lib/wx/core/busycursor.rb
107
121
  - lib/wx/core/choice.rb
108
122
  - lib/wx/core/choicedlg.rb
@@ -119,9 +133,11 @@ files:
119
133
  - lib/wx/core/dialog.rb
120
134
  - lib/wx/core/enum.rb
121
135
  - lib/wx/core/event.rb
136
+ - lib/wx/core/event_blocker.rb
122
137
  - lib/wx/core/events/evt_list.rb
123
138
  - lib/wx/core/evthandler.rb
124
139
  - lib/wx/core/ext.rb
140
+ - lib/wx/core/find_replace_dialog.rb
125
141
  - lib/wx/core/font.rb
126
142
  - lib/wx/core/font/encoding.rb
127
143
  - lib/wx/core/functions.rb
@@ -144,6 +160,8 @@ files:
144
160
  - lib/wx/core/menuitem.rb
145
161
  - lib/wx/core/notebook.rb
146
162
  - lib/wx/core/object.rb
163
+ - lib/wx/core/paintdc.rb
164
+ - lib/wx/core/pen.rb
147
165
  - lib/wx/core/pen_info.rb
148
166
  - lib/wx/core/platform_info.rb
149
167
  - lib/wx/core/point.rb
@@ -154,31 +172,39 @@ files:
154
172
  - lib/wx/core/size.rb
155
173
  - lib/wx/core/sizer.rb
156
174
  - lib/wx/core/splash_screen.rb
175
+ - lib/wx/core/text_entry.rb
157
176
  - lib/wx/core/textctrl.rb
158
177
  - lib/wx/core/timer.rb
159
178
  - lib/wx/core/toolbar.rb
160
179
  - lib/wx/core/toolbartool.rb
161
180
  - lib/wx/core/treectrl.rb
181
+ - lib/wx/core/v_list_box.rb
162
182
  - lib/wx/core/validator.rb
163
183
  - lib/wx/core/variant.rb
164
184
  - lib/wx/core/vboxsizer.rb
165
185
  - lib/wx/core/window.rb
166
186
  - lib/wx/core/window_update_locker.rb
167
187
  - lib/wx/core/xmlresource.rb
188
+ - lib/wx/doc/app.rb
168
189
  - lib/wx/doc/array_ext.rb
169
190
  - lib/wx/doc/art_locator.rb
170
191
  - lib/wx/doc/aui/auimanager.rb
171
192
  - lib/wx/doc/aui/auinotebook.rb
172
193
  - lib/wx/doc/bitmap.rb
194
+ - lib/wx/doc/brush.rb
195
+ - lib/wx/doc/busy_info.rb
196
+ - lib/wx/doc/client_dc.rb
173
197
  - lib/wx/doc/clipboard.rb
174
198
  - lib/wx/doc/colour_dialog.rb
175
199
  - lib/wx/doc/const.rb
200
+ - lib/wx/doc/controlwithitems.rb
176
201
  - lib/wx/doc/core.rb
177
202
  - lib/wx/doc/cursor.rb
178
203
  - lib/wx/doc/data_object.rb
179
204
  - lib/wx/doc/dc.rb
180
205
  - lib/wx/doc/enum.rb
181
206
  - lib/wx/doc/event.rb
207
+ - lib/wx/doc/event_blocker.rb
182
208
  - lib/wx/doc/events.rb
183
209
  - lib/wx/doc/evthandler.rb
184
210
  - lib/wx/doc/extra/00_starting.md
@@ -192,12 +218,15 @@ files:
192
218
  - lib/wx/doc/extra/08_extensions.md
193
219
  - lib/wx/doc/extra/09_exceptions.md
194
220
  - lib/wx/doc/extra/10_art.md
221
+ - lib/wx/doc/extra/11_drawing_and_dc.md
222
+ - lib/wx/doc/font.rb
195
223
  - lib/wx/doc/functions.rb
196
224
  - lib/wx/doc/gc_dc.rb
197
225
  - lib/wx/doc/gdi_common.rb
198
226
  - lib/wx/doc/gen/about_dialog_info.rb
199
227
  - lib/wx/doc/gen/accelerator.rb
200
228
  - lib/wx/doc/gen/accessible.rb
229
+ - lib/wx/doc/gen/activity_indicator.rb
201
230
  - lib/wx/doc/gen/animation.rb
202
231
  - lib/wx/doc/gen/animation_ctrl.rb
203
232
  - lib/wx/doc/gen/any_button.rb
@@ -220,15 +249,13 @@ files:
220
249
  - lib/wx/doc/gen/aui/aui_tool_bar_event.rb
221
250
  - lib/wx/doc/gen/aui/aui_tool_bar_item.rb
222
251
  - lib/wx/doc/gen/aui/event_list.rb
223
- - lib/wx/doc/gen/auto_buffered_paint_dc.rb
224
252
  - lib/wx/doc/gen/bitmap.rb
225
253
  - lib/wx/doc/gen/bitmap_button.rb
254
+ - lib/wx/doc/gen/bitmap_combo_box.rb
226
255
  - lib/wx/doc/gen/book_ctrl_base.rb
227
256
  - lib/wx/doc/gen/book_ctrl_event.rb
228
257
  - lib/wx/doc/gen/box_sizer.rb
229
258
  - lib/wx/doc/gen/brush.rb
230
- - lib/wx/doc/gen/buffered_dc.rb
231
- - lib/wx/doc/gen/buffered_paint_dc.rb
232
259
  - lib/wx/doc/gen/busy_info.rb
233
260
  - lib/wx/doc/gen/button.rb
234
261
  - lib/wx/doc/gen/calculate_layout_event.rb
@@ -245,7 +272,6 @@ files:
245
272
  - lib/wx/doc/gen/collapsible_pane.rb
246
273
  - lib/wx/doc/gen/collapsible_pane_event.rb
247
274
  - lib/wx/doc/gen/colour.rb
248
- - lib/wx/doc/gen/colour_data.rb
249
275
  - lib/wx/doc/gen/colour_dialog.rb
250
276
  - lib/wx/doc/gen/colour_picker_ctrl.rb
251
277
  - lib/wx/doc/gen/colour_picker_event.rb
@@ -270,6 +296,8 @@ files:
270
296
  - lib/wx/doc/gen/drag_image.rb
271
297
  - lib/wx/doc/gen/editable_list_box.rb
272
298
  - lib/wx/doc/gen/event.rb
299
+ - lib/wx/doc/gen/event_blocker.rb
300
+ - lib/wx/doc/gen/event_filter.rb
273
301
  - lib/wx/doc/gen/event_list.rb
274
302
  - lib/wx/doc/gen/events.rb
275
303
  - lib/wx/doc/gen/evt_handler.rb
@@ -342,6 +370,8 @@ files:
342
370
  - lib/wx/doc/gen/html/html_list_box.rb
343
371
  - lib/wx/doc/gen/html/html_printout.rb
344
372
  - lib/wx/doc/gen/html/html_window.rb
373
+ - lib/wx/doc/gen/hyperlink_ctrl.rb
374
+ - lib/wx/doc/gen/hyperlink_event.rb
345
375
  - lib/wx/doc/gen/icon.rb
346
376
  - lib/wx/doc/gen/icon_location.rb
347
377
  - lib/wx/doc/gen/image.rb
@@ -441,6 +471,7 @@ files:
441
471
  - lib/wx/doc/gen/scrolled_canvas.rb
442
472
  - lib/wx/doc/gen/scrolled_control.rb
443
473
  - lib/wx/doc/gen/scrolled_window.rb
474
+ - lib/wx/doc/gen/search_ctrl.rb
444
475
  - lib/wx/doc/gen/simplebook.rb
445
476
  - lib/wx/doc/gen/single_choice_dialog.rb
446
477
  - lib/wx/doc/gen/sizer.rb
@@ -484,6 +515,7 @@ files:
484
515
  - lib/wx/doc/gen/tree_ctrl.rb
485
516
  - lib/wx/doc/gen/tree_event.rb
486
517
  - lib/wx/doc/gen/treebook.rb
518
+ - lib/wx/doc/gen/ui_action_simulator.rb
487
519
  - lib/wx/doc/gen/utils.rb
488
520
  - lib/wx/doc/gen/v_list_box.rb
489
521
  - lib/wx/doc/gen/v_scrolled_window.rb
@@ -506,6 +538,9 @@ files:
506
538
  - lib/wx/doc/icon.rb
507
539
  - lib/wx/doc/id_helper.rb
508
540
  - lib/wx/doc/image.rb
541
+ - lib/wx/doc/memory_dc.rb
542
+ - lib/wx/doc/mirror_dc.rb
543
+ - lib/wx/doc/pen.rb
509
544
  - lib/wx/doc/pg/events.rb
510
545
  - lib/wx/doc/pg/pg_property.rb
511
546
  - lib/wx/doc/pg/pgeditor.rb
@@ -516,6 +551,8 @@ files:
516
551
  - lib/wx/doc/prt/print_data.rb
517
552
  - lib/wx/doc/prt/print_dialog.rb
518
553
  - lib/wx/doc/prt/printer.rb
554
+ - lib/wx/doc/prt/printer_dc.rb
555
+ - lib/wx/doc/radio_box.rb
519
556
  - lib/wx/doc/rbn/ribbon_bar.rb
520
557
  - lib/wx/doc/rbn/ribbon_button_bar.rb
521
558
  - lib/wx/doc/rbn/ribbon_gallery.rb
@@ -526,10 +563,13 @@ files:
526
563
  - lib/wx/doc/screen_dc.rb
527
564
  - lib/wx/doc/stock_objects.rb
528
565
  - lib/wx/doc/stream.rb
566
+ - lib/wx/doc/svg_file_dc.rb
529
567
  - lib/wx/doc/system_settings.rb
530
568
  - lib/wx/doc/treebook.rb
569
+ - lib/wx/doc/v_list_box.rb
531
570
  - lib/wx/doc/variant.rb
532
571
  - lib/wx/doc/window.rb
572
+ - lib/wx/doc/window_disabler.rb
533
573
  - lib/wx/doc/xml_resource.rb
534
574
  - lib/wx/global_const.rb
535
575
  - lib/wx/grid.rb
@@ -544,6 +584,7 @@ files:
544
584
  - lib/wx/html/htmlwindow.rb
545
585
  - lib/wx/html/keyword_defs.rb
546
586
  - lib/wx/html/require.rb
587
+ - lib/wx/html/simple_html_listbox.rb
547
588
  - lib/wx/keyword_ctors.rb
548
589
  - lib/wx/keyword_defs.rb
549
590
  - lib/wx/pg.rb
@@ -744,6 +785,7 @@ files:
744
785
  - samples/controls/controls.rb
745
786
  - samples/controls/gauge.xpm
746
787
  - samples/controls/get_item_sample.rb
788
+ - samples/controls/htlbox.rb
747
789
  - samples/controls/list.xpm
748
790
  - samples/controls/mondrian.ico
749
791
  - samples/controls/mondrian.xpm
@@ -754,6 +796,7 @@ files:
754
796
  - samples/controls/tn_books.png
755
797
  - samples/controls/tn_controls.png
756
798
  - samples/controls/tn_get_item_sample.png
799
+ - samples/controls/tn_htlbox.png
757
800
  - samples/dialogs/dialogs.rb
758
801
  - samples/dialogs/tips.txt
759
802
  - samples/dialogs/tn_dialogs.png
@@ -765,16 +808,16 @@ files:
765
808
  - samples/drawing/bitmap.rb
766
809
  - samples/drawing/bitmap_image.rb
767
810
  - samples/drawing/graphics_drawing.rb
811
+ - samples/drawing/image_prt.rb
768
812
  - samples/drawing/maths_images.rb
769
813
  - samples/drawing/rmagic_bitmap_image.rb
770
814
  - samples/drawing/ruby-logo.jpg
771
- - samples/drawing/svgtest.rb
772
815
  - samples/drawing/tn_bitmap.png
773
816
  - samples/drawing/tn_bitmap_image.png
774
817
  - samples/drawing/tn_graphics_drawing.png
818
+ - samples/drawing/tn_image_prt.png
775
819
  - samples/drawing/tn_maths_images.png
776
820
  - samples/drawing/tn_rmagic_bitmap_image.png
777
- - samples/drawing/tn_svgtest.png
778
821
  - samples/etc/choice.rb
779
822
  - samples/etc/miniframe.rb
780
823
  - samples/etc/sash.rb
@@ -933,18 +976,28 @@ files:
933
976
  - tests/art/test_art/image/wxruby.jpg
934
977
  - tests/art/test_art/image/wxruby.png
935
978
  - tests/art/test_art/sample2.xpm
979
+ - tests/lib/item_container_tests.rb
980
+ - tests/lib/text_entry_tests.rb
936
981
  - tests/lib/wxapp_runner.rb
982
+ - tests/lib/wxframe_runner.rb
983
+ - tests/test_app_event_filter.rb
937
984
  - tests/test_art.rb
985
+ - tests/test_art_provider.rb
938
986
  - tests/test_basic.rb
939
987
  - tests/test_clipboard.rb
940
988
  - tests/test_dc.rb
941
989
  - tests/test_dialog.rb
942
990
  - tests/test_event_handling.rb
943
991
  - tests/test_events.rb
992
+ - tests/test_ext_controls.rb
993
+ - tests/test_font.rb
994
+ - tests/test_gdi_object.rb
944
995
  - tests/test_geometry.rb
945
996
  - tests/test_intl.rb
946
997
  - tests/test_item_data.rb
998
+ - tests/test_std_controls.rb
947
999
  - tests/test_variant.rb
1000
+ - tests/test_window.rb
948
1001
  - tests/testapp.rb
949
1002
  - tests/testapp_noframe.rb
950
1003
  homepage: https://github.com/mcorino/wxRuby3
@@ -1,47 +0,0 @@
1
- # :stopdoc:
2
- # This file is automatically generated by the WXRuby3 documentation
3
- # generator. Do not alter this file.
4
- # :startdoc:
5
-
6
-
7
- module Wx
8
-
9
- #
10
- BUFFER_VIRTUAL_AREA = 1
11
-
12
- #
13
- BUFFER_CLIENT_AREA = 2
14
-
15
- #
16
- BUFFER_USES_SHARED_BUFFER = 4
17
-
18
- # Check if the window is natively double buffered and will return a {Wx::PaintDC} if it is, a {Wx::BufferedPaintDC} otherwise.
19
- # It is the caller's responsibility to delete the {Wx::DC} pointer when finished with it.
20
- # @param window [Wx::Window]
21
- # @return [Wx::DC]
22
- def self.auto_buffered_paint_dc_factory(window) end
23
-
24
- # This {Wx::DC} derivative can be used inside of an <code>EVT_PAINT()</code> event handler to achieve double-buffered drawing.
25
- # Just use this class instead of {Wx::PaintDC} and make sure {Wx::Window#set_background_style} is called with {Wx::BackgroundStyle::BG_STYLE_PAINT} somewhere in the class initialization code, and that's all you have to do to (mostly) avoid flicker.
26
- # The difference between {Wx::BufferedPaintDC} and this class is that this class won't double-buffer on platforms which have native double-buffering already, avoiding any unnecessary buffering to avoid flicker.
27
- # {Wx::AutoBufferedPaintDC} is simply a typedef of {Wx::PaintDC} on platforms that have native double-buffering, otherwise, it is a typedef of {Wx::BufferedPaintDC}.
28
- # ===
29
- #
30
- # Category: Device Contexts
31
- # @see Wx::DC
32
- # @see Wx::BufferedPaintDC
33
- # @see Wx::PaintDC
34
- #
35
- #
36
- class AutoBufferedPaintDC < BufferedPaintDC
37
-
38
- # Constructor.
39
- # Pass a pointer to the window on which you wish to paint.
40
- # @param window [Wx::Window]
41
- # @return [AutoBufferedPaintDC]
42
- def initialize(window) end
43
-
44
- end # AutoBufferedPaintDC
45
-
46
-
47
- end