wxruby3 0.9.3-x64-mingw-ucrt → 0.9.5-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/INSTALL.md +1 -1
  3. data/README.md +2 -2
  4. data/ext/wxbase32u_gcc_custom.dll +0 -0
  5. data/ext/wxbase32u_net_gcc_custom.dll +0 -0
  6. data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
  7. data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
  8. data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
  9. data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
  10. data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
  11. data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
  12. data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
  13. data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
  14. data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
  15. data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
  16. data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
  17. data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
  18. data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
  19. data/lib/wx/core/book_ctrl_base.rb +16 -0
  20. data/lib/wx/core/combo_ctrl.rb +171 -0
  21. data/lib/wx/core/config.rb +454 -83
  22. data/lib/wx/core/notebook.rb +10 -8
  23. data/lib/wx/core/peristent_object.rb +15 -0
  24. data/lib/wx/core/persistence_manager.rb +39 -0
  25. data/lib/wx/core/persistent_window.rb +16 -0
  26. data/lib/wx/core/top_level_window.rb +16 -0
  27. data/lib/wx/core/treebook.rb +18 -0
  28. data/lib/wx/core.rb +4 -0
  29. data/lib/wx/doc/book_ctrl_base.rb +19 -0
  30. data/lib/wx/doc/comboctrl.rb +128 -3
  31. data/lib/wx/doc/config.rb +101 -41
  32. data/lib/wx/doc/extra/14_config.md +101 -0
  33. data/lib/wx/doc/extra/15_persistence.md +148 -0
  34. data/lib/wx/doc/gen/app_traits.rb +2 -54
  35. data/lib/wx/doc/gen/art_provider.rb +0 -2
  36. data/lib/wx/doc/gen/aui/aui_dock_art.rb +77 -77
  37. data/lib/wx/doc/gen/aui/aui_manager.rb +0 -1
  38. data/lib/wx/doc/gen/aui/aui_manager_event.rb +1 -1
  39. data/lib/wx/doc/gen/aui/aui_mdi_client_window.rb +5 -4
  40. data/lib/wx/doc/gen/aui/aui_notebook_event.rb +1 -1
  41. data/lib/wx/doc/gen/aui/aui_tool_bar_event.rb +21 -21
  42. data/lib/wx/doc/gen/book_ctrl_event.rb +1 -1
  43. data/lib/wx/doc/gen/calendar_event.rb +1 -1
  44. data/lib/wx/doc/gen/colour.rb +0 -1
  45. data/lib/wx/doc/gen/colour_dialog.rb +1 -1
  46. data/lib/wx/doc/gen/combo_box.rb +3 -2
  47. data/lib/wx/doc/gen/combo_ctrl.rb +91 -227
  48. data/lib/wx/doc/gen/core.rb +2 -2
  49. data/lib/wx/doc/gen/date_event.rb +1 -1
  50. data/lib/wx/doc/gen/dc.rb +0 -3
  51. data/lib/wx/doc/gen/dialog.rb +0 -1
  52. data/lib/wx/doc/gen/event.rb +4 -4
  53. data/lib/wx/doc/gen/event_blocker.rb +1 -1
  54. data/lib/wx/doc/gen/event_filter.rb +0 -2
  55. data/lib/wx/doc/gen/events.rb +17 -39
  56. data/lib/wx/doc/gen/file_ctrl_event.rb +1 -1
  57. data/lib/wx/doc/gen/file_dialog.rb +0 -2
  58. data/lib/wx/doc/gen/file_dialog_customize_hook.rb +55 -63
  59. data/lib/wx/doc/gen/file_dir_picker_event.rb +1 -1
  60. data/lib/wx/doc/gen/file_system.rb +1 -58
  61. data/lib/wx/doc/gen/find_dialog_event.rb +1 -1
  62. data/lib/wx/doc/gen/frame.rb +0 -1
  63. data/lib/wx/doc/gen/gdi_common.rb +0 -8
  64. data/lib/wx/doc/gen/grid/grid_cell_activatable_editor.rb +0 -2
  65. data/lib/wx/doc/gen/grid/grid_cell_attr.rb +0 -2
  66. data/lib/wx/doc/gen/grid/grid_cell_auto_wrap_string_editor.rb +0 -2
  67. data/lib/wx/doc/gen/grid/grid_cell_auto_wrap_string_renderer.rb +0 -2
  68. data/lib/wx/doc/gen/grid/grid_cell_bool_editor.rb +0 -2
  69. data/lib/wx/doc/gen/grid/grid_cell_bool_renderer.rb +0 -2
  70. data/lib/wx/doc/gen/grid/grid_cell_choice_editor.rb +0 -2
  71. data/lib/wx/doc/gen/grid/grid_cell_date_editor.rb +0 -2
  72. data/lib/wx/doc/gen/grid/grid_cell_date_renderer.rb +0 -2
  73. data/lib/wx/doc/gen/grid/grid_cell_date_time_renderer.rb +0 -2
  74. data/lib/wx/doc/gen/grid/grid_cell_editor.rb +0 -2
  75. data/lib/wx/doc/gen/grid/grid_cell_enum_editor.rb +0 -2
  76. data/lib/wx/doc/gen/grid/grid_cell_enum_renderer.rb +0 -2
  77. data/lib/wx/doc/gen/grid/grid_cell_float_editor.rb +0 -2
  78. data/lib/wx/doc/gen/grid/grid_cell_float_renderer.rb +0 -2
  79. data/lib/wx/doc/gen/grid/grid_cell_number_editor.rb +0 -2
  80. data/lib/wx/doc/gen/grid/grid_cell_number_renderer.rb +0 -2
  81. data/lib/wx/doc/gen/grid/grid_cell_renderer.rb +0 -2
  82. data/lib/wx/doc/gen/grid/grid_cell_string_renderer.rb +0 -2
  83. data/lib/wx/doc/gen/grid/grid_cell_text_editor.rb +0 -2
  84. data/lib/wx/doc/gen/grid/grid_ctrl.rb +0 -12
  85. data/lib/wx/doc/gen/grid/grid_editor_created_event.rb +1 -1
  86. data/lib/wx/doc/gen/grid/grid_event.rb +1 -1
  87. data/lib/wx/doc/gen/grid/grid_range_select_event.rb +1 -1
  88. data/lib/wx/doc/gen/grid/grid_size_event.rb +1 -1
  89. data/lib/wx/doc/gen/gui_event_loop.rb +0 -2
  90. data/lib/wx/doc/gen/header_ctrl.rb +0 -7
  91. data/lib/wx/doc/gen/header_ctrl_event.rb +1 -1
  92. data/lib/wx/doc/gen/html/html_cell_event.rb +1 -1
  93. data/lib/wx/doc/gen/image.rb +0 -2
  94. data/lib/wx/doc/gen/list_ctrl.rb +0 -1
  95. data/lib/wx/doc/gen/list_event.rb +1 -1
  96. data/lib/wx/doc/gen/media_ctrl.rb +0 -6
  97. data/lib/wx/doc/gen/media_event.rb +1 -1
  98. data/lib/wx/doc/gen/menu.rb +0 -2
  99. data/lib/wx/doc/gen/notebook.rb +0 -1
  100. data/lib/wx/doc/gen/persistence_manager.rb +135 -0
  101. data/lib/wx/doc/gen/persistent_object.rb +52 -0
  102. data/lib/wx/doc/gen/persistent_window.rb +116 -0
  103. data/lib/wx/doc/gen/pg/pg_property.rb +0 -13
  104. data/lib/wx/doc/gen/pg/pg_validation_info.rb +0 -2
  105. data/lib/wx/doc/gen/pg/property_grid.rb +0 -2
  106. data/lib/wx/doc/gen/pg/property_grid_event.rb +1 -1
  107. data/lib/wx/doc/gen/pg/property_grid_interface.rb +2 -2
  108. data/lib/wx/doc/gen/pg/property_grid_manager.rb +0 -2
  109. data/lib/wx/doc/gen/pg/property_grid_page.rb +0 -2
  110. data/lib/wx/doc/gen/pg/property_grid_page_state.rb +0 -1
  111. data/lib/wx/doc/gen/prt/post_script_dc.rb +0 -1
  112. data/lib/wx/doc/gen/rbn/ribbon_bar_event.rb +1 -1
  113. data/lib/wx/doc/gen/rbn/ribbon_button_bar_event.rb +1 -1
  114. data/lib/wx/doc/gen/rbn/ribbon_gallery_event.rb +1 -1
  115. data/lib/wx/doc/gen/rbn/ribbon_panel_event.rb +1 -1
  116. data/lib/wx/doc/gen/rbn/ribbon_tool_bar_event.rb +1 -1
  117. data/lib/wx/doc/gen/rtc/rich_text_event.rb +1 -1
  118. data/lib/wx/doc/gen/rtc/rich_text_html_handler.rb +0 -1
  119. data/lib/wx/doc/gen/rtc/rich_text_style_list_box.rb +3 -0
  120. data/lib/wx/doc/gen/rtc/rich_text_xml_handler.rb +0 -1
  121. data/lib/wx/doc/gen/scroll_bar.rb +0 -1
  122. data/lib/wx/doc/gen/sizer.rb +0 -1
  123. data/lib/wx/doc/gen/slider.rb +0 -1
  124. data/lib/wx/doc/gen/spin_double_event.rb +1 -1
  125. data/lib/wx/doc/gen/spin_event.rb +1 -1
  126. data/lib/wx/doc/gen/splash_screen.rb +1 -1
  127. data/lib/wx/doc/gen/splitter_event.rb +1 -1
  128. data/lib/wx/doc/gen/stc/styled_text_ctrl.rb +0 -1
  129. data/lib/wx/doc/gen/stc/styled_text_event.rb +1 -2
  130. data/lib/wx/doc/gen/task_bar_icon.rb +0 -1
  131. data/lib/wx/doc/gen/task_bar_icon_event.rb +1 -1
  132. data/lib/wx/doc/gen/text_ctrl.rb +0 -5
  133. data/lib/wx/doc/gen/text_entry.rb +0 -4
  134. data/lib/wx/doc/gen/tree_ctrl.rb +0 -2
  135. data/lib/wx/doc/gen/tree_event.rb +1 -1
  136. data/lib/wx/doc/gen/utils.rb +0 -16
  137. data/lib/wx/doc/gen/v_scrolled_window.rb +0 -1
  138. data/lib/wx/doc/gen/wizard.rb +0 -1
  139. data/lib/wx/doc/gen/wizard_event.rb +1 -1
  140. data/lib/wx/doc/gen/wizard_page.rb +0 -1
  141. data/lib/wx/doc/owner_drawn_combobox.rb +5 -1
  142. data/lib/wx/doc/persistence_manager.rb +36 -0
  143. data/lib/wx/doc/persistent_object.rb +27 -0
  144. data/lib/wx/doc/top_level_window.rb +19 -0
  145. data/lib/wx/doc/treebook.rb +6 -1
  146. data/lib/wx/version.rb +1 -1
  147. data/lib/wxruby_aui.so +0 -0
  148. data/lib/wxruby_core.so +0 -0
  149. data/lib/wxruby_grid.so +0 -0
  150. data/lib/wxruby_html.so +0 -0
  151. data/lib/wxruby_pg.so +0 -0
  152. data/lib/wxruby_prt.so +0 -0
  153. data/lib/wxruby_rbn.so +0 -0
  154. data/lib/wxruby_rtc.so +0 -0
  155. data/lib/wxruby_stc.so +0 -0
  156. data/samples/widgets/widgets.rb +5 -9
  157. data/tests/test_combo_ctrl.rb +196 -0
  158. data/tests/test_config.rb +207 -42
  159. data/tests/test_persistence.rb +142 -0
  160. metadata +20 -2
