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,55 @@
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 SecretStore
11
+
12
+ # Wipes the secret data.
13
+ # @param [String] secret string containing secret data
14
+ # @return [void]
15
+ def self.wipe(secret); end
16
+
17
+ end
18
+
19
+ class SecretValue
20
+
21
+ # @overload initialize()
22
+ # Creates an empty secret value (not the same as an empty password).
23
+ # @return [Wx::SecretValue]
24
+ # @overload initialize(secret)
25
+ # Creates a secret value from the given string.
26
+ # The secret argument may contain NUL bytes.
27
+ # Any UTF-8 encoded (or encodable; wxRuby will attempt re-encoding as UTF-8 for any string not encoded UTF-8 or ASCII-8BIT) string will be stored as UTF-8 encoded string.
28
+ # In these cases use {#get_as_string} if needing to compare the original string to a restored string.
29
+ # Otherwise the string will be stored as ASCII-8BIT encoded string.
30
+ # In these cases use {#get_data} if needing to compare the original string to a restored string.
31
+ # See {#==} for comparing secret values opaquely.
32
+ # @param secret [String]
33
+ # @return [Wx::SecretValue]
34
+ # @overload initialize(other)
35
+ # Creates a copy of an existing secret.
36
+ # @param other [Wx::SecretValue]
37
+ # @return [Wx::SecretValue]
38
+ def initialize(*args) end
39
+
40
+ # Returns a copy of the secret data as an ASCII-8BIT encoded String.
41
+ # Be aware this could be binary data and may contain embedded NUL characters.
42
+ # For more security {Wx::SecretStore.wipe} should be used to wipe the secret data after use.
43
+ # @return [String] secret data
44
+ def get_data; end
45
+
46
+ # Returns a copy of the secret data as an UTF-8 encoded String.
47
+ # Make sure to use this method only if sure that the secret originally stored was indeed
48
+ # UTF-8 data as otherwise the returned string will not match the stored data.
49
+ # For more security {Wx::SecretStore.wipe} should be used to wipe the secret data after use.
50
+ # @return [String] secret data
51
+ def get_as_string; end
52
+
53
+ end
54
+
55
+ end
@@ -18,7 +18,7 @@ module Wx
18
18
  # @param [Float] dpi resolution for SVG image
19
19
  # @param [String] title readable name for the SVG document
20
20
  # @yieldparam [Wx::SVGFileDC] dc the SVGFileDC instance to paint on
21
- # @return [Object] result of the block
21
+ # @return [::Object] result of the block
22
22
  def self.draw_on(filename, width=320, height=240, dpi=72, title='') end
23
23
 
24
24
  end
@@ -62,7 +62,7 @@ module Wx
62
62
 
63
63
  # Appends the string representation of `obj` to the text value of the control.
64
64
  # Calls #to_s to get the string representation of `obj`.
65
- # @param [Object] obj
65
+ # @param [::Object] obj
66
66
  # @return [self]
67
67
  def <<(obj) end
68
68
 
@@ -37,7 +37,7 @@ module Wx
37
37
  #
38
38
  # Returns an invalid tree item if there are no further children.
39
39
  # @param [Wx::TreeItemId] parent_id the id of the parent tree item for which to iterate children
40
- # @param [Object] cookie cookie value as returned from previous #get_first_cild or #get_next_child call.
40
+ # @param [::Object] cookie cookie value as returned from previous #get_first_cild or #get_next_child call.
41
41
  # @return [Array(Wx::TreeItemId, Object)] first child item id (if any) and cookie value
42
42
  def get_next_child(parent_id, cookie) end
43
43
 
@@ -74,7 +74,7 @@ module Wx
74
74
  # @param [Integer] pos child item's position to insert before
75
75
  # @param [Integer] image image index for unselected item
76
76
  # @param [Integer] selImage image index for selected item
77
- # @param data [Object]
77
+ # @param data [::Object]
78
78
  # @return [Wx::TreeItemId] id of inserted tree item
79
79
  def insert_item_before(parent, pos, text, image=-1, selImage=-1, data=nil) end
80
80
 
@@ -22,7 +22,7 @@ module Wx
22
22
  # Should retrieve and return the data from the associated window (#get_window).
23
23
  # By default returns nil (which indicates there is no custom data to transfer).
24
24
  # Overload for customized functionality.
25
- # @return [Object] retrieved data from window
25
+ # @return [::Object] retrieved data from window
26
26
  def do_transfer_from_window; end
27
27
  protected :do_transfer_from_window
28
28
 
@@ -30,7 +30,7 @@ module Wx
30
30
  # Should transfer the given data to the associated window and return true if successful.
31
31
  # By default does nothing and just returns true.
32
32
  # Overload for customized functionality.
33
- # @param [Object] data
33
+ # @param [::Object] data
34
34
  # @return [Boolean]
35
35
  def do_transfer_to_window(data) end
36
36
  protected :do_transfer_to_window
@@ -60,7 +60,7 @@ module Wx
60
60
  # win.set_validator(val)
61
61
  #
62
62
  # @param [String,Symbol,Method,Proc] meth (name of) method or event handling proc; to be supplied when no block is given
