gtk_paradise 0.9.120 → 0.11.19
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of gtk_paradise might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +4521 -2997
- data/bin/genity +26 -0
- data/bin/gtk_editor +7 -0
- data/doc/README.gen +4484 -2975
- data/doc/todo/TODO_FOR_THE_GTK_PARADISE_PROJECT.md +281 -218
- data/doc/todo/recurring_todo_tasks.md +4 -3
- data/gtk_paradise.gemspec +28 -17
- data/lib/gtk_paradise/app/app.rb +77 -45
- data/lib/gtk_paradise/app/{app_module.rb → app_module/app_module.rb} +1064 -899
- data/lib/gtk_paradise/base_module/base_module.rb +7043 -33
- data/lib/gtk_paradise/base_module/class_methods/class_methods.rb +0 -0
- data/lib/gtk_paradise/base_module/css.rb +200 -268
- data/lib/gtk_paradise/base_module/experimental.rb +119 -0
- data/lib/gtk_paradise/base_module/html_support.rb +40 -15
- data/lib/gtk_paradise/base_module/these_methods_work_for_gtk3_and_gtk4.rb +155 -0
- data/lib/gtk_paradise/base_module_and_app_module/base_module_and_app_module.rb +1 -1
- data/lib/gtk_paradise/colours/colour_palette/material_design.rb +239 -0
- data/lib/gtk_paradise/colours/gtk_colour_constants.rb +8 -2
- data/lib/gtk_paradise/colours/parse.rb +8 -1
- data/lib/gtk_paradise/commandline/commandline.rb +20 -19
- data/lib/gtk_paradise/constants/constants.rb +227 -7
- data/lib/gtk_paradise/css_files/borders.css +81 -0
- data/lib/gtk_paradise/css_files/colours.css +329 -328
- data/lib/gtk_paradise/css_files/css_accordion.css +6 -2
- data/lib/gtk_paradise/css_files/hover_effects.css +588 -0
- data/lib/gtk_paradise/css_files/project.css +153 -189
- data/lib/gtk_paradise/drawing/README.md +3 -0
- data/lib/gtk_paradise/drawing/drawing.rb +68 -0
- data/lib/gtk_paradise/{base_module/colours.rb → drawing/event.rb} +37 -45
- data/lib/gtk_paradise/drawing/star.rb +96 -0
- data/lib/gtk_paradise/drawing/tool.rb +268 -0
- data/lib/gtk_paradise/drawing/turtle.rb +138 -0
- data/lib/gtk_paradise/emojis/emojis.rb +14 -13
- data/lib/gtk_paradise/examples/advanced/001_5x5_grid_example.rb +35 -50
- data/lib/gtk_paradise/examples/advanced/002_advanced_drag_and_drop_example.rb +21 -13
- data/lib/gtk_paradise/examples/advanced/003_html_like_support.rb +4 -25
- data/lib/gtk_paradise/examples/advanced/004_on_hover_example_on_gtk_entry.rb +4 -4
- data/lib/gtk_paradise/examples/advanced/005_csv_example.rb +6 -2
- data/lib/gtk_paradise/examples/advanced/007_label_responding_to_events_example.rb +1 -10
- data/lib/gtk_paradise/examples/advanced/008_options_example.rb +6 -3
- data/lib/gtk_paradise/examples/advanced/009_key_events.rb +1 -1
- data/lib/gtk_paradise/examples/advanced/010_extensive_text_view_example.rb +18 -17
- data/lib/gtk_paradise/examples/advanced/011_moving_blocks_example.rb +3 -3
- data/lib/gtk_paradise/examples/advanced/012_cell_data_sorting_example.rb +3 -4
- data/lib/gtk_paradise/examples/advanced/013_advanced_css_example.rb +86 -49
- data/lib/gtk_paradise/examples/advanced/014_popup_example.rb +9 -9
- data/lib/gtk_paradise/examples/advanced/015_advanced_button_example.rb +7 -19
- data/lib/gtk_paradise/examples/advanced/017_lean_CSS_example.rb +10 -13
- data/lib/gtk_paradise/examples/advanced/018_coloured_text_example.rb +7 -13
- data/lib/gtk_paradise/examples/advanced/019_gtk_entry_showing_the_cursor_position.rb +1 -1
- data/lib/gtk_paradise/examples/advanced/020_scale_this_image.rb +1 -10
- data/lib/gtk_paradise/examples/advanced/021_scroll_events_on_gtk_entry.rb +4 -0
- data/lib/gtk_paradise/examples/advanced/022_autogenerated_CSS_rounded_borders.rb +142 -0
- data/lib/gtk_paradise/examples/advanced/023_append_image_to_buffer.rb +145 -0
- data/lib/gtk_paradise/examples/advanced/024_notebook_with_tab_example.rb +151 -0
- data/lib/gtk_paradise/examples/advanced/025_showing_a_gold_caret_on_black_background.rb +144 -0
- data/lib/gtk_paradise/examples/advanced/026_status_bar_example.rb +153 -0
- data/lib/gtk_paradise/examples/advanced/027_customized_frame_example.rb +141 -0
- data/lib/gtk_paradise/examples/advanced/028_widgets_described_in_a_yaml_file.rb +240 -0
- data/lib/gtk_paradise/examples/cairo/basic_cairo_shapes.rb +1 -1
- data/lib/gtk_paradise/examples/cairo/cairo_transparent_rectangles.rb +9 -5
- data/lib/gtk_paradise/examples/cairo/cairo_write_via_custom_font.rb +81 -0
- data/lib/gtk_paradise/examples/cairo/donut_shape.rb +19 -6
- data/lib/gtk_paradise/examples/cairo/ping_pong_game.rb +2 -3
- data/lib/gtk_paradise/examples/controller/README.md +4 -0
- data/lib/gtk_paradise/examples/controller/controller.rb +2 -0
- data/lib/gtk_paradise/examples/css/001_border_examples.rb +30 -13
- data/lib/gtk_paradise/examples/css/002_import_CSS_file.rb +10 -5
- data/lib/gtk_paradise/examples/drawing/001_example.rb +61 -0
- data/lib/gtk_paradise/examples/drawing/002_example.rb +51 -0
- data/lib/gtk_paradise/examples/drawing/003_example.rb +38 -0
- data/lib/gtk_paradise/examples/drawing/004_example.rb +36 -0
- data/lib/gtk_paradise/examples/drawing/005_example.rb +92 -0
- data/lib/gtk_paradise/examples/drawing/006_example.rb +58 -0
- data/lib/gtk_paradise/examples/drawing/007_example.rb +22 -0
- data/lib/gtk_paradise/examples/drawing/008_example.rb +43 -0
- data/lib/gtk_paradise/examples/drawing/009_example.rb +43 -0
- data/lib/gtk_paradise/examples/drawing/010_example.rb +25 -0
- data/lib/gtk_paradise/examples/drawing/011_example.rb +72 -0
- data/lib/gtk_paradise/examples/drawing/012_example.rb +59 -0
- data/lib/gtk_paradise/examples/drawing/README.md +3 -0
- data/lib/gtk_paradise/examples/drawing/moving_turtle_example.rb +43 -0
- data/lib/gtk_paradise/examples/gdk/001_gdk_screen_properties.rb +58 -0
- data/lib/gtk_paradise/examples/gdk_pixbuf/save_image_example.rb +1 -1
- data/lib/gtk_paradise/examples/gir_ffi/001_hello_world.rb +29 -0
- data/lib/gtk_paradise/examples/gir_ffi/002_upgraded_hello_world.rb +40 -0
- data/lib/gtk_paradise/examples/gir_ffi/003_gtk_application_example.rb +30 -0
- data/lib/gtk_paradise/examples/gir_ffi/004_treeview_example.rb +64 -0
- data/lib/gtk_paradise/examples/gir_ffi/005_complex_example.rb +104 -0
- data/lib/gtk_paradise/examples/gir_ffi/README.md +5 -0
- data/lib/gtk_paradise/examples/glib/parse_glib_settings.rb +1 -1
- data/lib/gtk_paradise/examples/gtk2/008_list_store_example.rb +1 -1
- data/lib/gtk_paradise/examples/gtk3/{061_gtk_entry.rb → 001_gtk_entry.rb} +11 -6
- data/lib/gtk_paradise/examples/gtk3/{009_scrolled_window_example.rb → 002_scrolled_window_example.rb} +6 -4
- data/lib/gtk_paradise/examples/gtk3/{062_toggle_button_example.rb → 003_toggle_button_example.rb} +3 -2
- data/lib/gtk_paradise/examples/gtk3/{081_simple_dialog_example.rb → 004_simple_dialog_example.rb} +19 -12
- data/lib/gtk_paradise/examples/gtk3/005_spinner_example.rb +30 -10
- data/lib/gtk_paradise/examples/gtk3/006_text_view_example.rb +78 -0
- data/lib/gtk_paradise/examples/gtk3/{079_two_windows_example.rb → 007_two_windows_example.rb} +3 -1
- data/lib/gtk_paradise/examples/gtk3/008_search_bar_example.rb +91 -0
- data/lib/gtk_paradise/examples/gtk3/{002_simple_window.rb → 009_simple_window.rb} +14 -6
- data/lib/gtk_paradise/examples/gtk3/{025_switch_example.rb → 010_switch_example.rb} +6 -7
- data/lib/gtk_paradise/examples/gtk3/011_colour_chooser_example.rb +71 -0
- data/lib/gtk_paradise/examples/gtk3/012_show_the_xid_example.rb +18 -0
- data/lib/gtk_paradise/examples/gtk3/013_grab_pointer_forcefully.rb +31 -0
- data/lib/gtk_paradise/examples/gtk3/{083_bottom_left_placement.rb → 015_bottom_left_placement.rb} +3 -1
- data/lib/gtk_paradise/examples/gtk3/{082_scrolling_example.rb → 016_scrolling_example.rb} +2 -2
- data/lib/gtk_paradise/examples/gtk3/{080_extensive_markup_example.rb → 017_extensive_markup_example.rb} +8 -7
- data/lib/gtk_paradise/examples/gtk3/{078_message_dialog_example.rb → 018_message_dialog_example.rb} +3 -5
- data/lib/gtk_paradise/examples/gtk3/{075_tiny_button_via_css.rb → 021_tiny_button_via_css.rb} +1 -0
- data/lib/gtk_paradise/examples/gtk3/{001_font_related_information.rb → 022_font_related_information.rb} +1 -1
- data/lib/gtk_paradise/examples/gtk3/023_sorted_tree.rb +166 -0
- data/lib/gtk_paradise/examples/gtk3/{004_small_paned_example.rb → 024_small_paned_example.rb} +4 -3
- data/lib/gtk_paradise/examples/gtk3/{007_progress_bar_example.rb → 026_progress_bar_example.rb} +1 -2
- data/lib/gtk_paradise/examples/gtk3/{008_menubar_example.rb → 027_menubar_example.rb} +1 -1
- data/lib/gtk_paradise/examples/gtk3/{010_paned_widget_example.rb → 028_paned_widget_example.rb} +1 -0
- data/lib/gtk_paradise/examples/gtk3/{011_sockets.rb → 029_sockets.rb} +1 -0
- data/lib/gtk_paradise/examples/gtk3/{012_notebook_example.rb → 030_notebook_example.rb} +1 -0
- data/lib/gtk_paradise/examples/gtk3/{013_icon_theme_example.rb → 031_icon_theme_example.rb} +6 -0
- data/lib/gtk_paradise/examples/gtk3/{014_switcher_window.rb → 032_switcher_window.rb} +16 -10
- data/lib/gtk_paradise/examples/gtk3/{016_hello_world_in_gtk3_and_bold_font.rb → 034_hello_world_in_gtk3_and_bold_font.rb} +1 -1
- data/lib/gtk_paradise/examples/gtk3/{017_grid_example.rb → 035_grid_example.rb} +5 -1
- data/lib/gtk_paradise/examples/gtk3/{018_buttons_showcasing_the_relief.rb → 036_buttons_showcasing_the_relief.rb} +1 -0
- data/lib/gtk_paradise/examples/gtk3/{019_text_buffer_example.rb → 037_text_buffer_example.rb} +12 -10
- data/lib/gtk_paradise/examples/gtk3/{022_popup_example.rb → 040_popup_example.rb} +2 -2
- data/lib/gtk_paradise/examples/gtk3/{023_horizontal_and_vertical_scale.rb → 041_horizontal_and_vertical_scale.rb} +1 -1
- data/lib/gtk_paradise/examples/gtk3/{026_hover_button_example_via_css.rb → 043_hover_button_example_via_css.rb} +3 -1
- data/lib/gtk_paradise/examples/gtk3/{027_spin_button_example.rb → 044_spin_button_example.rb} +4 -3
- data/lib/gtk_paradise/examples/gtk3/{028_radio_menu_item_example.rb → 045_radio_menu_item_example.rb} +4 -1
- data/lib/gtk_paradise/examples/gtk3/{029_gtk_dialog_sample.rb → 046_gtk_dialog_sample.rb} +4 -1
- data/lib/gtk_paradise/examples/gtk3/{030_draw_rectangles.rb → 047_draw_rectangles.rb} +1 -1
- data/lib/gtk_paradise/examples/gtk3/{031_colour_choose_button.rb → 048_colour_choose_button.rb} +17 -3
- data/lib/gtk_paradise/examples/gtk3/{032_drag_and_drop_example.rb → 049_drag_and_drop_example.rb} +13 -5
- data/lib/gtk_paradise/examples/gtk3/{033_cell_renderer_pixbuf_example.rb → 050_cell_renderer_pixbuf_example.rb} +17 -6
- data/lib/gtk_paradise/examples/gtk3/051_combo_box_example.rb +74 -0
- data/lib/gtk_paradise/examples/gtk3/{037_css_example_of_a_button_changing_the_background_colour_on_click_event.rb → 053_css_example_of_a_button_changing_the_background_colour_on_click_event.rb} +14 -4
- data/lib/gtk_paradise/examples/gtk3/{036_revealer_example.rb → 053_revealer_example.rb} +10 -6
- data/lib/gtk_paradise/examples/gtk3/{038_ten_labels_in_a_vertical_box_example.rb → 054_ten_labels_in_a_vertical_box_example.rb} +1 -1
- data/lib/gtk_paradise/examples/gtk3/{039_threads_example.rb → 055_threads_example.rb} +1 -1
- data/lib/gtk_paradise/examples/gtk3/{042_colourized_button_example.rb → 058_colourized_button_example.rb} +1 -2
- data/lib/gtk_paradise/examples/gtk3/{043_form_example.rb → 059_form_example.rb} +1 -3
- data/lib/gtk_paradise/examples/gtk3/{044_check_button.rb → 060_check_button.rb} +4 -2
- data/lib/gtk_paradise/examples/gtk3/{046_event_box_example.rb → 062_event_box_example.rb} +2 -1
- data/lib/gtk_paradise/examples/gtk3/{047_examples_with_css.rb → 063_examples_with_css.rb} +91 -3
- data/lib/gtk_paradise/examples/gtk3/{048_accel_group_example.rb → 064_accel_group_example.rb} +1 -0
- data/lib/gtk_paradise/examples/gtk3/{049_change_the_application_theme.rb → 065_change_the_application_theme.rb} +4 -2
- data/lib/gtk_paradise/examples/gtk3/{050_header_bar_example.rb → 066_header_bar_example.rb} +3 -0
- data/lib/gtk_paradise/examples/gtk3/{051_gtk_label_example.rb → 067_gtk_label_example.rb} +3 -2
- data/lib/gtk_paradise/examples/gtk3/{052_popover_example.rb → 068_popover_example.rb} +2 -2
- data/lib/gtk_paradise/examples/gtk3/{053_entry_completion.rb → 069_entry_completion.rb} +2 -0
- data/lib/gtk_paradise/examples/gtk3/{055_button_demo.rb → 071_button_demo.rb} +6 -5
- data/lib/gtk_paradise/examples/gtk3/{056_text_iterator_example.rb → 072_text_iterator_example.rb} +30 -21
- data/lib/gtk_paradise/examples/gtk3/{057_image_example.rb → 073_image_example.rb} +1 -1
- data/lib/gtk_paradise/examples/gtk3/{058_frame_example.rb → 074_frame_example.rb} +1 -1
- data/lib/gtk_paradise/examples/gtk3/{059_gtk_expander.rb → 075_gtk_expander.rb} +2 -0
- data/lib/gtk_paradise/examples/gtk3/{060_ten_vboxes_example.rb → 076_ten_vboxes_example.rb} +1 -0
- data/lib/gtk_paradise/examples/gtk3/{063_button_box_example.rb → 077_button_box_example.rb} +11 -1
- data/lib/gtk_paradise/examples/gtk3/{064_tree_view_column_example.rb → 078_tree_view_column_example.rb} +2 -1
- data/lib/gtk_paradise/examples/gtk3/{066_vertical_boxes.rb → 080_vertical_boxes.rb} +2 -1
- data/lib/gtk_paradise/examples/gtk3/{067_vbox_with_spacing_and_border_width.rb → 081_vbox_with_spacing_and_border_width.rb} +2 -1
- data/lib/gtk_paradise/examples/gtk3/{069_file_chooser_dialog.rb → 082_file_chooser_dialog.rb} +3 -0
- data/lib/gtk_paradise/examples/gtk3/{070_bindings.rb → 083_bindings.rb} +14 -8
- data/lib/gtk_paradise/examples/gtk3/{072_recent_chooser_dialog.rb → 084_recent_chooser_dialog.rb} +2 -2
- data/lib/gtk_paradise/examples/gtk3/{073_showcase_the_cursors.rb → 085_showcase_the_cursors.rb} +30 -5
- data/lib/gtk_paradise/examples/gtk3/{074_app_chooser_button_example.rb → 086_app_chooser_button_example.rb} +1 -0
- data/lib/gtk_paradise/examples/gtk3/087_calendar_example.rb +41 -0
- data/lib/gtk_paradise/examples/gtk4/001_gtk_entry.rb +88 -0
- data/lib/gtk_paradise/examples/gtk4/002_scrolled_window_example.rb +62 -0
- data/lib/gtk_paradise/examples/gtk4/003_toggle_button_example.rb +23 -0
- data/lib/gtk_paradise/examples/gtk4/004_simple_dialog_example.rb +41 -0
- data/lib/gtk_paradise/examples/gtk4/005_spinner_example.rb +64 -0
- data/lib/gtk_paradise/examples/gtk4/006_text_view_example.rb +77 -0
- data/lib/gtk_paradise/examples/gtk4/007_two_windows_example.rb +55 -0
- data/lib/gtk_paradise/examples/gtk4/008_search_bar_example.rb +88 -0
- data/lib/gtk_paradise/examples/gtk4/009_text_view_example.rb +30 -0
- data/lib/gtk_paradise/examples/gtk4/010_switch_example.rb +52 -0
- data/lib/gtk_paradise/examples/gtk4/074_frame_example.rb +105 -0
- data/lib/gtk_paradise/examples/gtk4/076_ten_vboxes_example.rb +35 -0
- data/lib/gtk_paradise/examples/gtk4/087_calendar_example.rb +47 -0
- data/lib/gtk_paradise/examples/gtk4/100_changed_events_example.rb +77 -0
- data/lib/gtk_paradise/examples/gtk4/101_actionbar_example.rb +55 -0
- data/lib/gtk_paradise/examples/gtk4/102_picture_example.rb +35 -0
- data/lib/gtk_paradise/examples/pango/pango_power.rb +1 -0
- data/lib/gtk_paradise/experimental/experimental.rb +3 -11
- data/lib/gtk_paradise/experimental/experimental_for_gtk4.rb +92 -0
- data/lib/gtk_paradise/fonts/fonts.rb +5 -1
- data/lib/gtk_paradise/gdk/cursor.rb +2 -2
- data/lib/gtk_paradise/{base_module/e.rb → gdk/event_crossing.rb} +6 -8
- data/lib/gtk_paradise/gdk/gdk.rb +1 -1
- data/lib/gtk_paradise/gtk_classes/about.rb +11 -2
- data/lib/gtk_paradise/gtk_classes/about_dialog.rb +6 -2
- data/lib/gtk_paradise/gtk_classes/alignment.rb +4 -1
- data/lib/gtk_paradise/gtk_classes/application.rb +94 -4
- data/lib/gtk_paradise/gtk_classes/application_window.rb +25 -0
- data/lib/gtk_paradise/gtk_classes/box.rb +116 -279
- data/lib/gtk_paradise/gtk_classes/button.rb +55 -37
- data/lib/gtk_paradise/gtk_classes/button_box.rb +9 -1
- data/lib/gtk_paradise/gtk_classes/cell_renderer_text.rb +5 -3
- data/lib/gtk_paradise/gtk_classes/check_button.rb +27 -8
- data/lib/gtk_paradise/gtk_classes/combo_box.rb +4 -1
- data/lib/gtk_paradise/gtk_classes/combo_box_entry.rb +17 -11
- data/lib/gtk_paradise/gtk_classes/combo_box_text.rb +21 -19
- data/lib/gtk_paradise/gtk_classes/dialog.rb +2 -2
- data/lib/gtk_paradise/gtk_classes/entry.rb +256 -124
- data/lib/gtk_paradise/gtk_classes/entry_completion.rb +4 -0
- data/lib/gtk_paradise/gtk_classes/event_box.rb +21 -2
- data/lib/gtk_paradise/gtk_classes/event_button.rb +1 -1
- data/lib/gtk_paradise/gtk_classes/expander.rb +8 -1
- data/lib/gtk_paradise/gtk_classes/file_chooser_dialog.rb +1 -1
- data/lib/gtk_paradise/gtk_classes/file_filter.rb +4 -2
- data/lib/gtk_paradise/gtk_classes/file_selection.rb +4 -3
- data/lib/gtk_paradise/gtk_classes/frame.rb +19 -1
- data/lib/gtk_paradise/gtk_classes/grid.rb +206 -160
- data/lib/gtk_paradise/gtk_classes/hbox.rb +145 -0
- data/lib/gtk_paradise/gtk_classes/header_bar.rb +19 -8
- data/lib/gtk_paradise/gtk_classes/image.rb +1 -1
- data/lib/gtk_paradise/gtk_classes/label.rb +174 -135
- data/lib/gtk_paradise/gtk_classes/menu.rb +7 -3
- data/lib/gtk_paradise/gtk_classes/menu_bar.rb +1 -1
- data/lib/gtk_paradise/gtk_classes/menu_item.rb +1 -1
- data/lib/gtk_paradise/gtk_classes/notebook.rb +114 -64
- data/lib/gtk_paradise/gtk_classes/paned.rb +52 -0
- data/lib/gtk_paradise/gtk_classes/radio_menu_item.rb +19 -1
- data/lib/gtk_paradise/gtk_classes/scale_button.rb +16 -1
- data/lib/gtk_paradise/gtk_classes/scrolled_window.rb +8 -6
- data/lib/gtk_paradise/gtk_classes/search_bar.rb +1 -1
- data/lib/gtk_paradise/gtk_classes/source_buffer.rb +4 -5
- data/lib/gtk_paradise/gtk_classes/spin_button.rb +9 -1
- data/lib/gtk_paradise/gtk_classes/spinner.rb +32 -2
- data/lib/gtk_paradise/gtk_classes/status_icon.rb +2 -0
- data/lib/gtk_paradise/gtk_classes/statusbar.rb +1 -0
- data/lib/gtk_paradise/gtk_classes/style_context.rb +71 -0
- data/lib/gtk_paradise/gtk_classes/text_buffer.rb +45 -19
- data/lib/gtk_paradise/gtk_classes/text_view.rb +20 -3
- data/lib/gtk_paradise/gtk_classes/toggle_button.rb +3 -0
- data/lib/gtk_paradise/gtk_classes/toolbar.rb +2 -2
- data/lib/gtk_paradise/gtk_classes/tree_iter.rb +1 -1
- data/lib/gtk_paradise/gtk_classes/tree_view.rb +93 -70
- data/lib/gtk_paradise/gtk_classes/tree_view_column.rb +2 -1
- data/lib/gtk_paradise/gtk_classes/vbox.rb +71 -10
- data/lib/gtk_paradise/gtk_classes/vscale.rb +2 -2
- data/lib/gtk_paradise/gtk_classes/widget.rb +1057 -590
- data/lib/gtk_paradise/gtk_classes/window.rb +37 -2
- data/lib/gtk_paradise/hello_world/README.md +1 -1
- data/lib/gtk_paradise/hello_world/hello_world_gtk4.rb +20 -0
- data/lib/gtk_paradise/images/icons/close_image.png +0 -0
- data/lib/gtk_paradise/images/icons/closed.png +0 -0
- data/lib/gtk_paradise/images/icons/directory.png +0 -0
- data/lib/gtk_paradise/images/icons/icon_cool.gif +0 -0
- data/lib/gtk_paradise/images/icons/icon_lol.gif +0 -0
- data/lib/gtk_paradise/images/icons/icon_smile.gif +0 -0
- data/lib/gtk_paradise/images/icons/opened.png +0 -0
- data/lib/gtk_paradise/images/internal/gtk_label_example.png +0 -0
- data/lib/gtk_paradise/images/misc/wiki_logo.png +0 -0
- data/lib/gtk_paradise/images/small/GREEN_CIRCLE.png +0 -0
- data/lib/gtk_paradise/images/small/README.md +2 -0
- data/lib/gtk_paradise/images/small/RED_CIRCLE.png +0 -0
- data/lib/gtk_paradise/pango/{pango_fonts.rb → fonts.rb} +2 -2
- data/lib/gtk_paradise/pango/{pango.rb → layout.rb} +1 -1
- data/lib/gtk_paradise/pango/pango_renderer.rb +9 -2
- data/lib/gtk_paradise/project/project.rb +4 -3
- data/lib/gtk_paradise/prototypes/README.md +8 -0
- data/lib/gtk_paradise/prototypes/gtk3_standalone.rb +8 -21
- data/lib/gtk_paradise/prototypes/gtk4_standalone.rb +135 -0
- data/lib/gtk_paradise/prototypes/shared_code.rb +5 -15
- data/lib/gtk_paradise/prototypes/unified_gtk_prototype.rb +179 -0
- data/lib/gtk_paradise/require_gtk4.rb +7 -0
- data/lib/gtk_paradise/requires/require_base_module.rb +7 -0
- data/lib/gtk_paradise/requires/require_files_irrespective_of_the_gtk_version_at_hand.rb +25 -16
- data/lib/gtk_paradise/requires/require_gtk2.rb +6 -4
- data/lib/gtk_paradise/requires/{require_gtk2_or_gtk3.rb → require_gtk2_or_gtk3_or_gtk4.rb} +33 -12
- data/lib/gtk_paradise/requires/require_gtk3.rb +5 -20
- data/lib/gtk_paradise/requires/require_gtk4.rb +13 -0
- data/lib/gtk_paradise/requires/require_gtk_runner.rb +1 -0
- data/lib/gtk_paradise/requires/require_the_base_module_and_gtk_run.rb +1 -1
- data/lib/gtk_paradise/requires/require_the_base_module_the_app_module_and_the_toplevel_methods.rb +9 -0
- data/lib/gtk_paradise/requires/require_the_classes_files_for_gtk4.rb +11 -0
- data/lib/gtk_paradise/requires/require_the_colours_gem.rb +9 -0
- data/lib/gtk_paradise/requires/require_the_default_gtk_version.rb +4 -2
- data/lib/gtk_paradise/requires/require_the_toplevel_methods.rb +1 -1
- data/lib/gtk_paradise/run.rb +1 -0
- data/lib/gtk_paradise/run_this_widget/run_this_widget.rb +7 -3
- data/lib/gtk_paradise/threads/threads.rb +15 -10
- data/lib/gtk_paradise/toplevel_methods/css.rb +183 -35
- data/lib/gtk_paradise/toplevel_methods/cursor.rb +17 -3
- data/lib/gtk_paradise/toplevel_methods/determine_which_gtk_version_is_in_use.rb +90 -8
- data/lib/gtk_paradise/toplevel_methods/events.rb +6 -0
- data/lib/gtk_paradise/toplevel_methods/keys.rb +1 -1
- data/lib/gtk_paradise/toplevel_methods/screen_resolution.rb +32 -5
- data/lib/gtk_paradise/toplevel_methods/text_buffer_tags.rb +13 -4
- data/lib/gtk_paradise/toplevel_methods/tokenizer.rb +18 -3
- data/lib/gtk_paradise/toplevel_methods/{misc.rb → toplevel_methods.rb} +728 -181
- data/lib/gtk_paradise/utility_scripts/commandline_to_automatic_gui.rb +244 -0
- data/lib/gtk_paradise/version/version.rb +2 -2
- data/lib/gtk_paradise/widgets/gtk2/cat_merge.rb +2 -6
- data/lib/gtk_paradise/widgets/gtk2/cell_renderer_progress_example.rb +0 -5
- data/lib/gtk_paradise/widgets/gtk2/foto_lister.rb +2 -6
- data/lib/gtk_paradise/widgets/gtk2/gidnight_commander/gidnight_commander.rb +3 -3
- data/lib/gtk_paradise/widgets/gtk2/hbox_example.rb +1 -5
- data/lib/gtk_paradise/widgets/gtk2/multiple_select_in_a_tree_view_widget.rb +2 -6
- data/lib/gtk_paradise/widgets/gtk2/paned_example.rb +1 -1
- data/lib/gtk_paradise/widgets/gtk2/slider_changing_button.rb +2 -6
- data/lib/gtk_paradise/widgets/gtk2/status_icon_example.rb +2 -6
- data/lib/gtk_paradise/widgets/gtk2/table2.rb +2 -6
- data/lib/gtk_paradise/widgets/gtk2/toolbar_example.rb +2 -6
- data/lib/gtk_paradise/widgets/{version_agnostic → gtk3/audio_button}/audio_button.rb +15 -26
- data/lib/gtk_paradise/widgets/gtk3/burn_this_iso_file/burn_this_iso_file.rb +2 -6
- data/lib/gtk_paradise/widgets/{version_agnostic → gtk3/button_open_remote_webpage}/button_open_remote_webpage.rb +105 -50
- data/lib/gtk_paradise/widgets/gtk3/button_with_border/button_with_border.rb +155 -0
- data/lib/gtk_paradise/widgets/{version_agnostic → gtk3/button_xorg_buffer}/button_xorg_buffer.rb +76 -18
- data/lib/gtk_paradise/widgets/gtk3/calculator/calculator.rb +183 -76
- data/lib/gtk_paradise/widgets/gtk3/checkbox_image/checkbox_image.rb +3 -7
- data/lib/gtk_paradise/widgets/{version_agnostic → gtk3/coloured_button}/coloured_button.rb +94 -24
- data/lib/gtk_paradise/widgets/gtk3/coloured_square/coloured_square.rb +2 -6
- data/lib/gtk_paradise/widgets/gtk3/coloured_unit/coloured_unit.rb +151 -0
- data/lib/gtk_paradise/widgets/gtk3/cpu_widget/cpu_widget.rb +2 -6
- data/lib/gtk_paradise/widgets/gtk3/directory_content_widget/directory_content_widget.rb +937 -7
- data/lib/gtk_paradise/widgets/gtk3/editor/connect_skeleton.rb +33 -38
- data/lib/gtk_paradise/widgets/gtk3/editor/create.rb +66 -41
- data/lib/gtk_paradise/widgets/gtk3/editor/editor.rb +256 -270
- data/lib/gtk_paradise/widgets/gtk3/editor/internal_widgets/goto_line_widget.rb +52 -65
- data/lib/gtk_paradise/widgets/gtk3/editor/misc.rb +358 -111
- data/lib/gtk_paradise/widgets/gtk3/files_in_directory/files_in_directory.rb +2 -7
- data/lib/gtk_paradise/widgets/gtk3/flexible_vte/flexible_vte.rb +3 -7
- data/lib/gtk_paradise/widgets/gtk3/font_size_widget/action_button.rb +1 -5
- data/lib/gtk_paradise/widgets/gtk3/font_size_widget/font_size_widget.rb +2 -6
- data/lib/gtk_paradise/widgets/{gtk2 → gtk3}/gidnight_commander/gidnight_commander.config +1 -2
- data/lib/gtk_paradise/widgets/gtk3/gidnight_commander/gidnight_commander.rb +165 -125
- data/lib/gtk_paradise/widgets/gtk3/image_close_on_click_action/image_close_on_click_action.rb +34 -2
- data/lib/gtk_paradise/widgets/gtk3/image_viewer/image_viewer.rb +23 -26
- data/lib/gtk_paradise/widgets/gtk3/information_about_the_harddisc/harddisc_information.rb +161 -0
- data/lib/gtk_paradise/widgets/gtk3/insert_character/insert_character.rb +24 -29
- data/lib/gtk_paradise/widgets/gtk3/linux_users/linux_users.rb +32 -32
- data/lib/gtk_paradise/widgets/gtk3/my_calendar/my_calendar.rb +330 -7
- data/lib/gtk_paradise/widgets/gtk3/my_image_menu_item/my_image_menu_item.rb +179 -0
- data/lib/gtk_paradise/widgets/gtk3/non_numbers_only/non_numbers_only.rb +136 -0
- data/lib/gtk_paradise/widgets/gtk3/note_window/note_window.rb +199 -0
- data/lib/gtk_paradise/widgets/gtk3/notebook_controller/notebook_controller.rb +311 -7
- data/lib/gtk_paradise/widgets/gtk3/notebook_tab_with_icon/notebook_tab_with_icon.rb +402 -7
- data/lib/gtk_paradise/widgets/gtk3/numbered_lines/numbered_lines.rb +128 -82
- data/lib/gtk_paradise/widgets/{version_agnostic → gtk3/numbers_only}/numbers_only.rb +15 -3
- data/lib/gtk_paradise/widgets/gtk3/ping_widget/ping_widget.rb +491 -8
- data/lib/gtk_paradise/widgets/gtk3/regex_matcher/regex_matcher.rb +362 -43
- data/lib/gtk_paradise/widgets/gtk3/rename_widget/rename_widget.rb +8 -25
- data/lib/gtk_paradise/widgets/gtk3/show_which_key_was_pressed/show_which_key_was_pressed.rb +190 -0
- data/lib/gtk_paradise/widgets/gtk3/stopwatch/stopwatch.rb +318 -7
- data/lib/gtk_paradise/widgets/gtk3/sys_message/sys_message.rb +219 -7
- data/lib/gtk_paradise/widgets/gtk3/system_information/system_information.rb +58 -34
- data/lib/gtk_paradise/widgets/gtk3/tabble/admin_panel.rb +2 -6
- data/lib/gtk_paradise/widgets/gtk3/tabble/image_and_button.rb +2 -6
- data/lib/gtk_paradise/widgets/gtk3/tabble/tabble.rb +2 -6
- data/lib/gtk_paradise/widgets/gtk3/view_webpage/view_webpage.rb +2 -6
- data/lib/gtk_paradise/widgets/gtk3/wiki/README.md +4 -0
- data/lib/gtk_paradise/widgets/gtk3/wiki/wiki.rb +388 -0
- data/lib/gtk_paradise/widgets/gtk4/ping_widget/ping_widget.rb +4 -0
- data/lib/gtk_paradise/widgets/gtk4/show_icon_theme/show_icon_theme.rb +134 -0
- data/lib/gtk_paradise/widgets/gtk4/sys_message/sys_message.rb +269 -0
- data/lib/gtk_paradise/widgets/{gtk2/stopwatch/stopwatch.rb → gtk4/xpm_loader/xpm_loader.rb} +13 -11
- data/lib/gtk_paradise/widgets/shared_code/browser/browser_module.rb +4 -16
- data/lib/gtk_paradise/widgets/shared_code/cdripper/cdripper_module.rb +1 -1
- data/lib/gtk_paradise/widgets/shared_code/colour_filled_widget/colour_filled_widget_module.rb +25 -28
- data/lib/gtk_paradise/widgets/shared_code/colour_palette/colour_palette_module.rb +2 -2
- data/lib/gtk_paradise/widgets/shared_code/contacts/contacts_module.rb +62 -64
- data/lib/gtk_paradise/widgets/shared_code/flip_state_widget/flip_state_widget_module.rb +3 -19
- data/lib/gtk_paradise/widgets/shared_code/information_about_the_harddisc/harddisc_information.rb +0 -155
- data/lib/gtk_paradise/widgets/shared_code/information_about_the_harddisc/information_about_the_harddisc_module.rb +0 -444
- data/lib/gtk_paradise/widgets/shared_code/lsmod/lsmod_module.rb +22 -26
- data/lib/gtk_paradise/widgets/shared_code/lspci/lspci_module.rb +24 -36
- data/lib/gtk_paradise/widgets/shared_code/mini_clock/mini_clock_module.rb +74 -58
- data/lib/gtk_paradise/widgets/shared_code/my_calendar/my_calendar_module.rb +0 -327
- data/lib/gtk_paradise/widgets/shared_code/pid_displayer/pid_displayer_module.rb +53 -41
- data/lib/gtk_paradise/widgets/shared_code/random_image/random_image_module.rb +46 -29
- data/lib/gtk_paradise/widgets/shared_code/select_file/select_file_module.rb +1 -1
- data/lib/gtk_paradise/widgets/shared_code/show_icon_theme/show_icon_theme_module.rb +56 -44
- data/lib/gtk_paradise/widgets/shared_code/simple_clock/simple_clock_module.rb +1 -12
- data/lib/gtk_paradise/widgets/shared_code/stopwatch/stopwatch_module.rb +0 -341
- data/lib/gtk_paradise/widgets/shared_code/sys_message/sys_message_module.rb +0 -211
- data/lib/gtk_paradise/widgets/shared_code/tabby/tabby_module.rb +3 -15
- data/lib/gtk_paradise/widgets/shared_code/xpm_loader/xpm_loader_module.rb +15 -23
- data/lib/gtk_paradise/www/index.cgi +2 -2
- data/lib/gtk_paradise/yaml/browser_URLs.yml +3 -4
- data/lib/gtk_paradise/yaml/configuration_options_for_class_gtk_runner.yml +6 -6
- data/lib/gtk_paradise/yaml/experimental/README.md +3 -0
- data/lib/gtk_paradise/yaml/experimental/all_widgets.yml +37 -0
- data/lib/gtk_paradise/yaml/menu.yml +6 -3
- data/lib/gtk_paradise/yaml/notebook_controller.yml +62 -29
- data/lib/gtk_paradise.rb +0 -5
- data/test/gtk2/testing_combo_box.rb +1 -0
- data/test/gtk2/testing_display.rb +23 -0
- data/test/gtk2/testing_gtk_image.rb +4 -3
- data/test/gtk2/testing_hbox_and_vbox.rb +37 -0
- data/test/gtk2/testing_label_with_ampersand.rb +5 -2
- data/test/gtk2/testing_notebook.rb +11 -5
- data/test/gtk3/test_widget.rb +2 -1
- data/test/gtk3/testing_app.rb +0 -1
- data/test/gtk3/testing_base_module.rb +2 -1
- data/test/gtk3/testing_numbered_lines.rb +20 -0
- data/test/gtk3/testing_project_base_directory.rb +6 -1
- data/test/gtk3/testing_the_html_pseudo_tags.rb +2 -2
- data/test/gtk4/testing_gtk_entry.rb +24 -0
- data/test/misc/testing_a_gtk_frame.rb +14 -0
- data/test/misc/testing_gtk4_simplifications.rb +105 -0
- data/test/misc/testing_gtk_paradise_runner.rb +19 -4
- data/test/misc/testing_the_gtk_classes.rb +83 -0
- metadata +246 -199
- data/lib/gtk_paradise/base_module/change_directory.rb +0 -22
- data/lib/gtk_paradise/base_module/combo_box_and_combo_box_entry.rb +0 -113
- data/lib/gtk_paradise/base_module/commandline_arguments.rb +0 -36
- data/lib/gtk_paradise/base_module/configuration.rb +0 -50
- data/lib/gtk_paradise/base_module/constants.rb +0 -23
- data/lib/gtk_paradise/base_module/debug.rb +0 -127
- data/lib/gtk_paradise/base_module/draggable.rb +0 -95
- data/lib/gtk_paradise/base_module/emoji.rb +0 -107
- data/lib/gtk_paradise/base_module/esystem.rb +0 -22
- data/lib/gtk_paradise/base_module/events.rb +0 -111
- data/lib/gtk_paradise/base_module/fonts.rb +0 -119
- data/lib/gtk_paradise/base_module/graphics_display.rb +0 -47
- data/lib/gtk_paradise/base_module/gtk3.rb +0 -43
- data/lib/gtk_paradise/base_module/gtk_buttons.rb +0 -562
- data/lib/gtk_paradise/base_module/gtk_entry.rb +0 -126
- data/lib/gtk_paradise/base_module/gtk_fixed.rb +0 -18
- data/lib/gtk_paradise/base_module/gtk_grid.rb +0 -61
- data/lib/gtk_paradise/base_module/gtk_image.rb +0 -501
- data/lib/gtk_paradise/base_module/gtk_label.rb +0 -211
- data/lib/gtk_paradise/base_module/gtk_notebook.rb +0 -88
- data/lib/gtk_paradise/base_module/gtk_scrolled_window.rb +0 -155
- data/lib/gtk_paradise/base_module/misc.rb +0 -2949
- data/lib/gtk_paradise/base_module/pango.rb +0 -24
- data/lib/gtk_paradise/base_module/popover.rb +0 -241
- data/lib/gtk_paradise/base_module/register_sigint.rb +0 -20
- data/lib/gtk_paradise/base_module/reset.rb +0 -128
- data/lib/gtk_paradise/base_module/return_corresponding_gtk_stock_item.rb +0 -92
- data/lib/gtk_paradise/base_module/roebe.rb +0 -19
- data/lib/gtk_paradise/base_module/table.rb +0 -438
- data/lib/gtk_paradise/base_module/time.rb +0 -35
- data/lib/gtk_paradise/constants/available_cursors.rb +0 -52
- data/lib/gtk_paradise/constants/fonts.rb +0 -38
- data/lib/gtk_paradise/constants/misc.rb +0 -56
- data/lib/gtk_paradise/constants/newline.rb +0 -14
- data/lib/gtk_paradise/constants/xbm_icons.rb +0 -121
- data/lib/gtk_paradise/examples/gtk3/003_sorted_tree.rb +0 -141
- data/lib/gtk_paradise/examples/gtk3/034_combo_box_example.rb +0 -49
- data/lib/gtk_paradise/examples/gtk3/068_text_view_example.rb +0 -34
- data/lib/gtk_paradise/examples/gtk3/071_search_bar_example.rb +0 -59
- data/lib/gtk_paradise/gtk_classes/colours/colours.rb +0 -158
- data/lib/gtk_paradise/requires/require_the_minesweeper_files.rb +0 -11
- data/lib/gtk_paradise/toplevel_methods/allow_only_numbers.rb +0 -59
- data/lib/gtk_paradise/toplevel_methods/csv.rb +0 -102
- data/lib/gtk_paradise/toplevel_methods/e.rb +0 -18
- data/lib/gtk_paradise/toplevel_methods/enable_and_disable_warnings.rb +0 -58
- data/lib/gtk_paradise/toplevel_methods/keyboard.rb +0 -25
- data/lib/gtk_paradise/toplevel_methods/main_file.rb +0 -31
- data/lib/gtk_paradise/toplevel_methods/register_sigint.rb +0 -17
- data/lib/gtk_paradise/toplevel_methods/roebe.rb +0 -22
- data/lib/gtk_paradise/toplevel_methods/select_file.rb +0 -168
- data/lib/gtk_paradise/toplevel_methods/spacer.rb +0 -55
- data/lib/gtk_paradise/toplevel_methods/tooltips.rb +0 -71
- data/lib/gtk_paradise/toplevel_methods/we_use_this_gtk_version.rb +0 -65
- data/lib/gtk_paradise/widgets/gtk2/directory_content_widget/directory_content_widget.rb +0 -30
- data/lib/gtk_paradise/widgets/gtk2/my_calendar/my_calendar.config +0 -6
- data/lib/gtk_paradise/widgets/gtk2/my_calendar/my_calendar.rb +0 -34
- data/lib/gtk_paradise/widgets/gtk2/notebook_tab_with_icon/notebook_tab_with_icon.rb +0 -30
- data/lib/gtk_paradise/widgets/gtk2/ping_widget/ping_widget.rb +0 -30
- data/lib/gtk_paradise/widgets/gtk2/sys_message/sys_message.config +0 -6
- data/lib/gtk_paradise/widgets/gtk2/sys_message/sys_message.rb +0 -29
- data/lib/gtk_paradise/widgets/shared_code/directory_content_widget/constants.rb +0 -53
- data/lib/gtk_paradise/widgets/shared_code/directory_content_widget/directory_content_widget_module.rb +0 -777
- data/lib/gtk_paradise/widgets/shared_code/directory_content_widget/handle_this_file_or_symlink.rb +0 -83
- data/lib/gtk_paradise/widgets/shared_code/notebook_controller/notebook_controller_module.rb +0 -339
- data/lib/gtk_paradise/widgets/shared_code/notebook_tab_with_icon/notebook_tab_with_icon_module.rb +0 -297
- data/lib/gtk_paradise/widgets/shared_code/ping_widget/ping_widget_module.rb +0 -326
- data/lib/gtk_paradise/widgets/version_agnostic/button_with_border.rb +0 -63
- data/lib/gtk_paradise/widgets/version_agnostic/coloured_unit.rb +0 -54
- data/lib/gtk_paradise/widgets/version_agnostic/my_image_menu_item.rb +0 -103
- data/lib/gtk_paradise/widgets/version_agnostic/my_menu_item_separator.rb +0 -31
- data/lib/gtk_paradise/widgets/version_agnostic/non_numbers_only.rb +0 -66
- data/lib/gtk_paradise/widgets/version_agnostic/note_window.rb +0 -107
- /data/lib/gtk_paradise/examples/gtk3/{084_undecorated_window_example.rb → 014_undecorated_window_example.rb} +0 -0
- /data/lib/gtk_paradise/examples/gtk3/{077_status_icon_example.rb → 019_status_icon_example.rb} +0 -0
- /data/lib/gtk_paradise/examples/gtk3/{076_stack_example.rb → 020_stack_example.rb} +0 -0
- /data/lib/gtk_paradise/examples/gtk3/{006_password_example.rb → 025_password_example.rb} +0 -0
- /data/lib/gtk_paradise/examples/gtk3/{015_list_box_example.rb → 033_list_box_example.rb} +0 -0
- /data/lib/gtk_paradise/examples/gtk3/{020_radio_button_window.rb → 038_radio_button_window.rb} +0 -0
- /data/lib/gtk_paradise/examples/gtk3/{021_scale_button_demo.rb → 039_scale_button_demo.rb} +0 -0
- /data/lib/gtk_paradise/examples/gtk3/{024_installation_assistant.rb → 042_installation_assistant.rb} +0 -0
- /data/lib/gtk_paradise/examples/gtk3/{035_notebook_css_example.rb → 052_notebook_css_example.rb} +0 -0
- /data/lib/gtk_paradise/examples/gtk3/{040_font_chooser_dialog_example.rb → 056_font_chooser_dialog_example.rb} +0 -0
- /data/lib/gtk_paradise/examples/gtk3/{041_flowbox.rb → 057_flowbox.rb} +0 -0
- /data/lib/gtk_paradise/examples/gtk3/{045_fixed_example.rb → 061_fixed_example.rb} +0 -0
- /data/lib/gtk_paradise/examples/gtk3/{054_svg_viewer.rb → 070_svg_viewer.rb} +0 -0
- /data/lib/gtk_paradise/examples/gtk3/{065_tooltips_example.rb → 079_tooltips_example.rb} +0 -0
@@ -30,12 +30,10 @@ module Gtk
|
|
30
30
|
|
31
31
|
class Entry # === Gtk::Entry
|
32
32
|
|
33
|
-
require 'gtk_paradise/toplevel_methods/allow_only_numbers.rb'
|
34
|
-
require 'gtk_paradise/toplevel_methods/enable_and_disable_warnings.rb'
|
35
33
|
require 'gtk_paradise/toplevel_methods/determine_which_gtk_version_is_in_use.rb'
|
36
|
-
require 'gtk_paradise/toplevel_methods/
|
34
|
+
require 'gtk_paradise/toplevel_methods/toplevel_methods.rb'
|
37
35
|
|
38
|
-
Gtk.disable_warnings # ← Explained on top of this file.
|
36
|
+
# Gtk.disable_warnings # ← Explained on top of this file.
|
39
37
|
|
40
38
|
# ========================================================================= #
|
41
39
|
# === initialize
|
@@ -45,31 +43,248 @@ class Entry # === Gtk::Entry
|
|
45
43
|
# The first argument is any default entry to be used. The default
|
46
44
|
# entry will be an empty '' String.
|
47
45
|
# ========================================================================= #
|
48
|
-
def initialize(
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
46
|
+
#def initialize(
|
47
|
+
# default_argument = :default
|
48
|
+
# )
|
49
|
+
# super()
|
50
|
+
# case default_argument
|
51
|
+
# # ======================================================================= #
|
52
|
+
# # === :default
|
53
|
+
# # ======================================================================= #
|
54
|
+
# when :default
|
55
|
+
# default_argument = ''
|
56
|
+
# end
|
57
|
+
# set_text(default_argument)
|
58
|
+
#end
|
59
|
+
# Gtk.enable_warnings # And re-enable the warnings here.
|
60
|
+
|
61
|
+
alias text? text # === text?
|
62
|
+
|
63
|
+
if ::Gtk.use_gtk4?
|
64
|
+
def set_focus(i = false)
|
65
|
+
# ===================================================================== #
|
66
|
+
# Currently does nothing. set_focus() is possible in ruby-gtk3
|
67
|
+
# but was disabled in ruby-gtk4.
|
68
|
+
# ===================================================================== #
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# ========================================================================= #
|
73
|
+
# === set_maxsize
|
74
|
+
# ========================================================================= #
|
75
|
+
def set_maxsize(i)
|
76
|
+
set_max_length(i)
|
77
|
+
end
|
78
|
+
|
79
|
+
# ========================================================================= #
|
80
|
+
# === ghost_text
|
81
|
+
#
|
82
|
+
# This is essentially a placeholder text, as a hint, which was added
|
83
|
+
# in gtk3.
|
84
|
+
# ========================================================================= #
|
85
|
+
if ::Gtk.use_gtk3?
|
86
|
+
alias ghost_text set_placeholder_text # === ghost_text
|
87
|
+
alias ghost_text= set_placeholder_text # === ghost_text=
|
88
|
+
alias shadow_hint= set_placeholder_text # === shadow_hint=
|
89
|
+
alias shadow_text= set_placeholder_text # === shadow_text=
|
90
|
+
alias ghost= set_placeholder_text # === shadow_text=
|
91
|
+
else
|
53
92
|
# ======================================================================= #
|
54
|
-
# ===
|
93
|
+
# === ghost_text
|
55
94
|
# ======================================================================= #
|
56
|
-
|
57
|
-
|
95
|
+
def ghost_text(i)
|
96
|
+
set_text(i)
|
58
97
|
end
|
59
|
-
set_text(default_argument)
|
60
98
|
end
|
61
99
|
|
62
|
-
|
100
|
+
# ========================================================================= #
|
101
|
+
# === move_cursor_to_the_most_right_position
|
102
|
+
# ========================================================================= #
|
103
|
+
def move_cursor_to_the_most_right_position
|
104
|
+
self.position = -1
|
105
|
+
end; alias cursor_is_to_the_right move_cursor_to_the_most_right_position # === cursor_is_to_the_right
|
106
|
+
alias cursor_is_right move_cursor_to_the_most_right_position # === cursor_is_right
|
107
|
+
alias cursor_is_on_the_end move_cursor_to_the_most_right_position # === cursor_is_on_the_end
|
108
|
+
|
109
|
+
# ========================================================================= #
|
110
|
+
# === align_to_the_right
|
111
|
+
# ========================================================================= #
|
112
|
+
def align_to_the_right
|
113
|
+
self.xalign = 1
|
114
|
+
end
|
115
|
+
|
116
|
+
# ========================================================================= #
|
117
|
+
# === default_styling
|
118
|
+
#
|
119
|
+
# Simply enable the default-entry CSS styling.
|
120
|
+
# ========================================================================= #
|
121
|
+
def default_styling
|
122
|
+
css_class('default_entry')
|
123
|
+
end; alias default_entry default_styling # === default_entry
|
124
|
+
alias default_values default_styling # === default_values
|
63
125
|
|
64
|
-
|
126
|
+
# ========================================================================= #
|
127
|
+
# === try_to_remove_the_last_character
|
128
|
+
#
|
129
|
+
# This method will try to remove the last character, if there is
|
130
|
+
# any text. Minimum text will be ''.
|
131
|
+
# ========================================================================= #
|
132
|
+
def try_to_remove_the_last_character(
|
133
|
+
_ = text?
|
134
|
+
)
|
135
|
+
if _.size > 0
|
136
|
+
set_text(_[0 .. -2].to_s)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
# ========================================================================= #
|
141
|
+
# === enable_this_action_on_enter_key
|
142
|
+
#
|
143
|
+
# This method only works for actions associated with the entry-widget.
|
144
|
+
# ========================================================================= #
|
145
|
+
def enable_this_action_on_enter_key(this_method)
|
146
|
+
on_key_press_event { |widget, event|
|
147
|
+
send(this_method)
|
148
|
+
}
|
149
|
+
end; alias enable_action_on_enter_key enable_this_action_on_enter_key # === enable_action_on_enter_key
|
150
|
+
|
151
|
+
# ========================================================================= #
|
152
|
+
# === treat_the_last_comment_as_synonymous_for_on_enter_event
|
153
|
+
#
|
154
|
+
# Pass a block to this method.
|
155
|
+
#
|
156
|
+
# Usage example:
|
157
|
+
#
|
158
|
+
# @entry = entry
|
159
|
+
# @entry.treat_the_last_comment_as_synonymous_for_on_enter_event {
|
160
|
+
# run_this_method(@entry)
|
161
|
+
# }
|
162
|
+
#
|
163
|
+
# ========================================================================= #
|
164
|
+
def treat_the_last_comment_as_synonymous_for_on_enter_event(&block)
|
165
|
+
on_changed {|widget, event| # event is probably nil.
|
166
|
+
new_text = widget.text?
|
167
|
+
if new_text and (new_text[-1, 1] == '#')
|
168
|
+
if block_given?
|
169
|
+
yield
|
170
|
+
end
|
171
|
+
# =================================================================== #
|
172
|
+
# Next we must remove the last character:
|
173
|
+
# =================================================================== #
|
174
|
+
widget.set_text(new_text[0 .. -2])
|
175
|
+
true
|
176
|
+
else
|
177
|
+
false
|
178
|
+
end
|
179
|
+
}
|
180
|
+
end
|
181
|
+
|
182
|
+
# ========================================================================= #
|
183
|
+
# === on_enter_event_select_this
|
184
|
+
# ========================================================================= #
|
185
|
+
def on_enter_event_select_this
|
186
|
+
on_button_press_event { |widget, event|
|
187
|
+
set_focus(true)
|
188
|
+
select_region(0, -1)
|
189
|
+
}
|
190
|
+
end
|
65
191
|
|
66
192
|
# ========================================================================= #
|
67
193
|
# === make_scrollable
|
68
194
|
# ========================================================================= #
|
69
195
|
def make_scrollable
|
70
196
|
add_events(:scroll_mask)
|
197
|
+
end; alias respond_to_scroll_events make_scrollable # === respond_to_scroll_events
|
198
|
+
|
199
|
+
# ========================================================================= #
|
200
|
+
# === on_click_colour_change_to_this_colour
|
201
|
+
#
|
202
|
+
# The first argument is the colour to which you want to change the entry
|
203
|
+
# to.
|
204
|
+
#
|
205
|
+
# The second argument (a Hash) may contain the key :duration, which is
|
206
|
+
# used to denote when to revert to the old default.
|
207
|
+
#
|
208
|
+
# Usage example:
|
209
|
+
#
|
210
|
+
# on_click_colour_change_to_this_colour(:steelblue, { duration: 3 })
|
211
|
+
#
|
212
|
+
# ========================================================================= #
|
213
|
+
def on_click_colour_change_to_this_colour(
|
214
|
+
use_this_colour = :mintcream,
|
215
|
+
hash = {}
|
216
|
+
)
|
217
|
+
signal_connect(:event) {|widget, event|
|
218
|
+
if ::Gtk.event_left_mouse_button_click?(event)
|
219
|
+
old_name = name # Keep track of the original colour.
|
220
|
+
set_name(use_this_colour.to_s)
|
221
|
+
Thread.new {
|
222
|
+
duration = hash[:duration] # Assume n seconds here.
|
223
|
+
sleep duration
|
224
|
+
set_name(old_name)
|
225
|
+
}.join
|
226
|
+
end
|
227
|
+
}
|
71
228
|
end
|
72
229
|
|
230
|
+
# ========================================================================= #
|
231
|
+
# === deselect_everything
|
232
|
+
# ========================================================================= #
|
233
|
+
def deselect_everything
|
234
|
+
set_focus(false)
|
235
|
+
select_region(0, 0)
|
236
|
+
end
|
237
|
+
|
238
|
+
# ========================================================================= #
|
239
|
+
# === allow_only_numbers
|
240
|
+
#
|
241
|
+
# This method accepts one main argument, which should be your Gtk widget.
|
242
|
+
# Usually this will be a Gtk::Entry by default.
|
243
|
+
#
|
244
|
+
# This widget will then only react to NUMBERS input given, such as 1, 3
|
245
|
+
# or 8. Other input will be rejected.
|
246
|
+
#
|
247
|
+
# That way you can make "input-fields" that will only have numbers, and
|
248
|
+
# no other characters allowed. The user then is assisted to provide
|
249
|
+
# only# valid input, and avoid faulty, unwanted input.
|
250
|
+
#
|
251
|
+
# Do note that a specialized Widget also exists, called
|
252
|
+
# NumbersOnly (in the file aptly named numbers_only.rb).
|
253
|
+
# ========================================================================= #
|
254
|
+
def allow_only_numbers(
|
255
|
+
be_not_too_strict = true
|
256
|
+
)
|
257
|
+
case be_not_too_strict
|
258
|
+
# ========================================================================= #
|
259
|
+
# === :default
|
260
|
+
# ========================================================================= #
|
261
|
+
when :default
|
262
|
+
be_not_too_strict = true
|
263
|
+
end
|
264
|
+
signal_connect(:key_press_event) { |widget, event|
|
265
|
+
keyval = Gdk::Keyval.to_name(event.keyval)
|
266
|
+
case keyval
|
267
|
+
when /\d/
|
268
|
+
false
|
269
|
+
else
|
270
|
+
if be_not_too_strict
|
271
|
+
# ================================================================= #
|
272
|
+
# === Only escape BackSpace in this case
|
273
|
+
# ================================================================= #
|
274
|
+
case keyval
|
275
|
+
when 'BackSpace'
|
276
|
+
false
|
277
|
+
else
|
278
|
+
true
|
279
|
+
end
|
280
|
+
else
|
281
|
+
true
|
282
|
+
end
|
283
|
+
end
|
284
|
+
}
|
285
|
+
end; alias allow_only_numbers_as_input allow_only_numbers # === allow_only_numbers_as_input
|
286
|
+
alias accept_only_numbers_as_input allow_only_numbers # === accept_only_numbers_as_input
|
287
|
+
|
73
288
|
# ========================================================================= #
|
74
289
|
# === simple_completion
|
75
290
|
#
|
@@ -93,6 +308,7 @@ class Entry # === Gtk::Entry
|
|
93
308
|
def set_read_only
|
94
309
|
self.editable = false
|
95
310
|
end; alias may_not_be_modified set_read_only # === may_not_be_modified
|
311
|
+
alias can_not_be_modified set_read_only # === can_not_be_modified
|
96
312
|
alias disable_user_input set_read_only # === disable_user_input
|
97
313
|
alias disallow_changes set_read_only # === disallow_changes
|
98
314
|
alias the_user_may_not_modify_this_entry set_read_only # === the_user_may_not_modify_this_entry
|
@@ -113,33 +329,6 @@ class Entry # === Gtk::Entry
|
|
113
329
|
set_text("#{self.text}#{this_text}")
|
114
330
|
end
|
115
331
|
|
116
|
-
# ========================================================================= #
|
117
|
-
# === move_cursor_to_the_most_right_position
|
118
|
-
# ========================================================================= #
|
119
|
-
def move_cursor_to_the_most_right_position
|
120
|
-
self.position = -1
|
121
|
-
end; alias cursor_is_to_the_right move_cursor_to_the_most_right_position # === cursor_is_to_the_right
|
122
|
-
alias cursor_is_right move_cursor_to_the_most_right_position # === cursor_is_right
|
123
|
-
|
124
|
-
# ========================================================================= #
|
125
|
-
# === ghost_text
|
126
|
-
#
|
127
|
-
# This is essentially a placeholder text, as a hint, which was added
|
128
|
-
# in gtk3.
|
129
|
-
# ========================================================================= #
|
130
|
-
if ::Gtk.use_gtk3?
|
131
|
-
alias ghost_text set_placeholder_text # === ghost_text
|
132
|
-
alias shadow_hint= set_placeholder_text # === shadow_hint=
|
133
|
-
alias shadow_text= set_placeholder_text # === shadow_text=
|
134
|
-
else
|
135
|
-
# ======================================================================= #
|
136
|
-
# === ghost_text
|
137
|
-
# ======================================================================= #
|
138
|
-
def ghost_text(i)
|
139
|
-
set_text(i)
|
140
|
-
end
|
141
|
-
end
|
142
|
-
|
143
332
|
# ========================================================================= #
|
144
333
|
# === do_upcase_the_first_character
|
145
334
|
# ========================================================================= #
|
@@ -149,6 +338,15 @@ class Entry # === Gtk::Entry
|
|
149
338
|
set_text(_)
|
150
339
|
end
|
151
340
|
|
341
|
+
# ========================================================================= #
|
342
|
+
# === do_upcase
|
343
|
+
#
|
344
|
+
# This method will upcase the text of the entry at hand.
|
345
|
+
# ========================================================================= #
|
346
|
+
def do_upcase
|
347
|
+
set_text(text?.to_s.upcase)
|
348
|
+
end
|
349
|
+
|
152
350
|
# ========================================================================= #
|
153
351
|
# === on_click_highlight_all
|
154
352
|
#
|
@@ -174,8 +372,9 @@ class Entry # === Gtk::Entry
|
|
174
372
|
# ========================================================================= #
|
175
373
|
# === enable_search_icon
|
176
374
|
# ========================================================================= #
|
177
|
-
def enable_search_icon
|
178
|
-
|
375
|
+
def enable_search_icon(
|
376
|
+
icon_name = 'system-search-symbolic'
|
377
|
+
)
|
179
378
|
set_icon_from_icon_name(
|
180
379
|
::Gtk::EntryIconPosition::PRIMARY,
|
181
380
|
icon_name
|
@@ -203,24 +402,6 @@ class Entry # === Gtk::Entry
|
|
203
402
|
set_visibility(false)
|
204
403
|
end; alias dissappear do_disappear # === dissappear
|
205
404
|
|
206
|
-
# ========================================================================= #
|
207
|
-
# === on_enter_event_select_this
|
208
|
-
# ========================================================================= #
|
209
|
-
def on_enter_event_select_this
|
210
|
-
on_button_press_event { |widget, event|
|
211
|
-
set_focus(true)
|
212
|
-
select_region(0, -1)
|
213
|
-
}
|
214
|
-
end
|
215
|
-
|
216
|
-
# ========================================================================= #
|
217
|
-
# === deselect_everything
|
218
|
-
# ========================================================================= #
|
219
|
-
def deselect_everything
|
220
|
-
set_focus(false)
|
221
|
-
select_region(0, 0)
|
222
|
-
end
|
223
|
-
|
224
405
|
# ========================================================================= #
|
225
406
|
# === deselect_all_on_click_event
|
226
407
|
# ========================================================================= #
|
@@ -263,33 +444,6 @@ class Entry # === Gtk::Entry
|
|
263
444
|
self.inner_border = ::Gtk::Border.new(i[0], i[1], i[2], i[3])
|
264
445
|
end; alias inner_padding= border # === inner_padding=
|
265
446
|
|
266
|
-
# ========================================================================= #
|
267
|
-
# === allow_only_numbers
|
268
|
-
# ========================================================================= #
|
269
|
-
def allow_only_numbers(b = :default)
|
270
|
-
::Gtk.allow_only_numbers(self, b)
|
271
|
-
end; alias allow_only_numbers_as_input allow_only_numbers # === allow_only_numbers_as_input
|
272
|
-
|
273
|
-
# ========================================================================= #
|
274
|
-
# === on_click_colour_change_to_this_colour
|
275
|
-
# ========================================================================= #
|
276
|
-
def on_click_colour_change_to_this_colour(
|
277
|
-
use_this_colour = :mintcream,
|
278
|
-
hash = {}
|
279
|
-
)
|
280
|
-
signal_connect(:event) {|widget, event|
|
281
|
-
if ::Gtk.event_left_mouse_button_click?(event)
|
282
|
-
old_name = name # Keep track of the original colour.
|
283
|
-
set_name(use_this_colour.to_s)
|
284
|
-
Thread.new {
|
285
|
-
duration = hash[:duration]
|
286
|
-
sleep duration
|
287
|
-
set_name(old_name)
|
288
|
-
}.join
|
289
|
-
end
|
290
|
-
}
|
291
|
-
end
|
292
|
-
|
293
447
|
# ========================================================================= #
|
294
448
|
# === return_input
|
295
449
|
# ========================================================================= #
|
@@ -304,13 +458,6 @@ class Entry # === Gtk::Entry
|
|
304
458
|
return_input.empty?
|
305
459
|
end
|
306
460
|
|
307
|
-
# ========================================================================= #
|
308
|
-
# === align_to_the_right
|
309
|
-
# ========================================================================= #
|
310
|
-
def align_to_the_right
|
311
|
-
self.xalign = 1
|
312
|
-
end
|
313
|
-
|
314
461
|
# ========================================================================= #
|
315
462
|
# === default=
|
316
463
|
#
|
@@ -335,17 +482,6 @@ class Entry # === Gtk::Entry
|
|
335
482
|
end
|
336
483
|
end
|
337
484
|
|
338
|
-
# ========================================================================= #
|
339
|
-
# === enable_this_action_on_enter_key
|
340
|
-
#
|
341
|
-
# This method only works for actions associated with the entry-widget.
|
342
|
-
# ========================================================================= #
|
343
|
-
def enable_this_action_on_enter_key(this_method)
|
344
|
-
on_key_press_event { |widget, event|
|
345
|
-
send(this_method)
|
346
|
-
}
|
347
|
-
end; alias enable_action_on_enter_key enable_this_action_on_enter_key # === enable_action_on_enter_key
|
348
|
-
|
349
485
|
# ========================================================================= #
|
350
486
|
# === clear
|
351
487
|
#
|
@@ -372,27 +508,12 @@ class Entry # === Gtk::Entry
|
|
372
508
|
select_region(0, -1)
|
373
509
|
end; alias select_everything do_select_everything # === select_everything
|
374
510
|
|
375
|
-
# ========================================================================= #
|
376
|
-
# === try_to_remove_the_last_character
|
377
|
-
#
|
378
|
-
# This method will try to remove the last character, if there is
|
379
|
-
# any text. Minimum text will be ''.
|
380
|
-
# ========================================================================= #
|
381
|
-
def try_to_remove_the_last_character
|
382
|
-
_ = text?
|
383
|
-
if _.size > 0
|
384
|
-
set_text(_[0 .. -2].to_s)
|
385
|
-
end
|
386
|
-
end
|
387
|
-
|
388
511
|
# ========================================================================= #
|
389
512
|
# === allow_enter
|
390
513
|
# ========================================================================= #
|
391
514
|
def allow_enter
|
392
515
|
set_activates_default(true)
|
393
|
-
end
|
394
|
-
|
395
|
-
alias set_maxsize set_max_length # === set_maxsize
|
516
|
+
end; alias enable_enter_event allow_enter # === enable_enter_event
|
396
517
|
|
397
518
|
end
|
398
519
|
|
@@ -415,10 +536,21 @@ end
|
|
415
536
|
def self.input_field(
|
416
537
|
i = :default, &block
|
417
538
|
)
|
418
|
-
entry = Gtk::Entry.new
|
539
|
+
entry = Gtk::Entry.new
|
540
|
+
if i
|
541
|
+
case i
|
542
|
+
# ======================================================================= #
|
543
|
+
# === :default
|
544
|
+
# ======================================================================= #
|
545
|
+
when :default
|
546
|
+
i = ''
|
547
|
+
end
|
548
|
+
entry.set_text(i)
|
549
|
+
end
|
419
550
|
if block_given?
|
420
551
|
yielded = yield
|
421
552
|
if yielded.is_a? Hash
|
553
|
+
# === :max_length
|
422
554
|
if yielded.has_key? :max_length
|
423
555
|
entry.set_max_length(yielded.delete(:max_length))
|
424
556
|
end
|
@@ -42,6 +42,10 @@ class EntryCompletion # === Gtk::EntryCompletion
|
|
42
42
|
#
|
43
43
|
# This currently only works for ruby-gtk3. Not sure if we should enable
|
44
44
|
# it for ruby-gtk2 as well.
|
45
|
+
#
|
46
|
+
# Note that this may lead to a few problems, so it is almost always
|
47
|
+
# better to only enable the events that you really really need in
|
48
|
+
# your application.
|
45
49
|
# ========================================================================= #
|
46
50
|
def enable_all_events(
|
47
51
|
i = Gdk::EventMask::ALL_EVENTS_MASK
|
@@ -8,7 +8,7 @@
|
|
8
8
|
# =========================================================================== #
|
9
9
|
module Gtk
|
10
10
|
|
11
|
-
class EventBox
|
11
|
+
class EventBox # === Gtk::EventBox
|
12
12
|
|
13
13
|
# ========================================================================= #
|
14
14
|
# === on_click_event
|
@@ -41,4 +41,23 @@ class EventBox
|
|
41
41
|
y
|
42
42
|
end; alias y_coordinate? y_position? # === y_coordinate?
|
43
43
|
|
44
|
-
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# =========================================================================== #
|
47
|
+
# === Gtk.event_box
|
48
|
+
#
|
49
|
+
# If an argument is supplied to this method then it is assumed that
|
50
|
+
# the user wants to attach a particular widget to a Gtk::EventBox,
|
51
|
+
# as-is.
|
52
|
+
# =========================================================================== #
|
53
|
+
def self.event_box(
|
54
|
+
optional_argument = nil
|
55
|
+
)
|
56
|
+
if optional_argument
|
57
|
+
::Gtk::EventBox.new.add(optional_argument)
|
58
|
+
else
|
59
|
+
::Gtk::EventBox.new
|
60
|
+
end
|
61
|
+
end; self.instance_eval { alias eventbox event_box } # === Gtk.eventbox
|
62
|
+
|
63
|
+
end
|
@@ -8,7 +8,7 @@
|
|
8
8
|
# =========================================================================== #
|
9
9
|
module Gdk
|
10
10
|
|
11
|
-
class EventButton
|
11
|
+
class EventButton # === Gdk::EventButton
|
12
12
|
|
13
13
|
# ========================================================================= #
|
14
14
|
# === x_position?
|
@@ -9,7 +9,14 @@ module Gtk
|
|
9
9
|
|
10
10
|
class Expander # === Gtk::Expander
|
11
11
|
|
12
|
-
|
12
|
+
require 'gtk_paradise/toplevel_methods/determine_which_gtk_version_is_in_use.rb'
|
13
|
+
|
14
|
+
# ========================================================================= #
|
15
|
+
# === attach_to_this_widget
|
16
|
+
# ========================================================================= #
|
17
|
+
unless Gtk.do_we_use_gtk4?
|
18
|
+
alias attach_to_this_widget add
|
19
|
+
end
|
13
20
|
|
14
21
|
# ========================================================================= #
|
15
22
|
# === do_expand
|
@@ -8,7 +8,7 @@
|
|
8
8
|
# =========================================================================== #
|
9
9
|
module Gtk
|
10
10
|
|
11
|
-
class FileChooserDialog
|
11
|
+
class FileChooserDialog # === Gtk::FileChooserDialog
|
12
12
|
|
13
13
|
alias add_directory add_shortcut_folder # === add_directory
|
14
14
|
alias add_this_directory add_shortcut_folder # === add_this_directory
|
@@ -6,7 +6,7 @@
|
|
6
6
|
# =========================================================================== #
|
7
7
|
module Gtk
|
8
8
|
|
9
|
-
class FileFilter
|
9
|
+
class FileFilter # === Gtk::FileFilter
|
10
10
|
|
11
11
|
# ========================================================================= #
|
12
12
|
# === custom_filter
|
@@ -14,7 +14,9 @@ class FileFilter
|
|
14
14
|
# This method allows us to add a custom-filter, e. g. for all "*.rb"
|
15
15
|
# files or other file types.
|
16
16
|
# ========================================================================= #
|
17
|
-
def custom_filter(
|
17
|
+
def custom_filter(
|
18
|
+
i = nil
|
19
|
+
)
|
18
20
|
if i
|
19
21
|
i = i.to_s unless i.is_a? String
|
20
22
|
i = i.dup if i.frozen?
|
@@ -16,15 +16,16 @@ module Gtk
|
|
16
16
|
# main GTK dialog.
|
17
17
|
# ========================================================================= #
|
18
18
|
def self.file_selection(
|
19
|
-
border_width
|
19
|
+
border_width = 5,
|
20
|
+
window_position = :mouse
|
20
21
|
)
|
21
22
|
if do_we_use_gtk2?
|
22
23
|
file_selection = ::Gtk::FileSelection.new('file selection dialog')
|
23
|
-
|
24
|
+
window_position = ::Gtk::Window::POS_MOUSE
|
24
25
|
else # else assume we use ruby-gtk3.
|
25
26
|
file_selection = ::Gtk::FileChooserDialog.new(title: 'file selection dialog')
|
26
|
-
file_selection.window_position = :mouse
|
27
27
|
end
|
28
|
+
file_selection.window_position = window_position
|
28
29
|
|
29
30
|
file_selection.border_width = border_width
|
30
31
|
return_value = file_selection.run # Run it here.
|
@@ -11,10 +11,28 @@ module Gtk
|
|
11
11
|
|
12
12
|
class Frame # === Gtk::Frame
|
13
13
|
|
14
|
+
require 'gtk_paradise/toplevel_methods/determine_which_gtk_version_is_in_use.rb'
|
15
|
+
|
14
16
|
# ========================================================================= #
|
15
17
|
# === add_this_widget
|
18
|
+
#
|
19
|
+
# This does not work for ruby-gtk4.
|
20
|
+
# ========================================================================= #
|
21
|
+
unless Gtk.do_we_use_gtk4?
|
22
|
+
alias add_this_widget add
|
23
|
+
end
|
24
|
+
|
25
|
+
# ========================================================================= #
|
26
|
+
# === use_etched_in_shadow
|
16
27
|
# ========================================================================= #
|
17
|
-
|
28
|
+
def use_etched_in_shadow(
|
29
|
+
i = :etched_in # Default value for ruby-gtk3.
|
30
|
+
)
|
31
|
+
if ::Gtk.use_gtk2?
|
32
|
+
i = ::Gtk::SHADOW_ETCHED_IN
|
33
|
+
end
|
34
|
+
set_shadow_type(i)
|
35
|
+
end; alias etched_in_shadow use_etched_in_shadow # === etched_in_shadow
|
18
36
|
|
19
37
|
# ========================================================================= #
|
20
38
|
# === set_text
|