wxruby3 0.9.7 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. checksums.yaml +4 -4
  2. data/INSTALL.md +183 -42
  3. data/README.md +40 -48
  4. data/ext/mkrf_conf_ext.rb +72 -0
  5. data/lib/wx/core/app.rb +16 -0
  6. data/lib/wx/core/colour.rb +36 -28
  7. data/lib/wx/core/const.rb +19 -0
  8. data/lib/wx/core/enum.rb +17 -1
  9. data/lib/wx/core/geometry.rb +121 -0
  10. data/lib/wx/core/graphics_pen_info.rb +18 -0
  11. data/lib/wx/core/image.rb +49 -0
  12. data/lib/wx/core/menu_bar.rb +11 -0
  13. data/lib/wx/core/paintdc.rb +9 -3
  14. data/lib/wx/core/secret_store.rb +38 -0
  15. data/lib/wx/doc/app.rb +97 -41
  16. data/lib/wx/doc/bitmap.rb +4 -0
  17. data/lib/wx/doc/client_dc.rb +2 -2
  18. data/lib/wx/doc/clipboard.rb +1 -1
  19. data/lib/wx/doc/colour.rb +12 -0
  20. data/lib/wx/doc/const.rb +16 -0
  21. data/lib/wx/doc/cursor.rb +4 -0
  22. data/lib/wx/doc/dc_overlay.rb +34 -0
  23. data/lib/wx/doc/enum.rb +7 -1
  24. data/lib/wx/doc/event_blocker.rb +1 -1
  25. data/lib/wx/doc/evthandler.rb +25 -3
  26. data/lib/wx/doc/functions.rb +3 -6
  27. data/lib/wx/doc/gc_dc.rb +13 -4
  28. data/lib/wx/doc/geometry.rb +136 -0
  29. data/lib/wx/doc/graphics_context.rb +25 -7
  30. data/lib/wx/doc/icon.rb +4 -0
  31. data/lib/wx/doc/image.rb +56 -0
  32. data/lib/wx/doc/list_ctrl.rb +6 -6
  33. data/lib/wx/doc/memory_dc.rb +2 -11
  34. data/lib/wx/doc/mirror_dc.rb +1 -1
  35. data/lib/wx/doc/pen.rb +26 -0
  36. data/lib/wx/doc/persistence_manager.rb +1 -1
  37. data/lib/wx/doc/persistent_object.rb +1 -1
  38. data/lib/wx/doc/pg/property_grid_interface.rb +3 -3
  39. data/lib/wx/doc/prt/printer_dc.rb +2 -2
  40. data/lib/wx/doc/region_iterator.rb +1 -1
  41. data/lib/wx/doc/scaled_dc.rb +1 -1
  42. data/lib/wx/doc/screen_dc.rb +1 -1
  43. data/lib/wx/doc/secret_store.rb +55 -0
  44. data/lib/wx/doc/svg_file_dc.rb +1 -1
  45. data/lib/wx/doc/textctrl.rb +1 -1
  46. data/lib/wx/doc/tree_ctrl.rb +2 -2
  47. data/lib/wx/doc/validator.rb +6 -6
  48. data/lib/wx/doc/variant.rb +2 -2
  49. data/lib/wx/doc/window.rb +5 -4
  50. data/lib/wx/grid/keyword_defs.rb +1 -1
  51. data/lib/wx/html/keyword_defs.rb +3 -3
  52. data/lib/wx/keyword_defs.rb +76 -71
  53. data/lib/wx/pg/keyword_defs.rb +2 -2
  54. data/lib/wx/pg/pg_property.rb +12 -0
  55. data/lib/wx/rbn/keyword_defs.rb +1 -1
  56. data/lib/wx/rtc/keyword_defs.rb +1 -1
  57. data/lib/wx/stc/keyword_defs.rb +1 -1
  58. data/lib/wx/version.rb +1 -1
  59. data/lib/wx/wxruby/base.rb +3 -5
  60. data/lib/wx/wxruby/cmd/check.rb +182 -0
  61. data/lib/wx/wxruby/cmd/sampler.rb +1 -1
  62. data/lib/wx/wxruby/cmd/setup.rb +9 -3
  63. data/lib/wx/wxruby/cmd/test.rb +1 -1
  64. data/rakelib/configure.rb +67 -52
  65. data/rakelib/gem.rake +97 -66
  66. data/rakelib/gem.rb +294 -41
  67. data/rakelib/install.rb +3 -3
  68. data/rakelib/lib/config/{cygwin.rb → freebsd.rb} +1 -1
  69. data/rakelib/lib/config/linux.rb +4 -2
  70. data/rakelib/lib/config/macosx.rb +42 -11
  71. data/rakelib/lib/config/mingw.rb +2 -2
  72. data/rakelib/lib/config/pkgman/{base.rb → linux.rb} +36 -61
  73. data/rakelib/lib/config/pkgman/macosx.rb +17 -78
  74. data/rakelib/lib/config/unixish.rb +17 -8
  75. data/rakelib/lib/config/{netbsd.rb → unknown.rb} +3 -2
  76. data/rakelib/lib/config.rb +74 -33
  77. data/rakelib/lib/core/include/enum.inc +31 -1
  78. data/rakelib/lib/director/affine_matrix.rb +51 -0
  79. data/rakelib/lib/director/app.rb +29 -13
  80. data/rakelib/lib/director/art_provider.rb +4 -0
  81. data/rakelib/lib/director/aui_manager.rb +1 -1
  82. data/rakelib/lib/director/cursor.rb +6 -2
  83. data/rakelib/lib/director/dc.rb +1 -6
  84. data/rakelib/lib/director/derived_dc.rb +88 -31
  85. data/rakelib/lib/director/geometry.rb +142 -0
  86. data/rakelib/lib/director/graphics_context.rb +3 -2
  87. data/rakelib/lib/director/graphics_object.rb +18 -25
  88. data/rakelib/lib/director/grid_ctrl.rb +2 -2
  89. data/rakelib/lib/director/image.rb +59 -0
  90. data/rakelib/lib/director/menu.rb +2 -3
  91. data/rakelib/lib/director/menu_bar.rb +0 -3
  92. data/rakelib/lib/director/pen.rb +1 -1
  93. data/rakelib/lib/director/richtext_composite_object.rb +2 -4
  94. data/rakelib/lib/director/richtext_ctrl.rb +1 -1
  95. data/rakelib/lib/director/secret_store.rb +117 -0
  96. data/rakelib/lib/director/system_settings.rb +1 -1
  97. data/rakelib/lib/director/tree_event.rb +2 -2
  98. data/rakelib/lib/director/window.rb +4 -3
  99. data/rakelib/lib/extractor/function.rb +1 -1
  100. data/rakelib/lib/generate/doc/animation_ctrl.yaml +10 -0
  101. data/rakelib/lib/generate/doc/banner_window.yaml +35 -0
  102. data/rakelib/lib/generate/doc/graphics_context.yaml +12 -0
  103. data/rakelib/lib/generate/doc/graphics_object.yaml +12 -0
  104. data/rakelib/lib/generate/doc/grid_ctrl.yaml +25 -0
  105. data/rakelib/lib/generate/doc/header_ctrl.yaml +91 -0
  106. data/rakelib/lib/generate/doc/icon.yaml +10 -0
  107. data/rakelib/lib/generate/doc/info_bar.yaml +27 -0
  108. data/rakelib/lib/generate/doc/log.yaml +1 -1
  109. data/rakelib/lib/generate/doc/media_ctrl.yaml +27 -0
  110. data/rakelib/lib/generate/doc/persistent_window.yaml +22 -0
  111. data/rakelib/lib/generate/doc/pg_editor.yaml +1 -1
  112. data/rakelib/lib/generate/doc/pg_property.yaml +4 -4
  113. data/rakelib/lib/generate/doc/rearrange_list.yaml +14 -0
  114. data/rakelib/lib/generate/doc/ribbon_panel.yaml +15 -0
  115. data/rakelib/lib/generate/doc/rich_text_formatting_dialog.yaml +26 -0
  116. data/rakelib/lib/generate/doc/secret_store.yaml +55 -0
  117. data/rakelib/lib/generate/doc/text_ctrl.yaml +1 -1
  118. data/rakelib/lib/generate/doc/wizard.yaml +27 -0
  119. data/rakelib/lib/generate/doc.rb +5 -5
  120. data/rakelib/lib/generate/interface.rb +1 -1
  121. data/rakelib/lib/specs/interfaces.rb +4 -0
  122. data/rakelib/lib/swig_runner.rb +24 -3
  123. data/rakelib/lib/typemap/common.rb +10 -0
  124. data/rakelib/lib/typemap/points_list.rb +8 -2
  125. data/rakelib/lib/typemap/richtext.rb +17 -0
  126. data/rakelib/prepost.rake +8 -1
  127. data/rakelib/yard/templates/default/fulldoc/html/css/wxruby3.css +4 -0
  128. data/rakelib/yard/templates/default/fulldoc/html/setup.rb +3 -3
  129. data/samples/dialogs/wizard.rb +20 -19
  130. data/samples/drawing/art/drawing/image.bmp +0 -0
  131. data/samples/drawing/art/drawing/mask.bmp +0 -0
  132. data/samples/drawing/art/drawing/pat35.bmp +0 -0
  133. data/samples/drawing/art/drawing/pat36.bmp +0 -0
  134. data/samples/drawing/art/drawing/pat4.bmp +0 -0
  135. data/samples/drawing/art/drawing/smile.xpm +42 -0
  136. data/samples/drawing/drawing.rb +2276 -0
  137. data/samples/drawing/tn_drawing.png +0 -0
  138. data/samples/html/html.rb +1 -1
  139. data/samples/propgrid/propgrid.rb +1 -1
  140. data/samples/propgrid/propgrid_minimal.rb +1 -1
  141. data/samples/propgrid/sample_props.rb +1 -1
  142. data/samples/sampler/editor.rb +13 -11
  143. data/samples/sampler/sample.rb +2 -0
  144. data/samples/sampler.rb +14 -10
  145. data/samples/text/richtext.rb +53 -0
  146. data/samples/text/scintilla.rb +1 -1
  147. data/samples/text/unicode.rb +4 -4
  148. data/tests/lib/wxapp_runner.rb +1 -1
  149. data/tests/test_config.rb +7 -4
  150. data/tests/test_ext_controls.rb +12 -5
  151. data/tests/test_secret_store.rb +83 -0
  152. data/tests/test_std_controls.rb +12 -12
  153. metadata +66 -47
  154. data/lib/wx/doc/extra/00_starting.md +0 -154
  155. data/lib/wx/doc/extra/01_packages.md +0 -180
  156. data/lib/wx/doc/extra/02_lifecycles.md +0 -166
  157. data/lib/wx/doc/extra/03_dialogs.md +0 -57
  158. data/lib/wx/doc/extra/04_enums.md +0 -143
  159. data/lib/wx/doc/extra/05_event-handling.md +0 -191
  160. data/lib/wx/doc/extra/06_geometry.md +0 -62
  161. data/lib/wx/doc/extra/07_colour_and_font.md +0 -52
  162. data/lib/wx/doc/extra/08_extensions.md +0 -144
  163. data/lib/wx/doc/extra/09_exceptions.md +0 -54
  164. data/lib/wx/doc/extra/10_art.md +0 -111
  165. data/lib/wx/doc/extra/11_drawing_and_dc.md +0 -62
  166. data/lib/wx/doc/extra/12_client_data.md +0 -89
  167. data/lib/wx/doc/extra/13_validators.md +0 -139
  168. data/lib/wx/doc/extra/14_config.md +0 -101
  169. data/lib/wx/doc/extra/15_persistence.md +0 -148
  170. data/rakefile +0 -14
  171. data/rakelib/lib/config/pkgman/arch.rb +0 -53
  172. data/rakelib/lib/config/pkgman/debian.rb +0 -66
  173. data/rakelib/lib/config/pkgman/rhel.rb +0 -54
  174. data/rakelib/lib/config/pkgman/suse.rb +0 -54
  175. data/samples/sampler/back.xpm +0 -21
  176. data/samples/sampler/copy.xpm +0 -44
  177. data/samples/sampler/cut.xpm +0 -46
  178. data/samples/sampler/filesave.xpm +0 -42
  179. data/samples/sampler/find.xpm +0 -62
  180. data/samples/sampler/findrepl.xpm +0 -63
  181. data/samples/sampler/forward.xpm +0 -21
  182. data/samples/sampler/paste.xpm +0 -46
  183. data/samples/sampler/redo.xpm +0 -58
  184. data/samples/sampler/undo.xpm +0 -58
