wxruby3 0.9.0.pre.rc.1-x64-mingw-ucrt → 0.9.0.pre.rc.3-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/INSTALL.md +73 -22
- data/README.md +40 -8
- data/assets/hello_button-macos.png +0 -0
- data/assets/hello_button-msw.png +0 -0
- data/assets/hello_button_clicked-macos.png +0 -0
- data/assets/hello_button_clicked-msw.png +0 -0
- data/assets/hello_button_clicked_combi.png +0 -0
- data/assets/hello_world-macos.png +0 -0
- data/assets/hello_world-msw.png +0 -0
- data/assets/hello_world_combi.png +0 -0
- data/ext/wxbase32u_gcc_custom.dll +0 -0
- data/ext/wxbase32u_net_gcc_custom.dll +0 -0
- data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
- data/lib/wx/core/brush.rb +6 -0
- data/lib/wx/core/event_loop.rb +7 -0
- data/lib/wx/core/events/evt_list.rb +7 -0
- data/lib/wx/core/evthandler.rb +12 -2
- data/lib/wx/core/font.rb +22 -14
- data/lib/wx/core/helpprovider.rb +2 -2
- data/lib/wx/core/image.rb +33 -0
- data/lib/wx/core/listctrl.rb +17 -13
- data/lib/wx/core/log.rb +90 -0
- data/lib/wx/core/menu.rb +5 -0
- data/lib/wx/core/pen.rb +6 -0
- data/lib/wx/core/window.rb +28 -1
- data/lib/wx/doc/app.rb +40 -0
- data/lib/wx/doc/bitmap.rb +11 -15
- data/lib/wx/doc/brush.rb +17 -0
- data/lib/wx/doc/event_loop.rb +7 -0
- data/lib/wx/doc/extra/00_starting.md +6 -6
- data/lib/wx/doc/extra/02_lifecycles.md +9 -8
- data/lib/wx/doc/extra/09_exceptions.md +1 -1
- data/lib/wx/doc/extra/11_drawing_and_dc.md +4 -4
- data/lib/wx/doc/font.rb +27 -0
- data/lib/wx/doc/functions.rb +51 -23
- data/lib/wx/doc/gc_dc.rb +1 -1
- data/lib/wx/doc/gen/about_dialog_info.rb +1 -1
- data/lib/wx/doc/gen/accelerator.rb +6 -6
- data/lib/wx/doc/gen/accessible.rb +6 -2
- data/lib/wx/doc/gen/activity_indicator.rb +65 -0
- data/lib/wx/doc/gen/animation.rb +7 -7
- data/lib/wx/doc/gen/animation_ctrl.rb +7 -6
- data/lib/wx/doc/gen/any_button.rb +1 -1
- data/lib/wx/doc/gen/app.rb +17 -11
- data/lib/wx/doc/gen/art_provider.rb +61 -1
- data/lib/wx/doc/gen/aui/aui_dock_art.rb +12 -12
- data/lib/wx/doc/gen/aui/aui_floating_frame.rb +6 -6
- data/lib/wx/doc/gen/aui/aui_manager.rb +45 -27
- data/lib/wx/doc/gen/aui/aui_manager_event.rb +12 -6
- data/lib/wx/doc/gen/aui/aui_mdi_child_frame.rb +6 -6
- data/lib/wx/doc/gen/aui/aui_mdi_client_window.rb +6 -6
- data/lib/wx/doc/gen/aui/aui_mdi_parent_frame.rb +10 -10
- data/lib/wx/doc/gen/aui/aui_notebook.rb +34 -7
- data/lib/wx/doc/gen/aui/aui_notebook_event.rb +17 -2
- data/lib/wx/doc/gen/aui/aui_pane_info.rb +51 -51
- data/lib/wx/doc/gen/aui/aui_tab_art.rb +6 -6
- data/lib/wx/doc/gen/aui/aui_tool_bar.rb +35 -20
- data/lib/wx/doc/gen/aui/aui_tool_bar_art.rb +16 -16
- data/lib/wx/doc/gen/aui/aui_tool_bar_event.rb +4 -4
- data/lib/wx/doc/gen/aui/aui_tool_bar_item.rb +4 -4
- data/lib/wx/doc/gen/bitmap.rb +32 -26
- data/lib/wx/doc/gen/bitmap_button.rb +10 -6
- data/lib/wx/doc/gen/bitmap_combo_box.rb +12 -7
- data/lib/wx/doc/gen/book_ctrl_base.rb +7 -3
- data/lib/wx/doc/gen/book_ctrl_event.rb +2 -2
- data/lib/wx/doc/gen/box_sizer.rb +1 -1
- data/lib/wx/doc/gen/brush.rb +16 -4
- data/lib/wx/doc/gen/busy_info.rb +1 -1
- data/lib/wx/doc/gen/button.rb +19 -7
- data/lib/wx/doc/gen/calculate_layout_event.rb +2 -1
- data/lib/wx/doc/gen/calendar_ctrl.rb +28 -16
- data/lib/wx/doc/gen/calendar_date_attr.rb +2 -2
- data/lib/wx/doc/gen/calendar_event.rb +3 -3
- data/lib/wx/doc/gen/caret.rb +2 -2
- data/lib/wx/doc/gen/check_box.rb +10 -6
- data/lib/wx/doc/gen/check_list_box.rb +8 -7
- data/lib/wx/doc/gen/choice.rb +7 -6
- data/lib/wx/doc/gen/choicebook.rb +12 -6
- data/lib/wx/doc/gen/client_dc.rb +1 -1
- data/lib/wx/doc/gen/clipboard.rb +1 -1
- data/lib/wx/doc/gen/collapsible_pane.rb +9 -6
- data/lib/wx/doc/gen/collapsible_pane_event.rb +2 -1
- data/lib/wx/doc/gen/colour.rb +16 -6
- data/lib/wx/doc/gen/colour_dialog.rb +6 -6
- data/lib/wx/doc/gen/colour_picker_ctrl.rb +15 -9
- data/lib/wx/doc/gen/colour_picker_event.rb +7 -4
- data/lib/wx/doc/gen/combo_box.rb +22 -13
- data/lib/wx/doc/gen/context_help_button.rb +50 -1
- data/lib/wx/doc/gen/control.rb +9 -6
- data/lib/wx/doc/gen/core.rb +5 -2
- data/lib/wx/doc/gen/cursor.rb +16 -11
- data/lib/wx/doc/gen/data_format.rb +2 -2
- data/lib/wx/doc/gen/data_object.rb +23 -16
- data/lib/wx/doc/gen/date_event.rb +3 -3
- data/lib/wx/doc/gen/date_picker_ctrl.rb +11 -6
- data/lib/wx/doc/gen/dc.rb +37 -12
- data/lib/wx/doc/gen/defs.rb +16 -16
- data/lib/wx/doc/gen/dialog.rb +19 -5
- data/lib/wx/doc/gen/dir_dialog.rb +6 -2
- data/lib/wx/doc/gen/dir_filter_list_ctrl.rb +2 -2
- data/lib/wx/doc/gen/dir_picker_ctrl.rb +14 -9
- data/lib/wx/doc/gen/drag_drop.rb +15 -15
- data/lib/wx/doc/gen/drag_image.rb +6 -6
- data/lib/wx/doc/gen/editable_list_box.rb +7 -3
- data/lib/wx/doc/gen/event.rb +44 -13
- data/lib/wx/doc/gen/event_blocker.rb +19 -17
- data/lib/wx/doc/gen/event_filter.rb +43 -47
- data/lib/wx/doc/gen/event_list.rb +22 -15
- data/lib/wx/doc/gen/events.rb +215 -79
- data/lib/wx/doc/gen/evt_handler.rb +1 -1
- data/lib/wx/doc/gen/ext_help_controller.rb +1 -1
- data/lib/wx/doc/gen/file_dialog.rb +64 -56
- data/lib/wx/doc/gen/file_dir_picker_event.rb +5 -3
- data/lib/wx/doc/gen/file_picker_ctrl.rb +16 -8
- data/lib/wx/doc/gen/find_dialog_event.rb +7 -2
- data/lib/wx/doc/gen/find_replace_data.rb +1 -1
- data/lib/wx/doc/gen/find_replace_dialog.rb +1 -1
- data/lib/wx/doc/gen/flex_grid_sizer.rb +12 -6
- data/lib/wx/doc/gen/font.rb +39 -29
- data/lib/wx/doc/gen/font_data.rb +9 -5
- data/lib/wx/doc/gen/font_dialog.rb +3 -3
- data/lib/wx/doc/gen/font_picker_ctrl.rb +10 -6
- data/lib/wx/doc/gen/font_picker_event.rb +2 -1
- data/lib/wx/doc/gen/frame.rb +34 -11
- data/lib/wx/doc/gen/fs_file.rb +4 -17
- data/lib/wx/doc/gen/gauge.rb +11 -7
- data/lib/wx/doc/gen/gcdc.rb +5 -1
- data/lib/wx/doc/gen/gdi_common.rb +35 -33
- data/lib/wx/doc/gen/gdi_object.rb +1 -1
- data/lib/wx/doc/gen/generic_dir_ctrl.rb +13 -7
- data/lib/wx/doc/gen/graphics_context.rb +29 -28
- data/lib/wx/doc/gen/graphics_object.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_activatable_editor.rb +2 -2
- data/lib/wx/doc/gen/grid/grid_cell_attr.rb +10 -10
- data/lib/wx/doc/gen/grid/grid_cell_auto_wrap_string_editor.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_auto_wrap_string_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_bool_editor.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_bool_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_choice_editor.rb +2 -2
- data/lib/wx/doc/gen/grid/grid_cell_date_editor.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_date_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_date_time_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_editor.rb +13 -10
- data/lib/wx/doc/gen/grid/grid_cell_enum_editor.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_enum_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_float_editor.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_float_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_number_editor.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_number_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_renderer.rb +12 -12
- data/lib/wx/doc/gen/grid/grid_cell_string_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_text_editor.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_ctrl.rb +32 -18
- data/lib/wx/doc/gen/grid/grid_editor_created_event.rb +5 -3
- data/lib/wx/doc/gen/grid/grid_event.rb +20 -3
- data/lib/wx/doc/gen/grid/grid_range_select_event.rb +7 -3
- data/lib/wx/doc/gen/grid/grid_size_event.rb +9 -3
- data/lib/wx/doc/gen/grid/grid_string_table.rb +2 -2
- data/lib/wx/doc/gen/grid/grid_table_base.rb +7 -7
- data/lib/wx/doc/gen/grid/grid_table_message.rb +5 -5
- data/lib/wx/doc/gen/grid_bag_sizer.rb +5 -5
- data/lib/wx/doc/gen/grid_sizer.rb +4 -4
- data/lib/wx/doc/gen/gui_event_loop.rb +132 -0
- data/lib/wx/doc/gen/help_controller.rb +18 -12
- data/lib/wx/doc/gen/html/html_cell.rb +36 -18
- data/lib/wx/doc/gen/html/html_cell_event.rb +5 -3
- data/lib/wx/doc/gen/html/html_easy_printing.rb +9 -4
- data/lib/wx/doc/gen/html/html_help_controller.rb +34 -8
- data/lib/wx/doc/gen/html/html_help_data.rb +3 -3
- data/lib/wx/doc/gen/html/html_help_frame.rb +6 -6
- data/lib/wx/doc/gen/html/html_help_window.rb +12 -8
- data/lib/wx/doc/gen/html/html_link_event.rb +4 -3
- data/lib/wx/doc/gen/html/html_list_box.rb +15 -7
- data/lib/wx/doc/gen/html/html_printout.rb +15 -5
- data/lib/wx/doc/gen/html/html_window.rb +19 -8
- data/lib/wx/doc/gen/hyperlink_ctrl.rb +152 -0
- data/lib/wx/doc/gen/hyperlink_event.rb +44 -0
- data/lib/wx/doc/gen/icon.rb +14 -14
- data/lib/wx/doc/gen/image.rb +119 -64
- data/lib/wx/doc/gen/image_list.rb +10 -6
- data/lib/wx/doc/gen/keyboard_state.rb +7 -7
- data/lib/wx/doc/gen/list_box.rb +30 -21
- data/lib/wx/doc/gen/list_ctrl.rb +169 -78
- data/lib/wx/doc/gen/list_event.rb +24 -2
- data/lib/wx/doc/gen/listbook.rb +12 -6
- data/lib/wx/doc/gen/locale.rb +11 -36
- data/lib/wx/doc/gen/log.rb +122 -45
- data/lib/wx/doc/gen/mdi_client_window.rb +2 -2
- data/lib/wx/doc/gen/mdi_frame.rb +15 -9
- data/lib/wx/doc/gen/media_ctrl.rb +7 -4
- data/lib/wx/doc/gen/media_event.rb +8 -2
- data/lib/wx/doc/gen/memory_dc.rb +23 -27
- data/lib/wx/doc/gen/menu.rb +9 -9
- data/lib/wx/doc/gen/menu_bar.rb +4 -10
- data/lib/wx/doc/gen/menu_item.rb +115 -34
- data/lib/wx/doc/gen/message_dialog.rb +48 -30
- data/lib/wx/doc/gen/mini_frame.rb +12 -3
- data/lib/wx/doc/gen/mouse_state.rb +1 -1
- data/lib/wx/doc/gen/multi_choice_dialog.rb +4 -2
- data/lib/wx/doc/gen/non_owned_window.rb +6 -7
- data/lib/wx/doc/gen/notebook.rb +20 -15
- data/lib/wx/doc/gen/number_entry_dialog.rb +2 -2
- data/lib/wx/doc/gen/object.rb +2 -2
- data/lib/wx/doc/gen/palette.rb +3 -3
- data/lib/wx/doc/gen/panel.rb +4 -3
- data/lib/wx/doc/gen/pen.rb +25 -12
- data/lib/wx/doc/gen/pg/numeric_property_validator.rb +1 -1
- data/lib/wx/doc/gen/pg/pg_array_editor_dialog.rb +3 -3
- data/lib/wx/doc/gen/pg/pg_cell.rb +12 -12
- data/lib/wx/doc/gen/pg/pg_editor.rb +76 -74
- data/lib/wx/doc/gen/pg/pg_multi_button.rb +3 -3
- data/lib/wx/doc/gen/pg/pg_properties.rb +221 -138
- data/lib/wx/doc/gen/pg/pg_property.rb +103 -54
- data/lib/wx/doc/gen/pg/pg_validation_info.rb +1 -1
- data/lib/wx/doc/gen/pg/property_grid.rb +19 -19
- data/lib/wx/doc/gen/pg/property_grid_event.rb +18 -5
- data/lib/wx/doc/gen/pg/property_grid_interface.rb +36 -24
- data/lib/wx/doc/gen/pg/property_grid_manager.rb +12 -12
- data/lib/wx/doc/gen/pg/property_grid_page.rb +12 -11
- data/lib/wx/doc/gen/pg/property_grid_page_state.rb +8 -8
- data/lib/wx/doc/gen/picker_base.rb +12 -11
- data/lib/wx/doc/gen/platform_info.rb +7 -7
- data/lib/wx/doc/gen/popup_window.rb +6 -6
- data/lib/wx/doc/gen/progress_dialog.rb +1 -1
- data/lib/wx/doc/gen/property_sheet_dialog.rb +19 -17
- data/lib/wx/doc/gen/prt/page_setup_dialog.rb +2 -2
- data/lib/wx/doc/gen/prt/preview_frame.rb +4 -1
- data/lib/wx/doc/gen/prt/print_abort_dialog.rb +1 -1
- data/lib/wx/doc/gen/prt/print_data.rb +24 -18
- data/lib/wx/doc/gen/prt/print_dialog.rb +4 -4
- data/lib/wx/doc/gen/prt/printer.rb +22 -22
- data/lib/wx/doc/gen/query_layout_info_event.rb +2 -1
- data/lib/wx/doc/gen/radio_box.rb +12 -18
- data/lib/wx/doc/gen/radio_button.rb +8 -6
- data/lib/wx/doc/gen/rbn/ribbon_art_provider.rb +39 -39
- data/lib/wx/doc/gen/rbn/ribbon_bar.rb +25 -7
- data/lib/wx/doc/gen/rbn/ribbon_bar_event.rb +5 -5
- data/lib/wx/doc/gen/rbn/ribbon_button_bar.rb +9 -2
- data/lib/wx/doc/gen/rbn/ribbon_button_bar_event.rb +5 -5
- data/lib/wx/doc/gen/rbn/ribbon_control.rb +4 -4
- data/lib/wx/doc/gen/rbn/ribbon_gallery.rb +6 -2
- data/lib/wx/doc/gen/rbn/ribbon_gallery_event.rb +5 -5
- data/lib/wx/doc/gen/rbn/ribbon_page.rb +5 -5
- data/lib/wx/doc/gen/rbn/ribbon_panel.rb +12 -6
- data/lib/wx/doc/gen/rbn/ribbon_panel_event.rb +5 -5
- data/lib/wx/doc/gen/rbn/ribbon_tool_bar.rb +4 -2
- data/lib/wx/doc/gen/rbn/ribbon_tool_bar_event.rb +5 -5
- data/lib/wx/doc/gen/region.rb +9 -8
- data/lib/wx/doc/gen/region_iterator.rb +2 -2
- data/lib/wx/doc/gen/rtc/rich_text_buffer.rb +92 -92
- data/lib/wx/doc/gen/rtc/rich_text_ctrl.rb +56 -34
- data/lib/wx/doc/gen/rtc/rich_text_event.rb +23 -4
- data/lib/wx/doc/gen/rtc/rich_text_file_handler.rb +6 -6
- data/lib/wx/doc/gen/rtc/rich_text_header_footer_data.rb +9 -5
- data/lib/wx/doc/gen/rtc/rich_text_html_handler.rb +6 -2
- data/lib/wx/doc/gen/rtc/rich_text_printing.rb +12 -12
- data/lib/wx/doc/gen/rtc/rich_text_xml_handler.rb +1 -1
- data/lib/wx/doc/gen/rtc/symbol_picker_dialog.rb +2 -2
- data/lib/wx/doc/gen/sash_event.rb +3 -1
- data/lib/wx/doc/gen/sash_layout_window.rb +5 -3
- data/lib/wx/doc/gen/sash_window.rb +8 -3
- data/lib/wx/doc/gen/scroll_bar.rb +29 -8
- data/lib/wx/doc/gen/scrolled_canvas.rb +41 -23
- data/lib/wx/doc/gen/scrolled_control.rb +41 -23
- data/lib/wx/doc/gen/scrolled_window.rb +41 -23
- data/lib/wx/doc/gen/search_ctrl.rb +15 -8
- data/lib/wx/doc/gen/simplebook.rb +2 -2
- data/lib/wx/doc/gen/single_choice_dialog.rb +4 -2
- data/lib/wx/doc/gen/sizer.rb +29 -28
- data/lib/wx/doc/gen/slider.rb +49 -16
- data/lib/wx/doc/gen/spin_button.rb +15 -9
- data/lib/wx/doc/gen/spin_ctrl.rb +12 -6
- data/lib/wx/doc/gen/spin_event.rb +5 -2
- data/lib/wx/doc/gen/splash_screen.rb +16 -12
- data/lib/wx/doc/gen/splitter_event.rb +6 -2
- data/lib/wx/doc/gen/splitter_window.rb +20 -4
- data/lib/wx/doc/gen/static_bitmap.rb +5 -5
- data/lib/wx/doc/gen/static_box.rb +36 -32
- data/lib/wx/doc/gen/static_box_sizer.rb +13 -10
- data/lib/wx/doc/gen/static_line.rb +5 -4
- data/lib/wx/doc/gen/static_text.rb +12 -6
- data/lib/wx/doc/gen/status_bar.rb +14 -5
- data/lib/wx/doc/gen/stc/styled_text_ctrl.rb +55 -7
- data/lib/wx/doc/gen/stc/styled_text_event.rb +224 -49
- data/lib/wx/doc/gen/std_dialog_button_sizer.rb +11 -2
- data/lib/wx/doc/gen/svg_file_dc.rb +3 -3
- data/lib/wx/doc/gen/system_options.rb +11 -1
- data/lib/wx/doc/gen/system_settings.rb +3 -3
- data/lib/wx/doc/gen/task_bar_icon.rb +10 -2
- data/lib/wx/doc/gen/task_bar_icon_event.rb +3 -3
- data/lib/wx/doc/gen/text_attr.rb +11 -7
- data/lib/wx/doc/gen/text_ctrl.rb +61 -92
- data/lib/wx/doc/gen/text_entry.rb +28 -40
- data/lib/wx/doc/gen/text_entry_dialog.rb +19 -19
- data/lib/wx/doc/gen/text_validator.rb +0 -11
- data/lib/wx/doc/gen/time_picker_ctrl.rb +6 -5
- data/lib/wx/doc/gen/timer.rb +8 -4
- data/lib/wx/doc/gen/timer_event.rb +19 -26
- data/lib/wx/doc/gen/tip_provider.rb +1 -1
- data/lib/wx/doc/gen/toggle_button.rb +6 -5
- data/lib/wx/doc/gen/tool_bar.rb +41 -24
- data/lib/wx/doc/gen/tool_tip.rb +2 -2
- data/lib/wx/doc/gen/toolbook.rb +6 -3
- data/lib/wx/doc/gen/top_level_window.rb +35 -25
- data/lib/wx/doc/gen/tree_ctrl.rb +63 -13
- data/lib/wx/doc/gen/tree_event.rb +23 -2
- data/lib/wx/doc/gen/treebook.rb +6 -2
- data/lib/wx/doc/gen/ui_action_simulator.rb +1 -1
- data/lib/wx/doc/gen/utils.rb +9 -3
- data/lib/wx/doc/gen/v_list_box.rb +2 -2
- data/lib/wx/doc/gen/v_scrolled_window.rb +2 -2
- data/lib/wx/doc/gen/validator.rb +7 -5
- data/lib/wx/doc/gen/variant.rb +34 -97
- data/lib/wx/doc/gen/window.rb +157 -102
- data/lib/wx/doc/gen/window_dc.rb +1 -1
- data/lib/wx/doc/gen/with_images.rb +1 -1
- data/lib/wx/doc/gen/wizard.rb +17 -4
- data/lib/wx/doc/gen/wizard_event.rb +9 -2
- data/lib/wx/doc/gen/wizard_page.rb +1 -1
- data/lib/wx/doc/gen/wizard_page_simple.rb +7 -7
- data/lib/wx/doc/gen/xml_node.rb +3 -3
- data/lib/wx/doc/gen/xml_resource.rb +12 -9
- data/lib/wx/doc/image.rb +42 -12
- data/lib/wx/doc/list_ctrl.rb +32 -0
- data/lib/wx/doc/log.rb +28 -0
- data/lib/wx/doc/pen.rb +17 -0
- data/lib/wx/doc/prt/printer_dc.rb +2 -2
- data/lib/wx/doc/radio_box.rb +20 -0
- data/lib/wx/doc/scaled_dc.rb +1 -1
- data/lib/wx/doc/text_validator.rb +12 -0
- data/lib/wx/doc/window.rb +27 -0
- data/lib/wx/keyword_defs.rb +77 -76
- data/lib/wx/prt/keyword_defs.rb +5 -1
- data/lib/wx/version.rb +1 -1
- data/lib/wxruby_aui.so +0 -0
- data/lib/wxruby_core.so +0 -0
- data/lib/wxruby_grid.so +0 -0
- data/lib/wxruby_html.so +0 -0
- data/lib/wxruby_pg.so +0 -0
- data/lib/wxruby_prt.so +0 -0
- data/lib/wxruby_rbn.so +0 -0
- data/lib/wxruby_rtc.so +0 -0
- data/lib/wxruby_stc.so +0 -0
- data/rakelib/install.rb +17 -6
- data/rakelib/lib/config/linux.rb +4 -2
- data/rakelib/lib/config/macosx.rb +120 -1
- data/rakelib/lib/config/mingw.rb +6 -1
- data/rakelib/lib/config/unixish.rb +26 -11
- data/rakelib/lib/config.rb +15 -6
- data/samples/aui/aui.rb +432 -363
- data/samples/propgrid/propgrid.rb +3 -0
- data/samples/sampler/editor.rb +33 -25
- data/samples/sampler/sample.rb +2 -2
- data/samples/sampler/stc_editor.rb +4 -2
- data/tests/lib/item_container_tests.rb +82 -0
- data/tests/lib/text_entry_tests.rb +80 -0
- data/tests/lib/wxapp_runner.rb +12 -0
- data/tests/lib/wxframe_runner.rb +89 -4
- data/tests/test_art.rb +9 -0
- data/tests/test_box_sizer.rb +161 -0
- data/tests/test_ext_controls.rb +28 -0
- data/tests/test_font.rb +239 -0
- data/tests/test_grid_sizer.rb +148 -0
- data/tests/test_intl.rb +5 -1
- data/tests/test_list_ctrl.rb +53 -0
- data/tests/test_log.rb +163 -0
- data/tests/test_std_controls.rb +321 -37
- data/tests/test_timer.rb +95 -0
- data/tests/test_window.rb +340 -0
- metadata +36 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb68ca47dc52aa1c4ff478322597d44502782a0d58228d94a448d41963614ba6
|
4
|
+
data.tar.gz: 7799517b7e2018421436f41dce8e3f7a5faa9c0cd2b2c4df93b6e2558904a464
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87cffdbf4f24e354a0b68337a01923c4f5c04084f5cebd02e5a8f7a065e7d92c8fa413852fd008bce63e841f2e031bd776d43009fdb997dd04cbaf1516b9024f
|
7
|
+
data.tar.gz: 434e080088dd9b85becebeb57c56f48c7465940553c56717a946cddf4e3eed31f81e4cccf22e9a715761007696e012f5a2f441edc8f21b307b405f41dfcf0d96
|
data/INSTALL.md
CHANGED
@@ -4,32 +4,56 @@
|
|
4
4
|
|
5
5
|
# Installation of wxRuby3
|
6
6
|
|
7
|
+
Below are installation instructions for Linux, Windows, and Mac (both AMD64 and ARM64).
|
8
|
+
|
9
|
+
## Minimal requirements for installing wxRuby3
|
10
|
+
|
11
|
+
The minimal requirements for installing any source based setup (gem, source package or Github clone) of wxRuby3 are:
|
12
|
+
|
13
|
+
| Sofware | Notes |
|
14
|
+
|-----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
15
|
+
| Ruby | A supported version of the Ruby interpreter needs to be installed. |
|
16
|
+
| C++ compiler<br>(incl. dev tools like `make`) | On linux a recent version of the GNU C++ compiler (with c++-14 support) needs to be installed<br>On Windows the RubyInstaller MSYS2-Devkit needs to be installed<br>On MacOS XCode with commandline tools needs to be installed via `sudo xcode-select --install` |
|
17
|
+
| Git version control toolkit | |
|
18
|
+
| SWIG >= 3.0.12 | On MacOS install [Homebrew](https://brew.sh/) and than `brew install swig` |
|
19
|
+
| Doxygen (>= 1.9.1, <= 1.9.6) | Doxygen > 1.9.6 has changes that cause problems with the wxWidgets doxygen files.<br>On MacOS: `brew tap mcorino/wxruby3` and than `brew install doxygen@1.9.6` (default brew recipe installs 1.9.7) |
|
20
|
+
| wxWidgets (>= 3.2) | See [wxWidgets installation](#wxwidgets-installation) |
|
21
|
+
|
22
|
+
The wxRuby3 build process requires `git` to clone a copy of the wxWidgets Github repository to extract the interface
|
23
|
+
specifications from.<br>
|
24
|
+
The wxRuby3 build process needs doxygen to generated XML files containing wxWidgets interface specs which are used to
|
25
|
+
generate SWIG interface definitions from which SWIG to generates C++ source code for the wrapper interfaces from
|
26
|
+
which the native extension is compiled.
|
27
|
+
|
7
28
|
## Installation of a wxRuby3 Gem
|
8
29
|
|
9
30
|
The wxRuby3 project provides gems on [RubyGems](https://rubygems.org) which can be installed with the
|
10
31
|
standard `gem install` command line this:
|
11
32
|
|
12
|
-
```
|
33
|
+
```shell
|
13
34
|
gem install wxruby3
|
14
35
|
```
|
15
36
|
|
16
37
|
On Linux systems this will install the source based gem which will automatically build the native wxruby3 extension
|
17
38
|
for the platform on which wxRuby3 is being installed.
|
18
39
|
On Windows systems a prebuilt binary gem is available for the latest stable release(s) of [RubyInstaller](https://rubyinstaller.org)
|
19
|
-
installed rubies that will be installed by default if installing for that platform
|
20
|
-
|
40
|
+
installed rubies that will be installed by default if installing for that platform (including an embedded, latest
|
41
|
+
stable version, wxWidgets installation).<br>
|
42
|
+
Alternatively the source gem can be installed on Windows by installing with explicit platform specification like this:
|
21
43
|
|
22
|
-
```
|
44
|
+
```shell
|
23
45
|
gem install wxruby3 --platform=ruby
|
24
46
|
```
|
25
47
|
|
26
|
-
When installing the source gem the
|
48
|
+
When installing the source gem the minimal requirements listed above apply.
|
27
49
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
50
|
+
On MacOS, if wxWidgets was not available, you can pull in the latest wxWidgets and build it by adding the `WITH_WXWIN=1` option:
|
51
|
+
|
52
|
+
```shell
|
53
|
+
gem install wxruby3 -- WITH_WXWIN=1
|
54
|
+
```
|
55
|
+
|
56
|
+
### wxWidgets installation
|
33
57
|
|
34
58
|
Also a wxWidgets installation (version 3.2 or later) is required for which there are multiple options.
|
35
59
|
|
@@ -39,38 +63,65 @@ Also a wxWidgets installation (version 3.2 or later) is required for which there
|
|
39
63
|
The wxRuby build procedure will determine the availability and version of wxWidgets by locating and calling
|
40
64
|
the `wx-config` utility script. In case no (compatible) wxWidgets version is found installation ends with an error.<br>
|
41
65
|
Please note that even with this method a copy of the wxWidgets project will be checked out from GitHUb as the wxRuby3
|
42
|
-
build procedure requires access to the wxWidgets interface specification sources
|
66
|
+
build procedure requires access to the wxWidgets interface specification sources which are not normally part of any of
|
67
|
+
the standard distribution packages.
|
43
68
|
|
69
|
+
On MacOS, you can install wxWidgets via [Homebrew](https://brew.sh/):
|
70
|
+
|
71
|
+
```shell
|
72
|
+
brew install wxwidgets
|
73
|
+
```
|
74
|
+
|
75
|
+
Afterwards, you can install the Ruby gem and it will detect wxWidgets in the system automatically:
|
76
|
+
|
77
|
+
```shell
|
78
|
+
gem install wxruby3
|
79
|
+
```
|
44
80
|
|
45
81
|
2. User installed wxWidgets version<br>
|
46
82
|
<br>
|
47
|
-
In case the being
|
83
|
+
In case the system being installed on does not provide (a compatible) wxWidgets version or a specific (possibly updated)
|
48
84
|
wxWidgets version is required the source gem can be installed using a user installed version like this (where the
|
49
85
|
`WXWIN` path should provide the location where the wxWidgets binaries are installed under `<wxwin path>/bin`):<br>
|
50
86
|
|
51
|
-
```
|
87
|
+
```shell
|
52
88
|
gem install wxruby3 -- WXWIN=/path/to/wx/install
|
53
89
|
```
|
54
|
-
|
55
|
-
3. Automatic installed wxWidgets version<br>
|
90
|
+
|
91
|
+
3. Automatic installed, embedded, wxWidgets version<br>
|
56
92
|
<br>
|
57
|
-
This is the easiest method when the being
|
93
|
+
This is the easiest method when the system being installed on does not provide (a compatible) wxWidgets version (and
|
58
94
|
no specific user defined version is required) and can be used by installing the source gem like this (which will
|
59
|
-
cause automatic checkout and building of the latest wxWidgets release (>= 3.2) from GitHub:
|
60
|
-
|
95
|
+
cause automatic checkout and building of the latest stable wxWidgets release (>= 3.2) from GitHub:
|
61
96
|
|
62
|
-
```
|
97
|
+
```shell
|
63
98
|
gem install wxruby3 -- WITH_WXWIN=1
|
64
99
|
```
|
65
100
|
|
101
|
+
In case of option **2** it is also possible to do the doxygen XML generation as part of the wxWidgets user installation
|
102
|
+
and use that for the gem installation. In that case the user is required to generate the XML interface specs using the
|
103
|
+
`regen` script found in the `docs/doxygen` folder of the wxWidgets installation after which the XML output folder can be
|
104
|
+
provided to the gem installation as follows:
|
105
|
+
|
106
|
+
```shell
|
107
|
+
gem install wxruby3 -- WXWIN=/path/to/wx/install WXXML=/path/to/wx/doxygen/xml
|
108
|
+
```
|
109
|
+
|
110
|
+
Please also not that in case of option two the user is responsible to make sure the wxWidgets shared libraries can be
|
111
|
+
found by the system's dynamic loader at runtime.
|
112
|
+
|
66
113
|
> **NOTE:** Be patient when installing the source gem. Building wxRuby3 takes a while and when wxWidgets is included event more.
|
67
114
|
|
115
|
+
> **NOTE:** Be aware that for prerelease versions of the gem you should add the `--pre` argument to the `gem install` command.
|
116
|
+
|
68
117
|
## Building from source
|
69
118
|
|
70
|
-
Checkout the wxRuby3 sources from [GitHub](https://github.com/mcorino/wxRuby3).
|
119
|
+
Checkout the wxRuby3 sources from [GitHub](https://github.com/mcorino/wxRuby3) or download and unpack a release package.
|
71
120
|
|
72
|
-
|
73
|
-
of the wxRuby3 tree
|
121
|
+
Requirements are the same as for installing the source gem. Gem dependencies are listed in the Gemfile in the root
|
122
|
+
of the wxRuby3 tree and should be installed by executing `bundle install`.<br>
|
123
|
+
To be able to generate HTML documentation the optional `:documentation` group should be included.<br>
|
124
|
+
To be able to run the Rake memory check task the option `:develop` group should be included.
|
74
125
|
|
75
126
|
The wxRuby3 project provides a Rake based build system. Call `rake help` to get an overview of the available commands.
|
76
127
|
As mentioned there the `rake configure` command is required as the very first command. Call `rake configure[--help]` to
|
data/README.md
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
[![Linux wxGTK](https://github.com/mcorino/wxRuby3/actions/workflows/linux.yml/badge.svg)](https://github.com/mcorino/wxRuby3/actions/workflows/linux.yml)
|
2
2
|
[![Windows wxMSW](https://github.com/mcorino/wxRuby3/actions/workflows/msw.yml/badge.svg)](https://github.com/mcorino/wxRuby3/actions/workflows/msw.yml)
|
3
|
+
[![Mac wxOSX](https://github.com/mcorino/wxRuby3/actions/workflows/mac.yml/badge.svg)](https://github.com/mcorino/wxRuby3/actions/workflows/mac.yml)
|
4
|
+
|
3
5
|
[![License](https://img.shields.io/badge/license-MIT-yellowgreen.svg)](LICENSE)
|
4
6
|
[![Gem Version](https://badge.fury.io/rb/wxruby3.svg)](https://badge.fury.io/rb/wxruby3)
|
5
|
-
|
6
7
|
[![Documentation](https://img.shields.io/badge/docs-pages-blue.svg)](https://mcorino.github.io/wxRuby3)
|
8
|
+
[![Chat](https://img.shields.io/gitter/room/mcorino/wxruby)](https://gitter.im/mcorino/wxruby3)
|
7
9
|
|
8
10
|
# README for wxRuby3
|
9
11
|
|
@@ -33,13 +35,13 @@ Wx::App.run do
|
|
33
35
|
end
|
34
36
|
```
|
35
37
|
|
36
|
-
![Hello_World](assets/
|
38
|
+
![Hello_World](assets/hello_world_combi.png "Hello World sample")
|
37
39
|
|
38
40
|
### Hello Button
|
39
41
|
|
40
42
|
Anyone who is familiar with wxWidgets should feel right at home since the API may be Ruby-fied, it is still easily
|
41
43
|
recognizable (but being Ruby-fied allowing for elegant and compact coding). And for those that do not have previous
|
42
|
-
experience do not fear, wxRuby3 comes with detailed [documentation](https://mcorino.github.io/wxRuby3/file.00_starting.html) and lots of examples and
|
44
|
+
experience, do not fear, wxRuby3 comes with detailed [documentation](https://mcorino.github.io/wxRuby3/file.00_starting.html) and lots of examples and tests.
|
43
45
|
|
44
46
|
```ruby
|
45
47
|
require 'wx'
|
@@ -56,8 +58,7 @@ end
|
|
56
58
|
Wx::App.run { TheFrame.new('Hello world!').show }
|
57
59
|
```
|
58
60
|
|
59
|
-
![
|
60
|
-
![Hello_Button_Clicked](assets/hello_button_clicked.png "Hello Button sample clicked")
|
61
|
+
![Hello_Button_Clicked](assets/hello_button_clicked_combi.png "Hello Button sample clicked")
|
61
62
|
|
62
63
|
|
63
64
|
## wxRuby3 licence
|
@@ -99,12 +100,39 @@ Currently the following are fully supported:
|
|
99
100
|
|----------------------------------------------------------------------------|-----------------| --- |
|
100
101
|
| Windows 10 (tested)<br>(most likely also Windows 11) | Ruby >= 2.5<br>(RubyInstaller MSYS2-DevKit) | wxWidgets >= 3.2 |
|
101
102
|
| Linux (tested; any AMD-64 distribution)<br>(most likely also i686 and ARM) | Ruby >= 2.5 | wxWidgets >= 3.2 |
|
103
|
+
| MacOS >= 10.10 using Cocoa (tested on AMD-64 and ARM64 M2 Chip) | Ruby >= 2.5 | wxWidgets >= 3.2 |
|
102
104
|
|
103
105
|
Support for other platforms is not being actively developed at present,
|
104
106
|
but patches are welcome. It is likely to be much simpler to get wxRuby
|
105
107
|
working on similar modern systems (eg FreeBSD or Solaris with GTK) than
|
106
108
|
on legacy systems (eg Windows 98, Mac OS 9).
|
107
109
|
|
110
|
+
### How can I install wxRuby3?
|
111
|
+
|
112
|
+
wxRuby3 is distributed as a Ruby gem on [RubyGems](https://rubygems.org).<br>
|
113
|
+
Apart from a regular source-only version of the gem there is also a binary gem version for Windows 10 provided (for the
|
114
|
+
latest stable Ruby version at the time of publishing) which includes an embedded wxWidgets installation (also latest
|
115
|
+
stable version).
|
116
|
+
|
117
|
+
Installing the binary gem version on Windows requires no additional software to be installed except for a supported
|
118
|
+
version of the Ruby interpreter.<br>
|
119
|
+
To install the source-only gem the following software is required:
|
120
|
+
|
121
|
+
| Sofware | Notes |
|
122
|
+
|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
123
|
+
| Ruby | A supported version of the Ruby interpreter needs to be installed. |
|
124
|
+
| C++ compiler<br>(incl. dev tools like `make`) | On linux a recent version of the GNU C++ compiler (with c++-14 support) needs to be installed<br>On Windows the RubyInstaller MSYS2-Devkit needs to be installed<br>On MacOS XCode with commandline tools needs to be installed |
|
125
|
+
| Git version control toolkit | |
|
126
|
+
| SWIG >= 3.0.12 | On MacOS install [Homebrew](https://brew.sh/) and than `brew install swig` |
|
127
|
+
| Doxygen (>= 1.9.1, <= 1.9.6) | Doxygen > 1.9.6 has changes that cause problems with the wxWidgets doxygen files.<br>On MacOS: `brew tap mcorino/wxruby3` and than `brew install doxygen@1.9.6` (default brew recipe installs 1.9.7) |
|
128
|
+
| wxWidgets >= 3.2 (*OPTIONAL*) | On Linux most distributions provide system installable (development) packages for wxWidgets providing a supported version. Alternatively you can fairly easily install your own preferred version manually (see the [wxWidgets](https://wxwidgets.org) project for details).<br>On Windows and MacOS the process is less straightforward (also here see the [wxWidgets](https://wxwidgets.org) project for details).<br>The wxRuby3 source-only gem can also be installed using a private local wxWidgets installation or an embedded installation (most likely preferred on Windows and MacOS). See [INSTALL](INSTALL.md) for more details. |
|
129
|
+
|
130
|
+
In case the prerequisites above are met the (source-only or binary) gem can be installed executing the following command:
|
131
|
+
|
132
|
+
```shell
|
133
|
+
gem install wxruby3
|
134
|
+
```
|
135
|
+
|
108
136
|
### Where can I ask a question, or report a bug?
|
109
137
|
|
110
138
|
Use GitHUb Issues.
|
@@ -130,7 +158,7 @@ some use a more modern coding style than others.
|
|
130
158
|
|
131
159
|
Complete (more or less) wxRuby API documentation should be part of any
|
132
160
|
complete wxRuby3 build. This tends to focus on providing a reference
|
133
|
-
of all available modules, classes
|
161
|
+
of all available modules, classes and methods and how to use specific
|
134
162
|
classes and methods, rather than on how to construct an application
|
135
163
|
overall.
|
136
164
|
This documentation (for the latest release) is also available online
|
@@ -162,7 +190,7 @@ If you know of a feature in wxWidgets that you would like to see
|
|
162
190
|
supported in wxRuby3 you are free to ask but do not **EXPECT** unconditional
|
163
191
|
agreement or immediate response.
|
164
192
|
|
165
|
-
### How does wxRuby3 relate to the wxRuby 2.0 (and even older 0.6.0 release
|
193
|
+
### How does wxRuby3 relate to the wxRuby 2.0 (and even older 0.6.0) release?
|
166
194
|
|
167
195
|
wxRuby 0.6.0 was the last in a series of releases developed using a
|
168
196
|
different approach in the early days of wxRuby. Work on this series
|
@@ -180,5 +208,9 @@ maintainable solution.
|
|
180
208
|
|
181
209
|
### I am getting an error trying to install or compile wxRuby3
|
182
210
|
|
183
|
-
Please double-check the [INSTALL](INSTALL.md)
|
211
|
+
Please double-check the instructions above and in the [INSTALL](INSTALL.md) document and search issue archives. If
|
184
212
|
this doesn't help, please post your question using GitHub Issues.
|
213
|
+
|
214
|
+
### Is there another, more declarative way, for writing wxRuby3 desktop GUI applications?
|
215
|
+
|
216
|
+
Yes. [Glimmer DSL for WX](https://github.com/AndyObtiva/glimmer-dsl-wx) enables software engineers to build GUI using wxruby3 following the Ruby way with the least amount of code possible. That is by offering a minimalistic declarative high-level DSL that maps visually to the way software engineers think about the GUI hierarchy in addition to adopting Rails' strategy of Convention over Configuration via smart defaults and automation of wxruby3 low-level details. You can check out the [Glimmer DSL for WX README "Coming From wxruby3" section](https://github.com/AndyObtiva/glimmer-dsl-wx#coming-from-wxruby3) for more information on how to translate wxruby3 apps to [Glimmer DSL for WX](https://github.com/AndyObtiva/glimmer-dsl-wx) syntax.
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1002,6 +1002,12 @@ class Wx::EvtHandler
|
|
1002
1002
|
Wx::EVT_MEDIA_PAUSE,
|
1003
1003
|
Wx::MediaEvent
|
1004
1004
|
] if Wx.const_defined?(:EVT_MEDIA_PAUSE)
|
1005
|
+
# from wxHyperlinkEvent
|
1006
|
+
self.register_event_type EventType[
|
1007
|
+
'evt_hyperlink', 1,
|
1008
|
+
Wx::EVT_HYPERLINK,
|
1009
|
+
Wx::HyperlinkEvent
|
1010
|
+
] if Wx.const_defined?(:EVT_HYPERLINK)
|
1005
1011
|
# from wxCommandEvent
|
1006
1012
|
self.register_event_type EventType[
|
1007
1013
|
'evt_button', 1,
|
@@ -1388,4 +1394,5 @@ class Wx::EvtHandler
|
|
1388
1394
|
Wx::EVT_DIRCTRL_FILEACTIVATED,
|
1389
1395
|
Wx::GenericDirCtrl
|
1390
1396
|
] if Wx.const_defined?(:EVT_DIRCTRL_FILEACTIVATED)
|
1397
|
+
# from wxHyperlinkCtrl
|
1391
1398
|
end
|
data/lib/wx/core/evthandler.rb
CHANGED
@@ -22,9 +22,17 @@ class Wx::EvtHandler
|
|
22
22
|
# methods; used internally by disconnect (see EvtHandler.i)
|
23
23
|
EVENT_NAME_TYPE_MAP = {}
|
24
24
|
private_constant :EVENT_NAME_TYPE_MAP
|
25
|
+
# Hash to look up event handler arity from symbol names of evt handler
|
26
|
+
# methods; internal use
|
27
|
+
EVENT_NAME_EVENT_ARITY_MAP = {}
|
28
|
+
private_constant :EVENT_NAME_EVENT_ARITY_MAP
|
25
29
|
|
26
30
|
class << self
|
27
31
|
|
32
|
+
def event_type_arity(name)
|
33
|
+
EVENT_NAME_EVENT_ARITY_MAP[name.to_sym] || 0
|
34
|
+
end
|
35
|
+
|
28
36
|
def get_event_type_class_map
|
29
37
|
EVENT_TYPE_CLASS_MAP
|
30
38
|
end
|
@@ -79,8 +87,8 @@ class Wx::EvtHandler
|
|
79
87
|
|
80
88
|
# Given the Integer constant Wx::EVT_XXX, returns the convenience
|
81
89
|
# handler method name associated with that type of event.
|
82
|
-
def self.event_name_for_type(
|
83
|
-
EVENT_NAME_TYPE_MAP.key(
|
90
|
+
def self.event_name_for_type(evt_id)
|
91
|
+
EVENT_NAME_TYPE_MAP.key(evt_id)
|
84
92
|
end
|
85
93
|
|
86
94
|
# Given an integer value +int_val+, returns the name of the EVT_xxx
|
@@ -121,6 +129,8 @@ class Wx::EvtHandler
|
|
121
129
|
return
|
122
130
|
end
|
123
131
|
|
132
|
+
EVENT_NAME_EVENT_ARITY_MAP[ev_type.name.to_sym] = ev_type.arity
|
133
|
+
|
124
134
|
# set up the evt_xxx method
|
125
135
|
case ev_type.arity
|
126
136
|
when 0 # events without an id
|
data/lib/wx/core/font.rb
CHANGED
@@ -1,22 +1,30 @@
|
|
1
1
|
|
2
2
|
require_relative './font/encoding'
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
module Wx
|
5
|
+
|
6
|
+
class Font
|
7
|
+
class << self
|
8
|
+
# Returns the name of the platform's default font encoding
|
9
|
+
def get_default_encoding_name
|
10
|
+
ENCODING_NAMES[ get_default_encoding ]
|
11
|
+
end
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
# Sets the default encoding to be +enc+, which may be the string
|
14
|
+
# name of an encoding (eg 'UTF8') or an internal WxWidgets flag
|
15
|
+
# (eg Wx::FONTENCODING_UTF8).
|
16
|
+
def set_default_encoding_name(enc)
|
17
|
+
if flag_int = ENCODING_NAMES.index(enc.upcase)
|
18
|
+
set_default_encoding(Wx::FontEncoding.new(flag_int))
|
19
|
+
else
|
20
|
+
raise ArgumentError, "Unknown font encoding name '#{enc}'"
|
21
|
+
end
|
19
22
|
end
|
20
23
|
end
|
21
24
|
end
|
25
|
+
|
26
|
+
# make this simply an alias for the Font class so the #find_or_create_font methods
|
27
|
+
# can be accessed through that name too.
|
28
|
+
TheFontList = Font
|
29
|
+
|
22
30
|
end
|
data/lib/wx/core/helpprovider.rb
CHANGED
@@ -6,9 +6,9 @@ class Wx::HelpProvider
|
|
6
6
|
# SWIG Director; it can't be reaped and re-wrapped later. The
|
7
7
|
# easiest way is to make the currently set one an instance variable
|
8
8
|
# of this class
|
9
|
-
|
9
|
+
wx_set = instance_method :set
|
10
10
|
define_method(:set) do | help_provider |
|
11
|
-
|
11
|
+
wx_set.bind(self).call(help_provider)
|
12
12
|
@__hp__ = help_provider
|
13
13
|
end
|
14
14
|
end
|
data/lib/wx/core/image.rb
CHANGED
@@ -66,6 +66,39 @@ module Wx
|
|
66
66
|
def convert_to_bitmap
|
67
67
|
Wx::Bitmap.from_image(self)
|
68
68
|
end
|
69
|
+
|
70
|
+
module Histogram
|
71
|
+
|
72
|
+
def make_key(r, g, b)
|
73
|
+
(r << 16) | (g << 8) | b
|
74
|
+
end
|
75
|
+
|
76
|
+
def find_first_unused_colour(r=1, g=0, b=0)
|
77
|
+
while self.has_key?(make_key(r,g,b))
|
78
|
+
if r >= 254
|
79
|
+
r = 0
|
80
|
+
if g >= 254
|
81
|
+
return nil if b >= 254
|
82
|
+
g = 0
|
83
|
+
b += 1
|
84
|
+
else
|
85
|
+
g += 1
|
86
|
+
end
|
87
|
+
else
|
88
|
+
r += 1
|
89
|
+
end
|
90
|
+
end
|
91
|
+
[r, g, b]
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|
95
|
+
|
96
|
+
wx_compute_histogram = instance_method :compute_histogram
|
97
|
+
define_method :compute_histogram do
|
98
|
+
hist_hash = wx_compute_histogram.bind(self).call
|
99
|
+
hist_hash.extend Histogram
|
100
|
+
hist_hash
|
101
|
+
end
|
69
102
|
end
|
70
103
|
|
71
104
|
def self.Image(name, bmp_type = nil, *rest)
|
data/lib/wx/core/listctrl.rb
CHANGED
@@ -3,8 +3,23 @@ class Wx::ListCtrl
|
|
3
3
|
# Make these ruby enumerables so find, find_all, map are available
|
4
4
|
include Enumerable
|
5
5
|
# Passes each valid item index into the passed block
|
6
|
-
def each
|
7
|
-
|
6
|
+
def each(&block)
|
7
|
+
if block_given?
|
8
|
+
0.upto(item_count - 1) { | i | block.call(i) }
|
9
|
+
else
|
10
|
+
::Enumerator.new { |y| each { | i | y << i } }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def each_selected(&block)
|
15
|
+
if block_given?
|
16
|
+
item = -1
|
17
|
+
while (item = get_next_item(item, Wx::LIST_NEXT_ALL, Wx::LIST_STATE_SELECTED)) >= 0
|
18
|
+
block.call(item)
|
19
|
+
end
|
20
|
+
else
|
21
|
+
::Enumerator.new { |y| each_selected { | i | y << i } }
|
22
|
+
end
|
8
23
|
end
|
9
24
|
|
10
25
|
# Returns an Array containing the indexes of the currently selected
|
@@ -19,15 +34,4 @@ class Wx::ListCtrl
|
|
19
34
|
selections
|
20
35
|
end
|
21
36
|
|
22
|
-
# # Stub version for LC_VIRTUAL controls that does nothing; may be
|
23
|
-
# # overridden in subclasses.
|
24
|
-
# def on_get_item_attr(i)
|
25
|
-
# nil
|
26
|
-
# end
|
27
|
-
#
|
28
|
-
# # Stub version for LC_VIRTUAL|LC_REPORT controls that does nothing;
|
29
|
-
# # may be overridden in subclasses.
|
30
|
-
# def on_get_item_column_image(i, col)
|
31
|
-
# -1
|
32
|
-
# end
|
33
37
|
end
|
data/lib/wx/core/log.rb
CHANGED
@@ -14,7 +14,97 @@ module Wx
|
|
14
14
|
alias :timestamp= :set_timestamp
|
15
15
|
alias :verbose :get_verbose
|
16
16
|
alias :verbose= :set_verbose
|
17
|
+
|
18
|
+
def set_component(comp)
|
19
|
+
@component = comp ? comp.to_s : comp
|
20
|
+
end
|
21
|
+
private :set_component
|
22
|
+
|
23
|
+
def component
|
24
|
+
@component
|
25
|
+
end
|
26
|
+
|
27
|
+
def for_component(comp, &block)
|
28
|
+
old_comp = component
|
29
|
+
set_component(comp)
|
30
|
+
begin
|
31
|
+
block.call if block_given?
|
32
|
+
ensure
|
33
|
+
set_component(old_comp)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
class << self
|
42
|
+
|
43
|
+
def setup_log_info(fmt, args, filename, line, func, component)
|
44
|
+
# as wxRuby apps will ever only log from the main thread the only reason why
|
45
|
+
# log info data may be retained beyond the execution scope of the current
|
46
|
+
# log action is because of log repetition counting which will retain the
|
47
|
+
# first log info instance of a repeating message sequence
|
48
|
+
|
49
|
+
# format message
|
50
|
+
msg = fmt % args
|
51
|
+
log_info = {
|
52
|
+
filename: if filename
|
53
|
+
filename.to_s
|
54
|
+
else
|
55
|
+
filename
|
56
|
+
end,
|
57
|
+
line: line,
|
58
|
+
func: if func
|
59
|
+
func.to_s
|
60
|
+
else
|
61
|
+
func
|
62
|
+
end,
|
63
|
+
component: if component
|
64
|
+
component.to_s
|
65
|
+
else
|
66
|
+
Log.component
|
67
|
+
end
|
68
|
+
}
|
69
|
+
if Wx::Log.get_repetition_counting && @last_msg != msg
|
70
|
+
# refresh cache
|
71
|
+
@last_msg = msg
|
72
|
+
@last_info = log_info
|
73
|
+
end
|
74
|
+
[msg, log_info]
|
75
|
+
end
|
76
|
+
private :setup_log_info
|
77
|
+
|
78
|
+
wx_log_generic = self.instance_method :log_generic
|
79
|
+
define_method :log_generic do |lvl, fmt, *args, filename: nil, line: 0, func: nil, component: nil|
|
80
|
+
wx_log_generic.bind(self).call(lvl, *setup_log_info(fmt, args, filename, line, func, component))
|
17
81
|
end
|
82
|
+
|
83
|
+
wx_log_info = self.instance_method :log_info
|
84
|
+
define_method :log_info do |fmt, *args, filename: nil, line: 0, func: nil, component: nil|
|
85
|
+
wx_log_info.bind(self).call(*setup_log_info(fmt, args, filename, line, func, component))
|
86
|
+
end
|
87
|
+
|
88
|
+
wx_log_verbose = self.instance_method :log_verbose
|
89
|
+
define_method :log_verbose do |fmt, *args, filename: nil, line: 0, func: nil, component: nil|
|
90
|
+
wx_log_verbose.bind(self).call(*setup_log_info(fmt, args, filename, line, func, component))
|
91
|
+
end
|
92
|
+
|
93
|
+
wx_log_message = self.instance_method :log_message
|
94
|
+
define_method :log_message do |fmt, *args, filename: nil, line: 0, func: nil, component: nil|
|
95
|
+
wx_log_message.bind(self).call(*setup_log_info(fmt, args, filename, line, func, component))
|
96
|
+
end
|
97
|
+
|
98
|
+
wx_log_warning = self.instance_method :log_warning
|
99
|
+
define_method :log_warning do |fmt, *args, filename: nil, line: 0, func: nil, component: nil|
|
100
|
+
wx_log_warning.bind(self).call(*setup_log_info(fmt, args, filename, line, func, component))
|
101
|
+
end
|
102
|
+
|
103
|
+
wx_log_error = self.instance_method :log_error
|
104
|
+
define_method :log_error do |fmt, *args, filename: nil, line: 0, func: nil, component: nil|
|
105
|
+
wx_log_error.bind(self).call(*setup_log_info(fmt, args, filename, line, func, component))
|
106
|
+
end
|
107
|
+
|
18
108
|
end
|
19
109
|
|
20
110
|
end
|