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.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/ext/wxruby3/swig/RubyStockObjects.i +1 -0
  3. data/lib/wx/aui/auifloatframe.rb +1 -1
  4. data/lib/wx/aui/auimanager.rb +1 -1
  5. data/lib/wx/aui/auinotebook.rb +2 -2
  6. data/lib/wx/core/animation.rb +1 -1
  7. data/lib/wx/core/cursor.rb +10 -0
  8. data/lib/wx/core/dataformat.rb +1 -1
  9. data/lib/wx/core/file_dialog.rb +1 -1
  10. data/lib/wx/core/geometry.rb +34 -0
  11. data/lib/wx/core/hboxsizer.rb +22 -0
  12. data/lib/wx/core/hyperlink_ctrl.rb +18 -0
  13. data/lib/wx/core/position.rb +58 -0
  14. data/lib/wx/core/vboxsizer.rb +22 -0
  15. data/lib/wx/doc/aui/auimanager.rb +6 -3
  16. data/lib/wx/doc/aui/auinotebook.rb +6 -3
  17. data/lib/wx/doc/config.rb +14 -8
  18. data/lib/wx/doc/controlwithitems.rb +7 -3
  19. data/lib/wx/doc/core.rb +21 -0
  20. data/lib/wx/doc/geometry.rb +47 -7
  21. data/lib/wx/doc/graphics_object.rb +24 -0
  22. data/lib/wx/doc/grid/grid.rb +18 -9
  23. data/lib/wx/doc/hboxsizer.rb +41 -5
  24. data/lib/wx/doc/list_ctrl.rb +12 -6
  25. data/lib/wx/doc/menu.rb +6 -3
  26. data/lib/wx/doc/notebook.rb +6 -3
  27. data/lib/wx/doc/pg/pg_property.rb +18 -9
  28. data/lib/wx/doc/pg/property_grid_interface.rb +4 -4
  29. data/lib/wx/doc/region_iterator.rb +1 -1
  30. data/lib/wx/doc/rtc/rich_text_composite_object.rb +6 -3
  31. data/lib/wx/doc/rtc/rich_text_ctrl.rb +6 -3
  32. data/lib/wx/doc/rtc/rich_text_paragraph.rb +6 -3
  33. data/lib/wx/doc/sizer.rb +6 -3
  34. data/lib/wx/doc/stc/styled_text_ctrl.rb +6 -3
  35. data/lib/wx/doc/textctrl.rb +6 -3
  36. data/lib/wx/doc/tree_ctrl.rb +7 -3
  37. data/lib/wx/doc/v_list_box.rb +6 -3
  38. data/lib/wx/doc/variant.rb +1 -1
  39. data/lib/wx/doc/vboxsizer.rb +41 -5
  40. data/lib/wx/doc/window.rb +6 -3
  41. data/lib/wx/helpers.rb +28 -0
  42. data/lib/wx/keyword_ctors.rb +2 -2
  43. data/lib/wx/keyword_defs.rb +11 -2
  44. data/lib/wx/pg/pg_property.rb +1 -1
  45. data/lib/wx/version.rb +1 -1
  46. data/rakelib/lib/config/mingw.rb +1 -1
  47. data/rakelib/lib/config.rb +6 -0
  48. data/rakelib/lib/director/affine_matrix.rb +33 -0
  49. data/rakelib/lib/director/animation_ctrl.rb +1 -1
  50. data/rakelib/lib/director/app.rb +1 -1
  51. data/rakelib/lib/director/aui_manager.rb +2 -2
  52. data/rakelib/lib/director/aui_notebook.rb +1 -1
  53. data/rakelib/lib/director/aui_tab_art.rb +4 -4
  54. data/rakelib/lib/director/ctrl_with_items.rb +1 -1
  55. data/rakelib/lib/director/cursor.rb +11 -1
  56. data/rakelib/lib/director/dc.rb +2 -2
  57. data/rakelib/lib/director/defs.rb +1 -1
  58. data/rakelib/lib/director/derived_dc.rb +14 -14
  59. data/rakelib/lib/director/dialog.rb +3 -3
  60. data/rakelib/lib/director/gdicommon.rb +2 -2
  61. data/rakelib/lib/director/geometry.rb +55 -3
  62. data/rakelib/lib/director/graphics_context.rb +8 -3
  63. data/rakelib/lib/director/graphics_object.rb +29 -2
  64. data/rakelib/lib/director/html_listbox.rb +6 -5
  65. data/rakelib/lib/director/hvscrolled_window.rb +140 -0
  66. data/rakelib/lib/director/hyperlink_ctrl.rb +38 -1
  67. data/rakelib/lib/director/menu_item.rb +1 -1
  68. data/rakelib/lib/director/persistent_window.rb +2 -2
  69. data/rakelib/lib/director/pgeditor.rb +1 -1
  70. data/rakelib/lib/director/pgproperties.rb +4 -4
  71. data/rakelib/lib/director/pgproperty.rb +1 -1
  72. data/rakelib/lib/director/pgvalidation_info.rb +1 -1
  73. data/rakelib/lib/director/print_data.rb +1 -1
  74. data/rakelib/lib/director/property_grid_event.rb +1 -1
  75. data/rakelib/lib/director/property_grid_page.rb +1 -1
  76. data/rakelib/lib/director/property_grid_page_state.rb +1 -1
  77. data/rakelib/lib/director/ribbon_tool_bar.rb +1 -1
  78. data/rakelib/lib/director/richtext_buffer.rb +1 -1
  79. data/rakelib/lib/director/richtext_formatting_dialog.rb +1 -1
  80. data/rakelib/lib/director/richtext_paragraph_layout_box.rb +1 -1
  81. data/rakelib/lib/director/richtext_style_listbox.rb +2 -1
  82. data/rakelib/lib/director/scrolled_t.rb +22 -0
  83. data/rakelib/lib/director/sizer.rb +21 -0
  84. data/rakelib/lib/director/styled_text_event.rb +1 -1
  85. data/rakelib/lib/director/textctrl.rb +2 -2
  86. data/rakelib/lib/director/tree_ctrl.rb +1 -1
  87. data/rakelib/lib/director/utils.rb +1 -1
  88. data/rakelib/lib/director/variant.rb +1 -1
  89. data/rakelib/lib/director/vlistbox.rb +5 -3
  90. data/rakelib/lib/director/window.rb +14 -3
  91. data/rakelib/lib/extractor/function.rb +46 -15
  92. data/rakelib/lib/generate/doc/hyperlink_ctrl.yaml +22 -0
  93. data/rakelib/lib/generate/doc/scrolled_canvas.yaml +38 -0
  94. data/rakelib/lib/generate/doc/scrolled_control.yaml +38 -0
  95. data/rakelib/lib/generate/doc/scrolled_window.yaml +38 -0
  96. data/rakelib/lib/specs/interfaces.rb +2 -2
  97. data/rakelib/lib/typemap/print_page_range.rb +1 -1
  98. data/samples/scrolling/tn_varscroll.png +0 -0
  99. data/samples/scrolling/varscroll.rb +416 -0
  100. data/samples/widgets/hyperlink.rb +85 -60
  101. metadata +12 -6
  102. data/rakelib/lib/director/vscrolled_window.rb +0 -62
  103. /data/samples/{controls → scrolling}/htlbox.rb +0 -0
  104. /data/samples/{etc → scrolling}/scrollwin.rb +0 -0
  105. /data/samples/{controls → scrolling}/tn_htlbox.png +0 -0
  106. /data/samples/{etc → scrolling}/tn_scrollwin.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 365785c8c4a67019170ce82f52b08eef0c29c1eeaf83f9868edaf5883e5ca2a2
