wxruby3 0.9.0.pre.beta.9-x64-mingw-ucrt → 0.9.0.pre.beta.11-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/ext/wxbase32u_gcc_custom.dll +0 -0
  3. data/ext/wxbase32u_net_gcc_custom.dll +0 -0
  4. data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
  5. data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
  6. data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
  7. data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
  8. data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
  9. data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
  10. data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
  11. data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
  12. data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
  13. data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
  14. data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
  15. data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
  16. data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
  17. data/lib/wx/core/bitmap.rb +7 -0
  18. data/lib/wx/core/choice.rb +3 -0
  19. data/lib/wx/core/combobox.rb +3 -0
  20. data/lib/wx/core/controlwithitems.rb +98 -2
  21. data/lib/wx/core/data_object.rb +74 -6
  22. data/lib/wx/core/icon.rb +7 -1
  23. data/lib/wx/core/imagelist.rb +11 -0
  24. data/lib/wx/core/listbox.rb +3 -0
  25. data/lib/wx/core/point.rb +21 -10
  26. data/lib/wx/core/real_point.rb +21 -10
  27. data/lib/wx/core/rect.rb +2 -2
  28. data/lib/wx/core/size.rb +12 -5
  29. data/lib/wx/doc/data_object.rb +104 -0
  30. data/lib/wx/doc/gdi_common.rb +33 -5
  31. data/lib/wx/doc/gen/control_with_items.rb +3 -131
  32. data/lib/wx/doc/gen/core.rb +2 -2
  33. data/lib/wx/doc/gen/data_object.rb +0 -20
  34. data/lib/wx/doc/gen/data_object_simple_base.rb +10 -0
  35. data/lib/wx/doc/gen/image_list.rb +9 -10
  36. data/lib/wx/doc/gen/progress_dialog.rb +0 -20
  37. data/lib/wx/doc/gen/prt/print_data.rb +5 -0
  38. data/lib/wx/doc/gen/scaled_dc.rb +10 -0
  39. data/lib/wx/doc/progress_dialog.rb +37 -0
  40. data/lib/wx/doc/scaled_dc.rb +16 -0
  41. data/lib/wx/global_const.rb +4 -3
  42. data/lib/wx/version.rb +1 -1
  43. data/lib/wxruby_aui.so +0 -0
  44. data/lib/wxruby_core.so +0 -0
  45. data/lib/wxruby_grid.so +0 -0
  46. data/lib/wxruby_html.so +0 -0
  47. data/lib/wxruby_pg.so +0 -0
  48. data/lib/wxruby_prt.so +0 -0
  49. data/lib/wxruby_rbn.so +0 -0
  50. data/lib/wxruby_rtc.so +0 -0
  51. data/lib/wxruby_stc.so +0 -0
  52. data/rakelib/lib/config/mingw.rb +3 -0
  53. data/samples/dialogs/dialogs.rb +70 -50
  54. data/samples/drawing/maths_images.rb +1 -1
  55. data/samples/sampler/ext.rb +3 -3
  56. data/samples/sampler/stc_editor.rb +19 -19
  57. data/samples/sampler/txt_editor.rb +2 -2
  58. data/samples/treectrl/treectrl.rb +32 -30
  59. data/tests/lib/wxapp_runner.rb +64 -0
  60. data/tests/test_basic.rb +0 -5
  61. data/tests/test_clipboard.rb +114 -17
  62. data/tests/test_dialog.rb +2 -13
  63. data/tests/test_event_handling.rb +2 -13
  64. data/tests/test_events.rb +2 -6
  65. data/tests/test_geometry.rb +54 -17
  66. data/tests/test_intl.rb +2 -15
  67. data/tests/test_item_data.rb +69 -15
  68. data/tests/test_variant.rb +1 -15
  69. data/tests/testapp.rb +0 -5
  70. data/tests/testapp_noframe.rb +0 -5
  71. metadata +13 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67bec337bf61091235deb1a9c5fbefc8498791550ab3d84149000e8be01cd506
