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
@@ -62,16 +62,7 @@ class HtmlLikeSupport < ::Gtk::Box
|
|
62
62
|
# ======================================================================= #
|
63
63
|
# === @title
|
64
64
|
# ======================================================================= #
|
65
|
-
|
66
|
-
# ======================================================================= #
|
67
|
-
# === @width
|
68
|
-
# ======================================================================= #
|
69
|
-
set_width(WIDTH)
|
70
|
-
# ======================================================================= #
|
71
|
-
# === @height
|
72
|
-
# ======================================================================= #
|
73
|
-
set_height(HEIGHT)
|
74
|
-
set_use_this_font(:dejavu_condensed_22)
|
65
|
+
title_width_height_font(TITLE, WIDTH, HEIGHT, :dejavu_condensed_22)
|
75
66
|
use_gtk_paradise_project_css_file
|
76
67
|
infer_the_size_automatically
|
77
68
|
# ======================================================================= #
|
@@ -97,7 +88,7 @@ class HtmlLikeSupport < ::Gtk::Box
|
|
97
88
|
# === padding?
|
98
89
|
# ========================================================================= #
|
99
90
|
def padding?
|
100
|
-
|
91
|
+
4
|
101
92
|
end
|
102
93
|
|
103
94
|
# ========================================================================= #
|
@@ -132,19 +123,7 @@ class HtmlLikeSupport < ::Gtk::Box
|
|
132
123
|
button1.css_class 'blightgreen5'
|
133
124
|
button1.disallow_resizing
|
134
125
|
|
135
|
-
button2 = gtk_button('Button #2')
|
136
|
-
button2.width_height(30, 30)
|
137
|
-
button2.css_class 'bblack5'
|
138
|
-
button2.disallow_resizing
|
139
|
-
|
140
|
-
button3 = gtk_button('Button #3')
|
141
|
-
button3.width_height(30, 30)
|
142
|
-
button3.css_class 'bgreen5'
|
143
|
-
button3.disallow_resizing
|
144
|
-
|
145
126
|
minimal(button1, 3)
|
146
|
-
minimal(button2, 3)
|
147
|
-
minimal(button3, 3)
|
148
127
|
minimal(text('Next, showing a transparent widget'))
|
149
128
|
button4 = gtk_button('Button #4')
|
150
129
|
button4.width_height(30, 30)
|
@@ -163,12 +142,12 @@ class HtmlLikeSupport < ::Gtk::Box
|
|
163
142
|
text = gtk_text('Yoda Text')
|
164
143
|
text.css_class('BG_Black')
|
165
144
|
text.css_class('yoda')
|
166
|
-
text.
|
145
|
+
text.pad8px
|
167
146
|
text.make_selectable
|
168
147
|
minimal(text, 3)
|
169
148
|
|
170
149
|
p {
|
171
|
-
|
150
|
+
selectable_label 'Der Meeresboden ist mit Haifischzähnen übersät weil sie '\
|
172
151
|
'aus einer der härtesten biologischen Substanzen besteht.'
|
173
152
|
}
|
174
153
|
|
@@ -21,17 +21,18 @@ r.use_this_font(:hack_30)
|
|
21
21
|
hbox = Gtk.vbox
|
22
22
|
Gtk.project_css_file
|
23
23
|
|
24
|
-
hbox.
|
24
|
+
hbox.pad8px
|
25
25
|
hbox.show_all
|
26
26
|
|
27
27
|
entry1 = Gtk.entry('')
|
28
|
+
# entry1.on_click_colour_change_to_this_colour(:steelblue, { duration: 3 })
|
28
29
|
entry1.enable_all_events
|
29
30
|
entry1.signal_connect(:event) {|widget, event|
|
30
31
|
|
31
32
|
if event.event_type.name == 'GDK_ENTER_NOTIFY' # on-mouse-hover
|
32
33
|
entry1.clear_background
|
33
|
-
entry1.remove_css_class('royalblue')
|
34
|
-
entry1.css_class('tomato')
|
34
|
+
entry1.remove_css_class('royalblue') # Remove the old CSS class.
|
35
|
+
entry1.css_class('tomato') # Add the new CSS class.
|
35
36
|
Thread.new {
|
36
37
|
sleep(DELAY_FOR_N_SECONDS)
|
37
38
|
entry1.remove_css_class('tomato')
|
@@ -70,7 +71,6 @@ entry2.background(:tomato)
|
|
70
71
|
entry2.css_class('black')
|
71
72
|
hbox.pack_start(entry2, expand: true, fill: true, padding: 6)
|
72
73
|
|
73
|
-
|
74
74
|
scrolled_window = Gtk.scrolled_window(hbox) { :always }
|
75
75
|
scrolled_window.width_height(700, 200)
|
76
76
|
r << scrolled_window
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# Encoding: UTF-8
|
3
3
|
# frozen_string_literal: true
|
4
4
|
# =========================================================================== #
|
5
|
-
# require 'gtk_paradise/example/advanced/
|
5
|
+
# require 'gtk_paradise/example/advanced/005_csv_example.rb'
|
6
6
|
# =========================================================================== #
|
7
7
|
require 'gtk_paradise/require_gtk3'
|
8
8
|
require 'gtk_paradise/run'
|
@@ -12,13 +12,17 @@ require 'gtk_paradise/toplevel_methods/css.rb'
|
|
12
12
|
r = Gtk.run
|
13
13
|
r.increase_font_size
|
14
14
|
hbox = Gtk.hbox
|
15
|
+
# =========================================================================== #
|
16
|
+
# Read in the .csv file next:
|
17
|
+
# =========================================================================== #
|
15
18
|
tree_view = Gtk.read_in_from_this_csv_file(:default, :default, :strip_quotes)
|
16
19
|
tree_view.the_headers_are_resizable
|
17
20
|
Gtk.gtk_paradise_css_file
|
18
21
|
hbox.maximal(tree_view, 10)
|
19
|
-
hbox.
|
22
|
+
hbox.bblack3
|
20
23
|
hbox.show_all
|
21
24
|
scrolled_window = Gtk.scrolled_window(hbox) { :always }
|
22
25
|
r << scrolled_window
|
23
26
|
r.modify_background(:normal, :white)
|
27
|
+
r.width_height(800, 500)
|
24
28
|
r.top_left_then_run
|
@@ -68,16 +68,7 @@ class LabelRespondingToEventsExample < ::Gtk::Box
|
|
68
68
|
# ======================================================================= #
|
69
69
|
# === @title
|
70
70
|
# ======================================================================= #
|
71
|
-
|
72
|
-
# ======================================================================= #
|
73
|
-
# === @width
|
74
|
-
# ======================================================================= #
|
75
|
-
set_width(WIDTH)
|
76
|
-
# ======================================================================= #
|
77
|
-
# === @height
|
78
|
-
# ======================================================================= #
|
79
|
-
set_height(HEIGHT)
|
80
|
-
set_use_this_font(USE_THIS_FONT)
|
71
|
+
title_width_height_font(TITLE, WIDTH, HEIGHT, USE_THIS_FONT)
|
81
72
|
use_gtk_paradise_project_css_file
|
82
73
|
infer_the_size_automatically
|
83
74
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
# =========================================================================== #
|
7
7
|
require 'gtk_paradise/require_gtk3'
|
8
8
|
require 'gtk_paradise/run'
|
9
|
-
require 'gtk_paradise/toplevel_methods/
|
9
|
+
require 'gtk_paradise/toplevel_methods/toplevel_methods.rb'
|
10
10
|
require 'gtk_paradise/toplevel_methods/css.rb'
|
11
11
|
require 'gtk_paradise/gtk_classes/radio_button.rb'
|
12
12
|
|
@@ -27,15 +27,18 @@ vbox, array_radio_buttons = ::Gtk.options(
|
|
27
27
|
'choice 10'
|
28
28
|
]
|
29
29
|
)
|
30
|
-
vbox.
|
30
|
+
vbox.bblack3
|
31
31
|
vbox.show_all
|
32
32
|
scrolled_window = Gtk.scrolled_window(vbox) { :always }
|
33
33
|
scrolled_window.set_size_request(500, 300)
|
34
34
|
vbox = Gtk.vbox
|
35
35
|
vbox.maximal(scrolled_window, 15)
|
36
|
+
vbox.set_border_width(10)
|
36
37
|
button = Gtk.button('Output the current selection')
|
38
|
+
button.remove_background
|
37
39
|
button.bblack2
|
38
|
-
button.
|
40
|
+
button.pad2px
|
41
|
+
button.on_hover_colour(:lightblue)
|
39
42
|
button.on_clicked {
|
40
43
|
_ = array_radio_buttons.select {|entry| entry.active? }
|
41
44
|
_ = _.first if _.is_a? Array
|
@@ -68,16 +68,7 @@ class ExtensiveTextViewExample < ::Gtk::Box
|
|
68
68
|
# ======================================================================= #
|
69
69
|
# === @title
|
70
70
|
# ======================================================================= #
|
71
|
-
|
72
|
-
# ======================================================================= #
|
73
|
-
# === @width
|
74
|
-
# ======================================================================= #
|
75
|
-
set_width(WIDTH)
|
76
|
-
# ======================================================================= #
|
77
|
-
# === @height
|
78
|
-
# ======================================================================= #
|
79
|
-
set_height(HEIGHT)
|
80
|
-
set_use_this_font(USE_THIS_FONT)
|
71
|
+
title_width_height_font(TITLE, WIDTH, HEIGHT, USE_THIS_FONT)
|
81
72
|
gtk_paradise_project_file
|
82
73
|
infer_the_size_automatically
|
83
74
|
end
|
@@ -86,20 +77,29 @@ class ExtensiveTextViewExample < ::Gtk::Box
|
|
86
77
|
# === padding?
|
87
78
|
# ========================================================================= #
|
88
79
|
def padding?
|
89
|
-
|
80
|
+
6
|
90
81
|
end
|
91
82
|
|
92
83
|
# ========================================================================= #
|
93
84
|
# === border_size?
|
94
85
|
# ========================================================================= #
|
95
86
|
def border_size?
|
96
|
-
|
87
|
+
4
|
97
88
|
end
|
98
89
|
|
99
90
|
# ========================================================================= #
|
100
91
|
# === create_skeleton (create tag)
|
101
92
|
# ========================================================================= #
|
102
93
|
def create_skeleton
|
94
|
+
create_the_text_buffer
|
95
|
+
end
|
96
|
+
|
97
|
+
# ========================================================================= #
|
98
|
+
# === create_the_text_buffer
|
99
|
+
# ========================================================================= #
|
100
|
+
def create_the_text_buffer
|
101
|
+
@text_buffer = gtk_text_buffer("Testing one two three\n" * 50)
|
102
|
+
@text_buffer.read_only
|
103
103
|
end
|
104
104
|
|
105
105
|
# ========================================================================= #
|
@@ -107,26 +107,27 @@ class ExtensiveTextViewExample < ::Gtk::Box
|
|
107
107
|
# ========================================================================= #
|
108
108
|
def connect_skeleton
|
109
109
|
abort_on_exception
|
110
|
-
label =
|
110
|
+
label = left_aligned_label(
|
111
111
|
'This tests a few things in regards to a <b>gtk-text-view widget</b>.'
|
112
112
|
)
|
113
113
|
label.do_markify
|
114
114
|
minimal(label, 2)
|
115
|
-
@text_buffer = gtk_text_buffer("Testing one two three\n"*50)
|
116
|
-
@text_buffer.read_only
|
117
115
|
@text_view = gtk_text_view(@text_buffer)
|
118
116
|
scrolled_window = gtk_scrolled_window(@text_view) { :only_top_to_bottom }
|
119
117
|
scrolled_window.bblack2
|
120
118
|
scrolled_window.width_height(800, 800)
|
121
119
|
scrolled_window.set_border_width(25)
|
122
120
|
add(scrolled_window)
|
123
|
-
button_get_selection =
|
121
|
+
button_get_selection = bold_button('_Get selection')
|
122
|
+
button_get_selection.clear_background
|
124
123
|
button_get_selection.bblack2
|
124
|
+
button_get_selection.on_hover_colour(:lightgreen)
|
125
125
|
button_get_selection.on_clicked {
|
126
126
|
# ===================================================================== #
|
127
127
|
# Simply show the selected text in this case.
|
128
128
|
# ===================================================================== #
|
129
|
-
|
129
|
+
selected_text = @text_buffer.selected_text?.to_s
|
130
|
+
e ::Colours.steelblue(selected_text)
|
130
131
|
}
|
131
132
|
hbox = gtk_hbox
|
132
133
|
hbox.minimal(button_get_selection, 2)
|
@@ -9,7 +9,7 @@
|
|
9
9
|
require 'gtk_paradise/require_gtk3'
|
10
10
|
require 'gtk_paradise/requires/require_the_base_module.rb'
|
11
11
|
require 'gtk_paradise/run'
|
12
|
-
require 'gtk_paradise/toplevel_methods/
|
12
|
+
require 'gtk_paradise/toplevel_methods/toplevel_methods.rb'
|
13
13
|
require 'gtk_paradise/toplevel_methods/css.rb'
|
14
14
|
require 'gtk_paradise/gtk_classes/radio_button.rb'
|
15
15
|
require 'gtk_paradise/gtk_classes/widget.rb'
|
@@ -33,14 +33,14 @@ fixed.set_size_request(440, 440)
|
|
33
33
|
N_ITERATIONS = 15
|
34
34
|
|
35
35
|
@vbox = Gtk.vbox
|
36
|
-
@vbox.
|
36
|
+
@vbox.bblack3
|
37
37
|
@vbox.css_class('BG_blue')
|
38
38
|
@vbox.show_all
|
39
39
|
@vbox.set_size_request(50, 50)
|
40
40
|
@vbox.background_color(:royalblue)
|
41
41
|
|
42
42
|
@vbox2 = Gtk.vbox
|
43
|
-
@vbox2.
|
43
|
+
@vbox2.bblack3
|
44
44
|
@vbox2.css_class('BG_green')
|
45
45
|
@vbox2.show_all
|
46
46
|
@vbox2.set_size_request(50, 50)
|
@@ -8,8 +8,7 @@
|
|
8
8
|
# =========================================================================== #
|
9
9
|
require 'gtk_paradise/require_gtk3'
|
10
10
|
require 'gtk_paradise/run'
|
11
|
-
require 'gtk_paradise/toplevel_methods/
|
12
|
-
require 'gtk_paradise/toplevel_methods/css.rb'
|
11
|
+
require 'gtk_paradise/toplevel_methods/toplevel_methods.rb'
|
13
12
|
require 'gtk_paradise/gtk_classes/radio_button.rb'
|
14
13
|
require 'gtk_paradise/gtk_classes/tree_view.rb'
|
15
14
|
|
@@ -34,7 +33,7 @@ def custom_cell_data_func(
|
|
34
33
|
red = (text[1, 3]* 16).to_f / 255
|
35
34
|
green = (text[3, 5]* 16).to_f / 255
|
36
35
|
blue = (text[5, 7]* 16).to_f / 255
|
37
|
-
renderer.props.background_rgba = Gdk::RGBA.new(red=red, green=green, blue=blue, alpha=1.0)
|
36
|
+
renderer.props.background_rgba = Gdk::RGBA.new(red = red, green = green, blue=blue, alpha=1.0)
|
38
37
|
renderer.props.text = text
|
39
38
|
end
|
40
39
|
|
@@ -70,7 +69,7 @@ column.set_cell_data_func(
|
|
70
69
|
treeview.set_model(store)
|
71
70
|
scrolled_window = Gtk.scrolled_window(treeview) { :automatic }
|
72
71
|
scrolled_window.add(treeview)
|
73
|
-
scrolled_window.
|
72
|
+
scrolled_window.bblack3
|
74
73
|
scrolled_window.set_size_request(500, 300)
|
75
74
|
r.add(scrolled_win)
|
76
75
|
r << vbox
|
@@ -28,7 +28,7 @@ class AdvancedCssExample < ::Gtk::Box
|
|
28
28
|
# ========================================================================= #
|
29
29
|
# === WIDTH
|
30
30
|
# ========================================================================= #
|
31
|
-
WIDTH =
|
31
|
+
WIDTH = '50% or 800px'
|
32
32
|
|
33
33
|
# ========================================================================= #
|
34
34
|
# === HEIGHT
|
@@ -41,48 +41,9 @@ class AdvancedCssExample < ::Gtk::Box
|
|
41
41
|
USE_THIS_FONT = :dejavu_condensed_22
|
42
42
|
|
43
43
|
# ========================================================================= #
|
44
|
-
# ===
|
44
|
+
# === USE_THESE_CSS_RULES
|
45
45
|
# ========================================================================= #
|
46
|
-
|
47
|
-
commandline_arguments = ARGV,
|
48
|
-
run_already = true
|
49
|
-
)
|
50
|
-
super(:vertical)
|
51
|
-
reset
|
52
|
-
set_commandline_arguments(
|
53
|
-
commandline_arguments
|
54
|
-
)
|
55
|
-
run if run_already
|
56
|
-
end
|
57
|
-
|
58
|
-
# ========================================================================= #
|
59
|
-
# === reset (reset tag)
|
60
|
-
# ========================================================================= #
|
61
|
-
def reset
|
62
|
-
reset_the_internal_variables
|
63
|
-
# ======================================================================= #
|
64
|
-
# === @configuration
|
65
|
-
# ======================================================================= #
|
66
|
-
@configuration = [true, __dir__, NAMESPACE]
|
67
|
-
# ======================================================================= #
|
68
|
-
# === @title
|
69
|
-
# ======================================================================= #
|
70
|
-
@title = TITLE
|
71
|
-
# ======================================================================= #
|
72
|
-
# === @width
|
73
|
-
# ======================================================================= #
|
74
|
-
set_width(WIDTH)
|
75
|
-
# ======================================================================= #
|
76
|
-
# === @height
|
77
|
-
# ======================================================================= #
|
78
|
-
set_height(HEIGHT)
|
79
|
-
set_use_this_font(USE_THIS_FONT)
|
80
|
-
use_gtk_paradise_project_css_file
|
81
|
-
infer_the_size_automatically
|
82
|
-
# ======================================================================= #
|
83
|
-
# Add more CSS next:
|
84
|
-
# ======================================================================= #
|
85
|
-
more_CSS_then_apply_it '
|
46
|
+
USE_THESE_CSS_RULES = '
|
86
47
|
.blightgreen5 { border: 8px solid lightgreen; }
|
87
48
|
.bblack5 { border: 8px solid black; }
|
88
49
|
.bgreen5 { border: 8px solid green; }
|
@@ -96,7 +57,7 @@ class AdvancedCssExample < ::Gtk::Box
|
|
96
57
|
}
|
97
58
|
|
98
59
|
.hover1 {
|
99
|
-
font-size:
|
60
|
+
font-size: 50px;
|
100
61
|
background-image: none;
|
101
62
|
border: 2px solid black;
|
102
63
|
}
|
@@ -139,14 +100,74 @@ class AdvancedCssExample < ::Gtk::Box
|
|
139
100
|
}
|
140
101
|
|
141
102
|
|
103
|
+
.background_for_a_fancy_hover_button_effect {
|
104
|
+
background: rgb(242,93,9);
|
105
|
+
background: linear-gradient(180deg, rgba(242,93,9,1) 0%, rgba(243,255,0,1) 100%);
|
106
|
+
margin: 30px;
|
107
|
+
padding: 20px;
|
108
|
+
border-radius: 10px;
|
109
|
+
box-shadow: 0 0 10px rgba(0,0,0,.5);
|
110
|
+
}
|
111
|
+
|
112
|
+
.background_for_a_fancy_hover_button_effect button {
|
113
|
+
background: palevioletred;
|
114
|
+
color: black;
|
115
|
+
border: 4px solid gold;
|
116
|
+
transition: all 600ms ease-in-out;
|
117
|
+
}
|
118
|
+
|
119
|
+
.background_for_a_fancy_hover_button_effect button:hover {
|
120
|
+
box-shadow: 0 0 10px steelblue;
|
121
|
+
padding: 10px 20px;
|
122
|
+
font-size: 150%;
|
123
|
+
}
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
142
128
|
'
|
129
|
+
|
130
|
+
# ========================================================================= #
|
131
|
+
# === initialize
|
132
|
+
# ========================================================================= #
|
133
|
+
def initialize(
|
134
|
+
commandline_arguments = ARGV,
|
135
|
+
run_already = true
|
136
|
+
)
|
137
|
+
super(:vertical)
|
138
|
+
reset
|
139
|
+
set_commandline_arguments(
|
140
|
+
commandline_arguments
|
141
|
+
)
|
142
|
+
run if run_already
|
143
|
+
end
|
144
|
+
|
145
|
+
# ========================================================================= #
|
146
|
+
# === reset (reset tag)
|
147
|
+
# ========================================================================= #
|
148
|
+
def reset
|
149
|
+
reset_the_internal_variables
|
150
|
+
# ======================================================================= #
|
151
|
+
# === @configuration
|
152
|
+
# ======================================================================= #
|
153
|
+
@configuration = [true, __dir__, NAMESPACE]
|
154
|
+
# ======================================================================= #
|
155
|
+
# === @title
|
156
|
+
# ======================================================================= #
|
157
|
+
title_width_height_font(TITLE, WIDTH, HEIGHT, USE_THIS_FONT)
|
158
|
+
use_gtk_paradise_project_css_file
|
159
|
+
infer_the_size_automatically
|
160
|
+
# ======================================================================= #
|
161
|
+
# Add more CSS next:
|
162
|
+
# ======================================================================= #
|
163
|
+
more_CSS USE_THESE_CSS_RULES
|
143
164
|
end
|
144
165
|
|
145
166
|
# ========================================================================= #
|
146
167
|
# === padding?
|
147
168
|
# ========================================================================= #
|
148
169
|
def padding?
|
149
|
-
|
170
|
+
4
|
150
171
|
end
|
151
172
|
|
152
173
|
# ========================================================================= #
|
@@ -206,15 +227,17 @@ class AdvancedCssExample < ::Gtk::Box
|
|
206
227
|
# ======================================================================= #
|
207
228
|
# === Yoda text:
|
208
229
|
# ======================================================================= #
|
209
|
-
text = gtk_text(
|
230
|
+
text = gtk_text(
|
231
|
+
'Yoda Text - with hover and focus effect (called .hover1)'
|
232
|
+
)
|
210
233
|
text.css_class('BG_Black')
|
211
234
|
text.css_class('yoda')
|
212
|
-
text.
|
235
|
+
text.pad8px
|
213
236
|
text.css_class('hover1')
|
214
237
|
text.make_selectable
|
215
238
|
minimal(text, 3)
|
216
239
|
|
217
|
-
entry =
|
240
|
+
entry = gtk_entry('This is a test for Gtk::Entry.')
|
218
241
|
entry.set_name('hover1')
|
219
242
|
minimal(entry, 2)
|
220
243
|
|
@@ -239,16 +262,30 @@ class AdvancedCssExample < ::Gtk::Box
|
|
239
262
|
box.css_class('box_shadow1')
|
240
263
|
minimal(box, 25)
|
241
264
|
|
265
|
+
box = hbox
|
266
|
+
button_stop = gtk_button('Stop')
|
267
|
+
hbox1 = gtk_hbox
|
268
|
+
hbox1.css_class('background_for_a_fancy_hover_button_effect')
|
269
|
+
hbox1.add(button_stop)
|
270
|
+
hbox1.show_all
|
271
|
+
button_stop.on_clicked {
|
272
|
+
e 'A button was clicked.'
|
273
|
+
}
|
274
|
+
box.add(hbox1)
|
275
|
+
minimal(box, 10)
|
242
276
|
end
|
243
277
|
|
244
278
|
# ========================================================================= #
|
245
279
|
# === run (run tag)
|
246
280
|
# ========================================================================= #
|
247
281
|
def run
|
282
|
+
# ======================================================================= #
|
248
283
|
# We have to either manually run the method called apply_the_css_string()
|
249
284
|
# or we will let Gtk::Runner do this for us when .run() is called.
|
250
|
-
apply_the_css_string # For now this has to be called manually.
|
251
|
-
|
285
|
+
# apply_the_css_string # For now this has to be called manually.
|
286
|
+
# ^^^ since as of January 2022 this no longer has to be called manually.
|
287
|
+
# ======================================================================= #
|
288
|
+
super()
|
252
289
|
end
|
253
290
|
|
254
291
|
# ========================================================================= #
|
@@ -31,17 +31,17 @@ class PopupExample < ::Gtk::Box
|
|
31
31
|
end
|
32
32
|
|
33
33
|
# ========================================================================= #
|
34
|
-
# ===
|
34
|
+
# === context_menu_action_number1
|
35
35
|
# ========================================================================= #
|
36
|
-
def
|
37
|
-
e 'This is
|
36
|
+
def context_menu_action_number1
|
37
|
+
e 'This is context menu action 1.'
|
38
38
|
end
|
39
39
|
|
40
40
|
# ========================================================================= #
|
41
|
-
# ===
|
41
|
+
# === context_menu_action_number2
|
42
42
|
# ========================================================================= #
|
43
|
-
def
|
44
|
-
e 'This is
|
43
|
+
def context_menu_action_number2
|
44
|
+
e 'This is context menu action 2.'
|
45
45
|
end
|
46
46
|
|
47
47
|
# ========================================================================= #
|
@@ -59,8 +59,8 @@ class PopupExample < ::Gtk::Box
|
|
59
59
|
@context_menu = create_context_menu(self) {{
|
60
60
|
# n_entries: 12,
|
61
61
|
actions: {
|
62
|
-
'FoobarAction1': :
|
63
|
-
'FoobarAction2': :
|
62
|
+
'FoobarAction1': :context_menu_action_number1,
|
63
|
+
'FoobarAction2': :context_menu_action_number2
|
64
64
|
}
|
65
65
|
}}
|
66
66
|
@context_menu.css_class(
|
@@ -89,7 +89,7 @@ class PopupExample < ::Gtk::Box
|
|
89
89
|
@button = gtk_button('Right click on me, with the mouse button.')
|
90
90
|
@button.disallow_resizing
|
91
91
|
@button.set_size_request(300, 300)
|
92
|
-
@button.
|
92
|
+
@button.bblack2
|
93
93
|
maximal(@button)
|
94
94
|
end
|
95
95
|
|
@@ -57,19 +57,7 @@ class AdvancedButtonExample < ::Gtk::Box
|
|
57
57
|
# === @configuration
|
58
58
|
# ======================================================================= #
|
59
59
|
@configuration = [true, __dir__, NAMESPACE]
|
60
|
-
|
61
|
-
# === @title
|
62
|
-
# ======================================================================= #
|
63
|
-
@title = TITLE
|
64
|
-
# ======================================================================= #
|
65
|
-
# === @width
|
66
|
-
# ======================================================================= #
|
67
|
-
set_width(WIDTH)
|
68
|
-
# ======================================================================= #
|
69
|
-
# === @height
|
70
|
-
# ======================================================================= #
|
71
|
-
set_height(HEIGHT)
|
72
|
-
set_use_this_font(:dejavu_condensed_20)
|
60
|
+
title_width_height_font(TITLE, WIDTH, HEIGHT, :dejavu_condensed_20)
|
73
61
|
use_gtk_paradise_project_css_file
|
74
62
|
infer_the_size_automatically
|
75
63
|
# ======================================================================= #
|
@@ -86,14 +74,14 @@ class AdvancedButtonExample < ::Gtk::Box
|
|
86
74
|
# === padding?
|
87
75
|
# ========================================================================= #
|
88
76
|
def padding?
|
89
|
-
|
77
|
+
6
|
90
78
|
end
|
91
79
|
|
92
80
|
# ========================================================================= #
|
93
81
|
# === border_size?
|
94
82
|
# ========================================================================= #
|
95
83
|
def border_size?
|
96
|
-
|
84
|
+
2
|
97
85
|
end
|
98
86
|
|
99
87
|
# ========================================================================= #
|
@@ -115,11 +103,11 @@ class AdvancedButtonExample < ::Gtk::Box
|
|
115
103
|
button1.css_class('clear_background')
|
116
104
|
button1.css_class('BG_lightgreen')
|
117
105
|
button1.disallow_resizing
|
118
|
-
button1.
|
106
|
+
button1.hover_colour :mistyrose # Test the prelight effect.
|
119
107
|
hbox = gtk_hbox(button1)
|
120
|
-
hbox.
|
121
|
-
|
122
|
-
pack_start(hbox, fill: false, expand: false, padding:
|
108
|
+
hbox.set_border_width(4)
|
109
|
+
hbox.width_height(120, 120)
|
110
|
+
pack_start(hbox, fill: false, expand: false, padding: 5)
|
123
111
|
set_border_width(4)
|
124
112
|
end
|
125
113
|
|
@@ -67,16 +67,7 @@ class LeanCSSExample < ::Gtk::Box
|
|
67
67
|
# ======================================================================= #
|
68
68
|
# === @title
|
69
69
|
# ======================================================================= #
|
70
|
-
|
71
|
-
# ======================================================================= #
|
72
|
-
# === @width
|
73
|
-
# ======================================================================= #
|
74
|
-
set_width(WIDTH)
|
75
|
-
# ======================================================================= #
|
76
|
-
# === @height
|
77
|
-
# ======================================================================= #
|
78
|
-
set_height(HEIGHT)
|
79
|
-
set_use_this_font(USE_THIS_FONT)
|
70
|
+
title_width_height_font(TITLE, WIDTH, HEIGHT, USE_THIS_FONT)
|
80
71
|
use_gtk_paradise_project_css_file
|
81
72
|
infer_the_size_automatically
|
82
73
|
# ======================================================================= #
|
@@ -205,15 +196,21 @@ class LeanCSSExample < ::Gtk::Box
|
|
205
196
|
|
206
197
|
entry = gtk_entry('This is a test for Gtk::Entry.')
|
207
198
|
entry.set_name('hover1')
|
208
|
-
|
199
|
+
entry.yellowish_background
|
200
|
+
entry.bblack1
|
201
|
+
entry.width_height(150, 50)
|
202
|
+
hbox = gtk_vbox
|
203
|
+
hbox.minimal(entry, 5)
|
204
|
+
minimal(hbox, 5)
|
209
205
|
|
210
206
|
box = hbox
|
211
|
-
box.add(
|
207
|
+
box.add(
|
208
|
+
bold_text('This is just some text via box-shadow CSS effects.')
|
209
|
+
)
|
212
210
|
box.css_class('slider1')
|
213
211
|
minimal(box, 15)
|
214
212
|
|
215
213
|
minimal(box, 25)
|
216
|
-
|
217
214
|
end
|
218
215
|
|
219
216
|
# ========================================================================= #
|