4
- data.tar.gz: 48ea3a4a58c2f3f4cb2abab5a935a4b62b933f9413d007dc154aa92e038dc0ac
3
+ metadata.gz: 74651be50bce49af8e8f2f5cfa6b75a103719aa06ac0cec8846a19397e6e32e8
4
+ data.tar.gz: aa9b54f0317028cf4677723c32926223115c0672b95484cec7586a42bf290ed5
5
5
  SHA512:
6
- metadata.gz: b5921c7a072a6d44baa1afeea45718abf9e632e7b23ed5a24a431589dcc889bda5bafeb3b78d09cb9aebdfc07e752796849a9dbee95259abc7260a2d09974f85
7
- data.tar.gz: ab2d3f5579f563a37f7eb61256c4ad95d1498f4b6adf23cb732c6675826c2869d351f049dc91d544427ce0b218e7b1327b8a179ab1dde8c4ed5b1025ce80b206
6
+ metadata.gz: daf1119a3e6c64bb5c42b2ab52ea9c553852e165392f8f98d51f89e0600edddfce5b1a9c4c57753f72c8b4da7a7eb8a883f0f01ec81c139c4cebb30b818a74a6
7
+ data.tar.gz: 682f3174d7accd03170735daf81d570f3895fec6594d7713db4fa99b9adfc21e5b91b9f85a670c5a2764369e59cebdc0978dabad37fb26c34d0bb62fcd8a9b34
@@ -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;
@@ -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::WXWIDGETS_VERSION < '3.3'
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)
@@ -31,7 +31,7 @@ module Wx
31
31
  end