@@ -0,0 +1,34 @@
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 DCOverlay < Wx::DC
11
+
12
+ private :initialize
13
+
14
+ # Connects this overlay to the corresponding drawing dc. If the overlay is not initialized yet, this call will do so.
15
+ # Creates a Wx::DCOverlay instance for to do that and passes the instance to the given block to use.
16
+ # Uses either the entire area of the drawing DC or the area specified.
17
+ # @overload draw_on(overlay, dc)
18
+ # @param [Wx::Overlay] overlay Overlay to connect
19
+ # @param [Wx::DC] dc Drawing DC
20
+ # @yieldparam [Wx::DCOverlay] ovl_dc DCOverlay instance to use
21
+ # @return [::Object] result from block
22
+ # @overload draw_on(overlay, dc, x, y, width, height)
23
+ # @param [Wx::Overlay] overlay Overlay to connect
24
+ # @param [Wx::DC] dc Drawing DC
25
+ # @param [Integer] x topleft x coordinate of area to use
26
+ # @param [Integer] y topleft y coordinate of area to use
27
+ # @param [Integer] width width of area to use
28
+ # @param [Integer] height height of area to use
29
+ # @yieldparam [Wx::DCOverlay] ovl_dc DCOverlay instance to use
30
+ # @return [::Object] result from block
31
+ def self.draw_on(*arg) end
32
+ end
33
+
34
+ end
data/lib/wx/doc/enum.rb CHANGED
@@ -37,7 +37,7 @@ module Wx
37
37
  def method_missing(sym, *args) end