4
- data.tar.gz: 9fb4b2a4a770a6d1fe0f53540e70a0c2fc3190e89e8a2ff642fae848b1c74575
3
+ metadata.gz: 21e4dd4492cc5886ff3b6a3479a98aeb4de31836504fccbe95573b62b46733c4
4
+ data.tar.gz: 1348defec7496457813b29e61149c7ec9662aebc9b958f4faabaa6961f194d84
5
5
  SHA512:
6
- metadata.gz: 36408e9a7d31a4209d13ac54db02a8686bcb4f8f8a07c3772f1b537cc2200be0c94e0d2faea3fc91a2c9ed1598a83b0a649f6036c70eb4110e86956554b5abec
7
- data.tar.gz: 2c14907e3c38f1ed47de3148f27f3b9cf8bf1c0ef634d9fa08603fd0ac629bdf4aad14a6e1f7184caf5bc03ea222cffbfb1a070dfee065f7c7c934cd964e0f8c
6
+ metadata.gz: 27d3fb31968f3d657c2c6199750250331b103f48c5e3d7a6908e302b51ab9ae616e9434fbbc25241335d0791527e07f4354bb59a65da322ac66d85c69b0b42ee
7
+ data.tar.gz: e8adac23ee31c8a447228bdf2e11c87aa4aaa93d7af30450bc17ff57e620d2cbd885a8979ba82e6fdf6b21e87656846a25456a0a5a7c5a87faced833f0c5df5f
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -25,6 +25,13 @@ class Wx::Bitmap
25
25
  new(img, depth)
26
26
  end
27
27
 
28
+ # Create a new bitmap from an icon
29
+ def self.from_icon(icon)
30
+ bmp = self.new
31
+ bmp.copy_from_icon(icon)
32
+ bmp
33
+ end
34
+
28
35
  # Ruby methods that switch class are conventionally named to_foo
29
36
  alias :to_image :convert_to_image
30
37
 
@@ -1,3 +1,6 @@
1
+
2
+ require_relative './controlwithitems'
3
+
1
4
  class Wx::Choice
2
5
  alias :get_item_data :get_client_data
3
6
  alias :set_item_data :set_client_data
@@ -1,3 +1,6 @@
1
+
2
+ require_relative './controlwithitems'
3
+
1
4
  class Wx::ComboBox
2
5
  alias :get_item_data :get_client_data
3
6
  alias :set_item_data :set_client_data
@@ -1,10 +1,106 @@
1
1
  # Superclass of a variety of controls that display lists of items (eg
2
2
  # Choice, ListBox, CheckListBox)
3
3
  class Wx::ControlWithItems
4
- # Make these ruby enumerables so find, find_all, map etc are available
4
+
5
+ # Make these Ruby enumerables so find, find_all, map etc are available
5
6
  include Enumerable
7
+
6
8
  # Passes each valid item index into the passed block
7
9
  def each
