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.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/INSTALL.md +2 -2
  3. data/README.md +3 -3
  4. data/ext/wxruby3/swig/RubyStockObjects.i +1 -0
  5. data/ext/wxruby3/swig/mark_free_impl.i +2 -0
  6. data/lib/wx/aui/auifloatframe.rb +1 -1
  7. data/lib/wx/aui/auimanager.rb +1 -1
  8. data/lib/wx/aui/auinotebook.rb +2 -2
  9. data/lib/wx/core/animation.rb +1 -1
  10. data/lib/wx/core/cursor.rb +10 -0
  11. data/lib/wx/core/dataformat.rb +1 -1
  12. data/lib/wx/core/file_dialog.rb +1 -1
  13. data/lib/wx/core/geometry.rb +34 -0
  14. data/lib/wx/core/hboxsizer.rb +22 -0
  15. data/lib/wx/core/hyperlink_ctrl.rb +18 -0
  16. data/lib/wx/core/position.rb +58 -0
  17. data/lib/wx/core/variant.rb +6 -0
  18. data/lib/wx/core/vboxsizer.rb +22 -0
  19. data/lib/wx/doc/aui/auimanager.rb +6 -3
  20. data/lib/wx/doc/aui/auinotebook.rb +6 -3
  21. data/lib/wx/doc/config.rb +14 -8
  22. data/lib/wx/doc/controlwithitems.rb +7 -3
  23. data/lib/wx/doc/core.rb +21 -0
  24. data/lib/wx/doc/geometry.rb +47 -7
  25. data/lib/wx/doc/graphics_object.rb +24 -0
  26. data/lib/wx/doc/grid/grid.rb +18 -9
  27. data/lib/wx/doc/hboxsizer.rb +41 -5
  28. data/lib/wx/doc/list_ctrl.rb +12 -6
  29. data/lib/wx/doc/menu.rb +6 -3
  30. data/lib/wx/doc/notebook.rb +6 -3
  31. data/lib/wx/doc/pg/pg_property.rb +23 -9
  32. data/lib/wx/doc/pg/property_grid_interface.rb +4 -4
  33. data/lib/wx/doc/region_iterator.rb +1 -1
  34. data/lib/wx/doc/rtc/rich_text_composite_object.rb +6 -3
  35. data/lib/wx/doc/rtc/rich_text_ctrl.rb +6 -3
  36. data/lib/wx/doc/rtc/rich_text_paragraph.rb +6 -3
  37. data/lib/wx/doc/sizer.rb +6 -3
  38. data/lib/wx/doc/stc/styled_text_ctrl.rb +6 -3
  39. data/lib/wx/doc/textctrl.rb +6 -3
  40. data/lib/wx/doc/tree_ctrl.rb +7 -3
  41. data/lib/wx/doc/v_list_box.rb +6 -3
  42. data/lib/wx/doc/variant.rb +31 -1
  43. data/lib/wx/doc/vboxsizer.rb +41 -5
  44. data/lib/wx/doc/window.rb +6 -3
  45. data/lib/wx/helpers.rb +28 -0
  46. data/lib/wx/keyword_ctors.rb +2 -2
  47. data/lib/wx/keyword_defs.rb +11 -2
  48. data/lib/wx/pg/pg_property.rb +60 -53
  49. data/lib/wx/pg/property_grid_interface.rb +10 -0
  50. data/lib/wx/version.rb +1 -1
  51. data/rakelib/gem.rake +83 -66
  52. data/rakelib/gem.rb +4 -20
  53. data/rakelib/lib/config/mingw.rb +1 -1
  54. data/rakelib/lib/config.rb +9 -3
  55. data/rakelib/lib/core/spec.rb +1 -1
  56. data/rakelib/lib/director/affine_matrix.rb +33 -0
  57. data/rakelib/lib/director/animation_ctrl.rb +1 -1
  58. data/rakelib/lib/director/app.rb +1 -1
  59. data/rakelib/lib/director/aui_manager.rb +2 -2
  60. data/rakelib/lib/director/aui_notebook.rb +1 -1
  61. data/rakelib/lib/director/aui_tab_art.rb +4 -4
  62. data/rakelib/lib/director/bitmap_combobox.rb +4 -2
  63. data/rakelib/lib/director/ctrl_with_items.rb +1 -1
  64. data/rakelib/lib/director/cursor.rb +11 -1
  65. data/rakelib/lib/director/dc.rb +2 -2
  66. data/rakelib/lib/director/defs.rb +1 -1
  67. data/rakelib/lib/director/derived_dc.rb +14 -14
  68. data/rakelib/lib/director/dialog.rb +3 -3
  69. data/rakelib/lib/director/gdicommon.rb +2 -2
  70. data/rakelib/lib/director/geometry.rb +55 -3
  71. data/rakelib/lib/director/graphics_context.rb +8 -3
  72. data/rakelib/lib/director/graphics_object.rb +29 -2
  73. data/rakelib/lib/director/html_listbox.rb +19 -5
  74. data/rakelib/lib/director/hvscrolled.rb +253 -0
  75. data/rakelib/lib/director/hyperlink_ctrl.rb +38 -1
  76. data/rakelib/lib/director/menu_item.rb +1 -1
  77. data/rakelib/lib/director/persistent_window.rb +18 -2
  78. data/rakelib/lib/director/pgeditor.rb +1 -1
  79. data/rakelib/lib/director/pgproperties.rb +4 -4
  80. data/rakelib/lib/director/pgproperty.rb +4 -3
  81. data/rakelib/lib/director/pgvalidation_info.rb +1 -1
  82. data/rakelib/lib/director/print_data.rb +1 -1
  83. data/rakelib/lib/director/property_grid_event.rb +1 -1
  84. data/rakelib/lib/director/property_grid_page.rb +1 -1
  85. data/rakelib/lib/director/property_grid_page_state.rb +1 -1
  86. data/rakelib/lib/director/ribbon_tool_bar.rb +1 -1
  87. data/rakelib/lib/director/richtext_buffer.rb +1 -1
  88. data/rakelib/lib/director/richtext_formatting_dialog.rb +1 -1
  89. data/rakelib/lib/director/richtext_paragraph_layout_box.rb +1 -1
  90. data/rakelib/lib/director/richtext_style_listbox.rb +8 -1
  91. data/rakelib/lib/director/scrolled_t.rb +22 -0
  92. data/rakelib/lib/director/sizer.rb +21 -0
  93. data/rakelib/lib/director/styled_text_event.rb +1 -1
  94. data/rakelib/lib/director/textctrl.rb +2 -2
  95. data/rakelib/lib/director/top_level_window.rb +0 -1
  96. data/rakelib/lib/director/tree_ctrl.rb +1 -1
  97. data/rakelib/lib/director/utils.rb +4 -2
  98. data/rakelib/lib/director/variant.rb +29 -1
  99. data/rakelib/lib/director/vlistbox.rb +9 -3
  100. data/rakelib/lib/director/window.rb +16 -4
  101. data/rakelib/lib/extractor/function.rb +46 -15
  102. data/rakelib/lib/generate/doc/hyperlink_ctrl.yaml +22 -0
  103. data/rakelib/lib/generate/doc/scrolled_canvas.yaml +38 -0
  104. data/rakelib/lib/generate/doc/scrolled_control.yaml +38 -0
  105. data/rakelib/lib/generate/doc/scrolled_window.yaml +38 -0
  106. data/rakelib/lib/specs/interfaces.rb +4 -2
  107. data/rakelib/lib/swig_runner.rb +2 -2
  108. data/rakelib/lib/typemap/print_page_range.rb +1 -1
  109. data/samples/scrolling/tn_varscroll.png +0 -0
  110. data/samples/scrolling/varscroll.rb +416 -0
  111. data/samples/widgets/hyperlink.rb +85 -60
  112. data/tests/test_propgrid.rb +857 -0
  113. metadata +14 -7
  114. data/rakelib/lib/director/vscrolled_window.rb +0 -62
  115. /data/samples/{controls → scrolling}/htlbox.rb +0 -0
  116. /data/samples/{etc → scrolling}/scrollwin.rb +0 -0
  117. /data/samples/{controls → scrolling}/tn_htlbox.png +0 -0
  118. /data/samples/{etc → scrolling}/tn_scrollwin.png +0 -0