38
38
 
39
39
  # Checks type and value equality.
40
- # @param [Object] o the object to compare
40
+ # @param [::Object] o the object to compare
41
41
  # @return [true,false] true if o is instance of same enum class as self **and** integer values are equal; false otherwise
42
42
  def eql?(o) end
43
43
 
@@ -94,6 +94,12 @@ module Wx
94
94
  def to_int; end
95
95
  alias :to_i :to_int
96
96
 
97
+ # Return string representation of enum value (mask).
98
+ # In case the enum value matches a single enumerator value of the enum class the (scoped) name
99
+ # of that enumerator is returned otherwise the enum mask value is analyzed and a string representation
100
+ # of a bitwise **or** expression is returned matching the mask.
101
+ def to_s; end
102
+
97
103
  # Create a new class and associated enum values.
98
104
  # @param [String,Symbol] name name of new enum class
99
105
  # @param [Hash] enum_values hash with enum value name and enum integer value pairs
@@ -22,7 +22,7 @@ module Wx
22
22
  # @param [Wx::Window] win the window to block events for
23
23
  # @param [Integer] evt_type the event type to block
24
24
  # @yieldparam [Wx::EventBlocker] blkr the blocker object
25
- # @return [Object] the value returned by the block
25
+ # @return [::Object] the value returned by the block
26
26
  def blocked_for(win, evt_type=Wx::EVT_ANY) end
27
27
  alias :block_for :blocked_for
28
28
 
@@ -29,9 +29,31 @@ module Wx
29
29
  # @return [Integer] unique event type id
30
30
  def self.register_class(klass, konstant = nil, meth = nil, arity = nil) end