8
- 0.upto(get_count - 1) { | i | yield i }
10
+ get_count.times { | i | yield i }
11
+ end
12
+
13
+ # We need to cache client data in Ruby variables as we cannot access items
14
+ # during the GC mark phase as for some platforms (WXMSW at least) that would
15
+ # involve calling methods that would break in that phase.
16
+
17
+ def client_data_store
18
+ @client_data ||= []
19
+ end
20
+ private :client_data_store
21
+
22
+ wx_set_client_data = instance_method :set_client_data
23
+ define_method :set_client_data do |item, data|
24
+ item = item.to_i
25
+ wx_set_client_data.bind(self).call(item, data)
26
+ client_data_store[item] = data
27
+ end
28
+
29
+ def get_client_data(item)
30
+ client_data_store[item.to_i]
31
+ end
32
+
33
+ wx_append = instance_method :append
34
+ define_method :append do |item, data=nil|
35
+ if data
36
+ if ::Array === item
37
+ if !(::Array === data)
38
+ ::Kernel.raise ::TypeError.new("Expected Array for argument 3")
39
+ elsif data.size != item.size
40
+ ::Kernel.raise ::ArgumentError.new("item and data array must be equal size")
41
+ end
42
+ offs = get_count
43
+ wx_append.bind(self).call(item)
44
+ item.size.times { |ix| set_client_data(offs+ix, data[ix]) }
45
+ else
46
+ wx_append.bind(self).call(item, data)
47
+ client_data_store[get_count-1] = data
48
+ end
49
+ else
50
+ wx_append.bind(self).call(item)
51
+ # no changes to data store
52
+ end
53
+ end
54
+
55
+ wx_insert = instance_method :insert
56
+ define_method :insert do |item, pos, data=nil|
57
+ if data
58
+ if ::Array === item
59
+ if !(::Array === data)
60
+ ::Kernel.raise ::TypeError.new("Expected Array for argument 3")
61
+ elsif data.size != item.size
62
+ ::Kernel.raise ::ArgumentError.new("item and data array must be equal size")
63
+ end
64
+ wx_insert.bind(self).call(item, pos)
65
+ client_data_store.insert(pos, *::Array.new(item.size))
66
+ item.size.times { |ix| set_client_data(pos+ix, data[ix]) }
67
+ else
68
+ wx_insert.bind(self).call(item, pos, data)
69
+ client_data_store.insert(pos, data)
70
+ end
71
+ else
72
+ wx_insert.bind(self).call(item, pos)
73
+ if ::Array === item
74
+ client_data_store.insert(pos, *::Array.new(item.size))
75
+ else
76
+ client_data_store.insert(pos, nil)
77
+ end
78
+ end
79
+ end
80
+
81
+ wx_set = instance_method :set
82
+ define_method :set do |items, data=nil|
83
+ if data
84
+ if !(::Array === data)
85
+ ::Kernel.raise ::TypeError.new("Expected Array for argument 2")
86
+ elsif data.size != items.size
87
+ ::Kernel.raise ::ArgumentError.new("items and data array must be equal size")
88
+ end
89
+ end
90
+ wx_set.bind(self).call(items)
91
+ client_data_store.clear
92
+ items.each_with_index { |item, ix| set_client_data(item, data[ix]) }
93
+ end
94
+
95
+ wx_clear = instance_method :clear
96
+ define_method :clear do
97
+ wx_clear.bind(self).call
98
+ client_data_store.clear
99
+ end
100
+
101
+ wx_delete = instance_method :delete
102
+ define_method :delete do |item|
103
+ wx_delete.bind(self).call(item.to_i)
104
+ client_data_store.slice!(item.to_i)
9
105
  end
10
106
  end
@@ -1,10 +1,78 @@
1
- # Provide some default implementations of these to make life easier
2
- class Wx::DataObject
3
- def get_preferred_format(direction)
4
- get_all_formats(direction).first
1
+
2
+ module Wx
3
+
4
+ # Provide some default implementations of these to make life easier
5
+ class DataObject
6
+ def get_preferred_format(direction)
7
+ get_all_formats(direction).first
8
+ end
9
+
10
+ def get_format_count(direction)
11
+ get_all_formats(direction).size
12
+ end
5
13
  end
6
14
 
7
- def get_format_count(direction)
8
- get_all_formats(direction).size
15
+ class DataObjectSimple
16
+
17
+ # implement the overloads which do not require the format arg
18
+ # using pure Ruby
19
+
20
+ wx_get_data_size = instance_method :get_data_size
21
+ define_method :get_data_size do |format = nil|
22
+ wx_get_data_size.bind(self).call(format || self.get_format)
23
+ end
24
+
25
+ wx_get_data_here = instance_method :get_data_here
26
+ define_method :get_data_here do |format = nil|
27
+ wx_get_data_here.bind(self).call(format || self.get_format)
28
+ end
29
+
30
+ wx_set_data = instance_method :set_data
31
+ define_method :set_data do |*args|
32
+ if args.size>1
33
+ format, buf = args
34
+ else
35
+ format = nil
36
+ buf = args.first
37
+ end
38
+ wx_set_data.bind(self).call(format || self.get_format, buf)
39
+ end
40
+
9
41
  end
