wxruby3 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/INSTALL.md +2 -2
- data/README.md +3 -3
- data/ext/wxruby3/swig/mark_free_impl.i +2 -0
- data/lib/wx/core/variant.rb +6 -0
- data/lib/wx/doc/pg/pg_property.rb +5 -0
- data/lib/wx/doc/variant.rb +30 -0
- data/lib/wx/pg/pg_property.rb +60 -53
- data/lib/wx/pg/property_grid_interface.rb +10 -0
- data/lib/wx/version.rb +1 -1
- data/rakelib/gem.rake +83 -66
- data/rakelib/gem.rb +4 -20
- data/rakelib/lib/config.rb +3 -3
- data/rakelib/lib/core/spec.rb +1 -1
- data/rakelib/lib/director/bitmap_combobox.rb +4 -2
- data/rakelib/lib/director/html_listbox.rb +16 -3
- data/rakelib/lib/director/hvscrolled.rb +253 -0
- data/rakelib/lib/director/persistent_window.rb +16 -0
- data/rakelib/lib/director/pgproperty.rb +3 -2
- data/rakelib/lib/director/richtext_style_listbox.rb +8 -2
- data/rakelib/lib/director/top_level_window.rb +0 -1
- data/rakelib/lib/director/utils.rb +3 -1
- data/rakelib/lib/director/variant.rb +28 -0
- data/rakelib/lib/director/vlistbox.rb +5 -1
- data/rakelib/lib/director/window.rb +2 -1
- data/rakelib/lib/specs/interfaces.rb +3 -1
- data/rakelib/lib/swig_runner.rb +2 -2
- data/tests/test_propgrid.rb +857 -0
- metadata +4 -3
- data/rakelib/lib/director/hvscrolled_window.rb +0 -140
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25ead08d281891ae9ad295a8181908c163677a4b9e0686249185941866118d49
|
4
|
+
data.tar.gz: 552bef0440f00907f30b273411dbfed19b8430bfbf49538efac2cd6104e6021b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 598918c1e5d613797115ede72de7cc8024bf6468ee81a51b567297c153df12da11390740fca827b67c15dae9e2e874b38969088bf27e808b644fc810abb1a6c0
|
7
|
+
data.tar.gz: bf26ee5eebeef682e88831df0a0bb7b260138e4cae2c6f41425a327133c7f60fce0b5897bb722b5eb05acbdbefa92fb6e860235d2942cd0e35ef42919ca2354d
|
data/INSTALL.md
CHANGED
@@ -73,7 +73,7 @@ The following tables lists the packages provided by the current wxRuby3 release
|
|
73
73
|
|
74
74
|
| OS | Distributions | Architectures | Rubies |
|
75
75
|
|---------|----------------------------------------|-------------------------|----------------------------------------------------|
|
76
|
-
| Linux | OpenSuSE Leap (at least latest stable) | x86_64 <b>and</b> ARM64 |
|
76
|
+
| Linux | OpenSuSE Leap (at least latest stable) | x86_64 <b>and</b> ARM64 | Latest stable Ruby |
|
77
77
|
| Linux | Fedora (at least latest stable) | x86_64 <b>and</b> ARM64 | Distro provided Ruby <b>and</b> Latest stable Ruby |
|
78
78
|
| Linux | Debian (at least latest stable) | x86_64 <b>and</b> ARM64 | Distro provided Ruby <b>and</b> Latest stable Ruby |
|
79
79
|
| Linux | Ubuntu (at least latest stable) | x86_64 <b>and</b> ARM64 | Distro provided Ruby <b>and</b> Latest stable Ruby |
|
@@ -101,7 +101,7 @@ The software requirements for setting up a wxRuby3 runtime environment are:
|
|
101
101
|
|
102
102
|
| Sofware | Notes |
|
103
103
|
|-----------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
104
|
-
| Ruby
|
104
|
+
| Ruby >= 2.7 | A supported version of the Ruby interpreter needs to be installed. This is an absolute requirement for any installation as one cannot install gems without Ruby and building from source requires Ruby to drive the build process. |
|
105
105
|
| C++ compiler<br>(incl. dev tools like `make`) | Required for a source based installation to build wxWidgets (optionally) and the wxRuby extension libraries.<br/>On linux a recent version of the GNU C++ compiler (with c++-14 support) is required.<br>On Windows the RubyInstaller MSYS2-Devkit would be required.<br>On MacOS XCode with commandline tools would be required. |
|
106
106
|
| Git version control toolkit | Required for a source based installation in to (possibly) clone a copy of the wxWidgets Github repository or to clone the Github repository of wxRuby3 itself for a fully source based installation. |
|
107
107
|
| Doxygen (>= 1.9.1) | Required for building the wxRuby3 extension libraries for a source based installation. [**1**] |
|
data/README.md
CHANGED
@@ -101,9 +101,9 @@ Currently the following are fully supported:
|
|
101
101
|
|
102
102
|
| Platform | Ruby version(s) | wxWidgets version(s) |
|
103
103
|
|------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|----------------------|
|
104
|
-
| Windows >= 10 | Ruby >= 2.
|
105
|
-
| Linux (tested; all major AMD64 and ARM64 distributions: Ubuntu, Debian, Fedora, OpenSuSE and ArchLinux)<br>(most likely also i686) | Ruby >= 2.
|
106
|
-
| MacOS >= 10.10 using Cocoa (tested on AMD64 and ARM64 M1/M2 Chip) | Ruby >= 2.
|
104
|
+
| Windows >= 10 | Ruby >= 2.7<br>(RubyInstaller MSYS2-DevKit) | wxWidgets >= 3.2 |
|
105
|
+
| Linux (tested; all major AMD64 and ARM64 distributions: Ubuntu, Debian, Fedora, OpenSuSE and ArchLinux)<br>(most likely also i686) | Ruby >= 2.7 | wxWidgets >= 3.2 |
|
106
|
+
| MacOS >= 10.10 using Cocoa (tested on AMD64 and ARM64 M1/M2 Chip) | Ruby >= 2.7 (MacPorts, Homebrew, ruby-install, RVM) | wxWidgets >= 3.2 |
|
107
107
|
|
108
108
|
Support for other platforms is not being actively developed at present,
|
109
109
|
but patches are welcome. It is likely to be much simpler to get wxRuby
|
@@ -57,6 +57,8 @@ WXRUBY_EXPORT void GC_SetWindowDeleted(void *ptr)
|
|
57
57
|
while (wxevh && wxevh != wxwin)
|
58
58
|
{
|
59
59
|
wxEvtHandler* wxevh_next = wxevh->GetNextHandler();
|
60
|
+
// disable these too
|
61
|
+
wxevh->SetEvtHandlerEnabled(false);
|
60
62
|
VALUE rb_evh = SWIG_RubyInstanceFor(wxevh);
|
61
63
|
// only remove tracked Ruby instantiated handlers since others are
|
62
64
|
// handlers internally set by wxWidgets C++ code and will be removed there
|
data/lib/wx/core/variant.rb
CHANGED
@@ -40,6 +40,8 @@ module Wx
|
|
40
40
|
return "[#{each.collect { |v| v.string? ? %Q{"#{v.to_s}"} : v.to_s }.join(', ')}]"
|
41
41
|
when 'arrstring'
|
42
42
|
return array_string.to_s
|
43
|
+
when 'wxArrayInt'
|
44
|
+
return array_int.to_s
|
43
45
|
when 'wxFont'
|
44
46
|
return font.to_s
|
45
47
|
when 'wxColour'
|
@@ -97,6 +99,10 @@ module Wx
|
|
97
99
|
!null? && is_type('arrstring');
|
98
100
|
end
|
99
101
|
|
102
|
+
def array_int?
|
103
|
+
!null? && is_type('wxArrayInt');
|
104
|
+
end
|
105
|
+
|
100
106
|
def font?
|
101
107
|
!null? && is_type('wxFont');
|
102
108
|
end
|
data/lib/wx/doc/variant.rb
CHANGED
@@ -11,6 +11,28 @@ module Wx
|
|
11
11
|
|
12
12
|
include ::Enumerable
|
13
13
|
|
14
|
+
# @overload initialize(val, name=(''))
|
15
|
+
# Constructs a variant from a Array<Integer>.
|
16
|
+
# @param val [Array<Integer>]
|
17
|
+
# @param name [String]
|
18
|
+
# @return [Wx::Variant]
|
19
|
+
# @overload initialize(val, name=(''))
|
20
|
+
# Constructs a variant from a {Wx::Font}.
|
21
|
+
# @param val [Wx::Font]
|
22
|
+
# @param name [String]
|
23
|
+
# @return [Wx::Variant]
|
24
|
+
# @overload initialize(val, name=(''))
|
25
|
+
# Constructs a variant from a {Wx::Colour}.
|
26
|
+
# @param val [Wx::Colour]
|
27
|
+
# @param name [String]
|
28
|
+
# @return [Wx::Variant]
|
29
|
+
# @overload initialize(val, name=(''))
|
30
|
+
# Constructs a variant from a {Wx::ColourPropertyValue}.
|
31
|
+
# @param val [Wx::ColourPropertyValue]
|
32
|
+
# @param name [String]
|
33
|
+
# @return [Wx::Variant]
|
34
|
+
def initialize(*args) end
|
35
|
+
|
14
36
|
# When a block is given iterates all items of a variant list passing
|
15
37
|
# each item to the block.
|
16
38
|
# Returns an enumerator when no block is given.
|
@@ -68,6 +90,10 @@ module Wx
|
|
68
90
|
# @return [self]
|
69
91
|
# @overload assign(value)
|
70
92
|
# Equality test operator.
|
93
|
+
# @param value [Array<Integer>]
|
94
|
+
# @return [self]
|
95
|
+
# @overload assign(value)
|
96
|
+
# Equality test operator.
|
71
97
|
# @param value [Time,Date,DateTime]
|
72
98
|
# @return [self]
|
73
99
|
def assign(*args) end
|
@@ -135,6 +161,10 @@ module Wx
|
|
135
161
|
# @return [true,false]
|
136
162
|
def array_string?; end
|
137
163
|
|
164
|
+
# Checks if Variant contains an ArrayInt (array of integer) value (not null).
|
165
|
+
# @return [true,false]
|
166
|
+
def array_int?; end
|
167
|
+
|
138
168
|
# Checks if Variant contains a Font value (not null).
|
139
169
|
# @return [true,false]
|
140
170
|
def font?; end
|
data/lib/wx/pg/pg_property.rb
CHANGED
@@ -4,71 +4,78 @@
|
|
4
4
|
|
5
5
|
# Wx::PG::PGProperty
|
6
6
|
|
7
|
-
module Wx
|
8
|
-
|
9
|
-
NullProperty = nil
|
10
|
-
PGChoicesEmptyData = nil
|
11
|
-
|
12
|
-
PG_LABEL_STRING = '@!' unless self.const_defined?(:PG_LABEL_STRING) # disappeared >= wxWidgets 3.3.0
|
13
|
-
PG_LABEL = Wx::PG::PG_LABEL_STRING
|
14
|
-
|
15
|
-
PG_DEFAULT_IMAGE_SIZE = Wx::DEFAULT_SIZE
|
16
|
-
|
17
|
-
if Wx.at_least_wxwidgets?('3.3.0')
|
18
|
-
# backward compatibility constants
|
19
|
-
PG_FULL_VALUE = PGPropValFormatFlags::FullValue
|
20
|
-
PG_REPORT_ERROR = PGPropValFormatFlags::ReportError
|
21
|
-
PG_PROPERTY_SPECIFIC = PGPropValFormatFlags::PropertySpecific
|
22
|
-
PG_EDITABLE_VALUE = PGPropValFormatFlags::EditableValue
|
23
|
-
PG_COMPOSITE_FRAGMENT = PGPropValFormatFlags::CompositeFragment
|
24
|
-
PG_UNEDITABLE_COMPOSITE_FRAGMENT = PGPropValFormatFlags::UneditableCompositeFragment
|
25
|
-
PG_VALUE_IS_CURRENT = PGPropValFormatFlags::ValueIsCurrent
|
26
|
-
PG_PROGRAMMATIC_VALUE = PGPropValFormatFlags::ProgrammaticValue
|
27
|
-
end
|
7
|
+
module Wx
|
8
|
+
module PG
|
28
9
|
|
29
|
-
|
10
|
+
NullProperty = nil
|
11
|
+
PGChoicesEmptyData = nil
|
30
12
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
else
|
36
|
-
::Enumerator.new { |y| wx_each_attribute.bind(self).call { |variant| y << variant } }
|
37
|
-
end
|
38
|
-
end
|
13
|
+
PG_LABEL_STRING = '@!' unless self.const_defined?(:PG_LABEL_STRING) # disappeared >= wxWidgets 3.3.0
|
14
|
+
PG_LABEL = Wx::PG::PG_LABEL_STRING
|
15
|
+
|
16
|
+
PG_DEFAULT_IMAGE_SIZE = Wx::DEFAULT_SIZE
|
39
17
|
|
40
|
-
|
41
|
-
|
18
|
+
if Wx.at_least_wxwidgets?('3.3.0')
|
19
|
+
# backward compatibility constants
|
20
|
+
PG_FULL_VALUE = PGPropValFormatFlags::FullValue
|
21
|
+
PG_REPORT_ERROR = PGPropValFormatFlags::ReportError
|
22
|
+
PG_PROPERTY_SPECIFIC = PGPropValFormatFlags::PropertySpecific
|
23
|
+
PG_EDITABLE_VALUE = PGPropValFormatFlags::EditableValue
|
24
|
+
PG_COMPOSITE_FRAGMENT = PGPropValFormatFlags::CompositeFragment
|
25
|
+
PG_UNEDITABLE_COMPOSITE_FRAGMENT = PGPropValFormatFlags::UneditableCompositeFragment
|
26
|
+
PG_VALUE_IS_CURRENT = PGPropValFormatFlags::ValueIsCurrent
|
27
|
+
PG_PROGRAMMATIC_VALUE = PGPropValFormatFlags::ProgrammaticValue
|
42
28
|
end
|
43
|
-
alias :attributes :get_attributes
|
44
29
|
|
45
|
-
def
|
46
|
-
|
47
|
-
map.each_pair { |nm, v| set_attribute(nm, v) }
|
30
|
+
def self.PG_IT_CHILDREN(mask)
|
31
|
+
mask << 16
|
48
32
|
end
|
49
|
-
alias :attributes= :set_attributes
|
50
|
-
end
|
51
33
|
|
52
|
-
|
34
|
+
class PGProperty
|
35
|
+
|
36
|
+
wx_each_attribute = instance_method :each_attribute
|
37
|
+
wx_redefine_method :each_attribute do
|
38
|
+
if block_given?
|
39
|
+
wx_each_attribute.bind(self).call
|
40
|
+
else
|
41
|
+
::Enumerator.new { |y| wx_each_attribute.bind(self).call { |variant| y << variant } }
|
42
|
+
end
|
43
|
+
end
|
53
44
|
|
54
|
-
|
55
|
-
|
56
|
-
if block_given?
|
57
|
-
wx_each_label.bind(self).call
|
58
|
-
else
|
59
|
-
::Enumerator.new { |y| wx_each_label.bind(self).call { |lbl| y << lbl } }
|
45
|
+
def get_attributes
|
46
|
+
each_attribute.inject({}) { |map, v| map[v.name] = v; map }
|
60
47
|
end
|
48
|
+
alias :attributes :get_attributes
|
49
|
+
|
50
|
+
def set_attributes(map)
|
51
|
+
raise ArgumentError, 'Expected Hash' unless map.is_a?(::Hash)
|
52
|
+
map.each_pair { |nm, v| set_attribute(nm, v) }
|
53
|
+
end
|
54
|
+
alias :attributes= :set_attributes
|
61
55
|
end
|
62
56
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
57
|
+
class PGChoices
|
58
|
+
|
59
|
+
wx_each_label = instance_method :each_label
|
60
|
+
wx_redefine_method :each_label do
|
61
|
+
if block_given?
|
62
|
+
wx_each_label.bind(self).call
|
63
|
+
else
|
64
|
+
::Enumerator.new { |y| wx_each_label.bind(self).call { |lbl| y << lbl } }
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
wx_each_entry = instance_method :each_entry
|
69
|
+
wx_redefine_method :each_entry do
|
70
|
+
if block_given?
|
71
|
+
wx_each_entry.bind(self).call
|
72
|
+
else
|
73
|
+
::Enumerator.new { |y| wx_each_entry.bind(self).call { |entry| y << entry } }
|
74
|
+
end
|
69
75
|
end
|
76
|
+
|
70
77
|
end
|
71
|
-
|
78
|
+
|
72
79
|
end
|
73
|
-
|
80
|
+
|
74
81
|
end
|
@@ -19,6 +19,16 @@ module Wx::PG
|
|
19
19
|
|
20
20
|
module PropertyGridInterface
|
21
21
|
|
22
|
+
wx_set_property_value = instance_method :set_property_value
|
23
|
+
wx_redefine_method :set_property_value do |propid, value|
|
24
|
+
case value
|
25
|
+
when ::String
|
26
|
+
set_property_value_string(propid, value)
|
27
|
+
else
|
28
|
+
wx_set_property_value.bind(self).call(propid, value)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
22
32
|
wx_each_property = instance_method :each_property
|
23
33
|
wx_redefine_method :each_property do |flags = Wx::PG::PG_ITERATE_DEFAULT, start = nil, reverse: false, &block|
|
24
34
|
if block
|
data/lib/wx/version.rb
CHANGED
data/rakelib/gem.rake
CHANGED
@@ -12,6 +12,8 @@ namespace :wxruby do
|
|
12
12
|
|
13
13
|
namespace :gem do
|
14
14
|
|
15
|
+
task :srcgemspec => ['bin:build', WXRuby3::Gem.gemspec_file]
|
16
|
+
|
15
17
|
task :srcgem => ['bin:build', WXRuby3::Gem.gem_file]
|
16
18
|
|
17
19
|
# this task only exists for installed (source) gems (where run tasks have been removed)
|
@@ -60,72 +62,87 @@ namespace :wxruby do
|
|
60
62
|
|
61
63
|
end
|
62
64
|
|
65
|
+
file WXRuby3::Gem.gemspec_file => WXRuby3::Gem.manifest do |t|
|
66
|
+
code = <<~__GEMSPEC
|
67
|
+
Gem::Specification.new('wxruby3', '#{WXRuby3::WXRUBY_VERSION}') do |gem|
|
68
|
+
gem.summary = %Q{wxWidgets extension for Ruby}
|
69
|
+
gem.description = %Q{wxRuby3 is a Ruby library providing an extension for the wxWidgets C++ UI framework}
|
70
|
+
gem.email = 'mcorino@m2c-software.nl'
|
71
|
+
gem.homepage = "https://github.com/mcorino/wxRuby3"
|
72
|
+
gem.authors = ['Martin Corino']
|
73
|
+
gem.extensions = ['ext/mkrf_conf_ext.rb']
|
74
|
+
gem.files = [#{WXRuby3::Gem.manifest.collect {|f| "'#{f}'" }.join(',')}]
|
75
|
+
gem.require_paths = %w{lib}
|
76
|
+
gem.bindir = 'bin'
|
77
|
+
gem.executables = [#{WXRuby3::Bin.binaries.collect { |b| "'#{b}'" }.join(',')}]
|
78
|
+
gem.required_ruby_version = '>= 2.5'
|
79
|
+
gem.licenses = ['MIT']
|
80
|
+
gem.add_dependency 'nokogiri', '~> 1.12'
|
81
|
+
gem.add_dependency 'rake'
|
82
|
+
gem.add_dependency 'minitest', '~> 5.15'
|
83
|
+
gem.add_dependency 'test-unit', '~> 3.5'
|
84
|
+
gem.add_dependency 'plat4m', '~> 1.1'
|
85
|
+
gem.rdoc_options <<
|
86
|
+
'--exclude=\\.dll' <<
|
87
|
+
'--exclude=\\.so' <<
|
88
|
+
'--exclude=lib/wx.rb' <<
|
89
|
+
'--exclude=lib/wx/*.rb' <<
|
90
|
+
"'--exclude=lib/wx/(aui|core|grid|html|pg|prt|rbn|rtc|stc|wxruby)/.*'"
|
91
|
+
gem.metadata = {
|
92
|
+
"bug_tracker_uri" => "https://github.com/mcorino/wxRuby3/issues",
|
93
|
+
"homepage_uri" => "https://github.com/mcorino/wxRuby3/wiki",
|
94
|
+
"source_code_uri" => "https://github.com/mcorino/wxRuby3",
|
95
|
+
"documentation_uri" => "https://mcorino.github.io/wxRuby3",
|
96
|
+
"github_repo" => "https://github.com/mcorino/wxRuby3"
|
97
|
+
}
|
98
|
+
gem.post_install_message = <<~__MSG
|
99
|
+
|
100
|
+
The wxRuby3 Gem has been successfully installed including the 'wxruby' utility.
|
101
|
+
|
102
|
+
In case no suitable binary release package was available for your platform you
|
103
|
+
will need to run the post-install setup process by executing:
|
104
|
+
|
105
|
+
$ wxruby setup
|
106
|
+
|
107
|
+
To check whether wxRuby3 is ready to run or not you can at any time execute the
|
108
|
+
following command:
|
109
|
+
|
110
|
+
$ wxruby check
|
111
|
+
|
112
|
+
Run 'wxruby check -h' for more information.
|
113
|
+
|
114
|
+
When the wxRuby3 setup has been fully completed you can start using wxRuby3.
|
115
|
+
|
116
|
+
You can run the regression tests to verify the installation by executing:
|
117
|
+
|
118
|
+
$ wxruby test
|
119
|
+
|
120
|
+
The wxRuby3 sample explorer can be run by executing:
|
121
|
+
|
122
|
+
$ wxruby sampler
|
123
|
+
|
124
|
+
Have fun using wxRuby3.
|
125
|
+
|
126
|
+
Run 'wxruby -h' to see information on the available commands.
|
127
|
+
|
128
|
+
__MSG
|
129
|
+
gem.required_rubygems_version = '>= 0' if gem.respond_to? :required_rubygems_version=
|
130
|
+
end
|
131
|
+
__GEMSPEC
|
132
|
+
File.open(t.name, 'w') { |f| f.puts code }
|
133
|
+
end
|
134
|
+
|
135
|
+
|
136
|
+
CLOBBER.include WXRuby3::Gem.gemspec_file
|
137
|
+
|
138
|
+
desc 'Build wxRuby 3 gemspec'
|
139
|
+
task :gemspec => 'wxruby:gem:srcgemspec'
|
140
|
+
|
141
|
+
directory 'pkg'
|
142
|
+
|
63
143
|
# source gem file
|
64
|
-
file WXRuby3::Gem.gem_file =>
|
65
|
-
|
66
|
-
gem.summary = %Q{wxWidgets extension for Ruby}
|
67
|
-
gem.description = %Q{wxRuby3 is a Ruby library providing an extension for the wxWidgets C++ UI framework}
|
68
|
-
gem.email = 'mcorino@m2c-software.nl'
|
69
|
-
gem.homepage = "https://github.com/mcorino/wxRuby3"
|
70
|
-
gem.authors = ['Martin Corino']
|
71
|
-
gem.extensions = ['ext/mkrf_conf_ext.rb']
|
72
|
-
gem.files = WXRuby3::Gem.manifest
|
73
|
-
gem.require_paths = %w{lib}
|
74
|
-
gem.bindir = 'bin'
|
75
|
-
gem.executables = WXRuby3::Bin.binaries
|
76
|
-
gem.required_ruby_version = '>= 2.5'
|
77
|
-
gem.licenses = ['MIT']
|
78
|
-
gem.add_dependency 'nokogiri', '~> 1.12'
|
79
|
-
gem.add_dependency 'rake'
|
80
|
-
gem.add_dependency 'minitest', '~> 5.15'
|
81
|
-
gem.add_dependency 'test-unit', '~> 3.5'
|
82
|
-
gem.add_dependency 'plat4m', '~> 1.1'
|
83
|
-
gem.rdoc_options <<
|
84
|
-
'--exclude=\\.dll' <<
|
85
|
-
'--exclude=\\.so' <<
|
86
|
-
'--exclude=lib/wx.rb' <<
|
87
|
-
'--exclude=lib/wx/*.rb' <<
|
88
|
-
"'--exclude=lib/wx/(aui|core|grid|html|pg|prt|rbn|rtc|stc|wxruby)/.*'"
|
89
|
-
gem.metadata = {
|
90
|
-
"bug_tracker_uri" => "https://github.com/mcorino/wxRuby3/issues",
|
91
|
-
"homepage_uri" => "https://github.com/mcorino/wxRuby3/wiki",
|
92
|
-
"source_code_uri" => "https://github.com/mcorino/wxRuby3",
|
93
|
-
"documentation_uri" => "https://mcorino.github.io/wxRuby3",
|
94
|
-
"github_repo" => "https://github.com/mcorino/wxRuby3"
|
95
|
-
}
|
96
|
-
gem.post_install_message = <<~__MSG
|
97
|
-
|
98
|
-
The wxRuby3 Gem has been successfully installed including the 'wxruby' utility.
|
99
|
-
|
100
|
-
In case no suitable binary release package was available for your platform you
|
101
|
-
will need to run the post-install setup process by executing:
|
102
|
-
|
103
|
-
$ wxruby setup
|
104
|
-
|
105
|
-
To check whether wxRuby3 is ready to run or not you can at any time execute the
|
106
|
-
following command:
|
107
|
-
|
108
|
-
$ wxruby check
|
109
|
-
|
110
|
-
Run 'wxruby check -h' for more information.
|
111
|
-
|
112
|
-
When the wxRuby3 setup has been fully completed you can start using wxRuby3.
|
113
|
-
|
114
|
-
You can run the regression tests to verify the installation by executing:
|
115
|
-
|
116
|
-
$ wxruby test
|
117
|
-
|
118
|
-
The wxRuby3 sample explorer can be run by executing:
|
119
|
-
|
120
|
-
$ wxruby sampler
|
121
|
-
|
122
|
-
Have fun using wxRuby3.
|
123
|
-
|
124
|
-
Run 'wxruby -h' to see information on the available commands.
|
125
|
-
|
126
|
-
__MSG
|
127
|
-
end
|
128
|
-
WXRuby3::Gem.build_gem(gemspec)
|
144
|
+
file WXRuby3::Gem.gem_file => ['wxruby:gem:srcgemspec', 'pkg'] do
|
145
|
+
WXRuby3.config.sh "gem build #{WXRuby3::Gem.gemspec_file} -o #{WXRuby3::Gem.gem_file}"
|
129
146
|
end
|
130
147
|
|
131
148
|
desc 'Build wxRuby 3 gem'
|
@@ -145,7 +162,7 @@ if File.file?(File.join(__dir__, 'run.rake'))
|
|
145
162
|
end
|
146
163
|
|
147
164
|
# binary package file
|
148
|
-
file WXRuby3::Gem.bin_pkg_file => WXRuby3::Gem.bin_pkg_manifest do |t|
|
165
|
+
file WXRuby3::Gem.bin_pkg_file => [*WXRuby3::Gem.bin_pkg_manifest, 'pkg'] do |t|
|
149
166
|
WXRuby3::Install.install_wxwin_shlibs
|
150
167
|
begin
|
151
168
|
# create bin package
|
data/rakelib/gem.rb
CHANGED
@@ -8,11 +8,6 @@
|
|
8
8
|
|
9
9
|
require 'set'
|
10
10
|
require 'rubygems'
|
11
|
-
require 'rubygems/package'
|
12
|
-
begin
|
13
|
-
require 'rubygems/builder'
|
14
|
-
rescue LoadError
|
15
|
-
end
|
16
11
|
require 'zlib'
|
17
12
|
require 'tempfile'
|
18
13
|
require 'json'
|
@@ -62,20 +57,12 @@ module WXRuby3
|
|
62
57
|
end
|
63
58
|
private :gem_name
|
64
59
|
|
65
|
-
def
|
66
|
-
|
60
|
+
def gemspec_file
|
61
|
+
"#{gem_name}.gemspec"
|
67
62
|
end
|
68
63
|
|
69
|
-
def
|
70
|
-
|
71
|
-
gem_file_name = ::Gem::Package.build(gemspec)
|
72
|
-
else
|
73
|
-
gem_file_name = ::Gem::Builder.new(gemspec).build
|
74
|
-
end
|
75
|
-
|
76
|
-
FileUtils.mkdir_p('pkg')
|
77
|
-
|
78
|
-
FileUtils.mv(gem_file_name, 'pkg')
|
64
|
+
def gem_file
|
65
|
+
File.join('pkg', "#{gem_name}.gem")
|
79
66
|
end
|
80
67
|
|
81
68
|
# Binary package helpers
|
@@ -122,9 +109,6 @@ module WXRuby3
|
|
122
109
|
end
|
123
110
|
|
124
111
|
def build_bin_pkg
|
125
|
-
# make sure pkg directory exists
|
126
|
-
FileUtils.mkdir_p('pkg')
|
127
|
-
|
128
112
|
fname = bin_pkg_file
|
129
113
|
|
130
114
|
# package registry and essential config
|
data/rakelib/lib/config.rb
CHANGED
@@ -83,10 +83,10 @@ module WXRuby3
|
|
83
83
|
CONFIG['autoinstall'] = (ENV['WXRUBY_AUTOINSTALL'] != '0') if ENV['WXRUBY_AUTOINSTALL']
|
84
84
|
BUILD_CFG = '.wxconfig'
|
85
85
|
|
86
|
-
# Ruby 2.
|
86
|
+
# Ruby 2.7 is the minimum version for wxRuby3
|
87
87
|
__rb_ver = RUBY_VERSION.split('.').collect {|v| v.to_i}
|
88
|
-
if (__rb_major = __rb_ver.shift) < 2 || (__rb_major == 2 && __rb_ver.shift <
|
89
|
-
$stderr.puts 'ERROR: wxRuby3 requires Ruby >= 2.
|
88
|
+
if (__rb_major = __rb_ver.shift) < 2 || (__rb_major == 2 && __rb_ver.shift < 7)
|
89
|
+
$stderr.puts 'ERROR: wxRuby3 requires Ruby >= 2.7.0!'
|
90
90
|
exit(1)
|
91
91
|
end
|
92
92
|
|
data/rakelib/lib/core/spec.rb
CHANGED
@@ -24,8 +24,10 @@ module WXRuby3
|
|
24
24
|
wxWindow
|
25
25
|
wxEvtHandler
|
26
26
|
wxObject])
|
27
|
-
|
28
|
-
|
27
|
+
if Config.instance.wx_version_check('3.3.0') <= 0
|
28
|
+
spec.ignore 'wxBitmapComboBox::Insert(const wxString &, const wxBitmap &, unsigned int, void *)',
|
29
|
+
'wxBitmapComboBox::Append(const wxString &, const wxBitmap &, void *)'
|
30
|
+
end
|
29
31
|
spec.map_apply 'long * OUTPUT' => [ 'long *from', 'long *to' ]
|
30
32
|
end
|
31
33
|
|
@@ -19,7 +19,11 @@ module WXRuby3
|
|
19
19
|
def setup
|
20
20
|
spec.items << 'wxSimpleHtmlListBox' << 'wxItemContainer'
|
21
21
|
super
|
22
|
-
|
22
|
+
if Config.instance.wx_version_check('3.3.0') > 0
|
23
|
+
spec.override_inheritance_chain('wxHtmlListBox', ['wxVListBox', 'wxVScrolledWindow', 'wxPanel', 'wxWindow', 'wxEvtHandler', 'wxObject'])
|
24
|
+
else
|
25
|
+
spec.override_inheritance_chain('wxHtmlListBox', ['wxVListBox', { 'wxVScrolledWindow' => 'wxHScrolledWindow' }, 'wxPanel', 'wxWindow', 'wxEvtHandler', 'wxObject'])
|
26
|
+
end
|
23
27
|
spec.make_abstract 'wxHtmlListBox'
|
24
28
|
# provide base implementation for OnGetItem
|
25
29
|
spec.add_header_code <<~__HEREDOC
|
@@ -62,10 +66,16 @@ module WXRuby3
|
|
62
66
|
'virtual void OnDrawBackground(wxDC &dc, const wxRect &rect, size_t n) const',
|
63
67
|
'virtual void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n) const',
|
64
68
|
visibility: 'protected'
|
65
|
-
|
69
|
+
# optimize; no need for these virtuals here
|
70
|
+
spec.no_proxy 'wxHtmlListBox::OnGetRowHeight',
|
71
|
+
'wxHtmlListBox::OnGetRowsHeightHint'
|
66
72
|
|
67
73
|
# override inheritance chain
|
68
|
-
|
74
|
+
if Config.instance.wx_version_check('3.3.0') > 0
|
75
|
+
spec.override_inheritance_chain('wxSimpleHtmlListBox', ['wxHtmlListBox', 'wxVListBox', 'wxVScrolledWindow', 'wxPanel', 'wxWindow', 'wxEvtHandler', 'wxObject'])
|
76
|
+
else
|
77
|
+
spec.override_inheritance_chain('wxSimpleHtmlListBox', ['wxHtmlListBox', 'wxVListBox', { 'wxVScrolledWindow' => 'wxHScrolledWindow' }, 'wxPanel', 'wxWindow', 'wxEvtHandler', 'wxObject'])
|
78
|
+
end
|
69
79
|
spec.fold_bases('wxSimpleHtmlListBox' => %w[wxItemContainer])
|
70
80
|
# override SWIG's confusion
|
71
81
|
spec.make_concrete 'wxSimpleHtmlListBox'
|
@@ -100,6 +110,9 @@ module WXRuby3
|
|
100
110
|
'wxItemContainer::Append(const wxArrayString &, wxClientData **)',
|
101
111
|
'wxItemContainer::Insert(const wxArrayString &, unsigned int, wxClientData **)',
|
102
112
|
'wxItemContainer::Set(const wxArrayString &, wxClientData **)'], ignore_doc: false)
|
113
|
+
# optimize; no need for these virtuals here
|
114
|
+
spec.no_proxy 'wxSimpleHtmlListBox::OnGetRowHeight',
|
115
|
+
'wxSimpleHtmlListBox::OnGetRowsHeightHint'
|
103
116
|
# for doc only
|
104
117
|
spec.map 'void** clientData' => 'Array', swig: false do
|
105
118
|
map_in code: ''
|