@@ -0,0 +1,142 @@
1
+ # Copyright (c) 2023 M.J.N. Corino, The Netherlands
2
+ #
3
+ # This software is released under the MIT license.
4
+
5
+ require_relative './lib/wxframe_runner'
6
+
7
+ class TopLevelPersistenceTests < WxRuby::Test::GUITests
8
+
9
+ PERSIST_ROOT = 'Persistent_Options'
10
+
11
+ def run_frame_props_tests
12
+ Wx.persistent_register_and_restore(frame_win, 'TestFrame')
13
+
14
+ frame_win.size = [450, 350]
15
+ frame_win.position = [100, 150]
16
+
17
+ Wx::PersistenceManager.get.save_and_unregister(frame_win)
18
+
19
+ cfg = Wx::ConfigBase.get
20
+ assert_kind_of(Wx::ConfigBase, cfg)
21
+ grp = cfg.get(PERSIST_ROOT)
22
+ assert_kind_of(cfg.class::Group, grp)
23
+ grp = grp.get('Window')
24
+ assert_kind_of(cfg.class::Group, grp)
25
+ grp = grp.get('TestFrame')
26
+ assert_kind_of(cfg.class::Group, grp)
27
+
28
+ assert_equal(100, Integer(grp['x']))
29
+ assert_equal(150, Integer(grp['y']))
30
+ assert_equal(450, Integer(grp.w))
31
+ assert_equal(350, Integer(grp.h))
32
+
33
+ grp.x = 110
34
+ grp.y = 140
35
+
36
+ assert_equal(110, Integer(grp['x']))
37
+ assert_equal(140, Integer(grp['y']))
38
+
39
+ Wx.persistent_register_and_restore(frame_win, 'TestFrame')
40
+
41
+ assert_equal(Wx::Point.new(110, 140), frame_win.position)
42
+
43
+ Wx::PersistenceManager.get.unregister(frame_win)
44
+ end
45
+
46
+ def test_frame_props_ruby_config
47
+ # force creation of hash based Wx::Config instance
48
+ Wx::ConfigBase.create(true, use_hash_config: true)
49
+
50
+ run_frame_props_tests
51
+
52
+ Wx::ConfigBase.get.clear
53
+ end
54
+
55
+ # default registry based config does not seem to do well in CI build env
56
+ unless is_ci_build? && Wx::PLATFORM == 'WXMSW'
57
+
58
+ def test_frame_props_default_config
59
+ # force creation of default C++ config instance
60
+ Wx::ConfigBase.create(true)
61
+
62
+ run_frame_props_tests
63
+
64
+ Wx::ConfigBase.get.clear
65
+ end
66
+
67
+ end
68
+
69
+ class PersistentButton < Wx::PersistentWindowBase
70
+
71
+ def get_kind
72
+ 'Button'
73
+ end
74
+
75
+ def save
76
+ save_value('w', get.size.width)
77
+ save_value('h', get.size.height)
78
+ save_value('label', get.label)
79
+ save_value('my_custom_value', get.my_custom_value)
80
+ end
81
+
82
+ def restore
83
+ get.size = [Integer(restore_value('w')), Integer(restore_value('h'))]
84
+ get.label = restore_value('label')
85
+ get.my_custom_value = Float(restore_value('my_custom_value'))
86
+ true
87
+ end
88
+
89
+ end
90
+
91
+ class MyButton < Wx::Button
92
+
93
+ def initialize(parent=nil, name)
94
+ super(parent, label: '', name: name)
95
+ @my_custom_value = ''
96
+ end
97
+
98
+ attr_accessor :my_custom_value
99
+
100
+ def create_persistent_object
101
+ PersistentButton.new(self)
102
+ end
103
+
104
+ end
105
+
106
+ def test_custom_persistent_object
107
+ # force creation of hash based Wx::Config instance
108
+ Wx::ConfigBase.create(true, use_hash_config: true)
109
+
110
+ assert_false(Wx::ConfigBase.get.has_group?(PERSIST_ROOT))
111
+
112
+ btn = MyButton.new(frame_win, 'AButton')
113
+ btn.label = 'Hello world'
114
+ btn.my_custom_value = 3.14
115
+
116
+ Wx::PersistenceManager.get.register(btn)
117
+
118
+ assert_false(Wx::ConfigBase.get.has_group?(PERSIST_ROOT))
119
+
120
+ # destroying window should save and unregister
121
+ btn.destroy
122
+ btn = nil
123
+
124
+
125
+ assert_true(Wx::ConfigBase.get.has_group?(PERSIST_ROOT))
126
+
127
+ cfg = Wx::ConfigBase.get[PERSIST_ROOT]['Button']['AButton']
128
+ assert_true(cfg.has_entry?('w'))
129
+ assert_true(cfg.has_entry?('h'))
130
+ assert_true(cfg.has_entry?('label'))
131
+ assert_true(cfg.has_entry?('my_custom_value'))
132
+
133
+
134
+ btn = MyButton.new(frame_win, 'AButton')
135
+
136
+ Wx::PersistenceManager.get.register_and_restore(btn)
137
+
138
+ assert_equal('Hello world', btn.label)
139
+ assert_equal(3.14, btn.my_custom_value)
140
+ end
141
+
142
+ 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.3
4
+ version: 0.9.5
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-12-15 00:00:00.000000000 Z
11
+ date: 2024-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -118,6 +118,7 @@ files:
118
118
  - lib/wx/core/artprovider.rb