@@ -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
 
@@ -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
- # @yieldparam [Wx::Window] page notebook page
16
- # @return [Object,Enumerator] last result of block or Enumerator if no block given.
17
- def each_page; end
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
 
@@ -11,14 +11,22 @@ module Wx::PG
11
11
 
12
12
  PG_DEFAULT_IMAGE_SIZE = Wx::DEFAULT_SIZE
13
13
 
14
+ # Shifts mask << 16.
15
+ # @param [Wx::Enum, Integer]
16
+ # @return [Wx::Enum, Integer]
17
+ def self.PG_IT_CHILDREN(mask) end
18
+
14
19
  class PGProperty
15
20
 
16
21
  # Iterate each attribute.
17
22
  # Passes the variant for each attribute to the given block.
18
23
  # Returns an Enumerator if no block given.
19
- # @yieldparam [Wx::Variant] variant attribute's variant
20
- # @return [Object,Enumerator] last result of block or Enumerator if no block given.
21
- def each_attribute; end
24
+ # @overload each_attribute(&block)
25
+ # @yieldparam [Wx::Variant] variant attribute's variant
26
+ # @return [Object] last result of block
27
+ # @overload each_attribute()
28
+ # @return [Enumerator] enumerator
29
+ def each_attribute(*) end
22
30
 