31
31
 
32
- def connect(first_id, last_id, evt_type, handler) end
33
-
34
- def disconnect(first_id, last_id, evt_spec) end
32
+ # Connects the given event handler dynamically for id(s) and event type.
33
+ #
34
+ # This is the core event connecting method.
35
+ # In Ruby using named event connector methods like {Wx::EvtHandler#evt_menu} is highly recommended as using #connect
36
+ # does not provide any better options (less even) than using named event connectors as all event connecting is dynamic.
37
+ #
38
+ # @param [Integer] first_id The first ID of the identifier range to be associated with the event handler. Should be Wx::ANY_ID for events that do not require identifiers.
39
+ # @param [Integer] last_id The last ID of the identifier range to be associated with the event handler. Should be Wx::ANY_ID for events requiring a single identifier (like {Wx::MenuEvt}).
40
+ # @param [Integer] evt_id The event type identifier like {Wx::EVT_MENU}.
41
+ # @param [Proc,Method] handler The event handler proc or method.
42
+ # @return [Boolean] Always returns true.
43
+ def connect(first_id, last_id, evt_id, handler) end
44
+
45
+ # Disconnects any event handler connected for the specified id(s) and event type.
46
+ #
47
+ # Looks up connected event handler(s) using the specified parameters as search criteria and returning true if (a)
48
+ # matching handler(s) has(have) been found and removed.
49
+ #
50
+ # @note Note that in wxRuby it is not possible to remove a specific handler if multiple (chained) handler(s) have been connected.
51
+ #
52
+ # @param [Integer] first_id The first ID of the identifier range associated with the event handler. Should be Wx::ANY_ID for events that have no associated identifiers.
53
+ # @param [Integer] last_id The last ID of the identifier range associated with the event handler. Should be Wx::ANY_ID for events that have a single identifier associated.
54
+ # @param [Integer,Symbol,nil] evt_id The event type identifier like {Wx::EVT_MENU} or event connector symbol (like `:evt_menu`).
55
+ # @return [Boolean] Returns true if any event handler found and removed, false otherwise.
56
+ def disconnect(first_id, last_id, evt_id) end
35
57
 
36
58
  # Processes an event, searching event tables and calling zero or more suitable event handler function(s).
37
59
  #
@@ -102,15 +102,14 @@ module Wx
102
102
 
103
103
  # @!endgroup
104
104
 
105
- # @!group Other class methods
106
-
107
105
  # Returns the global app object
108
- # @return [Wx::App] the global app object
106
+ # Returns nil if no app instance is active.
107
+ # @return [Wx::App,nil] the global app object
109
108
  def self.get_app; end
110
109
 
111
110
  # Returns the pointer address of the underlying C++ object as a hex
112
111
  # string - useful for debugging
113
- # @param obj [Object] wrapped object
112
+ # @param obj [::Object] wrapped object
114
113
  # @return [String] string with address in hex format
115
114
  def self.ptr_addr(obj) end
116
115
 
@@ -124,8 +123,6 @@ module Wx
124
123
  def self.bell; end
125
124
  def self.safe_yield(win = nil, only_if_needed = false) end
126
125
 
127
- # @!endgroup
128
-
129
126
  # @!group System information
130
127
 
131
128
  # @return [String]
data/lib/wx/doc/gc_dc.rb CHANGED
@@ -13,20 +13,29 @@ module Wx
13
13
 
14
14
  # Creates a Wx::GCDC instance for target and
15
15
  # passes the instance to the given block to draw on.
16
+ # @overload draw_on()
17
+ # @yieldparam [Wx::GCDC] dc GCDC instance to draw on
18
+ # @return [::Object] result from block
16
19
  # @overload draw_on(dc)
17
20
  # @param [Wx::WindowDC,Wx::MemoryDC] target DC to draw on
18
21
  # @yieldparam [Wx::GCDC] dc GCDC instance to draw on
19
- # @return [Object] result from block
22
+ # @return [::Object] result from block
20
23
  # @overload draw_on(dc)
21
24
  # @param [Wx::PrinterDC] target DC to draw on
22
25
  # @yieldparam [Wx::GCDC] dc GCDC instance to draw on
23
- # @return [Object] result from block
26
+ # @return [::Object] result from block
24
27
  # @wxrb_require USE_PRINTING_ARCHITECTURE,WXMSW|WXOSX|USE_GTKPRINT
25
28
  # @overload draw_on(gc)
29
+ # Note that the context will continue using the same font, pen and brush as before until #set_font, #set_pen
30
+ # or #set_brush is explicitly called to change them. This means that the code can use this wxDC-derived object
31
+ # to work using pens and brushes with alpha component, for example (which normally isn't supported by Wx::DC API),
32
+ # but it also means that the return values of #get_font, #get_pen and #get_brush won't really correspond to the
33
+ # actually used objects because they simply can't represent them anyhow. If you wish to avoid such discrepancy,
34
+ # you need to call the setter methods to bring Wx::DC and Wx::GraphicsContext font, pen and brush in sync with each other.
26
35
  # @param [Wx::GraphicsContext] gc GraphicsContext to draw on
27
36
  # @yieldparam [Wx::GCDC] dc GCDC instance to draw on
28
- # @return [Object] result from block
29
- def self.draw_on(arg) end
37
+ # @return [::Object] result from block
38
+ def self.draw_on(*arg) end
30
39
  end
