wxruby3 0.9.7 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/INSTALL.md +183 -42
- data/README.md +40 -48
- data/ext/mkrf_conf_ext.rb +72 -0
- data/lib/wx/core/app.rb +16 -0
- data/lib/wx/core/colour.rb +36 -28
- data/lib/wx/core/const.rb +19 -0
- data/lib/wx/core/enum.rb +17 -1
- data/lib/wx/core/geometry.rb +121 -0
- data/lib/wx/core/graphics_pen_info.rb +18 -0
- data/lib/wx/core/image.rb +49 -0
- data/lib/wx/core/menu_bar.rb +11 -0
- data/lib/wx/core/paintdc.rb +9 -3
- data/lib/wx/core/secret_store.rb +38 -0
- data/lib/wx/doc/app.rb +97 -41
- data/lib/wx/doc/bitmap.rb +4 -0
- data/lib/wx/doc/client_dc.rb +2 -2
- data/lib/wx/doc/clipboard.rb +1 -1
- data/lib/wx/doc/colour.rb +12 -0
- data/lib/wx/doc/const.rb +16 -0
- data/lib/wx/doc/cursor.rb +4 -0
- data/lib/wx/doc/dc_overlay.rb +34 -0
- data/lib/wx/doc/enum.rb +7 -1
- data/lib/wx/doc/event_blocker.rb +1 -1
- data/lib/wx/doc/evthandler.rb +25 -3
- data/lib/wx/doc/functions.rb +3 -6
- data/lib/wx/doc/gc_dc.rb +13 -4
- data/lib/wx/doc/geometry.rb +136 -0
- data/lib/wx/doc/graphics_context.rb +25 -7
- data/lib/wx/doc/icon.rb +4 -0
- data/lib/wx/doc/image.rb +56 -0
- data/lib/wx/doc/list_ctrl.rb +6 -6
- data/lib/wx/doc/memory_dc.rb +2 -11
- data/lib/wx/doc/mirror_dc.rb +1 -1
- data/lib/wx/doc/pen.rb +26 -0
- data/lib/wx/doc/persistence_manager.rb +1 -1
- data/lib/wx/doc/persistent_object.rb +1 -1
- data/lib/wx/doc/pg/property_grid_interface.rb +3 -3
- data/lib/wx/doc/prt/printer_dc.rb +2 -2
- data/lib/wx/doc/region_iterator.rb +1 -1
- data/lib/wx/doc/scaled_dc.rb +1 -1
- data/lib/wx/doc/screen_dc.rb +1 -1
- data/lib/wx/doc/secret_store.rb +55 -0
- data/lib/wx/doc/svg_file_dc.rb +1 -1
- data/lib/wx/doc/textctrl.rb +1 -1
- data/lib/wx/doc/tree_ctrl.rb +2 -2
- data/lib/wx/doc/validator.rb +6 -6
- data/lib/wx/doc/variant.rb +2 -2
- data/lib/wx/doc/window.rb +5 -4
- data/lib/wx/grid/keyword_defs.rb +1 -1
- data/lib/wx/html/keyword_defs.rb +3 -3
- data/lib/wx/keyword_defs.rb +76 -71
- data/lib/wx/pg/keyword_defs.rb +2 -2
- data/lib/wx/pg/pg_property.rb +12 -0
- data/lib/wx/rbn/keyword_defs.rb +1 -1
- data/lib/wx/rtc/keyword_defs.rb +1 -1
- data/lib/wx/stc/keyword_defs.rb +1 -1
- data/lib/wx/version.rb +1 -1
- data/lib/wx/wxruby/base.rb +3 -5
- data/lib/wx/wxruby/cmd/check.rb +182 -0
- data/lib/wx/wxruby/cmd/sampler.rb +1 -1
- data/lib/wx/wxruby/cmd/setup.rb +9 -3
- data/lib/wx/wxruby/cmd/test.rb +1 -1
- data/rakelib/configure.rb +67 -52
- data/rakelib/gem.rake +97 -66
- data/rakelib/gem.rb +294 -41
- data/rakelib/install.rb +3 -3
- data/rakelib/lib/config/{cygwin.rb → freebsd.rb} +1 -1
- data/rakelib/lib/config/linux.rb +4 -2
- data/rakelib/lib/config/macosx.rb +42 -11
- data/rakelib/lib/config/mingw.rb +2 -2
- data/rakelib/lib/config/pkgman/{base.rb → linux.rb} +36 -61
- data/rakelib/lib/config/pkgman/macosx.rb +17 -78
- data/rakelib/lib/config/unixish.rb +17 -8
- data/rakelib/lib/config/{netbsd.rb → unknown.rb} +3 -2
- data/rakelib/lib/config.rb +74 -33
- data/rakelib/lib/core/include/enum.inc +31 -1
- data/rakelib/lib/director/affine_matrix.rb +51 -0
- data/rakelib/lib/director/app.rb +29 -13
- data/rakelib/lib/director/art_provider.rb +4 -0
- data/rakelib/lib/director/aui_manager.rb +1 -1
- data/rakelib/lib/director/cursor.rb +6 -2
- data/rakelib/lib/director/dc.rb +1 -6
- data/rakelib/lib/director/derived_dc.rb +88 -31
- data/rakelib/lib/director/geometry.rb +142 -0
- data/rakelib/lib/director/graphics_context.rb +3 -2
- data/rakelib/lib/director/graphics_object.rb +18 -25
- data/rakelib/lib/director/grid_ctrl.rb +2 -2
- data/rakelib/lib/director/image.rb +59 -0
- data/rakelib/lib/director/menu.rb +2 -3
- data/rakelib/lib/director/menu_bar.rb +0 -3
- data/rakelib/lib/director/pen.rb +1 -1
- data/rakelib/lib/director/richtext_composite_object.rb +2 -4
- data/rakelib/lib/director/richtext_ctrl.rb +1 -1
- data/rakelib/lib/director/secret_store.rb +117 -0
- data/rakelib/lib/director/system_settings.rb +1 -1
- data/rakelib/lib/director/tree_event.rb +2 -2
- data/rakelib/lib/director/window.rb +4 -3
- data/rakelib/lib/extractor/function.rb +1 -1
- data/rakelib/lib/generate/doc/animation_ctrl.yaml +10 -0
- data/rakelib/lib/generate/doc/banner_window.yaml +35 -0
- data/rakelib/lib/generate/doc/graphics_context.yaml +12 -0
- data/rakelib/lib/generate/doc/graphics_object.yaml +12 -0
- data/rakelib/lib/generate/doc/grid_ctrl.yaml +25 -0
- data/rakelib/lib/generate/doc/header_ctrl.yaml +91 -0
- data/rakelib/lib/generate/doc/icon.yaml +10 -0
- data/rakelib/lib/generate/doc/info_bar.yaml +27 -0
- data/rakelib/lib/generate/doc/log.yaml +1 -1
- data/rakelib/lib/generate/doc/media_ctrl.yaml +27 -0
- data/rakelib/lib/generate/doc/persistent_window.yaml +22 -0
- data/rakelib/lib/generate/doc/pg_editor.yaml +1 -1
- data/rakelib/lib/generate/doc/pg_property.yaml +4 -4
- data/rakelib/lib/generate/doc/rearrange_list.yaml +14 -0
- data/rakelib/lib/generate/doc/ribbon_panel.yaml +15 -0
- data/rakelib/lib/generate/doc/rich_text_formatting_dialog.yaml +26 -0
- data/rakelib/lib/generate/doc/secret_store.yaml +55 -0
- data/rakelib/lib/generate/doc/text_ctrl.yaml +1 -1
- data/rakelib/lib/generate/doc/wizard.yaml +27 -0
- data/rakelib/lib/generate/doc.rb +5 -5
- data/rakelib/lib/generate/interface.rb +1 -1
- data/rakelib/lib/specs/interfaces.rb +4 -0
- data/rakelib/lib/swig_runner.rb +24 -3
- data/rakelib/lib/typemap/common.rb +10 -0
- data/rakelib/lib/typemap/points_list.rb +8 -2
- data/rakelib/lib/typemap/richtext.rb +17 -0
- data/rakelib/prepost.rake +8 -1
- data/rakelib/yard/templates/default/fulldoc/html/css/wxruby3.css +4 -0
- data/rakelib/yard/templates/default/fulldoc/html/setup.rb +3 -3
- data/samples/dialogs/wizard.rb +20 -19
- data/samples/drawing/art/drawing/image.bmp +0 -0
- data/samples/drawing/art/drawing/mask.bmp +0 -0
- data/samples/drawing/art/drawing/pat35.bmp +0 -0
- data/samples/drawing/art/drawing/pat36.bmp +0 -0
- data/samples/drawing/art/drawing/pat4.bmp +0 -0
- data/samples/drawing/art/drawing/smile.xpm +42 -0
- data/samples/drawing/drawing.rb +2276 -0
- data/samples/drawing/tn_drawing.png +0 -0
- data/samples/html/html.rb +1 -1
- data/samples/propgrid/propgrid.rb +1 -1
- data/samples/propgrid/propgrid_minimal.rb +1 -1
- data/samples/propgrid/sample_props.rb +1 -1
- data/samples/sampler/editor.rb +13 -11
- data/samples/sampler/sample.rb +2 -0
- data/samples/sampler.rb +14 -10
- data/samples/text/richtext.rb +53 -0
- data/samples/text/scintilla.rb +1 -1
- data/samples/text/unicode.rb +4 -4
- data/tests/lib/wxapp_runner.rb +1 -1
- data/tests/test_config.rb +7 -4
- data/tests/test_ext_controls.rb +12 -5
- data/tests/test_secret_store.rb +83 -0
- data/tests/test_std_controls.rb +12 -12
- metadata +66 -47
- data/lib/wx/doc/extra/00_starting.md +0 -154
- data/lib/wx/doc/extra/01_packages.md +0 -180
- data/lib/wx/doc/extra/02_lifecycles.md +0 -166
- data/lib/wx/doc/extra/03_dialogs.md +0 -57
- data/lib/wx/doc/extra/04_enums.md +0 -143
- data/lib/wx/doc/extra/05_event-handling.md +0 -191
- data/lib/wx/doc/extra/06_geometry.md +0 -62
- data/lib/wx/doc/extra/07_colour_and_font.md +0 -52
- data/lib/wx/doc/extra/08_extensions.md +0 -144
- data/lib/wx/doc/extra/09_exceptions.md +0 -54
- data/lib/wx/doc/extra/10_art.md +0 -111
- data/lib/wx/doc/extra/11_drawing_and_dc.md +0 -62
- data/lib/wx/doc/extra/12_client_data.md +0 -89
- data/lib/wx/doc/extra/13_validators.md +0 -139
- data/lib/wx/doc/extra/14_config.md +0 -101
- data/lib/wx/doc/extra/15_persistence.md +0 -148
- data/rakefile +0 -14
- data/rakelib/lib/config/pkgman/arch.rb +0 -53
- data/rakelib/lib/config/pkgman/debian.rb +0 -66
- data/rakelib/lib/config/pkgman/rhel.rb +0 -54
- data/rakelib/lib/config/pkgman/suse.rb +0 -54
- data/samples/sampler/back.xpm +0 -21
- data/samples/sampler/copy.xpm +0 -44
- data/samples/sampler/cut.xpm +0 -46
- data/samples/sampler/filesave.xpm +0 -42
- data/samples/sampler/find.xpm +0 -62
- data/samples/sampler/findrepl.xpm +0 -63
- data/samples/sampler/forward.xpm +0 -21
- data/samples/sampler/paste.xpm +0 -46
- data/samples/sampler/redo.xpm +0 -58
- 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
|
data/lib/wx/doc/svg_file_dc.rb
CHANGED
@@ -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
|
data/lib/wx/doc/textctrl.rb
CHANGED
data/lib/wx/doc/tree_ctrl.rb
CHANGED
@@ -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
|
|
data/lib/wx/doc/validator.rb
CHANGED
@@ -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
|
|
data/lib/wx/doc/variant.rb
CHANGED
@@ -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::
|
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::
|
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.
|
data/lib/wx/grid/keyword_defs.rb
CHANGED
data/lib/wx/html/keyword_defs.rb
CHANGED
@@ -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 =>
|
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 =>
|
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 =>
|
27
|
+
wx_ctor_params :style, :validator, :name => Wx::SIMPLE_HTML_LIST_BOX_NAME_STR
|
28
28
|
end
|