wxruby3 0.9.0.pre.beta.1-x64-mingw-ucrt-3.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 +138 -0
- data/bin/wxruby +9 -0
- data/bin/wxruby.bat +20 -0
- data/ext/mkrf_conf_bingem.rb +18 -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 +912 -0
data/samples/aui/aui.rb
ADDED
@@ -0,0 +1,1321 @@
|
|
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
|
+
# A resizable control that displays its current size, and, if an AUI
|
10
|
+
# arrangement, its position and layer
|
11
|
+
class SizeReportCtrl < Wx::Control
|
12
|
+
def initialize(parent, id, pos, size, mgr = nil)
|
13
|
+
super(parent, id, pos, size)
|
14
|
+
@mgr = mgr
|
15
|
+
evt_paint { on_paint }
|
16
|
+
evt_size { on_size }
|
17
|
+
end
|
18
|
+
|
19
|
+
def on_paint
|
20
|
+
paint do |dc|
|
21
|
+
size = get_client_size
|
22
|
+
|
23
|
+
dc.set_font Wx::NORMAL_FONT
|
24
|
+
dc.set_brush Wx::WHITE_BRUSH
|
25
|
+
dc.set_pen Wx::WHITE_PEN
|
26
|
+
dc.draw_rectangle(0, 0, size.width, size.height)
|
27
|
+
dc.set_pen Wx::LIGHT_GREY_PEN
|
28
|
+
dc.set_pen Wx::LIGHT_GREY_PEN
|
29
|
+
dc.draw_line(0, 0, size.width, size.height)
|
30
|
+
dc.draw_line(0, size.height, size.width, 0)
|
31
|
+
|
32
|
+
msg = "Size: %d x %d" % [size.width, size.height]
|
33
|
+
width, height = dc.get_text_extent(msg)
|
34
|
+
height += 3
|
35
|
+
dc.draw_text(msg,
|
36
|
+
(size.width - width) / 2,
|
37
|
+
(size.height - (height * 5)) / 2)
|
38
|
+
|
39
|
+
if @mgr
|
40
|
+
pi = @mgr.get_pane(self)
|
41
|
+
msg = "Layer: %d" % pi.layer
|
42
|
+
width, height = dc.get_text_extent(msg)
|
43
|
+
dc.draw_text(msg,
|
44
|
+
(size.width - width) / 2,
|
45
|
+
((size.height - (height * 5)) / 2) + height)
|
46
|
+
|
47
|
+
msg = "Dock: %d Row: %d" % [pi.direction, pi.row]
|
48
|
+
width, height = dc.get_text_extent(msg)
|
49
|
+
dc.draw_text(msg,
|
50
|
+
(size.width - width) / 2,
|
51
|
+
((size.height - (height * 5)) / 2) + (height * 2))
|
52
|
+
|
53
|
+
msg = "Position: %d" % pi.position
|
54
|
+
width, height = dc.get_text_extent(msg)
|
55
|
+
dc.draw_text(msg,
|
56
|
+
(size.width - width) / 2,
|
57
|
+
((size.height - (height * 5)) / 2) + (height * 3))
|
58
|
+
|
59
|
+
msg = "Proportion: %d" % pi.proportion
|
60
|
+
width, height = dc.get_text_extent(msg)
|
61
|
+
dc.draw_text(msg,
|
62
|
+
(size.width - width) / 2,
|
63
|
+
((size.height - (height * 5)) / 2) + (height * 4))
|
64
|
+
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def on_size
|
70
|
+
refresh
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
class SettingsPanel < Wx::Panel
|
75
|
+
consts = %w[
|
76
|
+
ID_PaneBorderSize
|
77
|
+
ID_SashSize
|
78
|
+
ID_CaptionSize
|
79
|
+
ID_BackgroundColour
|
80
|
+
ID_SashColour
|
81
|
+
ID_InactiveCaptionColour
|
82
|
+
ID_InactiveCaptionGradientColour
|
83
|
+
ID_InactiveCaptionTextColour
|
84
|
+
ID_ActiveCaptionColour
|
85
|
+
ID_ActiveCaptionGradientColour
|
86
|
+
ID_ActiveCaptionTextColour
|
87
|
+
ID_BorderColour
|
88
|
+
ID_GripperColour ]
|
89
|
+
|
90
|
+
consts.each_with_index do |c, i|
|
91
|
+
const_set(c, 1001 + i)
|
92
|
+
end
|
93
|
+
|
94
|
+
def initialize(parent, frame)
|
95
|
+
super(parent, Wx::ID_ANY)
|
96
|
+
@frame = frame
|
97
|
+
@base_bmp = create_colour_bitmap(Wx::BLACK)
|
98
|
+
|
99
|
+
# set up some spin ctrls for integer variables
|
100
|
+
@border_size, s1 = make_metric_spin_ctrl(ID_PaneBorderSize,
|
101
|
+
"Pane Border Size:",
|
102
|
+
Wx::AUI_DOCKART_PANE_BORDER_SIZE)
|
103
|
+
|
104
|
+
@sash_size, s2 = make_metric_spin_ctrl(ID_SashSize,
|
105
|
+
"Sash Size:",
|
106
|
+
Wx::AUI_DOCKART_SASH_SIZE)
|
107
|
+
|
108
|
+
@cap_size, s3 = make_metric_spin_ctrl(ID_CaptionSize,
|
109
|
+
"Caption Size:",
|
110
|
+
Wx::AUI_DOCKART_CAPTION_SIZE)
|
111
|
+
|
112
|
+
# colour controls
|
113
|
+
@bckg_colour, s4 = make_colour_button(ID_BackgroundColour,
|
114
|
+
"Background Colour:")
|
115
|
+
@sash_colour, s5 = make_colour_button(ID_SashColour,
|
116
|
+
"Sash Colour:")
|
117
|
+
@capt_colour, s6 = make_colour_button(ID_InactiveCaptionColour,
|
118
|
+
"Normal Caption:")
|
119
|
+
@capt_gradnt, s7 = make_colour_button(ID_InactiveCaptionGradientColour,
|
120
|
+
"Normal Caption Gradient:")
|
121
|
+
@capt_text, s8 = make_colour_button(ID_InactiveCaptionTextColour,
|
122
|
+
"Normal Caption Text:")
|
123
|
+
@acap_colour, s9 = make_colour_button(ID_ActiveCaptionColour,
|
124
|
+
"Active Caption:")
|
125
|
+
@acap_gradnt, s10 = make_colour_button(ID_ActiveCaptionGradientColour,
|
126
|
+
"Active Caption Gradient:")
|
127
|
+
@acap_text, s11 = make_colour_button(ID_ActiveCaptionTextColour,
|
128
|
+
"Active Caption Text:")
|
129
|
+
@brdr_colour, s12 = make_colour_button(ID_BorderColour,
|
130
|
+
"Border Colour:")
|
131
|
+
@grip_colour, s13 = make_colour_button(ID_GripperColour,
|
132
|
+
"Gripper Colour:")
|
133
|
+
|
134
|
+
grid_sizer = Wx::GridSizer.new(2)
|
135
|
+
grid_sizer.set_h_gap(5)
|
136
|
+
|
137
|
+
grid_sizer.add(s1); grid_sizer.add(s4)
|
138
|
+
grid_sizer.add(s2); grid_sizer.add(s5)
|
139
|
+
grid_sizer.add(s3); grid_sizer.add(s13)
|
140
|
+
grid_sizer.add(1, 1); grid_sizer.add(s12)
|
141
|
+
grid_sizer.add(s6); grid_sizer.add(s9)
|
142
|
+
grid_sizer.add(s7); grid_sizer.add(s10)
|
143
|
+
grid_sizer.add(s8); grid_sizer.add(s11)
|
144
|
+
|
145
|
+
cont_sizer = Wx::BoxSizer.new(Wx::VERTICAL)
|
146
|
+
cont_sizer.add(grid_sizer, 1, Wx::EXPAND | Wx::ALL, 5)
|
147
|
+
self.set_sizer(cont_sizer)
|
148
|
+
get_sizer.set_size_hints(self)
|
149
|
+
update_colours
|
150
|
+
|
151
|
+
evt_spinctrl(ID_PaneBorderSize) { |e| on_pane_border_size(e) }
|
152
|
+
evt_spinctrl(ID_SashSize) { |e| on_sash_size(e) }
|
153
|
+
evt_spinctrl(ID_CaptionSize) { |e| on_caption_size(e) }
|
154
|
+
evt_button(ID_BackgroundColour) { |e| on_set_colour(e) }
|
155
|
+
evt_button(ID_SashColour) { |e| on_set_colour(e) }
|
156
|
+
evt_button(ID_InactiveCaptionColour) { |e| on_set_colour(e) }
|
157
|
+
evt_button(ID_InactiveCaptionGradientColour) { |e| on_set_colour(e) }
|
158
|
+
evt_button(ID_InactiveCaptionTextColour) { |e| on_set_colour(e) }
|
159
|
+
evt_button(ID_ActiveCaptionColour) { |e| on_set_colour(e) }
|
160
|
+
evt_button(ID_ActiveCaptionGradientColour) { |e| on_set_colour(e) }
|
161
|
+
evt_button(ID_ActiveCaptionTextColour) { |e| on_set_colour(e) }
|
162
|
+
evt_button(ID_BorderColour) { |e| on_set_colour(e) }
|
163
|
+
evt_button(ID_GripperColour) { |e| on_set_colour(e) }
|
164
|
+
end
|
165
|
+
|
166
|
+
def update_colours()
|
167
|
+
art = @frame.dock_art
|
168
|
+
|
169
|
+
col = art.get_colour(Wx::AUI_DOCKART_BACKGROUND_COLOUR)
|
170
|
+
@bckg_colour.bitmap_label = (create_colour_bitmap(col))
|
171
|
+
|
172
|
+
col = art.get_colour(Wx::AUI_DOCKART_SASH_COLOUR)
|
173
|
+
@sash_colour.bitmap_label = (create_colour_bitmap(col))
|
174
|
+
|
175
|
+
col = art.get_colour(Wx::AUI_DOCKART_INACTIVE_CAPTION_COLOUR)
|
176
|
+
@capt_colour.bitmap_label = (create_colour_bitmap(col))
|
177
|
+
|
178
|
+
col = art.get_colour(Wx::AUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR)
|
179
|
+
@capt_gradnt.bitmap_label = (create_colour_bitmap(col))
|
180
|
+
|
181
|
+
col = art.get_colour(Wx::AUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR)
|
182
|
+
@capt_text.bitmap_label = (create_colour_bitmap(col))
|
183
|
+
|
184
|
+
col = art.get_colour(Wx::AUI_DOCKART_ACTIVE_CAPTION_COLOUR)
|
185
|
+
@acap_colour.bitmap_label = (create_colour_bitmap(col))
|
186
|
+
|
187
|
+
col = art.get_colour(Wx::AUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR)
|
188
|
+
@acap_gradnt.bitmap_label = (create_colour_bitmap(col))
|
189
|
+
|
190
|
+
col = art.get_colour(Wx::AUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR)
|
191
|
+
@acap_text.bitmap_label = (create_colour_bitmap(col))
|
192
|
+
|
193
|
+
col = art.get_colour(Wx::AUI_DOCKART_SASH_COLOUR)
|
194
|
+
@brdr_colour.bitmap_label = (create_colour_bitmap(col))
|
195
|
+
|
196
|
+
col = art.get_colour(Wx::AUI_DOCKART_GRIPPER_COLOUR)
|
197
|
+
@grip_colour.bitmap_label = (create_colour_bitmap(col))
|
198
|
+
end
|
199
|
+
|
200
|
+
def on_pane_border_size(event)
|
201
|
+
@frame.get_dock_art.set_metric(Wx::AUI_DOCKART_PANE_BORDER_SIZE,
|
202
|
+
event.get_position)
|
203
|
+
@frame.do_update
|
204
|
+
end
|
205
|
+
|
206
|
+
def on_sash_size(event)
|
207
|
+
@frame.get_dock_art.set_metric(Wx::AUI_DOCKART_SASH_SIZE,
|
208
|
+
event.get_position)
|
209
|
+
@frame.do_update
|
210
|
+
end
|
211
|
+
|
212
|
+
def on_caption_size(event)
|
213
|
+
@frame.get_dock_art.set_metric(Wx::AUI_DOCKART_CAPTION_SIZE,
|
214
|
+
event.get_position)
|
215
|
+
@frame.do_update
|
216
|
+
end
|
217
|
+
|
218
|
+
def on_set_colour(event)
|
219
|
+
Wx.ColourDialog(@frame) do |dlg|
|
220
|
+
dlg.set_title("Colour Picker")
|
221
|
+
|
222
|
+
return unless dlg.show_modal == Wx::ID_OK
|
223
|
+
|
224
|
+
var = nil
|
225
|
+
case event.get_id()
|
226
|
+
when ID_BackgroundColour
|
227
|
+
var = Wx::AUI_DOCKART_BACKGROUND_COLOUR
|
228
|
+
when ID_SashColour
|
229
|
+
var = Wx::AUI_DOCKART_SASH_COLOUR
|
230
|
+
when ID_InactiveCaptionColour
|
231
|
+
var = Wx::AUI_DOCKART_INACTIVE_CAPTION_COLOUR
|
232
|
+
when ID_InactiveCaptionGradientColour
|
233
|
+
var = Wx::AUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR
|
234
|
+
when ID_InactiveCaptionTextColour
|
235
|
+
var = Wx::AUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR
|
236
|
+
when ID_ActiveCaptionColour
|
237
|
+
var = Wx::AUI_DOCKART_ACTIVE_CAPTION_COLOUR
|
238
|
+
when ID_ActiveCaptionGradientColour
|
239
|
+
var = Wx::AUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR
|
240
|
+
when ID_ActiveCaptionTextColour
|
241
|
+
var = Wx::AUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR
|
242
|
+
when ID_BorderColour
|
243
|
+
var = Wx::AUI_DOCKART_BORDER_COLOUR
|
244
|
+
when ID_GripperColour
|
245
|
+
var = Wx::AUI_DOCKART_GRIPPER_COLOUR
|
246
|
+
else
|
247
|
+
return
|
248
|
+
end
|
249
|
+
|
250
|
+
@frame.get_dock_art.set_colour(var, dlg.get_colour_data.get_colour)
|
251
|
+
@frame.do_update
|
252
|
+
update_colours
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
private
|
257
|
+
|
258
|
+
def make_metric_spin_ctrl(an_id, caption, metric)
|
259
|
+
metric_val = @frame.get_dock_art.get_metric(metric)
|
260
|
+
sp = Wx::SpinCtrl.new(self, an_id, metric_val.to_s,
|
261
|
+
Wx::DEFAULT_POSITION,
|
262
|
+
Wx::Size.new(50, 20),
|
263
|
+
Wx::SP_ARROW_KEYS,
|
264
|
+
0, 100, metric_val)
|
265
|
+
|
266
|
+
sz = Wx::BoxSizer.new(Wx::HORIZONTAL)
|
267
|
+
sz.add(1, 1, 1, Wx::EXPAND)
|
268
|
+
sz.add(Wx::StaticText.new(self, Wx::ID_ANY, caption))
|
269
|
+
sz.add(sp)
|
270
|
+
sz.add(1, 1, 1, Wx::EXPAND)
|
271
|
+
sz.set_item_min_size(1, 180, 20)
|
272
|
+
return sp, sz
|
273
|
+
end
|
274
|
+
|
275
|
+
# utility to make a little captioned button;
|
276
|
+
# returns the button and a sizer containing the button and caption
|
277
|
+
def make_colour_button(an_id, caption)
|
278
|
+
bmp_butt = Wx::BitmapButton.new(self, an_id, @base_bmp,
|
279
|
+
Wx::DEFAULT_POSITION,
|
280
|
+
Wx::Size.new(50, 25))
|
281
|
+
|
282
|
+
sz = Wx::BoxSizer.new(Wx::HORIZONTAL)
|
283
|
+
sz.add(1, 1, 1, Wx::EXPAND)
|
284
|
+
sz.add(Wx::StaticText.new(self, Wx::ID_ANY, caption))
|
285
|
+
sz.add(bmp_butt)
|
286
|
+
sz.add(1, 1, 1, Wx::EXPAND)
|
287
|
+
sz.set_item_min_size(1, 180, 20)
|
288
|
+
return bmp_butt, sz
|
289
|
+
end
|
290
|
+
|
291
|
+
# returns a 25 x 14 image with solid colour +colour+, with a 1-pixel
|
292
|
+
# black border
|
293
|
+
def create_colour_bitmap(colour)
|
294
|
+
img = Wx::Image.new(25, 14)
|
295
|
+
0.upto(24) do |x|
|
296
|
+
0.upto(13) do |y|
|
297
|
+
if (x == 0 || x == 24 || y == 0 || y == 13)
|
298
|
+
pixcol = Wx::BLACK
|
299
|
+
else
|
300
|
+
pixcol = colour
|
301
|
+
end
|
302
|
+
img.set_rgb(x, y, pixcol.red, pixcol.green, pixcol.blue)
|
303
|
+
end
|
304
|
+
end
|
305
|
+
return Wx::Bitmap.new(img)
|
306
|
+
end
|
307
|
+
end
|
308
|
+
|
309
|
+
class AuiFrame < Wx::Frame
|
310
|
+
consts = %w[
|
311
|
+
ID_CreateTree
|
312
|
+
ID_CreateGrid
|
313
|
+
ID_CreateText
|
314
|
+
ID_CreateHTML
|
315
|
+
ID_CreateNotebook
|
316
|
+
ID_CreateSizeReport
|
317
|
+
ID_GridContent
|
318
|
+
ID_TextContent
|
319
|
+
ID_TreeContent
|
320
|
+
ID_HTMLContent
|
321
|
+
ID_NotebookContent
|
322
|
+
ID_SizeReportContent
|
323
|
+
ID_CreatePerspective
|
324
|
+
ID_CopyPerspectiveCode
|
325
|
+
ID_AllowFloating
|
326
|
+
ID_AllowActivePane
|
327
|
+
ID_TransparentHint
|
328
|
+
ID_VenetianBlindsHint
|
329
|
+
ID_RectangleHint
|
330
|
+
ID_NoHint
|
331
|
+
ID_HintFade
|
332
|
+
ID_NoVenetianFade
|
333
|
+
ID_TransparentDrag
|
334
|
+
ID_NoGradient
|
335
|
+
ID_VerticalGradient
|
336
|
+
ID_HorizontalGradient
|
337
|
+
ID_Settings
|
338
|
+
ID_NotebookNoCloseButton
|
339
|
+
ID_NotebookCloseButton
|
340
|
+
ID_NotebookCloseButtonAll
|
341
|
+
ID_NotebookCloseButtonActive
|
342
|
+
ID_NotebookAllowTabMove
|
343
|
+
ID_NotebookAllowTabExternalMove
|
344
|
+
ID_NotebookAllowTabSplit
|
345
|
+
ID_NotebookWindowList
|
346
|
+
ID_NotebookScrollButtons
|
347
|
+
ID_NotebookTabFixedWidth
|
348
|
+
ID_NotebookArtGloss
|
349
|
+
ID_NotebookArtSimple ]
|
350
|
+
|
351
|
+
consts.each_with_index do |c, i|
|
352
|
+
const_set(c, 2000 + i)
|
353
|
+
end
|
354
|
+
ID_FirstPerspective = ID_CreatePerspective + 1000
|
355
|
+
|
356
|
+
def initialize(*args)
|
357
|
+
super
|
358
|
+
@mgr = Wx::AuiManager.new
|
359
|
+
@mgr.set_managed_window(self)
|
360
|
+
@perspectives = []
|
361
|
+
|
362
|
+
# set up default notebook style
|
363
|
+
@notebook_style = Wx::AUI_NB_DEFAULT_STYLE |
|
364
|
+
Wx::AUI_NB_TAB_EXTERNAL_MOVE | Wx::NO_BORDER
|
365
|
+
@notebook_theme = 0
|
366
|
+
setup_menu
|
367
|
+
create_status_bar
|
368
|
+
get_status_bar.set_status_text("Ready")
|
369
|
+
set_min_size(Wx::Size.new(400, 300))
|
370
|
+
setup_toolbars
|
371
|
+
setup_panes
|
372
|
+
setup_perspectives
|
373
|
+
setup_events
|
374
|
+
@mgr.update
|
375
|
+
end
|
376
|
+
|
377
|
+
def dock_art
|
378
|
+
@mgr.art_provider
|
379
|
+
end
|
380
|
+
|
381
|
+
#
|
382
|
+
def setup_menu
|
383
|
+
mb = Wx::MenuBar.new
|
384
|
+
|
385
|
+
file_menu = Wx::Menu.new
|
386
|
+
file_menu.append(Wx::ID_EXIT, "Exit")
|
387
|
+
|
388
|
+
view_menu = Wx::Menu.new
|
389
|
+
view_menu.append(ID_CreateText, "Create Text Control")
|
390
|
+
view_menu.append(ID_CreateHTML, "Create HTML Control")
|
391
|
+
view_menu.append(ID_CreateTree, "Create Tree")
|
392
|
+
view_menu.append(ID_CreateGrid, "Create Grid")
|
393
|
+
view_menu.append(ID_CreateNotebook, "Create Notebook")
|
394
|
+
view_menu.append(ID_CreateSizeReport, "Create Size Reporter")
|
395
|
+
view_menu.append_separator
|
396
|
+
|
397
|
+
view_menu.append(ID_GridContent,
|
398
|
+
"Use a Grid for the Content Pane")
|
399
|
+
view_menu.append(ID_TextContent,
|
400
|
+
"Use a Text Control for the Content Pane")
|
401
|
+
view_menu.append(ID_HTMLContent,
|
402
|
+
"Use an HTML Control for the Content Pane")
|
403
|
+
view_menu.append(ID_TreeContent,
|
404
|
+
"Use a Tree Control for the Content Pane")
|
405
|
+
view_menu.append(ID_NotebookContent,
|
406
|
+
"Use a wxAuiNotebook control for the Content Pane")
|
407
|
+
view_menu.append(ID_SizeReportContent,
|
408
|
+
"Use a Size Reporter for the Content Pane")
|
409
|
+
|
410
|
+
options_menu = Wx::Menu.new
|
411
|
+
# Hints
|
412
|
+
options_menu.append_radio_item(ID_TransparentHint,
|
413
|
+
"Transparent Hint")
|
414
|
+
options_menu.append_radio_item(ID_VenetianBlindsHint,
|
415
|
+
"Venetian Blinds Hint")
|
416
|
+
options_menu.append_radio_item(ID_RectangleHint,
|
417
|
+
"Rectangle Hint")
|
418
|
+
options_menu.append_radio_item(ID_NoHint,
|
419
|
+
"No Hint")
|
420
|
+
|
421
|
+
options_menu.append_separator
|
422
|
+
# Hints Options
|
423
|
+
options_menu.append_check_item(ID_HintFade,
|
424
|
+
"Hint Fade-in")
|
425
|
+
options_menu.append_check_item(ID_AllowFloating,
|
426
|
+
"Allow Floating")
|
427
|
+
options_menu.append_check_item(ID_NoVenetianFade,
|
428
|
+
"Disable Venetian Blinds Hint Fade-in")
|
429
|
+
options_menu.append_check_item(ID_TransparentDrag,
|
430
|
+
"Transparent Drag")
|
431
|
+
options_menu.append_check_item(ID_AllowActivePane,
|
432
|
+
"Allow Active Pane")
|
433
|
+
options_menu.append_separator
|
434
|
+
options_menu.append_radio_item(ID_NoGradient,
|
435
|
+
"No Caption Gradient")
|
436
|
+
options_menu.append_radio_item(ID_VerticalGradient,
|
437
|
+
"Vertical Caption Gradient")
|
438
|
+
options_menu.append_radio_item(ID_HorizontalGradient,
|
439
|
+
"Horizontal Caption Gradient")
|
440
|
+
options_menu.append_separator
|
441
|
+
options_menu.append(ID_Settings, "Settings Pane")
|
442
|
+
|
443
|
+
notebook_menu = Wx::Menu.new
|
444
|
+
notebook_menu.append_radio_item(ID_NotebookArtGloss,
|
445
|
+
"Glossy Theme (Default)")
|
446
|
+
notebook_menu.append_radio_item(ID_NotebookArtSimple,
|
447
|
+
"Simple Theme")
|
448
|
+
|
449
|
+
notebook_menu.append_separator
|
450
|
+
|
451
|
+
notebook_menu.append_radio_item(ID_NotebookNoCloseButton,
|
452
|
+
"No Close Button")
|
453
|
+
notebook_menu.append_radio_item(ID_NotebookCloseButton,
|
454
|
+
"Close Button at Right")
|
455
|
+
notebook_menu.append_radio_item(ID_NotebookCloseButtonAll,
|
456
|
+
"Close Button on All Tabs")
|
457
|
+
notebook_menu.append_radio_item(ID_NotebookCloseButtonActive,
|
458
|
+
"Close Button on Active Tab")
|
459
|
+
|
460
|
+
notebook_menu.append_separator
|
461
|
+
notebook_menu.append_check_item(ID_NotebookAllowTabMove,
|
462
|
+
"Allow Tab Move")
|
463
|
+
notebook_menu.append_check_item(ID_NotebookAllowTabExternalMove,
|
464
|
+
"Allow External Tab Move")
|
465
|
+
notebook_menu.append_check_item(ID_NotebookAllowTabSplit,
|
466
|
+
"Allow Notebook Split")
|
467
|
+
notebook_menu.append_check_item(ID_NotebookScrollButtons,
|
468
|
+
"Scroll Buttons Visible")
|
469
|
+
notebook_menu.append_check_item(ID_NotebookWindowList,
|
470
|
+
"Window List Button Visible")
|
471
|
+
notebook_menu.append_check_item(ID_NotebookTabFixedWidth,
|
472
|
+
"Fixed-width Tabs")
|
473
|
+
|
474
|
+
@perspectives_menu = Wx::Menu.new
|
475
|
+
@perspectives_menu.append(ID_CreatePerspective,
|
476
|
+
"Create Perspective")
|
477
|
+
@perspectives_menu.append(ID_CopyPerspectiveCode,
|
478
|
+
"Copy Perspective Data To Clipboard")
|
479
|
+
@perspectives_menu.append_separator
|
480
|
+
@perspectives_menu.append(ID_FirstPerspective + 0, "Default Startup")
|
481
|
+
@perspectives_menu.append(ID_FirstPerspective + 1, "All Panes")
|
482
|
+
|
483
|
+
help_menu = Wx::Menu.new
|
484
|
+
help_menu.append(Wx::ID_ABOUT, "About...")
|
485
|
+
|
486
|
+
mb.append(file_menu, "File")
|
487
|
+
mb.append(view_menu, "View")
|
488
|
+
mb.append(@perspectives_menu, "Perspectives")
|
489
|
+
mb.append(options_menu, "Options")
|
490
|
+
mb.append(notebook_menu, "Notebook")
|
491
|
+
mb.append(help_menu, "Help")
|
492
|
+
|
493
|
+
set_menu_bar(mb)
|
494
|
+
end
|
495
|
+
|
496
|
+
def setup_events
|
497
|
+
evt_erase_background { |e| on_erase_background(e) }
|
498
|
+
evt_size { |e| on_size(e) }
|
499
|
+
|
500
|
+
evt_menu(ID_CreateTree) { |e| on_create_tree }
|
501
|
+
evt_menu(ID_CreateGrid) { |e| on_create_grid }
|
502
|
+
evt_menu(ID_CreateText) { |e| on_create_text }
|
503
|
+
evt_menu(ID_CreateHTML) { |e| on_create_html }
|
504
|
+
evt_menu(ID_CreateSizeReport) { |e| on_create_size_report }
|
505
|
+
evt_menu(ID_CreateNotebook) { |e| on_create_notebook }
|
506
|
+
evt_menu(ID_CreatePerspective) { |e| on_create_perspective }
|
507
|
+
evt_menu(ID_CopyPerspectiveCode) { |e| on_copy_perspective_code }
|
508
|
+
evt_menu(ID_AllowFloating) { |e| on_manager_flag(e) }
|
509
|
+
evt_menu(ID_TransparentHint) { |e| on_manager_flag(e) }
|
510
|
+
evt_menu(ID_VenetianBlindsHint) { |e| on_manager_flag(e) }
|
511
|
+
evt_menu(ID_RectangleHint) { |e| on_manager_flag(e) }
|
512
|
+
evt_menu(ID_NoHint) { |e| on_manager_flag(e) }
|
513
|
+
evt_menu(ID_HintFade) { |e| on_manager_flag(e) }
|
514
|
+
evt_menu(ID_NoVenetianFade) { |e| on_manager_flag(e) }
|
515
|
+
evt_menu(ID_TransparentDrag) { |e| on_manager_flag(e) }
|
516
|
+
evt_menu(ID_AllowActivePane) { |e| on_manager_flag(e) }
|
517
|
+
evt_menu(ID_NotebookTabFixedWidth) { |e| on_notebook_flag(e) }
|
518
|
+
evt_menu(ID_NotebookNoCloseButton) { |e| on_notebook_flag(e) }
|
519
|
+
evt_menu(ID_NotebookCloseButton) { |e| on_notebook_flag(e) }
|
520
|
+
evt_menu(ID_NotebookCloseButtonAll) { |e| on_notebook_flag(e) }
|
521
|
+
evt_menu(ID_NotebookCloseButtonActive) { |e| on_notebook_flag(e) }
|
522
|
+
evt_menu(ID_NotebookAllowTabMove) { |e| on_notebook_flag(e) }
|
523
|
+
evt_menu(ID_NotebookAllowTabExternalMove) { |e| on_notebook_flag(e) }
|
524
|
+
evt_menu(ID_NotebookAllowTabSplit) { |e| on_notebook_flag(e) }
|
525
|
+
evt_menu(ID_NotebookScrollButtons) { |e| on_notebook_flag(e) }
|
526
|
+
evt_menu(ID_NotebookWindowList) { |e| on_notebook_flag(e) }
|
527
|
+
evt_menu(ID_NotebookArtGloss) { |e| on_notebook_flag(e) }
|
528
|
+
evt_menu(ID_NotebookArtSimple) { |e| on_notebook_flag(e) }
|
529
|
+
evt_menu(ID_NoGradient) { |e| on_gradient(e) }
|
530
|
+
evt_menu(ID_VerticalGradient) { |e| on_gradient(e) }
|
531
|
+
evt_menu(ID_HorizontalGradient) { |e| on_gradient(e) }
|
532
|
+
evt_menu(ID_Settings) { on_settings }
|
533
|
+
evt_menu(ID_GridContent) { |e| on_change_content_pane(e) }
|
534
|
+
evt_menu(ID_TreeContent) { |e| on_change_content_pane(e) }
|
535
|
+
evt_menu(ID_TextContent) { |e| on_change_content_pane(e) }
|
536
|
+
evt_menu(ID_SizeReportContent) { |e| on_change_content_pane(e) }
|
537
|
+
evt_menu(ID_HTMLContent) { |e| on_change_content_pane(e) }
|
538
|
+
evt_menu(ID_NotebookContent) { |e| on_change_content_pane(e) }
|
539
|
+
evt_menu(Wx::ID_EXIT) { |e| on_exit }
|
540
|
+
evt_menu(Wx::ID_ABOUT) { |e| on_about }
|
541
|
+
evt_update_ui(ID_NotebookTabFixedWidth) { |e| on_update_ui(e) }
|
542
|
+
evt_update_ui(ID_NotebookNoCloseButton) { |e| on_update_ui(e) }
|
543
|
+
evt_update_ui(ID_NotebookCloseButton) { |e| on_update_ui(e) }
|
544
|
+
evt_update_ui(ID_NotebookCloseButtonAll) { |e| on_update_ui(e) }
|
545
|
+
evt_update_ui(ID_NotebookCloseButtonActive) { |e| on_update_ui(e) }
|
546
|
+
evt_update_ui(ID_NotebookAllowTabMove) { |e| on_update_ui(e) }
|
547
|
+
evt_update_ui(ID_NotebookAllowTabExternalMove) { |e| on_update_ui(e) }
|
548
|
+
evt_update_ui(ID_NotebookAllowTabSplit) { |e| on_update_ui(e) }
|
549
|
+
evt_update_ui(ID_NotebookScrollButtons) { |e| on_update_ui(e) }
|
550
|
+
evt_update_ui(ID_NotebookWindowList) { |e| on_update_ui(e) }
|
551
|
+
evt_update_ui(ID_AllowFloating) { |e| on_update_ui(e) }
|
552
|
+
evt_update_ui(ID_TransparentHint) { |e| on_update_ui(e) }
|
553
|
+
evt_update_ui(ID_VenetianBlindsHint) { |e| on_update_ui(e) }
|
554
|
+
evt_update_ui(ID_RectangleHint) { |e| on_update_ui(e) }
|
555
|
+
evt_update_ui(ID_NoHint) { |e| on_update_ui(e) }
|
556
|
+
evt_update_ui(ID_HintFade) { |e| on_update_ui(e) }
|
557
|
+
evt_update_ui(ID_NoVenetianFade) { |e| on_update_ui(e) }
|
558
|
+
evt_update_ui(ID_TransparentDrag) { |e| on_update_ui(e) }
|
559
|
+
evt_update_ui(ID_NoGradient) { |e| on_update_ui(e) }
|
560
|
+
evt_update_ui(ID_VerticalGradient) { |e| on_update_ui(e) }
|
561
|
+
evt_update_ui(ID_HorizontalGradient) { |e| on_update_ui(e) }
|
562
|
+
evt_menu_range(ID_FirstPerspective,
|
563
|
+
ID_FirstPerspective +
|
564
|
+
@perspectives.length) { |e| on_restore_perspective(e) }
|
565
|
+
evt_aui_pane_close { |e| on_pane_close(e) }
|
566
|
+
evt_auinotebook_page_close(Wx::ID_ANY) { |e| on_notebook_page_close(e) }
|
567
|
+
end
|
568
|
+
|
569
|
+
# create some toolbars
|
570
|
+
def setup_toolbars
|
571
|
+
tb1 = Wx::ToolBar.new(self, Wx::ID_ANY,
|
572
|
+
Wx::DEFAULT_POSITION,
|
573
|
+
Wx::DEFAULT_SIZE,
|
574
|
+
Wx::TB_FLAT | Wx::TB_NODIVIDER)
|
575
|
+
tb1.set_tool_bitmap_size(Wx::Size.new(48, 48))
|
576
|
+
tb1.add_tool(101, "Test",
|
577
|
+
Wx::ArtProvider::get_bitmap(Wx::ART_ERROR))
|
578
|
+
tb1.add_separator
|
579
|
+
tb1.add_tool(102, "Test",
|
580
|
+
Wx::ArtProvider::get_bitmap(Wx::ART_QUESTION))
|
581
|
+
tb1.add_tool(103, "Test",
|
582
|
+
Wx::ArtProvider::get_bitmap(Wx::ART_INFORMATION))
|
583
|
+
tb1.add_tool(103, "Test",
|
584
|
+
Wx::ArtProvider::get_bitmap(Wx::ART_WARNING));
|
585
|
+
tb1.add_tool(103, "Test",
|
586
|
+
Wx::ArtProvider::get_bitmap(Wx::ART_MISSING_IMAGE));
|
587
|
+
tb1.realize
|
588
|
+
|
589
|
+
tb2 = Wx::ToolBar.new(self, Wx::ID_ANY, Wx::DEFAULT_POSITION,
|
590
|
+
Wx::DEFAULT_SIZE,
|
591
|
+
Wx::TB_FLAT | Wx::TB_NODIVIDER)
|
592
|
+
tb2.set_tool_bitmap_size(Wx::Size.new(16, 16))
|
593
|
+
|
594
|
+
tb2_bmp1 = Wx::ArtProvider::get_bitmap(Wx::ART_QUESTION,
|
595
|
+
Wx::ART_OTHER,
|
596
|
+
Wx::Size.new(16, 16))
|
597
|
+
tb2.add_tool(101, "Test", tb2_bmp1);
|
598
|
+
tb2.add_tool(101, "Test", tb2_bmp1);
|
599
|
+
tb2.add_tool(101, "Test", tb2_bmp1);
|
600
|
+
tb2.add_tool(101, "Test", tb2_bmp1);
|
601
|
+
tb2.add_separator
|
602
|
+
tb2.add_tool(101, "Test", tb2_bmp1);
|
603
|
+
tb2.add_tool(101, "Test", tb2_bmp1);
|
604
|
+
tb2.add_separator
|
605
|
+
tb2.add_tool(101, "Test", tb2_bmp1);
|
606
|
+
tb2.add_tool(101, "Test", tb2_bmp1);
|
607
|
+
tb2.add_tool(101, "Test", tb2_bmp1);
|
608
|
+
tb2.add_tool(101, "Test", tb2_bmp1);
|
609
|
+
tb2.realize
|
610
|
+
|
611
|
+
tb3 = Wx::ToolBar.new(self, Wx::ID_ANY,
|
612
|
+
Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
|
613
|
+
Wx::TB_FLAT | Wx::TB_NODIVIDER)
|
614
|
+
tb3.set_tool_bitmap_size(Wx::Size.new(16, 16))
|
615
|
+
tb3_bmp1 = Wx::ArtProvider::get_bitmap(Wx::ART_FOLDER,
|
616
|
+
Wx::ART_OTHER,
|
617
|
+
Wx::Size.new(16, 16))
|
618
|
+
tb3.add_tool(101, "Test", tb3_bmp1)
|
619
|
+
tb3.add_tool(101, "Test", tb3_bmp1)
|
620
|
+
tb3.add_tool(101, "Test", tb3_bmp1)
|
621
|
+
tb3.add_tool(101, "Test", tb3_bmp1)
|
622
|
+
tb3.add_separator
|
623
|
+
tb3.add_tool(101, "Test", tb3_bmp1)
|
624
|
+
tb3.add_tool(101, "Test", tb3_bmp1)
|
625
|
+
tb3.realize
|
626
|
+
|
627
|
+
tb4 = Wx::ToolBar.new(self, Wx::ID_ANY,
|
628
|
+
Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
|
629
|
+
Wx::TB_FLAT | Wx::TB_NODIVIDER | Wx::TB_HORZ_TEXT)
|
630
|
+
tb4.set_tool_bitmap_size(Wx::Size.new(16, 16))
|
631
|
+
tb4_bmp1 = Wx::ArtProvider::get_bitmap(Wx::ART_NORMAL_FILE,
|
632
|
+
Wx::ART_OTHER,
|
633
|
+
Wx::Size.new(16, 16))
|
634
|
+
tb4.add_tool(101, "Item 1", tb4_bmp1)
|
635
|
+
tb4.add_tool(101, "Item 2", tb4_bmp1)
|
636
|
+
tb4.add_tool(101, "Item 3", tb4_bmp1)
|
637
|
+
tb4.add_tool(101, "Item 4", tb4_bmp1)
|
638
|
+
tb4.add_separator
|
639
|
+
tb4.add_tool(101, "Item 5", tb4_bmp1)
|
640
|
+
tb4.add_tool(101, "Item 6", tb4_bmp1)
|
641
|
+
tb4.add_tool(101, "Item 7", tb4_bmp1)
|
642
|
+
tb4.add_tool(101, "Item 8", tb4_bmp1)
|
643
|
+
tb4.realize
|
644
|
+
|
645
|
+
# create some toolbars
|
646
|
+
tb5 = Wx::ToolBar.new(self, Wx::ID_ANY,
|
647
|
+
Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
|
648
|
+
Wx::TB_FLAT | Wx::TB_NODIVIDER | Wx::TB_VERTICAL)
|
649
|
+
tb5.set_tool_bitmap_size(Wx::Size.new(48, 48))
|
650
|
+
tb5.add_tool(101, "Test",
|
651
|
+
Wx::ArtProvider::get_bitmap(Wx::ART_ERROR))
|
652
|
+
tb5.add_separator
|
653
|
+
tb5.add_tool(102, "Test",
|
654
|
+
Wx::ArtProvider::get_bitmap(Wx::ART_QUESTION))
|
655
|
+
tb5.add_tool(103, "Test",
|
656
|
+
Wx::ArtProvider::get_bitmap(Wx::ART_INFORMATION))
|
657
|
+
tb5.add_tool(103, "Test",
|
658
|
+
Wx::ArtProvider::get_bitmap(Wx::ART_WARNING))
|
659
|
+
tb5.add_tool(103, "Test",
|
660
|
+
Wx::ArtProvider::get_bitmap(Wx::ART_MISSING_IMAGE))
|
661
|
+
tb5.realize
|
662
|
+
|
663
|
+
# add the toolbars to the manager
|
664
|
+
pi = Wx::AuiPaneInfo.new
|
665
|
+
pi.set_name('tb1').set_caption("Big Toolbar").toolbar_pane
|
666
|
+
pi.top.set_left_dockable(false).set_right_dockable(false)
|
667
|
+
@mgr.add_pane(tb1, pi)
|
668
|
+
|
669
|
+
pi = Wx::AuiPaneInfo.new
|
670
|
+
pi.set_name('tb2').set_caption("Toolbar 2").toolbar_pane
|
671
|
+
pi.top.set_row(1)
|
672
|
+
pi.set_left_dockable(false).set_right_dockable(false)
|
673
|
+
@mgr.add_pane(tb2, pi)
|
674
|
+
|
675
|
+
pi = Wx::AuiPaneInfo.new
|
676
|
+
pi.set_name('tb3').set_caption("Toolbar 3").toolbar_pane
|
677
|
+
pi.top.set_row(1).set_position(1)
|
678
|
+
pi.set_left_dockable(false).set_right_dockable(false)
|
679
|
+
@mgr.add_pane(tb3, pi)
|
680
|
+
|
681
|
+
pi = Wx::AuiPaneInfo.new
|
682
|
+
pi.set_name('tb4').set_caption("Sample Bookmark Toolbar")
|
683
|
+
pi.toolbar_pane.top.set_row(2)
|
684
|
+
pi.set_left_dockable(false).set_right_dockable(false)
|
685
|
+
@mgr.add_pane(tb4, pi)
|
686
|
+
|
687
|
+
pi = Wx::AuiPaneInfo.new
|
688
|
+
pi.set_name('tb5').set_caption("Sample Vertical Toolbar")
|
689
|
+
pi.toolbar_pane.left.set_gripper_top
|
690
|
+
pi.set_left_dockable(false).set_right_dockable(false)
|
691
|
+
@mgr.add_pane(tb5, pi)
|
692
|
+
end
|
693
|
+
|
694
|
+
def setup_panes
|
695
|
+
# add a bunch of panes
|
696
|
+
pi = Wx::AuiPaneInfo.new
|
697
|
+
pi.set_name('test1').set_caption('Pane Caption').top
|
698
|
+
@mgr.add_pane(create_size_report_ctrl, pi)
|
699
|
+
|
700
|
+
pi = Wx::AuiPaneInfo.new
|
701
|
+
pi.set_name('test2').set_caption('Client Size Reporter').bottom
|
702
|
+
pi.set_position(1).set_close_button.set_maximize_button
|
703
|
+
@mgr.add_pane(create_size_report_ctrl, pi)
|
704
|
+
|
705
|
+
pi = Wx::AuiPaneInfo.new
|
706
|
+
pi.set_name('test3').set_caption('Client Size Reporter').bottom
|
707
|
+
pi.set_close_button.set_maximize_button
|
708
|
+
@mgr.add_pane(create_size_report_ctrl, pi)
|
709
|
+
|
710
|
+
pi = Wx::AuiPaneInfo.new
|
711
|
+
pi.set_name('test4').set_caption('Pane Caption').left
|
712
|
+
@mgr.add_pane(create_size_report_ctrl, pi)
|
713
|
+
|
714
|
+
pi = Wx::AuiPaneInfo.new
|
715
|
+
pi.set_name('test5').set_caption('No Close Button').right
|
716
|
+
pi.set_close_button(false)
|
717
|
+
@mgr.add_pane(create_size_report_ctrl, pi)
|
718
|
+
|
719
|
+
pi = Wx::AuiPaneInfo.new
|
720
|
+
pi.set_name('test6').set_caption('Client Size Report').right
|
721
|
+
pi.set_row(1).set_close_button.set_maximize_button
|
722
|
+
@mgr.add_pane(create_size_report_ctrl, pi)
|
723
|
+
|
724
|
+
pi = Wx::AuiPaneInfo.new
|
725
|
+
pi.set_name('test7').set_caption('Client Size Report').left
|
726
|
+
pi.set_layer(1).set_close_button.set_maximize_button
|
727
|
+
@mgr.add_pane(create_size_report_ctrl, pi)
|
728
|
+
|
729
|
+
pi = Wx::AuiPaneInfo.new
|
730
|
+
pi.set_name('test8').set_caption('Tree Pane').left
|
731
|
+
pi.set_layer(1).set_position(1).set_close_button.set_maximize_button
|
732
|
+
@mgr.add_pane(create_tree_ctrl, pi)
|
733
|
+
|
734
|
+
pi = Wx::AuiPaneInfo.new
|
735
|
+
pi_size = Wx::Size.new(200, 100)
|
736
|
+
pi.set_name('test9').set_caption('Min Size 200x100').bottom
|
737
|
+
pi.set_best_size(pi_size).set_min_size(pi_size)
|
738
|
+
pi.set_layer(1).set_close_button.set_maximize_button
|
739
|
+
@mgr.add_pane(create_size_report_ctrl, pi)
|
740
|
+
|
741
|
+
wnd10 = create_text_ctrl("This pane will prompt the user before hiding.")
|
742
|
+
pi = Wx::AuiPaneInfo.new
|
743
|
+
pi.set_name('test10').set_caption('Text Pane with hide prompt')
|
744
|
+
pi.bottom.set_layer(1).set_position(1)
|
745
|
+
@mgr.add_pane(wnd10, pi)
|
746
|
+
|
747
|
+
pi = Wx::AuiPaneInfo.new
|
748
|
+
pi.set_name('test11').set_caption('Fixed Pane').bottom
|
749
|
+
pi.set_layer(1).set_position(2).fixed
|
750
|
+
@mgr.add_pane(create_size_report_ctrl, pi)
|
751
|
+
|
752
|
+
pi = Wx::AuiPaneInfo.new
|
753
|
+
pi.set_name('settings').set_caption('Dock Manager Settings')
|
754
|
+
pi.set_dockable(false).float.hide
|
755
|
+
|
756
|
+
@mgr.add_pane(SettingsPanel.new(self, self), pi)
|
757
|
+
|
758
|
+
# create some center panes
|
759
|
+
|
760
|
+
pi = Wx::AuiPaneInfo.new
|
761
|
+
pi.set_name('grid_content').center_pane.hide
|
762
|
+
@mgr.add_pane(create_grid, pi)
|
763
|
+
|
764
|
+
pi = Wx::AuiPaneInfo.new
|
765
|
+
pi.set_name('tree_content').center_pane.hide
|
766
|
+
@mgr.add_pane(create_tree_ctrl, pi)
|
767
|
+
|
768
|
+
pi = Wx::AuiPaneInfo.new
|
769
|
+
pi.set_name('sizereport_content').center_pane.hide
|
770
|
+
@mgr.add_pane(create_size_report_ctrl, pi)
|
771
|
+
|
772
|
+
pi = Wx::AuiPaneInfo.new
|
773
|
+
pi.set_name('text_content').center_pane.hide
|
774
|
+
@mgr.add_pane(create_text_ctrl, pi)
|
775
|
+
|
776
|
+
pi = Wx::AuiPaneInfo.new
|
777
|
+
pi.set_name('html_content').center_pane.hide
|
778
|
+
@mgr.add_pane(create_html_ctrl, pi)
|
779
|
+
|
780
|
+
pi = Wx::AuiPaneInfo.new
|
781
|
+
pi.set_name('notebook_content').center_pane.hide
|
782
|
+
@mgr.add_pane(create_notebook, pi)
|
783
|
+
|
784
|
+
pi = Wx::AuiPaneInfo.new
|
785
|
+
pi.set_name('tb6').toolbar_pane.top
|
786
|
+
pi.set_row(2).set_position(1)
|
787
|
+
pi.set_left_dockable(false).set_right_dockable(false)
|
788
|
+
@mgr.add_pane(Wx::Button.new(self, Wx::ID_ANY, "Test Button"), pi)
|
789
|
+
end
|
790
|
+
|
791
|
+
# make some default perspectives
|
792
|
+
def setup_perspectives
|
793
|
+
perspective_all = @mgr.save_perspective
|
794
|
+
|
795
|
+
@mgr.each_pane do |pane|
|
796
|
+
pane.hide unless pane.is_toolbar
|
797
|
+
end
|
798
|
+
|
799
|
+
@mgr.get_pane("tb1").hide
|
800
|
+
@mgr.get_pane("tb6").hide
|
801
|
+
@mgr.get_pane("test8").show.left.set_layer(0).set_row(0).set_position(0)
|
802
|
+
@mgr.get_pane("test10").show.bottom.set_layer(0).set_row(0).set_position(0)
|
803
|
+
@mgr.get_pane("notebook_content").show
|
804
|
+
perspective_default = @mgr.save_perspective
|
805
|
+
|
806
|
+
@perspectives << perspective_default
|
807
|
+
@perspectives << perspective_all
|
808
|
+
end
|
809
|
+
|
810
|
+
def get_dock_art
|
811
|
+
@mgr.get_art_provider
|
812
|
+
end
|
813
|
+
|
814
|
+
def do_update
|
815
|
+
@mgr.update
|
816
|
+
end
|
817
|
+
|
818
|
+
def on_erase_background(event)
|
819
|
+
event.skip
|
820
|
+
end
|
821
|
+
|
822
|
+
def on_size(event)
|
823
|
+
event.skip
|
824
|
+
end
|
825
|
+
|
826
|
+
def on_settings
|
827
|
+
float_pane = @mgr.get_pane("settings").float.show
|
828
|
+
if float_pane.floating_position == Wx::DEFAULT_POSITION
|
829
|
+
float_pane.floating_position = get_start_position
|
830
|
+
end
|
831
|
+
@mgr.update
|
832
|
+
end
|
833
|
+
|
834
|
+
def on_gradient(event)
|
835
|
+
gradient = nil
|
836
|
+
case event.get_id
|
837
|
+
when ID_NoGradient
|
838
|
+
gradient = Wx::AUI_GRADIENT_NONE
|
839
|
+
when ID_VerticalGradient
|
840
|
+
gradient = Wx::AUI_GRADIENT_VERTICAL
|
841
|
+
when ID_HorizontalGradient
|
842
|
+
gradient = Wx::AUI_GRADIENT_HORIZONTAL
|
843
|
+
end
|
844
|
+
return if not gradient
|
845
|
+
@mgr.get_art_provider.set_metric(Wx::AUI_DOCKART_GRADIENT_TYPE,
|
846
|
+
gradient)
|
847
|
+
@mgr.update
|
848
|
+
end
|
849
|
+
|
850
|
+
def on_manager_flag(event)
|
851
|
+
e_id = event.get_id
|
852
|
+
if e_id == ID_TransparentHint or
|
853
|
+
e_id == ID_VenetianBlindsHint or
|
854
|
+
e_id == ID_RectangleHint or
|
855
|
+
e_id == ID_NoHint
|
856
|
+
flags = @mgr.get_flags
|
857
|
+
flags &= ~Wx::AUI_MGR_TRANSPARENT_HINT
|
858
|
+
flags &= ~Wx::AUI_MGR_VENETIAN_BLINDS_HINT
|
859
|
+
flags &= ~Wx::AUI_MGR_RECTANGLE_HINT
|
860
|
+
@mgr.set_flags(flags)
|
861
|
+
end
|
862
|
+
|
863
|
+
flag = nil
|
864
|
+
case e_id
|
865
|
+
when ID_AllowFloating
|
866
|
+
flag = Wx::AUI_MGR_ALLOW_FLOATING
|
867
|
+
when ID_TransparentDrag
|
868
|
+
flag = Wx::AUI_MGR_TRANSPARENT_DRAG
|
869
|
+
when ID_HintFade
|
870
|
+
flag = Wx::AUI_MGR_HINT_FADE
|
871
|
+
when ID_NoVenetianFade
|
872
|
+
flag = Wx::AUI_MGR_NO_VENETIAN_BLINDS_FADE
|
873
|
+
when ID_AllowActivePane
|
874
|
+
flag = Wx::AUI_MGR_ALLOW_ACTIVE_PANE
|
875
|
+
when ID_TransparentHint
|
876
|
+
flag = Wx::AUI_MGR_TRANSPARENT_HINT
|
877
|
+
when ID_VenetianBlindsHint
|
878
|
+
flag = Wx::AUI_MGR_VENETIAN_BLINDS_HINT
|
879
|
+
when ID_RectangleHint
|
880
|
+
flag = Wx::AUI_MGR_RECTANGLE_HINT
|
881
|
+
end
|
882
|
+
|
883
|
+
if flag
|
884
|
+
@mgr.set_flags(@mgr.get_flags ^ flag)
|
885
|
+
end
|
886
|
+
|
887
|
+
@mgr.update
|
888
|
+
end
|
889
|
+
|
890
|
+
def on_notebook_flag(event)
|
891
|
+
e_id = event.get_id
|
892
|
+
|
893
|
+
if e_id == ID_NotebookNoCloseButton or
|
894
|
+
e_id == ID_NotebookCloseButton or
|
895
|
+
e_id == ID_NotebookCloseButtonAll or
|
896
|
+
e_id == ID_NotebookCloseButtonActive
|
897
|
+
@notebook_style &= ~(Wx::AUI_NB_CLOSE_BUTTON |
|
898
|
+
Wx::AUI_NB_CLOSE_ON_ACTIVE_TAB |
|
899
|
+
Wx::AUI_NB_CLOSE_ON_ALL_TABS)
|
900
|
+
end
|
901
|
+
|
902
|
+
case e_id
|
903
|
+
when ID_NotebookNoCloseButton
|
904
|
+
# nothing
|
905
|
+
when ID_NotebookCloseButton
|
906
|
+
@notebook_style |= Wx::AUI_NB_CLOSE_BUTTON
|
907
|
+
when ID_NotebookCloseButtonAll
|
908
|
+
@notebook_style |= Wx::AUI_NB_CLOSE_ON_ALL_TABS
|
909
|
+
when ID_NotebookCloseButtonActive
|
910
|
+
@notebook_style |= Wx::AUI_NB_CLOSE_ON_ACTIVE_TAB
|
911
|
+
end
|
912
|
+
|
913
|
+
if e_id == ID_NotebookAllowTabMove
|
914
|
+
@notebook_style ^= Wx::AUI_NB_TAB_MOVE
|
915
|
+
end
|
916
|
+
|
917
|
+
if e_id == ID_NotebookAllowTabExternalMove
|
918
|
+
@notebook_style ^= Wx::AUI_NB_TAB_EXTERNAL_MOVE
|
919
|
+
elsif e_id == ID_NotebookAllowTabSplit
|
920
|
+
@notebook_style ^= Wx::AUI_NB_TAB_SPLIT
|
921
|
+
elsif e_id == ID_NotebookWindowList
|
922
|
+
@notebook_style ^= Wx::AUI_NB_WINDOWLIST_BUTTON
|
923
|
+
elsif e_id == ID_NotebookScrollButtons
|
924
|
+
@notebook_style ^= Wx::AUI_NB_SCROLL_BUTTONS
|
925
|
+
elsif e_id == ID_NotebookTabFixedWidth
|
926
|
+
@notebook_style ^= Wx::AUI_NB_TAB_FIXED_WIDTH
|
927
|
+
end
|
928
|
+
|
929
|
+
@mgr.each_pane do |pane|
|
930
|
+
maybe_nb = pane.window
|
931
|
+
next unless maybe_nb.kind_of?(Wx::AuiNotebook)
|
932
|
+
if e_id == ID_NotebookArtGloss
|
933
|
+
maybe_nb.use_default_art
|
934
|
+
@notebook_theme = 0
|
935
|
+
elsif e_id == ID_NotebookArtSimple
|
936
|
+
maybe_nb.use_simple_art
|
937
|
+
@notebook_theme = 1
|
938
|
+
end
|
939
|
+
|
940
|
+
maybe_nb.set_window_style_flag(@notebook_style)
|
941
|
+
maybe_nb.refresh()
|
942
|
+
end
|
943
|
+
end
|
944
|
+
|
945
|
+
def on_update_ui(event)
|
946
|
+
flags = @mgr.get_flags
|
947
|
+
|
948
|
+
case event.get_id
|
949
|
+
when ID_NoGradient
|
950
|
+
event.check(@mgr.get_art_provider.get_metric(Wx::AUI_DOCKART_GRADIENT_TYPE) == Wx::AUI_GRADIENT_NONE)
|
951
|
+
when ID_VerticalGradient
|
952
|
+
event.check(@mgr.get_art_provider.get_metric(Wx::AUI_DOCKART_GRADIENT_TYPE) == Wx::AUI_GRADIENT_VERTICAL)
|
953
|
+
when ID_HorizontalGradient
|
954
|
+
event.check(@mgr.get_art_provider.get_metric(Wx::AUI_DOCKART_GRADIENT_TYPE) == Wx::AUI_GRADIENT_HORIZONTAL)
|
955
|
+
when ID_AllowFloating
|
956
|
+
event.check((flags & Wx::AUI_MGR_ALLOW_FLOATING) != 0)
|
957
|
+
when ID_TransparentDrag
|
958
|
+
event.check((flags & Wx::AUI_MGR_TRANSPARENT_DRAG) != 0)
|
959
|
+
when ID_TransparentHint
|
960
|
+
event.check((flags & Wx::AUI_MGR_TRANSPARENT_HINT) != 0)
|
961
|
+
when ID_VenetianBlindsHint
|
962
|
+
event.check((flags & Wx::AUI_MGR_VENETIAN_BLINDS_HINT) != 0)
|
963
|
+
when ID_RectangleHint
|
964
|
+
event.check((flags & Wx::AUI_MGR_RECTANGLE_HINT) != 0)
|
965
|
+
when ID_NoHint
|
966
|
+
event.check((Wx::AUI_MGR_TRANSPARENT_HINT |
|
967
|
+
Wx::AUI_MGR_VENETIAN_BLINDS_HINT |
|
968
|
+
Wx::AUI_MGR_RECTANGLE_HINT) & flags == 0)
|
969
|
+
when ID_HintFade
|
970
|
+
event.check((flags & Wx::AUI_MGR_HINT_FADE) != 0)
|
971
|
+
when ID_NoVenetianFade
|
972
|
+
event.check((flags & Wx::AUI_MGR_NO_VENETIAN_BLINDS_FADE) != 0)
|
973
|
+
when ID_NotebookNoCloseButton
|
974
|
+
event.check((@notebook_style &
|
975
|
+
(Wx::AUI_NB_CLOSE_BUTTON |
|
976
|
+
Wx::AUI_NB_CLOSE_ON_ALL_TABS |
|
977
|
+
Wx::AUI_NB_CLOSE_ON_ACTIVE_TAB)) != 0)
|
978
|
+
when ID_NotebookCloseButton
|
979
|
+
event.check((@notebook_style & Wx::AUI_NB_CLOSE_BUTTON) != 0)
|
980
|
+
when ID_NotebookCloseButtonAll
|
981
|
+
event.check((@notebook_style & Wx::AUI_NB_CLOSE_ON_ALL_TABS) != 0)
|
982
|
+
when ID_NotebookCloseButtonActive
|
983
|
+
event.check((@notebook_style & Wx::AUI_NB_CLOSE_ON_ACTIVE_TAB) != 0)
|
984
|
+
when ID_NotebookAllowTabSplit
|
985
|
+
event.check((@notebook_style & Wx::AUI_NB_TAB_SPLIT) != 0)
|
986
|
+
when ID_NotebookAllowTabMove
|
987
|
+
event.check((@notebook_style & Wx::AUI_NB_TAB_MOVE) != 0)
|
988
|
+
when ID_NotebookAllowTabExternalMove
|
989
|
+
event.check((@notebook_style & Wx::AUI_NB_TAB_EXTERNAL_MOVE) != 0)
|
990
|
+
when ID_NotebookScrollButtons
|
991
|
+
event.check((@notebook_style & Wx::AUI_NB_SCROLL_BUTTONS) != 0)
|
992
|
+
when ID_NotebookWindowList
|
993
|
+
event.check((@notebook_style & Wx::AUI_NB_WINDOWLIST_BUTTON) != 0)
|
994
|
+
when ID_NotebookTabFixedWidth
|
995
|
+
event.check((@notebook_style & Wx::AUI_NB_TAB_FIXED_WIDTH) != 0)
|
996
|
+
when ID_NotebookArtGloss
|
997
|
+
event.check(@notebook_style == 0)
|
998
|
+
when ID_NotebookArtSimple
|
999
|
+
event.check(@notebook_style == 1)
|
1000
|
+
end
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
def on_pane_close(event)
|
1004
|
+
if event.get_pane.name == "test10"
|
1005
|
+
msg = "Are you sure you want to close/hide this pane?"
|
1006
|
+
Wx.MessageDialog(self, msg, "Wx::AUI", Wx::YES_NO) do |dlg|
|
1007
|
+
if dlg.show_modal != Wx::ID_YES
|
1008
|
+
return event.veto
|
1009
|
+
end
|
1010
|
+
end
|
1011
|
+
end
|
1012
|
+
end
|
1013
|
+
|
1014
|
+
def on_create_perspective
|
1015
|
+
msg = "Enter a name for the new perspective:"
|
1016
|
+
Wx.TextEntryDialog(self, msg, "Wx::AUI Test") do |dlg|
|
1017
|
+
dlg.set_value("Perspective %d" % [@perspectives.length + 1])
|
1018
|
+
return unless dlg.show_modal == Wx::ID_OK
|
1019
|
+
if @perspectives.length.zero?
|
1020
|
+
@perspectives_menu.append_separator
|
1021
|
+
end
|
1022
|
+
@perspectives_menu.append(ID_FirstPerspective + @perspectives.length,
|
1023
|
+
dlg.get_value)
|
1024
|
+
@perspectives << @mgr.save_perspective
|
1025
|
+
end
|
1026
|
+
end
|
1027
|
+
|
1028
|
+
def on_copy_perspective_code
|
1029
|
+
Kernel.raise NotImplementedError
|
1030
|
+
end
|
1031
|
+
|
1032
|
+
def on_restore_perspective(event)
|
1033
|
+
perspective = @perspectives[event.get_id - ID_FirstPerspective]
|
1034
|
+
@mgr.load_perspective(perspective)
|
1035
|
+
end
|
1036
|
+
|
1037
|
+
def on_notebook_page_close(event)
|
1038
|
+
notebook = event.get_event_object
|
1039
|
+
if notebook.get_page(event.get_selection).kind_of?(Wx::HtmlWindow)
|
1040
|
+
msg = "Are you sure you want to close/hide this notebook page?"
|
1041
|
+
Wx.MessageDialog(self, msg, "Wx::AUI", Wx::YES_NO) do |dlg|
|
1042
|
+
if dlg.show_modal != Wx::ID_YES
|
1043
|
+
event.veto
|
1044
|
+
else
|
1045
|
+
event.allow
|
1046
|
+
end
|
1047
|
+
end
|
1048
|
+
end
|
1049
|
+
end
|
1050
|
+
|
1051
|
+
def get_start_position
|
1052
|
+
origin = client_to_screen(Wx::Point.new(0, 0))
|
1053
|
+
return Wx::Point.new(origin.x + 20, origin.y + 20)
|
1054
|
+
end
|
1055
|
+
|
1056
|
+
def on_create_tree
|
1057
|
+
pi = Wx::AuiPaneInfo.new
|
1058
|
+
pi.set_caption("Tree Control").float
|
1059
|
+
pi.set_floating_position(get_start_position)
|
1060
|
+
pi.set_floating_size(Wx::Size.new(150, 300))
|
1061
|
+
@mgr.add_pane(create_tree_ctrl, pi)
|
1062
|
+
@mgr.update
|
1063
|
+
end
|
1064
|
+
|
1065
|
+
def on_create_grid
|
1066
|
+
pi = Wx::AuiPaneInfo.new
|
1067
|
+
pi.set_caption("Grid").float
|
1068
|
+
pi.set_floating_position(get_start_position)
|
1069
|
+
pi.set_floating_size(Wx::Size.new(300, 200))
|
1070
|
+
@mgr.add_pane(create_grid, pi)
|
1071
|
+
@mgr.update
|
1072
|
+
end
|
1073
|
+
|
1074
|
+
def on_create_html
|
1075
|
+
pi = Wx::AuiPaneInfo.new
|
1076
|
+
pi.set_caption("HTML Control").float
|
1077
|
+
pi.set_floating_position(get_start_position)
|
1078
|
+
pi.set_floating_size(Wx::Size.new(300, 200))
|
1079
|
+
@mgr.add_pane(create_html_ctrl, pi)
|
1080
|
+
@mgr.update
|
1081
|
+
end
|
1082
|
+
|
1083
|
+
def on_create_notebook
|
1084
|
+
pi = Wx::AuiPaneInfo.new
|
1085
|
+
pi.set_caption("Notebook").float
|
1086
|
+
pi.set_floating_position(get_start_position)
|
1087
|
+
pi.set_close_button.set_maximize_button
|
1088
|
+
@mgr.add_pane(create_notebook, pi)
|
1089
|
+
@mgr.update
|
1090
|
+
end
|
1091
|
+
|
1092
|
+
def on_create_text
|
1093
|
+
pi = Wx::AuiPaneInfo.new
|
1094
|
+
pi.set_caption("Text Control").float
|
1095
|
+
pi.set_floating_position(get_start_position)
|
1096
|
+
@mgr.add_pane(create_text_ctrl, pi)
|
1097
|
+
@mgr.update
|
1098
|
+
end
|
1099
|
+
|
1100
|
+
def on_create_size_report
|
1101
|
+
pi = Wx::AuiPaneInfo.new
|
1102
|
+
pi.set_caption("Client Size Reporter").float
|
1103
|
+
pi.set_floating_position(get_start_position)
|
1104
|
+
pi.set_close_button.set_maximize_button
|
1105
|
+
@mgr.add_pane(create_size_report_ctrl, pi)
|
1106
|
+
@mgr.update
|
1107
|
+
end
|
1108
|
+
|
1109
|
+
def on_change_content_pane(event)
|
1110
|
+
e_id = event.get_id
|
1111
|
+
@mgr.get_pane("grid_content").show(e_id == ID_GridContent)
|
1112
|
+
@mgr.get_pane("text_content").show(e_id == ID_TextContent)
|
1113
|
+
@mgr.get_pane("tree_content").show(e_id == ID_TreeContent)
|
1114
|
+
@mgr.get_pane("sizereport_content").show(e_id == ID_SizeReportContent)
|
1115
|
+
@mgr.get_pane("html_content").show(e_id == ID_HTMLContent)
|
1116
|
+
@mgr.get_pane("notebook_content").show(e_id == ID_NotebookContent)
|
1117
|
+
@mgr.update
|
1118
|
+
end
|
1119
|
+
|
1120
|
+
def on_exit
|
1121
|
+
close(true)
|
1122
|
+
end
|
1123
|
+
|
1124
|
+
def on_about
|
1125
|
+
msg = "Wx::AUI Demo\nAn advanced window management library for wxRuby\nAdapted by Alex Fenton from the wxWidgets AUI Demo\n which is (c) Copyright 2005-2006, Kirix Corporation"
|
1126
|
+
Wx.MessageDialog(self, msg, "Wx::AUI", Wx::OK) do |dlg|
|
1127
|
+
dlg.show_modal
|
1128
|
+
end
|
1129
|
+
end
|
1130
|
+
|
1131
|
+
def create_text_ctrl(text = "")
|
1132
|
+
if text.empty?
|
1133
|
+
text = "This is a test text box"
|
1134
|
+
end
|
1135
|
+
Wx::TextCtrl.new(self, Wx::ID_ANY, text,
|
1136
|
+
Wx::Point.new(0, 0), Wx::Size.new(150, 90),
|
1137
|
+
Wx::NO_BORDER | Wx::TE_MULTILINE)
|
1138
|
+
end
|
1139
|
+
|
1140
|
+
def create_grid
|
1141
|
+
grid = Wx::Grid.new(self, Wx::ID_ANY,
|
1142
|
+
Wx::Point.new(0, 0),
|
1143
|
+
Wx::Size.new(150, 250),
|
1144
|
+
Wx::NO_BORDER | Wx::WANTS_CHARS)
|
1145
|
+
grid.create_grid(50, 20)
|
1146
|
+
grid
|
1147
|
+
end
|
1148
|
+
|
1149
|
+
def create_tree_ctrl
|
1150
|
+
tree = Wx::TreeCtrl.new(self, Wx::ID_ANY,
|
1151
|
+
Wx::Point.new(0, 0), Wx::Size.new(160, 250),
|
1152
|
+
Wx::TR_DEFAULT_STYLE | Wx::NO_BORDER)
|
1153
|
+
|
1154
|
+
img_list = Wx::ImageList.new(16, 16, true, 2)
|
1155
|
+
img_list.add(Wx::ArtProvider::get_bitmap(Wx::ART_FOLDER,
|
1156
|
+
Wx::ART_OTHER,
|
1157
|
+
Wx::Size.new(16, 16)))
|
1158
|
+
img_list.add(Wx::ArtProvider::get_bitmap(Wx::ART_NORMAL_FILE,
|
1159
|
+
Wx::ART_OTHER,
|
1160
|
+
Wx::Size.new(16, 16)))
|
1161
|
+
tree.set_image_list(img_list)
|
1162
|
+
root = tree.add_root("Wx::AUI Project", 0)
|
1163
|
+
items = []
|
1164
|
+
1.upto(5) { |i| items << tree.append_item(root, "Item #{i}", 0) }
|
1165
|
+
|
1166
|
+
items.each do |id|
|
1167
|
+
1.upto(5) { |i| tree.append_item(id, "Subitem #{i}", 0) }
|
1168
|
+
end
|
1169
|
+
|
1170
|
+
tree.expand(root)
|
1171
|
+
tree
|
1172
|
+
end
|
1173
|
+
|
1174
|
+
def create_size_report_ctrl(width = 80, height = 80)
|
1175
|
+
SizeReportCtrl.new(self, Wx::ID_ANY,
|
1176
|
+
Wx::DEFAULT_POSITION,
|
1177
|
+
Wx::Size.new(width, height), @mgr)
|
1178
|
+
end
|
1179
|
+
|
1180
|
+
def create_html_ctrl(parent = nil)
|
1181
|
+
if not parent
|
1182
|
+
parent = self
|
1183
|
+
end
|
1184
|
+
ctrl = Wx::HtmlWindow.new(parent, Wx::ID_ANY,
|
1185
|
+
Wx::DEFAULT_POSITION,
|
1186
|
+
Wx::Size.new(400, 300))
|
1187
|
+
ctrl.set_page <<~__HTML
|
1188
|
+
<html>
|
1189
|
+
<head><title>Test page</title></head>
|
1190
|
+
<body background="pic.png" bgcolor="#ffffff">
|
1191
|
+
|
1192
|
+
<B>wxString</B> <B>FindFirst</B>(was there a space between 'g' and 'F'?)<P>
|
1193
|
+
|
1194
|
+
<font size="+2">Unbre</font>akable word<P>
|
1195
|
+
|
1196
|
+
<pre width="50%">
|
1197
|
+
<pre> text, 50% wide
|
1198
|
+
</pre>
|
1199
|
+
|
1200
|
+
|
1201
|
+
<script>
|
1202
|
+
some meaningless script < is this > </is> FIXME: write real jscript here
|
1203
|
+
</script>
|
1204
|
+
text after script <b>in bold</b>
|
1205
|
+
|
1206
|
+
</body>
|
1207
|
+
</html>
|
1208
|
+
__HTML
|
1209
|
+
ctrl
|
1210
|
+
end
|
1211
|
+
|
1212
|
+
def create_notebook
|
1213
|
+
# create the notebook off-window to avoid flicker
|
1214
|
+
client_size = get_client_size
|
1215
|
+
|
1216
|
+
ctrl = Wx::AuiNotebook.new(self, Wx::ID_ANY,
|
1217
|
+
Wx::Point.new(client_size.width, client_size.height),
|
1218
|
+
Wx::Size.new(430, 200),
|
1219
|
+
@notebook_style)
|
1220
|
+
|
1221
|
+
page_bmp = Wx::ArtProvider::get_bitmap(Wx::ART_NORMAL_FILE,
|
1222
|
+
Wx::ART_OTHER,
|
1223
|
+
Wx::Size.new(16, 16))
|
1224
|
+
|
1225
|
+
ctrl.add_page(create_html_ctrl(ctrl),
|
1226
|
+
"Welcome to Wx::AUI", false, page_bmp)
|
1227
|
+
|
1228
|
+
panel = Wx::Panel.new(ctrl, Wx::ID_ANY)
|
1229
|
+
flex = Wx::FlexGridSizer.new(2)
|
1230
|
+
flex.add_growable_row(0)
|
1231
|
+
flex.add_growable_row(3)
|
1232
|
+
flex.add_growable_row(1)
|
1233
|
+
|
1234
|
+
flex.add(5, 5)
|
1235
|
+
flex.add(5, 5)
|
1236
|
+
flex.add(Wx::StaticText.new(panel, -1, "Wx::TextCtrl:"),
|
1237
|
+
0, Wx::ALL | Wx::ALIGN_CENTRE, 5)
|
1238
|
+
flex.add(Wx::TextCtrl.new(panel, -1, "",
|
1239
|
+
Wx::DEFAULT_POSITION, Wx::Size.new(100, -1)),
|
1240
|
+
1, Wx::ALL | Wx::ALIGN_CENTRE, 5)
|
1241
|
+
|
1242
|
+
flex.add(Wx::StaticText.new(panel, -1, "Wx::SpinCtrl:"),
|
1243
|
+
0, Wx::ALL | Wx::ALIGN_CENTRE, 5)
|
1244
|
+
flex.add(Wx::SpinCtrl.new(panel, -1, "5",
|
1245
|
+
Wx::DEFAULT_POSITION, Wx::Size.new(100, -1),
|
1246
|
+
Wx::SP_ARROW_KEYS, 5, 50, 5),
|
1247
|
+
1, Wx::ALL | Wx::ALIGN_CENTRE, 5)
|
1248
|
+
|
1249
|
+
flex.add(5, 5)
|
1250
|
+
flex.add(5, 5)
|
1251
|
+
panel.set_sizer(flex)
|
1252
|
+
ctrl.add_page(panel, "wxPanel", false, page_bmp)
|
1253
|
+
|
1254
|
+
ctrl.add_page(Wx::TextCtrl.new(ctrl, Wx::ID_ANY, "Some text",
|
1255
|
+
Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
|
1256
|
+
Wx::TE_MULTILINE | Wx::NO_BORDER),
|
1257
|
+
"wxTextCtrl 1", false, page_bmp)
|
1258
|
+
|
1259
|
+
ctrl.add_page(Wx::TextCtrl.new(ctrl, Wx::ID_ANY, "Some more text",
|
1260
|
+
Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
|
1261
|
+
Wx::TE_MULTILINE | Wx::NO_BORDER),
|
1262
|
+
"wxTextCtrl 2")
|
1263
|
+
|
1264
|
+
ctrl.add_page(Wx::TextCtrl.new(ctrl, Wx::ID_ANY, "Some more text",
|
1265
|
+
Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
|
1266
|
+
Wx::TE_MULTILINE | Wx::NO_BORDER),
|
1267
|
+
"wxTextCtrl 3")
|
1268
|
+
|
1269
|
+
ctrl.add_page(Wx::TextCtrl.new(ctrl, Wx::ID_ANY, "Some more text",
|
1270
|
+
Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
|
1271
|
+
Wx::TE_MULTILINE | Wx::NO_BORDER),
|
1272
|
+
"wxTextCtrl 4")
|
1273
|
+
|
1274
|
+
ctrl.add_page(Wx::TextCtrl.new(ctrl, Wx::ID_ANY, "Some more text",
|
1275
|
+
Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
|
1276
|
+
Wx::TE_MULTILINE | Wx::NO_BORDER),
|
1277
|
+
"wxTextCtrl 5")
|
1278
|
+
|
1279
|
+
ctrl.add_page(Wx::TextCtrl.new(ctrl, Wx::ID_ANY, "Some more text",
|
1280
|
+
Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
|
1281
|
+
Wx::TE_MULTILINE | Wx::NO_BORDER),
|
1282
|
+
"wxTextCtrl 6")
|
1283
|
+
|
1284
|
+
ctrl.add_page(Wx::TextCtrl.new(ctrl, Wx::ID_ANY, "Some more text",
|
1285
|
+
Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
|
1286
|
+
Wx::TE_MULTILINE | Wx::NO_BORDER),
|
1287
|
+
"wxTextCtrl 7 (longer title)")
|
1288
|
+
|
1289
|
+
ctrl.add_page(Wx::TextCtrl.new(ctrl, Wx::ID_ANY, "Some more text",
|
1290
|
+
Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
|
1291
|
+
Wx::TE_MULTILINE | Wx::NO_BORDER),
|
1292
|
+
"wxTextCtrl 8")
|
1293
|
+
return ctrl
|
1294
|
+
end
|
1295
|
+
end
|
1296
|
+
|
1297
|
+
module AUISample
|
1298
|
+
|
1299
|
+
include WxRuby::Sample if defined? WxRuby::Sample
|
1300
|
+
|
1301
|
+
def self.describe
|
1302
|
+
{ file: __FILE__,
|
1303
|
+
summary: 'wxRuby AUI example.',
|
1304
|
+
description: 'wxRuby example demonstrating the AUI framework.' }
|
1305
|
+
end
|
1306
|
+
|
1307
|
+
def self.activate
|
1308
|
+
frame = AuiFrame.new(nil, Wx::ID_ANY, "Wx::AUI Sample Application",
|
1309
|
+
Wx::DEFAULT_POSITION,
|
1310
|
+
Wx::Size.new(800, 600))
|
1311
|
+
frame.show
|
1312
|
+
frame
|
1313
|
+
end
|
1314
|
+
|
1315
|
+
if $0 == __FILE__
|
1316
|
+
Wx::App.run do
|
1317
|
+
AUISample.activate
|
1318
|
+
end
|
1319
|
+
end
|
1320
|
+
|
1321
|
+
end
|