wxruby3 0.9.0.pre.rc.1-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 (86) hide show
  1. checksums.yaml +4 -4
  2. data/INSTALL.md +51 -22
  3. data/README.md +38 -6
  4. data/assets/hello_button-macos.png +0 -0
  5. data/assets/hello_button-msw.png +0 -0
  6. data/assets/hello_button_clicked-macos.png +0 -0
  7. data/assets/hello_button_clicked-msw.png +0 -0
  8. data/assets/hello_button_clicked_combi.png +0 -0
  9. data/assets/hello_world-macos.png +0 -0
  10. data/assets/hello_world-msw.png +0 -0
  11. data/assets/hello_world_combi.png +0 -0
  12. data/ext/wxbase32u_gcc_custom.dll +0 -0
  13. data/ext/wxbase32u_net_gcc_custom.dll +0 -0
  14. data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
  15. data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
  16. data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
  17. data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
  18. data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
  19. data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
  20. data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
  21. data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
  22. data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
  23. data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
  24. data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
  25. data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
  26. data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
  27. data/lib/wx/core/brush.rb +6 -0
  28. data/lib/wx/core/events/evt_list.rb +7 -0
  29. data/lib/wx/core/evthandler.rb +12 -2
  30. data/lib/wx/core/font.rb +22 -14
  31. data/lib/wx/core/helpprovider.rb +2 -2
  32. data/lib/wx/core/menu.rb +5 -0
  33. data/lib/wx/core/pen.rb +6 -0
  34. data/lib/wx/core/window.rb +28 -1
  35. data/lib/wx/doc/app.rb +40 -0
  36. data/lib/wx/doc/brush.rb +17 -0
  37. data/lib/wx/doc/font.rb +27 -0
  38. data/lib/wx/doc/gen/activity_indicator.rb +65 -0
  39. data/lib/wx/doc/gen/aui/aui_tool_bar.rb +2 -2
  40. data/lib/wx/doc/gen/context_help_button.rb +48 -0
  41. data/lib/wx/doc/gen/core.rb +2 -2
  42. data/lib/wx/doc/gen/event_blocker.rb +18 -16
  43. data/lib/wx/doc/gen/event_filter.rb +38 -45
  44. data/lib/wx/doc/gen/event_list.rb +7 -0
  45. data/lib/wx/doc/gen/file_dialog.rb +48 -49
  46. data/lib/wx/doc/gen/font.rb +9 -0
  47. data/lib/wx/doc/gen/hyperlink_ctrl.rb +147 -0
  48. data/lib/wx/doc/gen/hyperlink_event.rb +43 -0
  49. data/lib/wx/doc/gen/menu_bar.rb +0 -6
  50. data/lib/wx/doc/gen/radio_box.rb +0 -8
  51. data/lib/wx/doc/pen.rb +17 -0
  52. data/lib/wx/doc/radio_box.rb +20 -0
  53. data/lib/wx/doc/window.rb +27 -0
  54. data/lib/wx/keyword_defs.rb +77 -76
  55. data/lib/wx/prt/keyword_defs.rb +5 -1
  56. data/lib/wx/version.rb +1 -1
  57. data/lib/wxruby_aui.so +0 -0
  58. data/lib/wxruby_core.so +0 -0
  59. data/lib/wxruby_grid.so +0 -0
  60. data/lib/wxruby_html.so +0 -0
  61. data/lib/wxruby_pg.so +0 -0
  62. data/lib/wxruby_prt.so +0 -0
  63. data/lib/wxruby_rbn.so +0 -0
  64. data/lib/wxruby_rtc.so +0 -0
  65. data/lib/wxruby_stc.so +0 -0
  66. data/rakelib/install.rb +17 -6
  67. data/rakelib/lib/config/linux.rb +4 -2
  68. data/rakelib/lib/config/macosx.rb +120 -1
  69. data/rakelib/lib/config/mingw.rb +6 -1
  70. data/rakelib/lib/config/unixish.rb +26 -11
  71. data/rakelib/lib/config.rb +15 -6
  72. data/samples/aui/aui.rb +432 -363
  73. data/samples/propgrid/propgrid.rb +3 -0
  74. data/samples/sampler/editor.rb +33 -25
  75. data/samples/sampler/sample.rb +2 -2
  76. data/samples/sampler/stc_editor.rb +4 -2
  77. data/tests/lib/item_container_tests.rb +82 -0
  78. data/tests/lib/text_entry_tests.rb +80 -0
  79. data/tests/lib/wxapp_runner.rb +12 -0
  80. data/tests/lib/wxframe_runner.rb +89 -4
  81. data/tests/test_ext_controls.rb +28 -0
  82. data/tests/test_font.rb +239 -0
  83. data/tests/test_intl.rb +5 -1
  84. data/tests/test_std_controls.rb +263 -37
  85. data/tests/test_window.rb +340 -0
  86. metadata +25 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b0789682f3f41499d529e24441bcff8b0ec200db6b1a84cbac198e445f73f33