119
119
  - lib/wx/core/bitmap.rb
120
120
  - lib/wx/core/bitmap_combobox.rb
121
+ - lib/wx/core/book_ctrl_base.rb
121
122
  - lib/wx/core/brush.rb
122
123
  - lib/wx/core/busycursor.rb
123
124
  - lib/wx/core/choicedlg.rb
@@ -125,6 +126,7 @@ files:
125
126
  - lib/wx/core/clipboard.rb
126
127
  - lib/wx/core/collapsible_pane.rb
127
128
  - lib/wx/core/colour.rb
129
+ - lib/wx/core/combo_ctrl.rb
128
130
  - lib/wx/core/combobox.rb
129
131
  - lib/wx/core/config.rb
130
132
  - lib/wx/core/const.rb
@@ -171,6 +173,9 @@ files:
171
173
  - lib/wx/core/paintdc.rb
172
174
  - lib/wx/core/pen.rb
173
175
  - lib/wx/core/pen_info.rb
176
+ - lib/wx/core/peristent_object.rb
177
+ - lib/wx/core/persistence_manager.rb
178
+ - lib/wx/core/persistent_window.rb
174
179
  - lib/wx/core/platform_info.rb
175
180
  - lib/wx/core/point.rb
176
181
  - lib/wx/core/real_point.rb