32
32
  end
33
33
 
34
- if WXWIDGETS_VERSION >= '3.3.0'
34
+ if Wx.at_least_wxwidgets?('3.3.0')
35
35
 
36
36
  class AuiTabLayoutInfo < AuiDockLayoutInfo
37
37
 
@@ -7,7 +7,7 @@
7
7
  module Wx
8
8
  module AUI
9
9
 
10
- if Wx::WXWIDGETS_VERSION >= '3.3'
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::WXWIDGETS_VERSION < '3.3'
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)
@@ -27,7 +27,7 @@ module Wx
27
27
  end
28
28
  end
29
29
 
30
- if Wx::WXWIDGETS_VERSION >= '3.3.0'
30
+ if Wx.at_least_wxwidgets?('3.3.0')
31
31
 
32
32
  class AnimationCtrl
33
33
 
@@ -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
@@ -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::WXWIDGETS_VERSION >= '3.3'
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
@@ -23,7 +23,7 @@ module Wx
23
23
  class FileDialogCustomizeHook
24
24
 
25
25
  # prevent construction of abstract base
26
- if RUBY_VERSION < '2.7.0'
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
@@ -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
@@ -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
@@ -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
- # @yieldparam [Wx::AUI::AuiPaneInfo] pane the Aui pane info yielded
17
- # @return [::Object, ::Enumerator] result of last block execution or enumerator
18
- def each_pane; end
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
- # @yieldparam [Wx::Window] page notebook page
18
- # @return [Object,Enumerator] last result of block or Enumerator if no block given.
19
- def each_page; end
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
- # @yieldparam [String] key entry key
49
- # @yieldparam [Boolean,String,Integer,Float] value entry value
50
- # @return [Object,Enumerator] either the last result of the executed block or an enumerator if no block given
51
- def each_entry(&block) end
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
- # @yieldparam [String] key entry key
56
- # @yieldparam [Wx::Config::Group] value entry value
57
- # @return [Object,Enumerator] either the last result of the executed block or an enumerator if no block given
58
- def each_group(&block) end
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
- # @yieldparam [String] string the string yielded
23
- # @return [Object,Enumerator] last result of block or Enumerator if no block given.
24
- def each_string; end
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
@@ -80,23 +80,23 @@ module Wx
80
80
 
81
81
  class Point2DDouble
82
82
 
83
- # @return [Integer]
83
+ # @return [Float]
84
84
  def get_x; end
85
85
  alias :x :get_x
86
- # @param [Integer] v
87
- # @return [Integer]
86
+ # @param [Float] v
87
+ # @return [Float]
88
88
  def set_x(v) end
89
89
  alias :x= :set_x
90
90
 
91
- # @return [Integer]
91
+ # @return [Float]
92
92
  def get_y; end
93
93
  alias :y :get_y
94
- # @param [Integer] v
95
- # @return [Integer]
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::Point2DInt] pt
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
@@ -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
- # @yieldparam [Wx::GRID::GridBlockCoords] selected_block
30
- # @return [Object,Enumerator] result of last block execution or an Enumerator if no block given
31
- def each_selected_block; end
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
- # @yieldparam [Wx::GRID::GridBlockCoords] selected_block
39
- # @return [Object,Enumerator] result of last block execution or an Enumerator if no block given
40
- def each_selected_row_block; end
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
- # @yieldparam [Wx::GRID::GridBlockCoords] selected_block
48
- # @return [Object,Enumerator] result of last block execution or an Enumerator if no block given
49
- def each_selected_col_block; end
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
 