42
+
43
+ class DataObjectSimpleBase
44
+
45
+ # implement these in pure Ruby for optimization
46
+ def get_data_size(*)
47
+ self._get_data_size
48
+ end
49
+ def get_data_here(*)
50
+ self._get_data
51
+ end
52
+
53
+ def set_data(*args)
54
+ if args.size>1
55
+ _, buf = args
56
+ else
57
+ buf = args.first
58
+ end
59
+ self._set_data(buf)
60
+ end
61
+
62
+ def _get_data_size
63
+ (_get_data || '').bytesize
64
+ end
65
+ protected :_get_data_size
66
+
67
+ end
68
+
69
+ class TextDataObject
70
+
71
+ # override this to loose the extra terminating 0 we otherwise get
72
+ def get_data_here(*)
73
+ self.get_text
74
+ end
75
+
76
+ end
77
+
10
78
  end
data/lib/wx/core/icon.rb CHANGED
@@ -14,12 +14,18 @@ class Wx::Icon
14
14
 
15
15
  def to_bitmap
16
16
  # for WXMSW platform Icon is not derived from Bitmap
17
- return self unless Wx::PLATFORM == 'WXMSW'
17
+ return self unless Wx::PLATFORM == 'WXMSW' || Wx::PLATFORM == 'WXOSX'
18
18
  bm = Wx::Bitmap.new
19
19
  bm.copy_from_icon(self)
20
20
  bm
21
21
  end
22
22
 
23
+ if Wx::PLATFORM == 'WXMSW' || Wx::PLATFORM == 'WXOSX'
24
+ def convert_to_image
25
+ to_bitmap.convert_to_image
26
+ end
27
+ end
28
+
23
29
  # Redefine the initialize method so it raises an exception if a
24
30
  # non-existent file is given to the constructor; otherwise, wx Widgets
25
31
  # just carries on with an empty icon, which may cause faults
@@ -1,3 +1,14 @@
1
+
1
2
  class Wx::ImageList
3
+
4
+ # provide seamless support for adding icons on all platforms
5
+ wx_add = instance_method :add
6
+ define_method :add do |*args|
7
+ if Wx::Icon === args.first
8
+ args[0] = args.first.to_bitmap
9
+ end
10
+ wx_add.bind(self).call(*args)
11
+ end
12
+
2
13
  alias :<< :add
3
14
  end
@@ -1,3 +1,6 @@
1
+
2
+ require_relative './controlwithitems'
3
+
1
4
  class Wx::ListBox
2
5
  alias :get_item_data :get_client_data
3
6
  alias :set_item_data :set_client_data
data/lib/wx/core/point.rb CHANGED
@@ -1,4 +1,7 @@
1
1
  class Wx::Point
2
+
3
+ include Comparable
4
+
2
5
  # More informative output when converted to string
3
6
  def to_s
4
7
  "#<Wx::Point: (#{x}, #{y})>"
@@ -16,23 +19,26 @@ class Wx::Point
16
19
  alias :get_x :x
17
20
  alias :get_y :y
18
21
 
19
- # Compare point values
20
- def ==(other)
21
- if Wx::Point === other
22
+ # Correct comparison for Points - same if same x and y
23
+ def eql?(other)
24
+ if other.instance_of?(self.class)
22
25
  x == other.x and y == other.y
23
- elsif Array === other && other.size == 2
24
- to_ary == other
25
26
  else
26
- Kernel.raise TypeError, "Cannot compare Point to #{other}"
27
+ false
27
28
  end
28
29
  end
29
30
 
30
- # Correct comparison for Points - same if same x and y
31
- def eql?(other)
31
+ def hash
32
+ to_ary.hash
33
+ end
34
+
35
+ def <=>(other)
32
36
  if Wx::Point === other
33
- x == other.x and y == other.y
37
+ (x*y) <=> (other.x*other.y)
38
+ elsif Array === other && other.size == 2
39
+ (x*y) <=> (other.first.to_i*other.last.to_i)
34
40
  else
35
- false
41
+ nil
36
42
  end
37
43
  end
38
44
 
@@ -89,4 +95,9 @@ class Wx::Point
89
95
  end
90
96
  end
91
97
  end
98
+
99
+ def to_real_point
100
+ Wx::RealPoint.new(self.x.to_f, self.y.to_f)
101
+ end
102
+ alias :to_real :to_real_point
92
103
  end