@@ -187,7 +192,9 @@ files:
187
192
  - lib/wx/core/timer.rb
188
193
  - lib/wx/core/toolbar.rb
189
194
  - lib/wx/core/toolbartool.rb
195
+ - lib/wx/core/top_level_window.rb
190
196
  - lib/wx/core/tree_ctrl.rb
197
+ - lib/wx/core/treebook.rb
191
198
  - lib/wx/core/v_list_box.rb
192
199
  - lib/wx/core/validator.rb
193
200
  - lib/wx/core/variant.rb
@@ -201,6 +208,7 @@ files:
201
208
  - lib/wx/doc/aui/auimanager.rb
202
209
  - lib/wx/doc/aui/auinotebook.rb
203
210
  - lib/wx/doc/bitmap.rb
211
+ - lib/wx/doc/book_ctrl_base.rb
204
212
  - lib/wx/doc/brush.rb
205
213
  - lib/wx/doc/busy_info.rb
206
214
  - lib/wx/doc/client_dc.rb
@@ -237,6 +245,8 @@ files:
237
245
  - lib/wx/doc/extra/11_drawing_and_dc.md
238
246
  - lib/wx/doc/extra/12_client_data.md
239
247
  - lib/wx/doc/extra/13_validators.md
248
+ - lib/wx/doc/extra/14_config.md
249
+ - lib/wx/doc/extra/15_persistence.md
240
250
  - lib/wx/doc/font.rb