23
31
  end
24
32
 
@@ -27,16 +35,22 @@ module Wx::PG
27
35
  # Iterate each label.
28
36
  # Passes each label string to the given block.
29
37
  # Returns an Enumerator if no block given.
30
- # @yieldparam [String] label label string
31
- # @return [Object,Enumerator] last result of block or Enumerator if no block given.
32
- def each_label; end
38
+ # @overload each_label(&block)
39
+ # @yieldparam [String] label label string
40
+ # @return [Object] last result of block
41
+ # @overload each_label()
42
+ # @return [Enumerator] enumerator
43
+ def each_label(*) end
33
44
 
34
45
  # Iterate each choice entry.
35
46
  # Passes each choice entry to the given block.
36
47
  # Returns an Enumerator if no block given.
37
- # @yieldparam [Wx::PG::ChoiceEntry] entry choice entry
38
- # @return [Object,Enumerator] last result of block or Enumerator if no block given.
39
- def each_entry; end
48
+ # @overload each_entry(&block)
49
+ # @yieldparam [Wx::PG::ChoiceEntry] entry choice entry
50
+ # @return [Object] last result of block
51
+ # @overload each_entry()
52
+ # @return [Enumerator] enumerator
53
+ def each_entry(*) end
40
54
 
41
55
  end
42
56
 
@@ -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: , &block)
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: false, &block) end
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; end
57
+ def each_property_attribute(id) end
58
58
  alias :property_attributes :each_property_attribute
59
59
 
60
60
  # Returns the current grid state.
@@ -34,7 +34,7 @@ module Wx
34
34
  # @return [::Object]
35
35
  # @overload each()
36
36
  # @return [Enumerator]
37
- def each; end
37
+ def each(*) end
38
38
 
39
39
  end
40
40
 
@@ -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
- # @yieldparam [Wx::RTC::RichTextObject] child the child object yielded
17
- # @return [Object,Enumerator] last result of block or Enumerator if no block given.
18
- def each_child; end
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
- # @yieldparam [String] line the line yielded
17
- # @return [Object,Enumerator] last result of block or Enumerator if no block given.
18
- def each_line; end
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
- # @yieldparam [Wx::RTC::RichTextLine] line the line yielded
17
- # @return [Object,Enumerator] last result of block or Enumerator if no block given.
18
- def each_line; end
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
- # @yieldparam [Wx::SizerItem] child the child item yielded
15
- # @return [Object,Enumerator] last result of block or Enumerator if no block given.
16
- def each_child; end
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
- # @yieldparam [String] line the line yielded
17
- # @return [Object,Enumerator] last result of block or Enumerator if no block given.
18
- def each_line; end
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
 
