wxruby3 0.9.0.pre.beta.14-x64-mingw-ucrt → 0.9.0.pre.rc.2-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -0
- data/INSTALL.md +51 -22
- data/README.md +81 -6
- data/assets/hello_button-macos.png +0 -0
- data/assets/hello_button-msw.png +0 -0
- data/assets/hello_button.png +0 -0
- data/assets/hello_button_clicked-macos.png +0 -0
- data/assets/hello_button_clicked-msw.png +0 -0
- data/assets/hello_button_clicked.png +0 -0
- data/assets/hello_button_clicked_combi.png +0 -0
- data/assets/hello_world-macos.png +0 -0
- data/assets/hello_world-msw.png +0 -0
- data/assets/hello_world.png +0 -0
- data/assets/hello_world_combi.png +0 -0
- data/assets/repo-social-preview.png +0 -0
- data/ext/wxbase32u_gcc_custom.dll +0 -0
- data/ext/wxbase32u_net_gcc_custom.dll +0 -0
- data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
- data/lib/wx/core/art_locator.rb +2 -2
- data/lib/wx/core/artprovider.rb +2 -2
- data/lib/wx/core/bitmap.rb +6 -5
- data/lib/wx/core/bitmap_combobox.rb +34 -0
- data/lib/wx/core/brush.rb +6 -0
- data/lib/wx/core/controlwithitems.rb +52 -14
- data/lib/wx/core/cursor.rb +1 -1
- data/lib/wx/core/dc.rb +0 -20
- data/lib/wx/core/event_blocker.rb +14 -0
- data/lib/wx/core/events/evt_list.rb +19 -0
- data/lib/wx/core/evthandler.rb +48 -2
- data/lib/wx/core/find_replace_dialog.rb +24 -0
- data/lib/wx/core/font.rb +22 -14
- data/lib/wx/core/helpprovider.rb +2 -2
- data/lib/wx/core/icon.rb +1 -1
- data/lib/wx/core/image.rb +1 -1
- data/lib/wx/core/menu.rb +5 -0
- data/lib/wx/core/paintdc.rb +8 -0
- data/lib/wx/core/pen.rb +6 -0
- data/lib/wx/core/text_entry.rb +15 -0
- data/lib/wx/core/v_list_box.rb +13 -0
- data/lib/wx/core/window.rb +29 -2
- data/lib/wx/doc/app.rb +40 -0
- data/lib/wx/doc/brush.rb +17 -0
- data/lib/wx/doc/busy_info.rb +21 -0
- data/lib/wx/doc/client_dc.rb +28 -0
- data/lib/wx/doc/controlwithitems.rb +11 -0
- data/lib/wx/doc/dc.rb +0 -14
- data/lib/wx/doc/event_blocker.rb +27 -0
- data/lib/wx/doc/evthandler.rb +4 -0
- data/lib/wx/doc/extra/02_lifecycles.md +49 -0
- data/lib/wx/doc/extra/10_art.md +1 -1
- data/lib/wx/doc/extra/11_drawing_and_dc.md +62 -0
- data/lib/wx/doc/font.rb +27 -0
- data/lib/wx/doc/gen/about_dialog_info.rb +27 -24
- data/lib/wx/doc/gen/accelerator.rb +11 -12
- data/lib/wx/doc/gen/activity_indicator.rb +65 -0
- data/lib/wx/doc/gen/app.rb +6 -3
- data/lib/wx/doc/gen/art_provider.rb +53 -29
- data/lib/wx/doc/gen/aui/aui_manager.rb +4 -0
- data/lib/wx/doc/gen/aui/aui_mdi_child_frame.rb +1 -1
- data/lib/wx/doc/gen/aui/aui_pane_info.rb +2 -0
- data/lib/wx/doc/gen/aui/aui_tab_ctrl.rb +2 -0
- data/lib/wx/doc/gen/aui/aui_tool_bar.rb +2 -2
- data/lib/wx/doc/gen/bitmap.rb +25 -25
- data/lib/wx/doc/gen/bitmap_combo_box.rb +157 -0
- data/lib/wx/doc/gen/box_sizer.rb +6 -8
- data/lib/wx/doc/gen/brush.rb +2 -0
- data/lib/wx/doc/gen/busy_info.rb +52 -46
- data/lib/wx/doc/gen/caret.rb +0 -4
- data/lib/wx/doc/gen/check_list_box.rb +0 -2
- data/lib/wx/doc/gen/choice.rb +1 -5
- data/lib/wx/doc/gen/client_dc.rb +13 -18
- data/lib/wx/doc/gen/clipboard.rb +30 -27
- data/lib/wx/doc/gen/collapsible_pane.rb +11 -9
- data/lib/wx/doc/gen/colour.rb +6 -3
- data/lib/wx/doc/gen/colour_dialog.rb +111 -23
- data/lib/wx/doc/gen/combo_box.rb +2 -4
- data/lib/wx/doc/gen/context_help_button.rb +48 -0
- data/lib/wx/doc/gen/control.rb +20 -18
- data/lib/wx/doc/gen/core.rb +2 -2
- data/lib/wx/doc/gen/cursor.rb +18 -50
- data/lib/wx/doc/gen/data_format.rb +0 -2
- data/lib/wx/doc/gen/data_object.rb +37 -44
- data/lib/wx/doc/gen/dc.rb +16 -24
- data/lib/wx/doc/gen/defs.rb +3 -40
- data/lib/wx/doc/gen/dialog.rb +21 -17
- data/lib/wx/doc/gen/dir_dialog.rb +10 -8
- data/lib/wx/doc/gen/event.rb +2 -2
- data/lib/wx/doc/gen/event_blocker.rb +51 -0
- data/lib/wx/doc/gen/event_filter.rb +88 -0
- data/lib/wx/doc/gen/event_list.rb +23 -2
- data/lib/wx/doc/gen/events.rb +103 -112
- data/lib/wx/doc/gen/evt_handler.rb +28 -52
- data/lib/wx/doc/gen/file_dialog.rb +53 -50
- data/lib/wx/doc/gen/find_replace_dialog.rb +1 -1
- data/lib/wx/doc/gen/font.rb +19 -2
- data/lib/wx/doc/gen/font_data.rb +2 -0
- data/lib/wx/doc/gen/font_dialog.rb +1 -1
- data/lib/wx/doc/gen/frame.rb +4 -3
- data/lib/wx/doc/gen/fs_file.rb +8 -0
- data/lib/wx/doc/gen/gcdc.rb +2 -22
- data/lib/wx/doc/gen/gdi_common.rb +18 -2
- data/lib/wx/doc/gen/gdi_object.rb +2 -0
- data/lib/wx/doc/gen/graphics_context.rb +4 -43
- data/lib/wx/doc/gen/graphics_object.rb +2 -0
- data/lib/wx/doc/gen/grid/grid_cell_attr.rb +2 -1
- data/lib/wx/doc/gen/grid/grid_ctrl.rb +4 -2
- data/lib/wx/doc/gen/grid/grid_table_message.rb +2 -0
- data/lib/wx/doc/gen/grid_bag_sizer.rb +4 -0
- data/lib/wx/doc/gen/help_controller.rb +4 -1
- data/lib/wx/doc/gen/html/html_cell.rb +4 -1
- data/lib/wx/doc/gen/html/html_help_controller.rb +4 -1
- data/lib/wx/doc/gen/html/html_help_data.rb +4 -0
- data/lib/wx/doc/gen/html/html_help_window.rb +2 -1
- data/lib/wx/doc/gen/html/html_list_box.rb +138 -11
- data/lib/wx/doc/gen/html/html_window.rb +9 -3
- data/lib/wx/doc/gen/hyperlink_ctrl.rb +147 -0
- data/lib/wx/doc/gen/hyperlink_event.rb +43 -0
- data/lib/wx/doc/gen/icon.rb +7 -1
- data/lib/wx/doc/gen/icon_location.rb +2 -0
- data/lib/wx/doc/gen/image.rb +15 -8
- data/lib/wx/doc/gen/keyboard_state.rb +6 -0
- data/lib/wx/doc/gen/list_box.rb +0 -11
- data/lib/wx/doc/gen/list_ctrl.rb +10 -13
- data/lib/wx/doc/gen/locale.rb +7 -3
- data/lib/wx/doc/gen/log.rb +6 -2
- data/lib/wx/doc/gen/mdi_frame.rb +2 -0
- data/lib/wx/doc/gen/media_ctrl.rb +2 -0
- data/lib/wx/doc/gen/memory_dc.rb +105 -18
- data/lib/wx/doc/gen/menu.rb +4 -2
- data/lib/wx/doc/gen/menu_bar.rb +0 -8
- data/lib/wx/doc/gen/menu_item.rb +9 -3
- data/lib/wx/doc/gen/message_dialog.rb +6 -3
- data/lib/wx/doc/gen/mirror_dc.rb +2 -8
- data/lib/wx/doc/gen/mouse_state.rb +2 -0
- data/lib/wx/doc/gen/multi_choice_dialog.rb +0 -2
- data/lib/wx/doc/gen/non_owned_window.rb +2 -1
- data/lib/wx/doc/gen/notebook.rb +4 -2
- data/lib/wx/doc/gen/paint_dc.rb +2 -6
- data/lib/wx/doc/gen/palette.rb +3 -3
- data/lib/wx/doc/gen/pen.rb +6 -1
- data/lib/wx/doc/gen/pg/pg_editor.rb +2 -1
- data/lib/wx/doc/gen/pg/pg_multi_button.rb +4 -0
- data/lib/wx/doc/gen/pg/pg_properties.rb +30 -3
- data/lib/wx/doc/gen/pg/pg_property.rb +30 -4
- data/lib/wx/doc/gen/pg/pg_validation_info.rb +2 -0
- data/lib/wx/doc/gen/pg/property_grid.rb +5 -2
- data/lib/wx/doc/gen/pg/property_grid_interface.rb +6 -2
- data/lib/wx/doc/gen/pg/property_grid_manager.rb +2 -0
- data/lib/wx/doc/gen/pg/property_grid_page_state.rb +2 -0
- data/lib/wx/doc/gen/picker_base.rb +2 -1
- data/lib/wx/doc/gen/platform_info.rb +4 -1
- data/lib/wx/doc/gen/property_sheet_dialog.rb +2 -0
- data/lib/wx/doc/gen/prt/post_script_dc.rb +2 -8
- data/lib/wx/doc/gen/prt/print_data.rb +6 -0
- data/lib/wx/doc/gen/prt/printer.rb +0 -3
- data/lib/wx/doc/gen/prt/printer_dc.rb +2 -6
- data/lib/wx/doc/gen/radio_box.rb +2 -10
- data/lib/wx/doc/gen/rbn/ribbon_art_provider.rb +6 -0
- data/lib/wx/doc/gen/rbn/ribbon_panel.rb +1 -1
- data/lib/wx/doc/gen/region.rb +2 -0
- data/lib/wx/doc/gen/rtc/rich_text_buffer.rb +6 -0
- data/lib/wx/doc/gen/rtc/rich_text_ctrl.rb +0 -4
- data/lib/wx/doc/gen/rtc/rich_text_header_footer_data.rb +2 -0
- data/lib/wx/doc/gen/rtc/rich_text_html_handler.rb +2 -1
- data/lib/wx/doc/gen/rtc/symbol_picker_dialog.rb +2 -0
- data/lib/wx/doc/gen/screen_dc.rb +2 -0
- data/lib/wx/doc/gen/scroll_bar.rb +2 -1
- data/lib/wx/doc/gen/scrolled_canvas.rb +4 -8
- data/lib/wx/doc/gen/scrolled_control.rb +4 -8
- data/lib/wx/doc/gen/scrolled_window.rb +4 -8
- data/lib/wx/doc/gen/search_ctrl.rb +131 -0
- data/lib/wx/doc/gen/single_choice_dialog.rb +0 -2
- data/lib/wx/doc/gen/sizer.rb +14 -3
- data/lib/wx/doc/gen/splash_screen.rb +2 -0
- data/lib/wx/doc/gen/static_box.rb +6 -3
- data/lib/wx/doc/gen/static_box_sizer.rb +2 -1
- data/lib/wx/doc/gen/status_bar.rb +0 -5
- data/lib/wx/doc/gen/stc/styled_text_ctrl.rb +4 -5
- data/lib/wx/doc/gen/svg_file_dc.rb +10 -11
- data/lib/wx/doc/gen/text_ctrl.rb +10 -3
- data/lib/wx/doc/gen/text_entry.rb +8 -3
- data/lib/wx/doc/gen/text_entry_dialog.rb +4 -2
- data/lib/wx/doc/gen/timer_event.rb +2 -0
- data/lib/wx/doc/gen/tool_bar.rb +8 -4
- data/lib/wx/doc/gen/top_level_window.rb +5 -2
- data/lib/wx/doc/gen/tree_ctrl.rb +0 -6
- data/lib/wx/doc/gen/ui_action_simulator.rb +100 -0
- data/lib/wx/doc/gen/utils.rb +1 -1
- data/lib/wx/doc/gen/v_list_box.rb +36 -26
- data/lib/wx/doc/gen/validator.rb +2 -1
- data/lib/wx/doc/gen/variant.rb +10 -0
- data/lib/wx/doc/gen/window.rb +38 -17
- data/lib/wx/doc/gen/window_dc.rb +2 -0
- data/lib/wx/doc/gen/window_disabler.rb +2 -0
- data/lib/wx/doc/gen/wizard_page_simple.rb +2 -0
- data/lib/wx/doc/gen/xml_node.rb +6 -0
- data/lib/wx/doc/gen/xml_resource.rb +4 -1
- data/lib/wx/doc/memory_dc.rb +75 -0
- data/lib/wx/doc/mirror_dc.rb +16 -0
- data/lib/wx/doc/pen.rb +17 -0
- data/lib/wx/doc/prt/printer_dc.rb +26 -0
- data/lib/wx/doc/radio_box.rb +20 -0
- data/lib/wx/doc/screen_dc.rb +10 -6
- data/lib/wx/doc/svg_file_dc.rb +20 -0
- data/lib/wx/doc/v_list_box.rb +9 -0
- data/lib/wx/doc/window.rb +27 -0
- data/lib/wx/doc/window_disabler.rb +10 -0
- data/lib/wx/html/keyword_defs.rb +6 -7
- data/lib/wx/html/require.rb +1 -0
- data/lib/wx/html/simple_html_listbox.rb +105 -0
- data/lib/wx/keyword_defs.rb +83 -75
- data/lib/wx/prt/keyword_defs.rb +5 -1
- data/lib/wx/version.rb +1 -1
- data/lib/wx/wxruby/cmd/test.rb +1 -1
- data/lib/wxruby_aui.so +0 -0
- data/lib/wxruby_core.so +0 -0
- data/lib/wxruby_grid.so +0 -0
- data/lib/wxruby_html.so +0 -0
- data/lib/wxruby_pg.so +0 -0
- data/lib/wxruby_prt.so +0 -0
- data/lib/wxruby_rbn.so +0 -0
- data/lib/wxruby_rtc.so +0 -0
- data/lib/wxruby_stc.so +0 -0
- data/rakelib/install.rb +20 -7
- data/rakelib/lib/config/linux.rb +4 -2
- data/rakelib/lib/config/macosx.rb +120 -1
- data/rakelib/lib/config/mingw.rb +6 -1
- data/rakelib/lib/config/unixish.rb +26 -11
- data/rakelib/lib/config.rb +15 -6
- data/rakelib/yard/yard/relative_markdown_links.rb +5 -1
- data/samples/aui/aui.rb +432 -363
- data/samples/bigdemo/wxArtProvider.rbw +5 -4
- data/samples/controls/controls.rb +2 -2
- data/samples/controls/htlbox.rb +411 -0
- data/samples/controls/tn_htlbox.png +0 -0
- data/samples/drawing/graphics_drawing.rb +1 -2
- data/samples/drawing/{svgtest.rb → image_prt.rb} +49 -18
- data/samples/drawing/tn_image_prt.png +0 -0
- data/samples/propgrid/propgrid.rb +26 -21
- data/samples/ribbon/ribbon.rb +47 -46
- data/samples/sampler/editor.rb +33 -25
- data/samples/sampler/sample.rb +2 -2
- data/samples/sampler/stc_editor.rb +4 -2
- data/tests/lib/item_container_tests.rb +82 -0
- data/tests/lib/text_entry_tests.rb +80 -0
- data/tests/lib/wxapp_runner.rb +15 -3
- data/tests/lib/wxframe_runner.rb +144 -0
- data/tests/test_app_event_filter.rb +74 -0
- data/tests/test_art_provider.rb +52 -0
- data/tests/test_clipboard.rb +2 -1
- data/tests/test_event_handling.rb +199 -16
- data/tests/test_events.rb +4 -11
- data/tests/test_ext_controls.rb +28 -0
- data/tests/test_font.rb +239 -0
- data/tests/test_gdi_object.rb +161 -0
- data/tests/test_intl.rb +16 -15
- data/tests/test_item_data.rb +33 -1
- data/tests/test_std_controls.rb +373 -0
- data/tests/test_window.rb +340 -0
- metadata +61 -8
- data/lib/wx/doc/gen/auto_buffered_paint_dc.rb +0 -47
- data/lib/wx/doc/gen/buffered_dc.rb +0 -95
- data/lib/wx/doc/gen/buffered_paint_dc.rb +0 -55
- data/lib/wx/doc/gen/colour_data.rb +0 -96
- data/samples/drawing/tn_svgtest.png +0 -0
@@ -0,0 +1,100 @@
|
|
1
|
+
# :stopdoc:
|
2
|
+
# This file is automatically generated by the WXRuby3 documentation
|
3
|
+
# generator. Do not alter this file.
|
4
|
+
# :startdoc:
|
5
|
+
|
6
|
+
|
7
|
+
module Wx
|
8
|
+
|
9
|
+
# {Wx::UIActionSimulator} is a class used to simulate user interface actions such as a mouse click or a key press.
|
10
|
+
# Common usage for this class would be to provide playback and record (aka macro recording) functionality for users, or to drive unit tests by simulating user sessions.
|
11
|
+
# See the wxUIActionSimulator Sample for an example of using this class.
|
12
|
+
#
|
13
|
+
# ===
|
14
|
+
#
|
15
|
+
#
|
16
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
17
|
+
class UIActionSimulator < ::Object
|
18
|
+
|
19
|
+
# Default constructor.
|
20
|
+
# @return [UIActionSimulator]
|
21
|
+
def initialize; end
|
22
|
+
|
23
|
+
# @overload mouse_move(x, y)
|
24
|
+
# Move the mouse to the specified coordinates.
|
25
|
+
# @param x [Integer] x coordinate to move to, in screen coordinates.
|
26
|
+
# @param y [Integer] y coordinate to move to, in screen coordinates.
|
27
|
+
# @return [true,false]
|
28
|
+
# @overload mouse_move(point)
|
29
|
+
# Move the mouse to the specified coordinates.
|
30
|
+
# @param point [Array(Integer, Integer), Wx::Point] Point to move to, in screen coordinates.
|
31
|
+
# @return [true,false]
|
32
|
+
def mouse_move(*args) end
|
33
|
+
|
34
|
+
# Press a mouse button.
|
35
|
+
# @param button [Integer] Button to press. Valid constants are {Wx::MOUSE_BTN_LEFT}, {Wx::MOUSE_BTN_MIDDLE}, and {Wx::MOUSE_BTN_RIGHT}.
|
36
|
+
# @return [true,false]
|
37
|
+
def mouse_down(button=Wx::MOUSE_BTN_LEFT) end
|
38
|
+
|
39
|
+
# Release a mouse button.
|
40
|
+
# @param button [Integer] Button to press. See {Wx::UIActionSimulator#mouse_down} for a list of valid constants.
|
41
|
+
# @return [true,false]
|
42
|
+
def mouse_up(button=Wx::MOUSE_BTN_LEFT) end
|
43
|
+
|
44
|
+
# Click a mouse button.
|
45
|
+
# @param button [Integer] Button to press. See {Wx::UIActionSimulator#mouse_down} for a list of valid constants.
|
46
|
+
# @return [true,false]
|
47
|
+
def mouse_click(button=Wx::MOUSE_BTN_LEFT) end
|
48
|
+
|
49
|
+
# Double-click a mouse button.
|
50
|
+
# @param button [Integer] Button to press. See {Wx::UIActionSimulator#mouse_down} for a list of valid constants.
|
51
|
+
# @return [true,false]
|
52
|
+
def mouse_dbl_click(button=Wx::MOUSE_BTN_LEFT) end
|
53
|
+
|
54
|
+
# Perform a drag and drop operation.
|
55
|
+
# @param x1 [Integer] x start coordinate, in screen coordinates.
|
56
|
+
# @param y1 [Integer] y start coordinate, in screen coordinates.
|
57
|
+
# @param x2 [Integer] x destination coordinate, in screen coordinates.
|
58
|
+
# @param y2 [Integer] y destination coordinate, in screen coordinates.
|
59
|
+
# @param button [Integer] Button to press. See {Wx::UIActionSimulator#mouse_down} for a list of valid constants.
|
60
|
+
# @return [true,false]
|
61
|
+
def mouse_drag_drop(x1, y1, x2, y2, button=Wx::MOUSE_BTN_LEFT) end
|
62
|
+
|
63
|
+
# Press a key.
|
64
|
+
# If you are using modifiers then it needs to be paired with an identical KeyUp or the modifiers will not be released (MSW and macOS).
|
65
|
+
# @param keycode [Integer] Key to operate on, as an integer. It is interpreted as a {Wx::KeyCode}.
|
66
|
+
# @param modifiers [Integer] A combination of {Wx::KeyModifier} flags to be pressed with the given keycode.
|
67
|
+
# @return [true,false]
|
68
|
+
def key_down(keycode, modifiers=Wx::KeyModifier::MOD_NONE) end
|
69
|
+
|
70
|
+
# Release a key.
|
71
|
+
# @param keycode [Integer] Key to operate on, as an integer. It is interpreted as a {Wx::KeyCode}.
|
72
|
+
# @param modifiers [Integer] A combination of {Wx::KeyModifier} flags to be pressed with the given keycode.
|
73
|
+
# @return [true,false]
|
74
|
+
def key_up(keycode, modifiers=Wx::KeyModifier::MOD_NONE) end
|
75
|
+
|
76
|
+
# Press and release a key.
|
77
|
+
# @param keycode [Integer] Key to operate on, as an integer. It is interpreted as a {Wx::KeyCode}.
|
78
|
+
# @param modifiers [Integer] A combination of {Wx::KeyModifier} flags to be pressed with the given keycode.
|
79
|
+
# @return [true,false]
|
80
|
+
def char(keycode, modifiers=Wx::KeyModifier::MOD_NONE) end
|
81
|
+
|
82
|
+
# Simulate selection of an item with the given text.
|
83
|
+
# This method selects an item in the currently focused {Wx::Choice}, {Wx::ComboBox}, {Wx::ListBox} and similar controls. It does it by simulating keyboard events, so the behaviour should be the same as if the item was really selected by the user.
|
84
|
+
# Notice that the implementation of this method uses {yield} and so events can be dispatched from it.
|
85
|
+
#
|
86
|
+
# true if the item text was successfully selected or false if the currently focused window is not one of the controls allowing item selection or if the item with the given text was not found in it.
|
87
|
+
# @param text [String] The text of the item to select.
|
88
|
+
# @return [true,false]
|
89
|
+
def select(text) end
|
90
|
+
|
91
|
+
# Emulate typing in the keys representing the given string.
|
92
|
+
# Currently only the ASCII letters are universally supported. Digits and punctuation characters can be used with the standard QWERTY (US) keyboard layout but may not work with other layouts.
|
93
|
+
# @param text [String] The string, containing only US ASCII characters, to type.
|
94
|
+
# @return [true,false]
|
95
|
+
def text(text) end
|
96
|
+
|
97
|
+
end # UIActionSimulator
|
98
|
+
|
99
|
+
|
100
|
+
end
|
data/lib/wx/doc/gen/utils.rb
CHANGED
@@ -50,7 +50,7 @@ module Wx
|
|
50
50
|
# For normal keys, returns true if the specified key is currently down.
|
51
51
|
# For togglable keys (Caps Lock, Num Lock and Scroll Lock), returns true if the key is toggled such that its LED indicator is lit. There is currently no way to test whether togglable keys are up or down.
|
52
52
|
# Even though there are virtual key codes defined for mouse buttons, they cannot be used with this function currently.
|
53
|
-
# In {Wx::GTK}, this function can be only used with modifier keys (
|
53
|
+
# In {Wx::GTK}, this function can be only used with modifier keys ({Wx::K_ALT}, {Wx::K_CONTROL} and {Wx::K_SHIFT}) when not using X11 backend currently.
|
54
54
|
# @param key [KeyCode]
|
55
55
|
# @return [true,false]
|
56
56
|
def self.get_key_state(key) end
|
@@ -71,24 +71,6 @@ module Wx
|
|
71
71
|
# @return [true,false]
|
72
72
|
def deselect_all; end
|
73
73
|
|
74
|
-
# Returns the index of the first selected item in the listbox or {Wx::NOT_FOUND} if no items are currently selected.
|
75
|
-
# cookie is an opaque parameter which should be passed to the subsequent calls to {Wx::VListBox#get_next_selected}. It is needed in order to allow parallel iterations over the selected items.
|
76
|
-
# Here is a typical example of using these functions:
|
77
|
-
#
|
78
|
-
# unsigned long cookie;
|
79
|
-
# int item = hlbox->GetFirstSelected(cookie);
|
80
|
-
# while ( item != wxNOT_FOUND )
|
81
|
-
# {
|
82
|
-
# // ... process item ...
|
83
|
-
# item = hlbox->GetNextSelected(cookie);
|
84
|
-
# }
|
85
|
-
#
|
86
|
-
# This method is only valid for multi selection listboxes.
|
87
|
-
# @param cookie [unsigned long]
|
88
|
-
# @return [Integer]
|
89
|
-
def get_first_selected(cookie) end
|
90
|
-
alias_method :first_selected, :get_first_selected
|
91
|
-
|
92
74
|
# Get the number of items in the control.
|
93
75
|
#
|
94
76
|
# @see Wx::VListBox#set_item_count
|
@@ -110,14 +92,6 @@ module Wx
|
|
110
92
|
def get_item_rect(item) end
|
111
93
|
alias_method :item_rect, :get_item_rect
|
112
94
|
|
113
|
-
# Returns the index of the next selected item or {Wx::NOT_FOUND} if there are no more.
|
114
|
-
# This method is only valid for multi selection listboxes.
|
115
|
-
# @see Wx::VListBox#get_first_selected
|
116
|
-
# @param cookie [unsigned long]
|
117
|
-
# @return [Integer]
|
118
|
-
def get_next_selected(cookie) end
|
119
|
-
alias_method :next_selected, :get_next_selected
|
120
|
-
|
121
95
|
# Returns the number of the items currently selected.
|
122
96
|
# It is valid for both single and multi selection controls. In the former case it may only return 0 or 1 however.
|
123
97
|
# @see Wx::VListBox#is_selected
|
@@ -218,6 +192,42 @@ module Wx
|
|
218
192
|
# @return [void]
|
219
193
|
def toggle(item) end
|
220
194
|
|
195
|
+
|
196
|
+
protected
|
197
|
+
|
198
|
+
# The derived class must implement this function to actually draw the item with the given index on the provided DC.
|
199
|
+
# TodoChange this function signature to non-const.
|
200
|
+
# @param dc [Wx::DC] The device context to use for drawing.
|
201
|
+
# @param rect [Wx::Rect] The bounding rectangle for the item being drawn (DC clipping region is set to this rectangle before calling this function).
|
202
|
+
# @param n [Integer] The index of the item to be drawn.
|
203
|
+
# @return [void]
|
204
|
+
def on_draw_item(dc, rect, n) end
|
205
|
+
|
206
|
+
# This method is used to draw the item's background and, maybe, a border around it.
|
207
|
+
# The base class version implements a reasonable default behaviour which consists in drawing the selected item with the standard background colour and drawing a border around the item if it is either selected or current.
|
208
|
+
# TodoChange this function signature to non-const.
|
209
|
+
# @param dc [Wx::DC]
|
210
|
+
# @param rect [Wx::Rect]
|
211
|
+
# @param n [Integer]
|
212
|
+
# @return [void]
|
213
|
+
def on_draw_background(dc, rect, n) end
|
214
|
+
|
215
|
+
# This method may be used to draw separators between the lines.
|
216
|
+
# The rectangle passed to it may be modified, typically to deflate it a bit before passing to {Wx::VListBox#on_draw_item}.
|
217
|
+
# The base class version of this method doesn't do anything.
|
218
|
+
#
|
219
|
+
# TodoChange this function signature to non-const.
|
220
|
+
# @param dc [Wx::DC] The device context to use for drawing.
|
221
|
+
# @param rect [Wx::Rect] The bounding rectangle for the item.
|
222
|
+
# @param n [Integer] The index of the item.
|
223
|
+
# @return [void]
|
224
|
+
def on_draw_separator(dc, rect, n) end
|
225
|
+
|
226
|
+
# The derived class must implement this method to return the height of the specified item (in pixels).
|
227
|
+
# @param n [Integer]
|
228
|
+
# @return [Integer]
|
229
|
+
def on_measure_item(n) end
|
230
|
+
|
221
231
|
end # VListBox
|
222
232
|
|
223
233
|
|
data/lib/wx/doc/gen/validator.rb
CHANGED
@@ -43,9 +43,10 @@ module Wx
|
|
43
43
|
# Associates a window with the validator.
|
44
44
|
# This function is automatically called by wxWidgets when creating a {Wx::Window}-derived class instance which takes a {Wx::Validator} reference. Since wxWidgets 3.1.1, it can be overridden in custom validators in order to perform any one-time initialization or checks of the window when the validator is associated with it.
|
45
45
|
# E.g.
|
46
|
-
#
|
46
|
+
# ```
|
47
47
|
# new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0,
|
48
48
|
# wxTextValidator(wxFILTER_ALPHA, &g_data.m_string));
|
49
|
+
# ```
|
49
50
|
# will automatically link the {Wx::TextValidator} instance with the {Wx::TextCtrl} instance and call {Wx::Validator#set_window} method on the {Wx::TextValidator} object.
|
50
51
|
# @param window [Wx::Window]
|
51
52
|
# @return [void]
|
data/lib/wx/doc/gen/variant.rb
CHANGED
@@ -17,6 +17,7 @@ module Wx
|
|
17
17
|
# An optional name member is associated with a {Wx::Variant}. This might be used, for example, in CORBA or OLE automation classes, where named parameters are required.
|
18
18
|
# Note that as of wxWidgets 2.7.1, {Wx::Variant} is reference counted. Additionally, the convenience macros DECLARE_VARIANT_OBJECT() and IMPLEMENT_VARIANT_OBJECT() were added so that adding (limited) support for conversion to and from {Wx::Variant} can be very easily implemented without modifying either {Wx::Variant} or the class to be stored by {Wx::Variant}. Since assignment operators cannot be declared outside the class, the shift left operators are used like this:
|
19
19
|
#
|
20
|
+
# ```
|
20
21
|
# // in the header file
|
21
22
|
# DECLARE_VARIANT_OBJECT(MyClass)
|
22
23
|
#
|
@@ -30,13 +31,16 @@ module Wx
|
|
30
31
|
#
|
31
32
|
# // or
|
32
33
|
# value << variant;
|
34
|
+
# ```
|
33
35
|
#
|
34
36
|
# For this to work, MyClass must derive from {Wx::Object}, implement the wxWidgets RTTI system and support the assignment operator and equality operator for itself. Ideally, it should also be reference counted to make copying operations cheap and fast. This can be most easily implemented using the reference counting support offered by {Wx::Object} itself. By default, wxWidgets already implements the shift operator conversion for a few of its drawing related classes:
|
35
37
|
#
|
38
|
+
# ```
|
36
39
|
# IMPLEMENT_VARIANT_OBJECT(wxColour)
|
37
40
|
# IMPLEMENT_VARIANT_OBJECT(wxImage)
|
38
41
|
# IMPLEMENT_VARIANT_OBJECT(wxIcon)
|
39
42
|
# IMPLEMENT_VARIANT_OBJECT(wxBitmap)
|
43
|
+
# ```
|
40
44
|
#
|
41
45
|
# Note that as of wxWidgets 2.9.0, {Wx::VariantData} no longer inherits from {Wx::Object} and {Wx::Variant} no longer uses the type-unsafe {Wx::List} class for list operations but the type-safe {Wx::VariantList} class. Also, {Wx::VariantData} now supports the Wx::VariantData#clone function for implementing the {Wx::Variant#unshare} function. Wx::VariantData#clone is implemented automatically by IMPLEMENT_VARIANT_OBJECT().
|
42
46
|
# Since {Wx::VariantData} no longer derives from {Wx::Object}, any code that tests the type of the data using {dynamic_cast} will require adjustment. You can use the macro {dynamic_cast_variant_data} with the same arguments as {dynamic_cast}, to use C++ RTTI type information instead of wxWidgets RTTI.
|
@@ -46,6 +50,7 @@ module Wx
|
|
46
50
|
# {Wx::GRID::GridCellAttr::AttrKind::Any} is a more modern, template-based variant class. It is not directly compatible with {Wx::Variant}, but there is a transparent conversion layer.
|
47
51
|
# Following is an example how to use these conversions with {Wx::PG::PropertyGrid}'s property class {Wx::PG::PGProperty} (which currently uses {Wx::Variants} both internally and in the public API):
|
48
52
|
#
|
53
|
+
# ```
|
49
54
|
# // Get property value as wxAny instead of wxVariant
|
50
55
|
# wxAny value = property->GetValue();
|
51
56
|
#
|
@@ -55,6 +60,7 @@ module Wx
|
|
55
60
|
# // Write back new value to property
|
56
61
|
# value = "New Value";
|
57
62
|
# property->SetValue(value);
|
63
|
+
# ```
|
58
64
|
#
|
59
65
|
# Some caveats:
|
60
66
|
# - In {Wx::GRID::GridCellAttr::AttrKind::Any}, there are no separate types for handling integers of different sizes, so converting {Wx::GRID::GridCellAttr::AttrKind::Any} with 'long long' value will yield {Wx::Variant} of "long" type when the value is small enough to fit in without overflow. Otherwise, variant type "longlong" is used. Also note that {Wx::GRID::GridCellAttr::AttrKind::Any} holding unsigned integer will always be converted to "ulonglong" {Wx::Variant} type.
|
@@ -65,6 +71,7 @@ module Wx
|
|
65
71
|
#
|
66
72
|
# Supplied conversion functions will automatically work with all built-in {Wx::Variant} types, and also with all user-specified types generated using IMPLEMENT_VARIANT_OBJECT(). For hand-built {Wx::VariantData} classes, you will need to use supplied macros in a following manner:
|
67
73
|
#
|
74
|
+
# ```
|
68
75
|
# // Declare wxVariantData for data type Foo
|
69
76
|
# class wxVariantDataFoo: public wxVariantData
|
70
77
|
# {
|
@@ -79,6 +86,7 @@ module Wx
|
|
79
86
|
# };
|
80
87
|
#
|
81
88
|
# IMPLEMENT_TRIVIAL_WXANY_CONVERSION(Foo, wxVariantDataFoo)
|
89
|
+
# ```
|
82
90
|
#
|
83
91
|
# ===
|
84
92
|
#
|
@@ -87,6 +95,8 @@ module Wx
|
|
87
95
|
# @see Wx::GRID::GridCellAttr::AttrKind::Any
|
88
96
|
#
|
89
97
|
#
|
98
|
+
#
|
99
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
90
100
|
class Variant < Object
|
91
101
|
|
92
102
|
# Appends a value to the list.
|
data/lib/wx/doc/gen/window.rb
CHANGED
@@ -471,8 +471,9 @@ module Wx
|
|
471
471
|
|
472
472
|
# Sets the scrollbar properties of a built-in scrollbar.
|
473
473
|
# Let's say you wish to display 50 lines of text, using the same font. The window is sized so that you can only see 16 lines at a time. You would use:
|
474
|
-
#
|
474
|
+
# ```
|
475
475
|
# SetScrollbar(wxVERTICAL, 0, 16, 50);
|
476
|
+
# ```
|
476
477
|
# Note that with the window at this size, the thumb position can never go above 50 minus 16, or 34. You can determine how many lines are currently visible by dividing the current view size by the character height in pixels. When defining your own scrollbar behaviour, you will always need to recalculate the scrollbar settings when the window size changes. You could therefore put your scrollbar calculations and SetScrollbar call into a function named AdjustScrollbars, which can be called initially and also from your {Wx::SizeEvent} handler function.
|
477
478
|
# @see Scrolled Windows
|
478
479
|
# @see Wx::ScrollBar
|
@@ -534,8 +535,9 @@ module Wx
|
|
534
535
|
# @overload from_dip(sz)
|
535
536
|
# Convert DPI-independent pixel values to the value in pixels appropriate for the current toolkit.
|
536
537
|
# A DPI-independent pixel is just a pixel at the standard 96 DPI resolution. To keep the same physical size at higher resolution, the physical pixel value must be scaled by {Wx::Window#get_dpi_scale_factor} but this scaling may be already done by the underlying toolkit (GTK+, Cocoa, ...) automatically. This method performs the conversion only if it is not already done by the lower level toolkit and so by using it with pixel values you can guarantee that the physical size of the corresponding elements will remain the same in all resolutions under all platforms. For example, instead of creating a bitmap of the hard coded size of 32 pixels you should use
|
537
|
-
#
|
538
|
+
# ```
|
538
539
|
# wxBitmap bmp(FromDIP(32, 32));
|
540
|
+
# ```
|
539
541
|
# to avoid using tiny bitmaps on high DPI screens.
|
540
542
|
# Notice that this function is only needed when using hard coded pixel values. It is not necessary if the sizes are already based on the DPI-independent units such as dialog units or if you are relying on the controls automatic best size determination and using sizers to lay out them.
|
541
543
|
# Also note that if either component of sz has the special value of -1, it is returned unchanged independently of the current DPI, to preserve the special value of -1 in wxWidgets API (it is often used to mean "unspecified").
|
@@ -575,9 +577,10 @@ module Wx
|
|
575
577
|
# @overload to_dip(sz)
|
576
578
|
# Convert pixel values of the current toolkit to DPI-independent pixel values.
|
577
579
|
# A DPI-independent pixel is just a pixel at the standard 96 DPI resolution. To keep the same physical size at higher resolution, the physical pixel value must be scaled by {Wx::Window#get_dpi_scale_factor} but this scaling may be already done by the underlying toolkit (GTK+, Cocoa, ...) automatically. This method performs the conversion only if it is not already done by the lower level toolkit, For example, you may want to use this to store window sizes and positions so that they can be re-used regardless of the display DPI:
|
578
|
-
#
|
580
|
+
# ```
|
579
581
|
# wxPoint pt(ToDIP(GetPosition()));
|
580
582
|
# wxSize size(ToDIP(GetSize()));
|
583
|
+
# ```
|
581
584
|
#
|
582
585
|
# Also note that if either component of sz has the special value of -1, it is returned unchanged independently of the current DPI, to preserve the special value of -1 in wxWidgets API (it is often used to mean "unspecified").
|
583
586
|
# @param sz [Array(Integer, Integer), Wx::Size]
|
@@ -904,8 +907,9 @@ module Wx
|
|
904
907
|
|
905
908
|
# Sets the maximum client size of the window, to indicate to the sizer layout mechanism that this is the maximum possible size of its client area.
|
906
909
|
# Note that this method is just a shortcut for:
|
907
|
-
#
|
910
|
+
# ```
|
908
911
|
# SetMaxSize(ClientToWindowSize(size));
|
912
|
+
# ```
|
909
913
|
# @see Wx::Window#set_max_size
|
910
914
|
# @see Window Sizing Overview
|
911
915
|
# @param size [Array(Integer, Integer), Wx::Size]
|
@@ -926,8 +930,9 @@ module Wx
|
|
926
930
|
# You may need to call this if you change the window size after construction and before adding to its parent sizer.
|
927
931
|
# Note, that just as with {Wx::Window#set_min_size}, calling this method doesn't prevent the program from explicitly making the window smaller than the specified size.
|
928
932
|
# Note that this method is just a shortcut for:
|
929
|
-
#
|
933
|
+
# ```
|
930
934
|
# SetMinSize(ClientToWindowSize(size));
|
935
|
+
# ```
|
931
936
|
# @see Wx::Window#set_min_size
|
932
937
|
# @see Window Sizing Overview
|
933
938
|
# @param size [Array(Integer, Integer), Wx::Size]
|
@@ -1074,8 +1079,9 @@ module Wx
|
|
1074
1079
|
# @overload move(x, y, flags=Wx::SIZE_USE_EXISTING)
|
1075
1080
|
# Moves the window to the given position.
|
1076
1081
|
# Implementations of SetSize can also implicitly implement the {Wx::Window#move} function, which is defined in the base {Wx::Window} class as the call:
|
1077
|
-
#
|
1082
|
+
# ```
|
1078
1083
|
# SetSize(x, y, wxDefaultCoord, wxDefaultCoord, wxSIZE_USE_EXISTING);
|
1084
|
+
# ```
|
1079
1085
|
# @see Wx::Window#set_size
|
1080
1086
|
# @param x [Integer] Required x position.
|
1081
1087
|
# @param y [Integer] Required y position.
|
@@ -1084,8 +1090,9 @@ module Wx
|
|
1084
1090
|
# @overload move(pt, flags=Wx::SIZE_USE_EXISTING)
|
1085
1091
|
# Moves the window to the given position.
|
1086
1092
|
# Implementations of {Wx::Window#set_size} can also implicitly implement the {Wx::Window#move} function, which is defined in the base {Wx::Window} class as the call:
|
1087
|
-
#
|
1093
|
+
# ```
|
1088
1094
|
# SetSize(x, y, wxDefaultCoord, wxDefaultCoord, wxSIZE_USE_EXISTING);
|
1095
|
+
# ```
|
1089
1096
|
# @see Wx::Window#set_size
|
1090
1097
|
# @param pt [Array(Integer, Integer), Wx::Point] {Wx::Point} object representing the position.
|
1091
1098
|
# @param flags [Integer] See {Wx::Window#set_size} for more info about this parameter.
|
@@ -1108,8 +1115,9 @@ module Wx
|
|
1108
1115
|
# Converts a point or size from dialog units to pixels.
|
1109
1116
|
# For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and then divided by 8.
|
1110
1117
|
# Dialog units are used for maintaining a dialog's proportions even if the font changes. You can also use these functions programmatically. A convenience macro is defined:
|
1111
|
-
#
|
1118
|
+
# ```
|
1112
1119
|
# #define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt)
|
1120
|
+
# ```
|
1113
1121
|
# @see Wx::Window#convert_pixels_to_dialog
|
1114
1122
|
# @param pt [Array(Integer, Integer), Wx::Point]
|
1115
1123
|
# @return [Wx::Point]
|
@@ -1300,7 +1308,7 @@ module Wx
|
|
1300
1308
|
# Notice that in previous versions of wxWidgets a common way to work around the above mentioned flickering problem was to define an empty EVT_ERASE_BACKGROUND handler. Setting background style to {Wx::BackgroundStyle::BG_STYLE_PAINT} is a simpler and more efficient solution to the same problem.
|
1301
1309
|
# Under {Wx::GTK} and {Wx::OSX}, you can use {Wx::BackgroundStyle::BG_STYLE_TRANSPARENT} to obtain full transparency of the window background. Note that {Wx::GTK} supports this only since GTK 2.12 with a compositing manager enabled, call {Wx::Window#is_transparent_background_supported} to check whether this is the case, see the example of doing it in the shapedsample".
|
1302
1310
|
# Also, in order for <code>SetBackgroundStyle(wxBG_STYLE_TRANSPARENT)</code> to work, it must be called before {Wx::Window#create}. If you're using your own {Wx::Window}-derived class you should write your code in the following way:
|
1303
|
-
#
|
1311
|
+
# ```
|
1304
1312
|
# class MyWidget : public wxWindow
|
1305
1313
|
# {
|
1306
1314
|
# public:
|
@@ -1314,6 +1322,7 @@ module Wx
|
|
1314
1322
|
# Create(parent, ...);
|
1315
1323
|
# }
|
1316
1324
|
# };
|
1325
|
+
# ```
|
1317
1326
|
# @see Wx::Window#set_background_colour
|
1318
1327
|
# @see Wx::Window#get_foreground_colour
|
1319
1328
|
# @see Wx::Window#set_transparent
|
@@ -1468,7 +1477,9 @@ module Wx
|
|
1468
1477
|
def handle_as_navigation_key(event) end
|
1469
1478
|
|
1470
1479
|
# Shorthand for:
|
1471
|
-
#
|
1480
|
+
# ```
|
1481
|
+
# GetEventHandler()->SafelyProcessEvent(event);
|
1482
|
+
# ```
|
1472
1483
|
# @see Wx::Window#process_window_event
|
1473
1484
|
# @param event [Wx::Event]
|
1474
1485
|
# @return [true,false]
|
@@ -1476,8 +1487,9 @@ module Wx
|
|
1476
1487
|
|
1477
1488
|
# Convenient wrapper for {Wx::Window#process_event}.
|
1478
1489
|
# This is the same as writing
|
1479
|
-
#
|
1490
|
+
# ```
|
1480
1491
|
# GetEventHandler()->ProcessEvent(event);
|
1492
|
+
# ```
|
1481
1493
|
# but more convenient. Notice that {Wx::Window#process_event} itself can't be called for {Wx::Window} objects as it ignores the event handlers associated with the window; use this function instead.
|
1482
1494
|
# @param event [Wx::Event]
|
1483
1495
|
# @return [true,false]
|
@@ -1493,9 +1505,10 @@ module Wx
|
|
1493
1505
|
# An event handler is an object that is capable of processing the events sent to a window. By default, the window is its own event handler, but an application may wish to substitute another, for example to allow central implementation of event-handling for a variety of different window classes.
|
1494
1506
|
# {Wx::Window#push_event_handler} allows an application to set up a stack of event handlers, where an event not handled by one event handler is handed to the next one in the chain.
|
1495
1507
|
# E.g. if you have two event handlers A and B and a {Wx::Window} instance W and you call:
|
1496
|
-
#
|
1508
|
+
# ```
|
1497
1509
|
# W->PushEventHandler(A);
|
1498
1510
|
# W->PushEventHandler(B);
|
1511
|
+
# ```
|
1499
1512
|
# you will end up with the following situation:
|
1500
1513
|
#
|
1501
1514
|
# Note that you can use {Wx::Window#pop_event_handler} to remove the event handler.
|
@@ -1704,10 +1717,11 @@ module Wx
|
|
1704
1717
|
# Enable or disable the window for user input.
|
1705
1718
|
# Note that when a parent window is disabled, all of its children are disabled as well and they are re-enabled again when the parent is.
|
1706
1719
|
# A window can be created initially disabled by calling this method on it before calling {Wx::Window#create} to create the actual underlying window, e.g.
|
1707
|
-
#
|
1720
|
+
# ```
|
1708
1721
|
# wxWindow* w = new MyWindow(); // Note: default ctor is used here.
|
1709
1722
|
# w->Enable(false);
|
1710
1723
|
# w->Create(parent, ... all the usual non-default ctor arguments ...);
|
1724
|
+
# ```
|
1711
1725
|
#
|
1712
1726
|
# Returns true if the window has been enabled or disabled, false if nothing was done, i.e. if the window had already been in the specified state.
|
1713
1727
|
# @see Wx::Window#is_enabled
|
@@ -2074,7 +2088,7 @@ module Wx
|
|
2074
2088
|
# Return the cursor associated with this window.
|
2075
2089
|
#
|
2076
2090
|
# @see Wx::Window#set_cursor
|
2077
|
-
# @return [
|
2091
|
+
# @return [Wx::Cursor]
|
2078
2092
|
def get_cursor; end
|
2079
2093
|
alias_method :cursor, :get_cursor
|
2080
2094
|
|
@@ -2123,8 +2137,9 @@ module Wx
|
|
2123
2137
|
|
2124
2138
|
# Request generation of touch events for this window.
|
2125
2139
|
# Each call to this function supersedes the previous ones, i.e. if you want to receive events for both zoom and rotate gestures, you need to call
|
2126
|
-
#
|
2140
|
+
# ```
|
2127
2141
|
# EnableTouchEvents(wxTOUCH_ZOOM_GESTURE | wxTOUCH_ROTATE_GESTURE);
|
2142
|
+
# ```
|
2128
2143
|
# instead of calling it twice in a row as the second call would disable the first gesture.
|
2129
2144
|
#
|
2130
2145
|
# true if the specified events were enabled or false if the current platform doesn't support touch events.
|
@@ -2158,6 +2173,7 @@ module Wx
|
|
2158
2173
|
# Does the window-specific updating after processing the update event.
|
2159
2174
|
# This function is called by {Wx::Window#update_window_ui} in order to check return values in the {Wx::UpdateUIEvent} and act appropriately. For example, to allow frame and dialog title updating, wxWidgets implements this function as follows:
|
2160
2175
|
#
|
2176
|
+
# ```
|
2161
2177
|
# // do the window-specific processing after processing the update event
|
2162
2178
|
# void wxTopLevelWindowBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
|
2163
2179
|
# {
|
@@ -2170,6 +2186,7 @@ module Wx
|
|
2170
2186
|
# SetTitle(event.GetText());
|
2171
2187
|
# }
|
2172
2188
|
# }
|
2189
|
+
# ```
|
2173
2190
|
# @param event [Wx::UpdateUIEvent]
|
2174
2191
|
# @return [void]
|
2175
2192
|
def do_update_window_ui(event) end
|
@@ -2254,11 +2271,13 @@ module Wx
|
|
2254
2271
|
# You can call this function from your application to ensure that your UI is up-to-date at this point (as far as your {Wx::UpdateUIEvent} handlers are concerned). This may be necessary if you have called {Wx::UpdateUIEvent.set_mode} or {Wx::UpdateUIEvent.set_update_interval} to limit the overhead that wxWidgets incurs by sending update UI events in idle time. flags should be a bitlist of one or more of the {Wx::UpdateUI} enumeration.
|
2255
2272
|
# If you are calling this function from an OnInternalIdle or OnIdle function, make sure you pass the {Wx::UpdateUI::UPDATE_UI_FROMIDLE} flag, since this tells the window to only update the UI elements that need to be updated in idle time. Some windows update their elements only when necessary, for example when a menu is about to be shown. The following is an example of how to call UpdateWindowUI from an idle function.
|
2256
2273
|
#
|
2274
|
+
# ```
|
2257
2275
|
# void MyWindow::OnInternalIdle()
|
2258
2276
|
# {
|
2259
2277
|
# if (wxUpdateUIEvent::CanUpdate(this))
|
2260
2278
|
# UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
2261
2279
|
# }
|
2280
|
+
# ```
|
2262
2281
|
# @see Wx::UpdateUIEvent
|
2263
2282
|
# @see Wx::Window#do_update_window_ui
|
2264
2283
|
# @see Wx::Window#on_internal_idle
|
@@ -2364,15 +2383,16 @@ module Wx
|
|
2364
2383
|
# The non-default constructor of {Wx::Window} class does two things: it initializes the C++ object and it also creates the window object in the underlying graphical toolkit. The {Wx::Window#create} method can be used to perform the second part later, while the default constructor can be used to perform the first part only.
|
2365
2384
|
# Please note that the underlying window must be created exactly once, i.e. if you use the default constructor, which doesn't do this, you must call {Wx::Window#create} before using the window and if you use the non-default constructor, you can not call {Wx::Window#create}, as the underlying window is already created.
|
2366
2385
|
# Note that it is possible and, in fact, useful, to call some methods on the object between creating the C++ object itself and calling {Wx::Window#create} on it, e.g. a common pattern to avoid showing the contents of a window before it is fully initialized is:
|
2367
|
-
#
|
2386
|
+
# ```
|
2368
2387
|
# wxPanel* panel = new wxPanel(); // Note: default constructor used.
|
2369
2388
|
# panel->Hide(); // Can be called before actually creating it.
|
2370
2389
|
# panel->Create(parent, wxID_ANY, ...); // Won't be shown yet.
|
2371
2390
|
# ... create all the panel children ...
|
2372
2391
|
# panel->Show(); // Now everything will be shown at once.
|
2392
|
+
# ```
|
2373
2393
|
#
|
2374
2394
|
# Also note that it is possible to create an object of a derived type and then call {Wx::Window#create} on it:
|
2375
|
-
#
|
2395
|
+
# ```
|
2376
2396
|
# // Suppose we have this function (which would typically be in a
|
2377
2397
|
# // different translation unit (file) from the rest of the code).
|
2378
2398
|
# wxWindow* MyCreateWindowObjectFunction() {
|
@@ -2391,6 +2411,7 @@ module Wx
|
|
2391
2411
|
# // This calls the base wxWindow::Create() as it is not virtual, so
|
2392
2412
|
# // the derived class can't customize this part.
|
2393
2413
|
# window->Create(parent, wxID_ANY, ...);
|
2414
|
+
# ```
|
2394
2415
|
# This is notably used by XML Based Resource System (XRC).
|
2395
2416
|
# The parameters of this method have exactly the same meaning as the non-default constructor parameters, please refer to them for their description.
|
2396
2417
|
# true if window creation succeeded or false if it failed
|
data/lib/wx/doc/gen/window_dc.rb
CHANGED
@@ -42,10 +42,12 @@ module Wx
|
|
42
42
|
# A helper chaining this page with the next one.
|
43
43
|
# Notice that this method returns a reference to the next page, so the calls to it can, in turn, be chained:
|
44
44
|
#
|
45
|
+
# ```
|
45
46
|
# wxWizardPageSimple* firstPage = new FirstPage;
|
46
47
|
# (*firstPage).Chain(new SecondPage)
|
47
48
|
# .Chain(new ThirdPage)
|
48
49
|
# .Chain(new LastPage);
|
50
|
+
# ```
|
49
51
|
#
|
50
52
|
# This makes this method the simplest way to define the order of changes in fully static wizards, i.e. in those where the order doesn't depend on the choices made by the user in the wizard pages during run-time.
|
51
53
|
#
|
data/lib/wx/doc/gen/xml_node.rb
CHANGED
@@ -104,6 +104,8 @@ module Wx
|
|
104
104
|
# @see Wx::XmlAttribute
|
105
105
|
#
|
106
106
|
#
|
107
|
+
#
|
108
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
107
109
|
class XmlNode < ::Object
|
108
110
|
|
109
111
|
# @overload initialize(type, name, content=(''), lineNo=-1)
|
@@ -193,13 +195,17 @@ module Wx
|
|
193
195
|
# Returns the content of the first child node of type {Wx::XmlNodeType::XML_TEXT_NODE} or {Wx::XmlNodeType::XML_CDATA_SECTION_NODE}.
|
194
196
|
# This function is very useful since the XML snippet <code>"tagnametagcontent/tagname"</code> is represented by expat with the following tag tree:
|
195
197
|
#
|
198
|
+
# ```
|
196
199
|
# wxXML_ELEMENT_NODE name="tagname", content=""
|
197
200
|
# |-- wxXML_TEXT_NODE name="", content="tagcontent"
|
201
|
+
# ```
|
198
202
|
#
|
199
203
|
# or eventually:
|
200
204
|
#
|
205
|
+
# ```
|
201
206
|
# wxXML_ELEMENT_NODE name="tagname", content=""
|
202
207
|
# |-- wxXML_CDATA_SECTION_NODE name="", content="tagcontent"
|
208
|
+
# ```
|
203
209
|
#
|
204
210
|
# An empty string is returned if the node has no children of type {Wx::XmlNodeType::XML_TEXT_NODE} or {Wx::XmlNodeType::XML_CDATA_SECTION_NODE}, or if the content of the first child of such types is empty.
|
205
211
|
# @return [String]
|
@@ -104,9 +104,10 @@ module Wx
|
|
104
104
|
|
105
105
|
# Loads resources from XML files that match given filemask.
|
106
106
|
# Example:
|
107
|
-
#
|
107
|
+
# ```
|
108
108
|
# if (!wxXmlResource::Get()->Load("rc/*.xrc"))
|
109
109
|
# wxLogError("Couldn't load resources!");
|
110
|
+
# ```
|
110
111
|
#
|
111
112
|
# If {Wx::USE_FILESYS} is enabled, this method understands {Wx::FileSystem} URLs (see Wx::FileSystem#find_first).
|
112
113
|
#
|
@@ -150,9 +151,11 @@ module Wx
|
|
150
151
|
# parent points to parent window (if any).
|
151
152
|
# This form is used to finish creation of an already existing instance (the main reason for this is that you may want to use derived class with a new event table). Example:
|
152
153
|
#
|
154
|
+
# ```
|
153
155
|
# MyDialog dlg;
|
154
156
|
# wxXmlResource::Get()->LoadDialog(&dlg, mainFrame, "my_dialog");
|
155
157
|
# dlg.ShowModal();
|
158
|
+
# ```
|
156
159
|
# @param dlg [Wx::Dialog]
|
157
160
|
# @param parent [Wx::Window]
|
158
161
|
# @param name [String]
|