241
251
  - lib/wx/doc/font_data.rb
242
252
  - lib/wx/doc/functions.rb
@@ -440,6 +450,9 @@ files:
440
450
  - lib/wx/doc/gen/palette.rb
441
451
  - lib/wx/doc/gen/panel.rb
442
452
  - lib/wx/doc/gen/pen.rb
453
+ - lib/wx/doc/gen/persistence_manager.rb
454
+ - lib/wx/doc/gen/persistent_object.rb
455
+ - lib/wx/doc/gen/persistent_window.rb
443
456
  - lib/wx/doc/gen/pg/event_list.rb
444
457
  - lib/wx/doc/gen/pg/numeric_property_validator.rb
445
458
  - lib/wx/doc/gen/pg/pg_array_editor_dialog.rb
@@ -601,6 +614,8 @@ files:
601
614
  - lib/wx/doc/num_validator.rb
602
615
  - lib/wx/doc/owner_drawn_combobox.rb
603
616
  - lib/wx/doc/pen.rb
617
+ - lib/wx/doc/persistence_manager.rb
618
+ - lib/wx/doc/persistent_object.rb
604
619
  - lib/wx/doc/pg/events.rb
605
620
  - lib/wx/doc/pg/numeric_property_validator.rb
606
621
  - lib/wx/doc/pg/pg_property.rb
@@ -637,6 +652,7 @@ files:
637
652
  - lib/wx/doc/system_settings.rb
638
653
  - lib/wx/doc/text_validator.rb
639
654
  - lib/wx/doc/textctrl.rb
655
+ - lib/wx/doc/top_level_window.rb
640
656
  - lib/wx/doc/tree_ctrl.rb
641
657
  - lib/wx/doc/tree_event.rb
642
658
  - lib/wx/doc/treebook.rb
@@ -1038,6 +1054,7 @@ files:
1038
1054
  - tests/test_book_controls.rb
1039
1055
  - tests/test_box_sizer.rb
1040
1056
  - tests/test_clipboard.rb
1057
+ - tests/test_combo_ctrl.rb
1041
1058
  - tests/test_config.rb
1042
1059
  - tests/test_dc.rb
1043
1060
  - tests/test_dialog.rb
@@ -1056,6 +1073,7 @@ files:
1056
1073
  - tests/test_log.rb
1057
1074
  - tests/test_media_ctrl.rb
1058
1075
  - tests/test_menu.rb
1076
+ - tests/test_persistence.rb
1059
1077
  - tests/test_pg.rb
1060
1078
  - tests/test_proof_check.rb
1061
1079
  - tests/test_richtext.rb