wxruby3 0.9.0.pre.rc.1-x64-mingw-ucrt → 0.9.0.pre.rc.3-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/INSTALL.md +73 -22
- data/README.md +40 -8
- data/assets/hello_button-macos.png +0 -0
- data/assets/hello_button-msw.png +0 -0
- data/assets/hello_button_clicked-macos.png +0 -0
- data/assets/hello_button_clicked-msw.png +0 -0
- data/assets/hello_button_clicked_combi.png +0 -0
- data/assets/hello_world-macos.png +0 -0
- data/assets/hello_world-msw.png +0 -0
- data/assets/hello_world_combi.png +0 -0
- data/ext/wxbase32u_gcc_custom.dll +0 -0
- data/ext/wxbase32u_net_gcc_custom.dll +0 -0
- data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
- data/lib/wx/core/brush.rb +6 -0
- data/lib/wx/core/event_loop.rb +7 -0
- data/lib/wx/core/events/evt_list.rb +7 -0
- data/lib/wx/core/evthandler.rb +12 -2
- data/lib/wx/core/font.rb +22 -14
- data/lib/wx/core/helpprovider.rb +2 -2
- data/lib/wx/core/image.rb +33 -0
- data/lib/wx/core/listctrl.rb +17 -13
- data/lib/wx/core/log.rb +90 -0
- data/lib/wx/core/menu.rb +5 -0
- data/lib/wx/core/pen.rb +6 -0
- data/lib/wx/core/window.rb +28 -1
- data/lib/wx/doc/app.rb +40 -0
- data/lib/wx/doc/bitmap.rb +11 -15
- data/lib/wx/doc/brush.rb +17 -0
- data/lib/wx/doc/event_loop.rb +7 -0
- data/lib/wx/doc/extra/00_starting.md +6 -6
- data/lib/wx/doc/extra/02_lifecycles.md +9 -8
- data/lib/wx/doc/extra/09_exceptions.md +1 -1
- data/lib/wx/doc/extra/11_drawing_and_dc.md +4 -4
- data/lib/wx/doc/font.rb +27 -0
- data/lib/wx/doc/functions.rb +51 -23
- data/lib/wx/doc/gc_dc.rb +1 -1
- data/lib/wx/doc/gen/about_dialog_info.rb +1 -1
- data/lib/wx/doc/gen/accelerator.rb +6 -6
- data/lib/wx/doc/gen/accessible.rb +6 -2
- data/lib/wx/doc/gen/activity_indicator.rb +65 -0
- data/lib/wx/doc/gen/animation.rb +7 -7
- data/lib/wx/doc/gen/animation_ctrl.rb +7 -6
- data/lib/wx/doc/gen/any_button.rb +1 -1
- data/lib/wx/doc/gen/app.rb +17 -11
- data/lib/wx/doc/gen/art_provider.rb +61 -1
- data/lib/wx/doc/gen/aui/aui_dock_art.rb +12 -12
- data/lib/wx/doc/gen/aui/aui_floating_frame.rb +6 -6
- data/lib/wx/doc/gen/aui/aui_manager.rb +45 -27
- data/lib/wx/doc/gen/aui/aui_manager_event.rb +12 -6
- data/lib/wx/doc/gen/aui/aui_mdi_child_frame.rb +6 -6
- data/lib/wx/doc/gen/aui/aui_mdi_client_window.rb +6 -6
- data/lib/wx/doc/gen/aui/aui_mdi_parent_frame.rb +10 -10
- data/lib/wx/doc/gen/aui/aui_notebook.rb +34 -7
- data/lib/wx/doc/gen/aui/aui_notebook_event.rb +17 -2
- data/lib/wx/doc/gen/aui/aui_pane_info.rb +51 -51
- data/lib/wx/doc/gen/aui/aui_tab_art.rb +6 -6
- data/lib/wx/doc/gen/aui/aui_tool_bar.rb +35 -20
- data/lib/wx/doc/gen/aui/aui_tool_bar_art.rb +16 -16
- data/lib/wx/doc/gen/aui/aui_tool_bar_event.rb +4 -4
- data/lib/wx/doc/gen/aui/aui_tool_bar_item.rb +4 -4
- data/lib/wx/doc/gen/bitmap.rb +32 -26
- data/lib/wx/doc/gen/bitmap_button.rb +10 -6
- data/lib/wx/doc/gen/bitmap_combo_box.rb +12 -7
- data/lib/wx/doc/gen/book_ctrl_base.rb +7 -3
- data/lib/wx/doc/gen/book_ctrl_event.rb +2 -2
- data/lib/wx/doc/gen/box_sizer.rb +1 -1
- data/lib/wx/doc/gen/brush.rb +16 -4
- data/lib/wx/doc/gen/busy_info.rb +1 -1
- data/lib/wx/doc/gen/button.rb +19 -7
- data/lib/wx/doc/gen/calculate_layout_event.rb +2 -1
- data/lib/wx/doc/gen/calendar_ctrl.rb +28 -16
- data/lib/wx/doc/gen/calendar_date_attr.rb +2 -2
- data/lib/wx/doc/gen/calendar_event.rb +3 -3
- data/lib/wx/doc/gen/caret.rb +2 -2
- data/lib/wx/doc/gen/check_box.rb +10 -6
- data/lib/wx/doc/gen/check_list_box.rb +8 -7
- data/lib/wx/doc/gen/choice.rb +7 -6
- data/lib/wx/doc/gen/choicebook.rb +12 -6
- data/lib/wx/doc/gen/client_dc.rb +1 -1
- data/lib/wx/doc/gen/clipboard.rb +1 -1
- data/lib/wx/doc/gen/collapsible_pane.rb +9 -6
- data/lib/wx/doc/gen/collapsible_pane_event.rb +2 -1
- data/lib/wx/doc/gen/colour.rb +16 -6
- data/lib/wx/doc/gen/colour_dialog.rb +6 -6
- data/lib/wx/doc/gen/colour_picker_ctrl.rb +15 -9
- data/lib/wx/doc/gen/colour_picker_event.rb +7 -4
- data/lib/wx/doc/gen/combo_box.rb +22 -13
- data/lib/wx/doc/gen/context_help_button.rb +50 -1
- data/lib/wx/doc/gen/control.rb +9 -6
- data/lib/wx/doc/gen/core.rb +5 -2
- data/lib/wx/doc/gen/cursor.rb +16 -11
- data/lib/wx/doc/gen/data_format.rb +2 -2
- data/lib/wx/doc/gen/data_object.rb +23 -16
- data/lib/wx/doc/gen/date_event.rb +3 -3
- data/lib/wx/doc/gen/date_picker_ctrl.rb +11 -6
- data/lib/wx/doc/gen/dc.rb +37 -12
- data/lib/wx/doc/gen/defs.rb +16 -16
- data/lib/wx/doc/gen/dialog.rb +19 -5
- data/lib/wx/doc/gen/dir_dialog.rb +6 -2
- data/lib/wx/doc/gen/dir_filter_list_ctrl.rb +2 -2
- data/lib/wx/doc/gen/dir_picker_ctrl.rb +14 -9
- data/lib/wx/doc/gen/drag_drop.rb +15 -15
- data/lib/wx/doc/gen/drag_image.rb +6 -6
- data/lib/wx/doc/gen/editable_list_box.rb +7 -3
- data/lib/wx/doc/gen/event.rb +44 -13
- data/lib/wx/doc/gen/event_blocker.rb +19 -17
- data/lib/wx/doc/gen/event_filter.rb +43 -47
- data/lib/wx/doc/gen/event_list.rb +22 -15
- data/lib/wx/doc/gen/events.rb +215 -79
- data/lib/wx/doc/gen/evt_handler.rb +1 -1
- data/lib/wx/doc/gen/ext_help_controller.rb +1 -1
- data/lib/wx/doc/gen/file_dialog.rb +64 -56
- data/lib/wx/doc/gen/file_dir_picker_event.rb +5 -3
- data/lib/wx/doc/gen/file_picker_ctrl.rb +16 -8
- data/lib/wx/doc/gen/find_dialog_event.rb +7 -2
- data/lib/wx/doc/gen/find_replace_data.rb +1 -1
- data/lib/wx/doc/gen/find_replace_dialog.rb +1 -1
- data/lib/wx/doc/gen/flex_grid_sizer.rb +12 -6
- data/lib/wx/doc/gen/font.rb +39 -29
- data/lib/wx/doc/gen/font_data.rb +9 -5
- data/lib/wx/doc/gen/font_dialog.rb +3 -3
- data/lib/wx/doc/gen/font_picker_ctrl.rb +10 -6
- data/lib/wx/doc/gen/font_picker_event.rb +2 -1
- data/lib/wx/doc/gen/frame.rb +34 -11
- data/lib/wx/doc/gen/fs_file.rb +4 -17
- data/lib/wx/doc/gen/gauge.rb +11 -7
- data/lib/wx/doc/gen/gcdc.rb +5 -1
- data/lib/wx/doc/gen/gdi_common.rb +35 -33
- data/lib/wx/doc/gen/gdi_object.rb +1 -1
- data/lib/wx/doc/gen/generic_dir_ctrl.rb +13 -7
- data/lib/wx/doc/gen/graphics_context.rb +29 -28
- data/lib/wx/doc/gen/graphics_object.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_activatable_editor.rb +2 -2
- data/lib/wx/doc/gen/grid/grid_cell_attr.rb +10 -10
- data/lib/wx/doc/gen/grid/grid_cell_auto_wrap_string_editor.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_auto_wrap_string_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_bool_editor.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_bool_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_choice_editor.rb +2 -2
- data/lib/wx/doc/gen/grid/grid_cell_date_editor.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_date_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_date_time_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_editor.rb +13 -10
- data/lib/wx/doc/gen/grid/grid_cell_enum_editor.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_enum_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_float_editor.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_float_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_number_editor.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_number_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_renderer.rb +12 -12
- data/lib/wx/doc/gen/grid/grid_cell_string_renderer.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_cell_text_editor.rb +1 -1
- data/lib/wx/doc/gen/grid/grid_ctrl.rb +32 -18
- data/lib/wx/doc/gen/grid/grid_editor_created_event.rb +5 -3
- data/lib/wx/doc/gen/grid/grid_event.rb +20 -3
- data/lib/wx/doc/gen/grid/grid_range_select_event.rb +7 -3
- data/lib/wx/doc/gen/grid/grid_size_event.rb +9 -3
- data/lib/wx/doc/gen/grid/grid_string_table.rb +2 -2
- data/lib/wx/doc/gen/grid/grid_table_base.rb +7 -7
- data/lib/wx/doc/gen/grid/grid_table_message.rb +5 -5
- data/lib/wx/doc/gen/grid_bag_sizer.rb +5 -5
- data/lib/wx/doc/gen/grid_sizer.rb +4 -4
- data/lib/wx/doc/gen/gui_event_loop.rb +132 -0
- data/lib/wx/doc/gen/help_controller.rb +18 -12
- data/lib/wx/doc/gen/html/html_cell.rb +36 -18
- data/lib/wx/doc/gen/html/html_cell_event.rb +5 -3
- data/lib/wx/doc/gen/html/html_easy_printing.rb +9 -4
- data/lib/wx/doc/gen/html/html_help_controller.rb +34 -8
- data/lib/wx/doc/gen/html/html_help_data.rb +3 -3
- data/lib/wx/doc/gen/html/html_help_frame.rb +6 -6
- data/lib/wx/doc/gen/html/html_help_window.rb +12 -8
- data/lib/wx/doc/gen/html/html_link_event.rb +4 -3
- data/lib/wx/doc/gen/html/html_list_box.rb +15 -7
- data/lib/wx/doc/gen/html/html_printout.rb +15 -5
- data/lib/wx/doc/gen/html/html_window.rb +19 -8
- data/lib/wx/doc/gen/hyperlink_ctrl.rb +152 -0
- data/lib/wx/doc/gen/hyperlink_event.rb +44 -0
- data/lib/wx/doc/gen/icon.rb +14 -14
- data/lib/wx/doc/gen/image.rb +119 -64
- data/lib/wx/doc/gen/image_list.rb +10 -6
- data/lib/wx/doc/gen/keyboard_state.rb +7 -7
- data/lib/wx/doc/gen/list_box.rb +30 -21
- data/lib/wx/doc/gen/list_ctrl.rb +169 -78
- data/lib/wx/doc/gen/list_event.rb +24 -2
- data/lib/wx/doc/gen/listbook.rb +12 -6
- data/lib/wx/doc/gen/locale.rb +11 -36
- data/lib/wx/doc/gen/log.rb +122 -45
- data/lib/wx/doc/gen/mdi_client_window.rb +2 -2
- data/lib/wx/doc/gen/mdi_frame.rb +15 -9
- data/lib/wx/doc/gen/media_ctrl.rb +7 -4
- data/lib/wx/doc/gen/media_event.rb +8 -2
- data/lib/wx/doc/gen/memory_dc.rb +23 -27
- data/lib/wx/doc/gen/menu.rb +9 -9
- data/lib/wx/doc/gen/menu_bar.rb +4 -10
- data/lib/wx/doc/gen/menu_item.rb +115 -34
- data/lib/wx/doc/gen/message_dialog.rb +48 -30
- data/lib/wx/doc/gen/mini_frame.rb +12 -3
- data/lib/wx/doc/gen/mouse_state.rb +1 -1
- data/lib/wx/doc/gen/multi_choice_dialog.rb +4 -2
- data/lib/wx/doc/gen/non_owned_window.rb +6 -7
- data/lib/wx/doc/gen/notebook.rb +20 -15
- data/lib/wx/doc/gen/number_entry_dialog.rb +2 -2
- data/lib/wx/doc/gen/object.rb +2 -2
- data/lib/wx/doc/gen/palette.rb +3 -3
- data/lib/wx/doc/gen/panel.rb +4 -3
- data/lib/wx/doc/gen/pen.rb +25 -12
- data/lib/wx/doc/gen/pg/numeric_property_validator.rb +1 -1
- data/lib/wx/doc/gen/pg/pg_array_editor_dialog.rb +3 -3
- data/lib/wx/doc/gen/pg/pg_cell.rb +12 -12
- data/lib/wx/doc/gen/pg/pg_editor.rb +76 -74
- data/lib/wx/doc/gen/pg/pg_multi_button.rb +3 -3
- data/lib/wx/doc/gen/pg/pg_properties.rb +221 -138
- data/lib/wx/doc/gen/pg/pg_property.rb +103 -54
- data/lib/wx/doc/gen/pg/pg_validation_info.rb +1 -1
- data/lib/wx/doc/gen/pg/property_grid.rb +19 -19
- data/lib/wx/doc/gen/pg/property_grid_event.rb +18 -5
- data/lib/wx/doc/gen/pg/property_grid_interface.rb +36 -24
- data/lib/wx/doc/gen/pg/property_grid_manager.rb +12 -12
- data/lib/wx/doc/gen/pg/property_grid_page.rb +12 -11
- data/lib/wx/doc/gen/pg/property_grid_page_state.rb +8 -8
- data/lib/wx/doc/gen/picker_base.rb +12 -11
- data/lib/wx/doc/gen/platform_info.rb +7 -7
- data/lib/wx/doc/gen/popup_window.rb +6 -6
- data/lib/wx/doc/gen/progress_dialog.rb +1 -1
- data/lib/wx/doc/gen/property_sheet_dialog.rb +19 -17
- data/lib/wx/doc/gen/prt/page_setup_dialog.rb +2 -2
- data/lib/wx/doc/gen/prt/preview_frame.rb +4 -1
- data/lib/wx/doc/gen/prt/print_abort_dialog.rb +1 -1
- data/lib/wx/doc/gen/prt/print_data.rb +24 -18
- data/lib/wx/doc/gen/prt/print_dialog.rb +4 -4
- data/lib/wx/doc/gen/prt/printer.rb +22 -22
- data/lib/wx/doc/gen/query_layout_info_event.rb +2 -1
- data/lib/wx/doc/gen/radio_box.rb +12 -18
- data/lib/wx/doc/gen/radio_button.rb +8 -6
- data/lib/wx/doc/gen/rbn/ribbon_art_provider.rb +39 -39
- data/lib/wx/doc/gen/rbn/ribbon_bar.rb +25 -7
- data/lib/wx/doc/gen/rbn/ribbon_bar_event.rb +5 -5
- data/lib/wx/doc/gen/rbn/ribbon_button_bar.rb +9 -2
- data/lib/wx/doc/gen/rbn/ribbon_button_bar_event.rb +5 -5
- data/lib/wx/doc/gen/rbn/ribbon_control.rb +4 -4
- data/lib/wx/doc/gen/rbn/ribbon_gallery.rb +6 -2
- data/lib/wx/doc/gen/rbn/ribbon_gallery_event.rb +5 -5
- data/lib/wx/doc/gen/rbn/ribbon_page.rb +5 -5
- data/lib/wx/doc/gen/rbn/ribbon_panel.rb +12 -6
- data/lib/wx/doc/gen/rbn/ribbon_panel_event.rb +5 -5
- data/lib/wx/doc/gen/rbn/ribbon_tool_bar.rb +4 -2
- data/lib/wx/doc/gen/rbn/ribbon_tool_bar_event.rb +5 -5
- data/lib/wx/doc/gen/region.rb +9 -8
- data/lib/wx/doc/gen/region_iterator.rb +2 -2
- data/lib/wx/doc/gen/rtc/rich_text_buffer.rb +92 -92
- data/lib/wx/doc/gen/rtc/rich_text_ctrl.rb +56 -34
- data/lib/wx/doc/gen/rtc/rich_text_event.rb +23 -4
- data/lib/wx/doc/gen/rtc/rich_text_file_handler.rb +6 -6
- data/lib/wx/doc/gen/rtc/rich_text_header_footer_data.rb +9 -5
- data/lib/wx/doc/gen/rtc/rich_text_html_handler.rb +6 -2
- data/lib/wx/doc/gen/rtc/rich_text_printing.rb +12 -12
- data/lib/wx/doc/gen/rtc/rich_text_xml_handler.rb +1 -1
- data/lib/wx/doc/gen/rtc/symbol_picker_dialog.rb +2 -2
- data/lib/wx/doc/gen/sash_event.rb +3 -1
- data/lib/wx/doc/gen/sash_layout_window.rb +5 -3
- data/lib/wx/doc/gen/sash_window.rb +8 -3
- data/lib/wx/doc/gen/scroll_bar.rb +29 -8
- data/lib/wx/doc/gen/scrolled_canvas.rb +41 -23
- data/lib/wx/doc/gen/scrolled_control.rb +41 -23
- data/lib/wx/doc/gen/scrolled_window.rb +41 -23
- data/lib/wx/doc/gen/search_ctrl.rb +15 -8
- data/lib/wx/doc/gen/simplebook.rb +2 -2
- data/lib/wx/doc/gen/single_choice_dialog.rb +4 -2
- data/lib/wx/doc/gen/sizer.rb +29 -28
- data/lib/wx/doc/gen/slider.rb +49 -16
- data/lib/wx/doc/gen/spin_button.rb +15 -9
- data/lib/wx/doc/gen/spin_ctrl.rb +12 -6
- data/lib/wx/doc/gen/spin_event.rb +5 -2
- data/lib/wx/doc/gen/splash_screen.rb +16 -12
- data/lib/wx/doc/gen/splitter_event.rb +6 -2
- data/lib/wx/doc/gen/splitter_window.rb +20 -4
- data/lib/wx/doc/gen/static_bitmap.rb +5 -5
- data/lib/wx/doc/gen/static_box.rb +36 -32
- data/lib/wx/doc/gen/static_box_sizer.rb +13 -10
- data/lib/wx/doc/gen/static_line.rb +5 -4
- data/lib/wx/doc/gen/static_text.rb +12 -6
- data/lib/wx/doc/gen/status_bar.rb +14 -5
- data/lib/wx/doc/gen/stc/styled_text_ctrl.rb +55 -7
- data/lib/wx/doc/gen/stc/styled_text_event.rb +224 -49
- data/lib/wx/doc/gen/std_dialog_button_sizer.rb +11 -2
- data/lib/wx/doc/gen/svg_file_dc.rb +3 -3
- data/lib/wx/doc/gen/system_options.rb +11 -1
- data/lib/wx/doc/gen/system_settings.rb +3 -3
- data/lib/wx/doc/gen/task_bar_icon.rb +10 -2
- data/lib/wx/doc/gen/task_bar_icon_event.rb +3 -3
- data/lib/wx/doc/gen/text_attr.rb +11 -7
- data/lib/wx/doc/gen/text_ctrl.rb +61 -92
- data/lib/wx/doc/gen/text_entry.rb +28 -40
- data/lib/wx/doc/gen/text_entry_dialog.rb +19 -19
- data/lib/wx/doc/gen/text_validator.rb +0 -11
- data/lib/wx/doc/gen/time_picker_ctrl.rb +6 -5
- data/lib/wx/doc/gen/timer.rb +8 -4
- data/lib/wx/doc/gen/timer_event.rb +19 -26
- data/lib/wx/doc/gen/tip_provider.rb +1 -1
- data/lib/wx/doc/gen/toggle_button.rb +6 -5
- data/lib/wx/doc/gen/tool_bar.rb +41 -24
- data/lib/wx/doc/gen/tool_tip.rb +2 -2
- data/lib/wx/doc/gen/toolbook.rb +6 -3
- data/lib/wx/doc/gen/top_level_window.rb +35 -25
- data/lib/wx/doc/gen/tree_ctrl.rb +63 -13
- data/lib/wx/doc/gen/tree_event.rb +23 -2
- data/lib/wx/doc/gen/treebook.rb +6 -2
- data/lib/wx/doc/gen/ui_action_simulator.rb +1 -1
- data/lib/wx/doc/gen/utils.rb +9 -3
- data/lib/wx/doc/gen/v_list_box.rb +2 -2
- data/lib/wx/doc/gen/v_scrolled_window.rb +2 -2
- data/lib/wx/doc/gen/validator.rb +7 -5
- data/lib/wx/doc/gen/variant.rb +34 -97
- data/lib/wx/doc/gen/window.rb +157 -102
- data/lib/wx/doc/gen/window_dc.rb +1 -1
- data/lib/wx/doc/gen/with_images.rb +1 -1
- data/lib/wx/doc/gen/wizard.rb +17 -4
- data/lib/wx/doc/gen/wizard_event.rb +9 -2
- data/lib/wx/doc/gen/wizard_page.rb +1 -1
- data/lib/wx/doc/gen/wizard_page_simple.rb +7 -7
- data/lib/wx/doc/gen/xml_node.rb +3 -3
- data/lib/wx/doc/gen/xml_resource.rb +12 -9
- data/lib/wx/doc/image.rb +42 -12
- data/lib/wx/doc/list_ctrl.rb +32 -0
- data/lib/wx/doc/log.rb +28 -0
- data/lib/wx/doc/pen.rb +17 -0
- data/lib/wx/doc/prt/printer_dc.rb +2 -2
- data/lib/wx/doc/radio_box.rb +20 -0
- data/lib/wx/doc/scaled_dc.rb +1 -1
- data/lib/wx/doc/text_validator.rb +12 -0
- data/lib/wx/doc/window.rb +27 -0
- data/lib/wx/keyword_defs.rb +77 -76
- data/lib/wx/prt/keyword_defs.rb +5 -1
- data/lib/wx/version.rb +1 -1
- data/lib/wxruby_aui.so +0 -0
- data/lib/wxruby_core.so +0 -0
- data/lib/wxruby_grid.so +0 -0
- data/lib/wxruby_html.so +0 -0
- data/lib/wxruby_pg.so +0 -0
- data/lib/wxruby_prt.so +0 -0
- data/lib/wxruby_rbn.so +0 -0
- data/lib/wxruby_rtc.so +0 -0
- data/lib/wxruby_stc.so +0 -0
- data/rakelib/install.rb +17 -6
- data/rakelib/lib/config/linux.rb +4 -2
- data/rakelib/lib/config/macosx.rb +120 -1
- data/rakelib/lib/config/mingw.rb +6 -1
- data/rakelib/lib/config/unixish.rb +26 -11
- data/rakelib/lib/config.rb +15 -6
- data/samples/aui/aui.rb +432 -363
- data/samples/propgrid/propgrid.rb +3 -0
- data/samples/sampler/editor.rb +33 -25
- data/samples/sampler/sample.rb +2 -2
- data/samples/sampler/stc_editor.rb +4 -2
- data/tests/lib/item_container_tests.rb +82 -0
- data/tests/lib/text_entry_tests.rb +80 -0
- data/tests/lib/wxapp_runner.rb +12 -0
- data/tests/lib/wxframe_runner.rb +89 -4
- data/tests/test_art.rb +9 -0
- data/tests/test_box_sizer.rb +161 -0
- data/tests/test_ext_controls.rb +28 -0
- data/tests/test_font.rb +239 -0
- data/tests/test_grid_sizer.rb +148 -0
- data/tests/test_intl.rb +5 -1
- data/tests/test_list_ctrl.rb +53 -0
- data/tests/test_log.rb +163 -0
- data/tests/test_std_controls.rb +321 -37
- data/tests/test_timer.rb +95 -0
- data/tests/test_window.rb +340 -0
- metadata +36 -2
data/samples/aui/aui.rb
CHANGED
@@ -72,23 +72,22 @@ class SizeReportCtrl < Wx::Control
|
|
72
72
|
end
|
73
73
|
|
74
74
|
class SettingsPanel < Wx::Panel
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
const_set(c, 1001 + i)
|
75
|
+
module ID
|
76
|
+
include Wx::IDHelper
|
77
|
+
|
78
|
+
PaneBorderSize = self.next_id
|
79
|
+
SashSize = self.next_id
|
80
|
+
CaptionSize = self.next_id
|
81
|
+
BackgroundColour = self.next_id
|
82
|
+
SashColour = self.next_id
|
83
|
+
InactiveCaptionColour = self.next_id
|
84
|
+
InactiveCaptionGradientColour = self.next_id
|
85
|
+
InactiveCaptionTextColour = self.next_id
|
86
|
+
ActiveCaptionColour = self.next_id
|
87
|
+
ActiveCaptionGradientColour = self.next_id
|
88
|
+
ActiveCaptionTextColour = self.next_id
|
89
|
+
BorderColour = self.next_id
|
90
|
+
GripperColour = self.next_id
|
92
91
|
end
|
93
92
|
|
94
93
|
def initialize(parent, frame)
|
@@ -97,38 +96,38 @@ class SettingsPanel < Wx::Panel
|
|
97
96
|
@base_bmp = create_colour_bitmap(Wx::BLACK)
|
98
97
|
|
99
98
|
# set up some spin ctrls for integer variables
|
100
|
-
@border_size, s1 = make_metric_spin_ctrl(
|
99
|
+
@border_size, s1 = make_metric_spin_ctrl(ID::PaneBorderSize,
|
101
100
|
"Pane Border Size:",
|
102
101
|
Wx::AUI_DOCKART_PANE_BORDER_SIZE)
|
103
102
|
|
104
|
-
@sash_size, s2 = make_metric_spin_ctrl(
|
103
|
+
@sash_size, s2 = make_metric_spin_ctrl(ID::SashSize,
|
105
104
|
"Sash Size:",
|
106
105
|
Wx::AUI_DOCKART_SASH_SIZE)
|
107
106
|
|
108
|
-
@cap_size, s3 = make_metric_spin_ctrl(
|
107
|
+
@cap_size, s3 = make_metric_spin_ctrl(ID::CaptionSize,
|
109
108
|
"Caption Size:",
|
110
109
|
Wx::AUI_DOCKART_CAPTION_SIZE)
|
111
110
|
|
112
111
|
# colour controls
|
113
|
-
@bckg_colour, s4 = make_colour_button(
|
112
|
+
@bckg_colour, s4 = make_colour_button(ID::BackgroundColour,
|
114
113
|
"Background Colour:")
|
115
|
-
@sash_colour, s5 = make_colour_button(
|
114
|
+
@sash_colour, s5 = make_colour_button(ID::SashColour,
|
116
115
|
"Sash Colour:")
|
117
|
-
@capt_colour, s6 = make_colour_button(
|
116
|
+
@capt_colour, s6 = make_colour_button(ID::InactiveCaptionColour,
|
118
117
|
"Normal Caption:")
|
119
|
-
@capt_gradnt, s7 = make_colour_button(
|
118
|
+
@capt_gradnt, s7 = make_colour_button(ID::InactiveCaptionGradientColour,
|
120
119
|
"Normal Caption Gradient:")
|
121
|
-
@capt_text, s8 = make_colour_button(
|
120
|
+
@capt_text, s8 = make_colour_button(ID::InactiveCaptionTextColour,
|
122
121
|
"Normal Caption Text:")
|
123
|
-
@acap_colour, s9 = make_colour_button(
|
122
|
+
@acap_colour, s9 = make_colour_button(ID::ActiveCaptionColour,
|
124
123
|
"Active Caption:")
|
125
|
-
@acap_gradnt, s10 = make_colour_button(
|
124
|
+
@acap_gradnt, s10 = make_colour_button(ID::ActiveCaptionGradientColour,
|
126
125
|
"Active Caption Gradient:")
|
127
|
-
@acap_text, s11 = make_colour_button(
|
126
|
+
@acap_text, s11 = make_colour_button(ID::ActiveCaptionTextColour,
|
128
127
|
"Active Caption Text:")
|
129
|
-
@brdr_colour, s12 = make_colour_button(
|
128
|
+
@brdr_colour, s12 = make_colour_button(ID::BorderColour,
|
130
129
|
"Border Colour:")
|
131
|
-
@grip_colour, s13 = make_colour_button(
|
130
|
+
@grip_colour, s13 = make_colour_button(ID::GripperColour,
|
132
131
|
"Gripper Colour:")
|
133
132
|
|
134
133
|
grid_sizer = Wx::GridSizer.new(2)
|
@@ -148,19 +147,19 @@ class SettingsPanel < Wx::Panel
|
|
148
147
|
get_sizer.set_size_hints(self)
|
149
148
|
update_colours
|
150
149
|
|
151
|
-
evt_spinctrl(
|
152
|
-
evt_spinctrl(
|
153
|
-
evt_spinctrl(
|
154
|
-
evt_button(
|
155
|
-
evt_button(
|
156
|
-
evt_button(
|
157
|
-
evt_button(
|
158
|
-
evt_button(
|
159
|
-
evt_button(
|
160
|
-
evt_button(
|
161
|
-
evt_button(
|
162
|
-
evt_button(
|
163
|
-
evt_button(
|
150
|
+
evt_spinctrl(ID::PaneBorderSize) { |e| on_pane_border_size(e) }
|
151
|
+
evt_spinctrl(ID::SashSize) { |e| on_sash_size(e) }
|
152
|
+
evt_spinctrl(ID::CaptionSize) { |e| on_caption_size(e) }
|
153
|
+
evt_button(ID::BackgroundColour) { |e| on_set_colour(e) }
|
154
|
+
evt_button(ID::SashColour) { |e| on_set_colour(e) }
|
155
|
+
evt_button(ID::InactiveCaptionColour) { |e| on_set_colour(e) }
|
156
|
+
evt_button(ID::InactiveCaptionGradientColour) { |e| on_set_colour(e) }
|
157
|
+
evt_button(ID::InactiveCaptionTextColour) { |e| on_set_colour(e) }
|
158
|
+
evt_button(ID::ActiveCaptionColour) { |e| on_set_colour(e) }
|
159
|
+
evt_button(ID::ActiveCaptionGradientColour) { |e| on_set_colour(e) }
|
160
|
+
evt_button(ID::ActiveCaptionTextColour) { |e| on_set_colour(e) }
|
161
|
+
evt_button(ID::BorderColour) { |e| on_set_colour(e) }
|
162
|
+
evt_button(ID::GripperColour) { |e| on_set_colour(e) }
|
164
163
|
end
|
165
164
|
|
166
165
|
def update_colours()
|
@@ -223,25 +222,25 @@ class SettingsPanel < Wx::Panel
|
|
223
222
|
|
224
223
|
var = nil
|
225
224
|
case event.get_id()
|
226
|
-
when
|
225
|
+
when ID::BackgroundColour
|
227
226
|
var = Wx::AUI_DOCKART_BACKGROUND_COLOUR
|
228
|
-
when
|
227
|
+
when ID::SashColour
|
229
228
|
var = Wx::AUI_DOCKART_SASH_COLOUR
|
230
|
-
when
|
229
|
+
when ID::InactiveCaptionColour
|
231
230
|
var = Wx::AUI_DOCKART_INACTIVE_CAPTION_COLOUR
|
232
|
-
when
|
231
|
+
when ID::InactiveCaptionGradientColour
|
233
232
|
var = Wx::AUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR
|
234
|
-
when
|
233
|
+
when ID::InactiveCaptionTextColour
|
235
234
|
var = Wx::AUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR
|
236
|
-
when
|
235
|
+
when ID::ActiveCaptionColour
|
237
236
|
var = Wx::AUI_DOCKART_ACTIVE_CAPTION_COLOUR
|
238
|
-
when
|
237
|
+
when ID::ActiveCaptionGradientColour
|
239
238
|
var = Wx::AUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR
|
240
|
-
when
|
239
|
+
when ID::ActiveCaptionTextColour
|
241
240
|
var = Wx::AUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR
|
242
|
-
when
|
241
|
+
when ID::BorderColour
|
243
242
|
var = Wx::AUI_DOCKART_BORDER_COLOUR
|
244
|
-
when
|
243
|
+
when ID::GripperColour
|
245
244
|
var = Wx::AUI_DOCKART_GRIPPER_COLOUR
|
246
245
|
else
|
247
246
|
return
|
@@ -307,51 +306,58 @@ class SettingsPanel < Wx::Panel
|
|
307
306
|
end
|
308
307
|
|
309
308
|
class AuiFrame < Wx::Frame
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
309
|
+
module ID
|
310
|
+
include Wx::IDHelper
|
311
|
+
CreateTree = self.next_id
|
312
|
+
CreateGrid = self.next_id
|
313
|
+
CreateText = self.next_id
|
314
|
+
CreateHTML = self.next_id
|
315
|
+
CreateNotebook = self.next_id
|
316
|
+
CreateSizeReport = self.next_id
|
317
|
+
GridContent = self.next_id
|
318
|
+
TextContent = self.next_id
|
319
|
+
TreeContent = self.next_id
|
320
|
+
HTMLContent = self.next_id
|
321
|
+
NotebookContent = self.next_id
|
322
|
+
SizeReportContent = self.next_id
|
323
|
+
CreatePerspective = self.next_id
|
324
|
+
CopyPerspectiveCode = self.next_id
|
325
|
+
AllowFloating = self.next_id
|
326
|
+
AllowActivePane = self.next_id
|
327
|
+
TransparentHint = self.next_id
|
328
|
+
VenetianBlindsHint = self.next_id
|
329
|
+
RectangleHint = self.next_id
|
330
|
+
NoHint = self.next_id
|
331
|
+
HintFade = self.next_id
|
332
|
+
NoVenetianFade = self.next_id
|
333
|
+
TransparentDrag = self.next_id
|
334
|
+
NoGradient = self.next_id
|
335
|
+
VerticalGradient = self.next_id
|
336
|
+
HorizontalGradient = self.next_id
|
337
|
+
LiveUpdate = self.next_id
|
338
|
+
AllowToolbarResizing = self.next_id
|
339
|
+
Settings = self.next_id
|
340
|
+
CustomizeToolbar = self.next_id
|
341
|
+
DropDownToolbarItem = self.next_id
|
342
|
+
NotebookNoCloseButton = self.next_id
|
343
|
+
NotebookCloseButton = self.next_id
|
344
|
+
NotebookCloseButtonAll = self.next_id
|
345
|
+
NotebookCloseButtonActive = self.next_id
|
346
|
+
NotebookAllowTabMove = self.next_id
|
347
|
+
NotebookAllowTabExternalMove = self.next_id
|
348
|
+
NotebookAllowTabSplit = self.next_id
|
349
|
+
NotebookWindowList = self.next_id
|
350
|
+
NotebookScrollButtons = self.next_id
|
351
|
+
NotebookTabFixedWidth = self.next_id
|
352
|
+
NotebookArtGloss = self.next_id
|
353
|
+
NotebookArtSimple = self.next_id
|
354
|
+
NotebookAlignTop = self.next_id
|
355
|
+
NotebookAlignBottom = self.next_id
|
356
|
+
|
357
|
+
SampleItem = self.next_id
|
358
|
+
|
359
|
+
FirstPerspective = CreatePerspective+1000
|
353
360
|
end
|
354
|
-
ID_FirstPerspective = ID_CreatePerspective + 1000
|
355
361
|
|
356
362
|
def initialize(*args)
|
357
363
|
super
|
@@ -386,99 +392,99 @@ class AuiFrame < Wx::Frame
|
|
386
392
|
file_menu.append(Wx::ID_EXIT, "Exit")
|
387
393
|
|
388
394
|
view_menu = Wx::Menu.new
|
389
|
-
view_menu.append(
|
390
|
-
view_menu.append(
|
391
|
-
view_menu.append(
|
392
|
-
view_menu.append(
|
393
|
-
view_menu.append(
|
394
|
-
view_menu.append(
|
395
|
+
view_menu.append(ID::CreateText, "Create Text Control")
|
396
|
+
view_menu.append(ID::CreateHTML, "Create HTML Control")
|
397
|
+
view_menu.append(ID::CreateTree, "Create Tree")
|
398
|
+
view_menu.append(ID::CreateGrid, "Create Grid")
|
399
|
+
view_menu.append(ID::CreateNotebook, "Create Notebook")
|
400
|
+
view_menu.append(ID::CreateSizeReport, "Create Size Reporter")
|
395
401
|
view_menu.append_separator
|
396
402
|
|
397
|
-
view_menu.append(
|
403
|
+
view_menu.append(ID::GridContent,
|
398
404
|
"Use a Grid for the Content Pane")
|
399
|
-
view_menu.append(
|
405
|
+
view_menu.append(ID::TextContent,
|
400
406
|
"Use a Text Control for the Content Pane")
|
401
|
-
view_menu.append(
|
407
|
+
view_menu.append(ID::HTMLContent,
|
402
408
|
"Use an HTML Control for the Content Pane")
|
403
|
-
view_menu.append(
|
409
|
+
view_menu.append(ID::TreeContent,
|
404
410
|
"Use a Tree Control for the Content Pane")
|
405
|
-
view_menu.append(
|
411
|
+
view_menu.append(ID::NotebookContent,
|
406
412
|
"Use a wxAuiNotebook control for the Content Pane")
|
407
|
-
view_menu.append(
|
413
|
+
view_menu.append(ID::SizeReportContent,
|
408
414
|
"Use a Size Reporter for the Content Pane")
|
409
415
|
|
410
416
|
options_menu = Wx::Menu.new
|
411
417
|
# Hints
|
412
|
-
options_menu.append_radio_item(
|
418
|
+
options_menu.append_radio_item(ID::TransparentHint,
|
413
419
|
"Transparent Hint")
|
414
|
-
options_menu.append_radio_item(
|
420
|
+
options_menu.append_radio_item(ID::VenetianBlindsHint,
|
415
421
|
"Venetian Blinds Hint")
|
416
|
-
options_menu.append_radio_item(
|
422
|
+
options_menu.append_radio_item(ID::RectangleHint,
|
417
423
|
"Rectangle Hint")
|
418
|
-
options_menu.append_radio_item(
|
424
|
+
options_menu.append_radio_item(ID::NoHint,
|
419
425
|
"No Hint")
|
420
426
|
|
421
427
|
options_menu.append_separator
|
422
428
|
# Hints Options
|
423
|
-
options_menu.append_check_item(
|
429
|
+
options_menu.append_check_item(ID::HintFade,
|
424
430
|
"Hint Fade-in")
|
425
|
-
options_menu.append_check_item(
|
431
|
+
options_menu.append_check_item(ID::AllowFloating,
|
426
432
|
"Allow Floating")
|
427
|
-
options_menu.append_check_item(
|
433
|
+
options_menu.append_check_item(ID::NoVenetianFade,
|
428
434
|
"Disable Venetian Blinds Hint Fade-in")
|
429
|
-
options_menu.append_check_item(
|
435
|
+
options_menu.append_check_item(ID::TransparentDrag,
|
430
436
|
"Transparent Drag")
|
431
|
-
options_menu.append_check_item(
|
437
|
+
options_menu.append_check_item(ID::AllowActivePane,
|
432
438
|
"Allow Active Pane")
|
433
439
|
options_menu.append_separator
|
434
|
-
options_menu.append_radio_item(
|
440
|
+
options_menu.append_radio_item(ID::NoGradient,
|
435
441
|
"No Caption Gradient")
|
436
|
-
options_menu.append_radio_item(
|
442
|
+
options_menu.append_radio_item(ID::VerticalGradient,
|
437
443
|
"Vertical Caption Gradient")
|
438
|
-
options_menu.append_radio_item(
|
444
|
+
options_menu.append_radio_item(ID::HorizontalGradient,
|
439
445
|
"Horizontal Caption Gradient")
|
440
446
|
options_menu.append_separator
|
441
|
-
options_menu.append(
|
447
|
+
options_menu.append(ID::Settings, "Settings Pane")
|
442
448
|
|
443
449
|
notebook_menu = Wx::Menu.new
|
444
|
-
notebook_menu.append_radio_item(
|
450
|
+
notebook_menu.append_radio_item(ID::NotebookArtGloss,
|
445
451
|
"Glossy Theme (Default)")
|
446
|
-
notebook_menu.append_radio_item(
|
452
|
+
notebook_menu.append_radio_item(ID::NotebookArtSimple,
|
447
453
|
"Simple Theme")
|
448
454
|
|
449
455
|
notebook_menu.append_separator
|
450
456
|
|
451
|
-
notebook_menu.append_radio_item(
|
457
|
+
notebook_menu.append_radio_item(ID::NotebookNoCloseButton,
|
452
458
|
"No Close Button")
|
453
|
-
notebook_menu.append_radio_item(
|
459
|
+
notebook_menu.append_radio_item(ID::NotebookCloseButton,
|
454
460
|
"Close Button at Right")
|
455
|
-
notebook_menu.append_radio_item(
|
461
|
+
notebook_menu.append_radio_item(ID::NotebookCloseButtonAll,
|
456
462
|
"Close Button on All Tabs")
|
457
|
-
notebook_menu.append_radio_item(
|
463
|
+
notebook_menu.append_radio_item(ID::NotebookCloseButtonActive,
|
458
464
|
"Close Button on Active Tab")
|
459
465
|
|
460
466
|
notebook_menu.append_separator
|
461
|
-
notebook_menu.append_check_item(
|
467
|
+
notebook_menu.append_check_item(ID::NotebookAllowTabMove,
|
462
468
|
"Allow Tab Move")
|
463
|
-
notebook_menu.append_check_item(
|
469
|
+
notebook_menu.append_check_item(ID::NotebookAllowTabExternalMove,
|
464
470
|
"Allow External Tab Move")
|
465
|
-
notebook_menu.append_check_item(
|
471
|
+
notebook_menu.append_check_item(ID::NotebookAllowTabSplit,
|
466
472
|
"Allow Notebook Split")
|
467
|
-
notebook_menu.append_check_item(
|
473
|
+
notebook_menu.append_check_item(ID::NotebookScrollButtons,
|
468
474
|
"Scroll Buttons Visible")
|
469
|
-
notebook_menu.append_check_item(
|
475
|
+
notebook_menu.append_check_item(ID::NotebookWindowList,
|
470
476
|
"Window List Button Visible")
|
471
|
-
notebook_menu.append_check_item(
|
477
|
+
notebook_menu.append_check_item(ID::NotebookTabFixedWidth,
|
472
478
|
"Fixed-width Tabs")
|
473
479
|
|
474
480
|
@perspectives_menu = Wx::Menu.new
|
475
|
-
@perspectives_menu.append(
|
481
|
+
@perspectives_menu.append(ID::CreatePerspective,
|
476
482
|
"Create Perspective")
|
477
|
-
@perspectives_menu.append(
|
483
|
+
@perspectives_menu.append(ID::CopyPerspectiveCode,
|
478
484
|
"Copy Perspective Data To Clipboard")
|
479
485
|
@perspectives_menu.append_separator
|
480
|
-
@perspectives_menu.append(
|
481
|
-
@perspectives_menu.append(
|
486
|
+
@perspectives_menu.append(ID::FirstPerspective + 0, "Default Startup")
|
487
|
+
@perspectives_menu.append(ID::FirstPerspective + 1, "All Panes")
|
482
488
|
|
483
489
|
help_menu = Wx::Menu.new
|
484
490
|
help_menu.append(Wx::ID_ABOUT, "About...")
|
@@ -494,201 +500,231 @@ class AuiFrame < Wx::Frame
|
|
494
500
|
end
|
495
501
|
|
496
502
|
def setup_events
|
497
|
-
evt_erase_background
|
498
|
-
evt_size
|
499
|
-
|
500
|
-
evt_menu(
|
501
|
-
evt_menu(
|
502
|
-
evt_menu(
|
503
|
-
evt_menu(
|
504
|
-
evt_menu(
|
505
|
-
evt_menu(
|
506
|
-
evt_menu(
|
507
|
-
evt_menu(
|
508
|
-
evt_menu(
|
509
|
-
evt_menu(
|
510
|
-
evt_menu(
|
511
|
-
evt_menu(
|
512
|
-
evt_menu(
|
513
|
-
evt_menu(
|
514
|
-
evt_menu(
|
515
|
-
evt_menu(
|
516
|
-
evt_menu(
|
517
|
-
evt_menu(
|
518
|
-
evt_menu(
|
519
|
-
evt_menu(
|
520
|
-
evt_menu(
|
521
|
-
evt_menu(
|
522
|
-
evt_menu(
|
523
|
-
evt_menu(
|
524
|
-
evt_menu(
|
525
|
-
evt_menu(
|
526
|
-
evt_menu(
|
527
|
-
evt_menu(
|
528
|
-
evt_menu(
|
529
|
-
evt_menu(
|
530
|
-
evt_menu(
|
531
|
-
evt_menu(
|
532
|
-
evt_menu(
|
533
|
-
evt_menu(
|
534
|
-
evt_menu(
|
535
|
-
evt_menu(
|
536
|
-
evt_menu(
|
537
|
-
evt_menu(
|
538
|
-
evt_menu(
|
503
|
+
evt_erase_background :on_erase_background
|
504
|
+
evt_size :on_size
|
505
|
+
|
506
|
+
evt_menu(ID::CreateTree) { |e| on_create_tree }
|
507
|
+
evt_menu(ID::CreateGrid) { |e| on_create_grid }
|
508
|
+
evt_menu(ID::CreateText) { |e| on_create_text }
|
509
|
+
evt_menu(ID::CreateHTML) { |e| on_create_html }
|
510
|
+
evt_menu(ID::CreateSizeReport) { |e| on_create_size_report }
|
511
|
+
evt_menu(ID::CreateNotebook) { |e| on_create_notebook }
|
512
|
+
evt_menu(ID::CreatePerspective) { |e| on_create_perspective }
|
513
|
+
evt_menu(ID::CopyPerspectiveCode) { |e| on_copy_perspective_code }
|
514
|
+
evt_menu(ID::AllowFloating, :on_manager_flag)
|
515
|
+
evt_menu(ID::TransparentHint, :on_manager_flag)
|
516
|
+
evt_menu(ID::VenetianBlindsHint, :on_manager_flag)
|
517
|
+
evt_menu(ID::RectangleHint, :on_manager_flag)
|
518
|
+
evt_menu(ID::NoHint, :on_manager_flag)
|
519
|
+
evt_menu(ID::HintFade, :on_manager_flag)
|
520
|
+
evt_menu(ID::NoVenetianFade, :on_manager_flag)
|
521
|
+
evt_menu(ID::TransparentDrag, :on_manager_flag)
|
522
|
+
evt_menu(ID::AllowActivePane, :on_manager_flag)
|
523
|
+
evt_menu(ID::NotebookTabFixedWidth, :on_notebook_flag)
|
524
|
+
evt_menu(ID::NotebookNoCloseButton, :on_notebook_flag)
|
525
|
+
evt_menu(ID::NotebookCloseButton, :on_notebook_flag)
|
526
|
+
evt_menu(ID::NotebookCloseButtonAll, :on_notebook_flag)
|
527
|
+
evt_menu(ID::NotebookCloseButtonActive, :on_notebook_flag)
|
528
|
+
evt_menu(ID::NotebookAllowTabMove, :on_notebook_flag)
|
529
|
+
evt_menu(ID::NotebookAllowTabExternalMove, :on_notebook_flag)
|
530
|
+
evt_menu(ID::NotebookAllowTabSplit, :on_notebook_flag)
|
531
|
+
evt_menu(ID::NotebookScrollButtons, :on_notebook_flag)
|
532
|
+
evt_menu(ID::NotebookWindowList, :on_notebook_flag)
|
533
|
+
evt_menu(ID::NotebookArtGloss, :on_notebook_flag)
|
534
|
+
evt_menu(ID::NotebookArtSimple, :on_notebook_flag)
|
535
|
+
evt_menu(ID::NoGradient, :on_gradient)
|
536
|
+
evt_menu(ID::VerticalGradient, :on_gradient)
|
537
|
+
evt_menu(ID::HorizontalGradient, :on_gradient)
|
538
|
+
evt_menu(ID::Settings) { on_settings }
|
539
|
+
evt_menu(ID::GridContent, :on_change_content_pane)
|
540
|
+
evt_menu(ID::TreeContent, :on_change_content_pane)
|
541
|
+
evt_menu(ID::TextContent, :on_change_content_pane)
|
542
|
+
evt_menu(ID::SizeReportContent, :on_change_content_pane)
|
543
|
+
evt_menu(ID::HTMLContent, :on_change_content_pane)
|
544
|
+
evt_menu(ID::NotebookContent, :on_change_content_pane)
|
545
|
+
evt_auitoolbar_tool_dropdown(ID::DropDownToolbarItem, :on_drop_down_toolbar_item)
|
539
546
|
evt_menu(Wx::ID_EXIT) { |e| on_exit }
|
540
547
|
evt_menu(Wx::ID_ABOUT) { |e| on_about }
|
541
|
-
evt_update_ui(
|
542
|
-
evt_update_ui(
|
543
|
-
evt_update_ui(
|
544
|
-
evt_update_ui(
|
545
|
-
evt_update_ui(
|
546
|
-
evt_update_ui(
|
547
|
-
evt_update_ui(
|
548
|
-
evt_update_ui(
|
549
|
-
evt_update_ui(
|
550
|
-
evt_update_ui(
|
551
|
-
evt_update_ui(
|
552
|
-
evt_update_ui(
|
553
|
-
evt_update_ui(
|
554
|
-
evt_update_ui(
|
555
|
-
evt_update_ui(
|
556
|
-
evt_update_ui(
|
557
|
-
evt_update_ui(
|
558
|
-
evt_update_ui(
|
559
|
-
evt_update_ui(
|
560
|
-
evt_update_ui(
|
561
|
-
evt_update_ui(
|
562
|
-
evt_menu_range(
|
563
|
-
|
564
|
-
@perspectives.length
|
565
|
-
evt_aui_pane_close
|
566
|
-
evt_auinotebook_page_close(Wx::ID_ANY
|
548
|
+
evt_update_ui(ID::NotebookTabFixedWidth, :on_update_ui)
|
549
|
+
evt_update_ui(ID::NotebookNoCloseButton, :on_update_ui)
|
550
|
+
evt_update_ui(ID::NotebookCloseButton, :on_update_ui)
|
551
|
+
evt_update_ui(ID::NotebookCloseButtonAll, :on_update_ui)
|
552
|
+
evt_update_ui(ID::NotebookCloseButtonActive, :on_update_ui)
|
553
|
+
evt_update_ui(ID::NotebookAllowTabMove, :on_update_ui)
|
554
|
+
evt_update_ui(ID::NotebookAllowTabExternalMove, :on_update_ui)
|
555
|
+
evt_update_ui(ID::NotebookAllowTabSplit, :on_update_ui)
|
556
|
+
evt_update_ui(ID::NotebookScrollButtons, :on_update_ui)
|
557
|
+
evt_update_ui(ID::NotebookWindowList, :on_update_ui)
|
558
|
+
evt_update_ui(ID::AllowFloating, :on_update_ui)
|
559
|
+
evt_update_ui(ID::TransparentHint, :on_update_ui)
|
560
|
+
evt_update_ui(ID::VenetianBlindsHint, :on_update_ui)
|
561
|
+
evt_update_ui(ID::RectangleHint, :on_update_ui)
|
562
|
+
evt_update_ui(ID::NoHint, :on_update_ui)
|
563
|
+
evt_update_ui(ID::HintFade, :on_update_ui)
|
564
|
+
evt_update_ui(ID::NoVenetianFade, :on_update_ui)
|
565
|
+
evt_update_ui(ID::TransparentDrag, :on_update_ui)
|
566
|
+
evt_update_ui(ID::NoGradient, :on_update_ui)
|
567
|
+
evt_update_ui(ID::VerticalGradient, :on_update_ui)
|
568
|
+
evt_update_ui(ID::HorizontalGradient, :on_update_ui)
|
569
|
+
evt_menu_range(ID::FirstPerspective,
|
570
|
+
ID::FirstPerspective +
|
571
|
+
@perspectives.length, :on_restore_perspective)
|
572
|
+
evt_aui_pane_close :on_pane_close
|
573
|
+
evt_auinotebook_page_close(Wx::ID_ANY, :on_notebook_page_close)
|
567
574
|
end
|
568
575
|
|
569
576
|
# create some toolbars
|
570
577
|
def setup_toolbars
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
+
# prepare a few custom overflow elements for the toolbars' overflow buttons
|
579
|
+
append_items = []
|
580
|
+
item = Wx::AUI::AuiToolBarItem.new
|
581
|
+
item.set_kind(Wx::ItemKind::ITEM_SEPARATOR)
|
582
|
+
append_items << item
|
583
|
+
item = Wx::AUI::AuiToolBarItem.new
|
584
|
+
item.set_kind(Wx::ItemKind::ITEM_NORMAL)
|
585
|
+
item.set_id(ID::CustomizeToolbar)
|
586
|
+
item.set_label('Customize...')
|
587
|
+
append_items << item
|
588
|
+
|
589
|
+
tb1 = Wx::AUI::AuiToolBar.new(self, Wx::ID_ANY,
|
590
|
+
Wx::DEFAULT_POSITION,
|
591
|
+
Wx::DEFAULT_SIZE,
|
592
|
+
Wx::AUI::AUI_TB_DEFAULT_STYLE | Wx::AUI::AUI_TB_OVERFLOW)
|
593
|
+
# tb1.set_tool_bitmap_size(Wx::Size.new(48, 48))
|
594
|
+
tb1.add_tool(ID::SampleItem+1, "Test",
|
595
|
+
Wx::ArtProvider::get_bitmap_bundle(Wx::ART_ERROR))
|
578
596
|
tb1.add_separator
|
579
|
-
tb1.add_tool(
|
580
|
-
Wx::ArtProvider::
|
581
|
-
tb1.add_tool(
|
582
|
-
Wx::ArtProvider::
|
583
|
-
tb1.add_tool(
|
584
|
-
Wx::ArtProvider::
|
585
|
-
tb1.add_tool(
|
586
|
-
Wx::ArtProvider::
|
597
|
+
tb1.add_tool(ID::SampleItem+2, "Test",
|
598
|
+
Wx::ArtProvider::get_bitmap_bundle(Wx::ART_QUESTION))
|
599
|
+
tb1.add_tool(ID::SampleItem+3, "Test",
|
600
|
+
Wx::ArtProvider::get_bitmap_bundle(Wx::ART_INFORMATION))
|
601
|
+
tb1.add_tool(ID::SampleItem+4, "Test",
|
602
|
+
Wx::ArtProvider::get_bitmap_bundle(Wx::ART_WARNING))
|
603
|
+
tb1.add_tool(ID::SampleItem+5, "Test",
|
604
|
+
Wx::ArtProvider::get_bitmap_bundle(Wx::ART_MISSING_IMAGE))
|
605
|
+
tb1.set_custom_overflow_items(nil, append_items)
|
587
606
|
tb1.realize
|
588
607
|
|
589
|
-
tb2 = Wx::
|
590
|
-
|
591
|
-
|
592
|
-
tb2.set_tool_bitmap_size(Wx::Size.new(16, 16))
|
593
|
-
|
594
|
-
tb2_bmp1 = Wx::ArtProvider::
|
595
|
-
|
596
|
-
|
597
|
-
tb2.add_tool(
|
598
|
-
tb2.add_tool(
|
599
|
-
tb2.add_tool(
|
600
|
-
tb2.add_tool(
|
608
|
+
tb2 = Wx::AUI::AuiToolBar.new(self, Wx::ID_ANY, Wx::DEFAULT_POSITION,
|
609
|
+
Wx::DEFAULT_SIZE,
|
610
|
+
Wx::AUI::AUI_TB_DEFAULT_STYLE | Wx::AUI::AUI_TB_OVERFLOW | Wx::AUI::AUI_TB_HORIZONTAL)
|
611
|
+
# tb2.set_tool_bitmap_size(Wx::Size.new(16, 16))
|
612
|
+
|
613
|
+
tb2_bmp1 = Wx::ArtProvider::get_bitmap_bundle(Wx::ART_QUESTION,
|
614
|
+
Wx::ART_OTHER,
|
615
|
+
Wx::Size.new(24, 24))
|
616
|
+
tb2.add_tool(ID::SampleItem+6, "Test", tb2_bmp1)
|
617
|
+
tb2.add_tool(ID::SampleItem+7, "Test", tb2_bmp1)
|
618
|
+
tb2.add_tool(ID::SampleItem+8, "Test", tb2_bmp1)
|
619
|
+
tb2.add_tool(ID::SampleItem+9, "Test", tb2_bmp1)
|
601
620
|
tb2.add_separator
|
602
|
-
tb2.add_tool(
|
603
|
-
tb2.add_tool(
|
621
|
+
tb2.add_tool(ID::SampleItem+10, "Test", tb2_bmp1)
|
622
|
+
tb2.add_tool(ID::SampleItem+11, "Test", tb2_bmp1)
|
604
623
|
tb2.add_separator
|
605
|
-
tb2.add_tool(
|
606
|
-
tb2.add_tool(
|
607
|
-
tb2.add_tool(
|
608
|
-
tb2.add_tool(
|
624
|
+
tb2.add_tool(ID::SampleItem+12, "Test", tb2_bmp1)
|
625
|
+
tb2.add_tool(ID::SampleItem+13, "Test", tb2_bmp1)
|
626
|
+
tb2.add_tool(ID::SampleItem+14, "Test", tb2_bmp1)
|
627
|
+
tb2.add_tool(ID::SampleItem+15, "Test", tb2_bmp1)
|
628
|
+
tb2.set_custom_overflow_items(nil, append_items)
|
629
|
+
tb2.enable_tool(ID::SampleItem+6, false)
|
609
630
|
tb2.realize
|
610
631
|
|
611
|
-
tb3 = Wx::
|
612
|
-
|
613
|
-
|
614
|
-
tb3.set_tool_bitmap_size(Wx::Size.new(16, 16))
|
615
|
-
tb3_bmp1 = Wx::ArtProvider::
|
616
|
-
|
617
|
-
|
618
|
-
tb3.add_tool(
|
619
|
-
tb3.add_tool(
|
620
|
-
tb3.add_tool(
|
621
|
-
tb3.add_tool(
|
632
|
+
tb3 = Wx::AUI::AuiToolBar.new(self, Wx::ID_ANY,
|
633
|
+
Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
|
634
|
+
Wx::AUI::AUI_TB_DEFAULT_STYLE | Wx::AUI::AUI_TB_OVERFLOW)
|
635
|
+
# tb3.set_tool_bitmap_size(Wx::Size.new(16, 16))
|
636
|
+
tb3_bmp1 = Wx::ArtProvider::get_bitmap_bundle(Wx::ART_FOLDER,
|
637
|
+
Wx::ART_OTHER,
|
638
|
+
Wx::Size.new(16, 16))
|
639
|
+
tb3.add_tool(ID::SampleItem+16, "Check 1", tb3_bmp1, "Check 1", Wx::ItemKind::ITEM_CHECK)
|
640
|
+
tb3.add_tool(ID::SampleItem+17, "Check 2", tb3_bmp1, "Check 2", Wx::ItemKind::ITEM_CHECK)
|
641
|
+
tb3.add_tool(ID::SampleItem+18, "Check 3", tb3_bmp1, "Check 3", Wx::ItemKind::ITEM_CHECK)
|
642
|
+
tb3.add_tool(ID::SampleItem+19, "Check 4", tb3_bmp1, "Check 4", Wx::ItemKind::ITEM_CHECK)
|
643
|
+
tb3.add_separator
|
644
|
+
tb3.add_tool(ID::SampleItem+20, "Radio 1", tb3_bmp1, "Radio 1", Wx::ItemKind::ITEM_RADIO)
|
645
|
+
tb3.add_tool(ID::SampleItem+21, "Radio 2", tb3_bmp1, "Radio 2", Wx::ItemKind::ITEM_RADIO)
|
646
|
+
tb3.add_tool(ID::SampleItem+22, "Radio 3", tb3_bmp1, "Radio 3", Wx::ItemKind::ITEM_RADIO)
|
622
647
|
tb3.add_separator
|
623
|
-
tb3.add_tool(
|
624
|
-
tb3.add_tool(
|
648
|
+
tb3.add_tool(ID::SampleItem+23, "Radio 1 (Group 2)", tb3_bmp1, "Radio 1 (Group 2)", Wx::ItemKind::ITEM_RADIO)
|
649
|
+
tb3.add_tool(ID::SampleItem+24, "Radio 2 (Group 2)", tb3_bmp1, "Radio 2 (Group 2)", Wx::ItemKind::ITEM_RADIO)
|
650
|
+
tb3.add_tool(ID::SampleItem+25, "Radio 3 (Group 2)", tb3_bmp1, "Radio 3 (Group 2)", Wx::ItemKind::ITEM_RADIO)
|
651
|
+
tb3.set_custom_overflow_items(nil, append_items)
|
625
652
|
tb3.realize
|
626
653
|
|
627
|
-
tb4 = Wx::
|
628
|
-
|
629
|
-
|
630
|
-
tb4.set_tool_bitmap_size(Wx::Size.new(16, 16))
|
631
|
-
tb4_bmp1 = Wx::ArtProvider::
|
632
|
-
|
633
|
-
|
634
|
-
tb4.add_tool(
|
635
|
-
tb4.add_tool(
|
636
|
-
tb4.
|
637
|
-
tb4.add_tool(
|
654
|
+
tb4 = Wx::AUI::AuiToolBar.new(self, Wx::ID_ANY,
|
655
|
+
Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
|
656
|
+
Wx::AUI::AUI_TB_DEFAULT_STYLE | Wx::AUI::AUI_TB_OVERFLOW | Wx::AUI::AUI_TB_TEXT | Wx::AUI::AUI_TB_HORZ_TEXT)
|
657
|
+
# tb4.set_tool_bitmap_size(Wx::Size.new(16, 16))
|
658
|
+
tb4_bmp1 = Wx::ArtProvider::get_bitmap_bundle(Wx::ART_NORMAL_FILE,
|
659
|
+
Wx::ART_OTHER,
|
660
|
+
Wx::Size.new(16, 16))
|
661
|
+
tb4.add_tool(ID::DropDownToolbarItem, "Item 1", tb4_bmp1)
|
662
|
+
tb4.add_tool(ID::SampleItem+23, "Item 2", tb4_bmp1)
|
663
|
+
tb4.set_tool_sticky(ID::SampleItem+23, true)
|
664
|
+
tb4.add_tool(ID::SampleItem+24, "Item 3", tb4_bmp1)
|
665
|
+
tb4.enable_tool(ID::SampleItem+24, false)
|
666
|
+
tb4.add_tool(ID::SampleItem+25, "Item 4", tb4_bmp1)
|
638
667
|
tb4.add_separator
|
639
|
-
tb4.add_tool(
|
640
|
-
tb4.add_tool(
|
641
|
-
tb4.add_tool(
|
642
|
-
tb4.add_tool(
|
668
|
+
tb4.add_tool(ID::SampleItem+26, "Item 5", tb4_bmp1)
|
669
|
+
tb4.add_tool(ID::SampleItem+27, "Item 6", tb4_bmp1)
|
670
|
+
tb4.add_tool(ID::SampleItem+28, "Item 7", tb4_bmp1)
|
671
|
+
tb4.add_tool(ID::SampleItem+29, "Item 8", tb4_bmp1)
|
672
|
+
tb4.set_tool_drop_down(ID::DropDownToolbarItem, true)
|
673
|
+
tb4.set_custom_overflow_items(nil, append_items)
|
674
|
+
choice = Wx::Choice.new(tb4, ID::SampleItem+35)
|
675
|
+
choice.append('One choice')
|
676
|
+
choice.append('Another choice')
|
677
|
+
tb4.add_control(choice)
|
643
678
|
tb4.realize
|
644
679
|
|
645
680
|
# create some toolbars
|
646
|
-
tb5 = Wx::
|
647
|
-
|
648
|
-
|
649
|
-
tb5.set_tool_bitmap_size(Wx::Size.new(48, 48))
|
650
|
-
tb5.add_tool(
|
651
|
-
Wx::ArtProvider::
|
681
|
+
tb5 = Wx::AUI::AuiToolBar.new(self, Wx::ID_ANY,
|
682
|
+
Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
|
683
|
+
Wx::AUI::AUI_TB_DEFAULT_STYLE | Wx::AUI::AUI_TB_OVERFLOW | Wx::AUI::AUI_TB_VERTICAL)
|
684
|
+
# tb5.set_tool_bitmap_size(Wx::Size.new(48, 48))
|
685
|
+
tb5.add_tool(ID::SampleItem+30, "Test",
|
686
|
+
Wx::ArtProvider::get_bitmap_bundle(Wx::ART_ERROR))
|
652
687
|
tb5.add_separator
|
653
|
-
tb5.add_tool(
|
654
|
-
Wx::ArtProvider::
|
655
|
-
tb5.add_tool(
|
656
|
-
Wx::ArtProvider::
|
657
|
-
tb5.add_tool(
|
658
|
-
Wx::ArtProvider::
|
659
|
-
tb5.add_tool(
|
660
|
-
Wx::ArtProvider::
|
688
|
+
tb5.add_tool(ID::SampleItem+31, "Test",
|
689
|
+
Wx::ArtProvider::get_bitmap_bundle(Wx::ART_QUESTION))
|
690
|
+
tb5.add_tool(ID::SampleItem+32, "Test",
|
691
|
+
Wx::ArtProvider::get_bitmap_bundle(Wx::ART_INFORMATION))
|
692
|
+
tb5.add_tool(ID::SampleItem+33, "Test",
|
693
|
+
Wx::ArtProvider::get_bitmap_bundle(Wx::ART_WARNING))
|
694
|
+
tb5.add_tool(ID::SampleItem+34, "Test",
|
695
|
+
Wx::ArtProvider::get_bitmap_bundle(Wx::ART_MISSING_IMAGE))
|
696
|
+
tb5.set_custom_overflow_items(nil, append_items)
|
661
697
|
tb5.realize
|
662
698
|
|
663
699
|
# add the toolbars to the manager
|
664
700
|
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)
|
701
|
+
pi.set_name('tb1').set_caption("Big Toolbar").toolbar_pane.top
|
702
|
+
# pi.top.set_left_dockable(false).set_right_dockable(false)
|
667
703
|
@mgr.add_pane(tb1, pi)
|
668
704
|
|
669
705
|
pi = Wx::AuiPaneInfo.new
|
670
|
-
pi.set_name('tb2').set_caption("Toolbar 2").toolbar_pane
|
671
|
-
pi.
|
672
|
-
pi.set_left_dockable(false).set_right_dockable(false)
|
706
|
+
pi.set_name('tb2').set_caption("Toolbar 2 (horizontal)").toolbar_pane.top.set_row(1)
|
707
|
+
# pi.set_left_dockable(false).set_right_dockable(false)
|
673
708
|
@mgr.add_pane(tb2, pi)
|
674
709
|
|
675
710
|
pi = Wx::AuiPaneInfo.new
|
676
|
-
pi.set_name('tb3').set_caption("Toolbar 3").toolbar_pane
|
677
|
-
pi.
|
678
|
-
pi.set_left_dockable(false).set_right_dockable(false)
|
711
|
+
pi.set_name('tb3').set_caption("Toolbar 3").toolbar_pane.top.set_row(1).set_position(1)
|
712
|
+
# pi.set_left_dockable(false).set_right_dockable(false)
|
679
713
|
@mgr.add_pane(tb3, pi)
|
680
714
|
|
681
715
|
pi = Wx::AuiPaneInfo.new
|
682
|
-
pi.set_name('tb4').set_caption("Sample Bookmark Toolbar")
|
683
|
-
pi.
|
684
|
-
pi.set_left_dockable(false).set_right_dockable(false)
|
716
|
+
pi.set_name('tb4').set_caption("Sample Bookmark Toolbar").toolbar_pane.top.set_row(2)
|
717
|
+
# pi.set_left_dockable(false).set_right_dockable(false)
|
685
718
|
@mgr.add_pane(tb4, pi)
|
686
719
|
|
687
720
|
pi = Wx::AuiPaneInfo.new
|
688
|
-
pi.set_name('tb5').set_caption("Sample Vertical Toolbar")
|
689
|
-
pi.
|
690
|
-
pi.set_left_dockable(false).set_right_dockable(false)
|
721
|
+
pi.set_name('tb5').set_caption("Sample Vertical Toolbar").toolbar_pane.left.set_gripper_top
|
722
|
+
# pi.set_left_dockable(false).set_right_dockable(false)
|
691
723
|
@mgr.add_pane(tb5, pi)
|
724
|
+
|
725
|
+
@mgr.add_pane(Wx::Button.new(self, label: 'Test Button'),
|
726
|
+
Wx::AUI::AuiPaneInfo.new.set_name('tb6').toolbar_pane.top.set_row(2).set_position(1)
|
727
|
+
.set_left_dockable(false).set_right_dockable(false))
|
692
728
|
end
|
693
729
|
|
694
730
|
def setup_panes
|
@@ -780,12 +816,6 @@ class AuiFrame < Wx::Frame
|
|
780
816
|
pi = Wx::AuiPaneInfo.new
|
781
817
|
pi.set_name('notebook_content').center_pane.hide
|
782
818
|
@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
819
|
end
|
790
820
|
|
791
821
|
# make some default perspectives
|
@@ -834,11 +864,11 @@ class AuiFrame < Wx::Frame
|
|
834
864
|
def on_gradient(event)
|
835
865
|
gradient = nil
|
836
866
|
case event.get_id
|
837
|
-
when
|
867
|
+
when ID::NoGradient
|
838
868
|
gradient = Wx::AUI_GRADIENT_NONE
|
839
|
-
when
|
869
|
+
when ID::VerticalGradient
|
840
870
|
gradient = Wx::AUI_GRADIENT_VERTICAL
|
841
|
-
when
|
871
|
+
when ID::HorizontalGradient
|
842
872
|
gradient = Wx::AUI_GRADIENT_HORIZONTAL
|
843
873
|
end
|
844
874
|
return if not gradient
|
@@ -849,10 +879,10 @@ class AuiFrame < Wx::Frame
|
|
849
879
|
|
850
880
|
def on_manager_flag(event)
|
851
881
|
e_id = event.get_id
|
852
|
-
if e_id ==
|
853
|
-
e_id ==
|
854
|
-
e_id ==
|
855
|
-
e_id ==
|
882
|
+
if e_id == ID::TransparentHint or
|
883
|
+
e_id == ID::VenetianBlindsHint or
|
884
|
+
e_id == ID::RectangleHint or
|
885
|
+
e_id == ID::NoHint
|
856
886
|
flags = @mgr.get_flags
|
857
887
|
flags &= ~Wx::AUI_MGR_TRANSPARENT_HINT
|
858
888
|
flags &= ~Wx::AUI_MGR_VENETIAN_BLINDS_HINT
|
@@ -862,21 +892,21 @@ class AuiFrame < Wx::Frame
|
|
862
892
|
|
863
893
|
flag = nil
|
864
894
|
case e_id
|
865
|
-
when
|
895
|
+
when ID::AllowFloating
|
866
896
|
flag = Wx::AUI_MGR_ALLOW_FLOATING
|
867
|
-
when
|
897
|
+
when ID::TransparentDrag
|
868
898
|
flag = Wx::AUI_MGR_TRANSPARENT_DRAG
|
869
|
-
when
|
899
|
+
when ID::HintFade
|
870
900
|
flag = Wx::AUI_MGR_HINT_FADE
|
871
|
-
when
|
901
|
+
when ID::NoVenetianFade
|
872
902
|
flag = Wx::AUI_MGR_NO_VENETIAN_BLINDS_FADE
|
873
|
-
when
|
903
|
+
when ID::AllowActivePane
|
874
904
|
flag = Wx::AUI_MGR_ALLOW_ACTIVE_PANE
|
875
|
-
when
|
905
|
+
when ID::TransparentHint
|
876
906
|
flag = Wx::AUI_MGR_TRANSPARENT_HINT
|
877
|
-
when
|
907
|
+
when ID::VenetianBlindsHint
|
878
908
|
flag = Wx::AUI_MGR_VENETIAN_BLINDS_HINT
|
879
|
-
when
|
909
|
+
when ID::RectangleHint
|
880
910
|
flag = Wx::AUI_MGR_RECTANGLE_HINT
|
881
911
|
end
|
882
912
|
|
@@ -890,49 +920,49 @@ class AuiFrame < Wx::Frame
|
|
890
920
|
def on_notebook_flag(event)
|
891
921
|
e_id = event.get_id
|
892
922
|
|
893
|
-
if e_id ==
|
894
|
-
e_id ==
|
895
|
-
e_id ==
|
896
|
-
e_id ==
|
923
|
+
if e_id == ID::NotebookNoCloseButton or
|
924
|
+
e_id == ID::NotebookCloseButton or
|
925
|
+
e_id == ID::NotebookCloseButtonAll or
|
926
|
+
e_id == ID::NotebookCloseButtonActive
|
897
927
|
@notebook_style &= ~(Wx::AUI_NB_CLOSE_BUTTON |
|
898
928
|
Wx::AUI_NB_CLOSE_ON_ACTIVE_TAB |
|
899
929
|
Wx::AUI_NB_CLOSE_ON_ALL_TABS)
|
900
930
|
end
|
901
931
|
|
902
932
|
case e_id
|
903
|
-
when
|
933
|
+
when ID::NotebookNoCloseButton
|
904
934
|
# nothing
|
905
|
-
when
|
935
|
+
when ID::NotebookCloseButton
|
906
936
|
@notebook_style |= Wx::AUI_NB_CLOSE_BUTTON
|
907
|
-
when
|
937
|
+
when ID::NotebookCloseButtonAll
|
908
938
|
@notebook_style |= Wx::AUI_NB_CLOSE_ON_ALL_TABS
|
909
|
-
when
|
939
|
+
when ID::NotebookCloseButtonActive
|
910
940
|
@notebook_style |= Wx::AUI_NB_CLOSE_ON_ACTIVE_TAB
|
911
941
|
end
|
912
942
|
|
913
|
-
if e_id ==
|
943
|
+
if e_id == ID::NotebookAllowTabMove
|
914
944
|
@notebook_style ^= Wx::AUI_NB_TAB_MOVE
|
915
945
|
end
|
916
946
|
|
917
|
-
if e_id ==
|
947
|
+
if e_id == ID::NotebookAllowTabExternalMove
|
918
948
|
@notebook_style ^= Wx::AUI_NB_TAB_EXTERNAL_MOVE
|
919
|
-
elsif e_id ==
|
949
|
+
elsif e_id == ID::NotebookAllowTabSplit
|
920
950
|
@notebook_style ^= Wx::AUI_NB_TAB_SPLIT
|
921
|
-
elsif e_id ==
|
951
|
+
elsif e_id == ID::NotebookWindowList
|
922
952
|
@notebook_style ^= Wx::AUI_NB_WINDOWLIST_BUTTON
|
923
|
-
elsif e_id ==
|
953
|
+
elsif e_id == ID::NotebookScrollButtons
|
924
954
|
@notebook_style ^= Wx::AUI_NB_SCROLL_BUTTONS
|
925
|
-
elsif e_id ==
|
955
|
+
elsif e_id == ID::NotebookTabFixedWidth
|
926
956
|
@notebook_style ^= Wx::AUI_NB_TAB_FIXED_WIDTH
|
927
957
|
end
|
928
958
|
|
929
959
|
@mgr.each_pane do |pane|
|
930
960
|
maybe_nb = pane.window
|
931
961
|
next unless maybe_nb.kind_of?(Wx::AuiNotebook)
|
932
|
-
if e_id ==
|
962
|
+
if e_id == ID::NotebookArtGloss
|
933
963
|
maybe_nb.use_default_art
|
934
964
|
@notebook_theme = 0
|
935
|
-
elsif e_id ==
|
965
|
+
elsif e_id == ID::NotebookArtSimple
|
936
966
|
maybe_nb.use_simple_art
|
937
967
|
@notebook_theme = 1
|
938
968
|
end
|
@@ -946,56 +976,56 @@ class AuiFrame < Wx::Frame
|
|
946
976
|
flags = @mgr.get_flags
|
947
977
|
|
948
978
|
case event.get_id
|
949
|
-
when
|
979
|
+
when ID::NoGradient
|
950
980
|
event.check(@mgr.get_art_provider.get_metric(Wx::AUI_DOCKART_GRADIENT_TYPE) == Wx::AUI_GRADIENT_NONE)
|
951
|
-
when
|
981
|
+
when ID::VerticalGradient
|
952
982
|
event.check(@mgr.get_art_provider.get_metric(Wx::AUI_DOCKART_GRADIENT_TYPE) == Wx::AUI_GRADIENT_VERTICAL)
|
953
|
-
when
|
983
|
+
when ID::HorizontalGradient
|
954
984
|
event.check(@mgr.get_art_provider.get_metric(Wx::AUI_DOCKART_GRADIENT_TYPE) == Wx::AUI_GRADIENT_HORIZONTAL)
|
955
|
-
when
|
985
|
+
when ID::AllowFloating
|
956
986
|
event.check((flags & Wx::AUI_MGR_ALLOW_FLOATING) != 0)
|
957
|
-
when
|
987
|
+
when ID::TransparentDrag
|
958
988
|
event.check((flags & Wx::AUI_MGR_TRANSPARENT_DRAG) != 0)
|
959
|
-
when
|
989
|
+
when ID::TransparentHint
|
960
990
|
event.check((flags & Wx::AUI_MGR_TRANSPARENT_HINT) != 0)
|
961
|
-
when
|
991
|
+
when ID::VenetianBlindsHint
|
962
992
|
event.check((flags & Wx::AUI_MGR_VENETIAN_BLINDS_HINT) != 0)
|
963
|
-
when
|
993
|
+
when ID::RectangleHint
|
964
994
|
event.check((flags & Wx::AUI_MGR_RECTANGLE_HINT) != 0)
|
965
|
-
when
|
995
|
+
when ID::NoHint
|
966
996
|
event.check((Wx::AUI_MGR_TRANSPARENT_HINT |
|
967
997
|
Wx::AUI_MGR_VENETIAN_BLINDS_HINT |
|
968
998
|
Wx::AUI_MGR_RECTANGLE_HINT) & flags == 0)
|
969
|
-
when
|
999
|
+
when ID::HintFade
|
970
1000
|
event.check((flags & Wx::AUI_MGR_HINT_FADE) != 0)
|
971
|
-
when
|
1001
|
+
when ID::NoVenetianFade
|
972
1002
|
event.check((flags & Wx::AUI_MGR_NO_VENETIAN_BLINDS_FADE) != 0)
|
973
|
-
when
|
1003
|
+
when ID::NotebookNoCloseButton
|
974
1004
|
event.check((@notebook_style &
|
975
1005
|
(Wx::AUI_NB_CLOSE_BUTTON |
|
976
1006
|
Wx::AUI_NB_CLOSE_ON_ALL_TABS |
|
977
1007
|
Wx::AUI_NB_CLOSE_ON_ACTIVE_TAB)) != 0)
|
978
|
-
when
|
1008
|
+
when ID::NotebookCloseButton
|
979
1009
|
event.check((@notebook_style & Wx::AUI_NB_CLOSE_BUTTON) != 0)
|
980
|
-
when
|
1010
|
+
when ID::NotebookCloseButtonAll
|
981
1011
|
event.check((@notebook_style & Wx::AUI_NB_CLOSE_ON_ALL_TABS) != 0)
|
982
|
-
when
|
1012
|
+
when ID::NotebookCloseButtonActive
|
983
1013
|
event.check((@notebook_style & Wx::AUI_NB_CLOSE_ON_ACTIVE_TAB) != 0)
|
984
|
-
when
|
1014
|
+
when ID::NotebookAllowTabSplit
|
985
1015
|
event.check((@notebook_style & Wx::AUI_NB_TAB_SPLIT) != 0)
|
986
|
-
when
|
1016
|
+
when ID::NotebookAllowTabMove
|
987
1017
|
event.check((@notebook_style & Wx::AUI_NB_TAB_MOVE) != 0)
|
988
|
-
when
|
1018
|
+
when ID::NotebookAllowTabExternalMove
|
989
1019
|
event.check((@notebook_style & Wx::AUI_NB_TAB_EXTERNAL_MOVE) != 0)
|
990
|
-
when
|
1020
|
+
when ID::NotebookScrollButtons
|
991
1021
|
event.check((@notebook_style & Wx::AUI_NB_SCROLL_BUTTONS) != 0)
|
992
|
-
when
|
1022
|
+
when ID::NotebookWindowList
|
993
1023
|
event.check((@notebook_style & Wx::AUI_NB_WINDOWLIST_BUTTON) != 0)
|
994
|
-
when
|
1024
|
+
when ID::NotebookTabFixedWidth
|
995
1025
|
event.check((@notebook_style & Wx::AUI_NB_TAB_FIXED_WIDTH) != 0)
|
996
|
-
when
|
1026
|
+
when ID::NotebookArtGloss
|
997
1027
|
event.check(@notebook_style == 0)
|
998
|
-
when
|
1028
|
+
when ID::NotebookArtSimple
|
999
1029
|
event.check(@notebook_style == 1)
|
1000
1030
|
end
|
1001
1031
|
end
|
@@ -1019,7 +1049,7 @@ class AuiFrame < Wx::Frame
|
|
1019
1049
|
if @perspectives.length.zero?
|
1020
1050
|
@perspectives_menu.append_separator
|
1021
1051
|
end
|
1022
|
-
@perspectives_menu.append(
|
1052
|
+
@perspectives_menu.append(ID::FirstPerspective + @perspectives.length,
|
1023
1053
|
dlg.get_value)
|
1024
1054
|
@perspectives << @mgr.save_perspective
|
1025
1055
|
end
|
@@ -1030,7 +1060,7 @@ class AuiFrame < Wx::Frame
|
|
1030
1060
|
end
|
1031
1061
|
|
1032
1062
|
def on_restore_perspective(event)
|
1033
|
-
perspective = @perspectives[event.get_id -
|
1063
|
+
perspective = @perspectives[event.get_id - ID::FirstPerspective]
|
1034
1064
|
@mgr.load_perspective(perspective)
|
1035
1065
|
end
|
1036
1066
|
|
@@ -1108,15 +1138,54 @@ class AuiFrame < Wx::Frame
|
|
1108
1138
|
|
1109
1139
|
def on_change_content_pane(event)
|
1110
1140
|
e_id = event.get_id
|
1111
|
-
@mgr.get_pane("
|
1112
|
-
@mgr.get_pane("text_content").show(e_id ==
|
1113
|
-
@mgr.get_pane("tree_content").show(e_id ==
|
1114
|
-
@mgr.get_pane("sizereport_content").show(e_id ==
|
1115
|
-
@mgr.get_pane("html_content").show(e_id ==
|
1116
|
-
@mgr.get_pane("notebook_content").show(e_id ==
|
1141
|
+
@mgr.get_pane("grID::content").show(e_id == ID::GridContent)
|
1142
|
+
@mgr.get_pane("text_content").show(e_id == ID::TextContent)
|
1143
|
+
@mgr.get_pane("tree_content").show(e_id == ID::TreeContent)
|
1144
|
+
@mgr.get_pane("sizereport_content").show(e_id == ID::SizeReportContent)
|
1145
|
+
@mgr.get_pane("html_content").show(e_id == ID::HTMLContent)
|
1146
|
+
@mgr.get_pane("notebook_content").show(e_id == ID::NotebookContent)
|
1117
1147
|
@mgr.update
|
1118
1148
|
end
|
1119
1149
|
|
1150
|
+
def on_drop_down_toolbar_item(evt)
|
1151
|
+
if evt.is_drop_down_clicked
|
1152
|
+
tb = evt.get_event_object
|
1153
|
+
|
1154
|
+
tb.set_tool_sticky(evt.id, true)
|
1155
|
+
|
1156
|
+
# create the popup menu
|
1157
|
+
menuPopup = Wx::Menu.new
|
1158
|
+
|
1159
|
+
bmp = Wx::ArtProvider.get_bitmap_bundle(Wx::ART_QUESTION, Wx::ART_OTHER, from_dip(Wx::Size.new(16,16)))
|
1160
|
+
|
1161
|
+
m1 = Wx::MenuItem.new(menuPopup, 10001, 'Drop Down Item 1')
|
1162
|
+
m1.set_bitmap(bmp)
|
1163
|
+
menuPopup.append(m1)
|
1164
|
+
|
1165
|
+
m2 = Wx::MenuItem.new(menuPopup, 10002, 'Drop Down Item 2')
|
1166
|
+
m2.set_bitmap(bmp)
|
1167
|
+
menuPopup.append(m2)
|
1168
|
+
|
1169
|
+
m3 = Wx::MenuItem.new(menuPopup, 10003, 'Drop Down Item 3')
|
1170
|
+
m3.set_bitmap(bmp)
|
1171
|
+
menuPopup.append(m3)
|
1172
|
+
|
1173
|
+
m4 = Wx::MenuItem.new(menuPopup, 10004, 'Drop Down Item 4')
|
1174
|
+
m4.set_bitmap(bmp)
|
1175
|
+
menuPopup.append(m4)
|
1176
|
+
|
1177
|
+
# line up our menu with the button
|
1178
|
+
rect = tb.get_tool_rect(evt.id)
|
1179
|
+
pt = tb.client_to_screen(rect.bottom_left)
|
1180
|
+
pt = screen_to_client(pt)
|
1181
|
+
|
1182
|
+
popup_menu(menuPopup, pt)
|
1183
|
+
|
1184
|
+
# make sure the button is "un-stuck"
|
1185
|
+
tb.set_tool_sticky(evt.id, false)
|
1186
|
+
end
|
1187
|
+
end
|
1188
|
+
|
1120
1189
|
def on_exit
|
1121
1190
|
close(true)
|
1122
1191
|
end
|