@@ -1,4 +1,7 @@
1
1
  class Wx::RealPoint
2
+
3
+ include Comparable
4
+
2
5
  # More informative output when converted to string
3
6
  def to_s
4
7
  "#<Wx::RealPoint: (#{x}, #{y})>"
@@ -16,23 +19,26 @@ class Wx::RealPoint
16
19
  alias :get_x :x
17
20
  alias :get_y :y
18
21
 
19
- # Compare point values
20
- def ==(other)
21
- if Wx::RealPoint === other
22
+ # Correct comparison for RealPoints - same if same x and y
23
+ def eql?(other)
24
+ if other.instance_of?(self.class)
22
25
  x == other.x and y == other.y
23
- elsif Array === other && other.size == 2
24
- to_ary == other
25
26
  else
26
- Kernel.raise TypeError, "Cannot compare RealPoint to #{other}"
27
+ false
27
28
  end
28
29
  end
29
30
 
30
- # Correct comparison for RealPoints - same if same x and y
31
- def eql?(other)
31
+ def hash
32
+ to_ary.hash
33
+ end
34
+
35
+ def <=>(other)
32
36
  if Wx::RealPoint === other
33
- x == other.x and y == other.y
37
+ (x*y) <=> (other.x*other.y)
38
+ elsif Array === other && other.size == 2
39
+ (x*y) <=> (other.first.to_f*other.last.to_f)
34
40
  else
35
- false
41
+ nil
36
42
  end
37
43
  end
38
44
 
@@ -89,4 +95,9 @@ class Wx::RealPoint
89
95
  end
90
96
  end
91
97
  end
98
+
99
+
100
+ def to_point
101
+ Wx::Point.new(self.x.to_i, self.y.to_i)
102
+ end
92
103
  end
data/lib/wx/core/rect.rb CHANGED
@@ -23,12 +23,12 @@ class Wx::Rect
23
23
  elsif Array === other && other.size == 4
24
24
  to_ary == other
25
25
  else
26
- Kernel.raise TypeError, "Cannot compare Rect to #{other}"
26
+ false
27
27
  end
28
28
  end
29
29
 
30
30
  def eql?(other)
31
- if Wx::Rect === other
31
+ if other.instance_of?(self.class)
32
32
  left == other.left and top == other.top and
33
33
  width == other.width and height == other.height
34
34
  else
data/lib/wx/core/size.rb CHANGED
@@ -1,4 +1,7 @@
1
1
  class Wx::Size
2
+
3
+ include Comparable
4
+
2
5
  # More informative output for inspect etc
3
6
  def to_s
4
7
  "#<Wx::Size: #{width}x#{height}>"
@@ -14,24 +17,28 @@ class Wx::Size
14
17
  end
15
18
 
16
19
  # Compare with another size value
17
- def ==(other)
20
+ def <=>(other)
18
21
  if Wx::Size === other
19
- width == other.width and height == other.height
22
+ (width*height) <=> (other.width*other.height)
20
23
  elsif Array === other and other.size == 2
21
- to_ary == other
24
+ (width*height) <=> (other.first*other.last)
22
25
  else
23
- Kernel.raise TypeError, "Cannot compare Size to #{other}"
26
+ nil
24
27
  end
25
28
  end
26
29
 
27
30
  def eql?(other)
28
- if Wx::Size === other
31
+ if other.instance_of?(self.class)
29
32
  width == other.width and height == other.height
30
33
  else
31
34
  false
32
35
  end
33
36
  end
34
37
 
38
+ def hash
39
+ to_ary.hash
40
+ end
41
+
35
42
  # Return a new Wx::Size with the width and height values both divided
36
43
  # by parameter +num+, which should be a Numeric
37
44
  def /(num)