4
- data.tar.gz: f48166b2c460c774916a7d2b177b73bdc353c0c7f3f35c760de3d6aa9a66dd57
3
+ metadata.gz: c3641fe86e3445b1cc2316d01fdf95f30685ec1cd7db34fa3d6f1a41866d2188
4
+ data.tar.gz: cafc7d51a9bc984d4d7e73181e3182be25ec45c4589f0af186d2ee1c95dfed6f
5
5
  SHA512:
6
- metadata.gz: 8f817d5543dcf138ff6c21b161beff6e8e93677db8922d37da6bcebb4a2940a44400c16b9800ee44ccce4b574eecd1eb2c0db909ab464bcbfb0a0cb89870063c
7
- data.tar.gz: 113af98388e9253f223fb5176f9722a61b7485f7a4a56dd79080a6eb55aafc3c6929522977d95e0564e7761e4655c8fdc3dde22796a108f8c5ba853329ca4ee0
6
+ metadata.gz: 333b2b88834008dccd8e07aa9264a8a17fa3d3591fc5e19e1bbcf729f2efd9e98f7ab309f7607f3e2157a8aadb5c4d96388a38db8f9c23b182e2bf19bbb84621
7
+ data.tar.gz: 5e77c8957774743fdeb71e216dfc71de9d5a626e8eca560c8e9f907e903d60af0368663354d841c066bac9041d98a38360aec63ade4e590e1eceee84643c6ee9
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
- ```sh
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. Alternatively the source gem can be
20
- installed on Windows by installing with explicit platform specification like this:
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
- ```sh
41
+ ```shell
23
42
  gem install wxruby3 --platform=ruby
24
43
  ```
25
44
 
26
- When installing the source gem the following basic requirements apply:
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 (see [here](TODO) for more details).
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 system installed on does not provide (a compatible) wxWidgets version or a specific (possibly updated)
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
- ```sh
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 system installed on does not provide (a compatible) wxWidgets version (and
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
- ```sh
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
- Basic requirements are the same as for installing the source gem. Gem dependencies are listed in the Gemfile in the root
73
- of the wxRuby3 tree.
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
 
@@ -33,13 +35,13 @@ Wx::App.run do
33
35
  end
34
36
  ```
35
37
 
36
- ![Hello_World](assets/hello_world.png "Hello World sample")
38
+ ![Hello_World](assets/hello_world_combi.png "Hello World sample")
37
39
 
38
40
  ### Hello Button
39
41
 
40
42
  Anyone who is familiar with wxWidgets should feel right at home since the API may be Ruby-fied, it is still easily
41
43
  recognizable (but being Ruby-fied allowing for elegant and compact coding). And for those that do not have previous
42
- experience do not fear, wxRuby3 comes with detailed [documentation](https://mcorino.github.io/wxRuby3/file.00_starting.html) and lots of examples and test.
44
+ experience, do not fear, wxRuby3 comes with detailed [documentation](https://mcorino.github.io/wxRuby3/file.00_starting.html) and lots of examples and tests.
43
45
 
44
46
  ```ruby
45
47
  require 'wx'
@@ -56,8 +58,7 @@ end
56
58
  Wx::App.run { TheFrame.new('Hello world!').show }