31
40
 
32
41
  end
@@ -0,0 +1,136 @@
1
+ # :stopdoc:
2
+ # Copyright (c) 2023 M.J.N. Corino, The Netherlands
3
+ #
4
+ # This software is released under the MIT license.
5
+
6
+
7
+ ###
8
+ # wxRuby3 2D geometry classes
9
+ ###
10
+ # :startdoc:
11
+
12
+
13
+ module Wx
14
+
15
+ # Convert degrees to radians.
16
+ # @param [Float] deg degrees
17
+ # @return [Float] radians
18
+ def self.deg_to_rad(deg) end
19
+
20
+ # Convert radians to degrees.
21
+ # @param [Float] rad radians
22
+ # @return [Float] degrees
23
+ def self.rad_to_deg(rad) end
24
+
25
+ class Point2DInt
26
+
27
+ # @return [Integer]
28
+ def get_x; end
29
+ alias :x :get_x
30
+ # @param [Integer] v
31
+ # @return [Integer]
32
+ def set_x(v) end
33
+ alias :x= :set_x
34
+
35
+ # @return [Integer]
36
+ def get_y; end
37
+ alias :y :get_y
38
+ # @param [Integer] v
39
+ # @return [Integer]
40
+ def set_y(v) end
41
+ alias :y= :set_y
42
+
43
+ # @param [Wx::Point2DInt] pt
44
+ # @return [self]
45
+ def assign(pt) end
46
+
47
+ # @param [Wx::Point2DInt] pt
48
+ # @return [self]
49
+ def add!(pt) end
50
+
51
+ # @param [Wx::Point2DInt] pt
52
+ # @return [self]
53
+ def sub!(pt) end
54
+
55
+ # @param [Wx::Point2DInt,Integer,Float] v
56
+ # @return [self]
57
+ def mul!(v) end
58
+
59
+ # @param [Wx::Point2DInt,Integer,Float] v
60
+ # @return [self]
61
+ def div!(v) end
62
+
63
+ # @param [Wx::Point2DInt] pt
64
+ # @return [Wx::Point2DInt]
65
+ def +(pt) end
66
+
67
+ # @param [Wx::Point2DInt] pt
68
+ # @return [Wx::Point2DInt]
69
+ def -(pt) end
70
+
71
+ # @param [Wx::Point2DInt,Integer,Float] v
72
+ # @return [Wx::Point2DInt]
73
+ def *(v) end
74
+
75
+ # @param [Wx::Point2DInt,Integer,Float] v
76
+ # @return [Wx::Point2DInt]
77
+ def /(v) end
78
+
79
+ end
80
+
81
+ class Point2DDouble
82
+
83
+ # @return [Integer]
84
+ def get_x; end
85
+ alias :x :get_x
86
+ # @param [Integer] v
87
+ # @return [Integer]
88
+ def set_x(v) end
89
+ alias :x= :set_x
90
+
91
+ # @return [Integer]
92
+ def get_y; end
93
+ alias :y :get_y
94
+ # @param [Integer] v
95
+ # @return [Integer]
96
+ def set_y(v) end
97
+ alias :y= :set_y
98
+
99
+ # @param [Wx::Point2DInt] pt
100
+ # @return [self]
101
+ def assign(pt) end
102
+
103
+ # @param [Wx::Point2DDouble] pt
104
+ # @return [self]
105
+ def add!(pt) end
106
+
107
+ # @param [Wx::Point2DDouble] pt
108
+ # @return [self]
109
+ def sub!(pt) end
110
+
111
+ # @param [Wx::Point2DDouble,Integer,Float] v
112
+ # @return [self]
113
+ def mul!(v) end
114
+
115
+ # @param [Wx::Point2DDouble,Integer,Float] v
116
+ # @return [self]
117
+ def div!(v) end
118
+
119
+ # @param [Wx::Point2DDouble] pt
120
+ # @return [Wx::Point2DDouble]
121
+ def +(pt) end
122
+
123
+ # @param [Wx::Point2DDouble] pt
124
+ # @return [Wx::Point2DDouble]
125
+ def -(pt) end
126
+
127
+ # @param [Wx::Point2DDouble,Integer,Float] v
128
+ # @return [Wx::Point2DDouble]
129
+ def *(v) end
130
+
131
+ # @param [Wx::Point2DDouble,Integer,Float] v
132
+ # @return [Wx::Point2DDouble]
133
+ def /(v) end
134
+
135
+ end
136
+ end
@@ -14,19 +14,22 @@ module Wx
14
14
  # Deletes the gc object after the block returns.
15
15
  # @see Wx::GraphicsRenderer#create_context
16
16
  # @param window [Wx::Window]
17
- # @return [Wx::GraphicsContext]
17
+ # @yieldparam [Wx::GraphicsContext]
18
+ # @return [::Object] last result of the given block
18
19
  # @overload self.draw_on(windowDC)
19
20
  # Creates a {Wx::GraphicsContext} from a {Wx::WindowDC} and passes that object to the given block.
20
21
  # Deletes the gc object after the block returns.
21
22
  # @see Wx::GraphicsRenderer#create_context
22
23
  # @param windowDC [Wx::WindowDC]
23
- # @return [Wx::GraphicsContext]
24
+ # @yieldparam [Wx::GraphicsContext]
25
+ # @return [::Object] last result of the given block
24
26
  # @overload self.draw_on(memoryDC)