@@ -11,8 +11,39 @@ module Wx
11
11
  class HBoxSizer < Wx::BoxSizer
12
12
 
13
13
  # Constructor for a {Wx::HBoxSizer}.
14
- # @return [Wx::HBoxSizer]
15
- def initialize; end
14
+ # @overload initialize(&block)
15
+ # @yieldparam [Wx::HBoxSizer] sizer new HBoxSizer instance
16
+ # @return [Wx::HBoxSizer]
17
+ # @overload initialize()
18
+ # @return [Wx::HBoxSizer]
19
+ def initialize(*) end
20
+
21
+ end
22
+
23
+ # Just a shortcut version for creating a horizontal staticbox sizer
24
+ class HStaticBoxSizer < 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::HStaticBoxSizer] sizer new HStaticBoxSizer instance
30
+ # @return [Wx::HStaticBoxSizer]
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::HStaticBoxSizer]
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::HStaticBoxSizer] sizer new HStaticBoxSizer instance
40
+ # @return [Wx::HStaticBoxSizer]
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::HStaticBoxSizer]
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
- # @param flags [Integer]
28
- # @return [Wx::HWrapSizer]
29
- def initialize(flags=Wx::WRAPSIZER_DEFAULT_FLAGS) end
58
+ # @overload initialize(flags=Wx::WRAPSIZER_DEFAULT_FLAGS, &block)
59
+ # @param flags [Integer]
60
+ # @yieldparam [Wx::HWrapSizer] sizer new HWrapSizer instance
61
+ # @return [Wx::HWrapSizer]
62
+ # @overload initialize(flags=Wx::WRAPSIZER_DEFAULT_FLAGS)
63
+ # @param flags [Integer]
64
+ # @return [Wx::HWrapSizer]
65
+ def initialize(flags) end
30
66
 
31
67
  end
32
68
 
@@ -12,15 +12,21 @@ module Wx
12
12
  include Enumerable
13
13
 
14
14
  # Iterates all items in the list control passing each item (id) to the given block.
15
- # @yieldparam [Integer] item
16
- # @return [::Object] result of last block iteration
17
- def each(&block) end
15
+ # @overload each(&block)
16
+ # @yieldparam [Integer] item
17
+ # @return [::Object] result of last block iteration
18
+ # @overload each()
19
+ # @return [::Enumerator] enumerator
20
+ def each(*) end
18
21
 
19
22
  # Iterates all selected items in the list control (like #get_next_item(item, Wx::LIST_NEXT_ALL, Wx::LIST_STATE_SELECTED))
20
23
  # passing each item (id) to the given block.
21
- # @yieldparam [Integer] item
22
- # @return [::Object] result of last block iteration
23
- def each_selected(&block) end
24
+ # @overload each_selected(&block)
25
+ # @yieldparam [Integer] item
26
+ # @return [::Object] result of last block iteration
27
+ # @overload each_selected()
28
+ # @return [::Enumerator] enumerator
29
+ def each_selected(*) end
24
30
 
25
31
  # Returns array of selected items.
26
32
  # @return [Array<Integer>] selected items
data/lib/wx/doc/menu.rb CHANGED
@@ -11,9 +11,12 @@ module Wx
11
11
 
12
12
  # Yield each menu item to the given block.
13
13
  # Returns an Enumerator if no block given.
14
- # @yieldparam [Wx::MenuItem] item the menu item yielded
15
- # @return [Object,Enumerator] last result of block or Enumerator if no block given.
16
- def each_item; end
14
+ # @overload each_item(&block)
15
+ # @yieldparam [Wx::MenuItem] item the menu item yielded
16
+ # @return [Object] last result of block
17
+ # @overload each_item()
18
+ # @return [Enumerator] enumerator
19
+ def each_item(*) end
17
20
 
18
21
  end
19
22