wxruby3 1.5.4 → 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/RubyStockObjects.i +1 -0
- data/ext/wxruby3/swig/mark_free_impl.i +2 -0
- data/lib/wx/aui/auifloatframe.rb +1 -1
- data/lib/wx/aui/auimanager.rb +1 -1
- data/lib/wx/aui/auinotebook.rb +2 -2
- data/lib/wx/core/animation.rb +1 -1
- data/lib/wx/core/cursor.rb +10 -0
- data/lib/wx/core/dataformat.rb +1 -1
- data/lib/wx/core/file_dialog.rb +1 -1
- data/lib/wx/core/geometry.rb +34 -0
- data/lib/wx/core/hboxsizer.rb +22 -0
- data/lib/wx/core/hyperlink_ctrl.rb +18 -0
- data/lib/wx/core/position.rb +58 -0
- data/lib/wx/core/variant.rb +6 -0
- data/lib/wx/core/vboxsizer.rb +22 -0
- data/lib/wx/doc/aui/auimanager.rb +6 -3
- data/lib/wx/doc/aui/auinotebook.rb +6 -3
- data/lib/wx/doc/config.rb +14 -8
- data/lib/wx/doc/controlwithitems.rb +7 -3
- data/lib/wx/doc/core.rb +21 -0
- data/lib/wx/doc/geometry.rb +47 -7
- data/lib/wx/doc/graphics_object.rb +24 -0
- data/lib/wx/doc/grid/grid.rb +18 -9
- data/lib/wx/doc/hboxsizer.rb +41 -5
- data/lib/wx/doc/list_ctrl.rb +12 -6
- data/lib/wx/doc/menu.rb +6 -3
- data/lib/wx/doc/notebook.rb +6 -3
- data/lib/wx/doc/pg/pg_property.rb +23 -9
- data/lib/wx/doc/pg/property_grid_interface.rb +4 -4
- data/lib/wx/doc/region_iterator.rb +1 -1
- data/lib/wx/doc/rtc/rich_text_composite_object.rb +6 -3
- data/lib/wx/doc/rtc/rich_text_ctrl.rb +6 -3
- data/lib/wx/doc/rtc/rich_text_paragraph.rb +6 -3
- data/lib/wx/doc/sizer.rb +6 -3
- data/lib/wx/doc/stc/styled_text_ctrl.rb +6 -3
- data/lib/wx/doc/textctrl.rb +6 -3
- data/lib/wx/doc/tree_ctrl.rb +7 -3
- data/lib/wx/doc/v_list_box.rb +6 -3
- data/lib/wx/doc/variant.rb +31 -1
- data/lib/wx/doc/vboxsizer.rb +41 -5
- data/lib/wx/doc/window.rb +6 -3
- data/lib/wx/helpers.rb +28 -0
- data/lib/wx/keyword_ctors.rb +2 -2
- data/lib/wx/keyword_defs.rb +11 -2
- 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/mingw.rb +1 -1
- data/rakelib/lib/config.rb +9 -3
- data/rakelib/lib/core/spec.rb +1 -1
- data/rakelib/lib/director/affine_matrix.rb +33 -0
- data/rakelib/lib/director/animation_ctrl.rb +1 -1
- data/rakelib/lib/director/app.rb +1 -1
- data/rakelib/lib/director/aui_manager.rb +2 -2
- data/rakelib/lib/director/aui_notebook.rb +1 -1
- data/rakelib/lib/director/aui_tab_art.rb +4 -4
- data/rakelib/lib/director/bitmap_combobox.rb +4 -2
- data/rakelib/lib/director/ctrl_with_items.rb +1 -1
- data/rakelib/lib/director/cursor.rb +11 -1
- data/rakelib/lib/director/dc.rb +2 -2
- data/rakelib/lib/director/defs.rb +1 -1
- data/rakelib/lib/director/derived_dc.rb +14 -14
- data/rakelib/lib/director/dialog.rb +3 -3
- data/rakelib/lib/director/gdicommon.rb +2 -2
- data/rakelib/lib/director/geometry.rb +55 -3
- data/rakelib/lib/director/graphics_context.rb +8 -3
- data/rakelib/lib/director/graphics_object.rb +29 -2
- data/rakelib/lib/director/html_listbox.rb +19 -5
- data/rakelib/lib/director/hvscrolled.rb +253 -0
- data/rakelib/lib/director/hyperlink_ctrl.rb +38 -1
- data/rakelib/lib/director/menu_item.rb +1 -1
- data/rakelib/lib/director/persistent_window.rb +18 -2
- data/rakelib/lib/director/pgeditor.rb +1 -1
- data/rakelib/lib/director/pgproperties.rb +4 -4
- data/rakelib/lib/director/pgproperty.rb +4 -3
- data/rakelib/lib/director/pgvalidation_info.rb +1 -1
- data/rakelib/lib/director/print_data.rb +1 -1
- data/rakelib/lib/director/property_grid_event.rb +1 -1
- data/rakelib/lib/director/property_grid_page.rb +1 -1
- data/rakelib/lib/director/property_grid_page_state.rb +1 -1
- data/rakelib/lib/director/ribbon_tool_bar.rb +1 -1
- data/rakelib/lib/director/richtext_buffer.rb +1 -1
- data/rakelib/lib/director/richtext_formatting_dialog.rb +1 -1
- data/rakelib/lib/director/richtext_paragraph_layout_box.rb +1 -1
- data/rakelib/lib/director/richtext_style_listbox.rb +8 -1
- data/rakelib/lib/director/scrolled_t.rb +22 -0
- data/rakelib/lib/director/sizer.rb +21 -0
- data/rakelib/lib/director/styled_text_event.rb +1 -1
- data/rakelib/lib/director/textctrl.rb +2 -2
- data/rakelib/lib/director/top_level_window.rb +0 -1
- data/rakelib/lib/director/tree_ctrl.rb +1 -1
- data/rakelib/lib/director/utils.rb +4 -2
- data/rakelib/lib/director/variant.rb +29 -1
- data/rakelib/lib/director/vlistbox.rb +9 -3
- data/rakelib/lib/director/window.rb +16 -4
- data/rakelib/lib/extractor/function.rb +46 -15
- data/rakelib/lib/generate/doc/hyperlink_ctrl.yaml +22 -0
- data/rakelib/lib/generate/doc/scrolled_canvas.yaml +38 -0
- data/rakelib/lib/generate/doc/scrolled_control.yaml +38 -0
- data/rakelib/lib/generate/doc/scrolled_window.yaml +38 -0
- data/rakelib/lib/specs/interfaces.rb +4 -2
- data/rakelib/lib/swig_runner.rb +2 -2
- data/rakelib/lib/typemap/print_page_range.rb +1 -1
- data/samples/scrolling/tn_varscroll.png +0 -0
- data/samples/scrolling/varscroll.rb +416 -0
- data/samples/widgets/hyperlink.rb +85 -60
- data/tests/test_propgrid.rb +857 -0
- metadata +14 -7
- data/rakelib/lib/director/vscrolled_window.rb +0 -62
- /data/samples/{controls → scrolling}/htlbox.rb +0 -0
- /data/samples/{etc → scrolling}/scrollwin.rb +0 -0
- /data/samples/{controls → scrolling}/tn_htlbox.png +0 -0
- /data/samples/{etc → scrolling}/tn_scrollwin.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: 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
|
@@ -28,6 +28,7 @@ extern VALUE mWxCore;
|
|
28
28
|
%constant wxPen* const wxRED_PEN;
|
29
29
|
%constant wxPen* const wxCYAN_PEN;
|
30
30
|
%constant wxPen* const wxGREEN_PEN;
|
31
|
+
%constant wxPen* const wxBLUE_PEN;
|
31
32
|
%constant wxPen* const wxBLACK_PEN;
|
32
33
|
%constant wxPen* const wxWHITE_PEN;
|
33
34
|
%constant wxPen* const wxTRANSPARENT_PEN;
|
@@ -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/aui/auifloatframe.rb
CHANGED
@@ -9,7 +9,7 @@ class Wx::AUI::AuiFloatingFrame
|
|
9
9
|
# Before wxWidgets 3.3 the AUI manager of this control would prevent
|
10
10
|
# WindowDestroyEvent propagation so we 'patch' in a std event handler
|
11
11
|
# that designates the event skipped.
|
12
|
-
if Wx
|
12
|
+
if Wx.before_wxwidgets?('3.3')
|
13
13
|
wx_initialize = instance_method :initialize
|
14
14
|
wx_redefine_method :initialize do |*args|
|
15
15
|
wx_initialize.bind(self).call(*args)
|
data/lib/wx/aui/auimanager.rb
CHANGED
data/lib/wx/aui/auinotebook.rb
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
module Wx
|
8
8
|
module AUI
|
9
9
|
|
10
|
-
if Wx
|
10
|
+
if Wx.at_least_wxwidgets?('3.3.0')
|
11
11
|
AuiDefaultTabArt = AuiFlatTabArt
|
12
12
|
end
|
13
13
|
|
@@ -16,7 +16,7 @@ module Wx
|
|
16
16
|
# Before wxWidgets 3.3 the AUI manager of this control would prevent
|
17
17
|
# WindowDestroyEvent propagation so we 'patch' in a std event handler
|
18
18
|
# that designates the event skipped.
|
19
|
-
if Wx
|
19
|
+
if Wx.before_wxwidgets?('3.3')
|
20
20
|
wx_initialize = instance_method :initialize
|
21
21
|
wx_redefine_method :initialize do |*args|
|
22
22
|
wx_initialize.bind(self).call(*args)
|
data/lib/wx/core/animation.rb
CHANGED
data/lib/wx/core/cursor.rb
CHANGED
@@ -19,4 +19,14 @@ module Wx
|
|
19
19
|
Cursor.new(art_file, bmp_type || Wx::Bitmap::BITMAP_TYPE_GUESS[File.extname(art_file).sub(/\A\./,'')], *rest)
|
20
20
|
end
|
21
21
|
|
22
|
+
if at_least_wxwidgets?('3.3.0')
|
23
|
+
class << self
|
24
|
+
|
25
|
+
wx_set_cursor = instance_method :set_cursor
|
26
|
+
wx_redefine_method :set_cursor do |cursor|
|
27
|
+
wx_set_cursor.bind(self).call(cursor.is_a?(Wx::Cursor) ? Wx::CursorBundle.new(cursor) : cursor)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
22
32
|
end
|
data/lib/wx/core/dataformat.rb
CHANGED
@@ -37,7 +37,7 @@ module Wx
|
|
37
37
|
end
|
38
38
|
DF_FILENAME = DataFormat.new( Wx::DataFormatId::DF_FILENAME )
|
39
39
|
DF_UNICODETEXT = DataFormat.new( Wx::DataFormatId::DF_UNICODETEXT )
|
40
|
-
if Wx.has_feature?(:USE_HTML) && Wx
|
40
|
+
if Wx.has_feature?(:USE_HTML) && Wx.at_least_wxwidgets?('3.3.0')
|
41
41
|
DF_HTML = DataFormat.new( Wx::DataFormatId::DF_HTML )
|
42
42
|
end
|
43
43
|
end
|
data/lib/wx/core/file_dialog.rb
CHANGED
@@ -23,7 +23,7 @@ module Wx
|
|
23
23
|
class FileDialogCustomizeHook
|
24
24
|
|
25
25
|
# prevent construction of abstract base
|
26
|
-
if RUBY_VERSION
|
26
|
+
if (RUBY_VERSION.split('.').collect {|v| v.to_i} <=> [2,7,0]) < 0
|
27
27
|
def self.new(*)
|
28
28
|
raise NotImplementedError, 'Wx::FileDialogCustomizeHook is an abstract class.' if self == Wx::FileDialogCustomizeHook
|
29
29
|
super
|
data/lib/wx/core/geometry.rb
CHANGED
@@ -28,6 +28,10 @@ module Wx
|
|
28
28
|
self
|
29
29
|
end
|
30
30
|
|
31
|
+
def to_ary
|
32
|
+
[self.x, self.y]
|
33
|
+
end
|
34
|
+
|
31
35
|
def add!(pt)
|
32
36
|
add(pt)
|
33
37
|
self
|
@@ -81,6 +85,10 @@ module Wx
|
|
81
85
|
self
|
82
86
|
end
|
83
87
|
|
88
|
+
def to_ary
|
89
|
+
[self.x, self.y]
|
90
|
+
end
|
91
|
+
|
84
92
|
def add!(pt)
|
85
93
|
add(pt)
|
86
94
|
self
|
@@ -118,4 +126,30 @@ module Wx
|
|
118
126
|
end
|
119
127
|
|
120
128
|
end
|
129
|
+
|
130
|
+
class Rect2DDouble
|
131
|
+
|
132
|
+
wx_assign = instance_method :assign
|
133
|
+
wx_redefine_method :assign do |pt|
|
134
|
+
wx_assign.bind(self).call(pt)
|
135
|
+
self
|
136
|
+
end
|
137
|
+
|
138
|
+
def to_ary
|
139
|
+
[self.x, self.y, self.width, self.height]
|
140
|
+
end
|
141
|
+
|
142
|
+
def self.intersect(src1, src2)
|
143
|
+
int = Rect2DDouble.new(src1.to_ary)
|
144
|
+
int.intersect(src2)
|
145
|
+
int
|
146
|
+
end
|
147
|
+
|
148
|
+
def self.union(src1, src2)
|
149
|
+
u = Rect2DDouble.new(src1.to_ary)
|
150
|
+
u.union(src2)
|
151
|
+
u
|
152
|
+
end
|
153
|
+
|
154
|
+
end
|
121
155
|
end
|
data/lib/wx/core/hboxsizer.rb
CHANGED
@@ -24,6 +24,28 @@ class Wx::HBoxSizer < Wx::BoxSizer
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
+
class Wx::HStaticBoxSizer < Wx::StaticBoxSizer
|
28
|
+
def initialize(box_or_window, *rest, &block)
|
29
|
+
if box_or_window.is_a?(Wx::StaticBox)
|
30
|
+
raise ArgumentError, "Unexpected argument(s) #{rest}" unless rest.empty?
|
31
|
+
super(box_or_window, Wx::HORIZONTAL, &nil)
|
32
|
+
else
|
33
|
+
raise ArgumentError, "Unexpected argument(s) #{rest}" unless rest.size <= 1
|
34
|
+
super(Wx::HORIZONTAL, box_or_window, *rest, &block)
|
35
|
+
end
|
36
|
+
if block
|
37
|
+
if block.arity == -1 or block.arity == 0
|
38
|
+
self.instance_eval(&block)
|
39
|
+
elsif block.arity == 1
|
40
|
+
block.call(self)
|
41
|
+
else
|
42
|
+
Kernel.raise ArgumentError,
|
43
|
+
"Block to initialize should accept a single argument or none"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
27
49
|
# Just a shortcut version for creating a horizontal wrap sizer
|
28
50
|
class Wx::HWrapSizer < Wx::WrapSizer
|
29
51
|
def initialize(flags=Wx::WRAPSIZER_DEFAULT_FLAGS, &block)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Copyright (c) 2023 M.J.N. Corino, The Netherlands
|
2
|
+
#
|
3
|
+
# This software is released under the MIT license.
|
4
|
+
#
|
5
|
+
# Some parts are
|
6
|
+
# Copyright 2004-2007, wxRuby development team
|
7
|
+
# released under the MIT-like wxRuby2 license
|
8
|
+
|
9
|
+
module Wx
|
10
|
+
|
11
|
+
if Wx::PLATFORM == 'WXOSX'
|
12
|
+
|
13
|
+
# functionally identical for MacOS
|
14
|
+
GenericHyperlinkCtrl = HyperlinkCtrl
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# Copyright (c) 2023 M.J.N. Corino, The Netherlands
|
2
|
+
#
|
3
|
+
# This software is released under the MIT license.
|
4
|
+
#
|
5
|
+
# Some parts are
|
6
|
+
# Copyright 2004-2007, wxRuby development team
|
7
|
+
# released under the MIT-like wxRuby2 license
|
8
|
+
|
9
|
+
module Wx
|
10
|
+
|
11
|
+
class Position
|
12
|
+
|
13
|
+
include Comparable
|
14
|
+
|
15
|
+
# make Position usable for parallel assignments like `r, c = pos`
|
16
|
+
def to_ary
|
17
|
+
[row, col]
|
18
|
+
end
|
19
|
+
|
20
|
+
# Compare with another position value
|
21
|
+
def <=>(other)
|
22
|
+
this_row, this_col = to_ary
|
23
|
+
if Wx::Position === other
|
24
|
+
that_row, that_col = other.to_ary
|
25
|
+
elsif Array === other and other.size == 2
|
26
|
+
that_row, that_col = other
|
27
|
+
else
|
28
|
+
return nil
|
29
|
+
end
|
30
|
+
|
31
|
+
if this_row < that_row
|
32
|
+
-1
|
33
|
+
elsif that_row < this_row
|
34
|
+
1
|
35
|
+
else
|
36
|
+
this_col <=> that_col
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def eql?(other)
|
41
|
+
if other.instance_of?(self.class)
|
42
|
+
self == other
|
43
|
+
else
|
44
|
+
false
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def hash
|
49
|
+
to_ary.hash
|
50
|
+
end
|
51
|
+
|
52
|
+
def dup
|
53
|
+
Wx::Position.new(*self.to_ary)
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
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/core/vboxsizer.rb
CHANGED
@@ -24,6 +24,28 @@ class Wx::VBoxSizer < Wx::BoxSizer
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
+
class Wx::VStaticBoxSizer < Wx::StaticBoxSizer
|
28
|
+
def initialize(box_or_window, *rest, &block)
|
29
|
+
if box_or_window.is_a?(Wx::StaticBox)
|
30
|
+
raise ArgumentError, "Unexpected argument(s) #{rest}" unless rest.empty?
|
31
|
+
super(box_or_window, Wx::VERTICAL, &nil)
|
32
|
+
else
|
33
|
+
raise ArgumentError, "Unexpected argument(s) #{rest}" unless rest.size <= 1
|
34
|
+
super(Wx::VERTICAL, box_or_window, *rest, &block)
|
35
|
+
end
|
36
|
+
if block
|
37
|
+
if block.arity == -1 or block.arity == 0
|
38
|
+
self.instance_eval(&block)
|
39
|
+
elsif block.arity == 1
|
40
|
+
block.call(self)
|
41
|
+
else
|
42
|
+
Kernel.raise ArgumentError,
|
43
|
+
"Block to initialize should accept a single argument or none"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
27
49
|
# Just a shortcut version for creating a vertical wrap sizer
|
28
50
|
class Wx::VWrapSizer < Wx::WrapSizer
|
29
51
|
def initialize(flags=Wx::WRAPSIZER_DEFAULT_FLAGS, &block)
|
@@ -13,9 +13,12 @@ module Wx
|
|
13
13
|
|
14
14
|
# Yield each pane to the given block.
|
15
15
|
# If no block passed returns an Enumerator.
|
16
|
-
# @
|
17
|
-
#
|
18
|
-
|
16
|
+
# @overload each_pane(&block)
|
17
|
+
# @yieldparam [Wx::AUI::AuiPaneInfo] pane the Aui pane info yielded
|
18
|
+
# @return [::Object] result of last block execution
|
19
|
+
# @overload each_pane()
|
20
|
+
# @return [::Enumerator] enumerator
|
21
|
+
def each_pane(*) end
|
19
22
|
|
20
23
|
# Returns an array of all panes managed by the frame manager.
|
21
24
|
# @return [Array<Wx::AUI::AuiPaneInfo>] all managed panes
|
@@ -14,9 +14,12 @@ module Wx
|
|
14
14
|
# Iterate each notebook page.
|
15
15
|
# Passes each page to the given block.
|
16
16
|
# Returns an Enumerator if no block given.
|
17
|
-
# @
|
18
|
-
#
|
19
|
-
|
17
|
+
# @overload each_page(&block)
|
18
|
+
# @yieldparam [Wx::Window] page notebook page
|
19
|
+
# @return [Object] last result of block
|
20
|
+
# @overload each_page()
|
21
|
+
# @return [Enumerator] enumerator
|
22
|
+
def each_page(*) end
|
20
23
|
|
21
24
|
# Finds tab control and its tab index associated with a given window.
|
22
25
|
# @param [Wx::Window] page the notebook page window
|
data/lib/wx/doc/config.rb
CHANGED
@@ -45,17 +45,23 @@ module Wx
|
|
45
45
|
|
46
46
|
# Iterate all value entries at the current object (no recursion).
|
47
47
|
# Passes key/value pairs to the given block or returns an Enumerator is no block given.
|
48
|
-
# @
|
49
|
-
#
|
50
|
-
#
|
51
|
-
|
48
|
+
# @overload each_entry(&block)
|
49
|
+
# @yieldparam [String] key entry key
|
50
|
+
# @yieldparam [Boolean,String,Integer,Float] value entry value
|
51
|
+
# @return [Object] the last result of the executed block
|
52
|
+
# @overload each_entry()
|
53
|
+
# @return [Enumerator] enumerator
|
54
|
+
def each_entry(*) end
|
52
55
|
|
53
56
|
# Iterate all group entries at the current object (no recursion).
|
54
57
|
# Passes key/value pairs to the given block or returns an Enumerator is no block given.
|
55
|
-
# @
|
56
|
-
#
|
57
|
-
#
|
58
|
-
|
58
|
+
# @overload each_group(&block)
|
59
|
+
# @yieldparam [String] key entry key
|
60
|
+
# @yieldparam [Wx::Config::Group] value entry value
|
61
|
+
# @return [Object] the last result of the executed block
|
62
|
+
# @overload each_group()
|
63
|
+
# @return [Enumerator] enumerator
|
64
|
+
def each_group(*) end
|
59
65
|
|
60
66
|
# Returns the total number of value entries at the current object only (if recurse is false) or including
|
61
67
|
# any nested groups (if recurse is true)
|
@@ -19,9 +19,13 @@ module Wx
|
|
19
19
|
|
20
20
|
# Yield each string to the given block.
|
21
21
|
# Returns an Enumerator if no block given.
|
22
|
-
# @
|
23
|
-
#
|
24
|
-
|
22
|
+
# @overload each_string(&block)
|
23
|
+
# @yieldparam [String] string the string yielded
|
24
|
+
# @return [Object] last result of block
|
25
|
+
# @overload each_string()
|
26
|
+
# @yieldparam [String] string the string yielded
|
27
|
+
# @return [Enumerator] enumerator
|
28
|
+
def each_string(*) end
|
25
29
|
|
26
30
|
# Returns true if the items in the control are sorted
|
27
31
|
# (style Wx::LB_SORT for list boxes or Wx::CB_SORT for combo boxes).
|
data/lib/wx/doc/core.rb
CHANGED
@@ -12,6 +12,27 @@ module Wx
|
|
12
12
|
# In case #wxrb_debug returns true #wxrb_trace_level= is also defined)
|
13
13
|
# @return [Integer]
|
14
14
|
attr_reader :wrb_trace_level
|
15
|
+
|
16
|
+
# Returns true if WXWIDGETS_VERSION >= ver
|
17
|
+
# @param [String,Array(Integer)] ver version string or integer array (1-3)
|
18
|
+
# @return [Boolean] true if WXWIDGETS_VERSION >= ver, false otherwise
|
19
|
+
def self.at_least_wxwidgets?(ver) end
|
20
|
+
|
21
|
+
# Returns true if WXWIDGETS_VERSION <= ver
|
22
|
+
# @param [String,Array(Integer)] ver version string or integer array (1-3)
|
23
|
+
# @return [Boolean] true if WXWIDGETS_VERSION <= ver, false otherwise
|
24
|
+
def self.up_to_wxwidgets?(ver) end
|
25
|
+
|
26
|
+
# Returns true if WXWIDGETS_VERSION < ver
|
27
|
+
# @param [String,Array(Integer)] ver version string or integer array (1-3)
|
28
|
+
# @return [Boolean] true if WXWIDGETS_VERSION < ver, false otherwise
|
29
|
+
def before_wxwidgets?(ver) end
|
30
|
+
|
31
|
+
# Returns true if WXWIDGETS_VERSION > ver
|
32
|
+
# @param [String,Array(Integer)] ver version string or integer array (1-3)
|
33
|
+
# @return [Boolean] true if WXWIDGETS_VERSION > ver, false otherwise
|
34
|
+
def after_wxwidgets?(ver) end
|
35
|
+
|
15
36
|
end
|
16
37
|
|
17
38
|
end
|
data/lib/wx/doc/geometry.rb
CHANGED
@@ -80,23 +80,23 @@ module Wx
|
|
80
80
|
|
81
81
|
class Point2DDouble
|
82
82
|
|
83
|
-
# @return [
|
83
|
+
# @return [Float]
|
84
84
|
def get_x; end
|
85
85
|
alias :x :get_x
|
86
|
-
# @param [
|
87
|
-
# @return [
|
86
|
+
# @param [Float] v
|
87
|
+
# @return [Float]
|
88
88
|
def set_x(v) end
|
89
89
|
alias :x= :set_x
|
90
90
|
|
91
|
-
# @return [
|
91
|
+
# @return [Float]
|
92
92
|
def get_y; end
|
93
93
|
alias :y :get_y
|
94
|
-
# @param [
|
95
|
-
# @return [
|
94
|
+
# @param [Float] v
|
95
|
+
# @return [Float]
|
96
96
|
def set_y(v) end
|
97
97
|
alias :y= :set_y
|
98
98
|
|
99
|
-
# @param [Wx::
|
99
|
+
# @param [Wx::Point2DDouble] pt
|
100
100
|
# @return [self]
|
101
101
|
def assign(pt) end
|
102
102
|
|
@@ -133,4 +133,44 @@ module Wx
|
|
133
133
|
def /(v) end
|
134
134
|
|
135
135
|
end
|
136
|
+
|
137
|
+
class Rect2DDouble
|
138
|
+
|
139
|
+
# @return [Float]
|
140
|
+
def get_x; end
|
141
|
+
alias :x :get_x
|
142
|
+
# @param [Float] v
|
143
|
+
# @return [Float]
|
144
|
+
def set_x(v) end
|
145
|
+
alias :x= :set_x
|
146
|
+
|
147
|
+
# @return [Float]
|
148
|
+
def get_y; end
|
149
|
+
alias :y :get_y
|
150
|
+
# @param [Float] v
|
151
|
+
# @return [Float]
|
152
|
+
def set_y(v) end
|
153
|
+
alias :y= :set_y
|
154
|
+
|
155
|
+
# @return [Float]
|
156
|
+
def get_width; end
|
157
|
+
alias :width :get_width
|
158
|
+
# @param [Float] v
|
159
|
+
# @return [Float]
|
160
|
+
def set_width(v) end
|
161
|
+
alias :width= :set_width
|
162
|
+
|
163
|
+
# @return [Float]
|
164
|
+
def get_height; end
|
165
|
+
alias :height :get_height
|
166
|
+
# @param [Float] v
|
167
|
+
# @return [Float]
|
168
|
+
def set_height(v) end
|
169
|
+
alias :y= :set_height
|
170
|
+
|
171
|
+
# @param [Wx::Rect2DDouble] pt
|
172
|
+
# @return [self]
|
173
|
+
def assign(pt) end
|
174
|
+
|
175
|
+
end
|
136
176
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# :stopdoc:
|
2
|
+
# Copyright (c) 2023 M.J.N. Corino, The Netherlands
|
3
|
+
#
|
4
|
+
# This software is released under the MIT license.
|
5
|
+
# :startdoc:
|
6
|
+
|
7
|
+
|
8
|
+
module Wx
|
9
|
+
|
10
|
+
class GraphicsMatrix < GraphicsObject
|
11
|
+
|
12
|
+
# Applies this matrix to a point.
|
13
|
+
# @param [Wx::Point2DDouble,Array(Float,Float)] pt
|
14
|
+
# @return [Wx::Point2DDouble]
|
15
|
+
def transform_point(pt); end
|
16
|
+
|
17
|
+
# Applies this matrix to a distance (i.e., performs all transforms except translations)..
|
18
|
+
# @param [Wx::Point2DDouble,Array(Float,Float)] p
|
19
|
+
# @return [Wx::Point2DDouble]
|
20
|
+
def transform_distance(p); end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
data/lib/wx/doc/grid/grid.rb
CHANGED
@@ -26,27 +26,36 @@ module Wx::GRID
|
|
26
26
|
# Notice that the blocks returned by this method are not ordered in any particular way and may overlap.
|
27
27
|
# For grids using rows or columns-only selection modes, #each_selected_row_block or #each_selected_col_block
|
28
28
|
# can be more convenient, as they return ordered and non-overlapping blocks.
|
29
|
-
# @
|
30
|
-
#
|
31
|
-
|
29
|
+
# @overload each_selected_block(&block)
|
30
|
+
# @yieldparam [Wx::GRID::GridBlockCoords] selected_block
|
31
|
+
# @return [Object] result of last block execution
|
32
|
+
# @overload each_selected_block()
|
33
|
+
# @return [Enumerator] enumerator
|
34
|
+
def each_selected_block(*) end
|
32
35
|
|
33
36
|
# Iterates an ordered range of non-overlapping selected rows passing each corresponding Wx::GRID::GridBlockCoords
|
34
37
|
# to the given block or returns an enumerator if no block given.
|
35
38
|
#
|
36
39
|
# For the grids using GridSelectRows selection mode, iterates (possibly none) the coordinates of non-overlapping
|
37
40
|
# selected row blocks in the natural order, i.e. from smallest to the biggest row indices.
|
38
|
-
# @
|
39
|
-
#
|
40
|
-
|
41
|
+
# @overload each_selected_row_block(&block)
|
42
|
+
# @yieldparam [Wx::GRID::GridBlockCoords] selected_block
|
43
|
+
# @return [Object] result of last block execution
|
44
|
+
# @overload each_selected_row_block(&block)
|
45
|
+
# @return [Enumerator] enumerator
|
46
|
+
def each_selected_row_block(*) end
|
41
47
|
|
42
48
|
# Iterates an ordered range of non-overlapping selected columns passing each corresponding Wx::GRID::GridBlockCoords
|
43
49
|
# to the given block or returns an enumerator if no block given.
|
44
50
|
#
|
45
51
|
# For the grids using GridSelectColumn selection mode, iterates (possibly none) the coordinates of non-overlapping
|
46
52
|
# selected column blocks in the natural order, i.e. from smallest to the biggest column indices.
|
47
|
-
# @
|
48
|
-
#
|
49
|
-
|
53
|
+
# @overload each_selected_col_block(&block)
|
54
|
+
# @yieldparam [Wx::GRID::GridBlockCoords] selected_block
|
55
|
+
# @return [Object] result of last block execution
|
56
|
+
# @overload each_selected_col_block(&block)
|
57
|
+
# @return [Enumerator] enumerator
|
58
|
+
def each_selected_col_block(*) end
|
50
59
|
|
51
60
|
end
|
52
61
|
|