25
27
  # Creates a {Wx::GraphicsContext} from a {Wx::MemoryDC} and passes that object to the given block.
26
28
  # Deletes the gc object after the block returns.
27
29
  # @see Wx::GraphicsRenderer#create_context
28
30
  # @param memoryDC [Wx::MemoryDC]
29
- # @return [Wx::GraphicsContext]
31
+ # @yieldparam [Wx::GraphicsContext]
32
+ # @return [::Object] last result of the given block
30
33
  # @overload self.draw_on(printerDC)
31
34
  # Creates a {Wx::GraphicsContext} from a {Wx::PrinterDC} and passes that object to the given block.
32
35
  # Deletes the gc object after the block returns.
@@ -34,18 +37,21 @@ module Wx
34
37
  # @see Wx::GraphicsRenderer#create_context
35
38
  # @see Printing Under Unix (GTK+)
36
39
  # @param printerDC [Wx::PrinterDC]
37
- # @return [Wx::GraphicsContext]
40
+ # @yieldparam [Wx::GraphicsContext]
41
+ # @return [::Object] last result of the given block
38
42
  # @wxrb_require USE_PRINTING_ARCHITECTURE,WXMSW|WXOSX|USE_GTKPRINT
39
43
  # @overload self.draw_on(image)
40
44
  # Creates a {Wx::GraphicsContext} associated with a {Wx::Image} and passes that object to the given block.
41
45
  # Deletes the gc object after the block returns.
42
46
  # The image specifies the size of the context as well as whether alpha is supported (if {Wx::Image#has_alpha}) or not and the initial contents of the context. The image object must have a life time greater than that of the new context as the context copies its contents back to the image when it is destroyed.
43
47
  # @param image [Wx::Image]
44
- # @return [Wx::GraphicsContext]
48
+ # @yieldparam [Wx::GraphicsContext]
49
+ # @return [::Object] last result of the given block
45
50
  # @overload self.draw_on()
46
51
  # Create a lightweight context that can be used only for measuring text and passes that object to the given block.
47
52
  # Deletes the gc object after the block returns.
48
- # @return [Wx::GraphicsContext]
53
+ # @yieldparam [Wx::GraphicsContext]
54
+ # @return [::Object] last result of the given block
49
55
  def self.draw_on(*args) end
50
56
 
51
57
  end
@@ -56,7 +62,19 @@ module Wx
56
62
  # @param col [Wx::Colour] The colour of this stop. Note that the alpha component of the colour is honoured thus allowing the background colours to partially show through the gradient.
57
63
  # @param pos [Float] The stop position, must be in [0, 1] range with 0 being the beginning and 1 the end of the gradient.
58
64
  # @return [Wx::GraphicsGradientStop]
59
- def initialize(col=Wx::TransparentColour, pos=0.0) end
65
+ def initialize(col=Wx::TRANSPARENT_COLOUR, pos=0.0) end
66
+
67
+ end
68
+
69
+ class GraphicsPenInfo
70
+
71
+ # @param dashes [Array<Integer>]
72
+ # @return [Wx::GraphicsPenInfo]
73
+ def dashes(dashes) end
74
+
75
+ # @return [Array<Integer>]
76
+ def get_dashes; end
77
+ alias_method :dashes, :get_dashes
60
78
 
61
79
  end
62
80
 
data/lib/wx/doc/icon.rb CHANGED
@@ -7,6 +7,8 @@
7
7
 
8
8
  class Wx
9
9
 
10
+ # @!group Art creation methods
11
+
10
12
  # Searches for an art file with basename 'name' and creates an Icon if found.
11
13
  # Raises an ArgumentError if not found.
12
14
  # Wx::ArtLocator::find_art is used to look up the art file using ::Kernel#caller_locations to
@@ -23,4 +25,6 @@ class Wx
23
25
  # @see Wx::ArtLocator::find_art
24
26
  def self.Icon(name, bmp_type = nil, desired_width=-1, desired_height=-1, art_path: nil, art_section: nil); end
25
27
 
28
+ # @!endgroup
29
+
26
30
  end
data/lib/wx/doc/image.rb CHANGED
@@ -51,8 +51,62 @@ module Wx
51
51
  # @return [Hash] hash object extended with {Wx::Image::Histogram}
52
52
  def compute_histogram; end
53
53
 
