wxruby3 0.9.8 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/INSTALL.md +23 -1
- data/README.md +13 -27
- data/ext/mkrf_conf_ext.rb +11 -7
- 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/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/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/cmd/setup.rb +3 -0
- data/rakelib/configure.rb +7 -0
- data/rakelib/gem.rake +3 -2
- data/rakelib/gem.rb +3 -2
- data/rakelib/lib/config/linux.rb +1 -1
- data/rakelib/lib/config/mingw.rb +4 -101
- data/rakelib/lib/config/pkgman/linux.rb +31 -8
- data/rakelib/lib/config/pkgman/mingw.rb +112 -0
- data/rakelib/lib/config/unixish.rb +6 -7
- data/rakelib/lib/config.rb +25 -4
- 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/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/dialog.rb +0 -8
- 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/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_ctrl.rb +1 -1
- data/rakelib/lib/director/system_settings.rb +1 -1
- data/rakelib/lib/director/window.rb +9 -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/text_ctrl.yaml +1 -1
- data/rakelib/lib/generate/doc/wizard.yaml +27 -0
- data/rakelib/lib/generate/doc.rb +4 -4
- data/rakelib/lib/generate/interface.rb +1 -1
- data/rakelib/lib/specs/interfaces.rb +3 -0
- data/rakelib/lib/swig_runner.rb +24 -3
- data/rakelib/lib/typemap/points_list.rb +8 -2
- data/rakelib/lib/typemap/richtext.rb +17 -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.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/test_ext_controls.rb +12 -5
- data/tests/test_gdi_object.rb +2 -2
- data/tests/test_std_controls.rb +12 -12
- metadata +33 -32
- 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/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
data/lib/wx/doc/app.rb
CHANGED
|
@@ -9,47 +9,103 @@ module Wx
|
|
|
9
9
|
|
|
10
10
|
class App
|
|
11
11
|
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
# @
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
12
|
+
# Run the (main loop for) the application instance.
|
|
13
|
+
# Optionally runs a given block as the applications #on_init callback
|
|
14
|
+
# if no actual #on_init method has been defined.
|
|
15
|
+
# A given block will be ignored if an actual #on_init method has been defined.
|
|
16
|
+
# @yieldreturn [Boolean] return true if init block succeeded, false otherwise
|
|
17
|
+
# @return [Integer] return code from the #on_exit callback (`0` if no #on_exit defined or called)
|
|
18
|
+
def run(&block) end
|
|
19
|
+
|
|
20
|
+
# Convenience method to instantiate an application object of the class
|
|
21
|
+
# and call the {Wx::App#run} method for that application object.
|
|
22
|
+
# @yieldreturn [Boolean] return true if init block succeeded, false otherwise
|
|
23
|
+
# @return [Integer] return code from {Wx::App#run}
|
|
24
|
+
def self.run(&block) end
|
|
25
|
+
|
|
26
|
+
class << self
|
|
27
|
+
|
|
28
|
+
# Set the menu item id for the About menu item.
|
|
29
|
+
# Default is {Wx::ID_ABOUT}. Setting to {Wx::ID_NONE} will disable moving the About item to the Application menu.
|
|
30
|
+
# @param [Integer] id
|
|
31
|
+
# @wxrb_require WXOSX
|
|
32
|
+
# @see Wx::App.get_mac_about_menu_itemid
|
|
33
|
+
def set_mac_about_menu_itemid(id) end
|
|
34
|
+
alias :mac_about_menu_itemid= :set_mac_about_menu_itemid
|
|
35
|
+
|
|
36
|
+
# Get the current menu item id for the About menu item.
|
|
37
|
+
# Default is {Wx::ID_ABOUT}
|
|
38
|
+
# @return [Integer]
|
|
39
|
+
# @wxrb_require WXOSX
|
|
40
|
+
# @see Wx::App.set_mac_about_menu_itemid
|
|
41
|
+
def get_mac_about_menu_itemid; end
|
|
42
|
+
alias :mac_about_menu_itemid :get_mac_about_menu_itemid
|
|
43
|
+
|
|
44
|
+
# Set the menu item id for the Preferences menu item.
|
|
45
|
+
# Default is {Wx::ID_PREFERENCES}
|
|
46
|
+
# @param [Integer] id
|
|
47
|
+
# @wxrb_require WXOSX
|
|
48
|
+
# @see Wx::App.get_mac_preferences_menu_itemid
|
|
49
|
+
def set_mac_preferences_menu_itemid(id) end
|
|
50
|
+
alias :mac_preferences_menu_itemid= :set_mac_preferences_menu_itemid
|
|
51
|
+
|
|
52
|
+
# Get the current menu item id for the Preferences menu item.
|
|
53
|
+
# Default is {Wx::ID_PREFERENCES}
|
|
54
|
+
# @return [Integer]
|
|
55
|
+
# @wxrb_require WXOSX
|
|
56
|
+
# @see Wx::App.set_mac_preferences_menu_itemid
|
|
57
|
+
def get_mac_preferences_menu_itemid; end
|
|
58
|
+
alias :mac_preferences_menu_itemid :get_mac_preferences_menu_itemid
|
|
59
|
+
|
|
60
|
+
# Set the menu item id for the Exit menu item.
|
|
61
|
+
# Default is {Wx::ID_EXIT}. Setting to {Wx::ID_NONE} will disable hiding the exit item. Standard item will still be added to Application menu.
|
|
62
|
+
# @param [Integer] id
|
|
63
|
+
# @wxrb_require WXOSX
|
|
64
|
+
# @see Wx::App.get_mac_exit_menu_itemid
|
|
65
|
+
def set_mac_exit_menu_itemid(id) end
|
|
66
|
+
alias :mac_exit_menu_itemid= :set_mac_exit_menu_itemid
|
|
67
|
+
|
|
68
|
+
# Get the current menu item id for the Exit menu item.
|
|
69
|
+
# Default is {Wx::ID_EXIT}
|
|
70
|
+
# @return [Integer]
|
|
71
|
+
# @wxrb_require WXOSX
|
|
72
|
+
# @see Wx::App.set_mac_exit_menu_itemid
|
|
73
|
+
def get_mac_exit_menu_itemid; end
|
|
74
|
+
alias :mac_exit_menu_itemid :get_mac_exit_menu_itemid
|
|
75
|
+
|
|
76
|
+
# Set the menu title for the Help menu.
|
|
77
|
+
# Default is '&Help'
|
|
78
|
+
# @param [String] title
|
|
79
|
+
# @wxrb_require WXOSX
|
|
80
|
+
# @see Wx::App.get_mac_help_menu_title
|
|
81
|
+
def set_mac_help_menu_title(title) end
|
|
82
|
+
alias :mac_help_menu_title= :set_mac_help_menu_title
|
|
83
|
+
|
|
84
|
+
# Get the current title for the Help menu.
|
|
85
|
+
# Default is '&Help'
|
|
86
|
+
# @return [String]
|
|
87
|
+
# @wxrb_require WXOSX
|
|
88
|
+
# @see Wx::App.set_mac_help_menu_title
|
|
89
|
+
def get_mac_help_menu_title; end
|
|
90
|
+
alias :mac_help_menu_title :get_mac_help_menu_title
|
|
91
|
+
|
|
92
|
+
# Set the menu title for the Window menu.
|
|
93
|
+
# Default is '&Window'
|
|
94
|
+
# @param [String] title
|
|
95
|
+
# @wxrb_require WXOSX
|
|
96
|
+
# @see Wx::App.get_mac_window_menu_title
|
|
97
|
+
def set_mac_window_menu_title(title) end
|
|
98
|
+
alias :mac_window_menu_title= :set_mac_window_menu_title
|
|
99
|
+
|
|
100
|
+
# Get the current title for the Window menu.
|
|
101
|
+
# Default is '&Window'
|
|
102
|
+
# @return [String]
|
|
103
|
+
# @wxrb_require WXOSX
|
|
104
|
+
# @see Wx::App.set_mac_window_menu_title
|
|
105
|
+
def get_mac_window_menu_title; end
|
|
106
|
+
alias :mac_window_menu_title :get_mac_window_menu_title
|
|
107
|
+
|
|
108
|
+
end
|
|
53
109
|
|
|
54
110
|
end
|
|
55
111
|
|
data/lib/wx/doc/bitmap.rb
CHANGED
|
@@ -14,6 +14,8 @@ module Wx
|
|
|
14
14
|
# Default BitmapType for current platform. Actual value is platform dependent.
|
|
15
15
|
CURSOR_DEFAULT_TYPE = Wx::BitmapType::BITMAP_TYPE_ANY
|
|
16
16
|
|
|
17
|
+
# @!group Art creation methods
|
|
18
|
+
|
|
17
19
|
# Searches for an art file with basename 'name' and creates a Bitmap if found.
|
|
18
20
|
# Raises an ArgumentError if not found.
|
|
19
21
|
# Wx::ArtLocator::find_art is used to look up the art file using ::Kernel#caller_locations to
|
|
@@ -28,4 +30,6 @@ module Wx
|
|
|
28
30
|
# @see Wx::ArtLocator::find_art
|
|
29
31
|
def self.Bitmap(name, bmp_type = nil, art_path: nil, art_section: nil); end
|
|
30
32
|
|
|
33
|
+
# @!endgroup
|
|
34
|
+
|
|
31
35
|
end
|
data/lib/wx/doc/client_dc.rb
CHANGED
|
@@ -13,7 +13,7 @@ module Wx
|
|
|
13
13
|
# it's single argument.
|
|
14
14
|
# @param [Wx::Window] win window to draw on
|
|
15
15
|
# @yieldparam [Wx::ClientDC] dc the ClientDC instance to paint on
|
|
16
|
-
# @return [Object] result of the block
|
|
16
|
+
# @return [::Object] result of the block
|
|
17
17
|
def self.draw_on(win) end
|
|
18
18
|
|
|
19
19
|
end
|
|
@@ -26,7 +26,7 @@ module Wx
|
|
|
26
26
|
# @note In wxRuby this method mostly exists to be consistent with the other DC classes. It is however recommended to use Wx::Window#paint instead.
|
|
27
27
|
# @param [Wx::Window] win window to draw on
|
|
28
28
|
# @yieldparam [Wx::PaintDC] dc the PaintDC instance to paint on
|
|
29
|
-
# @return [Object] result of the block
|
|
29
|
+
# @return [::Object] result of the block
|
|
30
30
|
def self.draw_on(win) end
|
|
31
31
|
|
|
32
32
|
end
|
data/lib/wx/doc/clipboard.rb
CHANGED
|
@@ -14,7 +14,7 @@ module Wx
|
|
|
14
14
|
|
|
15
15
|
# Opens the global clipboard and passes the clipboard object to the block.
|
|
16
16
|
# @yieldparam [Wx::Clipboard] clip the global clipboard object
|
|
17
|
-
# @return [Object] block result
|
|
17
|
+
# @return [::Object] block result
|
|
18
18
|
def self.open; end
|
|
19
19
|
|
|
20
20
|
end
|
data/lib/wx/doc/const.rb
CHANGED
|
@@ -71,8 +71,14 @@ module Wx
|
|
|
71
71
|
TREE_LIST_CTRL_NAME_STR = 'wxTreeListCtrl'
|
|
72
72
|
HTML_LIST_BOX_NAME_STR = 'htmlListBox'
|
|
73
73
|
SIMPLE_HTML_LIST_BOX_NAME_STR = 'simpleHtmlListBox'
|
|
74
|
+
HTML_WINDOW_NAME_STR = 'htmlWindow'
|
|
74
75
|
EDITABLE_LIST_BOX_NAME_STR = 'editableListBox'
|
|
75
76
|
V_LIST_BOX_NAME_STR = 'wxVListBox'
|
|
77
|
+
ACTIVITY_INDICATOR_NAME_STR = 'activityindicator'
|
|
78
|
+
TIME_PICKER_CTRL_NAME_STR = 'timectrl'
|
|
79
|
+
DATE_PICKER_CTRL_NAME_STR = 'datectrl'
|
|
80
|
+
CALENDAR_NAME_STR = 'CalendarCtrl'
|
|
81
|
+
SPIN_BUTTON_NAME_STR = 'wxSpinButton'
|
|
76
82
|
|
|
77
83
|
# wxMSW only
|
|
78
84
|
MSW_HEADER_CTRL_NAME_STR = 'wxMSWHeaderCtrl'
|
|
@@ -81,4 +87,14 @@ module Wx
|
|
|
81
87
|
PROPERTY_GRID_NAME_STR = 'wxPropertyGrid'
|
|
82
88
|
STC_NAME_STR = 'stcwindow'
|
|
83
89
|
|
|
90
|
+
MEDIA_CTRL_NAME_STR = 'mediaCtrl'
|
|
91
|
+
SPIN_CTRL_NAME_STR = 'spinCtrl'
|
|
92
|
+
SPIN_CTRL_DOUBLE_NAME_STR = 'wxSpinCtrlDouble'
|
|
93
|
+
SPLITTER_WINDOW_NAME_STR = 'splitter'
|
|
94
|
+
TOOLBOOK_NAME_STR = 'toolbook'
|
|
95
|
+
TREEBOOK_NAME_STR = 'treebook'
|
|
96
|
+
SASH_WINDOW_NAME_STR = 'sashWindow'
|
|
97
|
+
SASH_LAYOUT_WINDOW_NAME_STR = 'layoutWindow'
|
|
98
|
+
SCROLLED_NAME_STR = 'SCROLLED_WINDOW'
|
|
99
|
+
|
|
84
100
|
end
|
data/lib/wx/doc/cursor.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 a Cursor 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
|
|
@@ -21,4 +23,6 @@ class Wx
|
|
|
21
23
|
# @see Wx::ArtLocator::find_art
|
|
22
24
|
def self.Cursor(name, bmp_type = nil, art_path: nil, art_section: nil); end
|
|
23
25
|
|
|
26
|
+
# @!endgroup
|
|
27
|
+
|
|
24
28
|
end
|
|
@@ -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
|
data/lib/wx/doc/event_blocker.rb
CHANGED
|
@@ -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
|
|
data/lib/wx/doc/evthandler.rb
CHANGED
|
@@ -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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
#
|
data/lib/wx/doc/functions.rb
CHANGED
|
@@ -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
|
-
#
|
|
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
|
-
# @
|
|
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
|
-
# @
|
|
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
|
-
# @
|
|
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
|
-
# @
|
|
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
|
-
# @
|
|
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
|
-
# @
|
|
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::
|
|
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
|