@@ -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
- # @yieldparam [String] line the line yielded
72
- # @return [Object,Enumerator] last result of block or Enumerator if no block given.
73
- def each_line; end
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.
@@ -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
- # @param [Wx::TreeItemId] parent_id
47
- # @yieldparam [Wx::TreeItemId] child_id the child tree item id yielded
48
- # @return [Object,Enumerator] last result of block or Enumerator if no block given.
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.
@@ -10,9 +10,12 @@ module Wx
10
10
  class VListBox
11
11
 
12
12
  # Iterate selected items. Returns Enumerator if no block given.
13
- # @yieldparam [Integer] sel selected item index
14
- # @return [Enumerator,Object] if block given returns last return value of block, Enumerator otherwise
15
- def each_selected; end
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
 
@@ -11,13 +11,35 @@ module Wx
11
11
 
12
12
  include ::Enumerable
13
13
 
14
+ # @overload initialize(val, name=(''))
15
+ # Constructs a variant from a Array<Integer>.
16
+ # @param val [Array<Integer>]
17
+ # @param name [String]
18
+ # @return [Wx::Variant]
19
+ # @overload initialize(val, name=(''))
20
+ # Constructs a variant from a {Wx::Font}.
21
+ # @param val [Wx::Font]
22
+ # @param name [String]
23
+ # @return [Wx::Variant]
24
+ # @overload initialize(val, name=(''))
25
+ # Constructs a variant from a {Wx::Colour}.
26
+ # @param val [Wx::Colour]
27
+ # @param name [String]
28
+ # @return [Wx::Variant]
29
+ # @overload initialize(val, name=(''))
30
+ # Constructs a variant from a {Wx::ColourPropertyValue}.
31
+ # @param val [Wx::ColourPropertyValue]
32
+ # @param name [String]
33
+ # @return [Wx::Variant]
34
+ def initialize(*args) end
35
+
14
36
  # When a block is given iterates all items of a variant list passing
15
37
  # each item to the block.
16
38
  # Returns an enumerator when no block is given.
17
39
  # @overload each(&block)
18
40
  # @yieldparam item [Wx::Variant] variant list item
19
41
  # @return [::Object] result of last block execution
20
- # @overload each
42
+ # @overload each()
21
43
  # @return [Enumerator] an enumerator
22
44
  def each; end
23
45
 
@@ -68,6 +90,10 @@ module Wx
68
90
  # @return [self]
69
91
  # @overload assign(value)
70
92
  # Equality test operator.
93
+ # @param value [Array<Integer>]
94
+ # @return [self]
95
+ # @overload assign(value)
96
+ # Equality test operator.
71
97
  # @param value [Time,Date,DateTime]
72
98
  # @return [self]
73
99
  def assign(*args) end
@@ -135,6 +161,10 @@ module Wx
135
161
  # @return [true,false]
136
162
  def array_string?; end
137
163
 
164
+ # Checks if Variant contains an ArrayInt (array of integer) value (not null).
165
+ # @return [true,false]
166
+ def array_int?; end
167
+
138
168
  # Checks if Variant contains a Font value (not null).
139
169
  # @return [true,false]
140
170
  def font?; end
@@ -11,8 +11,39 @@ module Wx
11
11
  class VBoxSizer < Wx::BoxSizer
12
12
 
13
13
  # Constructor for a {Wx::VBoxSizer}.
14
- # @return [Wx::VBoxSizer]
15
- def initialize; end
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
- # @param flags [Integer]
28
- # @return [Wx::VWrapSizer]
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::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
- # @yieldparam [Wx::Window] child the child window yielded
60
- # @return [Object,Enumerator] last result of block or Enumerator if no block given.
61
- def each_child; end
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
@@ -71,7 +71,7 @@ module Wx
71
71
  # by the Rails #class_attribute method.
72
72
  module ParamSpec
73
73
 
74
- if RUBY_VERSION < '2.7.0'
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 < '3.0.0'
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
@@ -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
- # TODO :dir => Wx::DIR_DIALOG_DEFAULT_FOLDER_STR
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