54
+ # Converts a color in HSV colour space to RGB colour space.
55
+ # @param [Wx::Image::HSVValue,Array(Float,Float,Float)] arg HSV colour
56
+ def self.hsv_to_rgb(arg) end
57
+
58
+ # Converts a color in RGB colour space to HSV colour space.
59
+ # @param [Wx::Image::RGBValue,Array(Float,Float,Float)] arg RGB colour
60
+ def self.rgb_to_hsv(arg) end
61
+
62
+ class HSVValue
63
+
64
+ # Constructor for HSVValue, an object that contains values for hue, saturation and value which represent the value of a color.
65
+ # It is used by {Wx::Image.hsv_to_rgb} and {Wx::Image.rgb_to_hsv}, which convert between HSV color space and RGB color space.
66
+ # @param [Float] hue
67
+ # @param [Float] saturation
68
+ # @param [Float] value
69
+ # @return [Wx::Image::HSVValue]
70
+ def initialize(hue, saturation, value)end
71
+
72
+ attr :hue, :saturation, :value
73
+
74
+ # Make HSVValue usable for parallel assignments like `hue, saturation, value = hsv`
75
+ # @return [Array(Float,Float,Float)]
76
+ def to_ary; end
77
+
78
+ # Convert to {Wx::Image::RGBValue}
79
+ # @return [Wx::Image::RGBValue]
80
+ def to_rgb; end
81
+
82
+ end
83
+
84
+ class RGBValue
85
+
86
+ # Constructor for RGBValue, an object that contains values for red, green and blue which represent the value of a color.
87
+ # It is used by {Wx::Image.hsv_to_rgb} and {Wx::Image.rgb_to_hsv}, which convert between RGB color space and HSV color space.
88
+ # @param [Float] red
89
+ # @param [Float] green
90
+ # @param [Float] blue
91
+ # @return [Wx::Image::RGBValue]
92
+ def initialize(red, green, blue)end
93
+
94
+ attr :red, :green, :blue
95
+
96
+ # Make RGBValue usable for parallel assignments like `red, green, blue = rgb`
97
+ # @return [Array(Float,Float,Float)]
98
+ def to_ary; end
99
+
100
+ # Convert to {Wx::Image::HSVValue}
101
+ # @return [Wx::Image::HSVValue]
102
+ def to_hsv; end
103
+
104
+ end
105
+
54
106
  end
55
107
 
108
+ # @!group Art creation methods
109
+
56
110
  # Searches for an art file with basename 'name' and creates an Image if found.
57
111
  # Raises an ArgumentError if not found.
58
112
  # Wx::ArtLocator::find_art is used to look up the art file using ::Kernel#caller_locations to
@@ -68,4 +122,6 @@ module Wx
68
122
  # @see Wx::ArtLocator::find_art
69
123
  def self.Image(name, bmp_type = nil, index=-1, art_path: nil, art_section: nil); end
70
124
 
125
+ # @!endgroup
126
+
71
127
  end
@@ -13,13 +13,13 @@ module Wx
13
13
 
14
14
  # Iterates all items in the list control passing each item (id) to the given block.
15
15
  # @yieldparam [Integer] item
16
- # @return [Object] result of last block iteration
16
+ # @return [::Object] result of last block iteration
17
17
  def each(&block) end
18
18
 
19
19
  # Iterates all selected items in the list control (like #get_next_item(item, Wx::LIST_NEXT_ALL, Wx::LIST_STATE_SELECTED))
20
20
  # passing each item (id) to the given block.
21
21
  # @yieldparam [Integer] item
22
- # @return [Object] result of last block iteration
22
+ # @return [::Object] result of last block iteration
23
23
  def each_selected(&block) end
24
24
 
25
25
  # Returns array of selected items.
@@ -31,10 +31,10 @@ module Wx
31
31
  # passing the <b>item data</b> for each item as well as the `data` argument given to the #sort_items method.
32
32
  # The block should return 0 if the items are equal, negative value if the first item is less than the second
33
33
  # one and positive value if the first one is greater than the second one.
34
- # @param [Object] data user data to pass on to the sorting block
35
- # @yieldparam [Object] item_data1 data for first item
36
- # @yieldparam [Object] item_data2 data for second item
37
- # @yieldparam [Object] data propagated data argument
34
+ # @param [::Object] data user data to pass on to the sorting block
35
+ # @yieldparam [::Object] item_data1 data for first item
36
+ # @yieldparam [::Object] item_data2 data for second item
37
+ # @yieldparam [::Object] data propagated data argument
38
38
  def sort_items(data = nil, &block) end
39
39
 
40
40
  end
@@ -66,16 +66,7 @@ module Wx
66
66
 
67
67
  end
68
68
 
69
- class AutoBufferedPaintDC < Wx::BufferedPaintDC
70
-
71
- # Creates a Buffered DC and passes that to the given block to draw on.
72
- # Destroys the DC after the block returns.
73
- # Pass a pointer to the window on which you wish to paint.
74
- # @note In wxRuby this method mostly exists to be consistent with the other DC classes. It is however recommended to use Wx::Window#paint_buffered instead.
75
- # @param [Wx::Window] win The underlying window; everything drawn to this object will be flushed to this window when this object is destroyed.
76
- # @yieldparam [Wx::AutoBufferedPaintDC] dc
77
- def self.draw_on(win, &block) end
78
-
79
- end
69
+ # This constant is set to either Wx::PaintDC if the platform supports native double buffering or Wx::BufferedPaintDC otherwise.
70
+ AutoBufferedPaintDC = _
80
71
 
81
72
  end
@@ -14,7 +14,7 @@ module Wx
14
14
  # @param [Wx::DC] dc DC to duplicate the (mirrored) drawing on
15
15
  # @param [Boolean] mirror whether to mirror or not
16
16
  # @yieldparam [Wx::MirrorDC] dc the MirrorDC instance to paint on
17
- # @return [Object] result of the block
17
+ # @return [::Object] result of the block
18
18
  def self.draw_on(dc, mirror) end
19
19
 
20
20
  end
data/lib/wx/doc/pen.rb CHANGED
@@ -16,8 +16,34 @@ module Wx
16
16
  # @return [Wx::Pen]
17
17
  def self.find_or_create_pen(colour, width=1, style=Wx::PenStyle::PENSTYLE_SOLID) end