63
- # @yieldparam [Object] data the data retrieved from the window
63
+ # @yieldparam [::Object] data the data retrieved from the window
64
64
  def on_transfer_from_window(meth=nil, &block) end
65
65
 
66
66
  # Installs a callback handler to provide the data to transfer to the associated window.
@@ -85,13 +85,13 @@ module Wx
85
85
  # win.set_validator(val)
86
86
  #
87
87
  # @param [String,Symbol,Method,Proc] meth (name of) method or event handling proc; to be supplied when no block is given
88
- # @yieldreturn [Object] the data to transfer to the window
88
+ # @yieldreturn [::Object] the data to transfer to the window
89
89
  def on_transfer_to_window(meth=nil, &block) end
90
90
 
91
91
  # Method called with data transferred from window.
92
92
  # By default will call the on_transfer_from_window handler if defined.
93
93
  # Returns true if successful or none defined.
94
- # @param [Object] data
94
+ # @param [::Object] data
95
95
  # @return [Boolean]
96
96
  def do_on_transfer_from_window(data) end
97
97
  protected :do_on_transfer_from_window
@@ -100,7 +100,7 @@ module Wx
100
100
  # By default will call the on_transfer_to_window handler if defined.
101
101
  # Returns the handler's result if successful.
102
102
  # Otherwise returns nil.
103
- # @return [Object]
103
+ # @return [::Object]
104
104
  def do_on_transfer_to_window; end
105
105
  protected :do_on_transfer_to_window
106
106
 
@@ -16,7 +16,7 @@ module Wx
16
16
  # Returns an enumerator when no block is given.
17
17
  # @overload each(&block)
18
18
  # @yieldparam item [Wx::Variant] variant list item
19
- # @return [Object] result of last block execution
19
+ # @return [::Object] result of last block execution
20
20
  # @overload each
21
21
  # @return [Enumerator] an enumerator
22
22
  def each; end
@@ -52,7 +52,7 @@ module Wx
52
52
  # @return [self]
53
53
  # @overload assign(value)
54
54
  # Equality test operator.
55
- # @param value [Object]
55
+ # @param value [::Object]
56
56
  # @return [self]
57
57
  # @overload assign(value)
58
58
  # Equality test operator.
data/lib/wx/doc/window.rb CHANGED
@@ -44,13 +44,14 @@ module Wx
44
44
  # Creates a Wx::PaintDC when called from an evt_paint handler and a
45
45
  # Wx::ClientDC otherwise.
46
46
  # @yieldparam [Wx::PaintDC,Wx::ClientDC] dc dc to paint on
47
- # @return [Object] result from block
47
+ # @return [::Object] result from block
48
48
  def paint; end
49
49
 
50
- # Similar to #paint but this time creates a Wx::AutoBufferedPaintDC when called
50
+ # Similar to #paint but this time creates a buffered paint DC (which will be either a 'regular' Wx::PaintDC if
51
+ # the platform natively supports double buffering or a Wx::BufferedPaintDC otherwise) when called
51
52
  # from an evt_paint handler and a Wx::ClientDC otherwise.
52
- # @yieldparam [Wx::AutoBufferedPaintDC,Wx::ClientDC] dc dc to paint on
53
- # @return [Object] result from block
53
+ # @yieldparam [Wx::PaintDC,Wx::BufferedPaintDC,Wx::ClientDC] dc dc to paint on
54
+ # @return [::Object] result from block
54
55
  def paint_buffered; end
55
56
 
56
57
  # Yield each child window to the given block.
@@ -13,5 +13,5 @@
13
13
  # wxGrid A grid (table) window
14
14
  Wx::define_keyword_ctors(Wx::GRID::Grid) do
15
15
  wx_ctor_params :id, :pos, :size, :style => Wx::WANTS_CHARS
16
- wx_ctor_params :name => 'grid'
16
+ wx_ctor_params :name => Wx::GRID_NAME_STR
17
17
  end
@@ -13,16 +13,16 @@
13
13
  # wxHtmlWindow - Control for displaying HTML
14
14
  Wx::define_keyword_ctors(Wx::HTML::HtmlWindow) do
15
15
  wx_ctor_params :id, :pos, :size, :style => Wx::HTML::HW_DEFAULT_STYLE
16
- wx_ctor_params :name => 'htmlWindow'
16
+ wx_ctor_params :name => Wx::HTML_WINDOW_NAME_STR
17
17
  end
18
18
 
19
19
  # wxHtmlListBox A listbox showing HTML content
20
20
  Wx::define_keyword_ctors(Wx::HTML::HtmlListBox) do
21
- wx_ctor_params :id, :pos, :size, :style, :name => 'HtmlListBox'
21
+ wx_ctor_params :id, :pos, :size, :style, :name => Wx::HTML_LIST_BOX_NAME_STR
22
22
  end
23
23
 
24
24
  Wx::define_keyword_ctors(Wx::HTML::SimpleHtmlListBox) do
25
25
  wx_ctor_params :id, :pos, :size
26
26
  wx_ctor_params :choices => []
27
- wx_ctor_params :style, :validator, :name => 'SimpleHtmlListBox'
27
+ wx_ctor_params :style, :validator, :name => Wx::SIMPLE_HTML_LIST_BOX_NAME_STR
28
28
  end