wxruby3 0.9.0.pre.beta.8-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.wxconfig +17 -0
- data/.yardopts +13 -0
- data/CREDITS.md +52 -0
- data/LICENSE +21 -0
- data/README.md +139 -0
- data/bin/wxruby +9 -0
- data/bin/wxruby.bat +20 -0
- data/ext/mkrf_conf_bingem.rb +18 -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/accessors.rb +63 -0
- data/lib/wx/aui/auimanager.rb +17 -0
- data/lib/wx/aui/auinotebook.rb +9 -0
- data/lib/wx/aui/events/evt_list.rb +143 -0
- data/lib/wx/aui/require.rb +9 -0
- data/lib/wx/aui.rb +14 -0
- data/lib/wx/core/acceleratortable.rb +28 -0
- data/lib/wx/core/animation.rb +18 -0
- data/lib/wx/core/app.rb +89 -0
- data/lib/wx/core/artprovider.rb +31 -0
- data/lib/wx/core/bitmap.rb +59 -0
- data/lib/wx/core/busycursor.rb +12 -0
- data/lib/wx/core/choice.rb +4 -0
- data/lib/wx/core/choicedlg.rb +54 -0
- data/lib/wx/core/clientdc.rb +13 -0
- data/lib/wx/core/clipboard.rb +56 -0
- data/lib/wx/core/collapsible_pane.rb +12 -0
- data/lib/wx/core/colour.rb +34 -0
- data/lib/wx/core/combobox.rb +4 -0
- data/lib/wx/core/controlwithitems.rb +10 -0
- data/lib/wx/core/data_object.rb +10 -0
- data/lib/wx/core/dataformat.rb +26 -0
- data/lib/wx/core/dc.rb +68 -0
- data/lib/wx/core/dialog.rb +50 -0
- data/lib/wx/core/enum.rb +28 -0
- data/lib/wx/core/event.rb +16 -0
- data/lib/wx/core/events/evt_list.rb +1378 -0
- data/lib/wx/core/evthandler.rb +253 -0
- data/lib/wx/core/ext.rb +58 -0
- data/lib/wx/core/font/encoding.rb +113 -0
- data/lib/wx/core/font.rb +22 -0
- data/lib/wx/core/functions.rb +44 -0
- data/lib/wx/core/gauge.rb +12 -0
- data/lib/wx/core/genericdirctrl.rb +36 -0
- data/lib/wx/core/hboxsizer.rb +6 -0
- data/lib/wx/core/helpcontroller.rb +5 -0
- data/lib/wx/core/helpcontrollerhelpprovider.rb +24 -0
- data/lib/wx/core/helpprovider.rb +15 -0
- data/lib/wx/core/icon.rb +40 -0
- data/lib/wx/core/image.rb +68 -0
- data/lib/wx/core/imagelist.rb +3 -0
- data/lib/wx/core/listbox.rb +4 -0
- data/lib/wx/core/listctrl.rb +33 -0
- data/lib/wx/core/locale.rb +73 -0
- data/lib/wx/core/log.rb +20 -0
- data/lib/wx/core/menu.rb +78 -0
- data/lib/wx/core/menu_bar.rb +20 -0
- data/lib/wx/core/menuitem.rb +7 -0
- data/lib/wx/core/notebook.rb +9 -0
- data/lib/wx/core/object.rb +14 -0
- data/lib/wx/core/pen_info.rb +11 -0
- data/lib/wx/core/platform_info.rb +13 -0
- data/lib/wx/core/point.rb +92 -0
- data/lib/wx/core/real_point.rb +92 -0
- data/lib/wx/core/rect.rb +57 -0
- data/lib/wx/core/simplehelpprovider.rb +38 -0
- data/lib/wx/core/size.rb +86 -0
- data/lib/wx/core/sizer.rb +43 -0
- data/lib/wx/core/splash_screen.rb +44 -0
- data/lib/wx/core/textctrl.rb +8 -0
- data/lib/wx/core/timer.rb +104 -0
- data/lib/wx/core/toolbar.rb +37 -0
- data/lib/wx/core/toolbartool.rb +4 -0
- data/lib/wx/core/treectrl.rb +46 -0
- data/lib/wx/core/validator.rb +8 -0
- data/lib/wx/core/variant.rb +62 -0
- data/lib/wx/core/vboxsizer.rb +6 -0
- data/lib/wx/core/window.rb +95 -0
- data/lib/wx/core/window_update_locker.rb +12 -0
- data/lib/wx/core/xmlresource.rb +56 -0
- data/lib/wx/core.rb +61 -0
- data/lib/wx/doc/aui/auimanager.rb +12 -0
- data/lib/wx/doc/aui/auinotebook.rb +9 -0
- data/lib/wx/doc/colour_dialog.rb +15 -0
- data/lib/wx/doc/core.rb +11 -0
- data/lib/wx/doc/dc.rb +49 -0
- data/lib/wx/doc/enum.rb +88 -0
- data/lib/wx/doc/evthandler.rb +87 -0
- data/lib/wx/doc/extra/00_starting.md +154 -0
- data/lib/wx/doc/extra/01_packages.md +179 -0
- data/lib/wx/doc/extra/02_lifecycles.md +116 -0
- data/lib/wx/doc/extra/03_dialogs.md +57 -0
- data/lib/wx/doc/extra/04_enums.md +143 -0
- data/lib/wx/doc/extra/05_event-handling.md +166 -0
- data/lib/wx/doc/extra/06_geometry.md +56 -0
- data/lib/wx/doc/extra/07_colour_and_font.md +52 -0
- data/lib/wx/doc/extra/08_extensions.md +144 -0
- data/lib/wx/doc/extra/09_exceptions.md +54 -0
- data/lib/wx/doc/functions.rb +221 -0
- data/lib/wx/doc/gdi_common.rb +181 -0
- data/lib/wx/doc/gen/about_dialog_info.rb +315 -0
- data/lib/wx/doc/gen/accelerator.rb +172 -0
- data/lib/wx/doc/gen/accessible.rb +817 -0
- data/lib/wx/doc/gen/animation.rb +253 -0
- data/lib/wx/doc/gen/animation_ctrl.rb +129 -0
- data/lib/wx/doc/gen/any_button.rb +170 -0
- data/lib/wx/doc/gen/app.rb +363 -0
- data/lib/wx/doc/gen/art_provider.rb +497 -0
- data/lib/wx/doc/gen/aui/aui_dock_art.rb +421 -0
- data/lib/wx/doc/gen/aui/aui_floating_frame.rb +39 -0
- data/lib/wx/doc/gen/aui/aui_manager.rb +323 -0
- data/lib/wx/doc/gen/aui/aui_manager_event.rb +112 -0
- data/lib/wx/doc/gen/aui/aui_mdi_child_frame.rb +163 -0
- data/lib/wx/doc/gen/aui/aui_mdi_client_window.rb +46 -0
- data/lib/wx/doc/gen/aui/aui_mdi_parent_frame.rb +109 -0
- data/lib/wx/doc/gen/aui/aui_notebook.rb +329 -0
- data/lib/wx/doc/gen/aui/aui_notebook_event.rb +179 -0
- data/lib/wx/doc/gen/aui/aui_pane_info.rb +665 -0
- data/lib/wx/doc/gen/aui/aui_tab_art.rb +372 -0
- data/lib/wx/doc/gen/aui/aui_tab_ctrl.rb +147 -0
- data/lib/wx/doc/gen/aui/aui_tool_bar.rb +437 -0
- data/lib/wx/doc/gen/aui/aui_tool_bar_art.rb +272 -0
- data/lib/wx/doc/gen/aui/aui_tool_bar_event.rb +195 -0
- data/lib/wx/doc/gen/aui/aui_tool_bar_item.rb +224 -0
- data/lib/wx/doc/gen/aui/event_list.rb +162 -0
- data/lib/wx/doc/gen/auto_buffered_paint_dc.rb +47 -0
- data/lib/wx/doc/gen/bitmap.rb +638 -0
- data/lib/wx/doc/gen/bitmap_button.rb +91 -0
- data/lib/wx/doc/gen/book_ctrl_base.rb +240 -0
- data/lib/wx/doc/gen/book_ctrl_event.rb +60 -0
- data/lib/wx/doc/gen/box_sizer.rb +66 -0
- data/lib/wx/doc/gen/brush.rb +219 -0
- data/lib/wx/doc/gen/buffered_dc.rb +95 -0
- data/lib/wx/doc/gen/buffered_paint_dc.rb +55 -0
- data/lib/wx/doc/gen/busy_info.rb +141 -0
- data/lib/wx/doc/gen/button.rb +133 -0
- data/lib/wx/doc/gen/calculate_layout_event.rb +59 -0
- data/lib/wx/doc/gen/calendar_ctrl.rb +236 -0
- data/lib/wx/doc/gen/calendar_date_attr.rb +137 -0
- data/lib/wx/doc/gen/calendar_event.rb +150 -0
- data/lib/wx/doc/gen/caret.rb +99 -0
- data/lib/wx/doc/gen/check_box.rb +145 -0
- data/lib/wx/doc/gen/check_list_box.rb +96 -0
- data/lib/wx/doc/gen/choice.rb +143 -0
- data/lib/wx/doc/gen/choicebook.rb +100 -0
- data/lib/wx/doc/gen/client_dc.rb +49 -0
- data/lib/wx/doc/gen/clipboard.rb +128 -0
- data/lib/wx/doc/gen/collapsible_pane.rb +120 -0
- data/lib/wx/doc/gen/collapsible_pane_event.rb +45 -0
- data/lib/wx/doc/gen/colour.rb +289 -0
- data/lib/wx/doc/gen/colour_data.rb +96 -0
- data/lib/wx/doc/gen/colour_dialog.rb +84 -0
- data/lib/wx/doc/gen/colour_picker_ctrl.rb +89 -0
- data/lib/wx/doc/gen/colour_picker_event.rb +74 -0
- data/lib/wx/doc/gen/combo_box.rb +228 -0
- data/lib/wx/doc/gen/context_help_button.rb +34 -0
- data/lib/wx/doc/gen/control.rb +245 -0
- data/lib/wx/doc/gen/control_with_items.rb +339 -0
- data/lib/wx/doc/gen/core.rb +42 -0
- data/lib/wx/doc/gen/cursor.rb +127 -0
- data/lib/wx/doc/gen/data_format.rb +94 -0
- data/lib/wx/doc/gen/data_object.rb +439 -0
- data/lib/wx/doc/gen/date_event.rb +48 -0
- data/lib/wx/doc/gen/date_picker_ctrl.rb +127 -0
- data/lib/wx/doc/gen/dc.rb +1278 -0
- data/lib/wx/doc/gen/defs.rb +2832 -0
- data/lib/wx/doc/gen/dialog.rb +426 -0
- data/lib/wx/doc/gen/dir_dialog.rb +134 -0
- data/lib/wx/doc/gen/dir_filter_list_ctrl.rb +80 -0
- data/lib/wx/doc/gen/dir_picker_ctrl.rb +103 -0
- data/lib/wx/doc/gen/drag_drop.rb +292 -0
- data/lib/wx/doc/gen/drag_image.rb +123 -0
- data/lib/wx/doc/gen/editable_list_box.rb +89 -0
- data/lib/wx/doc/gen/event.rb +911 -0
- data/lib/wx/doc/gen/event_list.rb +1512 -0
- data/lib/wx/doc/gen/events.rb +2499 -0
- data/lib/wx/doc/gen/evt_handler.rb +224 -0
- data/lib/wx/doc/gen/ext_help_controller.rb +100 -0
- data/lib/wx/doc/gen/file_dialog.rb +294 -0
- data/lib/wx/doc/gen/file_dir_picker_event.rb +98 -0
- data/lib/wx/doc/gen/file_picker_ctrl.rb +107 -0
- data/lib/wx/doc/gen/find_dialog_event.rb +119 -0
- data/lib/wx/doc/gen/find_replace_data.rb +59 -0
- data/lib/wx/doc/gen/find_replace_dialog.rb +44 -0
- data/lib/wx/doc/gen/flex_grid_sizer.rb +145 -0
- data/lib/wx/doc/gen/font.rb +1282 -0
- data/lib/wx/doc/gen/font_data.rb +132 -0
- data/lib/wx/doc/gen/font_dialog.rb +71 -0
- data/lib/wx/doc/gen/font_picker_ctrl.rb +120 -0
- data/lib/wx/doc/gen/font_picker_event.rb +64 -0
- data/lib/wx/doc/gen/frame.rb +276 -0
- data/lib/wx/doc/gen/fs_file.rb +269 -0
- data/lib/wx/doc/gen/functions.rb +10 -0
- data/lib/wx/doc/gen/gauge.rb +127 -0
- data/lib/wx/doc/gen/gb_sizer_item.rb +78 -0
- data/lib/wx/doc/gen/gcdc.rb +61 -0
- data/lib/wx/doc/gen/gdi_common.rb +1108 -0
- data/lib/wx/doc/gen/gdi_object.rb +29 -0
- data/lib/wx/doc/gen/generic_dir_ctrl.rb +198 -0
- data/lib/wx/doc/gen/graphics_context.rb +764 -0
- data/lib/wx/doc/gen/graphics_object.rb +494 -0
- data/lib/wx/doc/gen/grid/event_list.rb +173 -0
- data/lib/wx/doc/gen/grid/grid_cell_activatable_editor.rb +33 -0
- data/lib/wx/doc/gen/grid/grid_cell_attr.rb +279 -0
- data/lib/wx/doc/gen/grid/grid_cell_auto_wrap_string_editor.rb +31 -0
- data/lib/wx/doc/gen/grid/grid_cell_auto_wrap_string_renderer.rb +32 -0
- data/lib/wx/doc/gen/grid/grid_cell_bool_editor.rb +44 -0
- data/lib/wx/doc/gen/grid/grid_cell_bool_renderer.rb +31 -0
- data/lib/wx/doc/gen/grid/grid_cell_choice_editor.rb +48 -0
- data/lib/wx/doc/gen/grid/grid_cell_date_editor.rb +33 -0
- data/lib/wx/doc/gen/grid/grid_cell_date_renderer.rb +40 -0
- data/lib/wx/doc/gen/grid/grid_cell_date_time_renderer.rb +35 -0
- data/lib/wx/doc/gen/grid/grid_cell_editor.rb +181 -0
- data/lib/wx/doc/gen/grid/grid_cell_enum_editor.rb +34 -0
- data/lib/wx/doc/gen/grid/grid_cell_enum_renderer.rb +39 -0
- data/lib/wx/doc/gen/grid/grid_cell_float_editor.rb +41 -0
- data/lib/wx/doc/gen/grid/grid_cell_float_renderer.rb +74 -0
- data/lib/wx/doc/gen/grid/grid_cell_number_editor.rb +41 -0
- data/lib/wx/doc/gen/grid/grid_cell_number_renderer.rb +31 -0
- data/lib/wx/doc/gen/grid/grid_cell_renderer.rb +98 -0
- data/lib/wx/doc/gen/grid/grid_cell_string_renderer.rb +31 -0
- data/lib/wx/doc/gen/grid/grid_cell_text_editor.rb +45 -0
- data/lib/wx/doc/gen/grid/grid_ctrl.rb +2381 -0
- data/lib/wx/doc/gen/grid/grid_editor_created_event.rb +87 -0
- data/lib/wx/doc/gen/grid/grid_event.rb +96 -0
- data/lib/wx/doc/gen/grid/grid_range_select_event.rb +96 -0
- data/lib/wx/doc/gen/grid/grid_size_event.rb +71 -0
- data/lib/wx/doc/gen/grid/grid_string_table.rb +130 -0
- data/lib/wx/doc/gen/grid/grid_table_base.rb +288 -0
- data/lib/wx/doc/gen/grid/grid_table_message.rb +73 -0
- data/lib/wx/doc/gen/grid_bag_sizer.rb +298 -0
- data/lib/wx/doc/gen/grid_sizer.rb +135 -0
- data/lib/wx/doc/gen/help_controller.rb +136 -0
- data/lib/wx/doc/gen/help_provider.rb +80 -0
- data/lib/wx/doc/gen/html/event_list.rb +46 -0
- data/lib/wx/doc/gen/html/html_cell.rb +441 -0
- data/lib/wx/doc/gen/html/html_cell_event.rb +62 -0
- data/lib/wx/doc/gen/html/html_easy_printing.rb +169 -0
- data/lib/wx/doc/gen/html/html_help_controller.rb +256 -0
- data/lib/wx/doc/gen/html/html_help_data.rb +144 -0
- data/lib/wx/doc/gen/html/html_help_frame.rb +112 -0
- data/lib/wx/doc/gen/html/html_help_window.rb +230 -0
- data/lib/wx/doc/gen/html/html_link_event.rb +36 -0
- data/lib/wx/doc/gen/html/html_list_box.rb +150 -0
- data/lib/wx/doc/gen/html/html_printout.rb +87 -0
- data/lib/wx/doc/gen/html/html_window.rb +386 -0
- data/lib/wx/doc/gen/icon.rb +267 -0
- data/lib/wx/doc/gen/icon_location.rb +38 -0
- data/lib/wx/doc/gen/image.rb +1144 -0
- data/lib/wx/doc/gen/image_list.rb +181 -0
- data/lib/wx/doc/gen/keyboard_state.rb +124 -0
- data/lib/wx/doc/gen/list_box.rb +260 -0
- data/lib/wx/doc/gen/list_ctrl.rb +1542 -0
- data/lib/wx/doc/gen/list_event.rb +177 -0
- data/lib/wx/doc/gen/listbook.rb +100 -0
- data/lib/wx/doc/gen/locale.rb +4143 -0
- data/lib/wx/doc/gen/log.rb +505 -0
- data/lib/wx/doc/gen/mdi_client_window.rb +38 -0
- data/lib/wx/doc/gen/mdi_frame.rb +235 -0
- data/lib/wx/doc/gen/media_ctrl.rb +225 -0
- data/lib/wx/doc/gen/media_event.rb +109 -0
- data/lib/wx/doc/gen/memory_dc.rb +95 -0
- data/lib/wx/doc/gen/menu.rb +493 -0
- data/lib/wx/doc/gen/menu_bar.rb +247 -0
- data/lib/wx/doc/gen/menu_item.rb +333 -0
- data/lib/wx/doc/gen/message_dialog.rb +195 -0
- data/lib/wx/doc/gen/mini_frame.rb +72 -0
- data/lib/wx/doc/gen/mirror_dc.rb +29 -0
- data/lib/wx/doc/gen/mouse_state.rb +108 -0
- data/lib/wx/doc/gen/multi_choice_dialog.rb +58 -0
- data/lib/wx/doc/gen/non_owned_window.rb +46 -0
- data/lib/wx/doc/gen/notebook.rb +220 -0
- data/lib/wx/doc/gen/number_entry_dialog.rb +75 -0
- data/lib/wx/doc/gen/object.rb +69 -0
- data/lib/wx/doc/gen/paint_dc.rb +34 -0
- data/lib/wx/doc/gen/palette.rb +90 -0
- data/lib/wx/doc/gen/panel.rb +96 -0
- data/lib/wx/doc/gen/pen.rb +484 -0
- data/lib/wx/doc/gen/pg/event_list.rb +102 -0
- data/lib/wx/doc/gen/pg/numeric_property_validator.rb +47 -0
- data/lib/wx/doc/gen/pg/pg_array_editor_dialog.rb +295 -0
- data/lib/wx/doc/gen/pg/pg_cell.rb +166 -0
- data/lib/wx/doc/gen/pg/pg_editor.rb +569 -0
- data/lib/wx/doc/gen/pg/pg_multi_button.rb +161 -0
- data/lib/wx/doc/gen/pg/pg_properties.rb +2193 -0
- data/lib/wx/doc/gen/pg/pg_property.rb +1852 -0
- data/lib/wx/doc/gen/pg/pg_validation_info.rb +327 -0
- data/lib/wx/doc/gen/pg/property_grid.rb +619 -0
- data/lib/wx/doc/gen/pg/property_grid_event.rb +135 -0
- data/lib/wx/doc/gen/pg/property_grid_interface.rb +847 -0
- data/lib/wx/doc/gen/pg/property_grid_manager.rb +349 -0
- data/lib/wx/doc/gen/pg/property_grid_page.rb +265 -0
- data/lib/wx/doc/gen/pg/property_grid_page_state.rb +155 -0
- data/lib/wx/doc/gen/picker_base.rb +143 -0
- data/lib/wx/doc/gen/platform_info.rb +379 -0
- data/lib/wx/doc/gen/popup_window.rb +93 -0
- data/lib/wx/doc/gen/progress_dialog.rb +106 -0
- data/lib/wx/doc/gen/property_sheet_dialog.rb +185 -0
- data/lib/wx/doc/gen/prt/event_list.rb +13 -0
- data/lib/wx/doc/gen/prt/page_setup_dialog.rb +38 -0
- data/lib/wx/doc/gen/prt/post_script_dc.rb +32 -0
- data/lib/wx/doc/gen/prt/preview_frame.rb +39 -0
- data/lib/wx/doc/gen/prt/print_abort_dialog.rb +127 -0
- data/lib/wx/doc/gen/prt/print_data.rb +598 -0
- data/lib/wx/doc/gen/prt/print_dialog.rb +47 -0
- data/lib/wx/doc/gen/prt/printer.rb +428 -0
- data/lib/wx/doc/gen/prt/printer_dc.rb +35 -0
- data/lib/wx/doc/gen/query_layout_info_event.rb +98 -0
- data/lib/wx/doc/gen/radio_box.rb +258 -0
- data/lib/wx/doc/gen/radio_button.rb +128 -0
- data/lib/wx/doc/gen/rbn/event_list.rb +132 -0
- data/lib/wx/doc/gen/rbn/ribbon_art_provider.rb +1652 -0
- data/lib/wx/doc/gen/rbn/ribbon_bar.rb +227 -0
- data/lib/wx/doc/gen/rbn/ribbon_bar_event.rb +40 -0
- data/lib/wx/doc/gen/rbn/ribbon_button_bar.rb +400 -0
- data/lib/wx/doc/gen/rbn/ribbon_button_bar_event.rb +58 -0
- data/lib/wx/doc/gen/rbn/ribbon_control.rb +116 -0
- data/lib/wx/doc/gen/rbn/ribbon_gallery.rb +208 -0
- data/lib/wx/doc/gen/rbn/ribbon_gallery_event.rb +51 -0
- data/lib/wx/doc/gen/rbn/ribbon_page.rb +129 -0
- data/lib/wx/doc/gen/rbn/ribbon_panel.rb +232 -0
- data/lib/wx/doc/gen/rbn/ribbon_panel_event.rb +41 -0
- data/lib/wx/doc/gen/rbn/ribbon_tool_bar.rb +321 -0
- data/lib/wx/doc/gen/rbn/ribbon_tool_bar_event.rb +36 -0
- data/lib/wx/doc/gen/region.rb +299 -0
- data/lib/wx/doc/gen/rtc/event_list.rb +121 -0
- data/lib/wx/doc/gen/rtc/rich_text_buffer.rb +2052 -0
- data/lib/wx/doc/gen/rtc/rich_text_ctrl.rb +2031 -0
- data/lib/wx/doc/gen/rtc/rich_text_event.rb +146 -0
- data/lib/wx/doc/gen/rtc/rich_text_file_handler.rb +171 -0
- data/lib/wx/doc/gen/rtc/rich_text_header_footer_data.rb +180 -0
- data/lib/wx/doc/gen/rtc/rich_text_html_handler.rb +104 -0
- data/lib/wx/doc/gen/rtc/rich_text_printing.rb +241 -0
- data/lib/wx/doc/gen/rtc/rich_text_xml_handler.rb +55 -0
- data/lib/wx/doc/gen/rtc/symbol_picker_dialog.rb +153 -0
- data/lib/wx/doc/gen/sash_event.rb +133 -0
- data/lib/wx/doc/gen/sash_layout_window.rb +203 -0
- data/lib/wx/doc/gen/sash_window.rb +154 -0
- data/lib/wx/doc/gen/screen_dc.rb +27 -0
- data/lib/wx/doc/gen/scrolled_canvas.rb +317 -0
- data/lib/wx/doc/gen/scrolled_control.rb +317 -0
- data/lib/wx/doc/gen/scrolled_window.rb +337 -0
- data/lib/wx/doc/gen/simplebook.rb +93 -0
- data/lib/wx/doc/gen/single_choice_dialog.rb +74 -0
- data/lib/wx/doc/gen/sizer.rb +847 -0
- data/lib/wx/doc/gen/sizer_item.rb +227 -0
- data/lib/wx/doc/gen/slider.rb +316 -0
- data/lib/wx/doc/gen/spin_button.rb +124 -0
- data/lib/wx/doc/gen/spin_ctrl.rb +170 -0
- data/lib/wx/doc/gen/spin_event.rb +47 -0
- data/lib/wx/doc/gen/splash_screen.rb +83 -0
- data/lib/wx/doc/gen/splitter_event.rb +87 -0
- data/lib/wx/doc/gen/splitter_window.rb +357 -0
- data/lib/wx/doc/gen/static_bitmap.rb +126 -0
- data/lib/wx/doc/gen/static_box.rb +123 -0
- data/lib/wx/doc/gen/static_box_sizer.rb +67 -0
- data/lib/wx/doc/gen/static_line.rb +66 -0
- data/lib/wx/doc/gen/static_text.rb +98 -0
- data/lib/wx/doc/gen/status_bar.rb +203 -0
- data/lib/wx/doc/gen/stc/event_list.rb +217 -0
- data/lib/wx/doc/gen/stc/styled_text_ctrl.rb +4000 -0
- data/lib/wx/doc/gen/stc/styled_text_event.rb +7319 -0
- data/lib/wx/doc/gen/std_dialog_button_sizer.rb +74 -0
- data/lib/wx/doc/gen/svg_file_dc.rb +153 -0
- data/lib/wx/doc/gen/system_options.rb +109 -0
- data/lib/wx/doc/gen/system_settings.rb +481 -0
- data/lib/wx/doc/gen/task_bar_icon.rb +94 -0
- data/lib/wx/doc/gen/task_bar_icon_event.rb +86 -0
- data/lib/wx/doc/gen/text_attr.rb +645 -0
- data/lib/wx/doc/gen/text_ctrl.rb +841 -0
- data/lib/wx/doc/gen/text_entry.rb +389 -0
- data/lib/wx/doc/gen/text_entry_dialog.rb +170 -0
- data/lib/wx/doc/gen/text_validator.rb +212 -0
- data/lib/wx/doc/gen/time_picker_ctrl.rb +103 -0
- data/lib/wx/doc/gen/timer.rb +103 -0
- data/lib/wx/doc/gen/timer_event.rb +73 -0
- data/lib/wx/doc/gen/tip_provider.rb +60 -0
- data/lib/wx/doc/gen/toggle_button.rb +84 -0
- data/lib/wx/doc/gen/tool_bar.rb +744 -0
- data/lib/wx/doc/gen/tool_tip.rb +73 -0
- data/lib/wx/doc/gen/toolbook.rb +103 -0
- data/lib/wx/doc/gen/top_level_window.rb +462 -0
- data/lib/wx/doc/gen/tree_ctrl.rb +863 -0
- data/lib/wx/doc/gen/tree_event.rb +101 -0
- data/lib/wx/doc/gen/treebook.rb +154 -0
- data/lib/wx/doc/gen/utils.rb +257 -0
- data/lib/wx/doc/gen/v_list_box.rb +224 -0
- data/lib/wx/doc/gen/v_scrolled_window.rb +224 -0
- data/lib/wx/doc/gen/validator.rb +73 -0
- data/lib/wx/doc/gen/variant.rb +340 -0
- data/lib/wx/doc/gen/window.rb +2414 -0
- data/lib/wx/doc/gen/window_dc.rb +35 -0
- data/lib/wx/doc/gen/window_disabler.rb +24 -0
- data/lib/wx/doc/gen/with_images.rb +73 -0
- data/lib/wx/doc/gen/wizard.rb +197 -0
- data/lib/wx/doc/gen/wizard_event.rb +105 -0
- data/lib/wx/doc/gen/wizard_page.rb +61 -0
- data/lib/wx/doc/gen/wizard_page_simple.rb +72 -0
- data/lib/wx/doc/gen/xml_node.rb +282 -0
- data/lib/wx/doc/gen/xml_resource.rb +304 -0
- data/lib/wx/doc/grid/grid.rb +20 -0
- data/lib/wx/doc/help_controller.rb +14 -0
- data/lib/wx/doc/html/html_help_controller.rb +8 -0
- data/lib/wx/doc/pg/events.rb +15 -0
- data/lib/wx/doc/pg/pg_property.rb +8 -0
- data/lib/wx/doc/pg/pgeditor.rb +21 -0
- data/lib/wx/doc/pg/property_grid.rb +48 -0
- data/lib/wx/doc/pg/property_grid_interface.rb +64 -0
- data/lib/wx/doc/prt/page_setup_dialog.rb +15 -0
- data/lib/wx/doc/prt/print_data.rb +9 -0
- data/lib/wx/doc/prt/print_dialog.rb +26 -0
- data/lib/wx/doc/prt/printer.rb +15 -0
- data/lib/wx/doc/rbn/ribbon_bar.rb +9 -0
- data/lib/wx/doc/rbn/ribbon_button_bar.rb +9 -0
- data/lib/wx/doc/rbn/ribbon_gallery.rb +9 -0
- data/lib/wx/doc/rbn/ribbon_tool_bar.rb +9 -0
- data/lib/wx/doc/rtc/richtext_printing.rb +14 -0
- data/lib/wx/doc/screen_dc.rb +10 -0
- data/lib/wx/doc/stock_objects.rb +98 -0
- data/lib/wx/doc/stream.rb +38 -0
- data/lib/wx/doc/system_settings.rb +29 -0
- data/lib/wx/doc/treebook.rb +9 -0
- data/lib/wx/doc/variant.rb +163 -0
- data/lib/wx/doc/xml_resource.rb +19 -0
- data/lib/wx/global_const.rb +84 -0
- data/lib/wx/grid/events/evt_list.rb +156 -0
- data/lib/wx/grid/grid.rb +7 -0
- data/lib/wx/grid/keyword_defs.rb +10 -0
- data/lib/wx/grid/require.rb +9 -0
- data/lib/wx/grid.rb +14 -0
- data/lib/wx/helpers.rb +65 -0
- data/lib/wx/html/events/evt_list.rb +37 -0
- data/lib/wx/html/htmlhelpcontroller.rb +6 -0
- data/lib/wx/html/htmlwindow.rb +19 -0
- data/lib/wx/html/keyword_defs.rb +22 -0
- data/lib/wx/html/require.rb +10 -0
- data/lib/wx/html.rb +15 -0
- data/lib/wx/keyword_ctors.rb +226 -0
- data/lib/wx/keyword_defs.rb +487 -0
- data/lib/wx/pg/events/evt_list.rb +73 -0
- data/lib/wx/pg/events.rb +14 -0
- data/lib/wx/pg/keyword_defs.rb +15 -0
- data/lib/wx/pg/pg_editor.rb +13 -0
- data/lib/wx/pg/pg_properties.rb +24 -0
- data/lib/wx/pg/pg_property.rb +27 -0
- data/lib/wx/pg/property_grid.rb +71 -0
- data/lib/wx/pg/property_grid_interface.rb +46 -0
- data/lib/wx/pg/require.rb +12 -0
- data/lib/wx/pg.rb +14 -0
- data/lib/wx/prt/keyword_defs.rb +8 -0
- data/lib/wx/prt/page_setup_dialog.rb +15 -0
- data/lib/wx/prt/previewframe.rb +13 -0
- data/lib/wx/prt/require.rb +8 -0
- data/lib/wx/prt.rb +14 -0
- data/lib/wx/rbn/events/evt_list.rb +102 -0
- data/lib/wx/rbn/events.rb +4 -0
- data/lib/wx/rbn/keyword_defs.rb +43 -0
- data/lib/wx/rbn/require.rb +12 -0
- data/lib/wx/rbn/ribbon_art_provider.rb +10 -0
- data/lib/wx/rbn/ribbon_bar.rb +12 -0
- data/lib/wx/rbn/ribbon_button_bar.rb +26 -0
- data/lib/wx/rbn/ribbon_control.rb +25 -0
- data/lib/wx/rbn/ribbon_gallery.rb +26 -0
- data/lib/wx/rbn/ribbon_page.rb +15 -0
- data/lib/wx/rbn/ribbon_panel.rb +15 -0
- data/lib/wx/rbn/ribbon_tool_bar.rb +26 -0
- data/lib/wx/rbn.rb +14 -0
- data/lib/wx/rtc/events/evt_list.rb +98 -0
- data/lib/wx/rtc/ext/rich_text_ctrl.rb +24 -0
- data/lib/wx/rtc/ext.rb +15 -0
- data/lib/wx/rtc/keyword_defs.rb +17 -0
- data/lib/wx/rtc/require.rb +8 -0
- data/lib/wx/rtc.rb +15 -0
- data/lib/wx/stc/events/evt_list.rb +178 -0
- data/lib/wx/stc/keyword_defs.rb +8 -0
- data/lib/wx/stc/require.rb +7 -0
- data/lib/wx/stc.rb +14 -0
- data/lib/wx/version.rb +3 -0
- data/lib/wx/wxruby/base.rb +87 -0
- data/lib/wx/wxruby/cmd/sampler.rb +68 -0
- data/lib/wx/wxruby/cmd/test.rb +27 -0
- data/lib/wx.rb +14 -0
- 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 +220 -0
- data/rakelib/lib/config/cygwin.rb +6 -0
- data/rakelib/lib/config/linux.rb +78 -0
- data/rakelib/lib/config/macosx.rb +6 -0
- data/rakelib/lib/config/mingw.rb +133 -0
- data/rakelib/lib/config/netbsd.rb +6 -0
- data/rakelib/lib/config/unixish.rb +187 -0
- data/rakelib/lib/config.rb +673 -0
- data/rakelib/lib/ext/enum_chain.rb +22 -0
- data/rakelib/prepost.rake +91 -0
- data/rakelib/prepost.rb +26 -0
- data/rakelib/yard/templates/default/fulldoc/html/css/wxruby3.css +7 -0
- data/rakelib/yard/templates/default/layout/html/setup.rb +5 -0
- data/rakelib/yard/yard/relative_markdown_links/version.rb +8 -0
- data/rakelib/yard/yard/relative_markdown_links.rb +39 -0
- data/rakelib/yard/yard-custom-templates.rb +2 -0
- data/rakelib/yard/yard-relative_markdown_links.rb +4 -0
- data/samples/art/wxruby-128x128.png +0 -0
- data/samples/art/wxruby-256x256.png +0 -0
- data/samples/art/wxruby-64x64.png +0 -0
- data/samples/art/wxruby.ico +0 -0
- data/samples/art/wxruby.png +0 -0
- data/samples/aui/aui.rb +1321 -0
- data/samples/aui/tn_aui.png +0 -0
- data/samples/bigdemo/About.rbw +39 -0
- data/samples/bigdemo/ColorPanel.rbw +23 -0
- data/samples/bigdemo/GridSimple.rbw +78 -0
- data/samples/bigdemo/MDIDemo.rbw +57 -0
- data/samples/bigdemo/PopupMenu.rbw +146 -0
- data/samples/bigdemo/ShapedWindow.rbw +128 -0
- data/samples/bigdemo/Sizers.rbw +541 -0
- data/samples/bigdemo/bigdemo.rb +810 -0
- data/samples/bigdemo/demoTemplate.rbw +33 -0
- data/samples/bigdemo/helpfile.htb +0 -0
- data/samples/bigdemo/icons/Test 015.jpg +0 -0
- data/samples/bigdemo/icons/Test 015.png +0 -0
- data/samples/bigdemo/icons/choice.bmp +0 -0
- data/samples/bigdemo/icons/choice.xpm +27 -0
- data/samples/bigdemo/icons/combo.bmp +0 -0
- data/samples/bigdemo/icons/combo.xpm +27 -0
- data/samples/bigdemo/icons/copy.xpm +25 -0
- data/samples/bigdemo/icons/cut.xpm +24 -0
- data/samples/bigdemo/icons/gauge.bmp +0 -0
- data/samples/bigdemo/icons/gauge.xpm +27 -0
- data/samples/bigdemo/icons/help.xpm +25 -0
- data/samples/bigdemo/icons/list.bmp +0 -0
- data/samples/bigdemo/icons/list.xpm +27 -0
- data/samples/bigdemo/icons/mondrian.ico +0 -0
- data/samples/bigdemo/icons/mondrian.xpm +44 -0
- data/samples/bigdemo/icons/new.xpm +24 -0
- data/samples/bigdemo/icons/ogl.ico +0 -0
- data/samples/bigdemo/icons/ogl.xpm +45 -0
- data/samples/bigdemo/icons/open.xpm +26 -0
- data/samples/bigdemo/icons/paste.bmp +0 -0
- data/samples/bigdemo/icons/paste.xpm +38 -0
- data/samples/bigdemo/icons/pointy.png +0 -0
- data/samples/bigdemo/icons/preview.xpm +26 -0
- data/samples/bigdemo/icons/print.xpm +26 -0
- data/samples/bigdemo/icons/radio.bmp +0 -0
- data/samples/bigdemo/icons/radio.xpm +27 -0
- data/samples/bigdemo/icons/robert.xpm +415 -0
- data/samples/bigdemo/icons/sashtest.ico +0 -0
- data/samples/bigdemo/icons/save.xpm +25 -0
- data/samples/bigdemo/icons/smiles.bmp +0 -0
- data/samples/bigdemo/icons/smiles.xpm +39 -0
- data/samples/bigdemo/icons/smiley.ico +0 -0
- data/samples/bigdemo/icons/smiley.xpm +42 -0
- data/samples/bigdemo/icons/stattext.xpm +24 -0
- data/samples/bigdemo/icons/test2.bmp +0 -0
- data/samples/bigdemo/icons/test2.png +0 -0
- data/samples/bigdemo/icons/test2.xpm +79 -0
- data/samples/bigdemo/icons/text.bmp +0 -0
- data/samples/bigdemo/icons/text.xpm +27 -0
- data/samples/bigdemo/icons/tog1.bmp +0 -0
- data/samples/bigdemo/icons/tog1.xpm +38 -0
- data/samples/bigdemo/icons/tog2.bmp +0 -0
- data/samples/bigdemo/icons/tog2.xpm +38 -0
- data/samples/bigdemo/icons/wxruby-128x128.png +0 -0
- data/samples/bigdemo/icons/wxwin.ico +0 -0
- data/samples/bigdemo/icons/wxwin16x16.png +0 -0
- data/samples/bigdemo/icons/wxwin16x16.xpm +25 -0
- data/samples/bigdemo/icons/wxwin32x32.png +0 -0
- data/samples/bigdemo/icons/wxwin48x48.png +0 -0
- data/samples/bigdemo/run.rb +91 -0
- data/samples/bigdemo/tips.txt +7 -0
- data/samples/bigdemo/utils.rb +12 -0
- data/samples/bigdemo/wxArtProvider.rbw +281 -0
- data/samples/bigdemo/wxBitmapButton.rbw +65 -0
- data/samples/bigdemo/wxButton.rbw +64 -0
- data/samples/bigdemo/wxCalendarCtrl.rbw +59 -0
- data/samples/bigdemo/wxCheckBox.rbw +50 -0
- data/samples/bigdemo/wxCheckListBox.rbw +65 -0
- data/samples/bigdemo/wxChoice.rbw +47 -0
- data/samples/bigdemo/wxChoicebook.rbw +78 -0
- data/samples/bigdemo/wxColourDialog.rbw +33 -0
- data/samples/bigdemo/wxComboBox.rbw +77 -0
- data/samples/bigdemo/wxCursor.rbw +136 -0
- data/samples/bigdemo/wxDialog.rbw +74 -0
- data/samples/bigdemo/wxDirDialog.rbw +29 -0
- data/samples/bigdemo/wxDragImage.rbw +70 -0
- data/samples/bigdemo/wxFileDialog.rbw +37 -0
- data/samples/bigdemo/wxFileDialog_Save.rbw +35 -0
- data/samples/bigdemo/wxFindReplaceDialog.rbw +82 -0
- data/samples/bigdemo/wxFontDialog.rbw +200 -0
- data/samples/bigdemo/wxFrame.rbw +53 -0
- data/samples/bigdemo/wxGauge.rbw +65 -0
- data/samples/bigdemo/wxGenericDirCtrl.rbw +74 -0
- data/samples/bigdemo/wxGrid.rbw +66 -0
- data/samples/bigdemo/wxHtmlHelpController.rbw +52 -0
- data/samples/bigdemo/wxListBox.rbw +140 -0
- data/samples/bigdemo/wxListCtrl_virtual.rbw +112 -0
- data/samples/bigdemo/wxMDIWindows.rbw +50 -0
- data/samples/bigdemo/wxMenu.rbw +247 -0
- data/samples/bigdemo/wxMessageDialog.rbw +27 -0
- data/samples/bigdemo/wxMiniFrame.rbw +70 -0
- data/samples/bigdemo/wxMultipleChoiceDialog.rbw +29 -0
- data/samples/bigdemo/wxNotebook.rbw +136 -0
- data/samples/bigdemo/wxProgressDialog.rbw +43 -0
- data/samples/bigdemo/wxRadioBox.rbw +72 -0
- data/samples/bigdemo/wxRadioButton.rbw +125 -0
- data/samples/bigdemo/wxSashWindow.rbw +141 -0
- data/samples/bigdemo/wxScrolledMessageDialog.rbw +57 -0
- data/samples/bigdemo/wxScrolledWindow.rbw +199 -0
- data/samples/bigdemo/wxSingleChoiceDialog.rbw +33 -0
- data/samples/bigdemo/wxSlider.rbw +42 -0
- data/samples/bigdemo/wxSpinButton.rbw +50 -0
- data/samples/bigdemo/wxSpinCtrl.rbw +51 -0
- data/samples/bigdemo/wxSplitterWindow.rbw +63 -0
- data/samples/bigdemo/wxStaticBitmap.rbw +47 -0
- data/samples/bigdemo/wxStaticText.rbw +55 -0
- data/samples/bigdemo/wxStatusBar.rbw +126 -0
- data/samples/bigdemo/wxTextCtrl.rbw +149 -0
- data/samples/bigdemo/wxTextEntryDialog.rbw +31 -0
- data/samples/bigdemo/wxToggleButton.rbw +49 -0
- data/samples/bigdemo/wxToolBar.rbw +131 -0
- data/samples/bigdemo/wxTreeCtrl.rbw +191 -0
- data/samples/calendar/calendar.rb +363 -0
- data/samples/calendar/tn_calendar.png +0 -0
- data/samples/caret/caret.rb +293 -0
- data/samples/caret/mondrian.xpm +44 -0
- data/samples/caret/tn_caret.png +0 -0
- data/samples/controls/books.rb +183 -0
- data/samples/controls/choice.xpm +27 -0
- data/samples/controls/combo.xpm +27 -0
- data/samples/controls/controls.rb +1143 -0
- data/samples/controls/gauge.xpm +27 -0
- data/samples/controls/get_item_sample.rb +117 -0
- data/samples/controls/list.xpm +27 -0
- data/samples/controls/mondrian.ico +0 -0
- data/samples/controls/mondrian.xpm +44 -0
- data/samples/controls/radio.xpm +27 -0
- data/samples/controls/stattext.xpm +24 -0
- data/samples/controls/test2.bmp +0 -0
- data/samples/controls/text.xpm +27 -0
- data/samples/controls/tn_books.png +0 -0
- data/samples/controls/tn_controls.png +0 -0
- data/samples/controls/tn_get_item_sample.png +0 -0
- data/samples/dialogs/dialogs.rb +879 -0
- data/samples/dialogs/tips.txt +18 -0
- data/samples/dialogs/tn_dialogs.png +0 -0
- data/samples/dialogs/tn_wizard.png +0 -0
- data/samples/dialogs/wizard.rb +89 -0
- data/samples/dragdrop/dragdrop.rb +200 -0
- data/samples/dragdrop/tn_dragdrop.png +0 -0
- data/samples/drawing/SVGlogo24.xpm +310 -0
- data/samples/drawing/bitmap.rb +76 -0
- data/samples/drawing/bitmap_image.rb +131 -0
- data/samples/drawing/graphics_drawing.rb +257 -0
- data/samples/drawing/maths_images.rb +327 -0
- data/samples/drawing/rmagic_bitmap_image.rb +139 -0
- data/samples/drawing/ruby-logo.jpg +0 -0
- data/samples/drawing/svgtest.rb +373 -0
- data/samples/drawing/tn_bitmap.png +0 -0
- data/samples/drawing/tn_bitmap_image.png +0 -0
- data/samples/drawing/tn_graphics_drawing.png +0 -0
- data/samples/drawing/tn_maths_images.png +0 -0
- data/samples/drawing/tn_rmagic_bitmap_image.png +0 -0
- data/samples/drawing/tn_svgtest.png +0 -0
- data/samples/etc/choice.rb +82 -0
- data/samples/etc/miniframe.rb +92 -0
- data/samples/etc/sash.rb +140 -0
- data/samples/etc/scrollwin.rb +120 -0
- data/samples/etc/system_settings.rb +263 -0
- data/samples/etc/tn_choice.png +0 -0
- data/samples/etc/tn_miniframe.png +0 -0
- data/samples/etc/tn_sash.png +0 -0
- data/samples/etc/tn_scrollwin.png +0 -0
- data/samples/etc/tn_system_settings.png +0 -0
- data/samples/event/activation.rb +129 -0
- data/samples/event/event.rb +220 -0
- data/samples/event/threaded.rb +141 -0
- data/samples/event/tn_activation.png +0 -0
- data/samples/event/tn_event.png +0 -0
- data/samples/event/tn_threaded.png +0 -0
- data/samples/event/tn_update_ui_event.png +0 -0
- data/samples/event/update_ui_event.rb +91 -0
- data/samples/grid/grid.rb +224 -0
- data/samples/grid/gridtablebase.rb +178 -0
- data/samples/grid/tn_grid.png +0 -0
- data/samples/grid/tn_gridtablebase.png +0 -0
- data/samples/html/8859_2.htm +14 -0
- data/samples/html/cp1250.htm +19 -0
- data/samples/html/foo.png +0 -0
- data/samples/html/html.rb +278 -0
- data/samples/html/i18n.gif +0 -0
- data/samples/html/imagemap.htm +20 -0
- data/samples/html/imagemap.png +0 -0
- data/samples/html/listtest.htm +28 -0
- data/samples/html/pic.png +0 -0
- data/samples/html/pic2.bmp +0 -0
- data/samples/html/regres.htm +20 -0
- data/samples/html/subsup.html +42 -0
- data/samples/html/tables.htm +255 -0
- data/samples/html/test.htm +375 -0
- data/samples/html/tn_html.png +0 -0
- data/samples/mdi/mdi.rb +118 -0
- data/samples/mdi/tn_mdi.png +0 -0
- data/samples/minimal/minimal.rb +95 -0
- data/samples/minimal/mondrian.ico +0 -0
- data/samples/minimal/mondrian.png +0 -0
- data/samples/minimal/nothing.rb +38 -0
- data/samples/minimal/tn_minimal.png +0 -0
- data/samples/minimal/tn_nothing.png +0 -0
- data/samples/printing/mondrian.ico +0 -0
- data/samples/printing/mondrian.xpm +44 -0
- data/samples/printing/printing.rb +499 -0
- data/samples/printing/printing2.rb +251 -0
- data/samples/printing/sample-text.txt +213 -0
- data/samples/printing/tn_printing.png +0 -0
- data/samples/printing/tn_printing2.png +0 -0
- data/samples/propgrid/propgrid.rb +2711 -0
- data/samples/propgrid/propgrid_minimal.rb +107 -0
- data/samples/propgrid/sample_props.rb +434 -0
- data/samples/propgrid/tn_propgrid.png +0 -0
- data/samples/propgrid/tn_propgrid_minimal.png +0 -0
- data/samples/ribbon/align_center.xpm +21 -0
- data/samples/ribbon/align_left.xpm +21 -0
- data/samples/ribbon/align_right.xpm +21 -0
- data/samples/ribbon/aui_style.xpm +53 -0
- data/samples/ribbon/auto_crop_selection.xpm +55 -0
- data/samples/ribbon/auto_crop_selection_small.xpm +33 -0
- data/samples/ribbon/circle.xpm +38 -0
- data/samples/ribbon/circle_small.xpm +22 -0
- data/samples/ribbon/colours.xpm +25 -0
- data/samples/ribbon/cross.xpm +38 -0
- data/samples/ribbon/empty.xpm +23 -0
- data/samples/ribbon/expand_selection_h.xpm +46 -0
- data/samples/ribbon/expand_selection_v.xpm +46 -0
- data/samples/ribbon/eye.xpm +26 -0
- data/samples/ribbon/hexagon.xpm +38 -0
- data/samples/ribbon/msw_style.xpm +65 -0
- data/samples/ribbon/position_left.xpm +22 -0
- data/samples/ribbon/position_top.xpm +22 -0
- data/samples/ribbon/ribbon.rb +900 -0
- data/samples/ribbon/ribbon.xpm +54 -0
- data/samples/ribbon/selection_panel.xpm +23 -0
- data/samples/ribbon/square.xpm +38 -0
- data/samples/ribbon/tn_ribbon.png +0 -0
- data/samples/ribbon/triangle.xpm +38 -0
- data/samples/sample.xpm +475 -0
- data/samples/sampler/back.xpm +21 -0
- data/samples/sampler/copy.xpm +44 -0
- data/samples/sampler/cut.xpm +46 -0
- data/samples/sampler/editor.rb +560 -0
- data/samples/sampler/ext.rb +51 -0
- data/samples/sampler/filesave.xpm +42 -0
- data/samples/sampler/find.xpm +62 -0
- data/samples/sampler/findrepl.xpm +63 -0
- data/samples/sampler/forward.xpm +21 -0
- data/samples/sampler/paste.xpm +46 -0
- data/samples/sampler/play.xpm +24 -0
- data/samples/sampler/redo.xpm +58 -0
- data/samples/sampler/sample.rb +347 -0
- data/samples/sampler/stc_editor.rb +321 -0
- data/samples/sampler/txt_editor.rb +130 -0
- data/samples/sampler/undo.xpm +58 -0
- data/samples/sampler.rb +394 -0
- data/samples/splash/mobile.xpm +1835 -0
- data/samples/splash/splash.png +0 -0
- data/samples/splash/splash.rb +164 -0
- data/samples/splash/tn_splash.png +0 -0
- data/samples/text/document-open.png +0 -0
- data/samples/text/document-save.png +0 -0
- data/samples/text/edit-copy.png +0 -0
- data/samples/text/edit-cut.png +0 -0
- data/samples/text/edit-paste.png +0 -0
- data/samples/text/edit-redo.png +0 -0
- data/samples/text/edit-undo.png +0 -0
- data/samples/text/format-text-bold.png +0 -0
- data/samples/text/format-text-italic.png +0 -0
- data/samples/text/format-text-underline.png +0 -0
- data/samples/text/mondrian.ico +0 -0
- data/samples/text/mondrian.xpm +44 -0
- data/samples/text/preferences-desktop-font.png +0 -0
- data/samples/text/rich_textctrl.rb +326 -0
- data/samples/text/scintilla.rb +179 -0
- data/samples/text/textctrl.rb +124 -0
- data/samples/text/tn_rich_textctrl.png +0 -0
- data/samples/text/tn_scintilla.png +0 -0
- data/samples/text/tn_textctrl.png +0 -0
- data/samples/text/tn_unicode.png +0 -0
- data/samples/text/unicode.rb +238 -0
- data/samples/text/utf8.txt +15 -0
- data/samples/treectrl/checked.xpm +54 -0
- data/samples/treectrl/icon1.xpm +79 -0
- data/samples/treectrl/icon2.xpm +53 -0
- data/samples/treectrl/icon3.xpm +79 -0
- data/samples/treectrl/icon4.xpm +43 -0
- data/samples/treectrl/icon5.xpm +79 -0
- data/samples/treectrl/state1.xpm +145 -0
- data/samples/treectrl/state2.xpm +144 -0
- data/samples/treectrl/state3.xpm +142 -0
- data/samples/treectrl/state4.xpm +145 -0
- data/samples/treectrl/state5.xpm +85 -0
- data/samples/treectrl/tn_treectrl.png +0 -0
- data/samples/treectrl/treectrl.rb +1720 -0
- data/samples/treectrl/unchecked.xpm +30 -0
- data/samples/xrc/custom_dialog.xrc +46 -0
- data/samples/xrc/custom_xrc_sample.rb +84 -0
- data/samples/xrc/samples.xrc +46 -0
- data/samples/xrc/tn_xrc_sample.png +0 -0
- data/samples/xrc/xrc_sample.rb +86 -0
- data/tests/test_basic.rb +20 -0
- data/tests/test_clipboard.rb +241 -0
- data/tests/test_dialog.rb +28 -0
- data/tests/test_event_handling.rb +103 -0
- data/tests/test_events.rb +45 -0
- data/tests/test_geometry.rb +141 -0
- data/tests/test_intl.rb +107 -0
- data/tests/test_item_data.rb +120 -0
- data/tests/test_variant.rb +151 -0
- data/tests/testapp.rb +40 -0
- data/tests/testapp_noframe.rb +28 -0
- metadata +930 -0
@@ -0,0 +1,2499 @@
|
|
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
|
+
# This class is used for idle events, which are generated when the system becomes idle.
|
10
|
+
# Note that, unless you do something specifically, the idle events are not sent if the system remains idle once it has become it, e.g. only a single idle event will be generated until something else resulting in more normal events happens and only then is the next idle event sent again.
|
11
|
+
# If you need to ensure a continuous stream of idle events, you can either use {Wx::IdleEvent#request_more} method in your handler or call {wake_up_idle} periodically (for example from a timer event handler), but note that both of these approaches (and especially the first one) increase the system load and so should be avoided if possible.
|
12
|
+
# By default, idle events are sent to all windows, including even the hidden ones because they may be shown if some condition is met from their {Wx::EVT_IDLE} (or related {Wx::EVT_UPDATE_UI}) handler. The children of hidden windows do not receive idle events however as they can't change their state in any way noticeable by the user. Finally, the global {Wx::App} object also receives these events, as usual, so it can be used for any global idle time processing.
|
13
|
+
# If sending idle events to all windows is causing a significant overhead in your application, you can call {Wx::IdleEvent.set_mode} with the value {Wx::IdleMode::IDLE_PROCESS_SPECIFIED}, and set the {Wx::WS_EX_PROCESS_IDLE} extra window style for every window which should receive idle events, all the other ones will not receive them in this case.
|
14
|
+
# === Events using this class
|
15
|
+
#
|
16
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::IdleEvent} events.
|
17
|
+
# Event handler methods:
|
18
|
+
# - {Wx::EvtHandler#evt_idle}(meth = nil, &block): Process a {Wx::EVT_IDLE} event.
|
19
|
+
#
|
20
|
+
# ===
|
21
|
+
#
|
22
|
+
# Category: {Wx::Events}
|
23
|
+
#
|
24
|
+
# == Delayed Action Mechanism
|
25
|
+
#
|
26
|
+
# {Wx::IdleEvent} can be used to perform some action "at slightly later time". This can be necessary in several circumstances when, for whatever reason, something can't be done in the current event handler. For example, if a mouse event handler is called with the mouse button pressed, the mouse can be currently captured and some operations with it notably capturing it again might be impossible or lead to undesirable results. If you still want to capture it, you can do it from {Wx::EVT_IDLE} handler when it is called the next time instead of doing it immediately.
|
27
|
+
# This can be achieved in two different ways: when using static event tables, you will need a flag indicating to the (always connected) idle event handler whether the desired action should be performed. The originally called handler would then set it to indicate that it should indeed be done and the idle handler itself would reset it to prevent it from doing the same action again.
|
28
|
+
# Using dynamically connected event handlers things are even simpler as the original event handler can simply {Wx::EvtHandler#connect} or {Wx::EvtHandler#bind} the idle event handler which would only be executed then and could {Wx::EvtHandler#disconnect} or {Wx::EvtHandler#unbind} itself.
|
29
|
+
# @see Events and Event Handling
|
30
|
+
# @see Wx::UpdateUIEvent
|
31
|
+
# @see Wx::Window#on_internal_idle
|
32
|
+
#
|
33
|
+
#
|
34
|
+
class IdleEvent < Event
|
35
|
+
|
36
|
+
# Constructor.
|
37
|
+
# @return [IdleEvent]
|
38
|
+
def initialize; end
|
39
|
+
|
40
|
+
# Returns true if the OnIdle function processing this event requested more processing time.
|
41
|
+
#
|
42
|
+
# @see Wx::IdleEvent#request_more
|
43
|
+
# @return [true,false]
|
44
|
+
def more_requested; end
|
45
|
+
|
46
|
+
# Tells wxWidgets that more processing is required.
|
47
|
+
# This function can be called by an OnIdle handler for a window or window event handler to indicate that {Wx::App::OnIdle} should forward the OnIdle event once more to the application windows.
|
48
|
+
# If no window calls this function during OnIdle, then the application will remain in a passive event loop (not calling OnIdle) until a new event is posted to the application by the windowing system.
|
49
|
+
# @see Wx::IdleEvent#more_requested
|
50
|
+
# @param needMore [true,false]
|
51
|
+
# @return [void]
|
52
|
+
def request_more(needMore=true) end
|
53
|
+
|
54
|
+
# Static function returning a value specifying how wxWidgets will send idle events: to all windows, or only to those which specify that they will process the events.
|
55
|
+
#
|
56
|
+
# @see Wx::IdleEvent.set_mode.
|
57
|
+
# @return [IdleMode]
|
58
|
+
def self.get_mode; end
|
59
|
+
|
60
|
+
# Static function for specifying how wxWidgets will send idle events: to all windows, or only to those which specify that they will process the events.
|
61
|
+
# @param mode [IdleMode] Can be one of the {Wx::IdleMode} values. The default is {Wx::IdleMode::IDLE_PROCESS_ALL}.
|
62
|
+
# @return [void]
|
63
|
+
def self.set_mode(mode) end
|
64
|
+
|
65
|
+
end # IdleEvent
|
66
|
+
|
67
|
+
# This class is not used by the event handlers by itself, but is a base class for other event classes (such as {Wx::BookCtrlEvent}).
|
68
|
+
# It (or an object of a derived class) is sent when the controls state is being changed and allows the program to {Wx::NotifyEvent#veto} this change if it wants to prevent it from happening.
|
69
|
+
# ===
|
70
|
+
#
|
71
|
+
# Category: {Wx::Events}
|
72
|
+
# @see Wx::BookCtrlEvent
|
73
|
+
#
|
74
|
+
#
|
75
|
+
class NotifyEvent < CommandEvent
|
76
|
+
|
77
|
+
# Constructor (used internally by wxWidgets only).
|
78
|
+
# @param eventType [Integer]
|
79
|
+
# @param id [Integer]
|
80
|
+
# @return [NotifyEvent]
|
81
|
+
def initialize(eventType=Wx::EVT_NULL, id=0) end
|
82
|
+
|
83
|
+
# This is the opposite of {Wx::NotifyEvent#veto}: it explicitly allows the event to be processed.
|
84
|
+
# For most events it is not necessary to call this method as the events are allowed anyhow but some are forbidden by default (this will be mentioned in the corresponding event description).
|
85
|
+
# @return [void]
|
86
|
+
def allow; end
|
87
|
+
|
88
|
+
# Returns true if the change is allowed ({Wx::NotifyEvent#veto} hasn't been called) or false otherwise (if it was).
|
89
|
+
# @return [true,false]
|
90
|
+
def is_allowed; end
|
91
|
+
alias_method :allowed?, :is_allowed
|
92
|
+
|
93
|
+
# Prevents the change announced by this event from happening.
|
94
|
+
# It is in general a good idea to notify the user about the reasons for vetoing the change because otherwise the applications behaviour (which just refuses to do what the user wants) might be quite surprising.
|
95
|
+
# @return [void]
|
96
|
+
def veto; end
|
97
|
+
|
98
|
+
end # NotifyEvent
|
99
|
+
|
100
|
+
# A scroll event holds information about events sent from stand-alone scrollbars (see {Wx::ScrollBar}) and sliders (see {Wx::Slider}).
|
101
|
+
# Note that scrolled windows send the {Wx::ScrollWinEvent} which does not derive from {Wx::CommandEvent}, but from {Wx::Event} directly - don't confuse these two kinds of events and use the event table macros mentioned below only for the scrollbar-like controls.
|
102
|
+
#
|
103
|
+
# == The difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED
|
104
|
+
#
|
105
|
+
# The EVT_SCROLL_THUMBRELEASE event is only emitted when actually dragging the thumb using the mouse and releasing it (This EVT_SCROLL_THUMBRELEASE event is also followed by an EVT_SCROLL_CHANGED event).
|
106
|
+
# The EVT_SCROLL_CHANGED event also occurs when using the keyboard to change the thumb position, and when clicking next to the thumb (In all these cases the EVT_SCROLL_THUMBRELEASE event does not happen).
|
107
|
+
# In short, the EVT_SCROLL_CHANGED event is triggered when scrolling/ moving has finished independently of the way it had started. Please see the Widgets Sample ("Slider" page) to see the difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED in action.
|
108
|
+
# Note that unless specifying a scroll control identifier, you will need to test for scrollbar orientation with {Wx::ScrollEvent#get_orientation}, since horizontal and vertical scroll events are processed using the same event handler.
|
109
|
+
#
|
110
|
+
# === Events using this class
|
111
|
+
#
|
112
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::ScrollEvent} events.
|
113
|
+
# Event handler methods: except for this, the macros behave exactly the same.
|
114
|
+
# - {Wx::EvtHandler#evt_scroll}(meth = nil, &block): Process all scroll events.
|
115
|
+
# - {Wx::EvtHandler#evt_scroll_top}(meth = nil, &block): Process {Wx::EVT_SCROLL_TOP} scroll-to-top events (minimum position).
|
116
|
+
# - {Wx::EvtHandler#evt_scroll_bottom}(meth = nil, &block): Process {Wx::EVT_SCROLL_BOTTOM} scroll-to-bottom events (maximum position).
|
117
|
+
# - {Wx::EvtHandler#evt_scroll_lineup}(meth = nil, &block): Process {Wx::EVT_SCROLL_LINEUP} line up events.
|
118
|
+
# - {Wx::EvtHandler#evt_scroll_linedown}(meth = nil, &block): Process {Wx::EVT_SCROLL_LINEDOWN} line down events.
|
119
|
+
# - {Wx::EvtHandler#evt_scroll_pageup}(meth = nil, &block): Process {Wx::EVT_SCROLL_PAGEUP} page up events.
|
120
|
+
# - {Wx::EvtHandler#evt_scroll_pagedown}(meth = nil, &block): Process {Wx::EVT_SCROLL_PAGEDOWN} page down events.
|
121
|
+
# - {Wx::EvtHandler#evt_scroll_thumbtrack}(meth = nil, &block): Process {Wx::EVT_SCROLL_THUMBTRACK} thumbtrack events (frequent events sent as the user drags the thumbtrack).
|
122
|
+
# - {Wx::EvtHandler#evt_scroll_thumbrelease}(meth = nil, &block): Process {Wx::EVT_SCROLL_THUMBRELEASE} thumb release events.
|
123
|
+
# - {Wx::EvtHandler#evt_scroll_changed}(meth = nil, &block): Process {Wx::EVT_SCROLL_CHANGED} end of scrolling events (MSW only).
|
124
|
+
# - {Wx::EvtHandler#evt_command_scroll}(id, meth = nil, &block): Process all scroll events.
|
125
|
+
# - {Wx::EvtHandler#evt_command_scroll_top}(id, meth = nil, &block): Process {Wx::EVT_SCROLL_TOP} scroll-to-top events (minimum position).
|
126
|
+
# - {Wx::EvtHandler#evt_command_scroll_bottom}(id, meth = nil, &block): Process {Wx::EVT_SCROLL_BOTTOM} scroll-to-bottom events (maximum position).
|
127
|
+
# - {Wx::EvtHandler#evt_command_scroll_lineup}(id, meth = nil, &block): Process {Wx::EVT_SCROLL_LINEUP} line up events.
|
128
|
+
# - {Wx::EvtHandler#evt_command_scroll_linedown}(id, meth = nil, &block): Process {Wx::EVT_SCROLL_LINEDOWN} line down events.
|
129
|
+
# - {Wx::EvtHandler#evt_command_scroll_pageup}(id, meth = nil, &block): Process {Wx::EVT_SCROLL_PAGEUP} page up events.
|
130
|
+
# - {Wx::EvtHandler#evt_command_scroll_pagedown}(id, meth = nil, &block): Process {Wx::EVT_SCROLL_PAGEDOWN} page down events.
|
131
|
+
# - {Wx::EvtHandler#evt_command_scroll_thumbtrack}(id, meth = nil, &block): Process {Wx::EVT_SCROLL_THUMBTRACK} thumbtrack events (frequent events sent as the user drags the thumbtrack).
|
132
|
+
# - {Wx::EvtHandler#evt_command_scroll_thumbrelease}(meth = nil, &block): Process {Wx::EVT_SCROLL_THUMBRELEASE} thumb release events.
|
133
|
+
# - {Wx::EvtHandler#evt_command_scroll_changed}(meth = nil, &block): Process {Wx::EVT_SCROLL_CHANGED} end of scrolling events (MSW only).
|
134
|
+
#
|
135
|
+
# ===
|
136
|
+
#
|
137
|
+
# Category: {Wx::Events}
|
138
|
+
# @see Wx::ScrollBar
|
139
|
+
# @see Wx::Slider
|
140
|
+
# @see Wx::SpinButton
|
141
|
+
# @see Wx::ScrollWinEvent
|
142
|
+
# @see Events and Event Handling
|
143
|
+
#
|
144
|
+
#
|
145
|
+
class ScrollEvent < CommandEvent
|
146
|
+
|
147
|
+
# Constructor.
|
148
|
+
# @param commandType [Integer]
|
149
|
+
# @param id [Integer]
|
150
|
+
# @param pos [Integer]
|
151
|
+
# @param orientation [Integer]
|
152
|
+
# @return [ScrollEvent]
|
153
|
+
def initialize(commandType=Wx::EVT_NULL, id=0, pos=0, orientation=0) end
|
154
|
+
|
155
|
+
# Returns {Wx::Orientation::HORIZONTAL} or {Wx::Orientation::VERTICAL}, depending on the orientation of the scrollbar.
|
156
|
+
# @return [Integer]
|
157
|
+
def get_orientation; end
|
158
|
+
alias_method :orientation, :get_orientation
|
159
|
+
|
160
|
+
# Returns the position of the scrollbar.
|
161
|
+
# @return [Integer]
|
162
|
+
def get_position; end
|
163
|
+
alias_method :position, :get_position
|
164
|
+
|
165
|
+
# @param orient [Integer]
|
166
|
+
# @return [void]
|
167
|
+
def set_orientation(orient) end
|
168
|
+
alias_method :orientation=, :set_orientation
|
169
|
+
|
170
|
+
# @param pos [Integer]
|
171
|
+
# @return [void]
|
172
|
+
def set_position(pos) end
|
173
|
+
alias_method :position=, :set_position
|
174
|
+
|
175
|
+
end # ScrollEvent
|
176
|
+
|
177
|
+
# A scroll event holds information about events sent from scrolling windows.
|
178
|
+
# Note that you can use the EVT_SCROLLWIN* macros for intercepting scroll window events from the receiving window.
|
179
|
+
# === Events using this class
|
180
|
+
#
|
181
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::ScrollWinEvent} events.
|
182
|
+
# Event handler methods:
|
183
|
+
# - {Wx::EvtHandler#evt_scrollwin}(meth = nil, &block): Process all scroll events.
|
184
|
+
# - {Wx::EvtHandler#evt_scrollwin_top}(meth = nil, &block): Process {Wx::EVT_SCROLLWIN_TOP} scroll-to-top events.
|
185
|
+
# - {Wx::EvtHandler#evt_scrollwin_bottom}(meth = nil, &block): Process {Wx::EVT_SCROLLWIN_BOTTOM} scroll-to-bottom events.
|
186
|
+
# - {Wx::EvtHandler#evt_scrollwin_lineup}(meth = nil, &block): Process {Wx::EVT_SCROLLWIN_LINEUP} line up events.
|
187
|
+
# - {Wx::EvtHandler#evt_scrollwin_linedown}(meth = nil, &block): Process {Wx::EVT_SCROLLWIN_LINEDOWN} line down events.
|
188
|
+
# - {Wx::EvtHandler#evt_scrollwin_pageup}(meth = nil, &block): Process {Wx::EVT_SCROLLWIN_PAGEUP} page up events.
|
189
|
+
# - {Wx::EvtHandler#evt_scrollwin_pagedown}(meth = nil, &block): Process {Wx::EVT_SCROLLWIN_PAGEDOWN} page down events.
|
190
|
+
# - {Wx::EvtHandler#evt_scrollwin_thumbtrack}(meth = nil, &block): Process {Wx::EVT_SCROLLWIN_THUMBTRACK} thumbtrack events (frequent events sent as the user drags the thumbtrack).
|
191
|
+
# - {Wx::EvtHandler#evt_scrollwin_thumbrelease}(meth = nil, &block): Process {Wx::EVT_SCROLLWIN_THUMBRELEASE} thumb release events.
|
192
|
+
#
|
193
|
+
# ===
|
194
|
+
#
|
195
|
+
# Category: {Wx::Events}
|
196
|
+
# @see Wx::ScrollEvent
|
197
|
+
# @see Events and Event Handling
|
198
|
+
#
|
199
|
+
#
|
200
|
+
class ScrollWinEvent < Event
|
201
|
+
|
202
|
+
# Constructor.
|
203
|
+
# @param commandType [Integer]
|
204
|
+
# @param pos [Integer]
|
205
|
+
# @param orientation [Integer]
|
206
|
+
# @return [ScrollWinEvent]
|
207
|
+
def initialize(commandType=Wx::EVT_NULL, pos=0, orientation=0) end
|
208
|
+
|
209
|
+
# Returns {Wx::Orientation::HORIZONTAL} or {Wx::Orientation::VERTICAL}, depending on the orientation of the scrollbar.
|
210
|
+
# Todo{Wx::Orientation::HORIZONTAL} and {Wx::Orientation::VERTICAL} should go in their own enum
|
211
|
+
# @return [Integer]
|
212
|
+
def get_orientation; end
|
213
|
+
alias_method :orientation, :get_orientation
|
214
|
+
|
215
|
+
# Returns the position of the scrollbar for the thumb track and release events.
|
216
|
+
# Note that this field can't be used for the other events, you need to query the window itself for the current position in that case.
|
217
|
+
# @return [Integer]
|
218
|
+
def get_position; end
|
219
|
+
alias_method :position, :get_position
|
220
|
+
|
221
|
+
# @param orient [Integer]
|
222
|
+
# @return [void]
|
223
|
+
def set_orientation(orient) end
|
224
|
+
alias_method :orientation=, :set_orientation
|
225
|
+
|
226
|
+
# @param pos [Integer]
|
227
|
+
# @return [void]
|
228
|
+
def set_position(pos) end
|
229
|
+
alias_method :position=, :set_position
|
230
|
+
|
231
|
+
end # ScrollWinEvent
|
232
|
+
|
233
|
+
# This event class contains information about the events generated by the mouse: they include mouse buttons press and release events and mouse move events.
|
234
|
+
# All mouse events involving the buttons use {Wx::MOUSE_BTN_LEFT} for the left mouse button, {Wx::MOUSE_BTN_MIDDLE} for the middle one and {Wx::MOUSE_BTN_RIGHT} for the right one. And if the system supports more buttons, the {Wx::MOUSE_BTN_AUX1} and {Wx::MOUSE_BTN_AUX2} events can also be generated. Note that not all mice have even a middle button so a portable application should avoid relying on the events from it (but the right button click can be emulated using the left mouse button with the control key under Mac platforms with a single button mouse).
|
235
|
+
# For the {Wx::EVT_ENTER_WINDOW} and {Wx::EVT_LEAVE_WINDOW} events purposes, the mouse is considered to be inside the window if it is in the window client area and not inside one of its children. In other words, the parent window receives {Wx::EVT_LEAVE_WINDOW} event not only when the mouse leaves the window entirely but also when it enters one of its children.
|
236
|
+
# The position associated with a mouse event is expressed in the window coordinates of the window which generated the event, you can use {Wx::Window#client_to_screen} to convert it to screen coordinates and possibly call {Wx::Window#screen_to_client} next to convert it to window coordinates of another window.
|
237
|
+
# Note the difference between methods like {Wx::MouseEvent#left_down} and the inherited {Wx::MouseState#left_is_down}: the former returns true when the event corresponds to the left mouse button click while the latter returns true if the left mouse button is currently being pressed. For example, when the user is dragging the mouse you can use {Wx::MouseEvent::LeftIsDown} to test whether the left mouse button is (still) depressed. Also, by convention, if {Wx::MouseEvent#left_down} returns true, {Wx::MouseEvent::LeftIsDown} will also return true in wxWidgets whatever the underlying GUI behaviour is (which is platform-dependent). The same applies, of course, to other mouse buttons as well.
|
238
|
+
#
|
239
|
+
# === Events using this class
|
240
|
+
#
|
241
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::MouseEvent} events.
|
242
|
+
# Event handler methods:
|
243
|
+
# - {Wx::EvtHandler#evt_left_down}(meth = nil, &block): Process a {Wx::EVT_LEFT_DOWN} event. The handler of this event should normally call event.Skip() to allow the default processing to take place as otherwise the window under mouse wouldn't get the focus.
|
244
|
+
# - {Wx::EvtHandler#evt_left_up}(meth = nil, &block): Process a {Wx::EVT_LEFT_UP} event.
|
245
|
+
# - {Wx::EvtHandler#evt_left_dclick}(meth = nil, &block): Process a {Wx::EVT_LEFT_DCLICK} event.
|
246
|
+
# - {Wx::EvtHandler#evt_middle_down}(meth = nil, &block): Process a {Wx::EVT_MIDDLE_DOWN} event.
|
247
|
+
# - {Wx::EvtHandler#evt_middle_up}(meth = nil, &block): Process a {Wx::EVT_MIDDLE_UP} event.
|
248
|
+
# - {Wx::EvtHandler#evt_middle_dclick}(meth = nil, &block): Process a {Wx::EVT_MIDDLE_DCLICK} event.
|
249
|
+
# - {Wx::EvtHandler#evt_right_down}(meth = nil, &block): Process a {Wx::EVT_RIGHT_DOWN} event.
|
250
|
+
# - {Wx::EvtHandler#evt_right_up}(meth = nil, &block): Process a {Wx::EVT_RIGHT_UP} event.
|
251
|
+
# - {Wx::EvtHandler#evt_right_dclick}(meth = nil, &block): Process a {Wx::EVT_RIGHT_DCLICK} event.
|
252
|
+
# - EVT_MOUSE_AUX1_DOWN(func): Process a {Wx::EVT_AUX1_DOWN} event.
|
253
|
+
# - EVT_MOUSE_AUX1_UP(func): Process a {Wx::EVT_AUX1_UP} event.
|
254
|
+
# - EVT_MOUSE_AUX1_DCLICK(func): Process a {Wx::EVT_AUX1_DCLICK} event.
|
255
|
+
# - EVT_MOUSE_AUX2_DOWN(func): Process a {Wx::EVT_AUX2_DOWN} event.
|
256
|
+
# - EVT_MOUSE_AUX2_UP(func): Process a {Wx::EVT_AUX2_UP} event.
|
257
|
+
# - EVT_MOUSE_AUX2_DCLICK(func): Process a {Wx::EVT_AUX2_DCLICK} event.
|
258
|
+
# - {Wx::EvtHandler#evt_motion}(meth = nil, &block): Process a {Wx::EVT_MOTION} event.
|
259
|
+
# - {Wx::EvtHandler#evt_enter_window}(meth = nil, &block): Process a {Wx::EVT_ENTER_WINDOW} event.
|
260
|
+
# - {Wx::EvtHandler#evt_leave_window}(meth = nil, &block): Process a {Wx::EVT_LEAVE_WINDOW} event.
|
261
|
+
# - {Wx::EvtHandler#evt_mousewheel}(meth = nil, &block): Process a {Wx::EVT_MOUSEWHEEL} event.
|
262
|
+
# - {Wx::EvtHandler#evt_mouse_events}(meth = nil, &block): Process all mouse events.
|
263
|
+
# - {Wx::EvtHandler#evt_magnify}(meth = nil, &block): Process a {Wx::EVT_MAGNIFY} event (new since wxWidgets 3.1.0).
|
264
|
+
#
|
265
|
+
# ===
|
266
|
+
#
|
267
|
+
# Category: {Wx::Events}
|
268
|
+
# @see Wx::KeyEvent
|
269
|
+
#
|
270
|
+
#
|
271
|
+
class MouseEvent < Event
|
272
|
+
|
273
|
+
# Constructor.
|
274
|
+
# Valid event types are:
|
275
|
+
#
|
276
|
+
# - {Wx::EVT_ENTER_WINDOW}
|
277
|
+
# - {Wx::EVT_LEAVE_WINDOW}
|
278
|
+
# - {Wx::EVT_LEFT_DOWN}
|
279
|
+
# - {Wx::EVT_LEFT_UP}
|
280
|
+
# - {Wx::EVT_LEFT_DCLICK}
|
281
|
+
# - {Wx::EVT_MIDDLE_DOWN}
|
282
|
+
# - {Wx::EVT_MIDDLE_UP}
|
283
|
+
# - {Wx::EVT_MIDDLE_DCLICK}
|
284
|
+
# - {Wx::EVT_RIGHT_DOWN}
|
285
|
+
# - {Wx::EVT_RIGHT_UP}
|
286
|
+
# - {Wx::EVT_RIGHT_DCLICK}
|
287
|
+
# - {Wx::EVT_AUX1_DOWN}
|
288
|
+
# - {Wx::EVT_AUX1_UP}
|
289
|
+
# - {Wx::EVT_AUX1_DCLICK}
|
290
|
+
# - {Wx::EVT_AUX2_DOWN}
|
291
|
+
# - {Wx::EVT_AUX2_UP}
|
292
|
+
# - {Wx::EVT_AUX2_DCLICK}
|
293
|
+
# - {Wx::EVT_MOTION}
|
294
|
+
# - {Wx::EVT_MOUSEWHEEL}
|
295
|
+
# - {Wx::EVT_MAGNIFY}
|
296
|
+
# @param mouseEventType [Integer]
|
297
|
+
# @return [MouseEvent]
|
298
|
+
def initialize(mouseEventType=Wx::EVT_NULL) end
|
299
|
+
|
300
|
+
# Returns true if the event was a first extra button double click.
|
301
|
+
# @return [true,false]
|
302
|
+
def aux1d_click; end
|
303
|
+
|
304
|
+
# Returns true if the first extra button mouse button changed to down.
|
305
|
+
# @return [true,false]
|
306
|
+
def aux1down; end
|
307
|
+
|
308
|
+
# Returns true if the first extra button mouse button changed to up.
|
309
|
+
# @return [true,false]
|
310
|
+
def aux1up; end
|
311
|
+
|
312
|
+
# Returns true if the event was a second extra button double click.
|
313
|
+
# @return [true,false]
|
314
|
+
def aux2d_click; end
|
315
|
+
|
316
|
+
# Returns true if the second extra button mouse button changed to down.
|
317
|
+
# @return [true,false]
|
318
|
+
def aux2down; end
|
319
|
+
|
320
|
+
# Returns true if the second extra button mouse button changed to up.
|
321
|
+
# @return [true,false]
|
322
|
+
def aux2up; end
|
323
|
+
|
324
|
+
# Returns true if the event was generated by the specified button.
|
325
|
+
#
|
326
|
+
# @see wxMouseState::ButtoinIsDown()
|
327
|
+
# @param but [MouseButton]
|
328
|
+
# @return [true,false]
|
329
|
+
def button(but) end
|
330
|
+
|
331
|
+
# If the argument is omitted, this returns true if the event was a mouse double click event.
|
332
|
+
# Otherwise the argument specifies which double click event was generated (see {Wx::MouseEvent#button} for the possible values).
|
333
|
+
# @param but [MouseButton]
|
334
|
+
# @return [true,false]
|
335
|
+
def button_d_click(but=Wx::MOUSE_BTN_ANY) end
|
336
|
+
|
337
|
+
# If the argument is omitted, this returns true if the event was a mouse button down event.
|
338
|
+
# Otherwise the argument specifies which button-down event was generated (see {Wx::MouseEvent#button} for the possible values).
|
339
|
+
# @param but [MouseButton]
|
340
|
+
# @return [true,false]
|
341
|
+
def button_down(but=Wx::MOUSE_BTN_ANY) end
|
342
|
+
|
343
|
+
# If the argument is omitted, this returns true if the event was a mouse button up event.
|
344
|
+
# Otherwise the argument specifies which button-up event was generated (see {Wx::MouseEvent#button} for the possible values).
|
345
|
+
# @param but [MouseButton]
|
346
|
+
# @return [true,false]
|
347
|
+
def button_up(but=Wx::MOUSE_BTN_ANY) end
|
348
|
+
|
349
|
+
# Returns true if this was a dragging event (motion while a button is depressed).
|
350
|
+
#
|
351
|
+
# @see Wx::MouseEvent#moving
|
352
|
+
# @return [true,false]
|
353
|
+
def dragging; end
|
354
|
+
|
355
|
+
# Returns true if the mouse was entering the window.
|
356
|
+
#
|
357
|
+
# @see Wx::MouseEvent#leaving
|
358
|
+
# @return [true,false]
|
359
|
+
def entering; end
|
360
|
+
|
361
|
+
# Returns the mouse button which generated this event or {Wx::MOUSE_BTN_NONE} if no button is involved (for mouse move, enter or leave event, for example).
|
362
|
+
# Otherwise {Wx::MOUSE_BTN_LEFT} is returned for the left button down, up and double click events, {Wx::MOUSE_BTN_MIDDLE} and {Wx::MOUSE_BTN_RIGHT} for the same events for the middle and the right buttons respectively.
|
363
|
+
# @return [Integer]
|
364
|
+
def get_button; end
|
365
|
+
|
366
|
+
# Returns the number of mouse clicks for this event: 1 for a simple click, 2 for a double-click, 3 for a triple-click and so on.
|
367
|
+
# Currently this function is implemented only in {Wx::Mac} and returns -1 for the other platforms (you can still distinguish simple clicks from double-clicks as they generate different kinds of events however).
|
368
|
+
# @return [Integer]
|
369
|
+
def get_click_count; end
|
370
|
+
alias_method :click_count, :get_click_count
|
371
|
+
|
372
|
+
# Returns the configured number of lines (or whatever) to be scrolled per wheel action.
|
373
|
+
# Default value under most platforms is three.
|
374
|
+
# @see Wx::MouseEvent#get_columns_per_action
|
375
|
+
# @return [Integer]
|
376
|
+
def get_lines_per_action; end
|
377
|
+
alias_method :lines_per_action, :get_lines_per_action
|
378
|
+
|
379
|
+
# Returns the configured number of columns (or whatever) to be scrolled per wheel action.
|
380
|
+
# Default value under most platforms is three.
|
381
|
+
# @see Wx::MouseEvent#get_lines_per_action
|
382
|
+
# @return [Integer]
|
383
|
+
def get_columns_per_action; end
|
384
|
+
alias_method :columns_per_action, :get_columns_per_action
|
385
|
+
|
386
|
+
# Returns the logical mouse position in pixels (i.e. translated according to the translation set for the DC, which usually indicates that the window has been scrolled).
|
387
|
+
# @param dc [Wx::DC]
|
388
|
+
# @return [Wx::Point]
|
389
|
+
def get_logical_position(dc) end
|
390
|
+
alias_method :logical_position, :get_logical_position
|
391
|
+
|
392
|
+
# For magnify (pinch to zoom) events: returns the change in magnification.
|
393
|
+
# A value of 0 means no change, a positive value means we should enlarge (or zoom in), a negative value means we should shrink (or zoom out).
|
394
|
+
# This method is only valid to call for {Wx::EVT_MAGNIFY} events which are currently only generated under macOS.
|
395
|
+
# @see Wx::MouseEvent#magnify
|
396
|
+
# @return [Float]
|
397
|
+
def get_magnification; end
|
398
|
+
alias_method :magnification, :get_magnification
|
399
|
+
|
400
|
+
# Get wheel delta, normally 120.
|
401
|
+
# This is the threshold for action to be taken, and one such action (for example, scrolling one increment) should occur for each delta.
|
402
|
+
# @return [Integer]
|
403
|
+
def get_wheel_delta; end
|
404
|
+
alias_method :wheel_delta, :get_wheel_delta
|
405
|
+
|
406
|
+
# On Mac, has the user selected "Natural" scrolling in their System Preferences? Currently false on all other OS's.
|
407
|
+
# "Natural" scrolling means that content scrolling happens in the opposite direction, and if you are indeed scrolling content then you don't need to use this function because macOS has already inverted the scroll direction. But there can be special situations where you want the mouse wheel action to work always in the same direction and in that case you will need this function.
|
408
|
+
# @return [true,false]
|
409
|
+
def is_wheel_inverted; end
|
410
|
+
alias_method :wheel_inverted?, :is_wheel_inverted
|
411
|
+
|
412
|
+
# Get wheel rotation, positive or negative indicates direction of rotation.
|
413
|
+
# Current devices all send an event when rotation is at least +/-WheelDelta, but finer resolution devices can be created in the future.
|
414
|
+
# Because of this you shouldn't assume that one event is equal to 1 line, but you should be able to either do partial line scrolling or wait until several events accumulate before scrolling.
|
415
|
+
# @return [Integer]
|
416
|
+
def get_wheel_rotation; end
|
417
|
+
alias_method :wheel_rotation, :get_wheel_rotation
|
418
|
+
|
419
|
+
# Gets the axis the wheel operation concerns.
|
420
|
+
# Usually the mouse wheel is used to scroll vertically so {Wx::MouseWheelAxis::MOUSE_WHEEL_VERTICAL} is returned but some mice (and most trackpads) also allow to use the wheel to scroll horizontally in which case {Wx::MouseWheelAxis::MOUSE_WHEEL_HORIZONTAL} is returned.
|
421
|
+
# Notice that before wxWidgets 2.9.4 this method returned int.
|
422
|
+
# @return [MouseWheelAxis]
|
423
|
+
def get_wheel_axis; end
|
424
|
+
alias_method :wheel_axis, :get_wheel_axis
|
425
|
+
|
426
|
+
# Returns true if the event was a mouse button event (not necessarily a button down event - that may be tested using {Wx::MouseEvent#button_down}).
|
427
|
+
# @return [true,false]
|
428
|
+
def is_button; end
|
429
|
+
alias_method :button?, :is_button
|
430
|
+
|
431
|
+
# Returns true if the system has been setup to do page scrolling with the mouse wheel instead of line scrolling.
|
432
|
+
# @return [true,false]
|
433
|
+
def is_page_scroll; end
|
434
|
+
alias_method :page_scroll?, :is_page_scroll
|
435
|
+
|
436
|
+
# Returns true if the mouse was leaving the window.
|
437
|
+
#
|
438
|
+
# @see Wx::MouseEvent#entering.
|
439
|
+
# @return [true,false]
|
440
|
+
def leaving; end
|
441
|
+
|
442
|
+
# Returns true if the event was a left double click.
|
443
|
+
# @return [true,false]
|
444
|
+
def left_d_click; end
|
445
|
+
|
446
|
+
# Returns true if the left mouse button changed to down.
|
447
|
+
# @return [true,false]
|
448
|
+
def left_down; end
|
449
|
+
|
450
|
+
# Returns true if the left mouse button changed to up.
|
451
|
+
# @return [true,false]
|
452
|
+
def left_up; end
|
453
|
+
|
454
|
+
# Returns true if the event is a magnify (i.e. pinch to zoom) event.
|
455
|
+
# Such events are currently generated only under macOS.
|
456
|
+
# @see Wx::MouseEvent#get_magnification
|
457
|
+
# @return [true,false]
|
458
|
+
def magnify; end
|
459
|
+
|
460
|
+
# Returns true if the Meta key was down at the time of the event.
|
461
|
+
# @return [true,false]
|
462
|
+
def meta_down; end
|
463
|
+
|
464
|
+
# Returns true if the event was a middle double click.
|
465
|
+
# @return [true,false]
|
466
|
+
def middle_d_click; end
|
467
|
+
|
468
|
+
# Returns true if the middle mouse button changed to down.
|
469
|
+
# @return [true,false]
|
470
|
+
def middle_down; end
|
471
|
+
|
472
|
+
# Returns true if the middle mouse button changed to up.
|
473
|
+
# @return [true,false]
|
474
|
+
def middle_up; end
|
475
|
+
|
476
|
+
# Returns true if this was a motion event and no mouse buttons were pressed.
|
477
|
+
# If any mouse button is held pressed, then this method returns false and {Wx::MouseEvent#dragging} returns true.
|
478
|
+
# @return [true,false]
|
479
|
+
def moving; end
|
480
|
+
|
481
|
+
# Returns true if the event was a right double click.
|
482
|
+
# @return [true,false]
|
483
|
+
def right_d_click; end
|
484
|
+
|
485
|
+
# Returns true if the right mouse button changed to down.
|
486
|
+
# @return [true,false]
|
487
|
+
def right_down; end
|
488
|
+
|
489
|
+
# Returns true if the right mouse button changed to up.
|
490
|
+
# @return [true,false]
|
491
|
+
def right_up; end
|
492
|
+
|
493
|
+
# Returns the physical mouse position.
|
494
|
+
# @return [Wx::Point]
|
495
|
+
def get_position; end
|
496
|
+
alias_method :position, :get_position
|
497
|
+
|
498
|
+
# Returns X coordinate of the physical mouse event position.
|
499
|
+
# @return [Integer]
|
500
|
+
def get_x; end
|
501
|
+
alias_method :x, :get_x
|
502
|
+
|
503
|
+
# Returns Y coordinate of the physical mouse event position.
|
504
|
+
# @return [Integer]
|
505
|
+
def get_y; end
|
506
|
+
alias_method :y, :get_y
|
507
|
+
|
508
|
+
# Returns true if the left mouse button is currently down.
|
509
|
+
# @return [true,false]
|
510
|
+
def left_is_down; end
|
511
|
+
|
512
|
+
# Returns true if the middle mouse button is currently down.
|
513
|
+
# @return [true,false]
|
514
|
+
def middle_is_down; end
|
515
|
+
|
516
|
+
# Returns true if the right mouse button is currently down.
|
517
|
+
# @return [true,false]
|
518
|
+
def right_is_down; end
|
519
|
+
|
520
|
+
# Returns true if the first extra button mouse button is currently down.
|
521
|
+
# @return [true,false]
|
522
|
+
def aux1is_down; end
|
523
|
+
|
524
|
+
# Returns true if the second extra button mouse button is currently down.
|
525
|
+
# @return [true,false]
|
526
|
+
def aux2is_down; end
|
527
|
+
|
528
|
+
# @param x [Integer]
|
529
|
+
# @return [void]
|
530
|
+
def set_x(x) end
|
531
|
+
alias_method :x=, :set_x
|
532
|
+
|
533
|
+
# @param y [Integer]
|
534
|
+
# @return [void]
|
535
|
+
def set_y(y) end
|
536
|
+
alias_method :y=, :set_y
|
537
|
+
|
538
|
+
# @param pos [Array(Integer, Integer), Wx::Point]
|
539
|
+
# @return [void]
|
540
|
+
def set_position(pos) end
|
541
|
+
alias_method :position=, :set_position
|
542
|
+
|
543
|
+
# @param down [true,false]
|
544
|
+
# @return [void]
|
545
|
+
def set_left_down(down) end
|
546
|
+
alias_method :left_down=, :set_left_down
|
547
|
+
|
548
|
+
# @param down [true,false]
|
549
|
+
# @return [void]
|
550
|
+
def set_middle_down(down) end
|
551
|
+
alias_method :middle_down=, :set_middle_down
|
552
|
+
|
553
|
+
# @param down [true,false]
|
554
|
+
# @return [void]
|
555
|
+
def set_right_down(down) end
|
556
|
+
alias_method :right_down=, :set_right_down
|
557
|
+
|
558
|
+
# @param down [true,false]
|
559
|
+
# @return [void]
|
560
|
+
def set_aux1down(down) end
|
561
|
+
alias_method :aux1down=, :set_aux1down
|
562
|
+
|
563
|
+
# @param down [true,false]
|
564
|
+
# @return [void]
|
565
|
+
def set_aux2down(down) end
|
566
|
+
alias_method :aux2down=, :set_aux2down
|
567
|
+
|
568
|
+
# @param state [Wx::MouseState]
|
569
|
+
# @return [void]
|
570
|
+
def set_state(state) end
|
571
|
+
alias_method :state=, :set_state
|
572
|
+
|
573
|
+
end # MouseEvent
|
574
|
+
|
575
|
+
# A {Wx::SetCursorEvent} is generated from {Wx::Window} when the mouse cursor is about to be set as a result of mouse motion.
|
576
|
+
# This event gives the application the chance to perform specific mouse cursor processing based on the current position of the mouse within the window. Use {Wx::SetCursorEvent#set_cursor} to specify the cursor you want to be displayed.
|
577
|
+
# === Events using this class
|
578
|
+
#
|
579
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::SetCursorEvent} events.
|
580
|
+
# Event handler methods:
|
581
|
+
# - {Wx::EvtHandler#evt_set_cursor}(meth = nil, &block): Process a {Wx::EVT_SET_CURSOR} event.
|
582
|
+
#
|
583
|
+
# ===
|
584
|
+
#
|
585
|
+
# Category: {Wx::Events}
|
586
|
+
# @see Wx::SetCursor
|
587
|
+
# @see Wx::Window#set_cursor
|
588
|
+
#
|
589
|
+
#
|
590
|
+
class SetCursorEvent < Event
|
591
|
+
|
592
|
+
# Constructor, used by the library itself internally to initialize the event object.
|
593
|
+
# @param x [Integer]
|
594
|
+
# @param y [Integer]
|
595
|
+
# @return [SetCursorEvent]
|
596
|
+
def initialize(x=0, y=0) end
|
597
|
+
|
598
|
+
# Returns a reference to the cursor specified by this event.
|
599
|
+
# @return [void]
|
600
|
+
def get_cursor; end
|
601
|
+
alias_method :cursor, :get_cursor
|
602
|
+
|
603
|
+
# Returns the X coordinate of the mouse in client coordinates.
|
604
|
+
# @return [Integer]
|
605
|
+
def get_x; end
|
606
|
+
alias_method :x, :get_x
|
607
|
+
|
608
|
+
# Returns the Y coordinate of the mouse in client coordinates.
|
609
|
+
# @return [Integer]
|
610
|
+
def get_y; end
|
611
|
+
alias_method :y, :get_y
|
612
|
+
|
613
|
+
# Returns true if the cursor specified by this event is a valid cursor.
|
614
|
+
# You cannot specify {Wx::NULL_CURSOR} with this event, as it is not considered a valid cursor.
|
615
|
+
# @return [true,false]
|
616
|
+
def has_cursor; end
|
617
|
+
alias_method :has_cursor?, :has_cursor
|
618
|
+
|
619
|
+
# Sets the cursor associated with this event.
|
620
|
+
# @param cursor [Wx::Cursor]
|
621
|
+
# @return [void]
|
622
|
+
def set_cursor(cursor) end
|
623
|
+
alias_method :cursor=, :set_cursor
|
624
|
+
|
625
|
+
end # SetCursorEvent
|
626
|
+
|
627
|
+
# This is the base class for all supported gesture events.
|
628
|
+
# Gesture events are not generated by default, you must call {Wx::Window#enable_touch_events} with the appropriate parameter to request their generation.
|
629
|
+
#
|
630
|
+
# ===
|
631
|
+
#
|
632
|
+
# Category: {Wx::Events}
|
633
|
+
# @see Wx::PanGestureEvent
|
634
|
+
# @see Wx::ZoomGestureEvent
|
635
|
+
# @see Wx::RotateGestureEvent
|
636
|
+
#
|
637
|
+
#
|
638
|
+
class GestureEvent < Event
|
639
|
+
|
640
|
+
# Constructor.
|
641
|
+
# @param winid [Integer]
|
642
|
+
# @param type [Integer]
|
643
|
+
# @return [GestureEvent]
|
644
|
+
def initialize(winid=0, type=Wx::EVT_NULL) end
|
645
|
+
|
646
|
+
# Returns the position where the event took effect, in client coordinates: position of Pan event, center of zoom for Zoom event, center of rotation for Rotate event, center of box formed by 2 fingers for Two Finger Tap event and position of the pressed finger for Press and Tap Event.
|
647
|
+
# @return [Wx::Point]
|
648
|
+
def get_position; end
|
649
|
+
alias_method :position, :get_position
|
650
|
+
|
651
|
+
# Returns true if the event was the first in a gesture sequence.
|
652
|
+
# @return [true,false]
|
653
|
+
def is_gesture_start; end
|
654
|
+
alias_method :gesture_start?, :is_gesture_start
|
655
|
+
|
656
|
+
# Returns true if the event was the last in a gesture sequence.
|
657
|
+
# @return [true,false]
|
658
|
+
def is_gesture_end; end
|
659
|
+
alias_method :gesture_end?, :is_gesture_end
|
660
|
+
|
661
|
+
# Sets the position where the event took effect, in client coordinates: position of Pan event, center of zoom for Zoom event, center of rotation for Rotate event.
|
662
|
+
# @param pos [Array(Integer, Integer), Wx::Point]
|
663
|
+
# @return [void]
|
664
|
+
def set_position(pos) end
|
665
|
+
alias_method :position=, :set_position
|
666
|
+
|
667
|
+
# Sets the event to be the first in a gesture sequence.
|
668
|
+
# @param isStart [true,false]
|
669
|
+
# @return [void]
|
670
|
+
def set_gesture_start(isStart=true) end
|
671
|
+
alias_method :gesture_start=, :set_gesture_start
|
672
|
+
|
673
|
+
# Sets the event to be the last in a gesture sequence.
|
674
|
+
# @param isEnd [true,false]
|
675
|
+
# @return [void]
|
676
|
+
def set_gesture_end(isEnd=true) end
|
677
|
+
alias_method :gesture_end=, :set_gesture_end
|
678
|
+
|
679
|
+
end # GestureEvent
|
680
|
+
|
681
|
+
# This event is generated when the user moves a finger on the surface.
|
682
|
+
# {Wx::GTK} also generates this event during mouse dragging (mouse motion while a left mouse button is depressed).
|
683
|
+
# Note that OSX requires the primary mouse button to be pressed while performing the finger movement.
|
684
|
+
# === Events using this class
|
685
|
+
#
|
686
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::PanGestureEvent} events.
|
687
|
+
# Event handler methods:
|
688
|
+
# - {Wx::EvtHandler#evt_gesture_pan}(id, meth = nil, &block): Process a {Wx::EVT_GESTURE_PAN}.
|
689
|
+
#
|
690
|
+
# ===
|
691
|
+
#
|
692
|
+
# Category: {Wx::Events}
|
693
|
+
#
|
694
|
+
class PanGestureEvent < GestureEvent
|
695
|
+
|
696
|
+
# Constructor.
|
697
|
+
# @param winid [Integer]
|
698
|
+
# @return [PanGestureEvent]
|
699
|
+
def initialize(winid=0) end
|
700
|
+
|
701
|
+
# Returns the distance covered since the previous panning event.
|
702
|
+
# @return [Wx::Point]
|
703
|
+
def get_delta; end
|
704
|
+
alias_method :delta, :get_delta
|
705
|
+
|
706
|
+
# Sets the distance covered since the previous panning event.
|
707
|
+
# @param delta [Array(Integer, Integer), Wx::Point]
|
708
|
+
# @return [void]
|
709
|
+
def set_delta(delta) end
|
710
|
+
alias_method :delta=, :set_delta
|
711
|
+
|
712
|
+
end # PanGestureEvent
|
713
|
+
|
714
|
+
# This event is generated when two fingers pinch the surface to zoom in or out.
|
715
|
+
# === Events using this class
|
716
|
+
#
|
717
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::ZoomGestureEvent} events.
|
718
|
+
# Event handler methods:
|
719
|
+
# - {Wx::EvtHandler#evt_gesture_zoom}(id, meth = nil, &block): Process a {Wx::EVT_GESTURE_ZOOM}.
|
720
|
+
#
|
721
|
+
# ===
|
722
|
+
#
|
723
|
+
# Category: {Wx::Events}
|
724
|
+
#
|
725
|
+
class ZoomGestureEvent < GestureEvent
|
726
|
+
|
727
|
+
# Constructor.
|
728
|
+
# @param windid [Integer]
|
729
|
+
# @return [ZoomGestureEvent]
|
730
|
+
def initialize(windid=0) end
|
731
|
+
|
732
|
+
# Returns the zoom Factor since the gesture started.
|
733
|
+
# Hence, starting of the gesture is considered as 1:1. A value greater than 1.0 means we should enlarge (or zoom in), a value less than 1.0 means we should shrink (or zoom out).
|
734
|
+
# @return [Float]
|
735
|
+
def get_zoom_factor; end
|
736
|
+
alias_method :zoom_factor, :get_zoom_factor
|
737
|
+
|
738
|
+
# Sets the zoom Factor.
|
739
|
+
# @param zoomFactor [Float]
|
740
|
+
# @return [void]
|
741
|
+
def set_zoom_factor(zoomFactor) end
|
742
|
+
alias_method :zoom_factor=, :set_zoom_factor
|
743
|
+
|
744
|
+
end # ZoomGestureEvent
|
745
|
+
|
746
|
+
# This event is generated when two fingers move in opposite directions on the surface.
|
747
|
+
# === Events using this class
|
748
|
+
#
|
749
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::RotateGestureEvent} events.
|
750
|
+
# Event handler methods:
|
751
|
+
# - {Wx::EvtHandler#evt_gesture_rotate}(id, meth = nil, &block): Process a {Wx::EVT_GESTURE_ROTATE}.
|
752
|
+
#
|
753
|
+
# ===
|
754
|
+
#
|
755
|
+
# Category: {Wx::Events}
|
756
|
+
#
|
757
|
+
class RotateGestureEvent < GestureEvent
|
758
|
+
|
759
|
+
# Constructor.
|
760
|
+
# @param windid [Integer]
|
761
|
+
# @return [RotateGestureEvent]
|
762
|
+
def initialize(windid=0) end
|
763
|
+
|
764
|
+
# Returns the total angle of rotation in radians in clockwise direction since the gesture was first started i.e.
|
765
|
+
# when {Wx::RotateGestureEvent#is_gesture_start} returned true. This value is always greater than or equal to zero.
|
766
|
+
# @return [Float]
|
767
|
+
def get_rotation_angle; end
|
768
|
+
alias_method :rotation_angle, :get_rotation_angle
|
769
|
+
|
770
|
+
# Sets the total angle of rotation in radians in clockwise direction since the gesture was first started i.e.
|
771
|
+
# when {Wx::RotateGestureEvent#is_gesture_start} returned true. This value is always greater than or equal to zero.
|
772
|
+
# @param rotationAngle [Float]
|
773
|
+
# @return [void]
|
774
|
+
def set_rotation_angle(rotationAngle) end
|
775
|
+
alias_method :rotation_angle=, :set_rotation_angle
|
776
|
+
|
777
|
+
end # RotateGestureEvent
|
778
|
+
|
779
|
+
# This event is generated when two fingers touch the surface at the same time.
|
780
|
+
# === Events using this class
|
781
|
+
#
|
782
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::TwoFingerTapEvent} events.
|
783
|
+
# Event handler methods:
|
784
|
+
# - {Wx::EvtHandler#evt_two_finger_tap}(id, meth = nil, &block): Process a {Wx::EVT_TWO_FINGER_TAP}.
|
785
|
+
#
|
786
|
+
# ===
|
787
|
+
#
|
788
|
+
# Category: {Wx::Events}
|
789
|
+
#
|
790
|
+
class TwoFingerTapEvent < GestureEvent
|
791
|
+
|
792
|
+
# Constructor.
|
793
|
+
# @param windid [Integer]
|
794
|
+
# @return [TwoFingerTapEvent]
|
795
|
+
def initialize(windid=0) end
|
796
|
+
|
797
|
+
end # TwoFingerTapEvent
|
798
|
+
|
799
|
+
# This event is generated when one finger touches the surface and remains stationary.
|
800
|
+
# Note that currently it is only generated under {Wx::GTK} and {Wx::OSX}.
|
801
|
+
# {Wx::GTK} also generates this event when left mouse button is being pressed for some minimum duration of time.
|
802
|
+
# === Events using this class
|
803
|
+
#
|
804
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::LongPressEvent} events.
|
805
|
+
# Event handler methods:
|
806
|
+
# - {Wx::EvtHandler#evt_long_press}(id, meth = nil, &block): Process a {Wx::EVT_LONG_PRESS}.
|
807
|
+
#
|
808
|
+
# ===
|
809
|
+
#
|
810
|
+
# Category: {Wx::Events}
|
811
|
+
#
|
812
|
+
class LongPressEvent < GestureEvent
|
813
|
+
|
814
|
+
# Constructor.
|
815
|
+
# @param windid [Integer]
|
816
|
+
# @return [LongPressEvent]
|
817
|
+
def initialize(windid=0) end
|
818
|
+
|
819
|
+
end # LongPressEvent
|
820
|
+
|
821
|
+
# This event is generated when the user press the surface with one finger and taps with another.
|
822
|
+
# Note that once started the event will also be generated when the finger that was pressed moves on surface.
|
823
|
+
# === Events using this class
|
824
|
+
#
|
825
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::PressAndTapEvent} events.
|
826
|
+
# Event handler methods:
|
827
|
+
# - {Wx::EvtHandler#evt_press_and_tap}(id, meth = nil, &block): Process a {Wx::EVT_PRESS_AND_TAP}.
|
828
|
+
#
|
829
|
+
# ===
|
830
|
+
#
|
831
|
+
# Category: {Wx::Events}
|
832
|
+
#
|
833
|
+
class PressAndTapEvent < GestureEvent
|
834
|
+
|
835
|
+
# Constructor.
|
836
|
+
# @param windid [Integer]
|
837
|
+
# @return [PressAndTapEvent]
|
838
|
+
def initialize(windid=0) end
|
839
|
+
|
840
|
+
end # PressAndTapEvent
|
841
|
+
|
842
|
+
# This event class contains information about key press and release events.
|
843
|
+
# The main information carried by this event is the key being pressed or released. It can be accessed using one of {Wx::KeyEvent#get_unicode_key}, {Wx::KeyEvent#get_key_code} or {Wx::KeyEvent#get_raw_key_code} functions. For the printable characters, {Wx::KeyEvent#get_unicode_key} should be used as it works for any keys, including non-Latin-1 characters that can be entered when using national keyboard layouts. {Wx::KeyEvent#get_key_code} should be used to handle special characters (such as cursor arrows keys or HOME or INS and so on) which correspond to {Wx::KeyCode} enum elements above the WXK_START constant. While {Wx::KeyEvent#get_key_code} also returns the character code for Latin-1 keys for compatibility, it doesn't work for Unicode characters in general and will return WXK_NONE for any non-Latin-1 ones. If both {Wx::KeyEvent#get_unicode_key} and {Wx::KeyEvent#get_key_code} return WXK_NONE then the key has no WXK_xxx mapping and {Wx::KeyEvent#get_raw_key_code} can be used to distinguish between keys, but raw key codes are platform specific. For these reasons, it is recommended to always use {Wx::KeyEvent#get_unicode_key} and only fall back to {Wx::KeyEvent#get_key_code} if {Wx::KeyEvent#get_unicode_key} returned WXK_NONE, meaning that the event corresponds to a non-printable special keys, then optionally check {Wx::KeyEvent#get_raw_key_code} if {Wx::KeyEvent#get_key_code} also returned WXK_NONE or simply ignore that key.
|
844
|
+
# While these three functions can be used with the events of {Wx::EVT_KEY_DOWN}, {Wx::EVT_KEY_UP} and {Wx::EVT_CHAR} types, the values returned by them are different for the first two events and the last one. For the latter, the key returned corresponds to the character that would appear in e.g. a text zone if the user pressed the key in it. As such, its value depends on the current state of the Shift key and, for the letters, on the state of Caps Lock modifier. For example, if A key is pressed without Shift being held down, {Wx::KeyEvent} of type {Wx::EVT_CHAR} generated for this key press will return (from either {Wx::KeyEvent#get_key_code} or {Wx::KeyEvent#get_unicode_key} as their meanings coincide for ASCII characters) key code of 97 corresponding the ASCII value of a. And if the same key is pressed but with Shift being held (or Caps Lock being active), then the key could would be 65, i.e. ASCII value of capital A.
|
845
|
+
# However for the key down and up events the returned key code will instead be A independently of the state of the modifier keys i.e. it depends only on physical key being pressed and is not translated to its logical representation using the current keyboard state. Such untranslated key codes are defined as follows:
|
846
|
+
# - For the letters they correspond to the upper case value of the letter.- For the other alphanumeric keys (e.g. 7 or <code>+</code>), the untranslated key code corresponds to the character produced by the key when it is pressed without Shift. E.g. in standard US keyboard layout the untranslated key code for the key <code>=/+</code> in the upper right corner of the keyboard is 61 which is the ASCII value of <code>=</code>.- For the rest of the keys (i.e. special non-printable keys) it is the same as the normal key code as no translation is used anyhow.
|
847
|
+
#
|
848
|
+
# Notice that the first rule applies to all Unicode letters, not just the usual Latin-1 ones. However for non-Latin-1 letters only {Wx::KeyEvent#get_unicode_key} can be used to retrieve the key code as {Wx::KeyEvent#get_key_code} just returns WXK_NONE in this case.
|
849
|
+
# Also, note that {Wx::EVT_CHAR} events are not generated for keys which do not have a wxWidgets mapping, so {Wx::KeyEvent#get_raw_key_code} should never be required for this event.
|
850
|
+
# To summarize: you should handle {Wx::EVT_CHAR} if you need the translated key and {Wx::EVT_KEY_DOWN} if you only need the value of the key itself, independent of the current keyboard state.
|
851
|
+
# Not all key down events may be generated by the user. As an example, {Wx::EVT_KEY_DOWN} with <code>=</code> key code can be generated using the standard US keyboard layout but not using the German one because the <code>=</code> key corresponds to Shift-0 key combination in this layout and the key code for it is 0, not <code>=</code>. Because of this you should avoid requiring your users to type key events that might be impossible to enter on their keyboard.
|
852
|
+
#
|
853
|
+
# Another difference between key and char events is that another kind of translation is done for the latter ones when the Control key is pressed: char events for ASCII letters in this case carry codes corresponding to the ASCII value of Ctrl-Latter, i.e. 1 for Ctrl-A, 2 for Ctrl-B and so on until 26 for Ctrl-Z. This is convenient for terminal-like applications and can be completely ignored by all the other ones (if you need to handle Ctrl-A it is probably a better idea to use the key event rather than the char one). Notice that currently no translation is done for the presses of <code></code>[, <code>\</code>, <code></code>], <code>^</code> and _ keys which might be mapped to ASCII values from 27 to 31. Since version 2.9.2, the enum values WXK_CONTROL_A - WXK_CONTROL_Z can be used instead of the non-descriptive constant values 1-26.
|
854
|
+
# Finally, modifier keys only generate key events but no char events at all. The modifiers keys are WXK_SHIFT, WXK_CONTROL, WXK_ALT and various WXK_WINDOWS_XXX from {Wx::KeyCode} enum.
|
855
|
+
# Modifier keys events are special in one additional aspect: usually the keyboard state associated with a key press is well defined, e.g. {Wx::KeyboardState#shift_down} returns true only if the Shift key was held pressed when the key that generated this event itself was pressed. There is an ambiguity for the key press events for Shift key itself however. By convention, it is considered to be already pressed when it is pressed and already released when it is released. In other words, {Wx::EVT_KEY_DOWN} event for the Shift key itself will have {Wx::KeyModifier::MOD_SHIFT} in {Wx::KeyEvent#get_modifiers} and {Wx::KeyEvent#shift_down} will return true while the {Wx::EVT_KEY_UP} event for Shift itself will not have {Wx::KeyModifier::MOD_SHIFT} in its modifiers and {Wx::KeyEvent#shift_down} will return false.
|
856
|
+
# <b>Tip:</b> You may discover the key codes and modifiers generated by all the keys on your system interactively by running the Key Event Sample wxWidgets sample and pressing some keys in it.
|
857
|
+
# If a key down (EVT_KEY_DOWN) event is caught and the event handler does not call <code>event.Skip()</code> then the corresponding char event (EVT_CHAR) will not happen. This is by design and enables the programs that handle both types of events to avoid processing the same key twice. As a consequence, if you do not want to suppress the {Wx::EVT_CHAR} events for the keys you handle, always call <code>event.Skip()</code> in your {Wx::EVT_KEY_DOWN} handler. Not doing may also prevent accelerators defined using this key from working.
|
858
|
+
#
|
859
|
+
# If a key is maintained in a pressed state, you will typically get a lot of (automatically generated) key down events but only one key up one at the end when the key is released so it is wrong to assume that there is one up event corresponding to each down one.
|
860
|
+
#
|
861
|
+
# For Windows programmers: The key and char events in wxWidgets are similar to but slightly different from Windows WM_KEYDOWN and WM_CHAR events. In particular, Alt-x combination will generate a char event in wxWidgets (unless it is used as an accelerator) and almost all keys, including ones without ASCII equivalents, generate char events too.
|
862
|
+
#
|
863
|
+
# === Events using this class
|
864
|
+
#
|
865
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::KeyEvent} events.
|
866
|
+
# Event handler methods:
|
867
|
+
# - {Wx::EvtHandler#evt_key_down}(meth = nil, &block): Process a {Wx::EVT_KEY_DOWN} event (any key has been pressed). If this event is handled and not skipped, {Wx::EVT_CHAR} will not be generated at all for this key press (but {Wx::EVT_KEY_UP} will be).
|
868
|
+
# - {Wx::EvtHandler#evt_key_up}(meth = nil, &block): Process a {Wx::EVT_KEY_UP} event (any key has been released).
|
869
|
+
# - {Wx::EvtHandler#evt_char}(meth = nil, &block): Process a {Wx::EVT_CHAR} event.
|
870
|
+
# - {Wx::EvtHandler#evt_char_hook}(meth = nil, &block): Process a {Wx::EVT_CHAR_HOOK} event. Unlike all the other key events, this event is propagated upwards the window hierarchy which allows intercepting it in the parent window of the focused window to which it is sent initially (if there is no focused window, this event is sent to the {Wx::App} global object). It is also generated before any other key events and so gives the parent window an opportunity to modify the keyboard handling of its children, e.g. it is used internally by wxWidgets in some ports to intercept pressing Esc key in any child of a dialog to close the dialog itself when it's pressed. By default, if this event is handled, i.e. the handler doesn't call {Wx::Event#skip}, neither {Wx::EVT_KEY_DOWN} nor {Wx::EVT_CHAR} events will be generated (although {Wx::EVT_KEY_UP} still will be), i.e. it replaces the normal key events. However by calling the special {Wx::KeyEvent#do_allow_next_event} method you can handle {Wx::EVT_CHAR_HOOK} and still allow normal events generation. This is something that is rarely useful but can be required if you need to prevent a parent {Wx::EVT_CHAR_HOOK} handler from running without suppressing the normal key events. Finally notice that this event is not generated when the mouse is captured as it is considered that the window which has the capture should receive all the keyboard events too without allowing its parent {Wx::TopLevelWindow} to interfere with their processing.
|
871
|
+
#
|
872
|
+
# ===
|
873
|
+
#
|
874
|
+
# Category: {Wx::Events}
|
875
|
+
# @see Wx::KeyboardState
|
876
|
+
#
|
877
|
+
#
|
878
|
+
class KeyEvent < Event
|
879
|
+
|
880
|
+
# Obtains the position (in client coordinates) at which the key was pressed.
|
881
|
+
# Notice that under most platforms this position is simply the current mouse pointer position and has no special relationship to the key event itself.
|
882
|
+
# x and y may be NULL if the corresponding coordinate is not needed.
|
883
|
+
# @return [Wx::Point]
|
884
|
+
def get_position; end
|
885
|
+
alias_method :position, :get_position
|
886
|
+
|
887
|
+
# Constructor.
|
888
|
+
# Currently, the only valid event types are {Wx::EVT_CHAR} and {Wx::EVT_CHAR_HOOK}.
|
889
|
+
# @param keyEventType [Integer]
|
890
|
+
# @return [KeyEvent]
|
891
|
+
def initialize(keyEventType=Wx::EVT_NULL) end
|
892
|
+
|
893
|
+
# Returns the key code of the key that generated this event.
|
894
|
+
# ASCII symbols return normal ASCII values, while events from special keys such as "left cursor arrow" (WXK_LEFT) return values outside of the ASCII range. See {Wx::KeyCode} for a full list of the virtual key codes.
|
895
|
+
# Note that this method returns a meaningful value only for special non-alphanumeric keys or if the user entered a Latin-1 character (this includes ASCII and the accented letters found in Western European languages but not letters of other alphabets such as e.g. Cyrillic). Otherwise it simply method returns WXK_NONE and {Wx::KeyEvent#get_unicode_key} should be used to obtain the corresponding Unicode character.
|
896
|
+
# Using {Wx::KeyEvent#get_unicode_key} is in general the right thing to do if you are interested in the characters typed by the user, {Wx::KeyEvent#get_key_code} should be only used for special keys (for which {Wx::KeyEvent#get_unicode_key} returns WXK_NONE). To handle both kinds of keys you might write:
|
897
|
+
#
|
898
|
+
# void MyHandler::OnChar(wxKeyEvent& event)
|
899
|
+
# {
|
900
|
+
# wxChar uc = event.GetUnicodeKey();
|
901
|
+
# if ( uc != WXK_NONE )
|
902
|
+
# {
|
903
|
+
# // It's a "normal" character. Notice that this includes
|
904
|
+
# // control characters in 1..31 range, e.g. WXK_RETURN or
|
905
|
+
# // WXK_BACK, so check for them explicitly.
|
906
|
+
# if ( uc >= 32 )
|
907
|
+
# {
|
908
|
+
# wxLogMessage("You pressed '%c'", uc);
|
909
|
+
# }
|
910
|
+
# else
|
911
|
+
# {
|
912
|
+
# // It's a control character
|
913
|
+
# ...
|
914
|
+
# }
|
915
|
+
# }
|
916
|
+
# else // No Unicode equivalent.
|
917
|
+
# {
|
918
|
+
# // It's a special key, deal with all the known ones:
|
919
|
+
# switch ( event.GetKeyCode() )
|
920
|
+
# {
|
921
|
+
# case WXK_LEFT:
|
922
|
+
# case WXK_RIGHT:
|
923
|
+
# ... move cursor ...
|
924
|
+
# break;
|
925
|
+
#
|
926
|
+
# case WXK_F1:
|
927
|
+
# ... give help ...
|
928
|
+
# break;
|
929
|
+
# }
|
930
|
+
# }
|
931
|
+
# }
|
932
|
+
# @return [Integer]
|
933
|
+
def get_key_code; end
|
934
|
+
alias_method :key_code, :get_key_code
|
935
|
+
|
936
|
+
# Returns true if the key is in the given key category.
|
937
|
+
# @param category [Integer] A bitwise combination of named {Wx::KeyCategoryFlags} constants.
|
938
|
+
# @return [true,false]
|
939
|
+
def is_key_in_category(category) end
|
940
|
+
alias_method :key_in_category?, :is_key_in_category
|
941
|
+
|
942
|
+
# Returns true if this event is an auto-repeat of the key, false if this is the initial key press.
|
943
|
+
# @return [true,false]
|
944
|
+
def is_auto_repeat; end
|
945
|
+
alias_method :auto_repeat?, :is_auto_repeat
|
946
|
+
|
947
|
+
# Returns the raw key code for this event.
|
948
|
+
# The flags are platform-dependent and should only be used if the functionality provided by other {Wx::KeyEvent} methods is insufficient.
|
949
|
+
# Under MSW, the raw key code is the value of wParam parameter of the corresponding message.
|
950
|
+
# Under GTK, the raw key code is the keyval field of the corresponding GDK event.
|
951
|
+
# Under macOS, the raw key code is the keyCode field of the corresponding NSEvent.
|
952
|
+
# Currently the raw key codes are not supported by all ports, use #ifdef {Wx::HAS_RAW_KEY_CODES} to determine if this feature is available.
|
953
|
+
# @return [Integer]
|
954
|
+
def get_raw_key_code; end
|
955
|
+
alias_method :raw_key_code, :get_raw_key_code
|
956
|
+
|
957
|
+
# Returns the low level key flags for this event.
|
958
|
+
# The flags are platform-dependent and should only be used if the functionality provided by other {Wx::KeyEvent} methods is insufficient.
|
959
|
+
# Under MSW, the raw flags are just the value of lParam parameter of the corresponding message.
|
960
|
+
# Under GTK, the raw flags contain the hardware_keycode field of the corresponding GDK event.
|
961
|
+
# Under macOS, the raw flags contain the modifiers state.
|
962
|
+
# Currently the raw key flags are not supported by all ports, use #ifdef {Wx::HAS_RAW_KEY_CODES} to determine if this feature is available.
|
963
|
+
# @return [Integer]
|
964
|
+
def get_raw_key_flags; end
|
965
|
+
alias_method :raw_key_flags, :get_raw_key_flags
|
966
|
+
|
967
|
+
# Returns the Unicode character corresponding to this key event.
|
968
|
+
# If the key pressed doesn't have any character value (e.g. a cursor key) this method will return WXK_NONE. In this case you should use {Wx::KeyEvent#get_key_code} to retrieve the value of the key.
|
969
|
+
# This function is only available in Unicode build, i.e. when {Wx::Setup::USE_UNICODE} is 1.
|
970
|
+
# @return [String]
|
971
|
+
def get_unicode_key; end
|
972
|
+
alias_method :unicode_key, :get_unicode_key
|
973
|
+
|
974
|
+
# Returns the X position (in client coordinates) of the event.
|
975
|
+
#
|
976
|
+
# @see Wx::KeyEvent#get_position
|
977
|
+
# @return [Integer]
|
978
|
+
def get_x; end
|
979
|
+
alias_method :x, :get_x
|
980
|
+
|
981
|
+
# Returns the Y position (in client coordinates) of the event.
|
982
|
+
#
|
983
|
+
# @see Wx::KeyEvent#get_position
|
984
|
+
# @return [Integer]
|
985
|
+
def get_y; end
|
986
|
+
alias_method :y, :get_y
|
987
|
+
|
988
|
+
# Allow normal key events generation.
|
989
|
+
# Can be called from {Wx::EVT_CHAR_HOOK} handler to indicate that the generation of normal events should not be suppressed, as it happens by default when this event is handled.
|
990
|
+
# The intended use of this method is to allow some window object to prevent {Wx::EVT_CHAR_HOOK} handler in its parent window from running by defining its own handler for this event. Without calling this method, this would result in not generating {Wx::EVT_KEY_DOWN} nor {Wx::EVT_CHAR} events at all but by calling it you can ensure that these events would still be generated, even if {Wx::EVT_CHAR_HOOK} event was handled.
|
991
|
+
# @return [void]
|
992
|
+
def do_allow_next_event; end
|
993
|
+
|
994
|
+
# Returns true if {Wx::KeyEvent#do_allow_next_event} had been called, false by default.
|
995
|
+
# This method is used by wxWidgets itself to determine whether the normal key events should be generated after {Wx::EVT_CHAR_HOOK} processing.
|
996
|
+
# @return [true,false]
|
997
|
+
def is_next_event_allowed; end
|
998
|
+
alias_method :next_event_allowed?, :is_next_event_allowed
|
999
|
+
|
1000
|
+
# Return the bit mask of all pressed modifier keys.
|
1001
|
+
# The return value is a combination of {Wx::KeyModifier::MOD_ALT}, {Wx::KeyModifier::MOD_CONTROL}, {Wx::KeyModifier::MOD_SHIFT} and {Wx::KeyModifier::MOD_META} bit masks. Additionally, {Wx::KeyModifier::MOD_NONE} is defined as 0, i.e. corresponds to no modifiers (see {Wx::KeyEvent#has_any_modifiers}) and {Wx::KeyModifier::MOD_CMD} is either {Wx::KeyModifier::MOD_CONTROL} (MSW and Unix) or {Wx::KeyModifier::MOD_META} (Mac), see {Wx::KeyEvent#cmd_down}. See {Wx::KeyModifier} for the full list of modifiers.
|
1002
|
+
# Notice that this function is easier to use correctly than, for example, {Wx::KeyEvent#control_down} because when using the latter you also have to remember to test that none of the other modifiers is pressed:
|
1003
|
+
#
|
1004
|
+
# if ( ControlDown() && !AltDown() && !ShiftDown() && !MetaDown() )
|
1005
|
+
# ... handle Ctrl-XXX ...
|
1006
|
+
#
|
1007
|
+
# and forgetting to do it can result in serious program bugs (e.g. program not working with European keyboard layout where AltGr key which is seen by the program as combination of CTRL and ALT is used). On the other hand, you can simply write:
|
1008
|
+
#
|
1009
|
+
# if ( GetModifiers() == wxMOD_CONTROL )
|
1010
|
+
# ... handle Ctrl-XXX ...
|
1011
|
+
#
|
1012
|
+
# with this function.
|
1013
|
+
# @return [Integer]
|
1014
|
+
def get_modifiers; end
|
1015
|
+
alias_method :modifiers, :get_modifiers
|
1016
|
+
|
1017
|
+
# Returns true if any modifiers at all are pressed.
|
1018
|
+
# This is equivalent to <code>Wx::KeyEvent#get_modifiers</code> <code>!=</code> {Wx::KeyModifier::MOD_NONE}.
|
1019
|
+
# Notice that this is different from {Wx::KeyEvent#has_modifiers} method which doesn't take e.g. Shift modifier into account. This method is most suitable for mouse events when any modifier, including Shift, can change the interpretation of the event.
|
1020
|
+
# @return [true,false]
|
1021
|
+
def has_any_modifiers; end
|
1022
|
+
alias_method :has_any_modifiers?, :has_any_modifiers
|
1023
|
+
|
1024
|
+
# Returns true if Control or Alt are pressed.
|
1025
|
+
# Checks if Control, Alt or, under macOS only, Command key are pressed (notice that the real Control key is still taken into account under OS X too).
|
1026
|
+
# This method returns false if only Shift is pressed for compatibility reasons and also because pressing Shift usually doesn't change the interpretation of key events, see {Wx::KeyEvent#has_any_modifiers} if you want to take Shift into account as well.
|
1027
|
+
# @return [true,false]
|
1028
|
+
def has_modifiers; end
|
1029
|
+
alias_method :has_modifiers?, :has_modifiers
|
1030
|
+
|
1031
|
+
# Returns true if the Control key or Apple/Command key under macOS is pressed.
|
1032
|
+
# This function doesn't distinguish between right and left control keys.
|
1033
|
+
# Notice that {Wx::KeyEvent#get_modifiers} should usually be used instead of this one.
|
1034
|
+
# @return [true,false]
|
1035
|
+
def control_down; end
|
1036
|
+
|
1037
|
+
# Returns true if the Control key (also under macOS).
|
1038
|
+
# This function doesn't distinguish between right and left control keys.
|
1039
|
+
# Notice that {Wx::KeyEvent#get_modifiers} should usually be used instead of this one.
|
1040
|
+
# @return [true,false]
|
1041
|
+
def raw_control_down; end
|
1042
|
+
|
1043
|
+
# Returns true if the Shift key is pressed.
|
1044
|
+
# This function doesn't distinguish between right and left shift keys.
|
1045
|
+
# Notice that {Wx::KeyEvent#get_modifiers} should usually be used instead of this one.
|
1046
|
+
# @return [true,false]
|
1047
|
+
def shift_down; end
|
1048
|
+
|
1049
|
+
# Returns true if the Meta/Windows/Apple key is pressed.
|
1050
|
+
# This function tests the state of the key traditionally called Meta under Unix systems, Windows keys under MSW Notice that {Wx::KeyEvent#get_modifiers} should usually be used instead of this one.
|
1051
|
+
# @see Wx::KeyEvent#cmd_down
|
1052
|
+
# @return [true,false]
|
1053
|
+
def meta_down; end
|
1054
|
+
|
1055
|
+
# Returns true if the Alt key is pressed.
|
1056
|
+
# Notice that {Wx::KeyEvent#get_modifiers} should usually be used instead of this one.
|
1057
|
+
# @return [true,false]
|
1058
|
+
def alt_down; end
|
1059
|
+
|
1060
|
+
# Returns true if the key used for command accelerators is pressed.
|
1061
|
+
# Same as {Wx::KeyEvent#control_down}. Deprecated.
|
1062
|
+
# Notice that {Wx::KeyEvent#get_modifiers} should usually be used instead of this one.
|
1063
|
+
# @return [true,false]
|
1064
|
+
def cmd_down; end
|
1065
|
+
|
1066
|
+
# @param down [true,false]
|
1067
|
+
# @return [void]
|
1068
|
+
def set_control_down(down) end
|
1069
|
+
alias_method :control_down=, :set_control_down
|
1070
|
+
|
1071
|
+
# @param down [true,false]
|
1072
|
+
# @return [void]
|
1073
|
+
def set_raw_control_down(down) end
|
1074
|
+
alias_method :raw_control_down=, :set_raw_control_down
|
1075
|
+
|
1076
|
+
# @param down [true,false]
|
1077
|
+
# @return [void]
|
1078
|
+
def set_shift_down(down) end
|
1079
|
+
alias_method :shift_down=, :set_shift_down
|
1080
|
+
|
1081
|
+
# @param down [true,false]
|
1082
|
+
# @return [void]
|
1083
|
+
def set_alt_down(down) end
|
1084
|
+
alias_method :alt_down=, :set_alt_down
|
1085
|
+
|
1086
|
+
# @param down [true,false]
|
1087
|
+
# @return [void]
|
1088
|
+
def set_meta_down(down) end
|
1089
|
+
alias_method :meta_down=, :set_meta_down
|
1090
|
+
|
1091
|
+
end # KeyEvent
|
1092
|
+
|
1093
|
+
# A size event holds information about size change events of {Wx::Window}.
|
1094
|
+
# The EVT_SIZE handler function will be called when the window has been resized.
|
1095
|
+
# You may wish to use this for frames to resize their child windows as appropriate.
|
1096
|
+
# Note that the size passed is of the whole window: call {Wx::Window#get_client_size} for the area which may be used by the application.
|
1097
|
+
# When a window is resized, usually only a small part of the window is damaged and you may only need to repaint that area. However, if your drawing depends on the size of the window, you may need to clear the DC explicitly and repaint the whole window. In which case, you may need to call {Wx::Window#refresh} to invalidate the entire window.
|
1098
|
+
# <b>Important</b> : Sizers ( see Sizers Overview ) rely on size events to function correctly. Therefore, in a sizer-based layout, do not forget to call Skip on all size events you catch (and don't catch size events at all when you don't need to).
|
1099
|
+
# === Events using this class
|
1100
|
+
#
|
1101
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::SizeEvent} events.
|
1102
|
+
# Event handler methods:
|
1103
|
+
# - {Wx::EvtHandler#evt_size}(meth = nil, &block): Process a {Wx::EVT_SIZE} event.
|
1104
|
+
#
|
1105
|
+
# ===
|
1106
|
+
#
|
1107
|
+
# Category: {Wx::Events}
|
1108
|
+
# @see Wx::Size
|
1109
|
+
# @see Events and Event Handling
|
1110
|
+
#
|
1111
|
+
#
|
1112
|
+
class SizeEvent < Event
|
1113
|
+
|
1114
|
+
# Constructor.
|
1115
|
+
# @param sz [Array(Integer, Integer), Wx::Size]
|
1116
|
+
# @param id [Integer]
|
1117
|
+
# @return [SizeEvent]
|
1118
|
+
def initialize(sz, id=0) end
|
1119
|
+
|
1120
|
+
# Returns the entire size of the window generating the size change event.
|
1121
|
+
# This is the new total size of the window, i.e. the same size as would be returned by {Wx::Window#get_size} if it were called now. Use {Wx::Window#get_client_size} if you catch this event in a top level window such as {Wx::Frame} to find the size available for the window contents.
|
1122
|
+
# @return [Wx::Size]
|
1123
|
+
def get_size; end
|
1124
|
+
alias_method :size, :get_size
|
1125
|
+
|
1126
|
+
# @param size [Wx::Size]
|
1127
|
+
# @return [void]
|
1128
|
+
def set_size(size) end
|
1129
|
+
alias_method :size=, :set_size
|
1130
|
+
|
1131
|
+
# @return [Wx::Rect]
|
1132
|
+
def get_rect; end
|
1133
|
+
alias_method :rect, :get_rect
|
1134
|
+
|
1135
|
+
# @param rect [Wx::Rect]
|
1136
|
+
# @return [void]
|
1137
|
+
def set_rect(rect) end
|
1138
|
+
alias_method :rect=, :set_rect
|
1139
|
+
|
1140
|
+
end # SizeEvent
|
1141
|
+
|
1142
|
+
# A move event holds information about window position change.
|
1143
|
+
# These events are currently generated for top level (see {Wx::TopLevelWindow}) windows in all ports, but are not generated for the child windows in {Wx::GTK}.
|
1144
|
+
# === Events using this class
|
1145
|
+
#
|
1146
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::MoveEvent} events.
|
1147
|
+
# Event handler methods:
|
1148
|
+
# - {Wx::EvtHandler#evt_move}(meth = nil, &block): Process a {Wx::EVT_MOVE} event, which is generated when a window is moved.
|
1149
|
+
# - {Wx::EvtHandler#evt_move_start}(meth = nil, &block): Process a {Wx::EVT_MOVE_START} event, which is generated when the user starts to move or size a window. {Wx::MSW} only.
|
1150
|
+
# - {Wx::EvtHandler#evt_moving}(meth = nil, &block): Process a {Wx::EVT_MOVING} event, which is generated while the user is moving the window. {Wx::MSW} only.
|
1151
|
+
# - {Wx::EvtHandler#evt_move_end}(meth = nil, &block): Process a {Wx::EVT_MOVE_END} event, which is generated when the user stops moving or sizing a window. {Wx::MSW} only.
|
1152
|
+
#
|
1153
|
+
# ===
|
1154
|
+
#
|
1155
|
+
# Category: {Wx::Events}
|
1156
|
+
# @see Wx::Point
|
1157
|
+
# @see Events and Event Handling
|
1158
|
+
#
|
1159
|
+
#
|
1160
|
+
class MoveEvent < Event
|
1161
|
+
|
1162
|
+
# Constructor.
|
1163
|
+
# @param pt [Array(Integer, Integer), Wx::Point]
|
1164
|
+
# @param id [Integer]
|
1165
|
+
# @return [MoveEvent]
|
1166
|
+
def initialize(pt, id=0) end
|
1167
|
+
|
1168
|
+
# Returns the position of the window generating the move change event.
|
1169
|
+
# @return [Wx::Point]
|
1170
|
+
def get_position; end
|
1171
|
+
alias_method :position, :get_position
|
1172
|
+
|
1173
|
+
# @return [Wx::Rect]
|
1174
|
+
def get_rect; end
|
1175
|
+
alias_method :rect, :get_rect
|
1176
|
+
|
1177
|
+
# @param rect [Wx::Rect]
|
1178
|
+
# @return [void]
|
1179
|
+
def set_rect(rect) end
|
1180
|
+
alias_method :rect=, :set_rect
|
1181
|
+
|
1182
|
+
# @param pos [Array(Integer, Integer), Wx::Point]
|
1183
|
+
# @return [void]
|
1184
|
+
def set_position(pos) end
|
1185
|
+
alias_method :position=, :set_position
|
1186
|
+
|
1187
|
+
end # MoveEvent
|
1188
|
+
|
1189
|
+
# A paint event is sent when a window's contents needs to be repainted.
|
1190
|
+
# The handler of this event must create a {Wx::PaintDC} object and use it for painting the window contents. For example:
|
1191
|
+
#
|
1192
|
+
# void MyWindow::OnPaint(wxPaintEvent& event)
|
1193
|
+
# {
|
1194
|
+
# wxPaintDC dc(this);
|
1195
|
+
#
|
1196
|
+
# DrawMyDocument(dc);
|
1197
|
+
# }
|
1198
|
+
#
|
1199
|
+
# Notice that you must not create other kinds of {Wx::DC} (e.g. {Wx::ClientDC} or {Wx::WindowDC}) in EVT_PAINT handlers and also don't create {Wx::PaintDC} outside of this event handlers.
|
1200
|
+
# You can optimize painting by retrieving the rectangles that have been damaged and only repainting these. The rectangles are in terms of the client area, and are unscrolled, so you will need to do some calculations using the current view position to obtain logical, scrolled units. Here is an example of using the {Wx::RegionIterator} class:
|
1201
|
+
#
|
1202
|
+
# // Called when window needs to be repainted.
|
1203
|
+
# void MyWindow::OnPaint(wxPaintEvent& event)
|
1204
|
+
# {
|
1205
|
+
# wxPaintDC dc(this);
|
1206
|
+
#
|
1207
|
+
# // Find Out where the window is scrolled to
|
1208
|
+
# int vbX,vbY; // Top left corner of client
|
1209
|
+
# GetViewStart(&vbX,&vbY);
|
1210
|
+
#
|
1211
|
+
# int vX,vY,vW,vH; // Dimensions of client area in pixels
|
1212
|
+
# wxRegionIterator upd(GetUpdateRegion()); // get the update rect list
|
1213
|
+
#
|
1214
|
+
# while (upd)
|
1215
|
+
# {
|
1216
|
+
# vX = upd.GetX();
|
1217
|
+
# vY = upd.GetY();
|
1218
|
+
# vW = upd.GetW();
|
1219
|
+
# vH = upd.GetH();
|
1220
|
+
#
|
1221
|
+
# // Alternatively we can do this:
|
1222
|
+
# // wxRect rect(upd.GetRect());
|
1223
|
+
#
|
1224
|
+
# // Repaint this rectangle
|
1225
|
+
# ...some code...
|
1226
|
+
#
|
1227
|
+
# upd ++ ;
|
1228
|
+
# }
|
1229
|
+
# }
|
1230
|
+
#
|
1231
|
+
# Please notice that in general it is impossible to change the drawing of a standard control (such as {Wx::Button}) and so you shouldn't attempt to handle paint events for them as even if it might work on some platforms, this is inherently not portable and won't work everywhere.
|
1232
|
+
#
|
1233
|
+
# === Events using this class
|
1234
|
+
#
|
1235
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::PaintEvent} events.
|
1236
|
+
# Event handler methods:
|
1237
|
+
# - {Wx::EvtHandler#evt_paint}(meth = nil, &block): Process a {Wx::EVT_PAINT} event.
|
1238
|
+
#
|
1239
|
+
# ===
|
1240
|
+
#
|
1241
|
+
# Category: {Wx::Events}
|
1242
|
+
# @see Events and Event Handling
|
1243
|
+
#
|
1244
|
+
#
|
1245
|
+
class PaintEvent < Event
|
1246
|
+
|
1247
|
+
# Constructor for exclusive use of wxWidgets itself.
|
1248
|
+
# Note that the objects of this class can not be created from application code, they're only created by the library itself. If you need a window to be repainted, use {Wx::Window#refresh} instead of trying to manually create an event of this class.
|
1249
|
+
# @param window [Wx::Window]
|
1250
|
+
# @return [PaintEvent]
|
1251
|
+
def initialize(window) end
|
1252
|
+
|
1253
|
+
end # PaintEvent
|
1254
|
+
|
1255
|
+
# An erase event is sent when a window's background needs to be repainted.
|
1256
|
+
# On some platforms, such as GTK+, this event is simulated (simply generated just before the paint event) and may cause flicker. It is therefore recommended that you set the text background colour explicitly in order to prevent flicker. The default background colour under GTK+ is grey.
|
1257
|
+
# To intercept this event, use the EVT_ERASE_BACKGROUND macro in an event table definition.
|
1258
|
+
# You must use the device context returned by {Wx::EraseEvent#get_dc} to draw on, don't create a {Wx::PaintDC} in the event handler.
|
1259
|
+
# === Events using this class
|
1260
|
+
#
|
1261
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::EraseEvent} events.
|
1262
|
+
# Event handler methods:
|
1263
|
+
# - {Wx::EvtHandler#evt_erase_background}(meth = nil, &block): Process a {Wx::EVT_ERASE_BACKGROUND} event.
|
1264
|
+
#
|
1265
|
+
# ===
|
1266
|
+
#
|
1267
|
+
# Category: {Wx::Events}
|
1268
|
+
# @see Events and Event Handling
|
1269
|
+
#
|
1270
|
+
#
|
1271
|
+
class EraseEvent < Event
|
1272
|
+
|
1273
|
+
# Constructor.
|
1274
|
+
# @param id [Integer]
|
1275
|
+
# @param dc [Wx::DC]
|
1276
|
+
# @return [EraseEvent]
|
1277
|
+
def initialize(id=0, dc=nil) end
|
1278
|
+
|
1279
|
+
# Returns the device context associated with the erase event to draw on.
|
1280
|
+
# The returned pointer is never NULL.
|
1281
|
+
# @return [Wx::DC]
|
1282
|
+
def get_dc; end
|
1283
|
+
alias_method :dc, :get_dc
|
1284
|
+
|
1285
|
+
end # EraseEvent
|
1286
|
+
|
1287
|
+
# A focus event is sent when a window's focus changes.
|
1288
|
+
# The window losing focus receives a "kill focus" event while the window gaining it gets a "set focus" one.
|
1289
|
+
# Notice that the set focus event happens both when the user gives focus to the window (whether using the mouse or keyboard) and when it is done from the program itself using {Wx::Window#set_focus}.
|
1290
|
+
# The focus event handlers should almost invariably call {Wx::Event#skip} on their event argument to allow the default handling to take place. Failure to do this may result in incorrect behaviour of the native controls. Also note that {Wx::EVT_KILL_FOCUS} handler must not call {Wx::Window#set_focus} as this, again, is not supported by all native controls. If you need to do this, consider using the Delayed Action Mechanism described in {Wx::IdleEvent} documentation.
|
1291
|
+
# === Events using this class
|
1292
|
+
#
|
1293
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::FocusEvent} events.
|
1294
|
+
# Event handler methods:
|
1295
|
+
# - {Wx::EvtHandler#evt_set_focus}(meth = nil, &block): Process a {Wx::EVT_SET_FOCUS} event.
|
1296
|
+
# - {Wx::EvtHandler#evt_kill_focus}(meth = nil, &block): Process a {Wx::EVT_KILL_FOCUS} event.
|
1297
|
+
#
|
1298
|
+
# ===
|
1299
|
+
#
|
1300
|
+
# Category: {Wx::Events}
|
1301
|
+
# @see Events and Event Handling
|
1302
|
+
#
|
1303
|
+
#
|
1304
|
+
class FocusEvent < Event
|
1305
|
+
|
1306
|
+
# Constructor.
|
1307
|
+
# @param eventType [Integer]
|
1308
|
+
# @param id [Integer]
|
1309
|
+
# @return [FocusEvent]
|
1310
|
+
def initialize(eventType=Wx::EVT_NULL, id=0) end
|
1311
|
+
|
1312
|
+
# Returns the window associated with this event, that is the window which had the focus before for the {Wx::EVT_SET_FOCUS} event and the window which is going to receive focus for the {Wx::EVT_KILL_FOCUS} one.
|
1313
|
+
# Warning: the window pointer may be NULL!
|
1314
|
+
# @return [Wx::Window]
|
1315
|
+
def get_window; end
|
1316
|
+
alias_method :window, :get_window
|
1317
|
+
|
1318
|
+
# @param win [Wx::Window]
|
1319
|
+
# @return [void]
|
1320
|
+
def set_window(win) end
|
1321
|
+
alias_method :window=, :set_window
|
1322
|
+
|
1323
|
+
end # FocusEvent
|
1324
|
+
|
1325
|
+
# An activate event is sent when a window or application is being activated or deactivated.
|
1326
|
+
# === Events using this class
|
1327
|
+
#
|
1328
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::ActivateEvent} events.
|
1329
|
+
# Event handler methods:
|
1330
|
+
# - {Wx::EvtHandler#evt_activate}(meth = nil, &block): Process a {Wx::EVT_ACTIVATE} event.
|
1331
|
+
# - {Wx::EvtHandler#evt_activate_app}(meth = nil, &block): Process a {Wx::EVT_ACTIVATE_APP} event. This event is received by the {Wx::App}-derived instance only.
|
1332
|
+
# - {Wx::EvtHandler#evt_hibernate}(meth = nil, &block): Process a hibernate event, supplying the member function. This event applies to {Wx::App} only, and only on Windows SmartPhone and PocketPC. It is generated when the system is low on memory; the application should free up as much memory as possible, and restore full working state when it receives a {Wx::EVT_ACTIVATE} or {Wx::EVT_ACTIVATE_APP} event.
|
1333
|
+
#
|
1334
|
+
# Until wxWidgets 3.1.0 activation events could be sent by {Wx::MSW} when the window was minimized. This reflected the native MSW behaviour but was often surprising and unexpected, so starting from 3.1.0 such events are not sent any more when the window is in the minimized state.
|
1335
|
+
#
|
1336
|
+
# ===
|
1337
|
+
#
|
1338
|
+
# Category: {Wx::Events}
|
1339
|
+
# @see Events and Event Handling
|
1340
|
+
# @see Wx::App#is_active
|
1341
|
+
#
|
1342
|
+
#
|
1343
|
+
class ActivateEvent < Event
|
1344
|
+
|
1345
|
+
# Specifies the reason for the generation of this event.
|
1346
|
+
#
|
1347
|
+
# See {Wx::ActivateEvent#get_activation_reason}.
|
1348
|
+
#
|
1349
|
+
class Reason < Wx::Enum
|
1350
|
+
|
1351
|
+
# Window activated by mouse click.
|
1352
|
+
#
|
1353
|
+
Reason_Mouse = Wx::ActivateEvent::Reason.new(0)
|
1354
|
+
|
1355
|
+
# Window was activated with some other method than mouse click.
|
1356
|
+
#
|
1357
|
+
Reason_Unknown = Wx::ActivateEvent::Reason.new(1)
|
1358
|
+
|
1359
|
+
end # Reason
|
1360
|
+
|
1361
|
+
# Constructor.
|
1362
|
+
# @param eventType [Integer]
|
1363
|
+
# @param active [true,false]
|
1364
|
+
# @param id [Integer]
|
1365
|
+
# @param ActivationReason [Reason]
|
1366
|
+
# @return [ActivateEvent]
|
1367
|
+
def initialize(eventType=Wx::EVT_NULL, active=true, id=0, ActivationReason=Wx::REASON_UNKNOWN) end
|
1368
|
+
|
1369
|
+
# Returns true if the application or window is being activated, false otherwise.
|
1370
|
+
# @return [true,false]
|
1371
|
+
def get_active; end
|
1372
|
+
alias_method :active, :get_active
|
1373
|
+
|
1374
|
+
# Allows checking if the window was activated by clicking it with the mouse or in some other way.
|
1375
|
+
# This method is currently only implemented in {Wx::MSW} and returns Reason_Mouse there if the window was activated by a mouse click and Reason_Unknown if it was activated in any other way (e.g. from keyboard or programmatically).
|
1376
|
+
# Under all the other platforms, Reason_Unknown is always returned.
|
1377
|
+
# @return [Reason]
|
1378
|
+
def get_activation_reason; end
|
1379
|
+
alias_method :activation_reason, :get_activation_reason
|
1380
|
+
|
1381
|
+
end # ActivateEvent
|
1382
|
+
|
1383
|
+
# A {Wx::InitDialogEvent} is sent as a dialog or panel is being initialised.
|
1384
|
+
# Handlers for this event can transfer data to the window.
|
1385
|
+
# The default handler calls {Wx::Window#transfer_data_to_window}.
|
1386
|
+
# === Events using this class
|
1387
|
+
#
|
1388
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::InitDialogEvent} events.
|
1389
|
+
# Event handler methods:
|
1390
|
+
# - {Wx::EvtHandler#evt_init_dialog}(meth = nil, &block): Process a {Wx::EVT_INIT_DIALOG} event.
|
1391
|
+
#
|
1392
|
+
# ===
|
1393
|
+
#
|
1394
|
+
# Category: {Wx::Events}
|
1395
|
+
# @see Events and Event Handling
|
1396
|
+
#
|
1397
|
+
#
|
1398
|
+
class InitDialogEvent < Event
|
1399
|
+
|
1400
|
+
# Constructor.
|
1401
|
+
# @param id [Integer]
|
1402
|
+
# @return [InitDialogEvent]
|
1403
|
+
def initialize(id=0) end
|
1404
|
+
|
1405
|
+
end # InitDialogEvent
|
1406
|
+
|
1407
|
+
# This class is used for a variety of menu-related events.
|
1408
|
+
# Note that these do not include menu command events, which are handled using {Wx::CommandEvent} objects.
|
1409
|
+
# Events of this class are generated by both menus that are part of a {Wx::MenuBar}, attached to {Wx::Frame}, and popup menus shown by {Wx::Window#popup_menu}. They are sent to the following objects until one of them handles the event:
|
1410
|
+
# - The menu object itself, as returned by {Wx::MenuEvent#get_menu}, if any.- The {Wx::MenuBar} to which this menu is attached, if any.- The window associated with the menu, e.g. the one calling PopupMenu() for the popup menus.- The top level parent of that window if it's different from the window itself.
|
1411
|
+
#
|
1412
|
+
# This is similar to command events generated by the menu items, but, unlike them, {Wx::MenuEvent} are only sent to the window itself and its top level parent but not any intermediate windows in the hierarchy.
|
1413
|
+
# The default handler for {Wx::EVT_MENU_HIGHLIGHT} in {Wx::Frame} displays help text in the status bar, see {Wx::Frame#set_status_bar_pane}.
|
1414
|
+
# === Events using this class
|
1415
|
+
#
|
1416
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::MenuEvent} events.
|
1417
|
+
# Event handler methods:
|
1418
|
+
# - {Wx::EvtHandler#evt_menu_open}(meth = nil, &block): A menu is about to be opened. On Windows, this is only sent once for each navigation of the menubar (up until all menus have closed).
|
1419
|
+
# - {Wx::EvtHandler#evt_menu_close}(meth = nil, &block): A menu has been just closed. Notice that this event is currently being sent before the menu selection ({Wx::EVT_MENU}) event, if any.
|
1420
|
+
# - {Wx::EvtHandler#evt_menu_highlight}(id, meth = nil, &block): The menu item with the specified id has been highlighted: used to show help prompts in the status bar by {Wx::Frame}
|
1421
|
+
# - {Wx::EvtHandler#evt_menu_highlight_all}(meth = nil, &block): A menu item has been highlighted, i.e. the currently selected menu item has changed.
|
1422
|
+
#
|
1423
|
+
# ===
|
1424
|
+
#
|
1425
|
+
# Category: {Wx::Events}
|
1426
|
+
# @see Wx::CommandEvent
|
1427
|
+
# @see Events and Event Handling
|
1428
|
+
#
|
1429
|
+
#
|
1430
|
+
class MenuEvent < Event
|
1431
|
+
|
1432
|
+
# Constructor.
|
1433
|
+
# @param type [Integer]
|
1434
|
+
# @param id [Integer]
|
1435
|
+
# @param menu [Wx::Menu]
|
1436
|
+
# @return [MenuEvent]
|
1437
|
+
def initialize(type=Wx::EVT_NULL, id=0, menu=nil) end
|
1438
|
+
|
1439
|
+
# Returns the menu which is being opened or closed, or the menu containing the highlighted item.
|
1440
|
+
# Note that the returned value can be NULL if the menu being opened doesn't have a corresponding {Wx::Menu}, e.g. this happens when opening the system menu in {Wx::MSW} port.
|
1441
|
+
# Since 3.1.3 this function can be used with OPEN, CLOSE and HIGHLIGHT events. Before 3.1.3, this method can only be used with the OPEN and CLOSE events.
|
1442
|
+
# @return [Wx::Menu]
|
1443
|
+
def get_menu; end
|
1444
|
+
alias_method :menu, :get_menu
|
1445
|
+
|
1446
|
+
# Returns the menu identifier associated with the event.
|
1447
|
+
# This method should be only used with the HIGHLIGHT events.
|
1448
|
+
# @return [Integer]
|
1449
|
+
def get_menu_id; end
|
1450
|
+
alias_method :menu_id, :get_menu_id
|
1451
|
+
|
1452
|
+
# Returns true if the menu which is being opened or closed is a popup menu, false if it is a normal one.
|
1453
|
+
# This method should only be used with the OPEN and CLOSE events.
|
1454
|
+
# @return [true,false]
|
1455
|
+
def is_popup; end
|
1456
|
+
alias_method :popup?, :is_popup
|
1457
|
+
|
1458
|
+
end # MenuEvent
|
1459
|
+
|
1460
|
+
# This event class contains information about window and session close events.
|
1461
|
+
# The handler function for EVT_CLOSE is called when the user has tried to close a a frame or dialog box using the window manager (X) or system menu (Windows). It can also be invoked by the application itself programmatically, for example by calling the {Wx::Window#close} function.
|
1462
|
+
# You should check whether the application is forcing the deletion of the window using {Wx::CloseEvent#can_veto}. If this is false, you must destroy the window using {Wx::Window#destroy}.
|
1463
|
+
# If the return value is true, it is up to you whether you respond by destroying the window.
|
1464
|
+
# If you don't destroy the window, you should call {Wx::CloseEvent#veto} to let the calling code know that you did not destroy the window. This allows the {Wx::Window#close} function to return true or false depending on whether the close instruction was honoured or not.
|
1465
|
+
# Example of a {Wx::CloseEvent} handler:
|
1466
|
+
#
|
1467
|
+
# void MyFrame::OnClose(wxCloseEvent& event)
|
1468
|
+
# {
|
1469
|
+
# if ( event.CanVeto() && m_bFileNotSaved )
|
1470
|
+
# {
|
1471
|
+
# if ( wxMessageBox("The file has not been saved... continue closing?",
|
1472
|
+
# "Please confirm",
|
1473
|
+
# wxICON_QUESTION | wxYES_NO) != wxYES )
|
1474
|
+
# {
|
1475
|
+
# event.Veto();
|
1476
|
+
# return;
|
1477
|
+
# }
|
1478
|
+
# }
|
1479
|
+
#
|
1480
|
+
# Destroy(); // you may also do: event.Skip();
|
1481
|
+
# // since the default event handler does call Destroy(), too
|
1482
|
+
# }
|
1483
|
+
#
|
1484
|
+
# See also <code>samples/dialogs</code> for a full example of interrupting closing an application when there are e.g. unsaved files.
|
1485
|
+
# The EVT_END_SESSION event is slightly different as it is sent by the system when the user session is ending (e.g. because of log out or shutdown) and so all windows are being forcefully closed. At least under MSW, after the handler for this event is executed the program is simply killed by the system. Because of this, the default handler for this event provided by wxWidgets calls all the usual cleanup code (including {Wx::App#on_exit}) so that it could still be executed and exit()s the process itself, without waiting for being killed. If this behaviour is for some reason undesirable, make sure that you define a handler for this event in your {Wx::App}-derived class and do not call <code>event.Skip()</code> in it (but be aware that the system will still kill your application).
|
1486
|
+
# === Events using this class
|
1487
|
+
#
|
1488
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::CloseEvent} events.
|
1489
|
+
# Event handler methods:
|
1490
|
+
# - {Wx::EvtHandler#evt_close}(meth = nil, &block): Process a {Wx::EVT_CLOSE_WINDOW} command event, supplying the member function. This event applies to {Wx::Frame} and {Wx::Dialog} classes.
|
1491
|
+
# - {Wx::EvtHandler#evt_query_end_session}(meth = nil, &block): Process a {Wx::EVT_QUERY_END_SESSION} session event, supplying the member function. This event can be handled in {Wx::App}-derived class only.
|
1492
|
+
# - {Wx::EvtHandler#evt_end_session}(meth = nil, &block): Process a {Wx::EVT_END_SESSION} session event, supplying the member function. This event can be handled in {Wx::App}-derived class only.
|
1493
|
+
#
|
1494
|
+
# ===
|
1495
|
+
#
|
1496
|
+
# Category: {Wx::Events}
|
1497
|
+
# @see Wx::Window#close
|
1498
|
+
# @see Window Deletion
|
1499
|
+
#
|
1500
|
+
#
|
1501
|
+
class CloseEvent < Event
|
1502
|
+
|
1503
|
+
# Constructor.
|
1504
|
+
# @param commandEventType [Integer]
|
1505
|
+
# @param id [Integer]
|
1506
|
+
# @return [CloseEvent]
|
1507
|
+
def initialize(commandEventType=Wx::EVT_NULL, id=0) end
|
1508
|
+
|
1509
|
+
# Returns true if you can veto a system shutdown or a window close event.
|
1510
|
+
# Vetoing a window close event is not possible if the calling code wishes to force the application to exit, and so this function must be called to check this.
|
1511
|
+
# @return [true,false]
|
1512
|
+
def can_veto; end
|
1513
|
+
alias_method :can_veto?, :can_veto
|
1514
|
+
|
1515
|
+
# Returns true if the user is just logging off or false if the system is shutting down.
|
1516
|
+
# This method can only be called for end session and query end session events, it doesn't make sense for close window event.
|
1517
|
+
# @return [true,false]
|
1518
|
+
def get_logging_off; end
|
1519
|
+
alias_method :logging_off, :get_logging_off
|
1520
|
+
|
1521
|
+
# Sets the 'can veto' flag.
|
1522
|
+
# @param canVeto [true,false]
|
1523
|
+
# @return [void]
|
1524
|
+
def set_can_veto(canVeto) end
|
1525
|
+
alias_method :can_veto=, :set_can_veto
|
1526
|
+
|
1527
|
+
# Sets the 'logging off' flag.
|
1528
|
+
# @param loggingOff [true,false]
|
1529
|
+
# @return [void]
|
1530
|
+
def set_logging_off(loggingOff) end
|
1531
|
+
alias_method :logging_off=, :set_logging_off
|
1532
|
+
|
1533
|
+
# Call this from your event handler to veto a system shutdown or to signal to the calling application that a window close did not happen.
|
1534
|
+
# You can only veto a shutdown if {Wx::CloseEvent#can_veto} returns true.
|
1535
|
+
# @param veto [true,false]
|
1536
|
+
# @return [void]
|
1537
|
+
def veto(veto=true) end
|
1538
|
+
|
1539
|
+
# Returns whether the Veto flag was set.
|
1540
|
+
# @return [true,false]
|
1541
|
+
def get_veto; end
|
1542
|
+
|
1543
|
+
end # CloseEvent
|
1544
|
+
|
1545
|
+
# An event being sent when the window is shown or hidden.
|
1546
|
+
# The event is triggered by calls to {Wx::Window#show}, and any user action showing a previously hidden window or vice versa (if allowed by the current platform and/or window manager). Notice that the event is not triggered when the application is iconized (minimized) or restored under {Wx::MSW}.
|
1547
|
+
# === Events using this class
|
1548
|
+
#
|
1549
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::ShowEvent} events.
|
1550
|
+
# Event handler methods:
|
1551
|
+
# - {Wx::EvtHandler#evt_show}(meth = nil, &block): Process a {Wx::EVT_SHOW} event.
|
1552
|
+
#
|
1553
|
+
# ===
|
1554
|
+
#
|
1555
|
+
# Category: {Wx::Events}
|
1556
|
+
# @see Events and Event Handling
|
1557
|
+
# @see Wx::Window#show
|
1558
|
+
# @see Wx::Window#is_shown
|
1559
|
+
#
|
1560
|
+
#
|
1561
|
+
class ShowEvent < Event
|
1562
|
+
|
1563
|
+
# Constructor.
|
1564
|
+
# @param winid [Integer]
|
1565
|
+
# @param show [true,false]
|
1566
|
+
# @return [ShowEvent]
|
1567
|
+
def initialize(winid=0, show=false) end
|
1568
|
+
|
1569
|
+
# Set whether the windows was shown or hidden.
|
1570
|
+
# @param show [true,false]
|
1571
|
+
# @return [void]
|
1572
|
+
def set_show(show) end
|
1573
|
+
alias_method :show=, :set_show
|
1574
|
+
|
1575
|
+
# Return true if the window has been shown, false if it has been hidden.
|
1576
|
+
# @return [true,false]
|
1577
|
+
def is_shown; end
|
1578
|
+
alias_method :shown?, :is_shown
|
1579
|
+
|
1580
|
+
end # ShowEvent
|
1581
|
+
|
1582
|
+
# An event being sent when the frame is iconized (minimized) or restored.
|
1583
|
+
# === Events using this class
|
1584
|
+
#
|
1585
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::IconizeEvent} events.
|
1586
|
+
# Event handler methods:
|
1587
|
+
# - {Wx::EvtHandler#evt_iconize}(meth = nil, &block): Process a {Wx::EVT_ICONIZE} event.
|
1588
|
+
#
|
1589
|
+
# ===
|
1590
|
+
#
|
1591
|
+
# Category: {Wx::Events}
|
1592
|
+
# @see Events and Event Handling
|
1593
|
+
# @see Wx::TopLevelWindow#iconize
|
1594
|
+
# @see Wx::TopLevelWindow#is_iconized
|
1595
|
+
#
|
1596
|
+
#
|
1597
|
+
class IconizeEvent < Event
|
1598
|
+
|
1599
|
+
# Constructor.
|
1600
|
+
# @param id [Integer]
|
1601
|
+
# @param iconized [true,false]
|
1602
|
+
# @return [IconizeEvent]
|
1603
|
+
def initialize(id=0, iconized=true) end
|
1604
|
+
|
1605
|
+
# Returns true if the frame has been iconized, false if it has been restored.
|
1606
|
+
# @return [true,false]
|
1607
|
+
def is_iconized; end
|
1608
|
+
alias_method :iconized?, :is_iconized
|
1609
|
+
|
1610
|
+
end # IconizeEvent
|
1611
|
+
|
1612
|
+
# An event being sent when a top level window is maximized.
|
1613
|
+
# Notice that it is not sent when the window is restored to its original size after it had been maximized, only a normal {Wx::SizeEvent} is generated in this case.
|
1614
|
+
# Currently this event is only generated in {Wx::MSW}, {Wx::GTK} and {Wx::OSX}/Cocoa ports so portable programs should only rely on receiving {Wx::EVT_SIZE} and not necessarily this event when the window is maximized.
|
1615
|
+
# === Events using this class
|
1616
|
+
#
|
1617
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::MaximizeEvent} events.
|
1618
|
+
# Event handler methods:
|
1619
|
+
# - {Wx::EvtHandler#evt_maximize}(meth = nil, &block): Process a {Wx::EVT_MAXIMIZE} event.
|
1620
|
+
#
|
1621
|
+
# ===
|
1622
|
+
#
|
1623
|
+
# Category: {Wx::Events}
|
1624
|
+
# @see Events and Event Handling
|
1625
|
+
# @see Wx::TopLevelWindow#maximize
|
1626
|
+
# @see Wx::TopLevelWindow#is_maximized
|
1627
|
+
#
|
1628
|
+
#
|
1629
|
+
class MaximizeEvent < Event
|
1630
|
+
|
1631
|
+
# Constructor.
|
1632
|
+
# Only used by wxWidgets internally.
|
1633
|
+
# @param id [Integer]
|
1634
|
+
# @return [MaximizeEvent]
|
1635
|
+
def initialize(id=0) end
|
1636
|
+
|
1637
|
+
end # MaximizeEvent
|
1638
|
+
|
1639
|
+
# An event being sent when the user enters or exits full screen mode.
|
1640
|
+
# Currently this event is only generated in the {Wx::OSX}/Cocoa port when {Wx::TopLevelWindow#enable_full_screen_view} is enabled and the user the user enters or exits full screen. Note that this event is not generated when {Wx::TopLevelWindow#show_full_screen}.
|
1641
|
+
# === Events using this class
|
1642
|
+
#
|
1643
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::FullScreenEvent} events.
|
1644
|
+
# Event handler methods:
|
1645
|
+
# - {Wx::EvtHandler#evt_fullscreen}(meth = nil, &block): Process a {Wx::EVT_FULLSCREEN} event.
|
1646
|
+
#
|
1647
|
+
# ===
|
1648
|
+
#
|
1649
|
+
# Category: {Wx::Events}
|
1650
|
+
# @see Events and Event Handling
|
1651
|
+
# @see Wx::TopLevelWindow#enable_full_screen_view
|
1652
|
+
# @see Wx::TopLevelWindow#is_full_screen
|
1653
|
+
#
|
1654
|
+
#
|
1655
|
+
class FullScreenEvent < Event
|
1656
|
+
|
1657
|
+
# Constructor.
|
1658
|
+
# @param id [Integer]
|
1659
|
+
# @param fullscreen [true,false]
|
1660
|
+
# @return [FullScreenEvent]
|
1661
|
+
def initialize(id=0, fullscreen=true) end
|
1662
|
+
|
1663
|
+
# Returns true if the frame entered full screen, false if exited full screen.
|
1664
|
+
# @return [true,false]
|
1665
|
+
def is_full_screen; end
|
1666
|
+
alias_method :full_screen?, :is_full_screen
|
1667
|
+
|
1668
|
+
end # FullScreenEvent
|
1669
|
+
|
1670
|
+
# This event class contains information about joystick events, particularly events received by windows.
|
1671
|
+
# === Events using this class
|
1672
|
+
#
|
1673
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::JoystickEvent} events.
|
1674
|
+
# Event handler methods:
|
1675
|
+
# - {Wx::EvtHandler#evt_joy_button_down}(meth = nil, &block): Process a {Wx::EVT_JOY_BUTTON_DOWN} event.
|
1676
|
+
# - {Wx::EvtHandler#evt_joy_button_up}(meth = nil, &block): Process a {Wx::EVT_JOY_BUTTON_UP} event.
|
1677
|
+
# - {Wx::EvtHandler#evt_joy_move}(meth = nil, &block): Process a {Wx::EVT_JOY_MOVE} event.
|
1678
|
+
# - {Wx::EvtHandler#evt_joy_zmove}(meth = nil, &block): Process a {Wx::EVT_JOY_ZMOVE} event.
|
1679
|
+
# - {Wx::EvtHandler#evt_joystick_events}(meth = nil, &block): Processes all joystick events.
|
1680
|
+
#
|
1681
|
+
# ===
|
1682
|
+
#
|
1683
|
+
# Category: {Wx::Events}
|
1684
|
+
# @see Wx::Joystick
|
1685
|
+
#
|
1686
|
+
#
|
1687
|
+
class JoystickEvent < Event
|
1688
|
+
|
1689
|
+
# Constructor.
|
1690
|
+
# @param eventType [Integer]
|
1691
|
+
# @param state [Integer]
|
1692
|
+
# @param joystick [Integer]
|
1693
|
+
# @param change [Integer]
|
1694
|
+
# @return [JoystickEvent]
|
1695
|
+
def initialize(eventType=Wx::EVT_NULL, state=0, joystick=wxJOYSTICK1, change=0) end
|
1696
|
+
|
1697
|
+
# Returns true if the event was a down event from the specified button (or any button).
|
1698
|
+
# @param button [Integer] Can be {Wx::JOY_BUTTONn} where n is 1, 2, 3 or 4; or {Wx::JOY_BUTTON_ANY} to indicate any button down event.
|
1699
|
+
# @return [true,false]
|
1700
|
+
def button_down(button=Wx::JOY_BUTTON_ANY) end
|
1701
|
+
|
1702
|
+
# Returns true if the specified button (or any button) was in a down state.
|
1703
|
+
# @param button [Integer] Can be {Wx::JOY_BUTTONn} where n is 1, 2, 3 or 4; or {Wx::JOY_BUTTON_ANY} to indicate any button down event.
|
1704
|
+
# @return [true,false]
|
1705
|
+
def button_is_down(button=Wx::JOY_BUTTON_ANY) end
|
1706
|
+
|
1707
|
+
# Returns true if the event was an up event from the specified button (or any button).
|
1708
|
+
# @param button [Integer] Can be {Wx::JOY_BUTTONn} where n is 1, 2, 3 or 4; or {Wx::JOY_BUTTON_ANY} to indicate any button down event.
|
1709
|
+
# @return [true,false]
|
1710
|
+
def button_up(button=Wx::JOY_BUTTON_ANY) end
|
1711
|
+
|
1712
|
+
# Returns the identifier of the button changing state.
|
1713
|
+
# The return value is
|
1714
|
+
#
|
1715
|
+
# 1 << n
|
1716
|
+
# where n is the index of the button changing state, which can also be retrieved using {Wx::JoystickEvent#get_button_ordinal}.
|
1717
|
+
# Note that for n equal to 1, 2, 3 or 4 there are predefined {Wx::JOY_BUTTONn} constants which can be used for more clarity, however these constants are not defined for the buttons beyond the first four.
|
1718
|
+
# @return [Integer]
|
1719
|
+
def get_button_change; end
|
1720
|
+
alias_method :button_change, :get_button_change
|
1721
|
+
|
1722
|
+
# Returns the 0-indexed ordinal of the button changing state.
|
1723
|
+
#
|
1724
|
+
# @see Wx::JoystickEvent#get_button_change
|
1725
|
+
# @return [Integer]
|
1726
|
+
def get_button_ordinal; end
|
1727
|
+
alias_method :button_ordinal, :get_button_ordinal
|
1728
|
+
|
1729
|
+
# Returns the down state of the buttons.
|
1730
|
+
# This is a {Wx::JOY_BUTTONn} identifier, where n is one of 1, 2, 3, 4.
|
1731
|
+
# @return [Integer]
|
1732
|
+
def get_button_state; end
|
1733
|
+
alias_method :button_state, :get_button_state
|
1734
|
+
|
1735
|
+
# Returns the identifier of the joystick generating the event - one of {Wx::JOYSTICK1} and {Wx::JOYSTICK2}.
|
1736
|
+
# @return [Integer]
|
1737
|
+
def get_joystick; end
|
1738
|
+
alias_method :joystick, :get_joystick
|
1739
|
+
|
1740
|
+
# Returns the x, y position of the joystick event.
|
1741
|
+
# These coordinates are valid for all the events except {Wx::EVT_JOY_ZMOVE}.
|
1742
|
+
# @return [Wx::Point]
|
1743
|
+
def get_position; end
|
1744
|
+
alias_method :position, :get_position
|
1745
|
+
|
1746
|
+
# Returns the z position of the joystick event.
|
1747
|
+
# This method can only be used for {Wx::EVT_JOY_ZMOVE} events.
|
1748
|
+
# @return [Integer]
|
1749
|
+
def get_z_position; end
|
1750
|
+
alias_method :z_position, :get_z_position
|
1751
|
+
|
1752
|
+
# Returns true if this was a button up or down event (not 'is any button down?').
|
1753
|
+
# @return [true,false]
|
1754
|
+
def is_button; end
|
1755
|
+
alias_method :button?, :is_button
|
1756
|
+
|
1757
|
+
# Returns true if this was an x, y move event.
|
1758
|
+
# @return [true,false]
|
1759
|
+
def is_move; end
|
1760
|
+
alias_method :move?, :is_move
|
1761
|
+
|
1762
|
+
# Returns true if this was a z move event.
|
1763
|
+
# @return [true,false]
|
1764
|
+
def is_z_move; end
|
1765
|
+
alias_method :z_move?, :is_z_move
|
1766
|
+
|
1767
|
+
end # JoystickEvent
|
1768
|
+
|
1769
|
+
# This class is used for drop files events, that is, when files have been dropped onto the window.
|
1770
|
+
# The window must have previously been enabled for dropping by calling {Wx::Window#drag_accept_files}.
|
1771
|
+
# Important note: this is a separate implementation to the more general drag and drop implementation documented in the Drag and Drop Overview. It uses the older, Windows message-based approach of dropping files.
|
1772
|
+
# === Events using this class
|
1773
|
+
#
|
1774
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::DropFilesEvent} events.
|
1775
|
+
# Event handler methods:
|
1776
|
+
# - {Wx::EvtHandler#evt_drop_files}(meth = nil, &block): Process a {Wx::EVT_DROP_FILES} event.
|
1777
|
+
#
|
1778
|
+
# Windows only until version 2.8.9, available on all platforms since 2.8.10.
|
1779
|
+
#
|
1780
|
+
# ===
|
1781
|
+
#
|
1782
|
+
# Category: {Wx::Events}
|
1783
|
+
# @see Events and Event Handling
|
1784
|
+
# @see Wx::Window#drag_accept_files
|
1785
|
+
#
|
1786
|
+
#
|
1787
|
+
class DropFilesEvent < Event
|
1788
|
+
|
1789
|
+
# Constructor.
|
1790
|
+
# @param id [Integer]
|
1791
|
+
# @param noFiles [Integer]
|
1792
|
+
# @param files [String]
|
1793
|
+
# @return [DropFilesEvent]
|
1794
|
+
def initialize(id=0, noFiles=0, files=nil) end
|
1795
|
+
|
1796
|
+
# Returns an array of filenames.
|
1797
|
+
# @return [String]
|
1798
|
+
def get_files; end
|
1799
|
+
alias_method :files, :get_files
|
1800
|
+
|
1801
|
+
# Returns the number of files dropped.
|
1802
|
+
# @return [Integer]
|
1803
|
+
def get_number_of_files; end
|
1804
|
+
alias_method :number_of_files, :get_number_of_files
|
1805
|
+
|
1806
|
+
# Returns the position at which the files were dropped.
|
1807
|
+
# Returns an array of filenames.
|
1808
|
+
# @return [Wx::Point]
|
1809
|
+
def get_position; end
|
1810
|
+
alias_method :position, :get_position
|
1811
|
+
|
1812
|
+
end # DropFilesEvent
|
1813
|
+
|
1814
|
+
# This class is used for pseudo-events which are called by wxWidgets to give an application the chance to update various user interface elements.
|
1815
|
+
# Without update UI events, an application has to work hard to check/uncheck, enable/disable, show/hide, and set the text for elements such as menu items and toolbar buttons. The code for doing this has to be mixed up with the code that is invoked when an action is invoked for a menu item or button.
|
1816
|
+
# With update UI events, you define an event handler to look at the state of the application and change UI elements accordingly. wxWidgets will call your member functions in idle time, so you don't have to worry where to call this code.
|
1817
|
+
# In addition to being a clearer and more declarative method, it also means you don't have to worry whether you're updating a toolbar or menubar identifier. The same handler can update a menu item and toolbar button, if the identifier is the same. Instead of directly manipulating the menu or button, you call functions in the event object, such as {Wx::UpdateUIEvent#check}. wxWidgets will determine whether such a call has been made, and which UI element to update.
|
1818
|
+
# These events will work for popup menus as well as menubars. Just before a menu is popped up, {Wx::Menu::UpdateUI} is called to process any UI events for the window that owns the menu.
|
1819
|
+
# If you find that the overhead of UI update processing is affecting your application, you can do one or both of the following:
|
1820
|
+
# - Call {Wx::UpdateUIEvent.set_mode} with a value of {Wx::UpdateUIMode::UPDATE_UI_PROCESS_SPECIFIED}, and set the extra style {Wx::WS_EX_PROCESS_UI_UPDATES} for every window that should receive update events. No other windows will receive update events.
|
1821
|
+
# - Call {Wx::UpdateUIEvent.set_update_interval} with a millisecond value to set the delay between updates. You may need to call {Wx::Window#update_window_ui} at critical points, for example when a dialog is about to be shown, in case the user sees a slight delay before windows are updated.
|
1822
|
+
#
|
1823
|
+
# Note that although events are sent in idle time, defining a {Wx::IdleEvent} handler for a window does not affect this because the events are sent from {Wx::Window#on_internal_idle} which is always called in idle time.
|
1824
|
+
# wxWidgets tries to optimize update events on some platforms. On Windows and GTK+, events for menubar items are only sent when the menu is about to be shown, and not in idle time.
|
1825
|
+
# === Events using this class
|
1826
|
+
#
|
1827
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::UpdateUIEvent} events.
|
1828
|
+
# Event handler methods:
|
1829
|
+
# - {Wx::EvtHandler#evt_update_ui}(id, meth = nil, &block): Process a {Wx::EVT_UPDATE_UI} event for the command with the given id.
|
1830
|
+
# - {Wx::EvtHandler#evt_update_ui_range}(id1, id2, meth = nil, &block): Process a {Wx::EVT_UPDATE_UI} event for any command with id included in the given range.
|
1831
|
+
#
|
1832
|
+
# ===
|
1833
|
+
#
|
1834
|
+
# Category: {Wx::Events}
|
1835
|
+
# @see Events and Event Handling
|
1836
|
+
#
|
1837
|
+
#
|
1838
|
+
class UpdateUIEvent < CommandEvent
|
1839
|
+
|
1840
|
+
# Constructor.
|
1841
|
+
# @param commandId [Integer]
|
1842
|
+
# @return [UpdateUIEvent]
|
1843
|
+
def initialize(commandId=0) end
|
1844
|
+
|
1845
|
+
# Check or uncheck the UI element.
|
1846
|
+
# @param check [true,false]
|
1847
|
+
# @return [void]
|
1848
|
+
def check(check) end
|
1849
|
+
|
1850
|
+
# Enable or disable the UI element.
|
1851
|
+
# @param enable [true,false]
|
1852
|
+
# @return [void]
|
1853
|
+
def enable(enable) end
|
1854
|
+
|
1855
|
+
# Returns true if the UI element should be checked.
|
1856
|
+
# @return [true,false]
|
1857
|
+
def get_checked; end
|
1858
|
+
alias_method :checked, :get_checked
|
1859
|
+
|
1860
|
+
# Returns true if the UI element should be enabled.
|
1861
|
+
# @return [true,false]
|
1862
|
+
def get_enabled; end
|
1863
|
+
alias_method :enabled, :get_enabled
|
1864
|
+
|
1865
|
+
# Returns true if the UI element can be checked.
|
1866
|
+
# For the event handlers that can be used for multiple items, not all of which can be checked, this method can be useful to determine whether to call {Wx::UpdateUIEvent#check} on the event object or not, i.e. the main use case for this method is:
|
1867
|
+
#
|
1868
|
+
# void MyWindow::OnUpdateUI(wxUpdateUIEvent& event)
|
1869
|
+
# {
|
1870
|
+
# ....
|
1871
|
+
# if ( event.IsCheckable() )
|
1872
|
+
# event.Check(...some condition...);
|
1873
|
+
# }
|
1874
|
+
# @return [true,false]
|
1875
|
+
def is_checkable; end
|
1876
|
+
alias_method :checkable?, :is_checkable
|
1877
|
+
|
1878
|
+
# Returns true if the application has called {Wx::UpdateUIEvent#check}.
|
1879
|
+
# For wxWidgets internal use only.
|
1880
|
+
# @return [true,false]
|
1881
|
+
def get_set_checked; end
|
1882
|
+
alias_method :set_checked, :get_set_checked
|
1883
|
+
|
1884
|
+
# Returns true if the application has called {Wx::UpdateUIEvent#enable}.
|
1885
|
+
# For wxWidgets internal use only.
|
1886
|
+
# @return [true,false]
|
1887
|
+
def get_set_enabled; end
|
1888
|
+
alias_method :set_enabled, :get_set_enabled
|
1889
|
+
|
1890
|
+
# Returns true if the application has called {Wx::UpdateUIEvent#show}.
|
1891
|
+
# For wxWidgets internal use only.
|
1892
|
+
# @return [true,false]
|
1893
|
+
def get_set_shown; end
|
1894
|
+
alias_method :set_shown, :get_set_shown
|
1895
|
+
|
1896
|
+
# Returns true if the application has called {Wx::UpdateUIEvent#set_text}.
|
1897
|
+
# For wxWidgets internal use only.
|
1898
|
+
# @return [true,false]
|
1899
|
+
def get_set_text; end
|
1900
|
+
|
1901
|
+
# Returns true if the UI element should be shown.
|
1902
|
+
# @return [true,false]
|
1903
|
+
def get_shown; end
|
1904
|
+
alias_method :shown, :get_shown
|
1905
|
+
|
1906
|
+
# Returns the text that should be set for the UI element.
|
1907
|
+
# @return [String]
|
1908
|
+
def get_text; end
|
1909
|
+
alias_method :text, :get_text
|
1910
|
+
|
1911
|
+
# Sets the text for this UI element.
|
1912
|
+
# @param text [String]
|
1913
|
+
# @return [void]
|
1914
|
+
def set_text(text) end
|
1915
|
+
alias_method :text=, :set_text
|
1916
|
+
|
1917
|
+
# Show or hide the UI element.
|
1918
|
+
# @param show [true,false]
|
1919
|
+
# @return [void]
|
1920
|
+
def show(show) end
|
1921
|
+
|
1922
|
+
# Returns true if it is appropriate to update (send UI update events to) this window.
|
1923
|
+
# This function looks at the mode used (see {Wx::UpdateUIEvent.set_mode}), the {Wx::WS_EX_PROCESS_UI_UPDATES} flag in window, the time update events were last sent in idle time, and the update interval, to determine whether events should be sent to this window now. By default this will always return true because the update mode is initially {Wx::UpdateUIMode::UPDATE_UI_PROCESS_ALL} and the interval is set to 0; so update events will be sent as often as possible. You can reduce the frequency that events are sent by changing the mode and/or setting an update interval.
|
1924
|
+
# @see Wx::UpdateUIEvent.reset_update_time
|
1925
|
+
# @see Wx::UpdateUIEvent.set_update_interval
|
1926
|
+
# @see Wx::UpdateUIEvent.set_mode
|
1927
|
+
# @param window [Wx::Window]
|
1928
|
+
# @return [true,false]
|
1929
|
+
def self.can_update(window) end
|
1930
|
+
|
1931
|
+
# Static function returning a value specifying how wxWidgets will send update events: to all windows, or only to those which specify that they will process the events.
|
1932
|
+
#
|
1933
|
+
# @see Wx::UpdateUIEvent.set_mode
|
1934
|
+
# @return [UpdateUIMode]
|
1935
|
+
def self.get_mode; end
|
1936
|
+
|
1937
|
+
# Returns the current interval between updates in milliseconds.
|
1938
|
+
# The value -1 disables updates, 0 updates as frequently as possible.
|
1939
|
+
# @see Wx::UpdateUIEvent.set_update_interval.
|
1940
|
+
# @return [Integer]
|
1941
|
+
def self.get_update_interval; end
|
1942
|
+
|
1943
|
+
# Used internally to reset the last-updated time to the current time.
|
1944
|
+
# It is assumed that update events are normally sent in idle time, so this is called at the end of idle processing.
|
1945
|
+
# @see Wx::UpdateUIEvent.can_update
|
1946
|
+
# @see Wx::UpdateUIEvent.set_update_interval
|
1947
|
+
# @see Wx::UpdateUIEvent.set_mode
|
1948
|
+
# @return [void]
|
1949
|
+
def self.reset_update_time; end
|
1950
|
+
|
1951
|
+
# Specify how wxWidgets will send update events: to all windows, or only to those which specify that they will process the events.
|
1952
|
+
# @param mode [UpdateUIMode] this parameter may be one of the {Wx::UpdateUIMode} enumeration values. The default mode is {Wx::UpdateUIMode::UPDATE_UI_PROCESS_ALL}.
|
1953
|
+
# @return [void]
|
1954
|
+
def self.set_mode(mode) end
|
1955
|
+
|
1956
|
+
# Sets the interval between updates in milliseconds.
|
1957
|
+
# Set to -1 to disable updates, or to 0 to update as frequently as possible. The default is 0.
|
1958
|
+
# Use this to reduce the overhead of UI update events if your application has a lot of windows. If you set the value to -1 or greater than 0, you may also need to call {Wx::Window#update_window_ui} at appropriate points in your application, such as when a dialog is about to be shown.
|
1959
|
+
# @param updateInterval [Integer]
|
1960
|
+
# @return [void]
|
1961
|
+
def self.set_update_interval(updateInterval) end
|
1962
|
+
|
1963
|
+
end # UpdateUIEvent
|
1964
|
+
|
1965
|
+
# This class is used for system colour change events, which are generated when the user changes the colour settings or when the system theme changes (e.g. automatic dark mode switching on macOS).
|
1966
|
+
# Event handlers for this event can access the new system colour settings through {Wx::SystemSettings.get_colour}.
|
1967
|
+
# The default event handler for this event propagates the event to child windows, since the system events are only sent to top-level windows. If intercepting this event for a top-level window, remember to either call {Wx::Event#skip} on the event, call the base class handler, or pass the event on to the window's children explicitly.
|
1968
|
+
#
|
1969
|
+
# === Events using this class
|
1970
|
+
#
|
1971
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::SysColourChangedEvent} events.
|
1972
|
+
# Event handler methods:
|
1973
|
+
# - {Wx::EvtHandler#evt_sys_colour_changed}(meth = nil, &block): Process a {Wx::EVT_SYS_COLOUR_CHANGED} event.
|
1974
|
+
#
|
1975
|
+
# ===
|
1976
|
+
#
|
1977
|
+
# Category: {Wx::Events}
|
1978
|
+
# @see Events and Event Handling
|
1979
|
+
#
|
1980
|
+
#
|
1981
|
+
class SysColourChangedEvent < Event
|
1982
|
+
|
1983
|
+
# Constructor.
|
1984
|
+
# @return [SysColourChangedEvent]
|
1985
|
+
def initialize; end
|
1986
|
+
|
1987
|
+
end # SysColourChangedEvent
|
1988
|
+
|
1989
|
+
# A mouse capture changed event is sent to a window that loses its mouse capture.
|
1990
|
+
# This is called even if {Wx::Window#release_mouse} was called by the application code. Handling this event allows an application to cater for unexpected capture releases which might otherwise confuse mouse handling code.
|
1991
|
+
# Availability: only available for the {Wx::MSW} port. {Wx::msw}
|
1992
|
+
# === Events using this class
|
1993
|
+
#
|
1994
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::MouseCaptureChangedEvent} events.
|
1995
|
+
# Event handler methods:
|
1996
|
+
# - {Wx::EvtHandler#evt_mouse_capture_changed}(meth = nil, &block): Process a {Wx::EVT_MOUSE_CAPTURE_CHANGED} event.
|
1997
|
+
#
|
1998
|
+
# ===
|
1999
|
+
#
|
2000
|
+
# Category: {Wx::Events}
|
2001
|
+
# @see Wx::MouseCaptureLostEvent
|
2002
|
+
# @see Events and Event Handling
|
2003
|
+
# @see Wx::Window#capture_mouse
|
2004
|
+
# @see Wx::Window#release_mouse
|
2005
|
+
# @see Wx::Window.get_capture
|
2006
|
+
#
|
2007
|
+
#
|
2008
|
+
class MouseCaptureChangedEvent < Event
|
2009
|
+
|
2010
|
+
# Constructor.
|
2011
|
+
# @param windowId [Integer]
|
2012
|
+
# @param gainedCapture [Wx::Window]
|
2013
|
+
# @return [MouseCaptureChangedEvent]
|
2014
|
+
def initialize(windowId=0, gainedCapture=nil) end
|
2015
|
+
|
2016
|
+
# Returns the window that gained the capture, or NULL if it was a non-wxWidgets window.
|
2017
|
+
# @return [Wx::Window]
|
2018
|
+
def get_captured_window; end
|
2019
|
+
alias_method :captured_window, :get_captured_window
|
2020
|
+
|
2021
|
+
end # MouseCaptureChangedEvent
|
2022
|
+
|
2023
|
+
# A mouse capture lost event is sent to a window that had obtained mouse capture, which was subsequently lost due to an "external" event (for example, when a dialog box is shown or if another application captures the mouse).
|
2024
|
+
# If this happens, this event is sent to all windows that are on the capture stack (i.e. called CaptureMouse, but didn't call ReleaseMouse yet). The event is not sent if the capture changes because of a call to CaptureMouse or ReleaseMouse.
|
2025
|
+
# This event is currently emitted under Windows only.
|
2026
|
+
# === Events using this class
|
2027
|
+
#
|
2028
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::MouseCaptureLostEvent} events.
|
2029
|
+
# Event handler methods:
|
2030
|
+
# - {Wx::EvtHandler#evt_mouse_capture_lost}(meth = nil, &block): Process a {Wx::EVT_MOUSE_CAPTURE_LOST} event.
|
2031
|
+
#
|
2032
|
+
# Availability: only available for the {Wx::MSW} port. {Wx::msw}
|
2033
|
+
# ===
|
2034
|
+
#
|
2035
|
+
# Category: {Wx::Events}
|
2036
|
+
# @see Wx::MouseCaptureChangedEvent
|
2037
|
+
# @see Events and Event Handling
|
2038
|
+
# @see Wx::Window#capture_mouse
|
2039
|
+
# @see Wx::Window#release_mouse
|
2040
|
+
# @see Wx::Window.get_capture
|
2041
|
+
#
|
2042
|
+
#
|
2043
|
+
class MouseCaptureLostEvent < Event
|
2044
|
+
|
2045
|
+
# Constructor.
|
2046
|
+
# @param windowId [Integer]
|
2047
|
+
# @return [MouseCaptureLostEvent]
|
2048
|
+
def initialize(windowId=0) end
|
2049
|
+
|
2050
|
+
end # MouseCaptureLostEvent
|
2051
|
+
|
2052
|
+
# A display changed event is sent to top-level windows when the display resolution has changed.
|
2053
|
+
# This event is currently emitted under Windows only.
|
2054
|
+
# === Events using this class
|
2055
|
+
#
|
2056
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::DisplayChangedEvent} events.
|
2057
|
+
# Event handler methods:
|
2058
|
+
# - {Wx::EvtHandler#evt_display_changed}(meth = nil, &block): Process a {Wx::EVT_DISPLAY_CHANGED} event.
|
2059
|
+
#
|
2060
|
+
# Availability: only available for the {Wx::MSW} port. {Wx::msw}
|
2061
|
+
# ===
|
2062
|
+
#
|
2063
|
+
# Category: {Wx::Events}
|
2064
|
+
# @see Wx::Display
|
2065
|
+
#
|
2066
|
+
#
|
2067
|
+
class DisplayChangedEvent < Event
|
2068
|
+
|
2069
|
+
# @return [DisplayChangedEvent]
|
2070
|
+
def initialize; end
|
2071
|
+
|
2072
|
+
end # DisplayChangedEvent
|
2073
|
+
|
2074
|
+
# Event sent when the display scale factor or pixel density (measured in dots-per-inch, or DPI) of the monitor a window is on changes.
|
2075
|
+
# The event is sent to each {Wx::TopLevelWindow} affected by the change, and all its children recursively (post-order traversal). For example, this event is sent to the window when it is moved, by the user, from a display using some DPI value to another display using a different DPI value. It also sent to all program windows on the given display if its DPI changes due to a change in the system settings.
|
2076
|
+
# If you define an event handler for this event, you should almost always call <code>event.Skip()</code> in it in order to allow the base class handler to execute, as many controls rely on processing this event in order to update their appearance when the DPI changes. However the default handler for the top level window itself only sets the new window size, by scaling the current size by the DPI ratio e.g. doubling it if the DPI has changed from normal to "high", i.e. 200%, one and also ensuring that the window is still bigger than its best size, as returned by {Wx::Window#get_best_size}. Note that in some cases this may cause the window size to grow unexpectedly and you may prefer to call {Wx::Window#set_size} in your handler of this event for the top level window and not call <code>event.Skip()</code> to prevent the default handler from resizing the window.
|
2077
|
+
# Currently this event is generated by {Wx::MSW} port if only and only if the MSW application runs under Windows 10 Creators Update (v1703) or later and is marked as being "per-monitor DPI aware", i.e. contains a dpiAwareness tag with the value "PerMonitorV2" in its manifest (see Microsoft "Application Manifests" documentation for more details).
|
2078
|
+
# === Events using this class
|
2079
|
+
#
|
2080
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::DPIChangedEvent} events.
|
2081
|
+
# Event handler methods:
|
2082
|
+
# - {Wx::EvtHandler#evt_dpi_changed}(meth = nil, &block): Process a {Wx::EVT_DPI_CHANGED} event.
|
2083
|
+
#
|
2084
|
+
# ===
|
2085
|
+
#
|
2086
|
+
# Category: {Wx::Events}
|
2087
|
+
# @see Events and Event Handling
|
2088
|
+
#
|
2089
|
+
#
|
2090
|
+
class DPIChangedEvent < Event
|
2091
|
+
|
2092
|
+
# Returns the old DPI.
|
2093
|
+
# @return [Wx::Size]
|
2094
|
+
def get_old_dpi; end
|
2095
|
+
alias_method :old_dpi, :get_old_dpi
|
2096
|
+
|
2097
|
+
# Returns the new DPI.
|
2098
|
+
# @return [Wx::Size]
|
2099
|
+
def get_new_dpi; end
|
2100
|
+
alias_method :new_dpi, :get_new_dpi
|
2101
|
+
|
2102
|
+
# Rescale a value in pixels to match the new DPI.
|
2103
|
+
# This is a convenience function to use in {Wx::EVT_DPI_CHANGED} event handlers, as they often need to update some sizes to the new DPI. It simply calls {mul_div_int32} with new and old DPI values, but is more readable and less error-prone.
|
2104
|
+
# For example, the returned value will be twice bigger than the original one when switching from normal (96) DPI to high (2x, 192) DPI.
|
2105
|
+
# @param sz [Wx::Size]
|
2106
|
+
# @return [Wx::Size]
|
2107
|
+
def scale(sz) end
|
2108
|
+
|
2109
|
+
# Rescale horizontal component to match the new DPI.
|
2110
|
+
# This is the same as {Wx::DPIChangedEvent#scale}, but for the horizontal component only.
|
2111
|
+
# @param x [Integer]
|
2112
|
+
# @return [Integer]
|
2113
|
+
def scale_x(x) end
|
2114
|
+
|
2115
|
+
# Rescale vertical component to match the new DPI.
|
2116
|
+
# This is the same as {Wx::DPIChangedEvent#scale}, but for the vertical component only.
|
2117
|
+
# @param y [Integer]
|
2118
|
+
# @return [Integer]
|
2119
|
+
def scale_y(y) end
|
2120
|
+
|
2121
|
+
end # DPIChangedEvent
|
2122
|
+
|
2123
|
+
#
|
2124
|
+
#
|
2125
|
+
#
|
2126
|
+
class PaletteChangedEvent < Event
|
2127
|
+
|
2128
|
+
# @param winid [Integer]
|
2129
|
+
# @return [PaletteChangedEvent]
|
2130
|
+
def initialize(winid=0) end
|
2131
|
+
|
2132
|
+
# @param win [Wx::Window]
|
2133
|
+
# @return [void]
|
2134
|
+
def set_changed_window(win) end
|
2135
|
+
alias_method :changed_window=, :set_changed_window
|
2136
|
+
|
2137
|
+
# @return [Wx::Window]
|
2138
|
+
def get_changed_window; end
|
2139
|
+
alias_method :changed_window, :get_changed_window
|
2140
|
+
|
2141
|
+
end # PaletteChangedEvent
|
2142
|
+
|
2143
|
+
#
|
2144
|
+
#
|
2145
|
+
#
|
2146
|
+
class QueryNewPaletteEvent < Event
|
2147
|
+
|
2148
|
+
# @param winid [Integer]
|
2149
|
+
# @return [QueryNewPaletteEvent]
|
2150
|
+
def initialize(winid=0) end
|
2151
|
+
|
2152
|
+
# @param realized [true,false]
|
2153
|
+
# @return [void]
|
2154
|
+
def set_palette_realized(realized) end
|
2155
|
+
alias_method :palette_realized=, :set_palette_realized
|
2156
|
+
|
2157
|
+
# @return [true,false]
|
2158
|
+
def get_palette_realized; end
|
2159
|
+
alias_method :palette_realized, :get_palette_realized
|
2160
|
+
|
2161
|
+
end # QueryNewPaletteEvent
|
2162
|
+
|
2163
|
+
# This event class contains information about navigation events, generated by navigation keys such as tab and page down.
|
2164
|
+
# This event is mainly used by wxWidgets implementations. A {Wx::NavigationKeyEvent} handler is automatically provided by wxWidgets when you enable keyboard navigation inside a window by inheriting it from {Wx::NavigationEnabled}<>.
|
2165
|
+
# === Events using this class
|
2166
|
+
#
|
2167
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::NavigationKeyEvent} events.
|
2168
|
+
# Event handler methods:
|
2169
|
+
# - {Wx::EvtHandler#evt_navigation_key}(meth = nil, &block): Process a navigation key event.
|
2170
|
+
#
|
2171
|
+
# ===
|
2172
|
+
#
|
2173
|
+
# Category: {Wx::Events}
|
2174
|
+
# @see Wx::Window#navigate
|
2175
|
+
# @see Wx::Window#navigate_in
|
2176
|
+
#
|
2177
|
+
#
|
2178
|
+
class NavigationKeyEvent < Event
|
2179
|
+
|
2180
|
+
# Flags which can be used with {Wx::NavigationKeyEvent}.
|
2181
|
+
#
|
2182
|
+
#
|
2183
|
+
#
|
2184
|
+
class NavigationKeyEventFlags < Wx::Enum
|
2185
|
+
|
2186
|
+
#
|
2187
|
+
#
|
2188
|
+
IsBackward = Wx::NavigationKeyEvent::NavigationKeyEventFlags.new(0)
|
2189
|
+
|
2190
|
+
#
|
2191
|
+
#
|
2192
|
+
IsForward = Wx::NavigationKeyEvent::NavigationKeyEventFlags.new(1)
|
2193
|
+
|
2194
|
+
#
|
2195
|
+
#
|
2196
|
+
WinChange = Wx::NavigationKeyEvent::NavigationKeyEventFlags.new(2)
|
2197
|
+
|
2198
|
+
#
|
2199
|
+
#
|
2200
|
+
FromTab = Wx::NavigationKeyEvent::NavigationKeyEventFlags.new(4)
|
2201
|
+
|
2202
|
+
end # NavigationKeyEventFlags
|
2203
|
+
|
2204
|
+
# @overload initialize()
|
2205
|
+
# @return [NavigationKeyEvent]
|
2206
|
+
# @overload initialize(event)
|
2207
|
+
# @param event [Wx::NavigationKeyEvent]
|
2208
|
+
# @return [NavigationKeyEvent]
|
2209
|
+
def initialize(*args) end
|
2210
|
+
|
2211
|
+
# Returns the child that has the focus, or NULL.
|
2212
|
+
# @return [Wx::Window]
|
2213
|
+
def get_current_focus; end
|
2214
|
+
alias_method :current_focus, :get_current_focus
|
2215
|
+
|
2216
|
+
# Returns true if the navigation was in the forward direction.
|
2217
|
+
# @return [true,false]
|
2218
|
+
def get_direction; end
|
2219
|
+
alias_method :direction, :get_direction
|
2220
|
+
|
2221
|
+
# Returns true if the navigation event was from a tab key.
|
2222
|
+
# This is required for proper navigation over radio buttons.
|
2223
|
+
# @return [true,false]
|
2224
|
+
def is_from_tab; end
|
2225
|
+
alias_method :from_tab?, :is_from_tab
|
2226
|
+
|
2227
|
+
# Returns true if the navigation event represents a window change (for example, from Ctrl-Page Down in a notebook).
|
2228
|
+
# @return [true,false]
|
2229
|
+
def is_window_change; end
|
2230
|
+
alias_method :window_change?, :is_window_change
|
2231
|
+
|
2232
|
+
# Sets the current focus window member.
|
2233
|
+
# @param currentFocus [Wx::Window]
|
2234
|
+
# @return [void]
|
2235
|
+
def set_current_focus(currentFocus) end
|
2236
|
+
alias_method :current_focus=, :set_current_focus
|
2237
|
+
|
2238
|
+
# Sets the direction to forward if direction is true, or backward if false.
|
2239
|
+
# @param direction [true,false]
|
2240
|
+
# @return [void]
|
2241
|
+
def set_direction(direction) end
|
2242
|
+
alias_method :direction=, :set_direction
|
2243
|
+
|
2244
|
+
# Sets the flags for this event.
|
2245
|
+
# The flags can be a combination of the {Wx::NavigationKeyEvent::NavigationKeyEventFlags} values.
|
2246
|
+
# @param flags [Integer]
|
2247
|
+
# @return [void]
|
2248
|
+
def set_flags(flags) end
|
2249
|
+
alias_method :flags=, :set_flags
|
2250
|
+
|
2251
|
+
# Marks the navigation event as from a tab key.
|
2252
|
+
# @param fromTab [true,false]
|
2253
|
+
# @return [void]
|
2254
|
+
def set_from_tab(fromTab) end
|
2255
|
+
alias_method :from_tab=, :set_from_tab
|
2256
|
+
|
2257
|
+
# Marks the event as a window change event.
|
2258
|
+
# @param windowChange [true,false]
|
2259
|
+
# @return [void]
|
2260
|
+
def set_window_change(windowChange) end
|
2261
|
+
alias_method :window_change=, :set_window_change
|
2262
|
+
|
2263
|
+
end # NavigationKeyEvent
|
2264
|
+
|
2265
|
+
# This event is sent just after the actual window associated with a {Wx::Window} object has been created.
|
2266
|
+
# Since it is derived from {Wx::CommandEvent}, the event propagates up the window hierarchy.
|
2267
|
+
# === Events using this class
|
2268
|
+
#
|
2269
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::WindowCreateEvent} events.
|
2270
|
+
# Event handler methods:
|
2271
|
+
# - {Wx::EvtHandler#evt_window_create}(meth = nil, &block): Process a {Wx::EVT_CREATE} event.
|
2272
|
+
#
|
2273
|
+
# ===
|
2274
|
+
#
|
2275
|
+
# Category: {Wx::Events}
|
2276
|
+
# @see Events and Event Handling
|
2277
|
+
# @see Wx::WindowDestroyEvent
|
2278
|
+
#
|
2279
|
+
#
|
2280
|
+
class WindowCreateEvent < CommandEvent
|
2281
|
+
|
2282
|
+
# Constructor.
|
2283
|
+
# @param win [Wx::Window]
|
2284
|
+
# @return [WindowCreateEvent]
|
2285
|
+
def initialize(win=nil) end
|
2286
|
+
|
2287
|
+
# Return the window being created.
|
2288
|
+
# @return [Wx::Window]
|
2289
|
+
def get_window; end
|
2290
|
+
alias_method :window, :get_window
|
2291
|
+
|
2292
|
+
end # WindowCreateEvent
|
2293
|
+
|
2294
|
+
# This event is sent as early as possible during the window destruction process.
|
2295
|
+
# For the top level windows, as early as possible means that this is done by {Wx::Frame} or {Wx::Dialog} destructor, i.e. after the destructor of the derived class was executed and so any methods specific to the derived class can't be called any more from this event handler. If you need to do this, you must call {Wx::Window#send_destroy_event} from your derived class destructor.
|
2296
|
+
# For the child windows, this event is generated just before deleting the window from {Wx::Window#destroy} (which is also called when the parent window is deleted) or from the window destructor if operator delete was used directly (which is not recommended for this very reason).
|
2297
|
+
# It is usually pointless to handle this event in the window itself but it ca be very useful to receive notifications about the window destruction in the parent window or in any other object interested in this window.
|
2298
|
+
# ===
|
2299
|
+
#
|
2300
|
+
# Category: {Wx::Events}
|
2301
|
+
# @see Events and Event Handling
|
2302
|
+
# @see Wx::WindowCreateEvent
|
2303
|
+
#
|
2304
|
+
#
|
2305
|
+
class WindowDestroyEvent < CommandEvent
|
2306
|
+
|
2307
|
+
# Constructor.
|
2308
|
+
# @param win [Wx::Window]
|
2309
|
+
# @return [WindowDestroyEvent]
|
2310
|
+
def initialize(win=nil) end
|
2311
|
+
|
2312
|
+
# Return the window being destroyed.
|
2313
|
+
# @return [Wx::Window]
|
2314
|
+
def get_window; end
|
2315
|
+
alias_method :window, :get_window
|
2316
|
+
|
2317
|
+
end # WindowDestroyEvent
|
2318
|
+
|
2319
|
+
# A help event is sent when the user has requested context-sensitive help.
|
2320
|
+
# This can either be caused by the application requesting context-sensitive help mode via {Wx::ContextHelp}, or (on MS Windows) by the system generating a WM_HELP message when the user pressed F1 or clicked on the query button in a dialog caption.
|
2321
|
+
# A help event is sent to the window that the user clicked on, and is propagated up the window hierarchy until the event is processed or there are no more event handlers.
|
2322
|
+
# The application should call {Wx::Event#get_id} to check the identity of the clicked-on window, and then either show some suitable help or call {Wx::Event#skip} if the identifier is unrecognised.
|
2323
|
+
# Calling Skip is important because it allows wxWidgets to generate further events for ancestors of the clicked-on window. Otherwise it would be impossible to show help for container windows, since processing would stop after the first window found.
|
2324
|
+
# === Events using this class
|
2325
|
+
#
|
2326
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::HelpEvent} events.
|
2327
|
+
# Event handler methods:
|
2328
|
+
# - {Wx::EvtHandler#evt_help}(id, meth = nil, &block): Process a {Wx::EVT_HELP} event.
|
2329
|
+
# - {Wx::EvtHandler#evt_help_range}(id1, id2, meth = nil, &block): Process a {Wx::EVT_HELP} event for a range of ids.
|
2330
|
+
#
|
2331
|
+
# ===
|
2332
|
+
#
|
2333
|
+
# Category: {Wx::Events}
|
2334
|
+
# @see Wx::ContextHelp
|
2335
|
+
# @see Wx::Dialog
|
2336
|
+
# @see Events and Event Handling
|
2337
|
+
#
|
2338
|
+
#
|
2339
|
+
class HelpEvent < CommandEvent
|
2340
|
+
|
2341
|
+
# Indicates how a {Wx::HelpEvent} was generated.
|
2342
|
+
#
|
2343
|
+
#
|
2344
|
+
#
|
2345
|
+
class Origin < Wx::Enum
|
2346
|
+
|
2347
|
+
# unrecognized event source.
|
2348
|
+
#
|
2349
|
+
Origin_Unknown = Wx::HelpEvent::Origin.new(0)
|
2350
|
+
|
2351
|
+
# event generated from F1 key press.
|
2352
|
+
#
|
2353
|
+
Origin_Keyboard = Wx::HelpEvent::Origin.new(1)
|
2354
|
+
|
2355
|
+
# event generated by {Wx::ContextHelp} or from the [?] button on the title bar (Windows).
|
2356
|
+
#
|
2357
|
+
Origin_HelpButton = Wx::HelpEvent::Origin.new(2)
|
2358
|
+
|
2359
|
+
end # Origin
|
2360
|
+
|
2361
|
+
# Constructor.
|
2362
|
+
# @param type [Integer]
|
2363
|
+
# @param winid [Integer]
|
2364
|
+
# @param pt [Array(Integer, Integer), Wx::Point]
|
2365
|
+
# @param origin [Wx::HelpEvent::Origin]
|
2366
|
+
# @return [HelpEvent]
|
2367
|
+
def initialize(type=Wx::EVT_NULL, winid=0, pt=Wx::DEFAULT_POSITION, origin=Wx::ORIGIN_UNKNOWN) end
|
2368
|
+
|
2369
|
+
# Returns the origin of the help event which is one of the {Wx::HelpEvent::Origin} values.
|
2370
|
+
# The application may handle events generated using the keyboard or mouse differently, e.g. by using {get_mouse_position} for the mouse events.
|
2371
|
+
# @see Wx::HelpEvent#set_origin
|
2372
|
+
# @return [Wx::HelpEvent::Origin]
|
2373
|
+
def get_origin; end
|
2374
|
+
alias_method :origin, :get_origin
|
2375
|
+
|
2376
|
+
# Returns the left-click position of the mouse, in screen coordinates.
|
2377
|
+
# This allows the application to position the help appropriately.
|
2378
|
+
# @return [Wx::Point]
|
2379
|
+
def get_position; end
|
2380
|
+
alias_method :position, :get_position
|
2381
|
+
|
2382
|
+
# Set the help event origin, only used internally by wxWidgets normally.
|
2383
|
+
#
|
2384
|
+
# @see Wx::HelpEvent#get_origin
|
2385
|
+
# @param origin [Wx::HelpEvent::Origin]
|
2386
|
+
# @return [void]
|
2387
|
+
def set_origin(origin) end
|
2388
|
+
alias_method :origin=, :set_origin
|
2389
|
+
|
2390
|
+
# Sets the left-click position of the mouse, in screen coordinates.
|
2391
|
+
# @param pt [Array(Integer, Integer), Wx::Point]
|
2392
|
+
# @return [void]
|
2393
|
+
def set_position(pt) end
|
2394
|
+
alias_method :position=, :set_position
|
2395
|
+
|
2396
|
+
end # HelpEvent
|
2397
|
+
|
2398
|
+
# This class represents the events generated by a control (typically a {Wx::TextCtrl} but other windows can generate these events as well) when its content gets copied or cut to, or pasted from the clipboard.
|
2399
|
+
# There are three types of corresponding events {Wx::EVT_TEXT_COPY}, {Wx::EVT_TEXT_CUT} and {Wx::EVT_TEXT_PASTE}.
|
2400
|
+
# If any of these events is processed (without being skipped) by an event handler, the corresponding operation doesn't take place which allows preventing the text from being copied from or pasted to a control. It is also possible to examine the clipboard contents in the PASTE event handler and transform it in some way before inserting in a control for example, changing its case or removing invalid characters.
|
2401
|
+
# Finally notice that a CUT event is always preceded by the COPY event which makes it possible to only process the latter if it doesn't matter if the text was copied or cut.
|
2402
|
+
# These events are currently only generated by {Wx::TextCtrl} in {Wx::GTK} and {Wx::OSX} but are also generated by {Wx::ComboBox} without {Wx::CB_READONLY} style in {Wx::MSW}.
|
2403
|
+
#
|
2404
|
+
# === Events using this class
|
2405
|
+
#
|
2406
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::ClipboardTextEvent} events.
|
2407
|
+
# Event handler methods:
|
2408
|
+
# - {Wx::EvtHandler#evt_text_copy}(id, meth = nil, &block): Some or all of the controls content was copied to the clipboard.
|
2409
|
+
# - {Wx::EvtHandler#evt_text_cut}(id, meth = nil, &block): Some or all of the controls content was cut (i.e. copied and deleted).
|
2410
|
+
# - {Wx::EvtHandler#evt_text_paste}(id, meth = nil, &block): Clipboard content was pasted into the control.
|
2411
|
+
#
|
2412
|
+
# ===
|
2413
|
+
#
|
2414
|
+
# Category: {Wx::Events}
|
2415
|
+
# @see Wx::Clipboard
|
2416
|
+
#
|
2417
|
+
#
|
2418
|
+
class ClipboardTextEvent < CommandEvent
|
2419
|
+
|
2420
|
+
# Constructor.
|
2421
|
+
# @param commandType [Integer]
|
2422
|
+
# @param id [Integer]
|
2423
|
+
# @return [ClipboardTextEvent]
|
2424
|
+
def initialize(commandType=Wx::EVT_NULL, id=0) end
|
2425
|
+
|
2426
|
+
end # ClipboardTextEvent
|
2427
|
+
|
2428
|
+
# This class is used for context menu events, sent to give the application a chance to show a context (popup) menu for a {Wx::Window}.
|
2429
|
+
# Note that if {Wx::ContextMenuEvent#get_position} returns {Wx::DEFAULT_POSITION}, this means that the event originated from a keyboard context button event, and you should compute a suitable position yourself, for example by calling {get_mouse_position}.
|
2430
|
+
# Notice that the exact sequence of mouse events is different across the platforms. For example, under MSW the context menu event is generated after EVT_RIGHT_UP event and only if it was not handled but under GTK the context menu event is generated after EVT_RIGHT_DOWN event. This is correct in the sense that it ensures that the context menu is shown according to the current platform UI conventions and also means that you must not handle (or call {Wx::Event#skip} in your handler if you do have one) neither right mouse down nor right mouse up event if you plan on handling EVT_CONTEXT_MENU event.
|
2431
|
+
# === Events using this class
|
2432
|
+
#
|
2433
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::ContextMenuEvent} events.
|
2434
|
+
# Event handler methods:
|
2435
|
+
# - {Wx::EvtHandler#evt_context_menu}(meth = nil, &block): A right click (or other context menu command depending on platform) has been detected.
|
2436
|
+
#
|
2437
|
+
# ===
|
2438
|
+
#
|
2439
|
+
# Category: {Wx::Events}
|
2440
|
+
# @see Wx::CommandEvent
|
2441
|
+
# @see Events and Event Handling
|
2442
|
+
#
|
2443
|
+
#
|
2444
|
+
class ContextMenuEvent < CommandEvent
|
2445
|
+
|
2446
|
+
# Constructor.
|
2447
|
+
# @param type [Integer]
|
2448
|
+
# @param id [Integer]
|
2449
|
+
# @param pos [Array(Integer, Integer), Wx::Point]
|
2450
|
+
# @return [ContextMenuEvent]
|
2451
|
+
def initialize(type=Wx::EVT_NULL, id=0, pos=Wx::DEFAULT_POSITION) end
|
2452
|
+
|
2453
|
+
# Returns the position in screen coordinates at which the menu should be shown.
|
2454
|
+
# Use {Wx::Window#screen_to_client} to convert to client coordinates.
|
2455
|
+
# You can also omit a position from {Wx::Window#popup_menu} in order to use the current mouse pointer position.
|
2456
|
+
# If the event originated from a keyboard event, the value returned from this function will be {Wx::DEFAULT_POSITION}.
|
2457
|
+
# @return [Wx::Point]
|
2458
|
+
def get_position; end
|
2459
|
+
alias_method :position, :get_position
|
2460
|
+
|
2461
|
+
# Sets the position at which the menu should be shown.
|
2462
|
+
# @param point [Array(Integer, Integer), Wx::Point]
|
2463
|
+
# @return [void]
|
2464
|
+
def set_position(point) end
|
2465
|
+
alias_method :position=, :set_position
|
2466
|
+
|
2467
|
+
end # ContextMenuEvent
|
2468
|
+
|
2469
|
+
# A child focus event is sent to a (parent-)window when one of its child windows gains focus, so that the window could restore the focus back to its corresponding child if it loses it now and regains later.
|
2470
|
+
# Notice that child window is the direct child of the window receiving event. Use {Wx::Window.find_focus} to retrieve the window which is actually getting focus.
|
2471
|
+
# === Events using this class
|
2472
|
+
#
|
2473
|
+
# The following event-handler methods redirect the events to member method or handler blocks for {Wx::ChildFocusEvent} events.
|
2474
|
+
# Event handler methods:
|
2475
|
+
# - {Wx::EvtHandler#evt_child_focus}(meth = nil, &block): Process a {Wx::EVT_CHILD_FOCUS} event.
|
2476
|
+
#
|
2477
|
+
# ===
|
2478
|
+
#
|
2479
|
+
# Category: {Wx::Events}
|
2480
|
+
# @see Events and Event Handling
|
2481
|
+
#
|
2482
|
+
#
|
2483
|
+
class ChildFocusEvent < CommandEvent
|
2484
|
+
|
2485
|
+
# Constructor.
|
2486
|
+
# @param win [Wx::Window] The direct child which is (or which contains the window which is) receiving the focus.
|
2487
|
+
# @return [ChildFocusEvent]
|
2488
|
+
def initialize(win=nil) end
|
2489
|
+
|
2490
|
+
# Returns the direct child which receives the focus, or a (grand-)parent of the control receiving the focus.
|
2491
|
+
# To get the actually focused control use {Wx::Window.find_focus}.
|
2492
|
+
# @return [Wx::Window]
|
2493
|
+
def get_window; end
|
2494
|
+
alias_method :window, :get_window
|
2495
|
+
|
2496
|
+
end # ChildFocusEvent
|
2497
|
+
|
2498
|
+
|
2499
|
+
end
|