18
18
 
19
+ # Associates an array of dash values with the pen.
20
+ #
21
+ # @see Wx::Pen#get_dashes
22
+ # @param dashes [Array<Integer>]
23
+ # @return [void]
24
+ def set_dashes(dashes) end
25
+
26
+ # Gets an array of dashes.
27
+ #
28
+ # @see Wx::Pen#set_dashes
29
+ # @return [Array<Integer>]
30
+ def get_dashes; end
31
+ alias_method :dashes, :get_dashes
32
+
19
33
  end
20
34
 
21
35
  ThePenList = Wx::Pen
22
36
 
37
+ class PenInfo
38
+
39
+ # @param dashes [Array<Integer>]
40
+ # @return [Wx::PenInfo]
41
+ def dashes(dashes) end
42
+
43
+ # @return [Array<Integer>]
44
+ def get_dashes; end
45
+ alias_method :dashes, :get_dashes
46
+
47
+ end
48
+
23
49
  end
@@ -14,7 +14,7 @@ module Wx
14
14
  # instance for the object it is called for.
15
15
  # This method raises a NoImplementError if the object class does not support persistence.
16
16
  # @see Defining Custom Persistent Windows
17
- # @param obj [Object]
17
+ # @param obj [::Object]
18
18
  # @return [Wx::PersistentObject]
19
19
  def self.create_persistent_object(obj) end
20
20
 
@@ -11,7 +11,7 @@ module Wx
11
11
 
12
12
  # Save the specified value using the given name.
13
13
  # @param [String] name The name of the value in the configuration file.
14
- # @param [Object] value The value to save, currently must be a type supported by wxConfig.
14
+ # @param [::Object] value The value to save, currently must be a type supported by wxConfig.
15
15
  # @return [Boolean] true if the value was saved or false if an error occurred.
16
16
  def save_value(name, value); end
17
17
  protected :save_value
@@ -18,7 +18,7 @@ module Wx::PG
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
- # @return [Object] result of last block execution
21
+ # @return [::Object] result of last block execution
22
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)
@@ -35,7 +35,7 @@ module Wx::PG
35
35
  # @param start [Integer,Wx::PG::Property] start position (either {Wx::Direction::TOP} or {Wx::Direction::BOTTOM} or the property to start at)
36
36
  # @param reverse [true,false] iterate properties in reverse
37
37
  # @yieldparam item [Wx::PG::PGProperty] property
38
- # @return [Object] result of last block execution
38
+ # @return [::Object] result of last block execution
39
39
  # @overload reverse_each_property(flags, start)
40
40
  # @param flags [Integer] flags specifying iteration (see {Wx::PG::PG_ITERATOR_FLAGS})
41
41
  # @param start [Integer,Wx::PG::Property] start position (either {Wx::Direction::TOP} or {Wx::Direction::BOTTOM} or the property to start at)
@@ -50,7 +50,7 @@ module Wx::PG
50
50
  # @overload each_property_attribute(id , &block)
51
51
  # @param id [String,Wx::PG::PGProperty] (name of) property to iterate attributes of
52
52
  # @yieldparam item [Wx::Variant] attribute
53
- # @return [Object] result of last block execution
53
+ # @return [::Object] result of last block execution
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
@@ -13,7 +13,7 @@ module Wx::PRT
13
13
  # it's single argument.
14
14
  # @param [Wx::PRT::PrintData] print_data print_data defining the print settings
15
15
  # @yieldparam [Wx::PrinterDC] dc the PrinterDC instance to paint on
16
- # @return [Object] result of the block
16
+ # @return [::Object] result of the block
17
17
  def self.draw_on(print_data) end
18
18
 
19
19
  end
@@ -24,7 +24,7 @@ module Wx::PRT
24
24
  # it's single argument.
25
25
  # @param [Wx::PRT::PrintData] print_data print_data defining the print settings
26
26
  # @yieldparam [Wx::PostScriptDC] dc the PostScriptDC instance to paint on
27
- # @return [Object] result of the block
27
+ # @return [::Object] result of the block
28
28
  def self.draw_on(print_data) end
29
29
 
30
30
  end
@@ -31,7 +31,7 @@ module Wx
31
31
  # If no block is given an Enumerator is returned.
32
32
  # @overload each(&block)
33
33
  # @yieldparam [Wx::Rect] rect
34
- # @return [Object]
34
+ # @return [::Object]
35
35
  # @overload each()
36
36
  # @return [Enumerator]
37
37
  def each; end
@@ -16,7 +16,7 @@ module Wx
16
16
  # @param [Wx::DC] target DC to draw on (scaled)
17
17
  # @param [Float] scale scale factor
18
18
  # @yieldparam [Wx::ScaledDC] dc scaled dc to draw on
19
- # @return [Object] result from block
19
+ # @return [::Object] result from block
20
20
  def self.draw_on(target, scale) end
21
21
  end
22
22
 
@@ -12,7 +12,7 @@ module Wx
12
12
  # Executes the given block providing a temporary (screen) dc as
13
13
  # it's single argument.
14
14
  # @yieldparam [Wx::ScreenDC] dc the ScreenDC instance to paint on
15
- # @return [Object] result of the block
15
+ # @return [::Object] result of the block
16
16
  def self.draw_on; end
17
17
 
18
18
  end