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.
- checksums.yaml +4 -4
- data/.yardopts +1 -0
- data/INSTALL.md +51 -22
- data/README.md +81 -6
- data/assets/hello_button-macos.png +0 -0
- data/assets/hello_button-msw.png +0 -0
- data/assets/hello_button.png +0 -0
- data/assets/hello_button_clicked-macos.png +0 -0
- data/assets/hello_button_clicked-msw.png +0 -0
- data/assets/hello_button_clicked.png +0 -0
- data/assets/hello_button_clicked_combi.png +0 -0
- data/assets/hello_world-macos.png +0 -0
- data/assets/hello_world-msw.png +0 -0
- data/assets/hello_world.png +0 -0
- data/assets/hello_world_combi.png +0 -0
- data/assets/repo-social-preview.png +0 -0
- data/ext/wxbase32u_gcc_custom.dll +0 -0
- data/ext/wxbase32u_net_gcc_custom.dll +0 -0
- data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
- data/lib/wx/core/art_locator.rb +2 -2
- data/lib/wx/core/artprovider.rb +2 -2
- data/lib/wx/core/bitmap.rb +6 -5
- data/lib/wx/core/bitmap_combobox.rb +34 -0
- data/lib/wx/core/brush.rb +6 -0
- data/lib/wx/core/controlwithitems.rb +52 -14
- data/lib/wx/core/cursor.rb +1 -1
- data/lib/wx/core/dc.rb +0 -20
- data/lib/wx/core/event_blocker.rb +14 -0
- data/lib/wx/core/events/evt_list.rb +19 -0
- data/lib/wx/core/evthandler.rb +48 -2
- data/lib/wx/core/find_replace_dialog.rb +24 -0
- data/lib/wx/core/font.rb +22 -14
- data/lib/wx/core/helpprovider.rb +2 -2
- data/lib/wx/core/icon.rb +1 -1
- data/lib/wx/core/image.rb +1 -1
- data/lib/wx/core/menu.rb +5 -0
- data/lib/wx/core/paintdc.rb +8 -0
- data/lib/wx/core/pen.rb +6 -0
- data/lib/wx/core/text_entry.rb +15 -0
- data/lib/wx/core/v_list_box.rb +13 -0
- data/lib/wx/core/window.rb +29 -2
- data/lib/wx/doc/app.rb +40 -0
- data/lib/wx/doc/brush.rb +17 -0
- data/lib/wx/doc/busy_info.rb +21 -0
- data/lib/wx/doc/client_dc.rb +28 -0
- data/lib/wx/doc/controlwithitems.rb +11 -0
- data/lib/wx/doc/dc.rb +0 -14
- data/lib/wx/doc/event_blocker.rb +27 -0
- data/lib/wx/doc/evthandler.rb +4 -0
- data/lib/wx/doc/extra/02_lifecycles.md +49 -0
- data/lib/wx/doc/extra/10_art.md +1 -1
- data/lib/wx/doc/extra/11_drawing_and_dc.md +62 -0
- data/lib/wx/doc/font.rb +27 -0
- data/lib/wx/doc/gen/about_dialog_info.rb +27 -24
- data/lib/wx/doc/gen/accelerator.rb +11 -12
- data/lib/wx/doc/gen/activity_indicator.rb +65 -0
- data/lib/wx/doc/gen/app.rb +6 -3
- data/lib/wx/doc/gen/art_provider.rb +53 -29
- data/lib/wx/doc/gen/aui/aui_manager.rb +4 -0
- data/lib/wx/doc/gen/aui/aui_mdi_child_frame.rb +1 -1
- data/lib/wx/doc/gen/aui/aui_pane_info.rb +2 -0
- data/lib/wx/doc/gen/aui/aui_tab_ctrl.rb +2 -0
- data/lib/wx/doc/gen/aui/aui_tool_bar.rb +2 -2
- data/lib/wx/doc/gen/bitmap.rb +25 -25
- data/lib/wx/doc/gen/bitmap_combo_box.rb +157 -0
- data/lib/wx/doc/gen/box_sizer.rb +6 -8
- data/lib/wx/doc/gen/brush.rb +2 -0
- data/lib/wx/doc/gen/busy_info.rb +52 -46
- data/lib/wx/doc/gen/caret.rb +0 -4
- data/lib/wx/doc/gen/check_list_box.rb +0 -2
- data/lib/wx/doc/gen/choice.rb +1 -5
- data/lib/wx/doc/gen/client_dc.rb +13 -18
- data/lib/wx/doc/gen/clipboard.rb +30 -27
- data/lib/wx/doc/gen/collapsible_pane.rb +11 -9
- data/lib/wx/doc/gen/colour.rb +6 -3
- data/lib/wx/doc/gen/colour_dialog.rb +111 -23
- data/lib/wx/doc/gen/combo_box.rb +2 -4
- data/lib/wx/doc/gen/context_help_button.rb +48 -0
- data/lib/wx/doc/gen/control.rb +20 -18
- data/lib/wx/doc/gen/core.rb +2 -2
- data/lib/wx/doc/gen/cursor.rb +18 -50
- data/lib/wx/doc/gen/data_format.rb +0 -2
- data/lib/wx/doc/gen/data_object.rb +37 -44
- data/lib/wx/doc/gen/dc.rb +16 -24
- data/lib/wx/doc/gen/defs.rb +3 -40
- data/lib/wx/doc/gen/dialog.rb +21 -17
- data/lib/wx/doc/gen/dir_dialog.rb +10 -8
- data/lib/wx/doc/gen/event.rb +2 -2
- data/lib/wx/doc/gen/event_blocker.rb +51 -0
- data/lib/wx/doc/gen/event_filter.rb +88 -0
- data/lib/wx/doc/gen/event_list.rb +23 -2
- data/lib/wx/doc/gen/events.rb +103 -112
- data/lib/wx/doc/gen/evt_handler.rb +28 -52
- data/lib/wx/doc/gen/file_dialog.rb +53 -50
- data/lib/wx/doc/gen/find_replace_dialog.rb +1 -1
- data/lib/wx/doc/gen/font.rb +19 -2
- data/lib/wx/doc/gen/font_data.rb +2 -0
- data/lib/wx/doc/gen/font_dialog.rb +1 -1
- data/lib/wx/doc/gen/frame.rb +4 -3
- data/lib/wx/doc/gen/fs_file.rb +8 -0
- data/lib/wx/doc/gen/gcdc.rb +2 -22
- data/lib/wx/doc/gen/gdi_common.rb +18 -2
- data/lib/wx/doc/gen/gdi_object.rb +2 -0
- data/lib/wx/doc/gen/graphics_context.rb +4 -43
- data/lib/wx/doc/gen/graphics_object.rb +2 -0
- data/lib/wx/doc/gen/grid/grid_cell_attr.rb +2 -1
- data/lib/wx/doc/gen/grid/grid_ctrl.rb +4 -2
- data/lib/wx/doc/gen/grid/grid_table_message.rb +2 -0
- data/lib/wx/doc/gen/grid_bag_sizer.rb +4 -0
- data/lib/wx/doc/gen/help_controller.rb +4 -1
- data/lib/wx/doc/gen/html/html_cell.rb +4 -1
- data/lib/wx/doc/gen/html/html_help_controller.rb +4 -1
- data/lib/wx/doc/gen/html/html_help_data.rb +4 -0
- data/lib/wx/doc/gen/html/html_help_window.rb +2 -1
- data/lib/wx/doc/gen/html/html_list_box.rb +138 -11
- data/lib/wx/doc/gen/html/html_window.rb +9 -3
- data/lib/wx/doc/gen/hyperlink_ctrl.rb +147 -0
- data/lib/wx/doc/gen/hyperlink_event.rb +43 -0
- data/lib/wx/doc/gen/icon.rb +7 -1
- data/lib/wx/doc/gen/icon_location.rb +2 -0
- data/lib/wx/doc/gen/image.rb +15 -8
- data/lib/wx/doc/gen/keyboard_state.rb +6 -0
- data/lib/wx/doc/gen/list_box.rb +0 -11
- data/lib/wx/doc/gen/list_ctrl.rb +10 -13
- data/lib/wx/doc/gen/locale.rb +7 -3
- data/lib/wx/doc/gen/log.rb +6 -2
- data/lib/wx/doc/gen/mdi_frame.rb +2 -0
- data/lib/wx/doc/gen/media_ctrl.rb +2 -0
- data/lib/wx/doc/gen/memory_dc.rb +105 -18
- data/lib/wx/doc/gen/menu.rb +4 -2
- data/lib/wx/doc/gen/menu_bar.rb +0 -8
- data/lib/wx/doc/gen/menu_item.rb +9 -3
- data/lib/wx/doc/gen/message_dialog.rb +6 -3
- data/lib/wx/doc/gen/mirror_dc.rb +2 -8
- data/lib/wx/doc/gen/mouse_state.rb +2 -0
- data/lib/wx/doc/gen/multi_choice_dialog.rb +0 -2
- data/lib/wx/doc/gen/non_owned_window.rb +2 -1
- data/lib/wx/doc/gen/notebook.rb +4 -2
- data/lib/wx/doc/gen/paint_dc.rb +2 -6
- data/lib/wx/doc/gen/palette.rb +3 -3
- data/lib/wx/doc/gen/pen.rb +6 -1
- data/lib/wx/doc/gen/pg/pg_editor.rb +2 -1
- data/lib/wx/doc/gen/pg/pg_multi_button.rb +4 -0
- data/lib/wx/doc/gen/pg/pg_properties.rb +30 -3
- data/lib/wx/doc/gen/pg/pg_property.rb +30 -4
- data/lib/wx/doc/gen/pg/pg_validation_info.rb +2 -0
- data/lib/wx/doc/gen/pg/property_grid.rb +5 -2
- data/lib/wx/doc/gen/pg/property_grid_interface.rb +6 -2
- data/lib/wx/doc/gen/pg/property_grid_manager.rb +2 -0
- data/lib/wx/doc/gen/pg/property_grid_page_state.rb +2 -0
- data/lib/wx/doc/gen/picker_base.rb +2 -1
- data/lib/wx/doc/gen/platform_info.rb +4 -1
- data/lib/wx/doc/gen/property_sheet_dialog.rb +2 -0
- data/lib/wx/doc/gen/prt/post_script_dc.rb +2 -8
- data/lib/wx/doc/gen/prt/print_data.rb +6 -0
- data/lib/wx/doc/gen/prt/printer.rb +0 -3
- data/lib/wx/doc/gen/prt/printer_dc.rb +2 -6
- data/lib/wx/doc/gen/radio_box.rb +2 -10
- data/lib/wx/doc/gen/rbn/ribbon_art_provider.rb +6 -0
- data/lib/wx/doc/gen/rbn/ribbon_panel.rb +1 -1
- data/lib/wx/doc/gen/region.rb +2 -0
- data/lib/wx/doc/gen/rtc/rich_text_buffer.rb +6 -0
- data/lib/wx/doc/gen/rtc/rich_text_ctrl.rb +0 -4
- data/lib/wx/doc/gen/rtc/rich_text_header_footer_data.rb +2 -0
- data/lib/wx/doc/gen/rtc/rich_text_html_handler.rb +2 -1
- data/lib/wx/doc/gen/rtc/symbol_picker_dialog.rb +2 -0
- data/lib/wx/doc/gen/screen_dc.rb +2 -0
- data/lib/wx/doc/gen/scroll_bar.rb +2 -1
- data/lib/wx/doc/gen/scrolled_canvas.rb +4 -8
- data/lib/wx/doc/gen/scrolled_control.rb +4 -8
- data/lib/wx/doc/gen/scrolled_window.rb +4 -8
- data/lib/wx/doc/gen/search_ctrl.rb +131 -0
- data/lib/wx/doc/gen/single_choice_dialog.rb +0 -2
- data/lib/wx/doc/gen/sizer.rb +14 -3
- data/lib/wx/doc/gen/splash_screen.rb +2 -0
- data/lib/wx/doc/gen/static_box.rb +6 -3
- data/lib/wx/doc/gen/static_box_sizer.rb +2 -1
- data/lib/wx/doc/gen/status_bar.rb +0 -5
- data/lib/wx/doc/gen/stc/styled_text_ctrl.rb +4 -5
- data/lib/wx/doc/gen/svg_file_dc.rb +10 -11
- data/lib/wx/doc/gen/text_ctrl.rb +10 -3
- data/lib/wx/doc/gen/text_entry.rb +8 -3
- data/lib/wx/doc/gen/text_entry_dialog.rb +4 -2
- data/lib/wx/doc/gen/timer_event.rb +2 -0
- data/lib/wx/doc/gen/tool_bar.rb +8 -4
- data/lib/wx/doc/gen/top_level_window.rb +5 -2
- data/lib/wx/doc/gen/tree_ctrl.rb +0 -6
- data/lib/wx/doc/gen/ui_action_simulator.rb +100 -0
- data/lib/wx/doc/gen/utils.rb +1 -1
- data/lib/wx/doc/gen/v_list_box.rb +36 -26
- data/lib/wx/doc/gen/validator.rb +2 -1
- data/lib/wx/doc/gen/variant.rb +10 -0
- data/lib/wx/doc/gen/window.rb +38 -17
- data/lib/wx/doc/gen/window_dc.rb +2 -0
- data/lib/wx/doc/gen/window_disabler.rb +2 -0
- data/lib/wx/doc/gen/wizard_page_simple.rb +2 -0
- data/lib/wx/doc/gen/xml_node.rb +6 -0
- data/lib/wx/doc/gen/xml_resource.rb +4 -1
- data/lib/wx/doc/memory_dc.rb +75 -0
- data/lib/wx/doc/mirror_dc.rb +16 -0
- data/lib/wx/doc/pen.rb +17 -0
- data/lib/wx/doc/prt/printer_dc.rb +26 -0
- data/lib/wx/doc/radio_box.rb +20 -0
- data/lib/wx/doc/screen_dc.rb +10 -6
- data/lib/wx/doc/svg_file_dc.rb +20 -0
- data/lib/wx/doc/v_list_box.rb +9 -0
- data/lib/wx/doc/window.rb +27 -0
- data/lib/wx/doc/window_disabler.rb +10 -0
- data/lib/wx/html/keyword_defs.rb +6 -7
- data/lib/wx/html/require.rb +1 -0
- data/lib/wx/html/simple_html_listbox.rb +105 -0
- data/lib/wx/keyword_defs.rb +83 -75
- data/lib/wx/prt/keyword_defs.rb +5 -1
- data/lib/wx/version.rb +1 -1
- data/lib/wx/wxruby/cmd/test.rb +1 -1
- data/lib/wxruby_aui.so +0 -0
- data/lib/wxruby_core.so +0 -0
- data/lib/wxruby_grid.so +0 -0
- data/lib/wxruby_html.so +0 -0
- data/lib/wxruby_pg.so +0 -0
- data/lib/wxruby_prt.so +0 -0
- data/lib/wxruby_rbn.so +0 -0
- data/lib/wxruby_rtc.so +0 -0
- data/lib/wxruby_stc.so +0 -0
- data/rakelib/install.rb +20 -7
- data/rakelib/lib/config/linux.rb +4 -2
- data/rakelib/lib/config/macosx.rb +120 -1
- data/rakelib/lib/config/mingw.rb +6 -1
- data/rakelib/lib/config/unixish.rb +26 -11
- data/rakelib/lib/config.rb +15 -6
- data/rakelib/yard/yard/relative_markdown_links.rb +5 -1
- data/samples/aui/aui.rb +432 -363
- data/samples/bigdemo/wxArtProvider.rbw +5 -4
- data/samples/controls/controls.rb +2 -2
- data/samples/controls/htlbox.rb +411 -0
- data/samples/controls/tn_htlbox.png +0 -0
- data/samples/drawing/graphics_drawing.rb +1 -2
- data/samples/drawing/{svgtest.rb → image_prt.rb} +49 -18
- data/samples/drawing/tn_image_prt.png +0 -0
- data/samples/propgrid/propgrid.rb +26 -21
- data/samples/ribbon/ribbon.rb +47 -46
- data/samples/sampler/editor.rb +33 -25
- data/samples/sampler/sample.rb +2 -2
- data/samples/sampler/stc_editor.rb +4 -2
- data/tests/lib/item_container_tests.rb +82 -0
- data/tests/lib/text_entry_tests.rb +80 -0
- data/tests/lib/wxapp_runner.rb +15 -3
- data/tests/lib/wxframe_runner.rb +144 -0
- data/tests/test_app_event_filter.rb +74 -0
- data/tests/test_art_provider.rb +52 -0
- data/tests/test_clipboard.rb +2 -1
- data/tests/test_event_handling.rb +199 -16
- data/tests/test_events.rb +4 -11
- data/tests/test_ext_controls.rb +28 -0
- data/tests/test_font.rb +239 -0
- data/tests/test_gdi_object.rb +161 -0
- data/tests/test_intl.rb +16 -15
- data/tests/test_item_data.rb +33 -1
- data/tests/test_std_controls.rb +373 -0
- data/tests/test_window.rb +340 -0
- metadata +61 -8
- data/lib/wx/doc/gen/auto_buffered_paint_dc.rb +0 -47
- data/lib/wx/doc/gen/buffered_dc.rb +0 -95
- data/lib/wx/doc/gen/buffered_paint_dc.rb +0 -55
- data/lib/wx/doc/gen/colour_data.rb +0 -96
- data/samples/drawing/tn_svgtest.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3641fe86e3445b1cc2316d01fdf95f30685ec1cd7db34fa3d6f1a41866d2188
|
4
|
+
data.tar.gz: cafc7d51a9bc984d4d7e73181e3182be25ec45c4589f0af186d2ee1c95dfed6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 333b2b88834008dccd8e07aa9264a8a17fa3d3591fc5e19e1bbcf729f2efd9e98f7ab309f7607f3e2157a8aadb5c4d96388a38db8f9c23b182e2bf19bbb84621
|
7
|
+
data.tar.gz: 5e77c8957774743fdeb71e216dfc71de9d5a626e8eca560c8e9f907e903d60af0368663354d841c066bac9041d98a38360aec63ade4e590e1eceee84643c6ee9
|
data/.yardopts
CHANGED
data/INSTALL.md
CHANGED
@@ -4,32 +4,45 @@
|
|
4
4
|
|
5
5
|
# Installation of wxRuby3
|
6
6
|
|
7
|
+
## Minimal requirements for installing wxRuby3
|
8
|
+
|
9
|
+
The minimal requirements for installing any source based setup (gem, source package or Github clone) of wxRuby3 are:
|
10
|
+
|
11
|
+
| Sofware | Notes |
|
12
|
+
|-----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
13
|
+
| Ruby | A supported version of the Ruby interpreter needs to be installed. |
|
14
|
+
| 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 |
|
15
|
+
| Git version control toolkit | |
|
16
|
+
| SWIG >= 3.0.12 | On MacOS install [Homebrew](https://brew.sh/) and than `brew install swig` |
|
17
|
+
| 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) |
|
18
|
+
|
19
|
+
The wxRuby3 build process requires `git` to clone a copy of the wxWidgets Github repository to extract the interface
|
20
|
+
specifications from.<br>
|
21
|
+
The wxRuby3 build process needs doxygen to generated XML files containing wxWidgets interface specs which are used to
|
22
|
+
generate SWIG interface definitions from which SWIG to generates C++ source code for the wrapper interfaces from
|
23
|
+
which the native extension is compiled.
|
24
|
+
|
7
25
|
## Installation of a wxRuby3 Gem
|
8
26
|
|
9
27
|
The wxRuby3 project provides gems on [RubyGems](https://rubygems.org) which can be installed with the
|
10
28
|
standard `gem install` command line this:
|
11
29
|
|
12
|
-
```
|
30
|
+
```shell
|
13
31
|
gem install wxruby3
|
14
32
|
```
|
15
33
|
|
16
34
|
On Linux systems this will install the source based gem which will automatically build the native wxruby3 extension
|
17
35
|
for the platform on which wxRuby3 is being installed.
|
18
36
|
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
|
20
|
-
|
37
|
+
installed rubies that will be installed by default if installing for that platform (including an embedded, latest
|
38
|
+
stable version, wxWidgets installation).<br>
|
39
|
+
Alternatively the source gem can be installed on Windows by installing with explicit platform specification like this:
|
21
40
|
|
22
|
-
```
|
41
|
+
```shell
|
23
42
|
gem install wxruby3 --platform=ruby
|
24
43
|
```
|
25
44
|
|
26
|
-
When installing the source gem the
|
27
|
-
|
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/)
|
45
|
+
When installing the source gem the minimal requirements listed above apply.
|
33
46
|
|
34
47
|
Also a wxWidgets installation (version 3.2 or later) is required for which there are multiple options.
|
35
48
|
|
@@ -39,38 +52,54 @@ Also a wxWidgets installation (version 3.2 or later) is required for which there
|
|
39
52
|
The wxRuby build procedure will determine the availability and version of wxWidgets by locating and calling
|
40
53
|
the `wx-config` utility script. In case no (compatible) wxWidgets version is found installation ends with an error.<br>
|
41
54
|
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
|
55
|
+
build procedure requires access to the wxWidgets interface specification sources which are not normally part of any of
|
56
|
+
the standard distribution packages.
|
43
57
|
|
44
58
|
|
45
59
|
2. User installed wxWidgets version<br>
|
46
60
|
<br>
|
47
|
-
In case the being
|
61
|
+
In case the system being installed on does not provide (a compatible) wxWidgets version or a specific (possibly updated)
|
48
62
|
wxWidgets version is required the source gem can be installed using a user installed version like this (where the
|
49
63
|
`WXWIN` path should provide the location where the wxWidgets binaries are installed under `<wxwin path>/bin`):<br>
|
50
64
|
|
51
|
-
```
|
65
|
+
```shell
|
52
66
|
gem install wxruby3 -- WXWIN=/path/to/wx/install
|
53
67
|
```
|
54
68
|
|
55
|
-
3. Automatic installed wxWidgets version<br>
|
69
|
+
3. Automatic installed, embedded, wxWidgets version<br>
|
56
70
|
<br>
|
57
|
-
This is the easiest method when the being
|
71
|
+
This is the easiest method when the system being installed on does not provide (a compatible) wxWidgets version (and
|
58
72
|
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
|
-
|
73
|
+
cause automatic checkout and building of the latest stable wxWidgets release (>= 3.2) from GitHub:
|
61
74
|
|
62
|
-
```
|
75
|
+
```shell
|
63
76
|
gem install wxruby3 -- WITH_WXWIN=1
|
64
77
|
```
|
65
78
|
|
79
|
+
In case of option **2** it is also possible to do the doxygen XML generation as part of the wxWidgets user installation
|
80
|
+
and use that for the gem installation. In that case the user is required to generate the XML interface specs using the
|
81
|
+
`regen` script found in the `docs/doxygen` folder of the wxWidgets installation after which the XML output folder can be
|
82
|
+
provided to the gem installation as follows:
|
83
|
+
|
84
|
+
```shell
|
85
|
+
gem install wxruby3 -- WXWIN=/path/to/wx/install WXXML=/path/to/wx/doxygen/xml
|
86
|
+
```
|
87
|
+
|
88
|
+
Please also not that in case of option two the user is responsible to make sure the wxWidgets shared libraries can be
|
89
|
+
found by the system's dynamic loader at runtime.
|
90
|
+
|
66
91
|
> **NOTE:** Be patient when installing the source gem. Building wxRuby3 takes a while and when wxWidgets is included event more.
|
67
92
|
|
93
|
+
> **NOTE:** Be aware that for prerelease versions of the gem you should add the `--pre` argument to the `gem install` command.
|
94
|
+
|
68
95
|
## Building from source
|
69
96
|
|
70
|
-
Checkout the wxRuby3 sources from [GitHub](https://github.com/mcorino/wxRuby3).
|
97
|
+
Checkout the wxRuby3 sources from [GitHub](https://github.com/mcorino/wxRuby3) or download and unpack a release package.
|
71
98
|
|
72
|
-
|
73
|
-
of the wxRuby3 tree
|
99
|
+
Requirements are the same as for installing the source gem. Gem dependencies are listed in the Gemfile in the root
|
100
|
+
of the wxRuby3 tree and should be installed by executing `bundle install`.<br>
|
101
|
+
To be able to generate HTML documentation the optional `:documentation` group should be included.<br>
|
102
|
+
To be able to run the Rake memory check task the option `:develop` group should be included.
|
74
103
|
|
75
104
|
The wxRuby3 project provides a Rake based build system. Call `rake help` to get an overview of the available commands.
|
76
105
|
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
|
|
@@ -13,12 +15,52 @@ Reviving wxRuby
|
|
13
15
|
|
14
16
|
## Introduction
|
15
17
|
|
16
|
-
wxRuby3 is a cross-platform GUI library for Ruby, based on the [wxWidgets](https://wxwidgets.org)
|
18
|
+
wxRuby3 is a cross-platform GUI library for Ruby, based on the mature [wxWidgets](https://wxwidgets.org)
|
17
19
|
GUI toolkit for C++. It uses native widgets wherever possible, providing
|
18
20
|
the correct look, feel and behaviour to GUI applications on Windows, OS
|
19
21
|
X and Linux/GTK. wxRuby aims to provide a comprehensive solution to
|
20
22
|
developing professional-standard desktop applications in Ruby.
|
21
23
|
|
24
|
+
## Usage examples
|
25
|
+
|
26
|
+
### Hello world
|
27
|
+
|
28
|
+
wxRuby3 is very easy to use.
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
require 'wx'
|
32
|
+
|
33
|
+
Wx::App.run do
|
34
|
+
Wx::Frame.new(nil, title: 'Hello world!').show
|
35
|
+
end
|
36
|
+
```
|
37
|
+
|
38
|
+
![Hello_World](assets/hello_world_combi.png "Hello World sample")
|
39
|
+
|
40
|
+
### Hello Button
|
41
|
+
|
42
|
+
Anyone who is familiar with wxWidgets should feel right at home since the API may be Ruby-fied, it is still easily
|
43
|
+
recognizable (but being Ruby-fied allowing for elegant and compact coding). And for those that do not have previous
|
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.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
require 'wx'
|
48
|
+
|
49
|
+
class TheFrame < Wx::Frame
|
50
|
+
def initialize(title)
|
51
|
+
super(nil, title: title)
|
52
|
+
panel = Wx::Panel.new(self)
|
53
|
+
button = Wx::Button.new(panel, label: 'Click me')
|
54
|
+
button.evt_button(Wx::ID_ANY) { Wx.message_box('Hello. Thanks for clicking me!', 'Hello Button sample') }
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
Wx::App.run { TheFrame.new('Hello world!').show }
|
59
|
+
```
|
60
|
+
|
61
|
+
![Hello_Button_Clicked](assets/hello_button_clicked_combi.png "Hello Button sample clicked")
|
62
|
+
|
63
|
+
|
22
64
|
## wxRuby3 licence
|
23
65
|
|
24
66
|
wxRuby3 is free and open-source. It is distributed under the liberal
|
@@ -54,14 +96,43 @@ of these products.
|
|
54
96
|
|
55
97
|
Currently the following are fully supported:
|
56
98
|
|
57
|
-
|
58
|
-
|
99
|
+
| Platform | Ruby version(s) | wxWidgets version(s) |
|
100
|
+
|----------------------------------------------------------------------------|-----------------| --- |
|
101
|
+
| Windows 10 (tested)<br>(most likely also Windows 11) | Ruby >= 2.5<br>(RubyInstaller MSYS2-DevKit) | wxWidgets >= 3.2 |
|
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) | Ruby >= 2.5 | wxWidgets >= 3.2 |
|
59
104
|
|
60
105
|
Support for other platforms is not being actively developed at present,
|
61
106
|
but patches are welcome. It is likely to be much simpler to get wxRuby
|
62
107
|
working on similar modern systems (eg FreeBSD or Solaris with GTK) than
|
63
108
|
on legacy systems (eg Windows 98, Mac OS 9).
|
64
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
|
+
|
65
136
|
### Where can I ask a question, or report a bug?
|
66
137
|
|
67
138
|
Use GitHUb Issues.
|
@@ -109,7 +180,7 @@ which may be relevant.
|
|
109
180
|
|
110
181
|
### What wxWidgets features are supported by wxRuby3?
|
111
182
|
|
112
|
-
wxRuby supports almost all of the wxWidgets 3.
|
183
|
+
wxRuby supports almost all of the wxWidgets 3.2+ GUI API, providing over
|
113
184
|
600 classes in total. wxWidgets classes that provide general and/or non-GUI
|
114
185
|
programming support features, such as strings, networking, threading, database
|
115
186
|
access and such are not and will never be ported, as it's assumed that
|
@@ -137,5 +208,9 @@ maintainable solution.
|
|
137
208
|
|
138
209
|
### I am getting an error trying to install or compile wxRuby3
|
139
210
|
|
140
|
-
Please double-check the [INSTALL](INSTALL.md)
|
211
|
+
Please double-check the instructions above and in the [INSTALL](INSTALL.md) document and search issue archives. If
|
141
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
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/wx/core/art_locator.rb
CHANGED
@@ -54,7 +54,7 @@ module Wx
|
|
54
54
|
private :search_paths
|
55
55
|
|
56
56
|
def add_search_path(*paths)
|
57
|
-
paths.flatten.each { |p|
|
57
|
+
paths.flatten.each { |p| search_paths << p.to_s unless search_paths.include?(p.to_s) }
|
58
58
|
end
|
59
59
|
alias :add_search_paths :add_search_path
|
60
60
|
|
@@ -74,7 +74,7 @@ module Wx
|
|
74
74
|
|
75
75
|
def find_art(art_name, art_type: nil, art_path: nil, art_section: nil, bmp_type: nil)
|
76
76
|
unless art_path
|
77
|
-
caller_path = caller_locations(1).first.absolute_path
|
77
|
+
caller_path = caller_locations(1).first.absolute_path || caller_locations(1).first.path
|
78
78
|
art_path = File.dirname(caller_path)
|
79
79
|
art_section ||= File.basename(caller_path, '.*')
|
80
80
|
end
|
data/lib/wx/core/artprovider.rb
CHANGED
@@ -7,7 +7,7 @@ class Wx::ArtProvider
|
|
7
7
|
wx_push_back = instance_method(:push_back)
|
8
8
|
define_method(:push_back) do | art_prov |
|
9
9
|
wx_push_back.bind(self).call(art_prov)
|
10
|
-
@__art_provs.
|
10
|
+
@__art_provs.push(art_prov)
|
11
11
|
end
|
12
12
|
|
13
13
|
wx_pop = instance_method(:pop)
|
@@ -19,7 +19,7 @@ class Wx::ArtProvider
|
|
19
19
|
wx_push = instance_method(:push)
|
20
20
|
define_method(:push) do | art_prov |
|
21
21
|
wx_push.bind(self).call(art_prov)
|
22
|
-
@__art_provs.
|
22
|
+
@__art_provs.unshift(art_prov)
|
23
23
|
end
|
24
24
|
|
25
25
|
wx_delete = instance_method(:delete)
|
data/lib/wx/core/bitmap.rb
CHANGED
@@ -86,15 +86,16 @@ module Wx
|
|
86
86
|
# Accepts a block, which will be passed a device context which can be
|
87
87
|
# used to draw upon the Bitmap
|
88
88
|
def draw
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
89
|
+
return unless block_given?
|
90
|
+
Wx::MemoryDC.draw_on(self) do |dc|
|
91
|
+
dc.select_object(self)
|
92
|
+
yield dc
|
93
|
+
end
|
93
94
|
end
|
94
95
|
end
|
95
96
|
|
96
97
|
def self.Bitmap(name, bmp_type = nil)
|
97
|
-
art_path = File.dirname(caller_path = caller_locations(1).first.absolute_path)
|
98
|
+
art_path = File.dirname(caller_path = caller_locations(1).first.absolute_path || caller_locations(1).first.path)
|
98
99
|
art_owner = File.basename(caller_path, '.*')
|
99
100
|
art_file = ArtLocator.find_art(name, art_type: :bitmap, art_path: art_path, art_section: art_owner, bmp_type: bmp_type)
|
100
101
|
::Kernel.raise ArgumentError, "Cannot locate art file for #{name}:Bitmap" unless art_file
|
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
module Wx
|
3
|
+
|
4
|
+
class BitmapCombobox < Wx::ComboBox
|
5
|
+
|
6
|
+
# We need to cache client data in Ruby variables as we cannot access items
|
7
|
+
# during the GC mark phase as for some platforms (WXMSW at least) that would
|
8
|
+
# involve calling methods that would break in that phase.
|
9
|
+
|
10
|
+
wx_append = instance_method :append
|
11
|
+
define_method :append do |item, bitmap=Wx::NULL_BITMAP, data=nil|
|
12
|
+
itm_pos = if data
|
13
|
+
wx_append.bind(self).call(item, bitmap, data)
|
14
|
+
else
|
15
|
+
wx_append.bind(self).call(item, bitmap)
|
16
|
+
end
|
17
|
+
client_data_store.insert(itm_pos, data)
|
18
|
+
itm_pos
|
19
|
+
end
|
20
|
+
|
21
|
+
wx_insert = instance_method :insert
|
22
|
+
define_method :insert do |item, bitmap, pos, data=nil|
|
23
|
+
itm_pos = if data
|
24
|
+
wx_insert.bind(self).call(item, bitmap, pos, data)
|
25
|
+
else
|
26
|
+
wx_insert.bind(self).call(item, bitmap, pos)
|
27
|
+
end
|
28
|
+
client_data_store.insert(itm_pos, data)
|
29
|
+
itm_pos
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
@@ -32,6 +32,7 @@ class Wx::ControlWithItems
|
|
32
32
|
|
33
33
|
wx_append = instance_method :append
|
34
34
|
define_method :append do |item, data=nil|
|
35
|
+
itm_pos = -1
|
35
36
|
if data
|
36
37
|
if ::Array === item
|
37
38
|
if !(::Array === data)
|
@@ -39,21 +40,42 @@ class Wx::ControlWithItems
|
|
39
40
|
elsif data.size != item.size
|
40
41
|
::Kernel.raise ::ArgumentError.new("item and data array must be equal size")
|
41
42
|
end
|
42
|
-
|
43
|
-
|
44
|
-
|
43
|
+
if sorted?
|
44
|
+
item.each_with_index do |itm, ix|
|
45
|
+
itm_pos = wx_append.bind(self).call(itm, data[ix])
|
46
|
+
client_data_store.insert(itm_pos, data[ix])
|
47
|
+
end
|
48
|
+
else
|
49
|
+
offs = get_count
|
50
|
+
itm_pos = wx_append.bind(self).call(item)
|
51
|
+
item.size.times { |ix| set_client_data(offs+ix, data[ix]) }
|
52
|
+
end
|
45
53
|
else
|
46
|
-
wx_append.bind(self).call(item, data)
|
47
|
-
client_data_store
|
54
|
+
itm_pos = wx_append.bind(self).call(item, data)
|
55
|
+
client_data_store.insert(itm_pos, data)
|
48
56
|
end
|
49
57
|
else
|
50
|
-
|
51
|
-
|
58
|
+
if ::Array === item
|
59
|
+
if sorted?
|
60
|
+
item.each_with_index do |itm, ix|
|
61
|
+
itm_pos = wx_append.bind(self).call(itm, data[ix])
|
62
|
+
client_data_store.insert(itm_pos, nil)
|
63
|
+
end
|
64
|
+
else
|
65
|
+
itm_pos = wx_append.bind(self).call(item)
|
66
|
+
client_data_store.concat(::Array.new(item.size))
|
67
|
+
end
|
68
|
+
else
|
69
|
+
itm_pos = wx_append.bind(self).call(item)
|
70
|
+
client_data_store.insert(itm_pos, nil)
|
71
|
+
end
|
52
72
|
end
|
73
|
+
itm_pos
|
53
74
|
end
|
54
75
|
|
55
76
|
wx_insert = instance_method :insert
|
56
77
|
define_method :insert do |item, pos, data=nil|
|
78
|
+
itm_pos = -1
|
57
79
|
if data
|
58
80
|
if ::Array === item
|
59
81
|
if !(::Array === data)
|
@@ -61,21 +83,37 @@ class Wx::ControlWithItems
|
|
61
83
|
elsif data.size != item.size
|
62
84
|
::Kernel.raise ::ArgumentError.new("item and data array must be equal size")
|
63
85
|
end
|
64
|
-
|
65
|
-
|
66
|
-
|
86
|
+
if sorted?
|
87
|
+
item.each_with_index do |itm, ix|
|
88
|
+
itm_pos = wx_insert.bind(self).call(itm, data[ix])
|
89
|
+
client_data_store.insert(itm_pos, data[ix])
|
90
|
+
end
|
91
|
+
else
|
92
|
+
itm_pos = wx_insert.bind(self).call(item, pos)
|
93
|
+
client_data_store.insert(pos, *::Array.new(item.size))
|
94
|
+
item.size.times { |ix| set_client_data(pos+ix, data[ix]) }
|
95
|
+
end
|
67
96
|
else
|
68
|
-
wx_insert.bind(self).call(item, pos, data)
|
69
|
-
client_data_store.insert(
|
97
|
+
itm_pos = wx_insert.bind(self).call(item, pos, data)
|
98
|
+
client_data_store.insert(itm_pos, data)
|
70
99
|
end
|
71
100
|
else
|
72
|
-
wx_insert.bind(self).call(item, pos)
|
73
101
|
if ::Array === item
|
74
|
-
|
102
|
+
if sorted?
|
103
|
+
item.each_with_index do |itm, ix|
|
104
|
+
itm_pos = wx_insert.bind(self).call(itm)
|
105
|
+
client_data_store.insert(itm_pos, nil)
|
106
|
+
end
|
107
|
+
else
|
108
|
+
itm_pos = wx_insert.bind(self).call(item, pos)
|
109
|
+
client_data_store.insert(pos, *::Array.new(item.size))
|
110
|
+
end
|
75
111
|
else
|
112
|
+
itm_pos = wx_insert.bind(self).call(item, pos)
|
76
113
|
client_data_store.insert(pos, nil)
|
77
114
|
end
|
78
115
|
end
|
116
|
+
itm_pos
|
79
117
|
end
|
80
118
|
|
81
119
|
wx_set = instance_method :set
|
data/lib/wx/core/cursor.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
module Wx
|
3
3
|
|
4
4
|
def self.Cursor(name, bmp_type = nil, *rest)
|
5
|
-
art_path = File.dirname(caller_path = caller_locations(1).first.absolute_path)
|
5
|
+
art_path = File.dirname(caller_path = caller_locations(1).first.absolute_path || caller_locations(1).first.path)
|
6
6
|
art_owner = File.basename(caller_path, '.*')
|
7
7
|
art_file = ArtLocator.find_art(name, art_type: :icon, art_path: art_path, art_section: art_owner, bmp_type: bmp_type)
|
8
8
|
::Kernel.raise ArgumentError, "Cannot locate art file for #{name}:Cursor" unless art_file
|
data/lib/wx/core/dc.rb
CHANGED
@@ -69,24 +69,4 @@ module Wx
|
|
69
69
|
|
70
70
|
end
|
71
71
|
|
72
|
-
class MemoryDC
|
73
|
-
|
74
|
-
# convenience method for drawing on a temporary memory DC
|
75
|
-
def self.draw_on(arg)
|
76
|
-
dc = case arg
|
77
|
-
when Wx::Bitmap, Wx::DC
|
78
|
-
self.new(arg)
|
79
|
-
else
|
80
|
-
::Kernel.raise ArgumentError, 'Expected Wx::Bitmap or Wx::DC'
|
81
|
-
end
|
82
|
-
begin
|
83
|
-
yield(dc) if block_given?
|
84
|
-
ensure
|
85
|
-
dc.select_object(Wx::NULL_BITMAP)
|
86
|
-
end
|
87
|
-
nil
|
88
|
-
end
|
89
|
-
|
90
|
-
end
|
91
|
-
|
92
72
|
end
|