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
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wxruby3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Corino
|
@@ -562,7 +562,7 @@ files:
|
|
562
562
|
- rakelib/lib/director/html_listbox.rb
|
563
563
|
- rakelib/lib/director/html_printout.rb
|
564
564
|
- rakelib/lib/director/html_window.rb
|
565
|
-
- rakelib/lib/director/
|
565
|
+
- rakelib/lib/director/hvscrolled.rb
|
566
566
|
- rakelib/lib/director/hyperlink_ctrl.rb
|
567
567
|
- rakelib/lib/director/hyperlink_event.rb
|
568
568
|
- rakelib/lib/director/icon.rb
|
@@ -1166,6 +1166,7 @@ files:
|
|
1166
1166
|
- tests/test_persistence.rb
|
1167
1167
|
- tests/test_pg.rb
|
1168
1168
|
- tests/test_proof_check.rb
|
1169
|
+
- tests/test_propgrid.rb
|
1169
1170
|
- tests/test_richtext.rb
|
1170
1171
|
- tests/test_secret_store.rb
|
1171
1172
|
- tests/test_sizer.rb
|
@@ -1216,7 +1217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1216
1217
|
- !ruby/object:Gem::Version
|
1217
1218
|
version: '0'
|
1218
1219
|
requirements: []
|
1219
|
-
rubygems_version: 3.6.
|
1220
|
+
rubygems_version: 3.6.9
|
1220
1221
|
specification_version: 4
|
1221
1222
|
summary: wxWidgets extension for Ruby
|
1222
1223
|
test_files: []
|
@@ -1,140 +0,0 @@
|
|
1
|
-
# Copyright (c) 2023 M.J.N. Corino, The Netherlands
|
2
|
-
#
|
3
|
-
# This software is released under the MIT license.
|
4
|
-
|
5
|
-
###
|
6
|
-
# wxRuby3 wxWidgets interface director
|
7
|
-
###
|
8
|
-
|
9
|
-
require_relative './window'
|
10
|
-
|
11
|
-
module WXRuby3
|
12
|
-
|
13
|
-
class Director
|
14
|
-
|
15
|
-
class HVScrolledWindow < Window
|
16
|
-
|
17
|
-
def setup
|
18
|
-
super
|
19
|
-
spec.items << 'wxVarScrollHelperBase' << 'wxVarHVScrollHelper' <<
|
20
|
-
'wxVarVScrollHelper' << 'wxVScrolledWindow' <<
|
21
|
-
'wxVarHScrollHelper' << 'wxHScrolledWindow' <<
|
22
|
-
'wxPosition'
|
23
|
-
spec.override_inheritance_chain('wxVScrolledWindow', %w[wxPanel wxWindow wxEvtHandler wxObject])
|
24
|
-
spec.fold_bases('wxVScrolledWindow' => %w[wxVarVScrollHelper wxVarScrollHelperBase])
|
25
|
-
spec.make_abstract 'wxVScrolledWindow'
|
26
|
-
spec.force_proxy 'wxVScrolledWindow'
|
27
|
-
spec.override_inheritance_chain('wxHScrolledWindow', %w[wxPanel wxWindow wxEvtHandler wxObject])
|
28
|
-
spec.fold_bases('wxHScrolledWindow' => %w[wxVarHScrollHelper wxVarScrollHelperBase])
|
29
|
-
spec.make_abstract 'wxHScrolledWindow'
|
30
|
-
spec.force_proxy 'wxHScrolledWindow'
|
31
|
-
spec.override_inheritance_chain('wxHVScrolledWindow', %w[wxPanel wxWindow wxEvtHandler wxObject])
|
32
|
-
spec.fold_bases('wxHVScrolledWindow' => %w[wxVarHVScrollHelper wxVarHScrollHelper wxVarVScrollHelper wxVarScrollHelperBase])
|
33
|
-
spec.make_abstract 'wxHVScrolledWindow'
|
34
|
-
spec.force_proxy 'wxHVScrolledWindow'
|
35
|
-
# provide base implementations for pure virtuals
|
36
|
-
spec.add_header_code <<~__HEREDOC
|
37
|
-
// Custom subclass implementation.
|
38
|
-
class wxRubyVScrolledWindow : public wxVScrolledWindow
|
39
|
-
{
|
40
|
-
public:
|
41
|
-
wxRubyVScrolledWindow()
|
42
|
-
: wxVScrolledWindow () {}
|
43
|
-
wxRubyVScrolledWindow(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxPanelNameStr)
|
44
|
-
: wxVScrolledWindow(parent, id, pos, size, style, name) {}
|
45
|
-
protected:
|
46
|
-
virtual wxCoord OnGetRowHeight(size_t) const
|
47
|
-
{
|
48
|
-
return {};
|
49
|
-
}
|
50
|
-
};
|
51
|
-
|
52
|
-
// Custom subclass implementation.
|
53
|
-
class wxRubyHScrolledWindow : public wxHScrolledWindow
|
54
|
-
{
|
55
|
-
public:
|
56
|
-
wxRubyHScrolledWindow()
|
57
|
-
: wxHScrolledWindow () {}
|
58
|
-
wxRubyHScrolledWindow(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxPanelNameStr)
|
59
|
-
: wxHScrolledWindow(parent, id, pos, size, style, name) {}
|
60
|
-
protected:
|
61
|
-
virtual wxCoord OnGetColumnWidth(size_t) const
|
62
|
-
{
|
63
|
-
return {};
|
64
|
-
}
|
65
|
-
};
|
66
|
-
|
67
|
-
// Custom subclass implementation.
|
68
|
-
class wxRubyHVScrolledWindow : public wxHVScrolledWindow
|
69
|
-
{
|
70
|
-
public:
|
71
|
-
wxRubyHVScrolledWindow()
|
72
|
-
: wxHVScrolledWindow () {}
|
73
|
-
wxRubyHVScrolledWindow(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxPanelNameStr)
|
74
|
-
: wxHVScrolledWindow(parent, id, pos, size, style, name) {}
|
75
|
-
protected:
|
76
|
-
virtual wxCoord OnGetRowHeight(size_t) const
|
77
|
-
{
|
78
|
-
return {};
|
79
|
-
}
|
80
|
-
virtual wxCoord OnGetColumnWidth(size_t) const
|
81
|
-
{
|
82
|
-
return {};
|
83
|
-
}
|
84
|
-
};
|
85
|
-
__HEREDOC
|
86
|
-
# make Ruby director and wrappers use custom implementation
|
87
|
-
spec.use_class_implementation('wxVScrolledWindow', 'wxRubyVScrolledWindow')
|
88
|
-
spec.use_class_implementation('wxHScrolledWindow', 'wxRubyHScrolledWindow')
|
89
|
-
spec.use_class_implementation('wxHVScrolledWindow', 'wxRubyHVScrolledWindow')
|
90
|
-
# regard protected methods
|
91
|
-
spec.regard 'wxVarVScrollHelper::OnGetRowHeight',
|
92
|
-
'wxVarVScrollHelper::OnGetRowsHeightHint'
|
93
|
-
spec.regard 'wxVarHScrollHelper::OnGetColumnWidth',
|
94
|
-
'wxVarHScrollHelper::OnGetColumnsWidthHint'
|
95
|
-
# ignore internal implementation methods
|
96
|
-
spec.ignore 'wxVarScrollHelperBase::GetNonOrientationTargetSize',
|
97
|
-
'wxVarScrollHelperBase::GetOrientation',
|
98
|
-
'wxVarScrollHelperBase::GetOrientationTargetSize',
|
99
|
-
'wxVarScrollHelperBase::OnGetUnitSize',
|
100
|
-
'wxVarScrollHelperBase::CalcScrolledPosition',
|
101
|
-
'wxVarScrollHelperBase::CalcUnscrolledPosition',
|
102
|
-
'wxVarScrollHelperBase::GetTargetWindow',
|
103
|
-
'wxVarScrollHelperBase::SetTargetWindow',
|
104
|
-
'wxVarScrollHelperBase::UpdateScrollbar',
|
105
|
-
'wxVarScrollHelperBase::RefreshAll'
|
106
|
-
spec.map 'const wxPosition&' => 'Array(Integer, Integer), Wx::Position' do
|
107
|
-
add_header_code '#include <memory>'
|
108
|
-
map_in temp: 'std::unique_ptr<$1_basetype> tmp', code: <<~__CODE
|
109
|
-
if ( TYPE($input) == T_DATA )
|
110
|
-
{
|
111
|
-
void* argp$argnum;
|
112
|
-
SWIG_ConvertPtr($input, &argp$argnum, $1_descriptor, 0);
|
113
|
-
$1 = reinterpret_cast< $1_basetype * >(argp$argnum);
|
114
|
-
}
|
115
|
-
else if ( TYPE($input) == T_ARRAY )
|
116
|
-
{
|
117
|
-
$1 = new $1_basetype( NUM2INT( rb_ary_entry($input, 0) ),
|
118
|
-
NUM2INT( rb_ary_entry($input, 1) ) );
|
119
|
-
tmp.reset($1); // auto destruct when method scope ends
|
120
|
-
}
|
121
|
-
else
|
122
|
-
{
|
123
|
-
rb_raise(rb_eTypeError, "Wrong type for $1_basetype parameter");
|
124
|
-
}
|
125
|
-
__CODE
|
126
|
-
map_typecheck precedence: 'POINTER', code: <<~__CODE
|
127
|
-
void *vptr = 0;
|
128
|
-
$1 = 0;
|
129
|
-
if (TYPE($input) == T_ARRAY && RARRAY_LEN($input) == 2)
|
130
|
-
$1 = 1;
|
131
|
-
else if (TYPE($input) == T_DATA && SWIG_CheckState (SWIG_ConvertPtr ($input, &vptr, $1_descriptor, 0)))
|
132
|
-
$1 = 1;
|
133
|
-
__CODE
|
134
|
-
end
|
135
|
-
end
|
136
|
-
end # class HVScrolledWindow
|
137
|
-
|
138
|
-
end # class Director
|
139
|
-
|
140
|
-
end # module WXRuby3
|