wxruby3 1.5.4 → 1.6.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/ext/wxruby3/swig/RubyStockObjects.i +1 -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/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 +18 -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 +1 -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 +1 -1
- data/lib/wx/version.rb +1 -1
- data/rakelib/lib/config/mingw.rb +1 -1
- data/rakelib/lib/config.rb +6 -0
- 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/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 +6 -5
- data/rakelib/lib/director/hvscrolled_window.rb +140 -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 +2 -2
- data/rakelib/lib/director/pgeditor.rb +1 -1
- data/rakelib/lib/director/pgproperties.rb +4 -4
- data/rakelib/lib/director/pgproperty.rb +1 -1
- 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 +2 -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/tree_ctrl.rb +1 -1
- data/rakelib/lib/director/utils.rb +1 -1
- data/rakelib/lib/director/variant.rb +1 -1
- data/rakelib/lib/director/vlistbox.rb +5 -3
- data/rakelib/lib/director/window.rb +14 -3
- 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 +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
- metadata +12 -6
- 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
data/lib/wx/doc/notebook.rb
CHANGED
@@ -12,9 +12,12 @@ module Wx
|
|
12
12
|
# Iterate each notebook page.
|
13
13
|
# Passes each page to the given block.
|
14
14
|
# Returns an Enumerator if no block given.
|
15
|
-
# @
|
16
|
-
#
|
17
|
-
|
15
|
+
# @overload each_page(&block)
|
16
|
+
# @yieldparam [Wx::Window] page notebook page
|
17
|
+
# @return [Object] last result of block
|
18
|
+
# @overload each_page()
|
19
|
+
# @return [Enumerator] enumerator
|
20
|
+
def each_page(*) end
|
18
21
|
|
19
22
|
end
|
20
23
|
|
@@ -16,9 +16,12 @@ module Wx::PG
|
|
16
16
|
# Iterate each attribute.
|
17
17
|
# Passes the variant for each attribute to the given block.
|
18
18
|
# Returns an Enumerator if no block given.
|
19
|
-
# @
|
20
|
-
#
|
21
|
-
|
19
|
+
# @overload each_attribute(&block)
|
20
|
+
# @yieldparam [Wx::Variant] variant attribute's variant
|
21
|
+
# @return [Object] last result of block
|
22
|
+
# @overload each_attribute()
|
23
|
+
# @return [Enumerator] enumerator
|
24
|
+
def each_attribute(*) end
|
22
25
|
|
23
26
|
end
|
24
27
|
|
@@ -27,16 +30,22 @@ module Wx::PG
|
|
27
30
|
# Iterate each label.
|
28
31
|
# Passes each label string to the given block.
|
29
32
|
# Returns an Enumerator if no block given.
|
30
|
-
# @
|
31
|
-
#
|
32
|
-
|
33
|
+
# @overload each_label(&block)
|
34
|
+
# @yieldparam [String] label label string
|
35
|
+
# @return [Object] last result of block
|
36
|
+
# @overload each_label()
|
37
|
+
# @return [Enumerator] enumerator
|
38
|
+
def each_label(*) end
|
33
39
|
|
34
40
|
# Iterate each choice entry.
|
35
41
|
# Passes each choice entry to the given block.
|
36
42
|
# Returns an Enumerator if no block given.
|
37
|
-
# @
|
38
|
-
#
|
39
|
-
|
43
|
+
# @overload each_entry(&block)
|
44
|
+
# @yieldparam [Wx::PG::ChoiceEntry] entry choice entry
|
45
|
+
# @return [Object] last result of block
|
46
|
+
# @overload each_entry()
|
47
|
+
# @return [Enumerator] enumerator
|
48
|
+
def each_entry(*) end
|
40
49
|
|
41
50
|
end
|
42
51
|
|
@@ -13,18 +13,18 @@ module Wx::PG
|
|
13
13
|
# each property to the block.
|
14
14
|
# Returns an enumerator when no block is given.
|
15
15
|
# The start position defaults to Wx::TOP for forward iteration and Wx::BOTTOM for reverse iteration.
|
16
|
-
# @overload each_property(flags, start, reverse
|
16
|
+
# @overload each_property(flags, start, reverse, &block)
|
17
17
|
# @param flags [Integer] flags specifying iteration (see {Wx::PG::PG_ITERATOR_FLAGS})
|
18
18
|
# @param start [Integer,Wx::PG::Property] start position (either {Wx::Direction::TOP} or {Wx::Direction::BOTTOM} or the property to start at)
|
19
19
|
# @param reverse [true,false] iterate properties in reverse
|
20
20
|
# @yieldparam item [Wx::PG::PGProperty] property
|
21
21
|
# @return [::Object] result of last block execution
|
22
|
-
# @overload each_property(flags, start, reverse
|
22
|
+
# @overload each_property(flags, start, reverse)
|
23
23
|
# @param flags [Integer] flags specifying iteration (see {Wx::PG::PG_ITERATOR_FLAGS})
|
24
24
|
# @param start [Integer,Wx::PG::Property] start position (either {Wx::Direction::TOP} or {Wx::Direction::BOTTOM} or the property to start at)
|
25
25
|
# @param reverse [true,false] iterate properties in reverse
|
26
26
|
# @return [Enumerator] an enumerator
|
27
|
-
def each_property(flags = Wx::PG::PG_ITERATE_DEFAULT, start = nil, reverse
|
27
|
+
def each_property(flags = Wx::PG::PG_ITERATE_DEFAULT, start = nil, reverse = false, &block) end
|
28
28
|
alias :properties :each_property
|
29
29
|
|
30
30
|
# Convenience method to perform reverse iteration.
|
@@ -54,7 +54,7 @@ module Wx::PG
|
|
54
54
|
# @overload each_property_attribute(id)
|
55
55
|
# @param id [String,Wx::PG::PGProperty] (name of) property to iterate attributes of
|
56
56
|
# @return [Enumerator] an enumerator
|
57
|
-
def each_property_attribute
|
57
|
+
def each_property_attribute(id) end
|
58
58
|
alias :property_attributes :each_property_attribute
|
59
59
|
|
60
60
|
# Returns the current grid state.
|
@@ -13,9 +13,12 @@ module Wx
|
|
13
13
|
|
14
14
|
# Yield each child object to the given block.
|
15
15
|
# Returns an Enumerator if no block given.
|
16
|
-
# @
|
17
|
-
#
|
18
|
-
|
16
|
+
# @overload each_child(&block)
|
17
|
+
# @yieldparam [Wx::RTC::RichTextObject] child the child object yielded
|
18
|
+
# @return [Object] last result of block
|
19
|
+
# @overload each_child()
|
20
|
+
# @return [Enumerator] enumerator
|
21
|
+
def each_child(*) end
|
19
22
|
|
20
23
|
end
|
21
24
|
|
@@ -13,9 +13,12 @@ module Wx
|
|
13
13
|
|
14
14
|
# Yield each line to the given block.
|
15
15
|
# Returns an Enumerator if no block given.
|
16
|
-
# @
|
17
|
-
#
|
18
|
-
|
16
|
+
# @overload each_line(&block)
|
17
|
+
# @yieldparam [String] line the line yielded
|
18
|
+
# @return [Object] last result of block
|
19
|
+
# @overload each_line()
|
20
|
+
# @return [Enumerator] enumerator
|
21
|
+
def each_line(*) end
|
19
22
|
|
20
23
|
end
|
21
24
|
|
@@ -13,9 +13,12 @@ module Wx
|
|
13
13
|
|
14
14
|
# Yield each line to the given block.
|
15
15
|
# Returns an Enumerator if no block given.
|
16
|
-
# @
|
17
|
-
#
|
18
|
-
|
16
|
+
# @overload each_line(&block)
|
17
|
+
# @yieldparam [Wx::RTC::RichTextLine] line the line yielded
|
18
|
+
# @return [Object] last result of block
|
19
|
+
# @overload each_line()
|
20
|
+
# @return [Enumerator] enumerator
|
21
|
+
def each_line(*) end
|
19
22
|
|
20
23
|
end
|
21
24
|
|
data/lib/wx/doc/sizer.rb
CHANGED
@@ -11,9 +11,12 @@ module Wx
|
|
11
11
|
|
12
12
|
# Yield each child item to the given block.
|
13
13
|
# Returns an Enumerator if no block given.
|
14
|
-
# @
|
15
|
-
#
|
16
|
-
|
14
|
+
# @overload each_child(&block)
|
15
|
+
# @yieldparam [Wx::SizerItem] child the child item yielded
|
16
|
+
# @return [Object] last result of block
|
17
|
+
# @overload each_child()
|
18
|
+
# @return [Enumerator] enumerator
|
19
|
+
def each_child(*) end
|
17
20
|
|
18
21
|
end
|
19
22
|
|
@@ -13,9 +13,12 @@ module Wx
|
|
13
13
|
|
14
14
|
# Yield each line to the given block.
|
15
15
|
# Returns an Enumerator if no block given.
|
16
|
-
# @
|
17
|
-
#
|
18
|
-
|
16
|
+
# @overload each_line(&block)
|
17
|
+
# @yieldparam [String] line the line yielded
|
18
|
+
# @return [Object] last result of block
|
19
|
+
# @overload each_line()
|
20
|
+
# @return [Enumerator] enumerator
|
21
|
+
def each_line(*) end
|
19
22
|
|
20
23
|
end
|
21
24
|
|
data/lib/wx/doc/textctrl.rb
CHANGED
@@ -68,9 +68,12 @@ module Wx
|
|
68
68
|
|
69
69
|
# Yield each line to the given block.
|
70
70
|
# Returns an Enumerator if no block given.
|
71
|
-
# @
|
72
|
-
#
|
73
|
-
|
71
|
+
# @overload each_line(&block)
|
72
|
+
# @yieldparam [String] line the line yielded
|
73
|
+
# @return [Object] last result of block
|
74
|
+
# @overload each_line()
|
75
|
+
# @return [Enumerator] enumerator
|
76
|
+
def each_line(*) end
|
74
77
|
|
75
78
|
# @overload enable_proof_check(text_proof_options = Wx::TextProofOptions.default)
|
76
79
|
# Enable or disable native spell checking on this text control if it is available on the current platform.
|
data/lib/wx/doc/tree_ctrl.rb
CHANGED
@@ -43,9 +43,13 @@ module Wx
|
|
43
43
|
|
44
44
|
# Iterate all child items of the given parent and yield it's id to the given block.
|
45
45
|
# Returns an Enumerator if no block given.
|
46
|
-
# @
|
47
|
-
#
|
48
|
-
#
|
46
|
+
# @overload each_item_child(parent_id, &block)
|
47
|
+
# @param [Wx::TreeItemId] parent_id
|
48
|
+
# @yieldparam [Wx::TreeItemId] child_id the child tree item id yielded
|
49
|
+
# @return [Object] last result of block
|
50
|
+
# @overload each_item_child(parent_id)
|
51
|
+
# @param [Wx::TreeItemId] parent_id
|
52
|
+
# @return [Enumerator] enumerator
|
49
53
|
def each_item_child(parent_id) end
|
50
54
|
|
51
55
|
# Returns an array of tree item ids of the child items of the given parent.
|
data/lib/wx/doc/v_list_box.rb
CHANGED
@@ -10,9 +10,12 @@ module Wx
|
|
10
10
|
class VListBox
|
11
11
|
|
12
12
|
# Iterate selected items. Returns Enumerator if no block given.
|
13
|
-
# @
|
14
|
-
#
|
15
|
-
|
13
|
+
# @overload each_selected(&block)
|
14
|
+
# @yieldparam [Integer] sel selected item index
|
15
|
+
# @return [Object] last return value of block
|
16
|
+
# @overload each_selected()
|
17
|
+
# @return [Enumerator] enumerator
|
18
|
+
def each_selected(*) end
|
16
19
|
|
17
20
|
end
|
18
21
|
|
data/lib/wx/doc/variant.rb
CHANGED
data/lib/wx/doc/vboxsizer.rb
CHANGED
@@ -11,8 +11,39 @@ module Wx
|
|
11
11
|
class VBoxSizer < Wx::BoxSizer
|
12
12
|
|
13
13
|
# Constructor for a {Wx::VBoxSizer}.
|
14
|
-
# @
|
15
|
-
|
14
|
+
# @overload initialize(&block)
|
15
|
+
# @yieldparam [Wx::VBoxSizer] sizer new VBoxSizer instance
|
16
|
+
# @return [Wx::VBoxSizer]
|
17
|
+
# @overload initialize()
|
18
|
+
# @return [Wx::VBoxSizer]
|
19
|
+
def initialize(*) end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
# Just a shortcut version for creating a vertical staticbox sizer
|
24
|
+
class VStaticBoxSizer < StaticBoxSizer
|
25
|
+
|
26
|
+
# @overload initialize(box, &block)
|
27
|
+
# This constructor uses an already existing static box.
|
28
|
+
# @param box [Wx::StaticBox] The static box to associate with the sizer (which will take its ownership).
|
29
|
+
# @yieldparam [Wx::VStaticBoxSizer] sizer new VStaticBoxSizer instance
|
30
|
+
# @return [Wx::VStaticBoxSizer]
|
31
|
+
# @overload initialize(box)
|
32
|
+
# This constructor uses an already existing static box.
|
33
|
+
# @param box [Wx::StaticBox] The static box to associate with the sizer (which will take its ownership).
|
34
|
+
# @return [Wx::VStaticBoxSizer]
|
35
|
+
# @overload initialize(parent, label=(''), &block)
|
36
|
+
# This constructor creates a new static box with the given label and parent window.
|
37
|
+
# @param parent [Wx::Window]
|
38
|
+
# @param label [String]
|
39
|
+
# @yieldparam [Wx::VStaticBoxSizer] sizer new VStaticBoxSizer instance
|
40
|
+
# @return [Wx::VStaticBoxSizer]
|
41
|
+
# @overload initialize(parent, label=(''))
|
42
|
+
# This constructor creates a new static box with the given label and parent window.
|
43
|
+
# @param parent [Wx::Window]
|
44
|
+
# @param label [String]
|
45
|
+
# @return [Wx::VStaticBoxSizer]
|
46
|
+
def initialize(*args) end
|
16
47
|
|
17
48
|
end
|
18
49
|
|
@@ -24,9 +55,14 @@ module Wx
|
|
24
55
|
# item on each line to use any remaining space on that line and {Wx::REMOVE_LEADING_SPACES} which removes any spacer
|
25
56
|
# elements from the beginning of a row.
|
26
57
|
# Both of these flags are on by default.
|
27
|
-
# @
|
28
|
-
#
|
29
|
-
|
58
|
+
# @overload initialize(flags=Wx::WRAPSIZER_DEFAULT_FLAGS, &block)
|
59
|
+
# @param flags [Integer]
|
60
|
+
# @yieldparam [Wx::VWrapSizer] sizer new VWrapSizer instance
|
61
|
+
# @return [Wx::VWrapSizer]
|
62
|
+
# @overload initialize(flags=Wx::WRAPSIZER_DEFAULT_FLAGS)
|
63
|
+
# @param flags [Integer]
|
64
|
+
# @return [Wx::VWrapSizer]
|
65
|
+
def initialize(flags) end
|
30
66
|
|
31
67
|
end
|
32
68
|
|
data/lib/wx/doc/window.rb
CHANGED
@@ -56,9 +56,12 @@ module Wx
|
|
56
56
|
|
57
57
|
# Yield each child window to the given block.
|
58
58
|
# Returns an Enumerator if no block given.
|
59
|
-
# @
|
60
|
-
#
|
61
|
-
|
59
|
+
# @overload each_child(&block)
|
60
|
+
# @yieldparam [Wx::Window] child the child window yielded
|
61
|
+
# @return [Object] last result of block
|
62
|
+
# @overload each_child()
|
63
|
+
# @return [Enumerator] enumerator
|
64
|
+
def each_child(*) end
|
62
65
|
|
63
66
|
# Locks the window from updates while executing the given block.
|
64
67
|
# @param [Proc] block
|
data/lib/wx/helpers.rb
CHANGED
@@ -66,4 +66,32 @@ module Wx
|
|
66
66
|
def self.has_feature?(featsym)
|
67
67
|
Wx::Setup.const_defined?(featsym) && !!Wx::Setup.const_get(featsym)
|
68
68
|
end
|
69
|
+
|
70
|
+
# returns true if WXWIDGETS_VERSION >= ver
|
71
|
+
# ver can be string or array of 3 integers
|
72
|
+
def self.at_least_wxwidgets?(ver)
|
73
|
+
ver = ver.split('.').collect {|s| s.to_i } unless ::Array === ver
|
74
|
+
([ Wx::WXWIDGETS_MAJOR_VERSION, Wx::WXWIDGETS_MINOR_VERSION, Wx::WXWIDGETS_RELEASE_NUMBER ] <=> ver) >= 0
|
75
|
+
end
|
76
|
+
|
77
|
+
# returns true if WXWIDGETS_VERSION <= ver
|
78
|
+
# ver can be string or array of 3 integers
|
79
|
+
def self.up_to_wxwidgets?(ver)
|
80
|
+
ver = ver.split('.').collect {|s| s.to_i } unless ::Array === ver
|
81
|
+
([ Wx::WXWIDGETS_MAJOR_VERSION, Wx::WXWIDGETS_MINOR_VERSION, Wx::WXWIDGETS_RELEASE_NUMBER ] <=> ver) <= 0
|
82
|
+
end
|
83
|
+
|
84
|
+
# returns true if WXWIDGETS_VERSION < ver
|
85
|
+
# ver can be string or array of 3 integers
|
86
|
+
def self.before_wxwidgets?(ver)
|
87
|
+
ver = ver.split('.').collect {|s| s.to_i } unless ::Array === ver
|
88
|
+
([ Wx::WXWIDGETS_MAJOR_VERSION, Wx::WXWIDGETS_MINOR_VERSION, Wx::WXWIDGETS_RELEASE_NUMBER ] <=> ver) < 0
|
89
|
+
end
|
90
|
+
|
91
|
+
# returns true if WXWIDGETS_VERSION > ver
|
92
|
+
# ver can be string or array of 3 integers
|
93
|
+
def self.after_wxwidgets?(ver)
|
94
|
+
ver = ver.split('.').collect {|s| s.to_i } unless ::Array === ver
|
95
|
+
([ Wx::WXWIDGETS_MAJOR_VERSION, Wx::WXWIDGETS_MINOR_VERSION, Wx::WXWIDGETS_RELEASE_NUMBER ] <=> ver) > 0
|
96
|
+
end
|
69
97
|
end
|
data/lib/wx/keyword_ctors.rb
CHANGED
@@ -71,7 +71,7 @@ module Wx
|
|
71
71
|
# by the Rails #class_attribute method.
|
72
72
|
module ParamSpec
|
73
73
|
|
74
|
-
if RUBY_VERSION
|
74
|
+
if (RUBY_VERSION.split('.').collect {|v| v.to_i} <=> [2,7,0]) < 0
|
75
75
|
PARAM_SPEC_ARG = [:param_spec]
|
76
76
|
else
|
77
77
|
PARAM_SPEC_ARG = [:param_spec, false]
|
@@ -164,7 +164,7 @@ module Wx
|
|
164
164
|
end
|
165
165
|
end
|
166
166
|
|
167
|
-
if RUBY_VERSION
|
167
|
+
if (RUBY_VERSION.split('.').collect {|v| v.to_i} <=> [3,0,0]) <= 0
|
168
168
|
def args_as_list(*mixed_args)
|
169
169
|
Wx::args_as_list(param_spec, *mixed_args)
|
170
170
|
end
|
data/lib/wx/keyword_defs.rb
CHANGED
@@ -389,8 +389,7 @@ end
|
|
389
389
|
|
390
390
|
# wxGenericDirCtrl A control for displaying a directory tree
|
391
391
|
Wx::define_keyword_ctors(Wx::GenericDirCtrl) do
|
392
|
-
|
393
|
-
wx_ctor_params :id, :dir => ''
|
392
|
+
wx_ctor_params :id, :dir => Wx::DIR_DIALOG_DEFAULT_FOLDER_STR
|
394
393
|
wx_ctor_params :pos, :size,
|
395
394
|
:style => Wx::DIRCTRL_3D_INTERNAL|Wx::SUNKEN_BORDER
|
396
395
|
wx_ctor_params :filter => ''
|
@@ -517,6 +516,16 @@ Wx::define_keyword_ctors(Wx::HyperlinkCtrl) do
|
|
517
516
|
wx_ctor_params :name => Wx::HYPERLINK_CTRL_NAME_STR
|
518
517
|
end
|
519
518
|
|
519
|
+
# HyperlinkCtrl is identical to GenericHyperlinkCtrl on MacOS
|
520
|
+
unless Wx::PLATFORM == 'WXOSX'
|
521
|
+
Wx::define_keyword_ctors(Wx::GenericHyperlinkCtrl) do
|
522
|
+
wx_ctor_params :id, :label => ''
|
523
|
+
wx_ctor_params :url => ''
|
524
|
+
wx_ctor_params :pos, :size, :style => Wx::HL_DEFAULT_STYLE
|
525
|
+
wx_ctor_params :name => Wx::HYPERLINK_CTRL_NAME_STR
|
526
|
+
end
|
527
|
+
end
|
528
|
+
|
520
529
|
Wx::define_keyword_ctors(Wx::CollapsiblePane) do
|
521
530
|
wx_ctor_params :id, :label => ''
|
522
531
|
wx_ctor_params :pos, :size, :style => 0
|
data/lib/wx/pg/pg_property.rb
CHANGED
@@ -14,7 +14,7 @@ module Wx::PG
|
|
14
14
|
|
15
15
|
PG_DEFAULT_IMAGE_SIZE = Wx::DEFAULT_SIZE
|
16
16
|
|
17
|
-
if Wx
|
17
|
+
if Wx.at_least_wxwidgets?('3.3.0')
|
18
18
|
# backward compatibility constants
|
19
19
|
PG_FULL_VALUE = PGPropValFormatFlags::FullValue
|
20
20
|
PG_REPORT_ERROR = PGPropValFormatFlags::ReportError
|
data/lib/wx/version.rb
CHANGED
data/rakelib/lib/config/mingw.rb
CHANGED
@@ -177,7 +177,7 @@ module WXRuby3
|
|
177
177
|
@rescomp << ' --define __WXMSW__ --define wxUSE_DPI_AWARE_MANIFEST=2 --define wxUSE_RC_MANIFEST=1 --define ISOLATION_AWARE_ENABLED'
|
178
178
|
@rescomp << ' --define WXUSINGDLL'
|
179
179
|
@extra_cflags << '-DISOLATION_AWARE_ENABLED'
|
180
|
-
if
|
180
|
+
if wx_version_check('3.3.0') >= 0
|
181
181
|
@extra_cflags << '-D_UNICODE' << '-DUNICODE'
|
182
182
|
end
|
183
183
|
end
|
data/rakelib/lib/config.rb
CHANGED
@@ -728,6 +728,12 @@ module WXRuby3
|
|
728
728
|
@wx_version || ''
|
729
729
|
end
|
730
730
|
|
731
|
+
def wx_version_check(ver)
|
732
|
+
@wx_version_list ||= (@wx_version || '0.0.0').split('.').collect {|s| s.to_i }
|
733
|
+
ver = ver.split('.').collect {|s| s.to_i } unless ::Array === ver
|
734
|
+
@wx_version_list <=> ver
|
735
|
+
end
|
736
|
+
|
731
737
|
def mingw?
|
732
738
|
@platform == :mingw
|
733
739
|
end
|
@@ -19,6 +19,39 @@ module WXRuby3
|
|
19
19
|
spec.disable_proxies
|
20
20
|
|
21
21
|
spec.map_apply 'int * OUTPUT' => ['wxDouble *']
|
22
|
+
spec.ignore 'wxAffineMatrix2DBase::TransformPoint(wxDouble*, wxDouble*)',
|
23
|
+
'wxAffineMatrix2DBase::TransformDistance(wxDouble*, wxDouble*)'
|
24
|
+
|
25
|
+
spec.map 'wxPoint2DDouble&' => 'Array(Float, Float), Wx::Point2DDouble' do
|
26
|
+
add_header_code '#include <memory>'
|
27
|
+
map_in temp: 'std::unique_ptr<$1_basetype> tmp', code: <<~__CODE
|
28
|
+
if ( TYPE($input) == T_DATA )
|
29
|
+
{
|
30
|
+
void* argp$argnum;
|
31
|
+
SWIG_ConvertPtr($input, &argp$argnum, $1_descriptor, 0);
|
32
|
+
$1 = reinterpret_cast< $1_basetype * >(argp$argnum);
|
33
|
+
}
|
34
|
+
else if ( TYPE($input) == T_ARRAY )
|
35
|
+
{
|
36
|
+
$1 = new $1_basetype( NUM2DBL( rb_ary_entry($input, 0) ),
|
37
|
+
NUM2DBL( rb_ary_entry($input, 1) ) );
|
38
|
+
tmp.reset($1); // auto destruct when method scope ends
|
39
|
+
}
|
40
|
+
else
|
41
|
+
{
|
42
|
+
rb_raise(rb_eTypeError, "Wrong type for $1_basetype parameter");
|
43
|
+
}
|
44
|
+
__CODE
|
45
|
+
map_typecheck precedence: 'POINTER', code: <<~__CODE
|
46
|
+
void *vptr = 0;
|
47
|
+
$1 = 0;
|
48
|
+
if (TYPE($input) == T_ARRAY && RARRAY_LEN($input) == 2)
|
49
|
+
$1 = 1;
|
50
|
+
else if (TYPE($input) == T_DATA && SWIG_CheckState (SWIG_ConvertPtr ($input, &vptr, $1_descriptor, 0)))
|
51
|
+
$1 = 1;
|
52
|
+
__CODE
|
53
|
+
end
|
54
|
+
|
22
55
|
spec.map 'wxPoint2DDouble *' => 'Wx::Point2DDouble' do
|
23
56
|
map_in ignore: true, temp: 'wxPoint2DDouble tmp', code: '$1 = &tmp;'
|
24
57
|
|
@@ -21,7 +21,7 @@ module WXRuby3
|
|
21
21
|
spec.items << 'wxGenericAnimationCtrl'
|
22
22
|
spec.include 'wx/animate.h'
|
23
23
|
spec.include 'wx/generic/animate.h'
|
24
|
-
if Config.instance.
|
24
|
+
if Config.instance.wx_version_check('3.3.0') >= 0
|
25
25
|
spec.items << 'wxAnimationBundle'
|
26
26
|
spec.ignore 'wxAnimationBundle::GetAll', ignore_doc: false
|
27
27
|
spec.add_extend_code 'wxAnimationBundle', <<~__HEREDOC
|
data/rakelib/lib/director/app.rb
CHANGED
@@ -16,7 +16,7 @@ module WXRuby3
|
|
16
16
|
|
17
17
|
def setup
|
18
18
|
spec.items << 'wxAppConsole' << 'wxEventFilter'
|
19
|
-
if Config.instance.
|
19
|
+
if Config.instance.wx_version_check('3.3.0') >= 0
|
20
20
|
spec.items << 'wxDarkModeSettings'
|
21
21
|
spec.ignore_unless('WXMSW', 'wxDarkModeSettings', 'wxMenuColour')
|
22
22
|
if Config.instance.features_set?('WXMSW')
|
@@ -17,7 +17,7 @@ module WXRuby3
|
|
17
17
|
def setup
|
18
18
|
super
|
19
19
|
spec.gc_as_object 'wxAuiManager'
|
20
|
-
if Config.instance.
|
20
|
+
if Config.instance.wx_version_check('3.3.0') >= 0
|
21
21
|
spec.items << 'wxAuiBookSerializer' << 'wxAuiSerializer' <<
|
22
22
|
'wxAuiDockLayoutInfo' << 'wxAuiPaneLayoutInfo' << 'wxAuiTabLayoutInfo' <<
|
23
23
|
'wxAuiBookDeserializer' << 'wxAuiDeserializer'
|
@@ -303,7 +303,7 @@ module WXRuby3
|
|
303
303
|
|
304
304
|
def gen_class_doc_members(fdoc, clsdef, cls_members, alias_methods)
|
305
305
|
super
|
306
|
-
if Config.instance.
|
306
|
+
if Config.instance.wx_version_check('3.3.0') >= 0 && clsdef.name == 'wxAuiTabLayoutInfo'
|
307
307
|
fdoc.doc.puts 'Returns the indices of the pages in this tab control in their order on screen.'
|
308
308
|
fdoc.doc.puts 'If this array is empty, it means that the tab control contains all notebook pages in natural order.'
|
309
309
|
fdoc.doc.puts '@return [::Array<Integer>] indices of the pages in this tab control'
|
@@ -24,7 +24,7 @@ module WXRuby3
|
|
24
24
|
wxAuiNotebookPage::tooltip
|
25
25
|
wxAuiNotebookPage::bitmap
|
26
26
|
wxAuiNotebookPage::active]
|
27
|
-
if Config.instance.
|
27
|
+
if Config.instance.wx_version_check('3.3.0') >= 0
|
28
28
|
spec.items << 'wxAuiNotebookPosition'
|
29
29
|
spec.regard 'wxAuiNotebookPosition::tabCtrl',
|
30
30
|
'wxAuiNotebookPosition::tabIdx'
|
@@ -14,7 +14,7 @@ module WXRuby3
|
|
14
14
|
|
15
15
|
def setup
|
16
16
|
super
|
17
|
-
if Config.instance.
|
17
|
+
if Config.instance.wx_version_check('3.3.0') >= 0
|
18
18
|
spec.items << 'wxAuiFlatTabArt' << 'wxAuiSimpleTabArt'
|
19
19
|
spec.ignore 'wxAuiDefaultTabArt', 'wxAuiNativeTabArt'
|
20
20
|
else
|
@@ -117,7 +117,7 @@ module WXRuby3
|
|
117
117
|
|
118
118
|
def gen_interface_classes(fout)
|
119
119
|
super
|
120
|
-
if Config.instance.
|
120
|
+
if Config.instance.wx_version_check('3.3.0') >= 0
|
121
121
|
fout.puts
|
122
122
|
fout.puts 'class wxAuiNativeTabArt : public wxAuiTabArt'
|
123
123
|
fout.puts '{'
|
@@ -130,7 +130,7 @@ module WXRuby3
|
|
130
130
|
class AuiTabArtDocGenerator < DocGenerator
|
131
131
|
def gen_class_doc(fdoc)
|
132
132
|
super
|
133
|
-
if Config.instance.
|
133
|
+
if Config.instance.wx_version_check('3.3.0') >= 0
|
134
134
|
fdoc.doc.puts 'Wx::AUI::AuiNativeTabArt is either an art provider providing native-like appearance (WXMSW and WXGTK) or a generic Tab Art provider if not available.'
|
135
135
|
fdoc.puts 'class AuiNativeTabArt < AuiTabArt; end'
|
136
136
|
fdoc.puts
|
@@ -138,7 +138,7 @@ module WXRuby3
|
|
138
138
|
end
|
139
139
|
def gen_constants_doc(fdoc)
|
140
140
|
super
|
141
|
-
if Config.instance.
|
141
|
+
if Config.instance.wx_version_check('3.3.0') >= 0
|
142
142
|
fdoc.doc.puts 'Wx::AUI::AuiDefaultTabArt is an alias for the tab art provider used by {Wx::AUI::AuiNotebook} by default.'
|
143
143
|
fdoc.doc.puts 'Since wxWidgets 3.3.0, this is {Wx::AUI::AuiFlatTabArt} under all platforms. In the previous versions, this was wxAuiNativeTabArt.'
|
144
144
|
fdoc.puts 'AuiDefaultTabArt = Wx::AUI::AuiFlatTabArt'
|
@@ -54,7 +54,7 @@ module WXRuby3
|
|
54
54
|
'wxItemContainer::Append(const wxArrayString &, wxClientData **)',
|
55
55
|
'wxItemContainer::Insert(const wxArrayString &, unsigned int, wxClientData **)',
|
56
56
|
'wxItemContainer::Set(const wxArrayString &, wxClientData **)'], ignore_doc: false)
|
57
|
-
if Config.instance.
|
57
|
+
if Config.instance.wx_version_check('3.3.0') < 0
|
58
58
|
# add undocumented method
|
59
59
|
spec.extend_interface 'wxControlWithItems',
|
60
60
|
'bool IsSorted() const'
|
@@ -21,8 +21,18 @@ module WXRuby3
|
|
21
21
|
'wxCursor::wxCursor(const char *const *)',
|
22
22
|
'wxCursor::wxCursor(const wxCursor &)'
|
23
23
|
spec.ignore 'wxCursor::wxCursor(const char *const *)'
|
24
|
-
if Config.instance.
|
24
|
+
if Config.instance.wx_version_check('3.3.0') >= 0
|
25
25
|
spec.ignore 'wxCursor::wxCursor(const char[],int,int,int,int,const char[], const wxColour*, const wxColour*)'
|
26
|
+
|
27
|
+
spec.items << 'wxCursorBundle'
|
28
|
+
spec.gc_as_untracked 'wxCursorBundle'
|
29
|
+
# all but the default ctor require a running App
|
30
|
+
spec.require_app 'wxCursorBundle::wxCursorBundle(const wxBitmapBundle &, const wxPoint &)',
|
31
|
+
'wxCursorBundle::wxCursorBundle(const wxBitmapBundle &, int, int)',
|
32
|
+
'wxCursorBundle::wxCursorBundle(const wxCursorBundle &)'
|
33
|
+
# add undocumented but useful ctor
|
34
|
+
spec.extend_interface 'wxCursorBundle',
|
35
|
+
'wxCursorBundle(const wxCursor& cursor)'
|
26
36
|
else
|
27
37
|
spec.ignore 'wxCursor::wxCursor(const char[],int,int,int,int,const char[])'
|
28
38
|
end
|
data/rakelib/lib/director/dc.rb
CHANGED
@@ -16,7 +16,7 @@ module WXRuby3
|
|
16
16
|
|
17
17
|
def setup
|
18
18
|
super
|
19
|
-
_readDC = if Config.instance.
|
19
|
+
_readDC = if Config.instance.wx_version_check('3.3.0') >= 0
|
20
20
|
spec.items.unshift 'wxReadOnlyDC' # prepend before wxDC
|
21
21
|
spec.items << 'wxInfoDC'
|
22
22
|
'wxReadOnlyDC'
|
@@ -70,7 +70,7 @@ module WXRuby3
|
|
70
70
|
# for GetUserScale and GetLogicalScale
|
71
71
|
spec.map_apply 'double * OUTPUT' => 'double *'
|
72
72
|
spec.swig_import 'swig/classes/include/wxGDICommon.h'
|
73
|
-
if Config.instance.
|
73
|
+
if Config.instance.wx_version_check('3.3.0') >= 0
|
74
74
|
# add similar block-style creator as #draw_on methods
|
75
75
|
spec.add_extend_code 'wxInfoDC', <<~__HEREDOC
|
76
76
|
static VALUE inform_on(wxWindow* win)
|