@@ -0,0 +1,104 @@
1
+
2
+ module Wx
3
+
4
+ class DataObject
5
+
6
+ # Returns the data size of the given format.
7
+ # Should be overridden in derived classes.
8
+ # @note **IMPORTANT** Please note that it is necessary to return the **size in bytes** of the data string
9
+ # returned by #get_data_here (not the size in characters).
10
+ # @param format [Wx::DataFormat]
11
+ # @return [Integer]
12
+ def get_data_size(format) end
13
+ alias_method :data_size, :get_data_size
14
+
15
+ end
16
+
17
+ # This is an (abstract in Ruby) base class for the simplest possible custom data objects.
18
+ # Unlike in C++ in Ruby this class cannot be used to derive custom data objects from but
19
+ # instead {Wx::DataObjectSimpleBase} (derived from Wx::DataObjectSimple) should be used.
20
+ # The data object of (a class derived from) this class only supports <b>one format</b>,
21
+ # so the number of virtual functions to be implemented is reduced.
22
+ # This class is the base class for {Wx::TextDataObject}, {Wx::FileDataObject}, {Wx::BitmapDataObject},
23
+ # {Wx::wxCustomDataObject} and others.
24
+ # ===
25
+ #
26
+ # Category: Clipboard and Drag & Drop
27
+ # @see Drag and Drop Overview
28
+ # @see Drag & Drop Sample
29
+ class DataObjectSimple < DataObject
30
+
31
+ # @overload get_data_size(format)
32
+ # Returns the data size of the format for this object.
33
+ # @param [Wx::DataFormat] format ignored for this class
34
+ # @return [Integer] default always returns 0
35
+ # @overload get_data_size()
36
+ # Returns the data size of the format for this object.
37
+ # @return [Integer] default always returns 0
38
+ def get_data_size(*) end
39
+
40
+ # @overload get_data_here(format)
41
+ # Returns the data of this object.
42
+ # @param [Wx::DataFormat] format ignored for this class
43
+ # @return [String,nil] data of this object
44
+ # @overload get_data_here()
45
+ # Returns the data of this object.
46
+ # @return [String,nil] data of this object
47
+ def get_data_here(*) end
48
+
49
+ # @overload set_data(format, buf)
50
+ # Sets the data for this object and returns true if successful, false otherwise.
51
+ # @param [Wx::DataFormat] format ignored for this class
52
+ # @param [String] buf non-nil data
53
+ # @return [Boolean] default always returns false.
54
+ # @overload set_data(buf)
55
+ # Sets the data for this object and returns true if successful, false otherwise.
56
+ # @param [String] buf non-nil data
57
+ # @return [Boolean] default always returns false.
58
+ def set_data(*) end
59
+
60
+ end
61
+
62
+ # This is the base class for the simplest possible custom data objects.
63
+ # The data object of (a class derived from) this class only supports <b>one format</b>,
64
+ # so the number of methods to be implemented is reduced.
65
+ # To be useful it must be derived. Derived objects supporting rendering the data must
66
+ # override {Wx::DataObjectSimpleBase#_get_data_size} and {Wx::DataObjectSimpleBase#_get_data}.
67
+ # By default these methods respectively return <code>0</code> and <code>nil</code>.
68
+ # The objects which may be set must override {Wx::DataObjectSimpleBase#_set_data} (which
69
+ # returns <code>false</code>).
70
+ # Of course, the objects supporting both operations must override all three methods.
71
+ # ===
72
+ #
73
+ # Category: Clipboard and Drag & Drop
74
+ # @see Drag and Drop Overview
75
+ # @see Drag & Drop Sample
76
+ # @see Wx::DataObjectSimple
77
+ class DataObjectSimpleBase < DataObjectSimple
78
+
79
+ # Returns this object's data size.
80
+ # The default implementation calls #_get_data and determines the size of the returned data string (if any).
81
+ # As this is not very optimal for more complex (and larger data objects) very often this method will be
82
+ # overridden in derived classes.
83
+ # @note **IMPORTANT** Please note that it is necessary to return the **size in bytes** of the data string
84
+ # returned by #_get_data (not the size in characters).
85
+ # @return [Integer]
86
+ def _get_data_size; end
87
+ protected :_get_data_size
88
+
89
+ # Returns this object's data (default implementation returns nil).
90
+ # Should be overridden in derived classes.
91
+ # @return [String,nil]
92
+ def _get_data; end
93
+ protected :_get_data
94
+
95
+ # Sets this object's data (default implementation does nothing and returns false).
96
+ # Should be overridden in derived classes.
97
+ # @param [String] buf non-nil data
98
+ # @return [Boolean]
99
+ def _set_data(buf); end
100
+ protected :_set_data
101
+
102
+ end
103
+
104
+ end
@@ -56,20 +56,27 @@ module Wx
56
56
 