57
59
  ```
58
60
 
59
- ![Hello_Button](assets/hello_button.png "Hello Button sample")
60
- ![Hello_Button_Clicked](assets/hello_button_clicked.png "Hello Button sample clicked")
61
+ ![Hello_Button_Clicked](assets/hello_button_clicked_combi.png "Hello Button sample clicked")
61
62
 
62
63
 
63
64
  ## wxRuby3 licence
@@ -99,12 +100,39 @@ Currently the following are fully supported:
99
100
  |----------------------------------------------------------------------------|-----------------| --- |
100
101
  | Windows 10 (tested)<br>(most likely also Windows 11) | Ruby >= 2.5<br>(RubyInstaller MSYS2-DevKit) | wxWidgets >= 3.2 |
101
102
  | Linux (tested; any AMD-64 distribution)<br>(most likely also i686 and ARM) | Ruby >= 2.5 | wxWidgets >= 3.2 |
103
+ | MacOS >= 10.10 using Cocoa (tested on AMD-64) | Ruby >= 2.5 | wxWidgets >= 3.2 |
102
104
 
103
105
  Support for other platforms is not being actively developed at present,
104
106
  but patches are welcome. It is likely to be much simpler to get wxRuby
105
107
  working on similar modern systems (eg FreeBSD or Solaris with GTK) than
106
108
  on legacy systems (eg Windows 98, Mac OS 9).
107
109
 
110
+ ### How can I install wxRuby3?
111
+
112
+ wxRuby3 is distributed as a Ruby gem on [RubyGems](https://rubygems.org).<br>
113
+ Apart from a regular source-only version of the gem there is also a binary gem version for Windows 10 provided (for the
114
+ latest stable Ruby version at the time of publishing) which includes an embedded wxWidgets installation (also latest
115
+ stable version).
116
+
117
+ Installing the binary gem version on Windows requires no additional software to be installed except for a supported
118
+ version of the Ruby interpreter.<br>
119
+ To install the source-only gem the following software is required:
120
+
121
+ | Sofware | Notes |
122
+ |-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
123
+ | Ruby | A supported version of the Ruby interpreter needs to be installed. |
124
+ | C++ compiler<br>(incl. dev tools like `make`) | On linux a recent version of the GNU C++ compiler (with c++-14 support) needs to be installed<br>On Windows the RubyInstaller MSYS2-Devkit needs to be installed<br>On MacOS XCode with commandline tools needs to be installed |
125
+ | Git version control toolkit | |
126
+ | SWIG >= 3.0.12 | On MacOS install [Homebrew](https://brew.sh/) and than `brew install swig` |
127
+ | Doxygen (>= 1.9.1, <= 1.9.6) | Doxygen > 1.9.6 has changes that cause problems with the wxWidgets doxygen files.<br>On MacOS: `brew tap mcorino/wxruby3` and than `brew install doxygen@1.9.6` (default brew recipe installs 1.9.7) |
128
+ | wxWidgets >= 3.2 (*OPTIONAL*) | On Linux most distributions provide system installable (development) packages for wxWidgets providing a supported version. Alternatively you can fairly easily install your own preferred version manually (see the [wxWidgets](https://wxwidgets.org) project for details).<br>On Windows and MacOS the process is less straightforward (also here see the [wxWidgets](https://wxwidgets.org) project for details).<br>The wxRuby3 source-only gem can also be installed using a private local wxWidgets installation or an embedded installation (most likely preferred on Windows and MacOS). See [INSTALL](INSTALL.md) for more details. |
129
+
130
+ In case the prerequisites above are met the (source-only or binary) gem can be installed executing the following command:
131
+
132
+ ```shell
133
+ gem install wxruby3
134
+ ```
135
+
108
136
  ### Where can I ask a question, or report a bug?
109
137
 
110
138
  Use GitHUb Issues.
@@ -180,5 +208,9 @@ maintainable solution.
180
208
 
181
209
  ### I am getting an error trying to install or compile wxRuby3
182
210
 
183
- Please double-check the [INSTALL](INSTALL.md) documents, and search issue archives. If
211
+ Please double-check the instructions above and in the [INSTALL](INSTALL.md) document and search issue archives. If
184
212
  this doesn't help, please post your question using GitHub Issues.
213
+
214
+ ### Is there another, more declarative way, for writing wxRuby3 desktop GUI applications?
215
+
216
+ Yes. [Glimmer DSL for WX](https://github.com/AndyObtiva/glimmer-dsl-wx) enables software engineers to build GUI using wxruby3 following the Ruby way with the least amount of code possible. That is by offering a minimalistic declarative high-level DSL that maps visually to the way software engineers think about the GUI hierarchy in addition to adopting Rails' strategy of Convention over Configuration via smart defaults and automation of wxruby3 low-level details. You can check out the [Glimmer DSL for WX README "Coming From wxruby3" section](https://github.com/AndyObtiva/glimmer-dsl-wx#coming-from-wxruby3) for more information on how to translate wxruby3 apps to [Glimmer DSL for WX](https://github.com/AndyObtiva/glimmer-dsl-wx) syntax.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,6 @@
1
+
2
+ module Wx
3
+
4
+ TheBrushList = Wx::Brush
5
+
6
+ end
@@ -1002,6 +1002,12 @@ class Wx::EvtHandler
1002
1002
  Wx::EVT_MEDIA_PAUSE,
1003
1003
  Wx::MediaEvent
1004
1004
  ] if Wx.const_defined?(:EVT_MEDIA_PAUSE)
1005
+ # from wxHyperlinkEvent
1006
+ self.register_event_type EventType[
1007
+ 'evt_hyperlink', 1,
1008
+ Wx::EVT_HYPERLINK,
1009
+ Wx::HyperlinkEvent
1010
+ ] if Wx.const_defined?(:EVT_HYPERLINK)
1005
1011
  # from wxCommandEvent
1006
1012
  self.register_event_type EventType[
1007
1013
  'evt_button', 1,
@@ -1388,4 +1394,5 @@ class Wx::EvtHandler
1388
1394
  Wx::EVT_DIRCTRL_FILEACTIVATED,
1389
1395
  Wx::GenericDirCtrl
1390
1396
  ] if Wx.const_defined?(:EVT_DIRCTRL_FILEACTIVATED)
1397
+ # from wxHyperlinkCtrl
1391
1398
  end
@@ -22,9 +22,17 @@ class Wx::EvtHandler
22
22
  # methods; used internally by disconnect (see EvtHandler.i)
23
23
  EVENT_NAME_TYPE_MAP = {}
24
24
  private_constant :EVENT_NAME_TYPE_MAP
25
+ # Hash to look up event handler arity from symbol names of evt handler
26
+ # methods; internal use
27
+ EVENT_NAME_EVENT_ARITY_MAP = {}
28
+ private_constant :EVENT_NAME_EVENT_ARITY_MAP
25
29
 
26
30
  class << self
27
31
 
32
+ def event_type_arity(name)
33
+ EVENT_NAME_EVENT_ARITY_MAP[name.to_sym] || 0
34
+ end
35
+
28
36
  def get_event_type_class_map
29
37
  EVENT_TYPE_CLASS_MAP
30
38
  end
@@ -79,8 +87,8 @@ class Wx::EvtHandler
79
87
 
80
88
  # Given the Integer constant Wx::EVT_XXX, returns the convenience
81
89
  # handler method name associated with that type of event.
82
- def self.event_name_for_type(name)
83
- EVENT_NAME_TYPE_MAP.key(name)
90
+ def self.event_name_for_type(evt_id)
91
+ EVENT_NAME_TYPE_MAP.key(evt_id)
84
92
  end
85
93
 
86
94
  # Given an integer value +int_val+, returns the name of the EVT_xxx
@@ -121,6 +129,8 @@ class Wx::EvtHandler
121
129
  return
122
130
  end
123
131
 
132
+ EVENT_NAME_EVENT_ARITY_MAP[ev_type.name.to_sym] = ev_type.arity
133
+
124
134
  # set up the evt_xxx method
125
135
  case ev_type.arity
126
136
  when 0 # events without an id
data/lib/wx/core/font.rb CHANGED
@@ -1,22 +1,30 @@
1
1
 
2
2
  require_relative './font/encoding'
3
3
 
4
- class Wx::Font
5
- class << self
6
- # Returns the name of the platform's default font encoding
7
- def get_default_encoding_name
8
- ENCODING_NAMES[ get_default_encoding ]
9
- end
4
+ module Wx
5
+
6
+ class Font
7
+ class << self
8
+ # Returns the name of the platform's default font encoding
9
+ def get_default_encoding_name
10
+ ENCODING_NAMES[ get_default_encoding ]
11
+ end
10
12
 
11
- # Sets the default encoding to be +enc+, which may be the string
12
- # name of an encoding (eg 'UTF8') or an internal WxWidgets flag
13
- # (eg Wx::FONTENCODING_UTF8).
14
- def set_default_encoding_name(enc)
15
- if flag_int = ENCODING_NAMES.index(enc.upcase)
16
- set_default_encoding(Wx::FontEncoding.new(flag_int))
17
- else
18
- raise ArgumentError, "Unknown font encoding name '#{enc}'"
13
+ # Sets the default encoding to be +enc+, which may be the string
14
+ # name of an encoding (eg 'UTF8') or an internal WxWidgets flag
15
+ # (eg Wx::FONTENCODING_UTF8).
16
+ def set_default_encoding_name(enc)
17
+ if flag_int = ENCODING_NAMES.index(enc.upcase)
18
+ set_default_encoding(Wx::FontEncoding.new(flag_int))
19
+ else
20
+ raise ArgumentError, "Unknown font encoding name '#{enc}'"
21
+ end
19
22
  end
20
23
  end
21
24
  end
25
+
26
+ # make this simply an alias for the Font class so the #find_or_create_font methods
27
+ # can be accessed through that name too.
28
+ TheFontList = Font
29
+
22
30
  end
@@ -6,9 +6,9 @@ class Wx::HelpProvider
6
6
  # SWIG Director; it can't be reaped and re-wrapped later. The
7
7
  # easiest way is to make the currently set one an instance variable
8
8
  # of this class
9
- alias :__wx_set :set
9
+ wx_set = instance_method :set
10
10
  define_method(:set) do | help_provider |
11
- __wx_set(help_provider)
11
+ wx_set.bind(self).call(help_provider)
12
12
  @__hp__ = help_provider
13
13
  end
14
14
  end
data/lib/wx/core/menu.rb CHANGED
@@ -75,4 +75,9 @@ class Wx::Menu
75
75
  methods_with_optional_ids_and_pos :insert,
76
76
  :insert_check_item,
77
77
  :insert_radio_item
78
+
79
+ # wxRuby2 backward compatibility version; no alias as #append has been altered above
80
+ def append_item(*args)
81
+ append(*args)
82
+ end
78
83
  end
@@ -0,0 +1,6 @@
1
+
2
+ module Wx
3
+
4
+ ThePenList = Wx::Pen
5
+
6
+ end
@@ -1,5 +1,6 @@
1
1
  # Copyright 2004-2007 by Kevin Smith
2
- # released under the MIT-style wxruby2 license
2
+ # Copyright 2022 by Martin Corino
3
+ # released under the MIT(-style) wxruby2/3 license
3
4
 
4
5
  # The base class for all things displayed on screen
5
6
  class Wx::Window
@@ -69,4 +70,30 @@ class Wx::Window
69
70
  self.paint(&block)
70
71
  end
71
72
  end
73
+
74
+ # implement non-static variants of these
75
+
76
+ def from_dip(*args)
77
+ Wx::Window.from_dip(*args, self)
78
+ end
79
+ def to_dip(*args)
80
+ Wx::Window.to_dip(*args, self)
81
+ end
82
+
83
+ def from_phys(*args)
84
+ Wx::Window.from_phys(*args, self)
85
+ end
86
+ def to_phys(*args)
87
+ Wx::Window.to_phys(*args, self)
88
+ end
89
+
90
+ # implement Window update locker
91
+ def locked(&block)
92
+ self.freeze
93
+ begin
94
+ block.call if block_given?
95
+ ensure
96
+ self.thaw
97
+ end
98
+ end
72
99
  end
data/lib/wx/doc/app.rb ADDED
@@ -0,0 +1,40 @@
1
+
2
+ class Wx::App
3
+
4
+ # Set the menu item id for the About menu item.
5
+ # Default is {Wx::ID_ABOUT}
6
+ # @param [Integer] id
7
+ def set_mac_about_menu_itemid(id) end
8
+ alias :mac_about_menu_itemid= :set_mac_about_menu_itemid
9
+
10
+ # Get the current menu item id for the About menu item.
11
+ # Default is {Wx::ID_ABOUT}
12
+ # @return [Integer]
13
+ def get_mac_about_menu_itemid(id) end
14
+ alias :mac_about_menu_itemid :get_mac_about_menu_itemid
15
+
16
+ # Set the menu item id for the Preferences menu item.
17
+ # Default is {Wx::ID_PREFERENCES}
18
+ # @param [Integer] id
19
+ def set_mac_preferences_menu_itemid(id) end
20
+ alias :mac_preferences_menu_itemid= :set_mac_preferences_menu_itemid
21
+
22
+ # Get the current menu item id for the Preferences menu item.
23
+ # Default is {Wx::ID_PREFERENCES}
24
+ # @return [Integer]
25
+ def get_mac_preferences_menu_itemid(id) end
26
+ alias :mac_preferences_menu_itemid :get_mac_preferences_menu_itemid
27
+
28
+ # Set the menu item id for the Exit menu item.
29
+ # Default is {Wx::ID_EXIT}
30
+ # @param [Integer] id
31
+ def set_mac_exit_menu_itemid(id) end
32
+ alias :mac_exit_menu_itemid= :set_mac_exit_menu_itemid
33
+
34
+ # Get the current menu item id for the Exit menu item.
35
+ # Default is {Wx::ID_EXIT}
36
+ # @return [Integer]
37
+ def get_mac_exit_menu_itemid(id) end
38
+ alias :mac_exit_menu_itemid :get_mac_exit_menu_itemid
39
+
40
+ end
@@ -0,0 +1,17 @@
1
+
2
+ module Wx
3
+
4
+ class Brush
5
+
6
+ # Finds a brush with the specified attributes in the global list and returns it, else creates a new brush, adds it to the global brush list, and returns it.
7
+ # @param [Wx::Colour,String,Symbol] colour The Brush colour.
8
+ # @param [Wx::BrushStyle] style The brush style. See {Wx::BrushStyle} for a list of the styles.
9
+ # @return [Wx::Brush]
10
+ def self.find_or_create_brush(colour, style=Wx::BrushStyle::BRUSHSTYLE_SOLID) end
11
+
12
+ end
13
+
14
+ # In wxRuby this is simply an alias for the Brush class.
15
+ TheBrushList = Wx::Brush
16
+
17
+ end
@@ -0,0 +1,27 @@
1
+
2
+ class Wx
3
+ class Font
4
+
5
+ # @overload find_or_create_font(point_size, family, style, weight, underline=false, facename='', encoding=Wx::FontEncoding::FONTENCODING_DEFAULT)
6
+ # Finds a font of the given specification in the global font list, or creates one and adds it to the list.
7
+ # @param [Integer] point_size Size in points. See {Wx::Font#set_point_size} for more info.
8
+ # @param [Wx::FontFamily] family The font family: a generic portable way of referring to fonts without specifying a facename.
9
+ # @param [Wx::FontStyle] style One of {Wx::FontStyle::FONTSTYLE_NORMAL}, {Wx::FontStyle::FONTSTYLE_SLANT} and {Wx::FontStyle::FONTSTYLE_ITALIC}.
10
+ # @param [Wx::FontWeight] weight Font weight, sometimes also referred to as font boldness. One of the {Wx::FontWeight} enumeration values.
11
+ # @param [Boolean] underline The value can be true or false.
12
+ # @param [String] facename An optional string specifying the face name to be used. If it is an empty string, a default face name will be chosen based on the family.
13
+ # @param [Wx::FontEncoding] encoding An encoding which may be one of the enumeration values of {Wx::FontEncoding}. If the specified encoding isn't available, no font is created (see also Font Encodings).
14
+ # @return [Wx::Font]
15
+ # @see Wx::Font#initialize
16
+ # @overload find_or_create_font(font_info)
17
+ # Finds a font of the given specification in the global font list, or creates one and adds it to the list.
18
+ # @param [Wx::FontInfo] font_info
19
+ # @return [Wx::Font]
20
+ def self.find_or_create_font(*args) end
21
+
22
+ end
23
+
24
+ # In wxRuby this is simply an alias for the Font class.
25
+ TheFontList = Font
26
+
27
+ end
@@ -0,0 +1,65 @@
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
+ # Small control showing an animation indicating that the program is currently busy performing some background task.
10
+ # ===
11
+ #
12
+ # Category: {Wx::Controls} <div class='appearance'><span class='appearance'>Appearance:</span><table><tr><td> {Wx::MSW} Appearance
13
+ # </td><td> {Wx::GTK} Appearance
14
+ # </td><td> {Wx::OSX} Appearance
15
+ # </td></tr></table></div>
16
+ #
17
+ class ActivityIndicator < Control
18
+
19
+ # @overload initialize()
20
+ # Default constructor.
21
+ # Use {Wx::ActivityIndicator#create} to really create the control after using this constructor.
22
+ # @return [ActivityIndicator]
23
+ # @overload initialize(parent, winid=Wx::StandardID::ID_ANY, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0, name=("activityindicator"))
24
+ # Constructor fully creating the control.
25
+ # The arguments have the usual meanings and only parent is typically required.
26
+ # @param parent [Wx::Window]
27
+ # @param winid [Integer]
28
+ # @param pos [Array(Integer, Integer), Wx::Point]
29
+ # @param size [Array(Integer, Integer), Wx::Size]
30
+ # @param style [Integer]
31
+ # @param name [String]
32
+ # @return [ActivityIndicator]
33
+ def initialize(*args) end
34
+
35
+ # Create the control initialized using the default constructor.
36
+ # This method can be used to finish the control creation if it hadn't been done already by using the non-default constructor.
37
+ # @param parent [Wx::Window]
38
+ # @param winid [Integer]
39
+ # @param pos [Array(Integer, Integer), Wx::Point]
40
+ # @param size [Array(Integer, Integer), Wx::Size]
41
+ # @param style [Integer]
42
+ # @param name [String]
43
+ # @return [true,false]
44
+ def create(parent, winid=Wx::StandardID::ID_ANY, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0, name=("activityindicator")) end
45
+
46
+ # Starts animation of the indicator.
47
+ # Does nothing if the indicator is already running.
48
+ # @return [void]
49
+ def start; end
50
+
51
+ # Stops the animation of the indicator.
52
+ # Notice that the animation is stopped even if {Wx::ActivityIndicator#start} had been called multiple times before, i.e. the calls are not cumulative.
53
+ # @return [void]
54
+ def stop; end
55
+
56
+ # Returns true if the control is currently showing activity.
57
+ # Returns false initially, true once {Wx::ActivityIndicator#start} is called and false again after calling {Wx::ActivityIndicator#stop}.
58
+ # @return [true,false]
59
+ def is_running; end
60
+ alias_method :running?, :is_running
61
+
62
+ end # ActivityIndicator
63
+
64
+
65
+ end
@@ -415,8 +415,8 @@ module Wx::AUI
415
415
  # If there are custom items set, then the overflow menu will be displayed even if there are no items from the main toolbar that overflow.
416
416
  #
417
417
  # The toolbar must have the {Wx::AUI::AuiToolBarStyle::AUI_TB_OVERFLOW} style.
418
- # @param prepend [Wx::AuiToolBarItemArray] are the items to show before any overflow items
419
- # @param append [Wx::AuiToolBarItemArray] are the items to show after any overflow items
418
+ # @param prepend [Array<Wx::AUI::AuiToolbarItem>,nil] are the items to show before any overflow items
419
+ # @param append [Array<Wx::AUI::AuiToolbarItem>,nil] are the items to show after any overflow items
420
420
  # @return [void]
421
421
  def set_custom_overflow_items(prepend, append) end
422
422