wxruby3 0.9.0.pre.beta.2-x64-mingw-ucrt-3.2-3.2.2
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/event.rb +16 -0
- data/lib/wx/core/events/evt_list.rb +1378 -0
- data/lib/wx/core/evthandler.rb +240 -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 +105 -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/dc.rb +49 -0
- data/lib/wx/doc/enum.rb +66 -0
- data/lib/wx/doc/evthandler.rb +84 -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 +26 -0
- data/lib/wx/pg/property_grid.rb +56 -0
- data/lib/wx/pg/property_grid_interface.rb +33 -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/controls.rb +1143 -0
- data/samples/controls/get_item_sample.rb +117 -0
- data/samples/controls/icons/choice.xpm +27 -0
- data/samples/controls/icons/combo.xpm +27 -0
- data/samples/controls/icons/gauge.xpm +27 -0
- data/samples/controls/icons/list.xpm +27 -0
- data/samples/controls/icons/radio.xpm +27 -0
- data/samples/controls/icons/stattext.xpm +24 -0
- data/samples/controls/icons/text.xpm +27 -0
- data/samples/controls/mondrian.ico +0 -0
- data/samples/controls/mondrian.xpm +44 -0
- data/samples/controls/test2.bmp +0 -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 +2707 -0
- data/samples/propgrid/propgrid_minimal.rb +106 -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 +534 -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 +337 -0
- data/samples/sampler/stc_editor.rb +326 -0
- data/samples/sampler/txt_editor.rb +135 -0
- data/samples/sampler/undo.xpm +58 -0
- data/samples/sampler.rb +401 -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 +928 -0
@@ -0,0 +1,900 @@
|
|
1
|
+
###
|
2
|
+
# wxRuby Ribbon sample
|
3
|
+
# Copyright (c) M.J.N. Corino, The Netherlands
|
4
|
+
###
|
5
|
+
|
6
|
+
require 'wx'
|
7
|
+
|
8
|
+
class MyFrame < Wx::Frame
|
9
|
+
|
10
|
+
module ID
|
11
|
+
%i[
|
12
|
+
CIRCLE
|
13
|
+
CROSS
|
14
|
+
TRIANGLE
|
15
|
+
SQUARE
|
16
|
+
POLYGON
|
17
|
+
SELECTION_EXPAND_H
|
18
|
+
SELECTION_EXPAND_V
|
19
|
+
SELECTION_CONTRACT
|
20
|
+
BUTTON_XX
|
21
|
+
BUTTON_XY
|
22
|
+
PRIMARY_COLOUR
|
23
|
+
SECONDARY_COLOUR
|
24
|
+
DEFAULT_PROVIDER
|
25
|
+
AUI_PROVIDER
|
26
|
+
MSW_PROVIDER
|
27
|
+
MAIN_TOOLBAR
|
28
|
+
POSITION_TOP
|
29
|
+
POSITION_TOP_ICONS
|
30
|
+
POSITION_TOP_BOTH
|
31
|
+
POSITION_LEFT
|
32
|
+
POSITION_LEFT_LABELS
|
33
|
+
POSITION_LEFT_BOTH
|
34
|
+
TOGGLE_PANELS
|
35
|
+
ENABLE
|
36
|
+
DISABLE
|
37
|
+
DISABLED
|
38
|
+
UI_ENABLE_UPDATED
|
39
|
+
CHECK
|
40
|
+
UI_CHECK_UPDATED
|
41
|
+
CHANGE_TEXT1
|
42
|
+
CHANGE_TEXT2
|
43
|
+
UI_CHANGE_TEXT_UPDATED
|
44
|
+
REMOVE_PAGE
|
45
|
+
HIDE_PAGES
|
46
|
+
SHOW_PAGES
|
47
|
+
PLUS_MINUS
|
48
|
+
CHANGE_LABEL
|
49
|
+
SMALL_BUTTON_1
|
50
|
+
SMALL_BUTTON_2
|
51
|
+
SMALL_BUTTON_3
|
52
|
+
SMALL_BUTTON_4
|
53
|
+
SMALL_BUTTON_5
|
54
|
+
SMALL_BUTTON_6
|
55
|
+
].each_with_index { |sym, ix| self.const_set(sym, Wx::ID_HIGHEST+1+ix) }
|
56
|
+
end
|
57
|
+
|
58
|
+
def initialize
|
59
|
+
super(nil, Wx::ID_ANY, "wxRibbon Sample Application", size: [800, 600], style: Wx::DEFAULT_FRAME_STYLE)
|
60
|
+
|
61
|
+
@colour_data = Wx::ColourData.new
|
62
|
+
@ribbon = Wx::RBN::RibbonBar.new(self, Wx::ID_ANY,
|
63
|
+
style: Wx::RBN::RIBBON_BAR_FLOW_HORIZONTAL |
|
64
|
+
Wx::RBN::RIBBON_BAR_SHOW_PAGE_LABELS |
|
65
|
+
Wx::RBN::RIBBON_BAR_SHOW_PANEL_EXT_BUTTONS |
|
66
|
+
Wx::RBN::RIBBON_BAR_SHOW_TOGGLE_BUTTON |
|
67
|
+
Wx::RBN::RIBBON_BAR_SHOW_HELP_BUTTON)
|
68
|
+
|
69
|
+
home = Wx::RBN::RibbonPage.new(@ribbon, Wx::ID_ANY, "Examples", bitmap_(:ribbon_xpm))
|
70
|
+
toolbar_panel = Wx::RBN::RibbonPanel.new(home, Wx::ID_ANY, "Toolbar",
|
71
|
+
style: Wx::RBN::RIBBON_PANEL_NO_AUTO_MINIMISE |
|
72
|
+
Wx::RBN::RIBBON_PANEL_EXT_BUTTON)
|
73
|
+
toolbar = Wx::RBN::RibbonToolBar.new(toolbar_panel, ID::MAIN_TOOLBAR)
|
74
|
+
toolbar.add_toggle_tool(Wx::ID_JUSTIFY_LEFT, bitmap_(:align_left_xpm))
|
75
|
+
toolbar.add_toggle_tool(Wx::ID_JUSTIFY_CENTER , bitmap_(:align_center_xpm))
|
76
|
+
toolbar.add_toggle_tool(Wx::ID_JUSTIFY_RIGHT, bitmap_(:align_right_xpm))
|
77
|
+
toolbar.add_separator
|
78
|
+
toolbar.add_hybrid_tool(Wx::ID_NEW, Wx::ArtProvider.get_bitmap(Wx::ART_NEW, Wx::ART_OTHER, Wx::Size.new(16, 15)))
|
79
|
+
toolbar.add_tool(Wx::ID_OPEN, Wx::ArtProvider.get_bitmap(Wx::ART_FILE_OPEN, Wx::ART_OTHER, Wx::Size.new(16, 15)), "Open something")
|
80
|
+
toolbar.add_tool(Wx::ID_SAVE, Wx::ArtProvider.get_bitmap(Wx::ART_FILE_SAVE, Wx::ART_OTHER, Wx::Size.new(16, 15)), "Save something")
|
81
|
+
toolbar.add_tool(Wx::ID_SAVEAS, Wx::ArtProvider.get_bitmap(Wx::ART_FILE_SAVE_AS, Wx::ART_OTHER, Wx::Size.new(16, 15)), "Save something as ...")
|
82
|
+
toolbar.enable_tool(Wx::ID_OPEN, false)
|
83
|
+
toolbar.enable_tool(Wx::ID_SAVE, false)
|
84
|
+
toolbar.enable_tool(Wx::ID_SAVEAS, false)
|
85
|
+
toolbar.add_separator
|
86
|
+
toolbar.add_dropdown_tool(Wx::ID_UNDO, Wx::ArtProvider.get_bitmap(Wx::ART_UNDO, Wx::ART_OTHER, Wx::Size.new(16, 15)))
|
87
|
+
toolbar.add_dropdown_tool(Wx::ID_REDO, Wx::ArtProvider.get_bitmap(Wx::ART_REDO, Wx::ART_OTHER, Wx::Size.new(16, 15)))
|
88
|
+
toolbar.add_separator
|
89
|
+
toolbar.add_tool(Wx::ID_ANY, Wx::ArtProvider.get_bitmap(Wx::ART_REPORT_VIEW, Wx::ART_OTHER, Wx::Size.new(16, 15)))
|
90
|
+
toolbar.add_tool(Wx::ID_ANY, Wx::ArtProvider.get_bitmap(Wx::ART_LIST_VIEW, Wx::ART_OTHER, Wx::Size.new(16, 15)))
|
91
|
+
toolbar.add_separator
|
92
|
+
toolbar.add_hybrid_tool(ID::POSITION_LEFT, bitmap_(:position_left_xpm),
|
93
|
+
"Align ribbonbar vertically\non the left\nfor demonstration purposes")
|
94
|
+
toolbar.add_hybrid_tool(ID::POSITION_TOP, bitmap_(:position_top_xpm),
|
95
|
+
"Align the ribbonbar horizontally\nat the top\nfor demonstration purposes")
|
96
|
+
toolbar.add_separator
|
97
|
+
prt_tool = toolbar.add_hybrid_tool(Wx::ID_PRINT, Wx::ArtProvider.get_bitmap(Wx::ART_PRINT, Wx::ART_OTHER, Wx::Size.new(16, 15)),
|
98
|
+
"This is the Print button tooltip\ndemonstrating a tooltip")
|
99
|
+
toolbar.set_rows(2, 3)
|
100
|
+
|
101
|
+
if toolbar.tool_count != (toolbar.tool_pos(prt_tool)+1)
|
102
|
+
Wx.log_error('Wx::RibbonToolBar::get_tool_count or Wx::RibbonToolBar::get_tool_pos is broken')
|
103
|
+
elsif Wx::ID_PRINT != toolbar.tool_by_pos(toolbar.tool_pos(prt_tool))
|
104
|
+
Wx.log_error('Wx::RibbonToolBar::get_tool_by_pos is broken')
|
105
|
+
end
|
106
|
+
|
107
|
+
selection_panel = Wx::RBN::RibbonPanel.new(home, Wx::ID_ANY, "Selection", bitmap_(:selection_panel_xpm))
|
108
|
+
selection = Wx::RBN::RibbonButtonBar.new(selection_panel)
|
109
|
+
selection.add_button(ID::SELECTION_EXPAND_V, "Expand Vertically", bitmap_(:expand_selection_v_xpm),
|
110
|
+
"This is a tooltip for Expand Vertically\ndemonstrating a tooltip")
|
111
|
+
selection.add_button(ID::SELECTION_EXPAND_H, "Expand Horizontally", bitmap_(:expand_selection_h_xpm), '')
|
112
|
+
selection.add_button(ID::SELECTION_CONTRACT, "Contract", bitmap_(:auto_crop_selection_xpm), bitmap_(:auto_crop_selection_small_xpm))
|
113
|
+
|
114
|
+
shapes_panel = Wx::RBN::RibbonPanel.new(home, Wx::ID_ANY, "Shapes", bitmap_(:circle_small_xpm))
|
115
|
+
shapes = Wx::RBN::RibbonButtonBar.new(shapes_panel)
|
116
|
+
shapes.add_button(ID::CIRCLE, "Circle", bitmap_(:circle_xpm), bitmap_(:circle_small_xpm),
|
117
|
+
Wx::NULL_BITMAP, Wx::NULL_BITMAP, Wx::RBN::RIBBON_BUTTON_NORMAL,
|
118
|
+
"This is a tooltip for the circle button\ndemonstrating another tooltip")
|
119
|
+
shapes.add_button(ID::CROSS, "Cross", bitmap_(:cross_xpm), '')
|
120
|
+
shapes.add_hybrid_button(ID::TRIANGLE, "Triangle", bitmap_(:triangle_xpm))
|
121
|
+
shapes.add_button(ID::SQUARE, "Square", bitmap_(:square_xpm), '')
|
122
|
+
shapes.add_dropdown_button(ID::POLYGON, "Other Polygon", bitmap_(:hexagon_xpm), '')
|
123
|
+
|
124
|
+
sizer_panel = Wx::RBN::RibbonPanel.new(home, Wx::ID_ANY, "Panel with Sizer",
|
125
|
+
style: Wx::RBN::RIBBON_PANEL_DEFAULT_STYLE)
|
126
|
+
|
127
|
+
as = ["Item 1 using a box sizer now", "Item 2 using a box sizer now"]
|
128
|
+
sizer_panelcombo = Wx::ComboBox.new(sizer_panel, Wx::ID_ANY,
|
129
|
+
choices: as, style: Wx::CB_READONLY)
|
130
|
+
|
131
|
+
sizer_panelcombo2 = Wx::ComboBox.new(sizer_panel, Wx::ID_ANY,
|
132
|
+
choices: as, style: Wx::CB_READONLY)
|
133
|
+
|
134
|
+
sizer_panelcombo.select(0)
|
135
|
+
sizer_panelcombo2.select(1)
|
136
|
+
sizer_panelcombo.set_min_size(Wx::Size.new(150, -1))
|
137
|
+
sizer_panelcombo2.set_min_size(Wx::Size.new(150, -1))
|
138
|
+
|
139
|
+
bar = Wx::RBN::RibbonButtonBar.new(sizer_panel, Wx::ID_ANY)
|
140
|
+
bar.add_button(ID::BUTTON_XX, "xx", bitmap_(:ribbon_xpm))
|
141
|
+
bar.add_button(ID::BUTTON_XY, "xy", bitmap_(:ribbon_xpm))
|
142
|
+
# This prevents ribbon buttons in panels with sizer from collapsing.
|
143
|
+
bar.set_button_min_size_class(ID::BUTTON_XX, Wx::RBN::RIBBON_BUTTONBAR_BUTTON_LARGE)
|
144
|
+
bar.set_button_min_size_class(ID::BUTTON_XY, Wx::RBN::RIBBON_BUTTONBAR_BUTTON_LARGE)
|
145
|
+
|
146
|
+
sizer_panelsizer_h = Wx::BoxSizer.new(Wx::HORIZONTAL)
|
147
|
+
sizer_panelsizer_v = Wx::BoxSizer.new(Wx::VERTICAL)
|
148
|
+
sizer_panelsizer_v.add_stretch_spacer(1)
|
149
|
+
sizer_panelsizer_v.add(sizer_panelcombo, 0, Wx::ALL|Wx::EXPAND, 2)
|
150
|
+
sizer_panelsizer_v.add(sizer_panelcombo2, 0, Wx::ALL|Wx::EXPAND, 2)
|
151
|
+
sizer_panelsizer_v.add_stretch_spacer(1)
|
152
|
+
sizer_panelsizer_h.add(bar, 0, Wx::EXPAND)
|
153
|
+
sizer_panelsizer_h.add(sizer_panelsizer_v, 0)
|
154
|
+
sizer_panel.set_sizer(sizer_panelsizer_h)
|
155
|
+
|
156
|
+
label_font = Wx::Font.new(Wx::FontInfo.new(8).light)
|
157
|
+
@bitmap_creation_dc = Wx::MemoryDC.new
|
158
|
+
@bitmap_creation_dc.set_font(label_font)
|
159
|
+
|
160
|
+
scheme = Wx::RBN::RibbonPage.new(@ribbon, Wx::ID_ANY, "Appearance", bitmap_(:eye_xpm))
|
161
|
+
@default_primary = Wx::Colour.new
|
162
|
+
@default_secondary = Wx::Colour.new
|
163
|
+
@default_tertiary = Wx::Colour.new
|
164
|
+
@ribbon.get_art_provider.get_colour_scheme(@default_primary, @default_secondary, @default_tertiary)
|
165
|
+
provider_panel = Wx::RBN::RibbonPanel.new(scheme, Wx::ID_ANY,
|
166
|
+
"Art", style: Wx::RBN::RIBBON_PANEL_NO_AUTO_MINIMISE)
|
167
|
+
provider_bar = Wx::RBN::RibbonButtonBar.new(provider_panel, Wx::ID_ANY)
|
168
|
+
provider_bar.add_button(ID::DEFAULT_PROVIDER, "Default Provider",
|
169
|
+
Wx::ArtProvider.get_bitmap(Wx::ART_QUESTION, Wx::ART_OTHER, Wx::Size.new(32, 32)))
|
170
|
+
provider_bar.add_button(ID::AUI_PROVIDER, "AUI Provider", bitmap_(:aui_style_xpm))
|
171
|
+
provider_bar.add_button(ID::MSW_PROVIDER, "MSW Provider", bitmap_(:msw_style_xpm))
|
172
|
+
primary_panel = Wx::RBN::RibbonPanel.new(scheme, Wx::ID_ANY,
|
173
|
+
"Primary Colour", bitmap_(:colours_xpm))
|
174
|
+
@primary_gallery = populate_colours_panel(primary_panel,
|
175
|
+
@default_primary, ID::PRIMARY_COLOUR)
|
176
|
+
secondary_panel = Wx::RBN::RibbonPanel.new(scheme, Wx::ID_ANY,
|
177
|
+
"Secondary Colour", bitmap_(:colours_xpm))
|
178
|
+
@secondary_gallery = populate_colours_panel(secondary_panel,
|
179
|
+
@default_secondary, ID::SECONDARY_COLOUR)
|
180
|
+
|
181
|
+
page = Wx::RBN::RibbonPage.new(@ribbon, Wx::ID_ANY, "UI Updated", bitmap_(:ribbon_xpm))
|
182
|
+
panel = Wx::RBN::RibbonPanel.new(page, Wx::ID_ANY, "Enable/Disable", bitmap_(:ribbon_xpm))
|
183
|
+
bar = Wx::RBN::RibbonButtonBar.new(panel, Wx::ID_ANY)
|
184
|
+
bar.add_button(ID::DISABLED, "Disabled", bitmap_(:ribbon_xpm))
|
185
|
+
bar.add_button(ID::ENABLE, "Enable", bitmap_(:ribbon_xpm))
|
186
|
+
bar.add_button(ID::DISABLE, "Disable", bitmap_(:ribbon_xpm))
|
187
|
+
bar.add_button(ID::UI_ENABLE_UPDATED, "Enable UI updated", bitmap_(:ribbon_xpm))
|
188
|
+
bar.enable_button(ID::DISABLED, false)
|
189
|
+
@bEnabled = true
|
190
|
+
|
191
|
+
panel = Wx::RBN::RibbonPanel.new(page, Wx::ID_ANY, "Toggle", bitmap_(:ribbon_xpm))
|
192
|
+
bar = Wx::RBN::RibbonButtonBar.new(panel, Wx::ID_ANY)
|
193
|
+
bar.add_button(ID::CHECK, "Toggle", bitmap_(:ribbon_xpm))
|
194
|
+
bar.add_toggle_button(ID::UI_CHECK_UPDATED, "Toggled UI updated", bitmap_(:ribbon_xpm))
|
195
|
+
@bChecked = true
|
196
|
+
|
197
|
+
panel = Wx::RBN::RibbonPanel.new(page, Wx::ID_ANY, "Change text", bitmap_(:ribbon_xpm))
|
198
|
+
bar = Wx::RBN::RibbonButtonBar.new(panel, Wx::ID_ANY)
|
199
|
+
bar.add_button(ID::CHANGE_TEXT1, "One", bitmap_(:ribbon_xpm))
|
200
|
+
bar.add_button(ID::CHANGE_TEXT2, "Two", bitmap_(:ribbon_xpm))
|
201
|
+
bar.add_button(ID::UI_CHANGE_TEXT_UPDATED, "Zero", bitmap_(:ribbon_xpm))
|
202
|
+
|
203
|
+
# Also set the general disabled text colour:
|
204
|
+
artProvider = @ribbon.get_art_provider
|
205
|
+
tColour = artProvider.get_color(Wx::RBN::RIBBON_ART_BUTTON_BAR_LABEL_COLOUR)
|
206
|
+
artProvider.set_color(Wx::RBN::RIBBON_ART_BUTTON_BAR_LABEL_DISABLED_COLOUR, tColour.make_disabled)
|
207
|
+
|
208
|
+
Wx::RBN::RibbonPage.new(@ribbon, Wx::ID_ANY, "Empty Page", bitmap_(:empty_xpm))
|
209
|
+
|
210
|
+
page = Wx::RBN::RibbonPage.new(@ribbon, Wx::ID_ANY, "Another Page", bitmap_(:empty_xpm))
|
211
|
+
panel = Wx::RBN::RibbonPanel.new(page, Wx::ID_ANY, "Page manipulation", bitmap_(:ribbon_xpm))
|
212
|
+
bar = Wx::RBN::RibbonButtonBar.new(panel, Wx::ID_ANY)
|
213
|
+
bar.add_button(ID::REMOVE_PAGE, "Remove", Wx::ArtProvider.get_bitmap(Wx::ART_DELETE, Wx::ART_OTHER, Wx::Size.new(24, 24)))
|
214
|
+
bar.add_button(ID::HIDE_PAGES, "Hide Pages", bitmap_(:ribbon_xpm))
|
215
|
+
bar.add_button(ID::SHOW_PAGES, "Show Pages", bitmap_(:ribbon_xpm))
|
216
|
+
|
217
|
+
panel = Wx::RBN::RibbonPanel.new(page, Wx::ID_ANY, "Button bar manipulation", bitmap_(:ribbon_xpm))
|
218
|
+
button_bar = Wx::RBN::RibbonButtonBar.new(panel, Wx::ID_ANY)
|
219
|
+
button_bar.add_button(ID::PLUS_MINUS, "+/-",
|
220
|
+
Wx::ArtProvider.get_bitmap(Wx::ART_PLUS, Wx::ART_OTHER, Wx::Size.new(24, 24)))
|
221
|
+
@plus_minus_state = false
|
222
|
+
button_bar.add_button(ID::CHANGE_LABEL, "short", bitmap_(:ribbon_xpm))
|
223
|
+
button_bar.set_button_text_min_width(ID::CHANGE_LABEL, "some long text")
|
224
|
+
@change_label_state = false
|
225
|
+
|
226
|
+
panel = Wx::RBN::RibbonPanel.new(page, Wx::ID_ANY, "Always medium buttons", bitmap_(:ribbon_xpm))
|
227
|
+
bar = Wx::RBN::RibbonButtonBar.new(panel, Wx::ID_ANY)
|
228
|
+
bar.add_button(ID::SMALL_BUTTON_1, "Button 1", bitmap_(:ribbon_xpm))
|
229
|
+
bar.set_button_max_size_class(ID::SMALL_BUTTON_1, Wx::RBN::RIBBON_BUTTONBAR_BUTTON_MEDIUM)
|
230
|
+
bar.add_button(ID::SMALL_BUTTON_2, "Button 2", bitmap_(:ribbon_xpm))
|
231
|
+
bar.set_button_max_size_class(ID::SMALL_BUTTON_2, Wx::RBN::RIBBON_BUTTONBAR_BUTTON_MEDIUM)
|
232
|
+
bar.add_button(ID::SMALL_BUTTON_3, "Button 3", bitmap_(:ribbon_xpm))
|
233
|
+
bar.add_button(ID::SMALL_BUTTON_4, "Button 4", bitmap_(:ribbon_xpm))
|
234
|
+
bar.add_button(ID::SMALL_BUTTON_5, "Button 5", bitmap_(:ribbon_xpm))
|
235
|
+
bar.set_button_max_size_class(ID::SMALL_BUTTON_5, Wx::RBN::RIBBON_BUTTONBAR_BUTTON_MEDIUM)
|
236
|
+
bar.add_button(ID::SMALL_BUTTON_6, "Button 6", bitmap_(:ribbon_xpm))
|
237
|
+
bar.set_button_max_size_class(ID::SMALL_BUTTON_6, Wx::RBN::RIBBON_BUTTONBAR_BUTTON_MEDIUM)
|
238
|
+
|
239
|
+
Wx::RBN::RibbonPage.new(@ribbon, Wx::ID_ANY, "Highlight Page", bitmap_(:empty_xpm))
|
240
|
+
@ribbon.add_page_highlight(@ribbon.get_page_count-1)
|
241
|
+
|
242
|
+
|
243
|
+
page = Wx::RBN::RibbonPage.new(@ribbon, Wx::ID_ANY, "Advanced", bitmap_(:empty_xpm))
|
244
|
+
panel = Wx::RBN::RibbonPanel.new(page, Wx::ID_ANY, "Button bar manipulation", bitmap_(:ribbon_xpm))
|
245
|
+
button_bar = Wx::RBN::RibbonButtonBar.new(panel, Wx::ID_ANY)
|
246
|
+
button_bar.add_button(ID::PLUS_MINUS, "+/-",
|
247
|
+
Wx::ArtProvider.get_bitmap(Wx::ART_PLUS, Wx::ART_OTHER, Wx::Size.new(24, 24)))
|
248
|
+
@plus_minus_state = false
|
249
|
+
button_bar.add_button(ID::CHANGE_LABEL, "short", bitmap_(:ribbon_xpm))
|
250
|
+
button_bar.set_button_text_min_width(ID::CHANGE_LABEL, "some long text")
|
251
|
+
@change_label_state = false
|
252
|
+
|
253
|
+
panel = Wx::RBN::RibbonPanel.new(page, Wx::ID_ANY, "Always medium buttons", bitmap_(:ribbon_xpm))
|
254
|
+
bar = Wx::RBN::RibbonButtonBar.new(panel, Wx::ID_ANY)
|
255
|
+
bar.add_button(ID::SMALL_BUTTON_1, "Button 1", bitmap_(:ribbon_xpm))
|
256
|
+
bar.set_button_max_size_class(ID::SMALL_BUTTON_1, Wx::RBN::RIBBON_BUTTONBAR_BUTTON_MEDIUM)
|
257
|
+
bar.add_button(ID::SMALL_BUTTON_2, "Button 2", bitmap_(:ribbon_xpm))
|
258
|
+
bar.set_button_max_size_class(ID::SMALL_BUTTON_2, Wx::RBN::RIBBON_BUTTONBAR_BUTTON_MEDIUM)
|
259
|
+
bar.add_button(ID::SMALL_BUTTON_3, "Button 3", bitmap_(:ribbon_xpm))
|
260
|
+
bar.add_button(ID::SMALL_BUTTON_4, "Button 4", bitmap_(:ribbon_xpm))
|
261
|
+
bar.add_button(ID::SMALL_BUTTON_5, "Button 5", bitmap_(:ribbon_xpm))
|
262
|
+
bar.set_button_max_size_class(ID::SMALL_BUTTON_5, Wx::RBN::RIBBON_BUTTONBAR_BUTTON_MEDIUM)
|
263
|
+
bar.add_button(ID::SMALL_BUTTON_6, "Button 6", bitmap_(:ribbon_xpm))
|
264
|
+
bar.set_button_max_size_class(ID::SMALL_BUTTON_6, Wx::RBN::RIBBON_BUTTONBAR_BUTTON_MEDIUM)
|
265
|
+
|
266
|
+
@ribbon.realize
|
267
|
+
|
268
|
+
@logwindow = Wx::TextCtrl.new(self, Wx::ID_ANY, style: Wx::TE_MULTILINE | Wx::TE_READONLY |
|
269
|
+
Wx::TE_LEFT | Wx::TE_BESTWRAP | Wx::BORDER_NONE)
|
270
|
+
|
271
|
+
@togglePanels = Wx::ToggleButton.new(self, ID::TOGGLE_PANELS, "&Toggle panels")
|
272
|
+
@togglePanels.set_value(true)
|
273
|
+
|
274
|
+
s = Wx::BoxSizer.new(Wx::VERTICAL)
|
275
|
+
|
276
|
+
s.add(@ribbon, 0, Wx::EXPAND)
|
277
|
+
s.add(@logwindow, 1, Wx::EXPAND)
|
278
|
+
s.add(@togglePanels, Wx::SizerFlags.new.border)
|
279
|
+
|
280
|
+
set_sizer(s)
|
281
|
+
|
282
|
+
evt_ribbonbuttonbar_clicked(ID::ENABLE, :on_enable)
|
283
|
+
evt_ribbonbuttonbar_clicked(ID::DISABLE, :on_disable)
|
284
|
+
evt_ribbonbuttonbar_clicked(ID::DISABLED, :on_disabled)
|
285
|
+
evt_ribbonbuttonbar_clicked(ID::UI_ENABLE_UPDATED, :on_enable_updated)
|
286
|
+
evt_update_ui(ID::UI_ENABLE_UPDATED, :on_enable_update_ui)
|
287
|
+
evt_ribbonbuttonbar_clicked(ID::CHECK, :on_check)
|
288
|
+
evt_update_ui(ID::UI_CHECK_UPDATED, :on_check_update_ui)
|
289
|
+
evt_ribbonbuttonbar_clicked(ID::CHANGE_TEXT1, :on_change_text1)
|
290
|
+
evt_ribbonbuttonbar_clicked(ID::CHANGE_TEXT2, :on_change_text2)
|
291
|
+
evt_update_ui(ID::UI_CHANGE_TEXT_UPDATED, :on_change_text_update_ui)
|
292
|
+
evt_ribbonbuttonbar_clicked(ID::DEFAULT_PROVIDER, :on_default_provider)
|
293
|
+
evt_ribbonbuttonbar_clicked(ID::AUI_PROVIDER, :on_aui_provider)
|
294
|
+
evt_ribbonbuttonbar_clicked(ID::MSW_PROVIDER, :on_msw_provider)
|
295
|
+
evt_ribbonbuttonbar_clicked(ID::SELECTION_EXPAND_H, :on_selection_expand_h_button)
|
296
|
+
evt_ribbonbuttonbar_clicked(ID::SELECTION_EXPAND_V, :on_selection_expand_v_button)
|
297
|
+
evt_ribbonbuttonbar_clicked(ID::SELECTION_CONTRACT, :on_selection_contract_button)
|
298
|
+
evt_ribbonbuttonbar_clicked(ID::CIRCLE, :on_circle_button)
|
299
|
+
evt_ribbonbuttonbar_clicked(ID::CROSS, :on_cross_button)
|
300
|
+
evt_ribbonbuttonbar_clicked(ID::TRIANGLE, :on_triangle_button)
|
301
|
+
evt_ribbonbuttonbar_clicked(ID::SQUARE, :on_square_button)
|
302
|
+
evt_ribbonbuttonbar_dropdown_clicked(ID::TRIANGLE, :on_triangle_dropdown)
|
303
|
+
evt_ribbonbuttonbar_dropdown_clicked(ID::POLYGON, :on_polygon_dropdown)
|
304
|
+
evt_ribbongallery_hover_changed(ID::PRIMARY_COLOUR, :on_hovered_colour_change)
|
305
|
+
evt_ribbongallery_hover_changed(ID::SECONDARY_COLOUR, :on_hovered_colour_change)
|
306
|
+
evt_ribbongallery_selected(ID::PRIMARY_COLOUR, :on_primary_colour_select)
|
307
|
+
evt_ribbongallery_selected(ID::SECONDARY_COLOUR, :on_secondary_colour_select)
|
308
|
+
evt_ribbontoolbar_clicked(Wx::ID_JUSTIFY_LEFT, :on_justify)
|
309
|
+
evt_ribbontoolbar_clicked(Wx::ID_JUSTIFY_CENTER, :on_justify)
|
310
|
+
evt_ribbontoolbar_clicked(Wx::ID_JUSTIFY_RIGHT, :on_justify)
|
311
|
+
evt_update_ui(Wx::ID_JUSTIFY_LEFT, :on_justify_update_ui)
|
312
|
+
evt_update_ui(Wx::ID_JUSTIFY_CENTER, :on_justify_update_ui)
|
313
|
+
evt_update_ui(Wx::ID_JUSTIFY_RIGHT, :on_justify_update_ui)
|
314
|
+
evt_ribbontoolbar_clicked(Wx::ID_NEW, :on_new)
|
315
|
+
evt_ribbontoolbar_dropdown_clicked(Wx::ID_NEW, :on_new_dropdown)
|
316
|
+
evt_ribbontoolbar_clicked(Wx::ID_PRINT, :on_print)
|
317
|
+
evt_ribbontoolbar_dropdown_clicked(Wx::ID_PRINT, :on_print_dropdown)
|
318
|
+
evt_ribbontoolbar_dropdown_clicked(Wx::ID_REDO, :on_redo_dropdown)
|
319
|
+
evt_ribbontoolbar_dropdown_clicked(Wx::ID_UNDO, :on_undo_dropdown)
|
320
|
+
evt_ribbontoolbar_clicked(ID::POSITION_LEFT, :on_position_left)
|
321
|
+
evt_ribbontoolbar_dropdown_clicked(ID::POSITION_LEFT, :on_position_left_dropdown)
|
322
|
+
evt_ribbontoolbar_clicked(ID::POSITION_TOP, :on_position_top)
|
323
|
+
evt_ribbontoolbar_dropdown_clicked(ID::POSITION_TOP, :on_position_top_dropdown)
|
324
|
+
evt_button(ID::PRIMARY_COLOUR, :on_colour_gallery_button)
|
325
|
+
evt_button(ID::SECONDARY_COLOUR, :on_colour_gallery_button)
|
326
|
+
evt_menu(ID::POSITION_LEFT, :on_position_left_icons)
|
327
|
+
evt_menu(ID::POSITION_LEFT_LABELS, :on_position_left_labels)
|
328
|
+
evt_menu(ID::POSITION_LEFT_BOTH, :on_position_left_both)
|
329
|
+
evt_menu(ID::POSITION_TOP, :on_position_top_labels)
|
330
|
+
evt_menu(ID::POSITION_TOP_ICONS, :on_position_top_icons)
|
331
|
+
evt_menu(ID::POSITION_TOP_BOTH, :on_position_top_both)
|
332
|
+
evt_togglebutton(ID::TOGGLE_PANELS, :on_toggle_panels)
|
333
|
+
evt_ribbonpanel_extbutton_activated(Wx::ID_ANY, :on_ext_button)
|
334
|
+
evt_ribbonbuttonbar_clicked(ID::REMOVE_PAGE, :on_remove_page)
|
335
|
+
evt_ribbonbuttonbar_clicked(ID::HIDE_PAGES, :on_hide_pages)
|
336
|
+
evt_ribbonbuttonbar_clicked(ID::SHOW_PAGES, :on_show_pages)
|
337
|
+
evt_ribbonbuttonbar_clicked(ID::PLUS_MINUS, :on_plus_minus)
|
338
|
+
evt_ribbonbuttonbar_clicked(ID::CHANGE_LABEL, :on_change_label)
|
339
|
+
evt_ribbonbar_toggled(Wx::ID_ANY, :on_ribbon_bar_toggled)
|
340
|
+
evt_ribbonbar_help_click(Wx::ID_ANY, :on_ribbon_bar_help_clicked)
|
341
|
+
evt_size(:on_size_event)
|
342
|
+
end
|
343
|
+
|
344
|
+
# utility function to find an icon relative to this ruby script
|
345
|
+
def bitmap_(bitmap_name)
|
346
|
+
Wx::Bitmap.new(File.join(File.dirname(__FILE__), bitmap_name.to_s.sub(/_([A-Za-z]+)\Z/, '.\1')))
|
347
|
+
end
|
348
|
+
|
349
|
+
def on_enable_update_ui(evt)
|
350
|
+
evt.enable(@bEnabled)
|
351
|
+
end
|
352
|
+
|
353
|
+
def on_check_update_ui(evt)
|
354
|
+
evt.check(@bChecked)
|
355
|
+
end
|
356
|
+
|
357
|
+
def on_change_text_update_ui(evt)
|
358
|
+
unless @new_text.nil? || @new_text.empty?
|
359
|
+
evt.set_text(@new_text)
|
360
|
+
@new_text = ''
|
361
|
+
end
|
362
|
+
end
|
363
|
+
|
364
|
+
def on_check(evt)
|
365
|
+
@bChecked = !@bChecked
|
366
|
+
end
|
367
|
+
|
368
|
+
def on_enable(evt)
|
369
|
+
@bEnabled = true
|
370
|
+
end
|
371
|
+
|
372
|
+
def on_disable(evt)
|
373
|
+
@bEnabled = false
|
374
|
+
end
|
375
|
+
|
376
|
+
def on_disabled(evt)
|
377
|
+
add_text("ERROR: Disabled button activated (not supposed to happen)")
|
378
|
+
end
|
379
|
+
|
380
|
+
def on_enable_updated(evt)
|
381
|
+
add_text("Button activated")
|
382
|
+
end
|
383
|
+
|
384
|
+
def on_change_text1(evt)
|
385
|
+
@new_text = "One"
|
386
|
+
end
|
387
|
+
|
388
|
+
def on_change_text2(evt)
|
389
|
+
@new_text = "Two"
|
390
|
+
end
|
391
|
+
|
392
|
+
def on_circle_button(evt)
|
393
|
+
add_text("Circle button clicked.")
|
394
|
+
end
|
395
|
+
|
396
|
+
def on_cross_button(evt)
|
397
|
+
add_text("Cross button clicked.")
|
398
|
+
end
|
399
|
+
|
400
|
+
def on_triangle_button(evt)
|
401
|
+
add_text("Triangle button clicked.")
|
402
|
+
end
|
403
|
+
|
404
|
+
def on_triangle_dropdown(evt)
|
405
|
+
menu = Wx::Menu.new
|
406
|
+
menu.append(Wx::ID_ANY, "Equilateral")
|
407
|
+
menu.append(Wx::ID_ANY, "Isosceles")
|
408
|
+
menu.append(Wx::ID_ANY, "Scalene")
|
409
|
+
|
410
|
+
evt.popup_menu(menu)
|
411
|
+
end
|
412
|
+
|
413
|
+
def on_square_button(evt)
|
414
|
+
add_text("Square button clicked.")
|
415
|
+
end
|
416
|
+
|
417
|
+
def on_polygon_dropdown(evt)
|
418
|
+
menu = Wx::Menu.new
|
419
|
+
menu.append(Wx::ID_ANY, "Pentagon (5 sided)")
|
420
|
+
menu.append(Wx::ID_ANY, "Hexagon (6 sided)")
|
421
|
+
menu.append(Wx::ID_ANY, "Heptagon (7 sided)")
|
422
|
+
menu.append(Wx::ID_ANY, "Octogon (8 sided)")
|
423
|
+
menu.append(Wx::ID_ANY, "Nonagon (9 sided)")
|
424
|
+
menu.append(Wx::ID_ANY, "Decagon (10 sided)")
|
425
|
+
|
426
|
+
evt.popup_menu(menu)
|
427
|
+
end
|
428
|
+
|
429
|
+
def on_selection_expand_v_button(evt)
|
430
|
+
add_text("Expand selection horizontally button clicked.")
|
431
|
+
end
|
432
|
+
|
433
|
+
def on_selection_expand_h_button(evt)
|
434
|
+
add_text("Expand selection vertically button clicked.")
|
435
|
+
end
|
436
|
+
|
437
|
+
def on_selection_contract_button(evt)
|
438
|
+
add_text("Contract selection button clicked.")
|
439
|
+
end
|
440
|
+
|
441
|
+
def on_hovered_colour_change(evt)
|
442
|
+
# Set the background of the gallery to the hovered colour, or back to the
|
443
|
+
# default if there is no longer a hovered item.
|
444
|
+
|
445
|
+
gallery = evt.gallery
|
446
|
+
provider = gallery.get_art_provider
|
447
|
+
|
448
|
+
if evt.gallery_item != 0
|
449
|
+
if provider == @ribbon.art_provider
|
450
|
+
provider = provider.clone
|
451
|
+
gallery.set_art_provider(provider)
|
452
|
+
end
|
453
|
+
_, colour = get_gallery_colour(evt.get_gallery, evt.get_gallery_item)
|
454
|
+
provider.set_colour(Wx::RIBBON_ART_GALLERY_HOVER_BACKGROUND_COLOUR,
|
455
|
+
colour)
|
456
|
+
else
|
457
|
+
if provider != @ribbon.get_art_provider
|
458
|
+
gallery.set_art_provider(@ribbon.get_art_provider)
|
459
|
+
end
|
460
|
+
end
|
461
|
+
end
|
462
|
+
|
463
|
+
def on_primary_colour_select(evt)
|
464
|
+
name, colour = get_gallery_colour(evt.get_gallery, evt.get_gallery_item)
|
465
|
+
add_text("Colour \"" + name + "\" selected as primary.")
|
466
|
+
secondary = Wx::Colour.new
|
467
|
+
tertiary = Wx::Colour.new
|
468
|
+
@ribbon.get_art_provider.get_colour_scheme(nil, secondary, tertiary)
|
469
|
+
@ribbon.get_art_provider.set_colour_scheme(colour, secondary, tertiary)
|
470
|
+
reset_gallery_art_providers
|
471
|
+
@ribbon.refresh
|
472
|
+
end
|
473
|
+
|
474
|
+
def on_secondary_colour_select(evt)
|
475
|
+
name, colour = get_gallery_colour(evt.get_gallery, evt.get_gallery_item)
|
476
|
+
add_text("Colour \"" + name + "\" selected as secondary.")
|
477
|
+
primary = Wx::Colour.new
|
478
|
+
tertiary = Wx::Colour.new
|
479
|
+
@ribbon.art_provider.get_colour_scheme(primary, nil, tertiary)
|
480
|
+
@ribbon.art_provider.set_colour_scheme(primary, colour, tertiary)
|
481
|
+
reset_gallery_art_providers
|
482
|
+
@ribbon.refresh
|
483
|
+
end
|
484
|
+
|
485
|
+
def on_colour_gallery_button(evt)
|
486
|
+
gallery = evt.get_event_object
|
487
|
+
return unless gallery
|
488
|
+
|
489
|
+
@ribbon.dismiss_expanded_panel
|
490
|
+
if gallery.get_selection
|
491
|
+
_, c = get_gallery_colour(gallery, gallery.get_selection)
|
492
|
+
@colour_data.colour = c
|
493
|
+
end
|
494
|
+
Wx.ColourDialog(self, @colour_data) do |dlg|
|
495
|
+
if dlg.show_modal == Wx::ID_OK
|
496
|
+
@colour_data = dlg.colour_data
|
497
|
+
clr = @colour_data.colour
|
498
|
+
|
499
|
+
# Try to find colour in gallery
|
500
|
+
item = nil
|
501
|
+
gallery.count.times do |i|
|
502
|
+
item = gallery.item(i)
|
503
|
+
_, c = get_gallery_colour(gallery, item)
|
504
|
+
break if c == clr
|
505
|
+
item = nil
|
506
|
+
end
|
507
|
+
|
508
|
+
# Colour not in gallery - add it
|
509
|
+
unless item
|
510
|
+
item = add_colour_to_gallery(gallery,
|
511
|
+
clr.get_as_string(Wx::C2S_HTML_SYNTAX), @bitmap_creation_dc,
|
512
|
+
clr)
|
513
|
+
gallery.realise
|
514
|
+
end
|
515
|
+
|
516
|
+
# Set selection
|
517
|
+
gallery.ensure_visible(item)
|
518
|
+
gallery.set_selection(item)
|
519
|
+
|
520
|
+
# Send an event to respond to the selection change
|
521
|
+
dummy = Wx::RBN::RibbonGalleryEvent.new(Wx::RBN::EVT_RIBBONGALLERY_SELECTED, gallery.id)
|
522
|
+
dummy.set_event_object(gallery)
|
523
|
+
dummy.set_gallery(gallery)
|
524
|
+
dummy.set_gallery_item(item)
|
525
|
+
process_window_event(dummy)
|
526
|
+
end
|
527
|
+
end
|
528
|
+
end
|
529
|
+
|
530
|
+
def on_default_provider(evt)
|
531
|
+
@ribbon.dismiss_expanded_panel
|
532
|
+
set_art_provider(Wx::RibbonDefaultArtProvider.new)
|
533
|
+
end
|
534
|
+
|
535
|
+
def on_aui_provider(evt)
|
536
|
+
@ribbon.dismiss_expanded_panel
|
537
|
+
set_art_provider(Wx::RBN::RibbonAUIArtProvider.new)
|
538
|
+
end
|
539
|
+
|
540
|
+
def on_msw_provider(evt)
|
541
|
+
@ribbon.dismiss_expanded_panel
|
542
|
+
set_art_provider(Wx::RBN::RibbonMSWArtProvider.new)
|
543
|
+
end
|
544
|
+
|
545
|
+
def on_justify(evt)
|
546
|
+
style = @logwindow.get_window_style & ~(Wx::TE_LEFT | Wx::TE_CENTER | Wx::TE_RIGHT)
|
547
|
+
case evt.id
|
548
|
+
when Wx::ID_JUSTIFY_LEFT
|
549
|
+
@logwindow.set_window_style(style | Wx::TE_LEFT)
|
550
|
+
when Wx::ID_JUSTIFY_CENTER
|
551
|
+
@logwindow.set_window_style(style | Wx::TE_CENTER)
|
552
|
+
when Wx::ID_JUSTIFY_RIGHT
|
553
|
+
@logwindow.set_window_style(style | Wx::TE_RIGHT)
|
554
|
+
end
|
555
|
+
end
|
556
|
+
|
557
|
+
def on_justify_update_ui(evt)
|
558
|
+
case evt.id
|
559
|
+
when Wx::ID_JUSTIFY_LEFT
|
560
|
+
evt.check(!@logwindow.has_flag(Wx::TE_CENTER | Wx::TE_RIGHT))
|
561
|
+
when Wx::ID_JUSTIFY_CENTER
|
562
|
+
evt.check(@logwindow.has_flag(Wx::TE_CENTER))
|
563
|
+
when Wx::ID_JUSTIFY_RIGHT
|
564
|
+
evt.check(@logwindow.has_flag(Wx::TE_RIGHT))
|
565
|
+
end
|
566
|
+
end
|
567
|
+
|
568
|
+
def on_new(evt)
|
569
|
+
add_text("New button clicked.")
|
570
|
+
end
|
571
|
+
|
572
|
+
def on_new_dropdown(evt)
|
573
|
+
menu = Wx::Menu.new
|
574
|
+
menu.append(Wx::ID_ANY, "New Document")
|
575
|
+
menu.append(Wx::ID_ANY, "New Template")
|
576
|
+
menu.append(Wx::ID_ANY, "New Mail")
|
577
|
+
|
578
|
+
evt.popup_menu(menu)
|
579
|
+
end
|
580
|
+
|
581
|
+
def on_print(evt)
|
582
|
+
add_text("Print button clicked.")
|
583
|
+
end
|
584
|
+
|
585
|
+
def on_print_dropdown(evt)
|
586
|
+
menu = Wx::Menu.new
|
587
|
+
menu.append(Wx::ID_ANY, "Print")
|
588
|
+
menu.append(Wx::ID_ANY, "Preview")
|
589
|
+
menu.append(Wx::ID_ANY, "Options")
|
590
|
+
|
591
|
+
evt.popup_menu(menu)
|
592
|
+
end
|
593
|
+
|
594
|
+
def on_redo_dropdown(evt)
|
595
|
+
menu = Wx::Menu.new
|
596
|
+
menu.append(Wx::ID_ANY, "Redo E")
|
597
|
+
menu.append(Wx::ID_ANY, "Redo F")
|
598
|
+
menu.append(Wx::ID_ANY, "Redo G")
|
599
|
+
|
600
|
+
evt.popup_menu(menu)
|
601
|
+
end
|
602
|
+
|
603
|
+
def on_undo_dropdown(evt)
|
604
|
+
menu = Wx::Menu.new
|
605
|
+
menu.append(Wx::ID_ANY, "Undo C")
|
606
|
+
menu.append(Wx::ID_ANY, "Undo B")
|
607
|
+
menu.append(Wx::ID_ANY, "Undo A")
|
608
|
+
|
609
|
+
evt.popup_menu(menu)
|
610
|
+
end
|
611
|
+
|
612
|
+
def on_position_top(evt)
|
613
|
+
on_position_top_labels(evt)
|
614
|
+
end
|
615
|
+
|
616
|
+
def on_position_top_labels(evt)
|
617
|
+
set_bar_style(Wx::RBN::RIBBON_BAR_DEFAULT_STYLE)
|
618
|
+
end
|
619
|
+
|
620
|
+
def on_position_top_icons(evt)
|
621
|
+
set_bar_style((Wx::RBN::RIBBON_BAR_DEFAULT_STYLE & (~Wx::RBN::RIBBON_BAR_SHOW_PAGE_LABELS)) | Wx::RBN::RIBBON_BAR_SHOW_PAGE_ICONS)
|
622
|
+
end
|
623
|
+
|
624
|
+
def on_position_top_both(evt)
|
625
|
+
set_bar_style(Wx::RBN::RIBBON_BAR_DEFAULT_STYLE | Wx::RBN::RIBBON_BAR_SHOW_PAGE_ICONS)
|
626
|
+
end
|
627
|
+
|
628
|
+
def on_position_top_dropdown(evt)
|
629
|
+
menu = Wx::Menu.new
|
630
|
+
menu.append(ID::POSITION_TOP, "Top with Labels")
|
631
|
+
menu.append(ID::POSITION_TOP_ICONS, "Top with Icons")
|
632
|
+
menu.append(ID::POSITION_TOP_BOTH, "Top with Both")
|
633
|
+
evt.popup_menu(menu)
|
634
|
+
end
|
635
|
+
|
636
|
+
def on_position_left(evt)
|
637
|
+
on_position_left_icons(evt)
|
638
|
+
end
|
639
|
+
|
640
|
+
def on_position_left_labels(evt)
|
641
|
+
set_bar_style(Wx::RBN::RIBBON_BAR_DEFAULT_STYLE | Wx::RBN::RIBBON_BAR_FLOW_VERTICAL)
|
642
|
+
end
|
643
|
+
|
644
|
+
def on_position_left_icons(evt)
|
645
|
+
set_bar_style((Wx::RBN::RIBBON_BAR_DEFAULT_STYLE & (~Wx::RBN::RIBBON_BAR_SHOW_PAGE_LABELS)) |
|
646
|
+
Wx::RBN::RIBBON_BAR_SHOW_PAGE_ICONS | Wx::RBN::RIBBON_BAR_FLOW_VERTICAL)
|
647
|
+
end
|
648
|
+
|
649
|
+
def on_position_left_both(evt)
|
650
|
+
set_bar_style(Wx::RBN::RIBBON_BAR_DEFAULT_STYLE | Wx::RBN::RIBBON_BAR_SHOW_PAGE_ICONS |
|
651
|
+
Wx::RBN::RIBBON_BAR_FLOW_VERTICAL)
|
652
|
+
end
|
653
|
+
|
654
|
+
def on_position_left_dropdown(evt)
|
655
|
+
menu = Wx::Menu.new
|
656
|
+
menu.append(ID::POSITION_LEFT, "Left with Icons")
|
657
|
+
menu.append(ID::POSITION_LEFT_LABELS, "Left with Labels")
|
658
|
+
menu.append(ID::POSITION_LEFT_BOTH, "Left with Both")
|
659
|
+
evt.popup_menu(menu)
|
660
|
+
end
|
661
|
+
|
662
|
+
def on_remove_page(evt)
|
663
|
+
n = @ribbon.get_page_count
|
664
|
+
if n > 0
|
665
|
+
@ribbon.delete_page(n-1)
|
666
|
+
@ribbon.realize
|
667
|
+
end
|
668
|
+
end
|
669
|
+
|
670
|
+
def on_hide_pages(evt)
|
671
|
+
@ribbon.hide_page(1)
|
672
|
+
@ribbon.hide_page(2)
|
673
|
+
@ribbon.hide_page(3)
|
674
|
+
@ribbon.realize
|
675
|
+
end
|
676
|
+
|
677
|
+
def on_show_pages(evt)
|
678
|
+
@ribbon.show_page(1)
|
679
|
+
@ribbon.show_page(2)
|
680
|
+
@ribbon.show_page(3)
|
681
|
+
@ribbon.realize
|
682
|
+
end
|
683
|
+
|
684
|
+
def on_plus_minus(evt)
|
685
|
+
if @plus_minus_state
|
686
|
+
evt.bar.set_button_icon(ID::PLUS_MINUS,
|
687
|
+
Wx::ArtProvider.get_bitmap(Wx::ART_PLUS, Wx::ART_OTHER, [24, 24]))
|
688
|
+
@plus_minus_state = false
|
689
|
+
else
|
690
|
+
evt.bar.set_button_icon(ID::PLUS_MINUS,
|
691
|
+
Wx::ArtProvider.get_bitmap(Wx::ART_MINUS, Wx::ART_OTHER, [24, 24]))
|
692
|
+
@plus_minus_state = true
|
693
|
+
end
|
694
|
+
end
|
695
|
+
|
696
|
+
def on_change_label(evt)
|
697
|
+
if @change_label_state
|
698
|
+
evt.bar.set_button_text(ID::CHANGE_LABEL, "short")
|
699
|
+
@change_label_state = false
|
700
|
+
else
|
701
|
+
evt.bar.set_button_text(ID::CHANGE_LABEL, "some long text")
|
702
|
+
@change_label_state = true
|
703
|
+
end
|
704
|
+
end
|
705
|
+
|
706
|
+
def on_toggle_panels(evt)
|
707
|
+
@ribbon.show_panels(@togglePanels.value)
|
708
|
+
end
|
709
|
+
|
710
|
+
def on_ribbon_bar_toggled(evt)
|
711
|
+
add_text("Ribbon bar %s." %
|
712
|
+
(@ribbon.are_panels_shown ? "expanded" : "collapsed"))
|
713
|
+
end
|
714
|
+
|
715
|
+
def on_ribbon_bar_help_clicked(evt)
|
716
|
+
add_text("Ribbon bar help clicked")
|
717
|
+
end
|
718
|
+
|
719
|
+
def on_size_event(evt)
|
720
|
+
if evt.size.width < 200
|
721
|
+
@ribbon.hide()
|
722
|
+
else
|
723
|
+
@ribbon.show
|
724
|
+
end
|
725
|
+
evt.skip
|
726
|
+
end
|
727
|
+
|
728
|
+
def on_ext_button(evt)
|
729
|
+
Wx.message_box("Extension button clicked")
|
730
|
+
end
|
731
|
+
|
732
|
+
protected
|
733
|
+
|
734
|
+
def populate_colours_panel(panel, defclr, gallery_id)
|
735
|
+
gallery = panel.find_window_by_id(gallery_id)
|
736
|
+
if gallery
|
737
|
+
gallery.clear
|
738
|
+
else
|
739
|
+
gallery = Wx::RBN::RibbonGallery.new(panel, gallery_id)
|
740
|
+
end
|
741
|
+
dc = @bitmap_creation_dc
|
742
|
+
def_item = add_colour_to_gallery(gallery, "Default", dc, defclr)
|
743
|
+
gallery.set_selection(def_item)
|
744
|
+
add_colour_to_gallery(gallery, "BLUE", dc)
|
745
|
+
add_colour_to_gallery(gallery, "BLUE VIOLET", dc)
|
746
|
+
add_colour_to_gallery(gallery, "BROWN", dc)
|
747
|
+
add_colour_to_gallery(gallery, "CADET BLUE", dc)
|
748
|
+
add_colour_to_gallery(gallery, "CORAL", dc)
|
749
|
+
add_colour_to_gallery(gallery, "CYAN", dc)
|
750
|
+
add_colour_to_gallery(gallery, "DARK GREEN", dc)
|
751
|
+
add_colour_to_gallery(gallery, "DARK ORCHID", dc)
|
752
|
+
add_colour_to_gallery(gallery, "FIREBRICK", dc)
|
753
|
+
add_colour_to_gallery(gallery, "GOLD", dc)
|
754
|
+
add_colour_to_gallery(gallery, "GOLDENROD", dc)
|
755
|
+
add_colour_to_gallery(gallery, "GREEN", dc)
|
756
|
+
add_colour_to_gallery(gallery, "INDIAN RED", dc)
|
757
|
+
add_colour_to_gallery(gallery, "KHAKI", dc)
|
758
|
+
add_colour_to_gallery(gallery, "LIGHT BLUE", dc)
|
759
|
+
add_colour_to_gallery(gallery, "LIME GREEN", dc)
|
760
|
+
add_colour_to_gallery(gallery, "MAGENTA", dc)
|
761
|
+
add_colour_to_gallery(gallery, "MAROON", dc)
|
762
|
+
add_colour_to_gallery(gallery, "NAVY", dc)
|
763
|
+
add_colour_to_gallery(gallery, "ORANGE", dc)
|
764
|
+
add_colour_to_gallery(gallery, "ORCHID", dc)
|
765
|
+
add_colour_to_gallery(gallery, "PINK", dc)
|
766
|
+
add_colour_to_gallery(gallery, "PLUM", dc)
|
767
|
+
add_colour_to_gallery(gallery, "PURPLE", dc)
|
768
|
+
add_colour_to_gallery(gallery, "RED", dc)
|
769
|
+
add_colour_to_gallery(gallery, "SALMON", dc)
|
770
|
+
add_colour_to_gallery(gallery, "SEA GREEN", dc)
|
771
|
+
add_colour_to_gallery(gallery, "SIENNA", dc)
|
772
|
+
add_colour_to_gallery(gallery, "SKY BLUE", dc)
|
773
|
+
add_colour_to_gallery(gallery, "TAN", dc)
|
774
|
+
add_colour_to_gallery(gallery, "THISTLE", dc)
|
775
|
+
add_colour_to_gallery(gallery, "TURQUOISE", dc)
|
776
|
+
add_colour_to_gallery(gallery, "VIOLET", dc)
|
777
|
+
add_colour_to_gallery(gallery, "VIOLET RED", dc)
|
778
|
+
add_colour_to_gallery(gallery, "WHEAT", dc)
|
779
|
+
add_colour_to_gallery(gallery, "WHITE", dc)
|
780
|
+
add_colour_to_gallery(gallery, "YELLOW", dc)
|
781
|
+
|
782
|
+
gallery
|
783
|
+
end
|
784
|
+
|
785
|
+
def add_text(msg)
|
786
|
+
@logwindow.append_text(msg)
|
787
|
+
@logwindow.append_text("\n")
|
788
|
+
@ribbon.dismiss_expanded_panel
|
789
|
+
end
|
790
|
+
|
791
|
+
def add_colour_to_gallery(gallery, colour, dc, value = nil)
|
792
|
+
item = nil
|
793
|
+
|
794
|
+
c = nil
|
795
|
+
c = Wx::Colour.new(colour) if colour != "Default"
|
796
|
+
|
797
|
+
c = value unless c && c.ok?
|
798
|
+
|
799
|
+
if c.ok?
|
800
|
+
iWidth = 64
|
801
|
+
iHeight = 40
|
802
|
+
|
803
|
+
bitmap = Wx::Bitmap.new(iWidth, iHeight)
|
804
|
+
dc.select_object(bitmap)
|
805
|
+
b = Wx::Brush.new (c)
|
806
|
+
dc.set_pen(Wx::BLACK_PEN)
|
807
|
+
dc.set_brush(b)
|
808
|
+
dc.draw_rectangle(0, 0, iWidth, iHeight)
|
809
|
+
|
810
|
+
colour = colour[0] + colour[1,colour.size].downcase
|
811
|
+
size = dc.get_text_extent(colour)
|
812
|
+
foreground = Wx::Colour.new(~c.red, ~c.green, ~c.blue)
|
813
|
+
if ((foreground.red - c.red).abs +
|
814
|
+
(foreground.blue - c.blue).abs +
|
815
|
+
(foreground.green - c.green).abs) < 64
|
816
|
+
# Foreground too similar to background - use a different
|
817
|
+
# strategy to find a contrasting colour
|
818
|
+
foreground = Wx::Colour.new((c.red + 64) % 256, 255 - c.green, (c.blue + 192) % 256)
|
819
|
+
end
|
820
|
+
dc.set_text_foreground(foreground)
|
821
|
+
dc.draw_text(colour, (iWidth - size[0] + 1).div(2), (iHeight - size[1]).div(2))
|
822
|
+
dc.select_object_as_source(Wx::NULL_BITMAP)
|
823
|
+
|
824
|
+
item = gallery.append(bitmap, Wx::ID_ANY)
|
825
|
+
gallery.set_item_client_data(item, [colour, c])
|
826
|
+
end
|
827
|
+
item
|
828
|
+
end
|
829
|
+
|
830
|
+
def get_gallery_colour(gallery, item)
|
831
|
+
gallery.get_item_client_data(item)
|
832
|
+
end
|
833
|
+
|
834
|
+
def reset_gallery_art_providers
|
835
|
+
if @primary_gallery.get_art_provider != @ribbon.get_art_provider
|
836
|
+
@primary_gallery.set_art_provider(@ribbon.get_art_provider)
|
837
|
+
end
|
838
|
+
if @secondary_gallery.art_provider != @ribbon.art_provider
|
839
|
+
@secondary_gallery.art_provider= @ribbon.art_provider
|
840
|
+
end
|
841
|
+
end
|
842
|
+
|
843
|
+
def set_art_provider(prov)
|
844
|
+
@ribbon.freeze
|
845
|
+
@ribbon.set_art_provider(prov)
|
846
|
+
|
847
|
+
prov.get_colour_scheme(@default_primary, @default_secondary, @default_tertiary)
|
848
|
+
populate_colours_panel(@primary_gallery.get_parent, @default_primary, ID::PRIMARY_COLOUR)
|
849
|
+
populate_colours_panel(@secondary_gallery.parent, @default_secondary, ID::SECONDARY_COLOUR)
|
850
|
+
|
851
|
+
@ribbon.realize
|
852
|
+
@ribbon.thaw
|
853
|
+
get_sizer.layout
|
854
|
+
end
|
855
|
+
|
856
|
+
def set_bar_style(style)
|
857
|
+
@ribbon.freeze
|
858
|
+
@ribbon.set_window_style_flag(style)
|
859
|
+
pTopSize = get_sizer
|
860
|
+
pToolbar = find_window_by_id(ID::MAIN_TOOLBAR)
|
861
|
+
if (style & Wx::RBN::RIBBON_BAR_FLOW_VERTICAL) == Wx::RBN::RIBBON_BAR_FLOW_VERTICAL
|
862
|
+
@ribbon.set_tab_ctrl_margins(10, 10)
|
863
|
+
pTopSize.set_orientation(Wx::HORIZONTAL)
|
864
|
+
pToolbar.set_rows(3, 5) if pToolbar
|
865
|
+
else
|
866
|
+
@ribbon.set_tab_ctrl_margins(50, 20)
|
867
|
+
pTopSize.set_orientation(Wx::VERTICAL)
|
868
|
+
pToolbar.set_rows(2, 3) if pToolbar
|
869
|
+
end
|
870
|
+
@ribbon.realise
|
871
|
+
layout
|
872
|
+
@ribbon.thaw
|
873
|
+
end
|
874
|
+
|
875
|
+
end
|
876
|
+
|
877
|
+
module RibbonSample
|
878
|
+
|
879
|
+
include WxRuby::Sample if defined? WxRuby::Sample
|
880
|
+
|
881
|
+
def self.describe
|
882
|
+
{ file: __FILE__,
|
883
|
+
summary: 'Ribbon wxRuby example.',
|
884
|
+
description: 'wxRuby example displaying frame window showcasing Ribbon framework.' }
|
885
|
+
end
|
886
|
+
|
887
|
+
def self.activate
|
888
|
+
frame = MyFrame.new
|
889
|
+
frame.show(true)
|
890
|
+
frame
|
891
|
+
end
|
892
|
+
|
893
|
+
if $0 == __FILE__
|
894
|
+
Wx::App.run do
|
895
|
+
self.gc_stress
|
896
|
+
RibbonSample.activate
|
897
|
+
end
|
898
|
+
end
|
899
|
+
|
900
|
+
end
|