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,1143 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
|
3
|
+
# Adapted for wxRuby3
|
4
|
+
# Copyright (c) M.J.N. Corino, The Netherlands
|
5
|
+
###
|
6
|
+
|
7
|
+
require 'wx'
|
8
|
+
|
9
|
+
include Wx
|
10
|
+
|
11
|
+
CONTROLS_QUIT = ID_EXIT
|
12
|
+
CONTROLS_TEXT = 101
|
13
|
+
CONTROLS_ABOUT = ID_ABOUT
|
14
|
+
CONTROLS_CLEAR_LOG = 103
|
15
|
+
# tooltip menu
|
16
|
+
CONTROLS_SET_TOOLTIP_DELAY = 200
|
17
|
+
CONTROLS_ENABLE_TOOLTIPS = 201
|
18
|
+
# panel menu
|
19
|
+
CONTROLS_ENABLE_ALL = 202
|
20
|
+
|
21
|
+
|
22
|
+
ID_NOTEBOOK = 1000
|
23
|
+
|
24
|
+
ID_LISTBOX = 130
|
25
|
+
ID_LISTBOX_SEL_NUM = 131
|
26
|
+
ID_LISTBOX_SEL_STR = 132
|
27
|
+
ID_LISTBOX_CLEAR = 133
|
28
|
+
ID_LISTBOX_APPEND = 134
|
29
|
+
ID_LISTBOX_DELETE = 135
|
30
|
+
ID_LISTBOX_FONT = 136
|
31
|
+
ID_LISTBOX_ENABLE = 137
|
32
|
+
ID_LISTBOX_SORTED = 138
|
33
|
+
|
34
|
+
ID_CHOICE = 120
|
35
|
+
ID_CHOICE_SEL_NUM = 121
|
36
|
+
ID_CHOICE_SEL_STR = 122
|
37
|
+
ID_CHOICE_CLEAR = 123
|
38
|
+
ID_CHOICE_APPEND = 124
|
39
|
+
ID_CHOICE_DELETE = 125
|
40
|
+
ID_CHOICE_FONT = 126
|
41
|
+
ID_CHOICE_ENABLE = 127
|
42
|
+
ID_CHOICE_SORTED = 128
|
43
|
+
|
44
|
+
ID_COMBO = 140
|
45
|
+
ID_COMBO_SEL_NUM = 141
|
46
|
+
ID_COMBO_SEL_STR = 142
|
47
|
+
ID_COMBO_CLEAR = 143
|
48
|
+
ID_COMBO_APPEND = 144
|
49
|
+
ID_COMBO_DELETE = 145
|
50
|
+
ID_COMBO_FONT = 146
|
51
|
+
ID_COMBO_ENABLE = 147
|
52
|
+
|
53
|
+
ID_RADIOBOX = 160
|
54
|
+
ID_RADIOBOX_SEL_NUM = 161
|
55
|
+
ID_RADIOBOX_SEL_STR = 162
|
56
|
+
ID_RADIOBOX_FONT = 163
|
57
|
+
ID_RADIOBOX_ENABLE = 164
|
58
|
+
|
59
|
+
ID_RADIOBUTTON_1 = 166
|
60
|
+
ID_RADIOBUTTON_2 = 167
|
61
|
+
|
62
|
+
ID_SET_FONT = 170
|
63
|
+
|
64
|
+
ID_GAUGE = 180
|
65
|
+
ID_SLIDER = 181
|
66
|
+
|
67
|
+
ID_SPIN = 182
|
68
|
+
ID_BTNPROGRESS = 183
|
69
|
+
ID_BUTTON_LABEL = 184
|
70
|
+
ID_SPINCTRL = 185
|
71
|
+
|
72
|
+
ID_BUTTON_TEST1 = 190
|
73
|
+
ID_BUTTON_TEST2 = 191
|
74
|
+
ID_BITMAP_BTN = 192
|
75
|
+
|
76
|
+
ID_CHANGE_COLOUR = 200
|
77
|
+
|
78
|
+
ID_SIZER_CHECK1 = 201
|
79
|
+
ID_SIZER_CHECK2 = 202
|
80
|
+
ID_SIZER_CHECK3 = 203
|
81
|
+
ID_SIZER_CHECK4 = 204
|
82
|
+
ID_SIZER_CHECK14 = 205
|
83
|
+
ID_SIZER_CHECKBIG = 206
|
84
|
+
|
85
|
+
Image_List, Image_Choice, Image_Combo, Image_Text, Image_Radio, Image_Gauge, Image_Max = (0..6).to_a
|
86
|
+
|
87
|
+
|
88
|
+
# a button which intercepts double clicks (for testing...)
|
89
|
+
class MyButton < Button
|
90
|
+
def initialize(parent,id,label = EmptyString,pos = DEFAULT_POSITION,size = DEFAULT_SIZE)
|
91
|
+
super(parent,id,label,pos,size)
|
92
|
+
|
93
|
+
evt_left_dclick {|event| onDClick(event)}
|
94
|
+
end
|
95
|
+
|
96
|
+
def onDClick(event)
|
97
|
+
log_message("MyButton::OnDClick")
|
98
|
+
event.skip()
|
99
|
+
end
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
# a combo which intercepts chars (to test Windows behaviour)
|
104
|
+
class MyComboBox < ComboBox
|
105
|
+
def initialize(parent,id,value = EmptyString,
|
106
|
+
pos = DEFAULT_POSITION,
|
107
|
+
size = DEFAULT_SIZE,
|
108
|
+
choices = [],
|
109
|
+
style = 0)
|
110
|
+
super(parent, id, value, pos, size, choices)#, style)
|
111
|
+
|
112
|
+
evt_char {|event| onChar(event)}
|
113
|
+
evt_key_down {|event| onKeyDown(event)}
|
114
|
+
evt_key_up {|event| onKeyUp(event)}
|
115
|
+
|
116
|
+
evt_set_focus {|event| onFocusGot(event)}
|
117
|
+
end
|
118
|
+
|
119
|
+
def onChar(event)
|
120
|
+
log_message("MyComboBox::OnChar")
|
121
|
+
if event.key_code() == ?w
|
122
|
+
log_message("MyComboBox: 'w' will be ignored.")
|
123
|
+
else
|
124
|
+
event.skip()
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
def onKeyDown(event)
|
129
|
+
log_message("MyComboBox::OnKeyDown")
|
130
|
+
if event.key_code() == ?w
|
131
|
+
log_message("MyComboBox: 'w' will be ignored.")
|
132
|
+
else
|
133
|
+
event.skip()
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
def onKeyUp(event)
|
138
|
+
#log_message("MyComboBox::OnKeyUp")
|
139
|
+
event.skip()
|
140
|
+
end
|
141
|
+
|
142
|
+
def onFocusGot(event)
|
143
|
+
log_message("MyComboBox::OnFocusGot")
|
144
|
+
event.skip()
|
145
|
+
end
|
146
|
+
|
147
|
+
end
|
148
|
+
|
149
|
+
# a radiobox which handles focus set/kill (for testing)
|
150
|
+
class MyRadioBox < RadioBox
|
151
|
+
def initialize(parent,
|
152
|
+
id,title = EmptyString,
|
153
|
+
pos = DEFAULT_POSITION,
|
154
|
+
size = DEFAULT_SIZE,
|
155
|
+
choices = [],
|
156
|
+
majorDim = 1,
|
157
|
+
style = RA_HORIZONTAL)
|
158
|
+
super(parent, id, title, pos, size, choices, majorDim,style)
|
159
|
+
set_foreground_colour(RED)
|
160
|
+
|
161
|
+
evt_set_focus {|event| onFocusGot(event)}
|
162
|
+
evt_kill_focus {|event| onFocusLost(event)}
|
163
|
+
|
164
|
+
end
|
165
|
+
|
166
|
+
def onFocusGot(event)
|
167
|
+
log_message("MyRadioBox::OnFocusGot")
|
168
|
+
event.skip()
|
169
|
+
end
|
170
|
+
|
171
|
+
def onFocusLost(event)
|
172
|
+
log_message("MyRadioBox::OnFocusLost")
|
173
|
+
event.skip()
|
174
|
+
end
|
175
|
+
|
176
|
+
end
|
177
|
+
|
178
|
+
|
179
|
+
class MyPanel < Panel
|
180
|
+
|
181
|
+
# delete Log::set_active_target(@m_logTargetOld)
|
182
|
+
# delete @m_notebook.GetImageList()
|
183
|
+
attr_reader :m_text,:m_logTargetOld
|
184
|
+
|
185
|
+
def initialize(frame,x,y,w,h)
|
186
|
+
super( frame, -1, Point.new(x, y), Size.new(w, h) )
|
187
|
+
|
188
|
+
@s_colOld = NULL_COLOUR
|
189
|
+
|
190
|
+
@m_text = TextCtrl.new(self, -1, "This is the log window.\n",
|
191
|
+
Point.new(0, 250), Size.new(100, 50), TE_MULTILINE)
|
192
|
+
@m_text.set_background_colour(Colour.new("wheat"))
|
193
|
+
|
194
|
+
@m_logTargetOld = Log::set_active_target(LogTextCtrl.new(@m_text))
|
195
|
+
|
196
|
+
@m_notebook = Wx::Notebook.new(self, ID_NOTEBOOK, Point.new(0,0), Size.new(100,50))
|
197
|
+
|
198
|
+
choices = [
|
199
|
+
"This",
|
200
|
+
"is one of my",
|
201
|
+
"really",
|
202
|
+
"wonderful",
|
203
|
+
"examples."
|
204
|
+
]
|
205
|
+
|
206
|
+
# fill the image list
|
207
|
+
|
208
|
+
imagelist = ImageList.new(16, 16)
|
209
|
+
|
210
|
+
imagelist.add( Bitmap.new( local_icon_file("list.xpm"),
|
211
|
+
Wx::BITMAP_TYPE_XPM))
|
212
|
+
imagelist.add( Bitmap.new( local_icon_file("choice.xpm"),
|
213
|
+
Wx::BITMAP_TYPE_XPM))
|
214
|
+
imagelist.add( Bitmap.new( local_icon_file("combo.xpm"),
|
215
|
+
Wx::BITMAP_TYPE_XPM))
|
216
|
+
imagelist.add( Bitmap.new( local_icon_file("text.xpm"),
|
217
|
+
Wx::BITMAP_TYPE_XPM))
|
218
|
+
imagelist.add( Bitmap.new( local_icon_file("radio.xpm"),
|
219
|
+
Wx::BITMAP_TYPE_XPM))
|
220
|
+
imagelist.add( Bitmap.new( local_icon_file("gauge.xpm"),
|
221
|
+
Wx::BITMAP_TYPE_XPM))
|
222
|
+
|
223
|
+
@m_notebook.set_image_list(imagelist)
|
224
|
+
|
225
|
+
panel = Panel.new(@m_notebook)
|
226
|
+
@m_listbox = ListBox.new( panel, ID_LISTBOX,
|
227
|
+
Point.new(10,10), Size.new(120,70),
|
228
|
+
choices, LB_ALWAYS_SB )
|
229
|
+
|
230
|
+
@m_listboxSorted = ListBox.new( panel, ID_LISTBOX_SORTED,
|
231
|
+
Point.new(10,90), Size.new(120,70),
|
232
|
+
choices, LB_SORT )
|
233
|
+
|
234
|
+
|
235
|
+
@m_listbox.set_cursor(CROSS_CURSOR)
|
236
|
+
|
237
|
+
@m_listbox.set_tool_tip( "This is a list box" )
|
238
|
+
|
239
|
+
|
240
|
+
@m_lbSelectNum = Button.new( panel, ID_LISTBOX_SEL_NUM, "Select #&2", Point.new(180,30), Size.new(140,30) )
|
241
|
+
@m_lbSelectThis = Button.new( panel, ID_LISTBOX_SEL_STR, "&Select 'This'", Point.new(340,30), Size.new(140,30) )
|
242
|
+
Button.new( panel, ID_LISTBOX_CLEAR, "&clear", Point.new(180,80), Size.new(140,30) )
|
243
|
+
MyButton.new( panel, ID_LISTBOX_APPEND, "&append 'Hi!'", Point.new(340,80), Size.new(140,30) )
|
244
|
+
Button.new( panel, ID_LISTBOX_DELETE, "D&elete selected item", Point.new(180,130), Size.new(140,30) )
|
245
|
+
button = MyButton.new( panel, ID_LISTBOX_FONT, "Set &Italic font", Point.new(340,130), Size.new(140,30) )
|
246
|
+
|
247
|
+
button.set_default()
|
248
|
+
|
249
|
+
button.set_foreground_colour(BLUE)
|
250
|
+
|
251
|
+
button.set_tool_tip( "Press here to set italic font" )
|
252
|
+
|
253
|
+
@m_checkbox = CheckBox.new( panel, ID_LISTBOX_ENABLE, "&Disable", Point.new(20,170) )
|
254
|
+
@m_checkbox.set_value(false)
|
255
|
+
@m_checkbox.set_tool_tip( "Click here to disable the listbox" )
|
256
|
+
@m_toggle_color = CheckBox.new( panel, ID_CHANGE_COLOUR, "&Toggle colour",
|
257
|
+
Point.new(110,170) )
|
258
|
+
panel.set_cursor(Cursor.new(CURSOR_HAND))
|
259
|
+
@m_notebook.add_page(panel, "ListBox", true, Image_List)
|
260
|
+
|
261
|
+
panel = Panel.new(@m_notebook)
|
262
|
+
@m_choice = Choice.new( panel, ID_CHOICE, Point.new(10,10), Size.new(120,-1), choices )
|
263
|
+
@m_choiceSorted = Choice.new( panel, ID_CHOICE_SORTED, Point.new(10,70), Size.new(120,-1),
|
264
|
+
choices, CB_SORT )
|
265
|
+
|
266
|
+
@m_choice.set_selection(2)
|
267
|
+
@m_choice.set_background_colour(Colour.new("red"))
|
268
|
+
Button.new( panel, ID_CHOICE_SEL_NUM, "Select #&2", Point.new(180,30), Size.new(140,30) )
|
269
|
+
Button.new( panel, ID_CHOICE_SEL_STR, "&Select 'This'", Point.new(340,30), Size.new(140,30) )
|
270
|
+
Button.new( panel, ID_CHOICE_CLEAR, "&clear", Point.new(180,80), Size.new(140,30) )
|
271
|
+
Button.new( panel, ID_CHOICE_APPEND, "&append 'Hi!'", Point.new(340,80), Size.new(140,30) )
|
272
|
+
Button.new( panel, ID_CHOICE_DELETE, "D&elete selected item", Point.new(180,130), Size.new(140,30) )
|
273
|
+
Button.new( panel, ID_CHOICE_FONT, "Set &Italic font", Point.new(340,130), Size.new(140,30) )
|
274
|
+
CheckBox.new( panel, ID_CHOICE_ENABLE, "&Disable", Point.new(20,130), Size.new(140,30) )
|
275
|
+
|
276
|
+
@m_notebook.add_page(panel, "Choice", false, Image_Choice)
|
277
|
+
|
278
|
+
panel = Panel.new(@m_notebook)
|
279
|
+
StaticBox.new( panel, -1, "&Box around combobox",
|
280
|
+
Point.new(5, 5), Size.new(150, 100))
|
281
|
+
@m_combo = MyComboBox.new( panel, ID_COMBO, "This",
|
282
|
+
Point.new(20,25), Size.new(120, -1),
|
283
|
+
choices,TE_PROCESS_ENTER)
|
284
|
+
# CB_READONLY | PROCESS_ENTER)
|
285
|
+
|
286
|
+
@m_combo.set_tool_tip("This is a natural\ncombobox - can you believe me?")
|
287
|
+
|
288
|
+
Button.new( panel, ID_COMBO_SEL_NUM, "Select #&2", Point.new(180,30), Size.new(140,30) )
|
289
|
+
Button.new( panel, ID_COMBO_SEL_STR, "&Select 'This'", Point.new(340,30), Size.new(140,30) )
|
290
|
+
Button.new( panel, ID_COMBO_CLEAR, "&clear", Point.new(180,80), Size.new(140,30) )
|
291
|
+
Button.new( panel, ID_COMBO_APPEND, "&append 'Hi!'", Point.new(340,80), Size.new(140,30) )
|
292
|
+
Button.new( panel, ID_COMBO_DELETE, "D&elete selected item", Point.new(180,130), Size.new(140,30) )
|
293
|
+
Button.new( panel, ID_COMBO_FONT, "Set &Italic font", Point.new(340,130), Size.new(140,30) )
|
294
|
+
CheckBox.new( panel, ID_COMBO_ENABLE, "&Disable", Point.new(20,130), Size.new(140,30) )
|
295
|
+
@m_notebook.add_page(panel, "ComboBox", false, Image_Combo)
|
296
|
+
|
297
|
+
choices2 = ["First", "Second"]
|
298
|
+
# "Third",
|
299
|
+
#"Fourth", "Fifth", "Sixth",
|
300
|
+
#"Seventh", "Eighth", "Nineth", "Tenth" */
|
301
|
+
|
302
|
+
panel = Panel.new(@m_notebook)
|
303
|
+
MyRadioBox.new( panel, ID_RADIOBOX, "&That", Point.new(10,160), Size.new(-1,-1), choices2, 1, RA_SPECIFY_ROWS )
|
304
|
+
@m_radio = RadioBox.new( panel, ID_RADIOBOX, "T&his", Point.new(10,10), Size.new(-1,-1), choices, 1, RA_SPECIFY_COLS )
|
305
|
+
@m_radio.set_foreground_colour(RED)
|
306
|
+
|
307
|
+
@m_radio.set_tool_tip("Ever seen a radiobox?")
|
308
|
+
|
309
|
+
Button.new( panel, ID_RADIOBOX_SEL_NUM, "Select #&2", Point.new(180,30), Size.new(140,30) )
|
310
|
+
Button.new( panel, ID_RADIOBOX_SEL_STR, "&Select 'This'", Point.new(180,80), Size.new(140,30) )
|
311
|
+
@m_fontButton = Button.new( panel, ID_SET_FONT, "Set &more Italic font", Point.new(340,30), Size.new(140,30) )
|
312
|
+
Button.new( panel, ID_RADIOBOX_FONT, "Set &Italic font", Point.new(340,80), Size.new(140,30) )
|
313
|
+
CheckBox.new( panel, ID_RADIOBOX_ENABLE, "&Disable", Point.new(340,130), DEFAULT_SIZE )
|
314
|
+
rb = RadioButton.new( panel, ID_RADIOBUTTON_1, "Radiobutton1", Point.new(210,170), DEFAULT_SIZE, RB_GROUP )
|
315
|
+
rb.set_value( false )
|
316
|
+
RadioButton.new( panel, ID_RADIOBUTTON_2, "&Radiobutton2", Point.new(340,170), DEFAULT_SIZE )
|
317
|
+
@m_notebook.add_page(panel, "RadioBox", false, Image_Radio)
|
318
|
+
|
319
|
+
panel = Panel.new(@m_notebook)
|
320
|
+
StaticBox.new( panel, -1, "&Gauge and Slider", Point.new(10,10), Size.new(222,130) )
|
321
|
+
@m_gauge = Gauge.new( panel, -1, 200, Point.new(18,50), Size.new(155, 30), GA_HORIZONTAL|NO_BORDER )
|
322
|
+
@m_gauge.set_background_colour(GREEN)
|
323
|
+
@m_gauge.set_foreground_colour(RED)
|
324
|
+
@m_gaugeVert = Gauge.new( panel, -1, 100,
|
325
|
+
Point.new(195,35), Size.new(30, 90),
|
326
|
+
GA_VERTICAL | GA_SMOOTH | NO_BORDER )
|
327
|
+
@m_slider = Slider.new( panel, ID_SLIDER, 0, 0, 200, Point.new(18,90), Size.new(155,-1),
|
328
|
+
SL_AUTOTICKS | SL_LABELS )
|
329
|
+
@m_slider.set_tick_freq(40)
|
330
|
+
@m_slider.set_tool_tip("This is a sliding slider")
|
331
|
+
|
332
|
+
StaticBox.new( panel, -1, "&Explanation",
|
333
|
+
Point.new(230,10), Size.new(270,130),
|
334
|
+
ALIGN_CENTER )
|
335
|
+
|
336
|
+
StaticText.new( panel, -1,
|
337
|
+
"In order see the gauge (aka progress bar)\n"+
|
338
|
+
"control do something you have to drag the\n"+
|
339
|
+
"handle of the slider to the right.\n"+
|
340
|
+
"\n"+
|
341
|
+
"This is also supposed to demonstrate how\n"+
|
342
|
+
"to use static controls.\n",
|
343
|
+
Point.new(250,25),
|
344
|
+
Size.new(240, 110))
|
345
|
+
initialSpinValue = -5
|
346
|
+
s = initialSpinValue.to_s
|
347
|
+
@m_spintext = TextCtrl.new( panel, -1, s, Point.new(20,160), Size.new(80,-1) )
|
348
|
+
@m_spinbutton = SpinButton.new( panel, ID_SPIN, Point.new(103,160), Size.new(80, -1) )
|
349
|
+
@m_spinbutton.set_range(-40,30)
|
350
|
+
@m_spinbutton.set_value(initialSpinValue)
|
351
|
+
|
352
|
+
@m_btnProgress = Button.new( panel, ID_BTNPROGRESS, "&Show progress dialog",
|
353
|
+
Point.new(300, 160) )
|
354
|
+
|
355
|
+
@m_spinctrl = SpinCtrl.new( panel, ID_SPINCTRL, "", Point.new(200, 160), Size.new(80, -1) )
|
356
|
+
@m_spinctrl.set_range(10,30)
|
357
|
+
@m_spinctrl.set_value(15)
|
358
|
+
|
359
|
+
@m_notebook.add_page(panel, "Gauge", false, Image_Gauge)
|
360
|
+
|
361
|
+
panel = Panel.new(@m_notebook)
|
362
|
+
|
363
|
+
icon = ArtProvider::get_icon(ART_INFORMATION)
|
364
|
+
StaticBitmap.new( panel, -1, icon, Point.new(10, 10) )
|
365
|
+
|
366
|
+
bitmap = Bitmap.new( 100, 100 )
|
367
|
+
bitmap.draw do | dc |
|
368
|
+
dc.clear()
|
369
|
+
dc.set_pen(GREEN_PEN)
|
370
|
+
dc.draw_ellipse(5, 5, 90, 90)
|
371
|
+
dc.draw_text("Bitmap", 30, 40)
|
372
|
+
end
|
373
|
+
|
374
|
+
BitmapButton.new(panel, ID_BITMAP_BTN, bitmap, Point.new(100, 20))
|
375
|
+
|
376
|
+
# test for masked bitmap display
|
377
|
+
bitmap = Bitmap.new( File.join(File.dirname(__FILE__), "test2.bmp"),
|
378
|
+
BITMAP_TYPE_BMP)
|
379
|
+
if bitmap.is_ok()
|
380
|
+
bitmap.set_mask(Mask.new(bitmap, BLUE))
|
381
|
+
StaticBitmap.new(panel, -1, bitmap, Point.new(300, 120))
|
382
|
+
end
|
383
|
+
|
384
|
+
bmp1 = ArtProvider::get_bitmap(ART_INFORMATION)
|
385
|
+
bmp2 = ArtProvider::get_bitmap(ART_WARNING)
|
386
|
+
bmp3 = ArtProvider::get_bitmap(ART_QUESTION)
|
387
|
+
bmpBtn = BitmapButton.new(panel, -1,
|
388
|
+
bmp1,
|
389
|
+
Point.new(30, 70))
|
390
|
+
|
391
|
+
bmpBtn.set_bitmap_current(bmp2)
|
392
|
+
bmpBtn.set_bitmap_pressed(bmp3)
|
393
|
+
|
394
|
+
ToggleButton.new(panel, ID_BUTTON_LABEL,
|
395
|
+
"&Toggle label", Point.new(250, 20))
|
396
|
+
@m_label = StaticText.new(panel, -1, "Label with some long text",
|
397
|
+
Point.new(250, 60), DEFAULT_SIZE,
|
398
|
+
ALIGN_RIGHT)
|
399
|
+
@m_label.set_foreground_colour(BLUE )
|
400
|
+
|
401
|
+
@m_notebook.add_page(panel, "BitmapXXX")
|
402
|
+
|
403
|
+
# sizer
|
404
|
+
|
405
|
+
panel = Panel.new(@m_notebook)
|
406
|
+
panel.set_auto_layout( true )
|
407
|
+
|
408
|
+
sizer = BoxSizer.new( VERTICAL )
|
409
|
+
|
410
|
+
csizer =
|
411
|
+
StaticBoxSizer.new(sbox = StaticBox.new(panel, -1, "Show Buttons"),
|
412
|
+
HORIZONTAL )
|
413
|
+
|
414
|
+
check1 = CheckBox.new(sbox, ID_SIZER_CHECK1, "1")
|
415
|
+
check1.set_value(true)
|
416
|
+
csizer.add(check1)
|
417
|
+
check2 = CheckBox.new(sbox, ID_SIZER_CHECK2, "2")
|
418
|
+
check2.set_value(true)
|
419
|
+
csizer.add(check2)
|
420
|
+
check3 = CheckBox.new(sbox, ID_SIZER_CHECK3, "3")
|
421
|
+
check3.set_value(true)
|
422
|
+
csizer.add(check3)
|
423
|
+
check4 = CheckBox.new(sbox, ID_SIZER_CHECK4, "4")
|
424
|
+
check4.set_value(true)
|
425
|
+
csizer.add(check4)
|
426
|
+
check14 = CheckBox.new(sbox, ID_SIZER_CHECK14, "1-4")
|
427
|
+
check14.set_value(true)
|
428
|
+
csizer.add(check14)
|
429
|
+
checkBig = CheckBox.new(sbox, ID_SIZER_CHECKBIG, "Big")
|
430
|
+
checkBig.set_value(true)
|
431
|
+
csizer.add(checkBig)
|
432
|
+
|
433
|
+
sizer.add(csizer)
|
434
|
+
|
435
|
+
@m_hsizer = BoxSizer.new( HORIZONTAL )
|
436
|
+
|
437
|
+
@m_buttonSizer = BoxSizer.new(VERTICAL)
|
438
|
+
|
439
|
+
@m_sizerBtn1 = Button.new(panel, -1, "Test Button &1" )
|
440
|
+
@m_buttonSizer.add( @m_sizerBtn1, 0, ALL, 10 )
|
441
|
+
@m_sizerBtn2 = Button.new(panel, -1, "Test Button &2" )
|
442
|
+
@m_buttonSizer.add( @m_sizerBtn2, 0, ALL, 10 )
|
443
|
+
@m_sizerBtn3 = Button.new(panel, -1, "Test Button &3" )
|
444
|
+
@m_buttonSizer.add( @m_sizerBtn3, 0, ALL, 10 )
|
445
|
+
@m_sizerBtn4 = Button.new(panel, -1, "Test Button &4" )
|
446
|
+
@m_buttonSizer.add( @m_sizerBtn4, 0, ALL, 10 )
|
447
|
+
|
448
|
+
@m_hsizer.add(@m_buttonSizer)
|
449
|
+
@m_hsizer.add( 20,20, 1 )
|
450
|
+
@m_bigBtn = Button.new(panel, -1, "Multiline\nbutton" )
|
451
|
+
@m_hsizer.add( @m_bigBtn , 3, GROW|ALL, 10 )
|
452
|
+
|
453
|
+
sizer.add(@m_hsizer, 1, GROW)
|
454
|
+
|
455
|
+
panel.set_sizer( sizer )
|
456
|
+
|
457
|
+
@m_notebook.add_page(panel, "Sizer")
|
458
|
+
|
459
|
+
evt_size {|event| onSize(event) }
|
460
|
+
evt_notebook_page_changing(ID_NOTEBOOK) {|event| onPageChanging(event) }
|
461
|
+
evt_notebook_page_changed(ID_NOTEBOOK) {|event| onPageChanged(event) }
|
462
|
+
evt_listbox(ID_LISTBOX) {|event| onListBox(event) }
|
463
|
+
evt_listbox(ID_LISTBOX_SORTED) {|event| onListBox(event) }
|
464
|
+
evt_listbox_dclick(ID_LISTBOX) {|event| onListBoxDoubleClick(event) }
|
465
|
+
evt_button(ID_LISTBOX_SEL_NUM) {|event| onListBoxButtons(event) }
|
466
|
+
evt_button(ID_LISTBOX_SEL_STR) {|event| onListBoxButtons(event) }
|
467
|
+
evt_button(ID_LISTBOX_CLEAR) {|event| onListBoxButtons(event) }
|
468
|
+
evt_button(ID_LISTBOX_APPEND) {|event| onListBoxButtons(event) }
|
469
|
+
evt_button(ID_LISTBOX_DELETE) {|event| onListBoxButtons(event) }
|
470
|
+
evt_button(ID_LISTBOX_FONT) {|event| onListBoxButtons(event) }
|
471
|
+
evt_checkbox(ID_LISTBOX_ENABLE) {|event| onListBoxButtons(event) }
|
472
|
+
evt_choice(ID_CHOICE) {|event| onChoice(event) }
|
473
|
+
evt_choice(ID_CHOICE_SORTED) {|event| onChoice(event) }
|
474
|
+
evt_button(ID_CHOICE_SEL_NUM) {|event| onChoiceButtons(event) }
|
475
|
+
evt_button(ID_CHOICE_SEL_STR) {|event| onChoiceButtons(event) }
|
476
|
+
evt_button(ID_CHOICE_CLEAR) {|event| onChoiceButtons(event) }
|
477
|
+
evt_button(ID_CHOICE_APPEND) {|event| onChoiceButtons(event) }
|
478
|
+
evt_button(ID_CHOICE_DELETE) {|event| onChoiceButtons(event) }
|
479
|
+
evt_button(ID_CHOICE_FONT) {|event| onChoiceButtons(event) }
|
480
|
+
evt_checkbox(ID_CHOICE_ENABLE) {|event| onChoiceButtons(event) }
|
481
|
+
evt_combobox(ID_COMBO) {|event| onCombo(event) }
|
482
|
+
evt_text(ID_COMBO) {|event| onComboTextChanged(event) }
|
483
|
+
evt_text_enter(ID_COMBO) {|event| onComboTextEnter(event) }
|
484
|
+
evt_button(ID_COMBO_SEL_NUM) {|event| onComboButtons(event) }
|
485
|
+
evt_button(ID_COMBO_SEL_STR) {|event| onComboButtons(event) }
|
486
|
+
evt_button(ID_COMBO_CLEAR) {|event| onComboButtons(event) }
|
487
|
+
evt_button(ID_COMBO_APPEND) {|event| onComboButtons(event) }
|
488
|
+
evt_button(ID_COMBO_DELETE) {|event| onComboButtons(event) }
|
489
|
+
evt_button(ID_COMBO_FONT) {|event| onComboButtons(event) }
|
490
|
+
evt_checkbox(ID_COMBO_ENABLE) {|event| onComboButtons(event) }
|
491
|
+
evt_radiobox(ID_RADIOBOX) {|event| onRadio(event) }
|
492
|
+
evt_button(ID_RADIOBOX_SEL_NUM) {|event| onRadioButtons(event) }
|
493
|
+
evt_button(ID_RADIOBOX_SEL_STR) {|event| onRadioButtons(event) }
|
494
|
+
evt_button(ID_RADIOBOX_FONT) {|event| onRadioButtons(event) }
|
495
|
+
evt_checkbox(ID_RADIOBOX_ENABLE) {|event| onRadioButtons(event) }
|
496
|
+
evt_button(ID_SET_FONT) {|event| onSetFont(event) }
|
497
|
+
evt_slider(ID_SLIDER) {|event| onSliderupdate(event) }
|
498
|
+
evt_spin(ID_SPIN) {|event| onSpinupdate(event) }
|
499
|
+
evt_spin_up(ID_SPIN) {|event| onSpinUp(event) }
|
500
|
+
evt_spin_down(ID_SPIN) {|event| onSpinDown(event) }
|
501
|
+
evt_update_ui(ID_BTNPROGRESS) {|event| onupdateShowProgress(event) }
|
502
|
+
evt_button(ID_BTNPROGRESS) {|event| onShowProgress(event) }
|
503
|
+
evt_spinctrl(ID_SPINCTRL) {|event| onSpinCtrl(event) }
|
504
|
+
evt_spin_up(ID_SPINCTRL) {|event| onSpinCtrlUp(event) }
|
505
|
+
evt_spin_down(ID_SPINCTRL) {|event| onSpinCtrlDown(event) }
|
506
|
+
evt_text(ID_SPINCTRL) {|event| onSpinCtrlText(event) }
|
507
|
+
if (RUBY_PLATFORM =~ /mswin/)
|
508
|
+
evt_togglebutton(ID_BUTTON_LABEL) {|event| onupdateLabel(event) }
|
509
|
+
end
|
510
|
+
evt_checkbox(ID_CHANGE_COLOUR) {|event| onChangeColour(event) }
|
511
|
+
evt_button(ID_BUTTON_TEST1) {|event| onTestButton(event) }
|
512
|
+
evt_button(ID_BUTTON_TEST2) {|event| onTestButton(event) }
|
513
|
+
evt_button(ID_BITMAP_BTN) {|event| onBmpButton(event) }
|
514
|
+
|
515
|
+
evt_checkbox(ID_SIZER_CHECK1) {|event| onSizerCheck(event) }
|
516
|
+
evt_checkbox(ID_SIZER_CHECK2) {|event| onSizerCheck(event) }
|
517
|
+
evt_checkbox(ID_SIZER_CHECK3) {|event| onSizerCheck(event) }
|
518
|
+
evt_checkbox(ID_SIZER_CHECK4) {|event| onSizerCheck(event) }
|
519
|
+
evt_checkbox(ID_SIZER_CHECK14) {|event| onSizerCheck(event) }
|
520
|
+
evt_checkbox(ID_SIZER_CHECKBIG) {|event| onSizerCheck(event) }
|
521
|
+
|
522
|
+
end
|
523
|
+
|
524
|
+
# utility function to find an icon relative to this ruby script
|
525
|
+
def local_icon_file(icon_name)
|
526
|
+
File.join( __dir__, icon_name)
|
527
|
+
end
|
528
|
+
|
529
|
+
|
530
|
+
def onSize(event)
|
531
|
+
size = get_client_size()
|
532
|
+
x = size.get_width
|
533
|
+
y = size.get_height
|
534
|
+
if @m_notebook
|
535
|
+
@m_notebook.set_size( 2, 2, x-4, y*2/3-4 )
|
536
|
+
end
|
537
|
+
if @m_text
|
538
|
+
@m_text.set_size( 2, y*2/3+2, x-4, y/3-4 )
|
539
|
+
end
|
540
|
+
end
|
541
|
+
|
542
|
+
def onPageChanging(event)
|
543
|
+
|
544
|
+
selOld = event.get_old_selection()
|
545
|
+
if selOld == 2
|
546
|
+
if message_box("This demonstrates how a program may prevent the\n"+
|
547
|
+
"page change from taking place - if you select\n"+
|
548
|
+
"[No] the current page will stay the third one\n",
|
549
|
+
"Control sample",
|
550
|
+
ICON_QUESTION | YES_NO, self) != YES
|
551
|
+
event.veto()
|
552
|
+
return nil
|
553
|
+
end
|
554
|
+
end
|
555
|
+
@m_text << "Notebook selection is being changed from " << selOld \
|
556
|
+
<< " to " << event.get_selection() \
|
557
|
+
<< " (current page from notebook is " \
|
558
|
+
<< @m_notebook.get_selection() << ")\n"
|
559
|
+
end
|
560
|
+
|
561
|
+
def onPageChanged(event)
|
562
|
+
@m_text << "Notebook selection is now " << event.get_selection() \
|
563
|
+
<< " (from notebook: " << @m_notebook.get_selection() \
|
564
|
+
<< ")\n"
|
565
|
+
end
|
566
|
+
|
567
|
+
def onTestButton(event)
|
568
|
+
log_message("Button %s clicked.",
|
569
|
+
event.get_id() == ID_BUTTON_TEST1 ? '1' : '2')
|
570
|
+
end
|
571
|
+
|
572
|
+
def onBmpButton(event)
|
573
|
+
log_message("Bitmap button clicked.")
|
574
|
+
end
|
575
|
+
|
576
|
+
def onChangeColour(event)
|
577
|
+
# test panel colour changing and propagation to the subcontrols
|
578
|
+
if @s_colOld.is_ok()
|
579
|
+
|
580
|
+
set_background_colour(@s_colOld)
|
581
|
+
@s_colOld = NULL_COLOUR
|
582
|
+
|
583
|
+
@m_lbSelectThis.set_foreground_colour(Colour.new("red"))
|
584
|
+
@m_lbSelectThis.set_background_colour(Colour.new("white"))
|
585
|
+
else
|
586
|
+
@s_colOld = Colour.new("red")
|
587
|
+
set_background_colour(Colour.new("white"))
|
588
|
+
|
589
|
+
@m_lbSelectThis.set_foreground_colour(Colour.new("white"))
|
590
|
+
@m_lbSelectThis.set_background_colour(Colour.new("red"))
|
591
|
+
end
|
592
|
+
|
593
|
+
@m_lbSelectThis.refresh()
|
594
|
+
refresh()
|
595
|
+
end
|
596
|
+
|
597
|
+
def onListBox(event)
|
598
|
+
# GetParent().Move(100, 100)
|
599
|
+
if event.get_int() == -1
|
600
|
+
@m_text.append_text( "ListBox has no selections anymore\n" )
|
601
|
+
return Qnil
|
602
|
+
end
|
603
|
+
|
604
|
+
listbox = (event.get_id() == ID_LISTBOX) ? @m_listbox : @m_listboxSorted
|
605
|
+
|
606
|
+
@m_text.append_text( "ListBox event selection string is: '" )
|
607
|
+
@m_text.append_text( event.get_string() )
|
608
|
+
@m_text.append_text( "'\n" )
|
609
|
+
@m_text.append_text( "ListBox control selection string is: '" )
|
610
|
+
@m_text.append_text( listbox.get_string_selection() )
|
611
|
+
@m_text.append_text( "'\n" )
|
612
|
+
|
613
|
+
# NOTE: get_client_data and set_client_data have been removed from wxRuby 0.4
|
614
|
+
# because they could cause crashes
|
615
|
+
# obj = event.get_client_data()
|
616
|
+
# @m_text.append_text( "ListBox event client data string is: '" )
|
617
|
+
# if obj
|
618
|
+
# @m_text.append_text( obj )
|
619
|
+
# else
|
620
|
+
# @m_text.append_text( "none" )
|
621
|
+
# end
|
622
|
+
|
623
|
+
# @m_text.append_text( "'\n" )
|
624
|
+
# @m_text.append_text( "ListBox control client data string is: '" )
|
625
|
+
# obj = listbox.get_client_data(listbox.get_selection())
|
626
|
+
# if obj
|
627
|
+
# @m_text.append_text( obj )
|
628
|
+
# else
|
629
|
+
# @m_text.append_text( "none" )
|
630
|
+
# end
|
631
|
+
# @m_text.append_text( "'\n" )
|
632
|
+
end
|
633
|
+
|
634
|
+
def onListBoxDoubleClick(event)
|
635
|
+
@m_text.append_text( "ListBox double click string is: " )
|
636
|
+
@m_text.append_text( event.get_string() )
|
637
|
+
@m_text.append_text( "\n" )
|
638
|
+
end
|
639
|
+
|
640
|
+
def onListBoxButtons(event)
|
641
|
+
case event.get_id()
|
642
|
+
when ID_LISTBOX_ENABLE
|
643
|
+
@m_text.append_text("Checkbox clicked.\n")
|
644
|
+
if event.get_int() != 0
|
645
|
+
@m_checkbox.set_tool_tip( "Click to enable listbox" )
|
646
|
+
@m_toggle_color.enable(false)
|
647
|
+
else
|
648
|
+
@m_checkbox.set_tool_tip( "Click to disable listbox" )
|
649
|
+
@m_toggle_color.enable(true)
|
650
|
+
end
|
651
|
+
@m_listbox.enable( event.get_int() == 0 )
|
652
|
+
@m_lbSelectThis.enable( event.get_int() == 0 )
|
653
|
+
@m_lbSelectNum.enable( event.get_int() == 0 )
|
654
|
+
@m_listboxSorted.enable( event.get_int() == 0 )
|
655
|
+
#w = Window::find_window_by_id(ID_CHANGE_COLOUR)
|
656
|
+
#if(w)
|
657
|
+
# w.enable( event.get_int() == 0 )
|
658
|
+
#else
|
659
|
+
# puts("Window ID_CHANGE_COLOR not found")
|
660
|
+
#end
|
661
|
+
when ID_LISTBOX_SEL_NUM
|
662
|
+
@m_listbox.set_selection( 2 )
|
663
|
+
@m_listboxSorted.set_selection( 2 )
|
664
|
+
@m_lbSelectThis.warp_pointer( 40, 14 )
|
665
|
+
when ID_LISTBOX_SEL_STR
|
666
|
+
@m_listbox.set_string_selection( "This" )
|
667
|
+
@m_listboxSorted.set_string_selection( "This" )
|
668
|
+
@m_lbSelectNum.warp_pointer( 40, 14 )
|
669
|
+
when ID_LISTBOX_CLEAR
|
670
|
+
@m_listbox.clear()
|
671
|
+
@m_listboxSorted.clear()
|
672
|
+
when ID_LISTBOX_APPEND
|
673
|
+
@m_listbox.append( "Hi!" )
|
674
|
+
@m_listboxSorted.append( "Hi!" )
|
675
|
+
when ID_LISTBOX_DELETE
|
676
|
+
idx = @m_listbox.get_selection()
|
677
|
+
if idx != NOT_FOUND
|
678
|
+
@m_listbox.delete( idx )
|
679
|
+
end
|
680
|
+
idx = @m_listboxSorted.get_selection()
|
681
|
+
if idx != NOT_FOUND
|
682
|
+
@m_listboxSorted.delete( idx )
|
683
|
+
end
|
684
|
+
when ID_LISTBOX_FONT
|
685
|
+
@m_listbox.set_font( ITALIC_FONT )
|
686
|
+
@m_listboxSorted.set_font( ITALIC_FONT )
|
687
|
+
@m_checkbox.set_font( ITALIC_FONT )
|
688
|
+
end
|
689
|
+
end
|
690
|
+
|
691
|
+
|
692
|
+
def onChoice(event)
|
693
|
+
|
694
|
+
choice = (event.get_id() == ID_CHOICE) ? @m_choice : @m_choiceSorted
|
695
|
+
|
696
|
+
@m_text.append_text( "Choice event selection string is: '" )
|
697
|
+
@m_text.append_text( event.get_string() )
|
698
|
+
@m_text.append_text( "'\n" )
|
699
|
+
@m_text.append_text( "Choice control selection string is: '" )
|
700
|
+
@m_text.append_text( choice.get_string_selection() )
|
701
|
+
@m_text.append_text( "'\n" )
|
702
|
+
|
703
|
+
# NOTE: get_client_data and set_client_data have been removed from wxRuby 0.4
|
704
|
+
# because they could cause crashes
|
705
|
+
# obj = event.get_client_data()
|
706
|
+
# @m_text.append_text( "Choice event client data string is: '" )
|
707
|
+
|
708
|
+
# if obj
|
709
|
+
# @m_text.append_text( obj )
|
710
|
+
# else
|
711
|
+
# @m_text.append_text( "none" )
|
712
|
+
# end
|
713
|
+
|
714
|
+
# @m_text.append_text( "'\n" )
|
715
|
+
# @m_text.append_text( "Choice control client data string is: '" )
|
716
|
+
|
717
|
+
# obj = choice.get_client_data(choice.get_selection())
|
718
|
+
# if obj
|
719
|
+
# @m_text.append_text( obj )
|
720
|
+
# else
|
721
|
+
# @m_text.append_text( "none" )
|
722
|
+
# end
|
723
|
+
# @m_text.append_text( "'\n" )
|
724
|
+
end
|
725
|
+
|
726
|
+
def onChoiceButtons(event)
|
727
|
+
case event.get_id()
|
728
|
+
when ID_CHOICE_ENABLE
|
729
|
+
@m_choice.enable( event.get_int() == 0 )
|
730
|
+
@m_choiceSorted.enable( event.get_int() == 0 )
|
731
|
+
when ID_CHOICE_SEL_NUM
|
732
|
+
@m_choice.set_selection( 2 )
|
733
|
+
@m_choiceSorted.set_selection( 2 )
|
734
|
+
when ID_CHOICE_SEL_STR
|
735
|
+
@m_choice.set_string_selection( "This" )
|
736
|
+
@m_choiceSorted.set_string_selection( "This" )
|
737
|
+
when ID_CHOICE_CLEAR
|
738
|
+
@m_choice.clear()
|
739
|
+
@m_choiceSorted.clear()
|
740
|
+
when ID_CHOICE_APPEND
|
741
|
+
@m_choice.append( "Hi!" )
|
742
|
+
@m_choiceSorted.append( "Hi!" )
|
743
|
+
when ID_CHOICE_DELETE
|
744
|
+
idx = @m_choice.get_selection()
|
745
|
+
if idx != NOT_FOUND
|
746
|
+
@m_choice.delete( idx )
|
747
|
+
end
|
748
|
+
idx = @m_choiceSorted.get_selection()
|
749
|
+
if idx != NOT_FOUND
|
750
|
+
@m_choiceSorted.delete( idx )
|
751
|
+
end
|
752
|
+
when ID_CHOICE_FONT
|
753
|
+
@m_choice.set_font( ITALIC_FONT )
|
754
|
+
@m_choiceSorted.set_font( ITALIC_FONT )
|
755
|
+
end
|
756
|
+
end
|
757
|
+
|
758
|
+
def onCombo(event)
|
759
|
+
@m_text.append_text( "ComboBox event selection string is: " )
|
760
|
+
@m_text.append_text( event.get_string() )
|
761
|
+
@m_text.append_text( "\n" )
|
762
|
+
@m_text.append_text( "ComboBox control selection string is: " )
|
763
|
+
@m_text.append_text( @m_combo.get_string_selection() )
|
764
|
+
@m_text.append_text( "\n" )
|
765
|
+
end
|
766
|
+
|
767
|
+
def onComboTextChanged(event)
|
768
|
+
str = sprintf( "Text in the combobox changed: now is '%s'.",
|
769
|
+
event.get_string())
|
770
|
+
log_message( str )
|
771
|
+
end
|
772
|
+
|
773
|
+
def onComboTextEnter(event)
|
774
|
+
log_message("Enter pressed in the combobox: value is '%s'.",
|
775
|
+
@m_combo.get_value())
|
776
|
+
end
|
777
|
+
|
778
|
+
def onComboButtons(event)
|
779
|
+
case event.get_id()
|
780
|
+
when ID_COMBO_ENABLE
|
781
|
+
@m_combo.enable( event.get_int() == 0 )
|
782
|
+
when ID_COMBO_SEL_NUM
|
783
|
+
@m_combo.set_selection( 2 )
|
784
|
+
when ID_COMBO_SEL_STR
|
785
|
+
@m_combo.set_string_selection( "This" )
|
786
|
+
when ID_COMBO_CLEAR
|
787
|
+
@m_combo.clear()
|
788
|
+
when ID_COMBO_APPEND
|
789
|
+
@m_combo.append( "Hi!" )
|
790
|
+
when ID_COMBO_DELETE
|
791
|
+
idx = @m_combo.get_selection()
|
792
|
+
@m_combo.delete( idx )
|
793
|
+
when ID_COMBO_FONT
|
794
|
+
@m_combo.set_font( ITALIC_FONT )
|
795
|
+
end
|
796
|
+
end
|
797
|
+
|
798
|
+
def onRadio(event)
|
799
|
+
@m_text.append_text( "RadioBox selection string is: " )
|
800
|
+
@m_text.append_text( event.get_string() )
|
801
|
+
@m_text.append_text( "\n" )
|
802
|
+
end
|
803
|
+
|
804
|
+
def onRadioButtons(event)
|
805
|
+
case event.get_id()
|
806
|
+
when ID_RADIOBOX_ENABLE
|
807
|
+
@m_radio.enable( event.get_int() == 0 )
|
808
|
+
when ID_RADIOBOX_SEL_NUM
|
809
|
+
@m_radio.set_selection( 2 )
|
810
|
+
when ID_RADIOBOX_SEL_STR
|
811
|
+
@m_radio.set_string_selection( "This" )
|
812
|
+
when ID_RADIOBOX_FONT
|
813
|
+
@m_radio.set_foreground_colour(GREEN)
|
814
|
+
@m_radio.set_font( ITALIC_FONT )
|
815
|
+
end
|
816
|
+
end
|
817
|
+
|
818
|
+
def onSetFont(event)
|
819
|
+
@m_fontButton.set_font( ITALIC_FONT )
|
820
|
+
@m_text.set_font( ITALIC_FONT )
|
821
|
+
end
|
822
|
+
|
823
|
+
def onupdateLabel(event)
|
824
|
+
@m_label.set_label(event.get_int() != 0 ? "Very very very very very long text." : "Shorter text.")
|
825
|
+
end
|
826
|
+
|
827
|
+
def onSliderupdate(event)
|
828
|
+
@m_gauge.set_value( @m_slider.get_value() )
|
829
|
+
@m_gaugeVert.set_value( @m_slider.get_value() / 2 )
|
830
|
+
end
|
831
|
+
|
832
|
+
|
833
|
+
def onSpinCtrlText(event)
|
834
|
+
if @m_spinctrl
|
835
|
+
s = sprintf( "Spin ctrl text changed: now %d (from event: %s)\n",
|
836
|
+
@m_spinctrl.get_value(), event.get_string() )
|
837
|
+
@m_text.append_text(s)
|
838
|
+
end
|
839
|
+
end
|
840
|
+
|
841
|
+
def onSpinCtrl(event)
|
842
|
+
if @m_spinctrl
|
843
|
+
s = sprintf( "Spin ctrl changed: now %d (from event: %d)\n",
|
844
|
+
@m_spinctrl.get_value(), event.get_int() )
|
845
|
+
@m_text.append_text(s)
|
846
|
+
end
|
847
|
+
end
|
848
|
+
|
849
|
+
def onSpinCtrlUp(event)
|
850
|
+
if @m_spinctrl
|
851
|
+
@m_text.append_text( sprintf(
|
852
|
+
"Spin up: %d (from event: %d)\n",
|
853
|
+
@m_spinctrl.get_value(), event.get_int() ) )
|
854
|
+
end
|
855
|
+
end
|
856
|
+
|
857
|
+
def onSpinCtrlDown(event)
|
858
|
+
if @m_spinctrl
|
859
|
+
@m_text.append_text( sprintf(
|
860
|
+
"Spin down: %d (from event: %d)\n",
|
861
|
+
@m_spinctrl.get_value(), event.get_int() ) )
|
862
|
+
end
|
863
|
+
end
|
864
|
+
|
865
|
+
|
866
|
+
def onSpinUp(event)
|
867
|
+
value = sprintf( "Spin control up: current = %d\n",
|
868
|
+
@m_spinbutton.get_value())
|
869
|
+
|
870
|
+
if event.get_position() > 17
|
871
|
+
value += "Preventing the spin button from going above 17.\n"
|
872
|
+
event.veto()
|
873
|
+
end
|
874
|
+
|
875
|
+
@m_text.append_text(value)
|
876
|
+
end
|
877
|
+
|
878
|
+
def onSpinDown(event)
|
879
|
+
value = sprintf( "Spin control down: current = %d\n",
|
880
|
+
@m_spinbutton.get_value())
|
881
|
+
|
882
|
+
if event.get_position() < -17
|
883
|
+
value += "Preventing the spin button from going below -17.\n"
|
884
|
+
event.veto()
|
885
|
+
end
|
886
|
+
|
887
|
+
@m_text.append_text(value)
|
888
|
+
end
|
889
|
+
|
890
|
+
def onSpinupdate(event)
|
891
|
+
value = sprintf( "%d", event.get_position() )
|
892
|
+
@m_spintext.set_value( value )
|
893
|
+
|
894
|
+
value = sprintf( "Spin control range: (%d, %d), current = %d\n",
|
895
|
+
@m_spinbutton.get_min(), @m_spinbutton.get_max(),
|
896
|
+
@m_spinbutton.get_value())
|
897
|
+
|
898
|
+
@m_text.append_text(value)
|
899
|
+
end
|
900
|
+
|
901
|
+
def onupdateShowProgress(event)
|
902
|
+
event.enable( @m_spinbutton.get_value() > 0 )
|
903
|
+
end
|
904
|
+
|
905
|
+
def onShowProgress(event)
|
906
|
+
max = @m_spinbutton.get_value()
|
907
|
+
if max <= 0
|
908
|
+
log_error("You must set positive range!")
|
909
|
+
return nil
|
910
|
+
end
|
911
|
+
|
912
|
+
cont = false
|
913
|
+
ProgressDialog("Progress dialog example",
|
914
|
+
"An informative message",
|
915
|
+
max, # range
|
916
|
+
self, # parent
|
917
|
+
PD_CAN_ABORT |
|
918
|
+
PD_AUTO_HIDE |
|
919
|
+
PD_APP_MODAL |
|
920
|
+
PD_ELAPSED_TIME |
|
921
|
+
PD_ESTIMATED_TIME |
|
922
|
+
PD_REMAINING_TIME) do |dialog|
|
923
|
+
cont = true
|
924
|
+
0.upto(max) {|i|
|
925
|
+
break if !cont
|
926
|
+
sleep(1)
|
927
|
+
if i == max
|
928
|
+
cont = dialog.update(i, "That's all, folks!")
|
929
|
+
elsif i == max / 2
|
930
|
+
cont = dialog.update(i, "Only a half left (very long message)!")
|
931
|
+
else
|
932
|
+
cont = dialog.update(i)
|
933
|
+
end
|
934
|
+
}
|
935
|
+
end
|
936
|
+
if !cont
|
937
|
+
@m_text << "Progress dialog aborted!\n"
|
938
|
+
else
|
939
|
+
@m_text << "Countdown from " << max << " finished.\n"
|
940
|
+
end
|
941
|
+
end
|
942
|
+
|
943
|
+
def onSizerCheck(event)
|
944
|
+
case event.get_id()
|
945
|
+
when ID_SIZER_CHECK1
|
946
|
+
@m_buttonSizer.show(@m_sizerBtn1, event.is_checked())
|
947
|
+
@m_buttonSizer.layout()
|
948
|
+
when ID_SIZER_CHECK2
|
949
|
+
@m_buttonSizer.show(@m_sizerBtn2, event.is_checked())
|
950
|
+
@m_buttonSizer.layout()
|
951
|
+
when ID_SIZER_CHECK3
|
952
|
+
@m_buttonSizer.show(@m_sizerBtn3, event.is_checked())
|
953
|
+
@m_buttonSizer.layout()
|
954
|
+
when ID_SIZER_CHECK4
|
955
|
+
@m_buttonSizer.show(@m_sizerBtn4, event.is_checked())
|
956
|
+
@m_buttonSizer.layout()
|
957
|
+
when ID_SIZER_CHECK14
|
958
|
+
@m_hsizer.show(@m_buttonSizer, event.is_checked())
|
959
|
+
@m_hsizer.layout()
|
960
|
+
when ID_SIZER_CHECKBIG
|
961
|
+
@m_hsizer.show(@m_bigBtn, event.is_checked())
|
962
|
+
@m_hsizer.layout()
|
963
|
+
end
|
964
|
+
end
|
965
|
+
end
|
966
|
+
|
967
|
+
|
968
|
+
class MyFrame < Frame
|
969
|
+
def initialize(title,x,y)
|
970
|
+
super(nil, -1, title, Point.new(x, y), Size.new(500, 430))
|
971
|
+
|
972
|
+
@s_delay = 5000
|
973
|
+
@s_enabled = true
|
974
|
+
@s_enable2 = true
|
975
|
+
@s_windowFocus = nil
|
976
|
+
mondrian_icon =
|
977
|
+
case Wx::PLATFORM
|
978
|
+
when "WXMSW"
|
979
|
+
Icon.new( File.join( File.dirname(__FILE__), "mondrian.ico"),
|
980
|
+
Wx::BITMAP_TYPE_ICO )
|
981
|
+
else
|
982
|
+
Icon.new( File.join( File.dirname(__FILE__), "mondrian.xpm"),
|
983
|
+
Wx::BITMAP_TYPE_XPM )
|
984
|
+
end
|
985
|
+
|
986
|
+
set_icon(mondrian_icon)
|
987
|
+
|
988
|
+
file_menu = Menu.new
|
989
|
+
|
990
|
+
file_menu.append(CONTROLS_CLEAR_LOG, "&clear log\tCtrl-L")
|
991
|
+
file_menu.append_separator()
|
992
|
+
file_menu.append(CONTROLS_ABOUT, "&About\tF1")
|
993
|
+
file_menu.append_separator()
|
994
|
+
file_menu.append(CONTROLS_QUIT, "E&xit\tAlt-X", "Quit controls sample")
|
995
|
+
|
996
|
+
menu_bar = MenuBar.new
|
997
|
+
menu_bar.append(file_menu, "&File")
|
998
|
+
|
999
|
+
tooltip_menu = Menu.new
|
1000
|
+
tooltip_menu.append(CONTROLS_SET_TOOLTIP_DELAY, "Set &delay\tCtrl-D")
|
1001
|
+
tooltip_menu.append_separator()
|
1002
|
+
tooltip_menu.append(CONTROLS_ENABLE_TOOLTIPS, "&Toggle tooltips\tCtrl-T",
|
1003
|
+
"enable/disable tooltips", ITEM_CHECK)
|
1004
|
+
tooltip_menu.check(CONTROLS_ENABLE_TOOLTIPS, true)
|
1005
|
+
menu_bar.append(tooltip_menu, "&Tooltips")
|
1006
|
+
|
1007
|
+
panel_menu = Menu.new
|
1008
|
+
panel_menu.append(CONTROLS_ENABLE_ALL, "&Disable all\tCtrl-E",
|
1009
|
+
"enable/disable all panel controls", ITEM_CHECK)
|
1010
|
+
menu_bar.append(panel_menu, "&Panel")
|
1011
|
+
|
1012
|
+
set_menu_bar(menu_bar)
|
1013
|
+
|
1014
|
+
create_status_bar(2)
|
1015
|
+
|
1016
|
+
@m_panel = MyPanel.new( self, 10, 10, 300, 100 )
|
1017
|
+
|
1018
|
+
set_size_hints( 500, 425 )
|
1019
|
+
|
1020
|
+
evt_menu(CONTROLS_QUIT) {|event| onQuit(event) }
|
1021
|
+
evt_menu(CONTROLS_ABOUT) {|event| onAbout(event) }
|
1022
|
+
evt_menu(CONTROLS_CLEAR_LOG) {|event| onClearLog(event) }
|
1023
|
+
evt_menu(CONTROLS_SET_TOOLTIP_DELAY) {|event| onSetTooltipDelay(event) }
|
1024
|
+
evt_menu(CONTROLS_ENABLE_TOOLTIPS) {|event| onToggleTooltips(event) }
|
1025
|
+
evt_menu(CONTROLS_ENABLE_ALL) {|event| onenableAll(event) }
|
1026
|
+
|
1027
|
+
evt_size() {|event| onSize(event) }
|
1028
|
+
evt_move() {|event| onMove(event) }
|
1029
|
+
evt_idle() {|event| onIdle(event) }
|
1030
|
+
evt_close() {|event| onClose(event) }
|
1031
|
+
end
|
1032
|
+
|
1033
|
+
def onClose(event)
|
1034
|
+
Log::set_active_target(@m_panel.m_logTargetOld)
|
1035
|
+
destroy()
|
1036
|
+
end
|
1037
|
+
|
1038
|
+
def onQuit(event)
|
1039
|
+
close(true)
|
1040
|
+
end
|
1041
|
+
|
1042
|
+
def onAbout(event)
|
1043
|
+
BusyCursor.busy do
|
1044
|
+
Wx.MessageDialog(self, "This is a control sample", "About Controls", OK) { |dlg| dlg.show_modal }
|
1045
|
+
end
|
1046
|
+
end
|
1047
|
+
|
1048
|
+
def onClearLog(event)
|
1049
|
+
@m_panel.m_text.clear()
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
def onSetTooltipDelay(event)
|
1053
|
+
delay = @s_delay.to_s
|
1054
|
+
|
1055
|
+
delay = get_text_from_user("Enter delay (in milliseconds)",
|
1056
|
+
"Set tooltip delay",
|
1057
|
+
delay,
|
1058
|
+
self)
|
1059
|
+
if !delay
|
1060
|
+
return Qnil # cancelled
|
1061
|
+
end
|
1062
|
+
|
1063
|
+
@s_delay = delay.to_i
|
1064
|
+
|
1065
|
+
ToolTip::set_delay(@s_delay)
|
1066
|
+
|
1067
|
+
log_status(self, "Tooltip delay set to %d milliseconds", @s_delay)
|
1068
|
+
end
|
1069
|
+
|
1070
|
+
def onToggleTooltips(event)
|
1071
|
+
@s_enabled = ! @s_enabled
|
1072
|
+
ToolTip::enable(@s_enabled)
|
1073
|
+
log_status(self, "Tooltips %sabled", @s_enabled ? "en" : "dis" )
|
1074
|
+
end
|
1075
|
+
|
1076
|
+
def onenableAll(event)
|
1077
|
+
@s_enable2 = ! @s_enable2
|
1078
|
+
@m_panel.enable(@s_enable2)
|
1079
|
+
end
|
1080
|
+
|
1081
|
+
def onMove(event)
|
1082
|
+
update_status_bar(event.get_position(), get_size())
|
1083
|
+
event.skip()
|
1084
|
+
end
|
1085
|
+
|
1086
|
+
def onSize(event)
|
1087
|
+
update_status_bar(get_position(), event.get_size())
|
1088
|
+
event.skip()
|
1089
|
+
end
|
1090
|
+
|
1091
|
+
def onIdle(event)
|
1092
|
+
# track the window which has the focus in the status bar
|
1093
|
+
focus = Window::find_focus()
|
1094
|
+
if focus && (focus != @s_windowFocus)
|
1095
|
+
@s_windowFocus = focus
|
1096
|
+
msg = sprintf( "Focus: %s, HWND = %08x",
|
1097
|
+
@s_windowFocus.wx_class,
|
1098
|
+
@s_windowFocus.get_handle )
|
1099
|
+
set_status_text(msg)
|
1100
|
+
end
|
1101
|
+
end
|
1102
|
+
|
1103
|
+
def GetPanel()
|
1104
|
+
@m_panel
|
1105
|
+
end
|
1106
|
+
|
1107
|
+
def update_status_bar(pos,size)
|
1108
|
+
if get_status_bar()
|
1109
|
+
sizeAll = get_size()
|
1110
|
+
sizeCl = get_client_size()
|
1111
|
+
msg = sprintf("pos=(%d, %d), size=%dx%d or %dx%d (client=%dx%d)",
|
1112
|
+
pos.x, pos.y,
|
1113
|
+
size.width, size.height,
|
1114
|
+
sizeAll.width, sizeAll.height,
|
1115
|
+
sizeCl.width, sizeCl.height)
|
1116
|
+
set_status_text(msg, 1)
|
1117
|
+
end
|
1118
|
+
end
|
1119
|
+
|
1120
|
+
end
|
1121
|
+
|
1122
|
+
module ControlsSample
|
1123
|
+
|
1124
|
+
include WxRuby::Sample if defined? WxRuby::Sample
|
1125
|
+
|
1126
|
+
def self.describe
|
1127
|
+
{ file: __FILE__,
|
1128
|
+
summary: 'wxRuby controls example.',
|
1129
|
+
description: 'wxRuby example demonstrating various common controls.' }
|
1130
|
+
end
|
1131
|
+
|
1132
|
+
def self.activate
|
1133
|
+
# Create the main frame window
|
1134
|
+
frame = MyFrame.new("Controls Windows App", 50, 50)
|
1135
|
+
frame.show(true)
|
1136
|
+
frame
|
1137
|
+
end
|
1138
|
+
|
1139
|
+
if $0 == __FILE__
|
1140
|
+
Wx::App.run { !!ControlsSample.activate }
|
1141
|
+
end
|
1142
|
+
|
1143
|
+
end
|