wxruby3 1.3.1 → 1.5.0
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 +16 -12
- data/README.md +4 -3
- data/ext/wxruby3/include/wxRubyApp.h +9 -9
- data/ext/wxruby3/swig/mark_free_impl.i +47 -11
- data/ext/wxruby3/swig/wx.i +30 -12
- data/lib/wx/aui/auifloatframe.rb +1 -1
- data/lib/wx/aui/auimanager.rb +5 -16
- data/lib/wx/aui/auinotebook.rb +1 -1
- data/lib/wx/aui/require.rb +0 -2
- data/lib/wx/core/acceleratortable.rb +1 -1
- data/lib/wx/core/animation.rb +2 -2
- data/lib/wx/core/app.rb +1 -1
- data/lib/wx/core/artprovider.rb +4 -4
- data/lib/wx/core/bitmap.rb +1 -1
- data/lib/wx/core/bitmap_combobox.rb +2 -2
- data/lib/wx/core/clientdc.rb +1 -1
- data/lib/wx/core/clipboard.rb +4 -4
- data/lib/wx/core/colour.rb +1 -1
- data/lib/wx/core/combobox.rb +1 -1
- data/lib/wx/core/config.rb +7 -7
- data/lib/wx/core/controlwithitems.rb +3 -3
- data/lib/wx/core/data_object.rb +4 -4
- data/lib/wx/core/dataformat.rb +9 -3
- data/lib/wx/core/dialog.rb +3 -2
- data/lib/wx/core/event.rb +3 -3
- data/lib/wx/core/evthandler.rb +325 -289
- data/lib/wx/core/file_dialog.rb +1 -1
- data/lib/wx/core/find_replace_dialog.rb +2 -2
- data/lib/wx/core/functions.rb +1 -1
- data/lib/wx/core/genericdirctrl.rb +1 -1
- data/lib/wx/core/geometry.rb +2 -2
- data/lib/wx/core/graphics_pen_info.rb +1 -1
- data/lib/wx/core/helpprovider.rb +1 -1
- data/lib/wx/core/icon.rb +1 -1
- data/lib/wx/core/image.rb +2 -2
- data/lib/wx/core/imagelist.rb +1 -1
- data/lib/wx/core/locale.rb +5 -5
- data/lib/wx/core/log.rb +8 -8
- data/lib/wx/core/menu.rb +3 -3
- data/lib/wx/core/module_ext.rb +16 -0
- data/lib/wx/core/owner_drawn_combobox.rb +3 -3
- data/lib/wx/core/pen_info.rb +1 -1
- data/lib/wx/core/persistence_manager.rb +2 -2
- data/lib/wx/core/rect.rb +1 -1
- data/lib/wx/core/secret_store.rb +1 -1
- data/lib/wx/core/simplehelpprovider.rb +1 -1
- data/lib/wx/core/sizer.rb +8 -8
- data/lib/wx/core/splash_screen.rb +1 -1
- data/lib/wx/core/standard_paths.rb +1 -1
- data/lib/wx/core/task_bar_button.rb +1 -1
- data/lib/wx/core/text_entry.rb +1 -1
- data/lib/wx/core/textctrl.rb +2 -2
- data/lib/wx/core/timer.rb +2 -2
- data/lib/wx/core/tree_ctrl.rb +1 -1
- data/lib/wx/core/v_list_box.rb +1 -1
- data/lib/wx/core/validator.rb +2 -2
- data/lib/wx/core/variant.rb +2 -2
- data/lib/wx/core/window.rb +48 -2
- data/lib/wx/core/xmlresource.rb +4 -4
- data/lib/wx/core.rb +2 -0
- data/lib/wx/doc/evthandler.rb +1 -23
- data/lib/wx/doc/tip_window.rb +22 -0
- data/lib/wx/grid/grid.rb +3 -3
- data/lib/wx/grid/require.rb +0 -2
- data/lib/wx/html/htmlhelpcontroller.rb +1 -1
- data/lib/wx/html/htmlwindow.rb +1 -1
- data/lib/wx/html/require.rb +0 -2
- data/lib/wx/html/simple_html_listbox.rb +3 -3
- data/lib/wx/keyword_ctors.rb +14 -7
- data/lib/wx/keyword_defs.rb +7 -7
- data/lib/wx/pg/pg_properties.rb +1 -1
- data/lib/wx/pg/pg_property.rb +3 -3
- data/lib/wx/pg/property_grid.rb +2 -2
- data/lib/wx/pg/property_grid_interface.rb +2 -2
- data/lib/wx/pg/require.rb +0 -2
- data/lib/wx/prt/previewframe.rb +1 -1
- data/lib/wx/prt/require.rb +0 -2
- data/lib/wx/rbn/ribbon_control.rb +1 -1
- data/lib/wx/rbn/ribbon_page.rb +1 -1
- data/lib/wx/rbn/ribbon_panel.rb +1 -1
- data/lib/wx/rtc/require.rb +0 -2
- data/lib/wx/rtc/rich_text_composite_object.rb +1 -1
- data/lib/wx/rtc/rich_text_ctrl.rb +1 -1
- data/lib/wx/rtc/rich_text_paragraph.rb +1 -1
- data/lib/wx/rtc/richtext_buffer.rb +3 -3
- data/lib/wx/rtc/richtext_formatting_dialog.rb +2 -2
- data/lib/wx/rtc/richtext_style_organiser_dialog.rb +1 -1
- data/lib/wx/rtc/symbol_picker_dialog.rb +1 -1
- data/lib/wx/stc/require.rb +0 -2
- data/lib/wx/stc/styled_text_ctrl.rb +1 -1
- data/lib/wx/version.rb +1 -1
- data/lib/wx/wxruby/base.rb +8 -2
- data/lib/wx/wxruby/cmd/setup.rb +61 -37
- data/rakelib/gem.rb +8 -4
- data/rakelib/lib/config/macosx.rb +31 -4
- data/rakelib/lib/config/mingw.rb +1 -1
- data/rakelib/lib/config/pkgman/linux.rb +9 -1
- data/rakelib/lib/core/package.rb +68 -49
- data/rakelib/lib/director/about_dialog_info.rb +1 -0
- data/rakelib/lib/director/aui_manager.rb +63 -57
- data/rakelib/lib/director/aui_notebook.rb +7 -0
- data/rakelib/lib/director/colour.rb +1 -1
- data/rakelib/lib/director/data_format.rb +1 -1
- data/rakelib/lib/director/event.rb +1 -0
- data/rakelib/lib/director/event_handler.rb +82 -46
- data/rakelib/lib/director/events.rb +5 -3
- data/rakelib/lib/director/functions.rb +0 -3
- data/rakelib/lib/director/grid_ctrl.rb +24 -0
- data/rakelib/lib/director/html_printout.rb +2 -0
- data/rakelib/lib/director/list_ctrl.rb +14 -10
- data/rakelib/lib/director/locale.rb +2 -0
- data/rakelib/lib/director/num_validator.rb +7 -0
- data/rakelib/lib/director/print_data.rb +7 -0
- data/rakelib/lib/director/printer.rb +2 -0
- data/rakelib/lib/director/richtext_printing.rb +2 -0
- data/rakelib/lib/director/splitter_window.rb +17 -0
- data/rakelib/lib/director/textctrl.rb +21 -4
- data/rakelib/lib/director/tip_window.rb +34 -0
- data/rakelib/lib/director/window.rb +9 -1
- data/rakelib/lib/director.rb +0 -1
- data/rakelib/lib/generate/doc/evt_handler.yaml +31 -12
- data/rakelib/lib/specs/interfaces.rb +9 -0
- data/rakelib/lib/typemap/print_page_range.rb +97 -0
- data/tests/test_combo_ctrl.rb +1 -0
- data/tests/test_event_handling.rb +158 -31
- metadata +7 -5
data/rakelib/gem.rb
CHANGED
|
@@ -214,16 +214,18 @@ module WXRuby3
|
|
|
214
214
|
end
|
|
215
215
|
elsif uri.scheme == 'http' || uri.scheme == 'https'
|
|
216
216
|
# download the binary release package
|
|
217
|
-
$stdout.puts "Downloading #{uri
|
|
217
|
+
$stdout.puts "Downloading #{uri}..."
|
|
218
218
|
filename = File.basename(uri.path)
|
|
219
|
-
if WXRuby3.config.download_file(uri.
|
|
219
|
+
if WXRuby3.config.download_file(uri.to_s, filename)
|
|
220
220
|
sha_file = File.basename(filename, '.*')+DIGEST_EXT
|
|
221
|
-
|
|
222
|
-
unless WXRuby3.config.download_file(
|
|
221
|
+
sha_uri = File.join(File.dirname(uri.to_s), sha_file)
|
|
222
|
+
unless WXRuby3.config.download_file(sha_uri, sha_file)
|
|
223
223
|
$stderr.puts "ERROR: Unable to download digest signature for binary release package : #{package}"
|
|
224
224
|
exit(1)
|
|
225
225
|
end
|
|
226
226
|
exit(1) unless install_bin_pkg(filename)
|
|
227
|
+
# cleanup, remove downloaded files
|
|
228
|
+
FileUtils.rm_f([filename, sha_file])
|
|
227
229
|
true
|
|
228
230
|
else
|
|
229
231
|
$stderr.puts "ERROR: Unable to download binary release package (#{package})!"
|
|
@@ -241,6 +243,8 @@ module WXRuby3
|
|
|
241
243
|
exit(1)
|
|
242
244
|
end
|
|
243
245
|
exit(1) unless install_bin_pkg(bin_pkg_name+BINPKG_EXT)
|
|
246
|
+
# cleanup, remove downloaded files
|
|
247
|
+
FileUtils.rm_f([bin_pkg_name+BINPKG_EXT, bin_pkg_name+DIGEST_EXT])
|
|
244
248
|
true
|
|
245
249
|
else
|
|
246
250
|
if prebuilt_only
|
|
@@ -158,10 +158,37 @@ module WXRuby3
|
|
|
158
158
|
private
|
|
159
159
|
|
|
160
160
|
def wx_configure
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
wxw_ver = nil
|
|
162
|
+
if WXRuby3.config.sysinfo.os.release >= '15'
|
|
163
|
+
# try to detect wxWidgets version
|
|
164
|
+
verfile = File.join(ext_path, 'wxWidgets', 'include', 'wx', 'version.h')
|
|
165
|
+
if File.exist?(verfile)
|
|
166
|
+
v_major = v_minor = v_release = nil
|
|
167
|
+
File.foreach(verfile) do |line|
|
|
168
|
+
case line
|
|
169
|
+
when /\#define\s+wxMAJOR_VERSION\s+(\d+)/
|
|
170
|
+
v_major = $1.to_i
|
|
171
|
+
when /\#define\s+wxMINOR_VERSION\s+(\d+)/
|
|
172
|
+
v_minor = $1.to_i
|
|
173
|
+
when /\#define\s+wxRELEASE_NUMBER\s+(\d+)/
|
|
174
|
+
v_release = $1.to_i
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
wxw_ver = "#{v_major}.#{v_minor}.#{v_release}"
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
if WXRuby3.config.sysinfo.os.release >= '15' && (wxw_ver.nil? || wxw_ver <= '3.2.6')
|
|
181
|
+
# circumvent compilation problems on MacOS 15 or higher with older wxWidgets releases
|
|
182
|
+
bash("./configure " +
|
|
183
|
+
"--disable-optimise --disable-sys-libs --without-liblzma --without-regex " +
|
|
184
|
+
"--prefix=`pwd`/install --disable-tests --without-subdirs --disable-debug_info " +
|
|
185
|
+
"CFLAGS=\"-Wno-unused-but-set-variable\"")
|
|
186
|
+
else
|
|
187
|
+
bash("./configure --with-macosx-version-min=#{WXRuby3.config.sysinfo.os.release}.0 " +
|
|
188
|
+
"--disable-optimise --disable-sys-libs --without-liblzma --without-regex " +
|
|
189
|
+
"--prefix=`pwd`/install --disable-tests --without-subdirs --disable-debug_info " +
|
|
190
|
+
"CFLAGS=\"-Wno-unused-but-set-variable\"")
|
|
191
|
+
end
|
|
165
192
|
end
|
|
166
193
|
|
|
167
194
|
def wx_make
|
data/rakelib/lib/config/mingw.rb
CHANGED
|
@@ -98,7 +98,7 @@ module WXRuby3
|
|
|
98
98
|
private
|
|
99
99
|
|
|
100
100
|
def wx_configure
|
|
101
|
-
bash('./configure --prefix=`pwd`/install --disable-tests --without-subdirs --without-regex --with-expat=builtin --with-zlib=builtin --disable-debug_info')
|
|
101
|
+
bash('./configure --prefix=`pwd`/install --disable-tests --without-subdirs --without-regex --without-libcurl --with-expat=builtin --with-zlib=builtin --disable-debug_info')
|
|
102
102
|
end
|
|
103
103
|
|
|
104
104
|
def wx_make
|
|
@@ -30,6 +30,13 @@ module WXRuby3
|
|
|
30
30
|
self
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
def alias(distro, release, alias_distro, alias_release)
|
|
34
|
+
if @dependencies.has_key?(distro) && @dependencies[distro].has_key?(release)
|
|
35
|
+
@dependencies[alias_distro][alias_release] = @dependencies[distro][release]
|
|
36
|
+
end
|
|
37
|
+
self
|
|
38
|
+
end
|
|
39
|
+
|
|
33
40
|
def get(distro, release: nil)
|
|
34
41
|
@dependencies[distro][release]
|
|
35
42
|
end
|
|
@@ -37,7 +44,8 @@ module WXRuby3
|
|
|
37
44
|
|
|
38
45
|
PLATFORM_DEPS = {
|
|
39
46
|
debian: PlatformDependencies.new(%w[libgtk-3-dev libwebkit2gtk-4.0-dev libgspell-1-dev libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcurl4-openssl-dev libsecret-1-dev libnotify-dev])
|
|
40
|
-
.add('ubuntu', %w[libgtk-3-dev libwebkit2gtk-4.1-dev libgspell-1-dev libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcurl4-openssl-dev libsecret-1-dev libnotify-dev], release: '24.04')
|
|
47
|
+
.add('ubuntu', %w[libgtk-3-dev libwebkit2gtk-4.1-dev libgspell-1-dev libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcurl4-openssl-dev libsecret-1-dev libnotify-dev], release: '24.04')
|
|
48
|
+
.alias('ubuntu', '24.04', 'linuxmint', '22'),
|
|
41
49
|
rhel: PlatformDependencies.new(%w[expat-devel findutils gspell-devel gstreamer1-plugins-base-devel gtk3-devel libcurl-devel libjpeg-devel libnotify-devel libpng-devel libSM-devel libsecret-devel libtiff-devel SDL-devel webkit2gtk4.1-devel zlib-devel]),
|
|
42
50
|
suse: PlatformDependencies.new(%w[gtk3-devel webkit2gtk3-devel gspell-devel gstreamer-devel gstreamer-plugins-base-devel libcurl-devel libsecret-devel libnotify-devel libSDL-devel zlib-devel libjpeg-devel libpng-devel]),
|
|
43
51
|
arch: PlatformDependencies.new(%w[pkg-config gtk3 webkit2gtk gspell libunwind gstreamer curl libsecret libnotify libpng12])
|
data/rakelib/lib/core/package.rb
CHANGED
|
@@ -526,28 +526,6 @@ module WXRuby3
|
|
|
526
526
|
end
|
|
527
527
|
end
|
|
528
528
|
|
|
529
|
-
def generate_event_types(fout, item, evts_handled)
|
|
530
|
-
fout.puts " # from #{item.name}"
|
|
531
|
-
item.event_types.each do |evt_hnd, evt_type, evt_arity, evt_klass, _|
|
|
532
|
-
evh_name = evt_hnd.downcase
|
|
533
|
-
unless evts_handled.include?(evh_name)
|
|
534
|
-
evt_klass ||= if item.event
|
|
535
|
-
item.name
|
|
536
|
-
else
|
|
537
|
-
raise "Don't know Event class for #{evh_name} event type (from #{item.name})"
|
|
538
|
-
end
|
|
539
|
-
fout.puts ' '+<<~__HEREDOC.split("\n").join("\n ")
|
|
540
|
-
self.register_event_type EventType[
|
|
541
|
-
'#{evh_name}', #{evt_arity},
|
|
542
|
-
#{fullname}::#{evt_type},
|
|
543
|
-
#{fullname}::#{evt_klass.sub(/\Awx/i, '')}
|
|
544
|
-
] if #{fullname}.const_defined?(:#{evt_type})
|
|
545
|
-
__HEREDOC
|
|
546
|
-
evts_handled << evh_name
|
|
547
|
-
end
|
|
548
|
-
end
|
|
549
|
-
end
|
|
550
|
-
|
|
551
529
|
class << self
|
|
552
530
|
# need to share these over all packages since events may be defined in multiple
|
|
553
531
|
def generated_events
|
|
@@ -561,6 +539,46 @@ module WXRuby3
|
|
|
561
539
|
end
|
|
562
540
|
@event_list_packages
|
|
563
541
|
end
|
|
542
|
+
|
|
543
|
+
# some event handler (catch-all) macros need custom coding so we need to skip
|
|
544
|
+
# them when generating
|
|
545
|
+
def ignored_event_handlers
|
|
546
|
+
@ignored_event_handlers ||= Set.new
|
|
547
|
+
end
|
|
548
|
+
|
|
549
|
+
def full_docs?
|
|
550
|
+
if @full_docs.nil?
|
|
551
|
+
@full_docs = !!ENV['WXRUBY_FULLDOCS']
|
|
552
|
+
end
|
|
553
|
+
@full_docs
|
|
554
|
+
end
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
def generate_event_types(fout, item, evts_handled)
|
|
558
|
+
fout.puts " # from #{item.name}"
|
|
559
|
+
item.event_types.each do |evt_hnd, evt_type, evt_arity, evt_klass, _|
|
|
560
|
+
unless Package.ignored_event_handlers.include?(evt_hnd)
|
|
561
|
+
evh_name = evt_hnd.downcase
|
|
562
|
+
unless evts_handled.include?(evh_name)
|
|
563
|
+
evt_klass ||= item.name if item.event
|
|
564
|
+
# skip if we do not have an actually existing event class
|
|
565
|
+
if (item.event && item.name == evt_klass) ||
|
|
566
|
+
(evt_klass && included_directors.any? { |dir| dir.defmod.find_item(evt_klass) })
|
|
567
|
+
|
|
568
|
+
evt_klass ||= item.name
|
|
569
|
+
fout.puts ' '+<<~__HEREDOC.split("\n").join("\n ")
|
|
570
|
+
self.register_event_type EventType[
|
|
571
|
+
'#{evh_name}', #{evt_arity},
|
|
572
|
+
#{fullname}::#{evt_type},
|
|
573
|
+
#{fullname}::#{evt_klass.sub(/\Awx/i, '')}
|
|
574
|
+
]
|
|
575
|
+
__HEREDOC
|
|
576
|
+
evts_handled << evh_name
|
|
577
|
+
|
|
578
|
+
end
|
|
579
|
+
end
|
|
580
|
+
end
|
|
581
|
+
end
|
|
564
582
|
end
|
|
565
583
|
|
|
566
584
|
def generate_event_list
|
|
@@ -635,31 +653,36 @@ module WXRuby3
|
|
|
635
653
|
item.event_types.each do |evt_hnd, evt_type, evt_arity, evt_klass, evt_nodoc|
|
|
636
654
|
evh_name = evt_hnd.downcase
|
|
637
655
|
unless evts_handled.include?(evh_name)
|
|
638
|
-
evt_klass ||= item.name
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
656
|
+
evt_klass ||= item.name if item.event
|
|
657
|
+
# skip if we do not have an actually existing event class (for this platform)
|
|
658
|
+
if Package.full_docs? || (item.event && item.name == evt_klass) ||
|
|
659
|
+
(evt_klass && included_directors.any? { |dir| dir.defmod.find_item(evt_klass) })
|
|
660
|
+
|
|
661
|
+
evh_args, evh_docstr = evt_nodoc ? nil : find_event_doc(evh_name)
|
|
662
|
+
fdoc.doc.puts evh_docstr if evh_docstr
|
|
663
|
+
fdoc.doc.puts "Processes a {#{fullname}::#{evt_type}} event." unless /Process.*\s(event|command)/ =~ evh_docstr
|
|
664
|
+
case evt_arity
|
|
665
|
+
when 0
|
|
666
|
+
evh_args = 'meth = nil, &block' unless evh_args
|
|
667
|
+
when 1
|
|
668
|
+
evh_args = 'id, meth = nil, &block' unless evh_args
|
|
669
|
+
argnms = evh_args.split(',')
|
|
670
|
+
fdoc.doc.puts "@param [Integer,Wx::Enum,Wx::Window,Wx::MenuItem,Wx::ToolBarTool,Wx::Timer] #{argnms.shift.strip} window/control id"
|
|
671
|
+
when 2
|
|
672
|
+
evh_args = 'first_id, last_id, meth = nil, &block' unless evh_args
|
|
673
|
+
argnms = evh_args.split(',')
|
|
674
|
+
fdoc.doc.puts "@param [Integer,Wx::Enum,Wx::Window,Wx::MenuItem,Wx::ToolBarTool,Wx::Timer] #{argnms.shift.strip} first window/control id of range"
|
|
675
|
+
fdoc.doc.puts "@param [Integer,Wx::Enum,Wx::Window,Wx::MenuItem,Wx::ToolBarTool,Wx::Timer] #{argnms.shift.strip} last window/control id of range"
|
|
676
|
+
end
|
|
677
|
+
fdoc.doc.puts "@param [String,Symbol,Method,Proc] meth (name of) method or handler proc"
|
|
678
|
+
#fdoc.doc.puts "@param [Proc] block handler block"
|
|
679
|
+
fdoc.doc.puts "@yieldparam [#{fullname}::#{evt_klass.sub(/\Awx/i, '')}] event the event to handle"
|
|
658
680
|
|
|
659
|
-
|
|
660
|
-
|
|
681
|
+
fdoc.puts "def #{evh_name}(#{evh_args}) end"
|
|
682
|
+
fdoc.puts
|
|
661
683
|
|
|
662
|
-
|
|
684
|
+
evts_handled << evh_name
|
|
685
|
+
end
|
|
663
686
|
end
|
|
664
687
|
end
|
|
665
688
|
end
|
|
@@ -788,10 +811,6 @@ module WXRuby3
|
|
|
788
811
|
end
|
|
789
812
|
private :generate_core_doc
|
|
790
813
|
|
|
791
|
-
def self.full_docs?
|
|
792
|
-
!!ENV['WXRUBY_FULLDOCS']
|
|
793
|
-
end
|
|
794
|
-
|
|
795
814
|
def generate_docs
|
|
796
815
|
# make sure all modules have been extracted from xml
|
|
797
816
|
included_directors.each {|dir| dir.extract_interface(false, gendoc: true) }
|
|
@@ -18,48 +18,53 @@ module WXRuby3
|
|
|
18
18
|
super
|
|
19
19
|
spec.gc_as_object 'wxAuiManager'
|
|
20
20
|
if Config.instance.wx_version >= '3.3.0'
|
|
21
|
-
spec.items
|
|
22
|
-
spec.gc_as_untracked 'wxAuiSerializer', '
|
|
23
|
-
spec.regard '
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
spec.
|
|
34
|
-
|
|
35
|
-
'wxAuiDockInfo::dock_layer',
|
|
36
|
-
'wxAuiDockInfo::dock_row',
|
|
37
|
-
'wxAuiDockInfo::size',
|
|
38
|
-
'wxAuiDockInfo::min_size',
|
|
39
|
-
'wxAuiDockInfo::resizable',
|
|
40
|
-
'wxAuiDockInfo::toolbar',
|
|
41
|
-
'wxAuiDockInfo::fixed',
|
|
42
|
-
'wxAuiDockInfo::reserved1'
|
|
43
|
-
spec.add_extend_code 'wxAuiDockInfo', <<~__HEREDOC
|
|
44
|
-
VALUE each_pane()
|
|
21
|
+
spec.items << 'wxAuiSerializer' << 'wxAuiDockLayoutInfo' << 'wxAuiPaneLayoutInfo' << 'wxAuiTabLayoutInfo' << 'wxAuiDeserializer'
|
|
22
|
+
spec.gc_as_untracked 'wxAuiSerializer', 'wxAuiDeserializer', 'wxAuiDockLayoutInfo', 'wxAuiPaneLayoutInfo', 'wxAuiTabLayoutInfo'
|
|
23
|
+
spec.regard 'wxAuiDockLayoutInfo::dock_direction',
|
|
24
|
+
'wxAuiDockLayoutInfo::dock_layer',
|
|
25
|
+
'wxAuiDockLayoutInfo::dock_row',
|
|
26
|
+
'wxAuiDockLayoutInfo::dock_pos',
|
|
27
|
+
'wxAuiDockLayoutInfo::dock_proportion',
|
|
28
|
+
'wxAuiDockLayoutInfo::dock_size',
|
|
29
|
+
'wxAuiPaneLayoutInfo::name',
|
|
30
|
+
'wxAuiPaneLayoutInfo::floating_pos',
|
|
31
|
+
'wxAuiPaneLayoutInfo::floating_size',
|
|
32
|
+
'wxAuiPaneLayoutInfo::is_maximized'
|
|
33
|
+
spec.add_extend_code 'wxAuiTabLayoutInfo', <<~__HEREDOC
|
|
34
|
+
VALUE get_pages()
|
|
45
35
|
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
for (wxAuiPaneInfo* pane : panes)
|
|
36
|
+
VALUE rc = rb_ary_new();
|
|
37
|
+
for (int page : self->pages)
|
|
49
38
|
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
39
|
+
rb_ary_push(rc, INT2NUM(page));
|
|
40
|
+
}
|
|
53
41
|
return rc;
|
|
54
42
|
}
|
|
43
|
+
|
|
44
|
+
void set_pages(VALUE rb_pages)
|
|
45
|
+
{
|
|
46
|
+
if (TYPE(rb_pages) == T_ARRAY)
|
|
47
|
+
{
|
|
48
|
+
std::vector<int> pgs;
|
|
49
|
+
for (int i = 0; i < RARRAY_LEN(rb_pages); i++)
|
|
50
|
+
{
|
|
51
|
+
pgs.push_back(NUM2INT(rb_ary_entry(rb_pages, i)));
|
|
52
|
+
}
|
|
53
|
+
self->pages = pgs;
|
|
54
|
+
}
|
|
55
|
+
else
|
|
56
|
+
{
|
|
57
|
+
rb_raise(rb_eTypeError, "Expected Array of Integer for 1");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
55
60
|
__HEREDOC
|
|
56
|
-
spec.map 'std::vector<
|
|
61
|
+
spec.map 'std::vector<wxAuiPaneLayoutInfo>' => 'Array<Wx::AuiPaneLayoutInfo>' do
|
|
57
62
|
map_out code: <<~__CODE
|
|
58
63
|
$result = rb_ary_new();
|
|
59
|
-
std::vector<
|
|
60
|
-
for (const
|
|
64
|
+
std::vector<wxAuiPaneLayoutInfo>& panes = (std::vector<wxAuiPaneLayoutInfo>&)$1;
|
|
65
|
+
for (const wxAuiPaneLayoutInfo& pane : panes)
|
|
61
66
|
{
|
|
62
|
-
VALUE r_pane = SWIG_NewPointerObj(new
|
|
67
|
+
VALUE r_pane = SWIG_NewPointerObj(new wxAuiPaneLayoutInfo(pane), SWIGTYPE_p_wxAuiPaneLayoutInfo, SWIG_POINTER_OWN);
|
|
63
68
|
rb_ary_push($result, r_pane);
|
|
64
69
|
}
|
|
65
70
|
__CODE
|
|
@@ -70,24 +75,24 @@ module WXRuby3
|
|
|
70
75
|
{
|
|
71
76
|
void *ptr;
|
|
72
77
|
VALUE r_pane = rb_ary_entry($input, i);
|
|
73
|
-
int res = SWIG_ConvertPtr(r_pane, &ptr,
|
|
78
|
+
int res = SWIG_ConvertPtr(r_pane, &ptr, SWIGTYPE_p_wxAuiPaneLayoutInfo, 0);
|
|
74
79
|
if (!SWIG_IsOK(res) || !ptr) {
|
|
75
|
-
Swig::DirectorTypeMismatchException::raise(swig_get_self(), "load_panes", rb_eTypeError, "in return value. Expected Array of Wx::
|
|
80
|
+
Swig::DirectorTypeMismatchException::raise(swig_get_self(), "load_panes", rb_eTypeError, "in return value. Expected Array of Wx::AuiPaneLayoutInfo");
|
|
76
81
|
}
|
|
77
|
-
|
|
82
|
+
wxAuiPaneLayoutInfo *pane = reinterpret_cast< wxAuiPaneLayoutInfo * >(ptr);
|
|
78
83
|
$result.push_back(*pane);
|
|
79
84
|
}
|
|
80
85
|
}
|
|
81
86
|
__CODE
|
|
82
87
|
end
|
|
83
|
-
spec.map 'std::vector<
|
|
88
|
+
spec.map 'std::vector<wxAuiTabLayoutInfo>' => 'Array<Wx::AuiTabLayoutInfo>' do
|
|
84
89
|
map_out code: <<~__CODE
|
|
85
90
|
$result = rb_ary_new();
|
|
86
|
-
std::vector<
|
|
87
|
-
for (const
|
|
91
|
+
std::vector<wxAuiTabLayoutInfo>& tabs = (std::vector<wxAuiTabLayoutInfo>&)$1;
|
|
92
|
+
for (const wxAuiTabLayoutInfo& tab : tabs)
|
|
88
93
|
{
|
|
89
|
-
VALUE
|
|
90
|
-
rb_ary_push($result,
|
|
94
|
+
VALUE r_tab = SWIG_NewPointerObj(new wxAuiTabLayoutInfo(tab), SWIGTYPE_p_wxAuiTabLayoutInfo, SWIG_POINTER_OWN);
|
|
95
|
+
rb_ary_push($result, r_tab);
|
|
91
96
|
}
|
|
92
97
|
__CODE
|
|
93
98
|
map_directorout code: <<~__CODE
|
|
@@ -96,13 +101,13 @@ module WXRuby3
|
|
|
96
101
|
for (int i = 0; i < RARRAY_LEN($input); i++)
|
|
97
102
|
{
|
|
98
103
|
void *ptr;
|
|
99
|
-
VALUE
|
|
100
|
-
int res = SWIG_ConvertPtr(
|
|
104
|
+
VALUE r_tab = rb_ary_entry($input, i);
|
|
105
|
+
int res = SWIG_ConvertPtr(r_tab, &ptr, SWIGTYPE_p_wxAuiTabLayoutInfo, 0);
|
|
101
106
|
if (!SWIG_IsOK(res) || !ptr) {
|
|
102
|
-
Swig::DirectorTypeMismatchException::raise(swig_get_self(), "load_docks", rb_eTypeError, "in return value. Expected Array of Wx::
|
|
107
|
+
Swig::DirectorTypeMismatchException::raise(swig_get_self(), "load_docks", rb_eTypeError, "in return value. Expected Array of Wx::AuiTabLayoutInfo");
|
|
103
108
|
}
|
|
104
|
-
|
|
105
|
-
$result.push_back(*
|
|
109
|
+
wxAuiTabLayoutInfo *tab = reinterpret_cast< wxAuiTabLayoutInfo * >(ptr);
|
|
110
|
+
$result.push_back(*tab);
|
|
106
111
|
}
|
|
107
112
|
}
|
|
108
113
|
__CODE
|
|
@@ -215,17 +220,18 @@ module WXRuby3
|
|
|
215
220
|
|
|
216
221
|
def gen_class_doc_members(fdoc, clsdef, cls_members, alias_methods)
|
|
217
222
|
super
|
|
218
|
-
if Config.instance.wx_version >= '3.3.0' && clsdef.name == '
|
|
219
|
-
fdoc.doc.puts '
|
|
220
|
-
fdoc.doc.puts 'If
|
|
221
|
-
fdoc.doc.puts '@
|
|
222
|
-
fdoc.
|
|
223
|
-
fdoc.puts '
|
|
223
|
+
if Config.instance.wx_version >= '3.3.0' && clsdef.name == 'wxAuiTabLayoutInfo'
|
|
224
|
+
fdoc.doc.puts 'Returns the indices of the pages in this tab control in their order on screen.'
|
|
225
|
+
fdoc.doc.puts 'If this array is empty, it means that the tab control contains all notebook pages in natural order.'
|
|
226
|
+
fdoc.doc.puts '@return [::Array<Integer>] indices of the pages in this tab control'
|
|
227
|
+
fdoc.puts 'def get_pages; end'
|
|
228
|
+
fdoc.puts 'alias :pages :get_pages'
|
|
224
229
|
fdoc.puts
|
|
225
|
-
fdoc.doc.puts '
|
|
226
|
-
fdoc.doc.puts '
|
|
227
|
-
fdoc.puts '
|
|
228
|
-
fdoc.puts '
|
|
230
|
+
fdoc.doc.puts 'Set the indices of the pages in this tab control in their order on screen.'
|
|
231
|
+
fdoc.doc.puts 'If this array is empty, it means that the tab control contains all notebook pages in natural order.'
|
|
232
|
+
fdoc.doc.puts '@param [::Array<Integer>] pages indices of the pages in this tab control'
|
|
233
|
+
fdoc.puts 'def set_pages(pages) end'
|
|
234
|
+
fdoc.puts 'alias :pages= :set_pages'
|
|
229
235
|
end
|
|
230
236
|
end
|
|
231
237
|
|
|
@@ -25,6 +25,13 @@ module WXRuby3
|
|
|
25
25
|
wxAuiNotebookPage::bitmap
|
|
26
26
|
wxAuiNotebookPage::rect
|
|
27
27
|
wxAuiNotebookPage::active]
|
|
28
|
+
if Config.instance.wx_version >= '3.3.0'
|
|
29
|
+
spec.items << 'wxAuiNotebookPosition'
|
|
30
|
+
spec.regard 'wxAuiNotebookPosition::tabctrl',
|
|
31
|
+
'wxAuiNotebookPosition::page'
|
|
32
|
+
spec.make_readonly 'wxAuiNotebookPosition::tabctrl',
|
|
33
|
+
'wxAuiNotebookPosition::page'
|
|
34
|
+
end
|
|
28
35
|
# reset type mapping done in BookCtrls as the non-const arg is used for query-ing here (FindTab)
|
|
29
36
|
# (wxWidgets should have made this a const arg)
|
|
30
37
|
spec.map_apply 'SWIGTYPE *' => 'wxWindow* page'
|
|
@@ -16,7 +16,7 @@ module WXRuby3
|
|
|
16
16
|
spec.gc_as_untracked('wxColour')
|
|
17
17
|
spec.require_app 'wxColour::wxColour(const wxColour&)'
|
|
18
18
|
spec.ignore(%w[
|
|
19
|
-
wxColour::GetPixel wxTransparentColour wxColour::operator!=
|
|
19
|
+
wxColour::GetPixel wxTransparentColour wxColour::operator!= wxColour::operator==
|
|
20
20
|
wxBLACK wxBLUE wxCYAN wxGREEN wxYELLOW wxLIGHT_GREY wxRED wxWHITE
|
|
21
21
|
])
|
|
22
22
|
spec.map 'unsigned char *' => 'Integer' do
|
|
@@ -15,7 +15,7 @@ module WXRuby3
|
|
|
15
15
|
def setup
|
|
16
16
|
super
|
|
17
17
|
spec.gc_as_object
|
|
18
|
-
spec.ignore 'wxDataFormat::operator
|
|
18
|
+
spec.ignore 'wxDataFormat::operator=='
|
|
19
19
|
if Config.platform == :mingw
|
|
20
20
|
# The formal signature for these is NativeFormat; this is required on
|
|
21
21
|
# MSVC as otherwise an impermissible implicit cast is tried, and so
|
|
@@ -47,6 +47,7 @@ module WXRuby3
|
|
|
47
47
|
if (class_name == "wxEvent" || class_name == "wxCommandEvent")
|
|
48
48
|
{
|
|
49
49
|
// special clones for Ruby derived events are already managed and tracked
|
|
50
|
+
// (this also covers Wx::AsyncProcCallEvent)
|
|
50
51
|
return SWIG_RubyInstanceFor((void *)wx_evt);
|
|
51
52
|
}
|
|
52
53
|
|