57
57
  class Point
58
58
 
59
+ include Comparable
60
+
59
61
  # Returns point array (`[x, y]`)
60
62
  # @return [Array(Integer,Integer)] point as array
61
63
  def to_ary; end
62
64
 
63
- # Compare point values (Wx::Point or point array). Throws exception if incompatible.
65
+ # Compare point values (Wx::Point or point array). Returns -1,0 or 1 to indicate if this point
66
+ # is smaller, equal or greater than other (comparing <code>x*y</code> with <code>other.x*other.y</code>).
67
+ # Returns nil if incompatible.
64
68
  # @param [Wx::Point,Array(Integer,Integer)] other
65
- # @return [Boolean]
66
- def ==(other)end
69
+ # @return [Boolean,nil]
70
+ def <=>(other)end
67
71
 
68
72
  # Compare points.
69
73
  # @param [Wx::Point] other
70
74
  # @return [Boolean]
71
75
  def eql?(other)end
72
76
 
77
+ # Returns hash for point
78
+ def hash; end
79
+
73
80
  # Return a new Wx::Point with the x and y parameters both divided by
74
81
  # parameter +num+, which should be a Numeric
75
82
  # @param [Numeric] num
@@ -97,11 +104,18 @@ module Wx
97
104
  # @param [Wx::Point,Wx::Size,Array(Integer,Integer),Numeric] arg
98
105
  # @return [Wx::Point]
99
106
  def +(arg) end
100
-
107
+
108
+ # Converts point to Wx::RealPoint
109
+ # @return [Wx::RealPoint] Wx::RealPoint instance from point coordinates
110
+ def to_real_point; end
111
+ alias :to_real :to_real_point
112
+
101
113
  end
102
114
 
103
115
  class RealPoint
104
116
 
117
+ include Comparable
118
+
105
119
  # Returns point array (`[x, y]`)
106
120
  # @return [Array(Float,Float)] point as array
107
121
  def to_ary; end
@@ -111,11 +125,21 @@ module Wx
111
125
  # @return [Boolean]
112
126
  def ==(other)end
113
127
 
128
+ # Compare point values (Wx::RealPoint or point array). Returns -1,0 or 1 to indicate if this point
129
+ # is smaller, equal or greater than other (comparing <code>x*y</code> with <code>other.x*other.y</code>).
130
+ # Returns nil if incompatible.
131
+ # @param [Wx::RealPoint,Array(Float,Float)] other
132
+ # @return [Boolean,nil]
133
+ def <=>(other)end
134
+
114
135
  # Compare points.
115
136
  # @param [Wx::RealPoint] other
116
137
  # @return [Boolean]
117
138
  def eql?(other)end
118
139
 
140
+ # Returns hash for point
141
+ def hash; end
142
+
119
143
  # Return a new Wx::RealPoint with the x and y parameters both divided by
120
144
  # parameter +num+, which should be a Numeric
121
145
  # @param [Numeric] num
@@ -144,6 +168,10 @@ module Wx
144
168
  # @return [Wx::RealPoint]
145
169
  def +(arg) end
146
170
 
171
+ # Converts real point to Wx::Point
172
+ # @return [Wx::Point] Wx::Point instance from real point coordinates
173
+ def to_point; end
174
+
147
175
  end
148
176
 
149
177
  class Rect
@@ -152,7 +180,7 @@ module Wx
152
180
  # @return [Array(Integer,Integer,Integer,Integer)] rect as array
153
181
  def to_ary; end
154
182
 
155
- # Compare area values (Wx::Rect or 4-element array). Throws exception if incompatible.
183
+ # Compare area values (Wx::Rect or 4-element array). Returns false if incompatible.
156
184
  # @param [Wx::Rect,Array(Integer,Integer,Integer,Integer)] other
157
185
  # @return [Boolean]
158
186
  def ==(other)end