gtk_paradise 0.12.25 → 0.13.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (393) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +997 -1065
  3. data/bin/gtk_display_this_file +0 -2
  4. data/bin/run_this_widget +7 -0
  5. data/doc/README.gen +995 -1063
  6. data/doc/todo/recurring_todo_tasks.md +8 -8
  7. data/doc/todo/{TODO_FOR_THE_GTK_EDITOR.md → todo_for_the_gtk_editor.md} +4 -3
  8. data/doc/todo/{TODO_FOR_THE_GTK_PARADISE_PROJECT.md → todo_for_the_gtk_paradise_project.md} +55 -36
  9. data/gtk_paradise.gemspec +0 -7
  10. data/lib/gtk_paradise/base_module/base_module.rb +5965 -5054
  11. data/lib/gtk_paradise/base_module/internal_hash_module/internal_hash_module.rb +205 -0
  12. data/lib/gtk_paradise/{base_module_and_app_module/base_module_and_app_module.rb → base_module_and_run_module/base_module_and_run_module.rb} +5 -5
  13. data/lib/gtk_paradise/{base_module/widgets/widgets.rb → base_module_widgets/base_module_widgets.rb} +28 -5
  14. data/lib/gtk_paradise/{css_files → cascading_style_sheets}/colours.css +58 -57
  15. data/lib/gtk_paradise/{css_files → cascading_style_sheets}/css_accordion.css +2 -1
  16. data/lib/gtk_paradise/{css_files → cascading_style_sheets}/hover_effects.css +0 -1
  17. data/lib/gtk_paradise/{css_files → cascading_style_sheets}/project.css +16 -13
  18. data/lib/gtk_paradise/colours/colour_palette/material_design.rb +35 -18
  19. data/lib/gtk_paradise/colours/parse.rb +4 -2
  20. data/lib/gtk_paradise/commandline/commandline.rb +13 -7
  21. data/lib/gtk_paradise/constants/constants.rb +84 -174
  22. data/lib/gtk_paradise/{gtk_classes → core_classes}/about.rb +2 -2
  23. data/lib/gtk_paradise/{gtk_classes → core_classes}/about_dialog.rb +1 -1
  24. data/lib/gtk_paradise/{gtk_classes → core_classes}/accel_group.rb +3 -7
  25. data/lib/gtk_paradise/{gtk_classes → core_classes}/alignment.rb +1 -1
  26. data/lib/gtk_paradise/{gtk_classes → core_classes}/application.rb +2 -2
  27. data/lib/gtk_paradise/{gtk_classes → core_classes}/application_window.rb +1 -1
  28. data/lib/gtk_paradise/{gtk_classes → core_classes}/box.rb +11 -7
  29. data/lib/gtk_paradise/{gtk_classes → core_classes}/button.rb +59 -61
  30. data/lib/gtk_paradise/{gtk_classes → core_classes}/button_box.rb +1 -1
  31. data/lib/gtk_paradise/{gtk_classes → core_classes}/cairo/context.rb +2 -2
  32. data/lib/gtk_paradise/{gtk_classes → core_classes}/calendar.rb +1 -1
  33. data/lib/gtk_paradise/{gtk_classes → core_classes}/cell_renderer_text.rb +2 -2
  34. data/lib/gtk_paradise/{gtk_classes → core_classes}/check_button.rb +60 -58
  35. data/lib/gtk_paradise/{gtk_classes → core_classes}/combo_box.rb +1 -1
  36. data/lib/gtk_paradise/{gtk_classes → core_classes}/combo_box_entry.rb +5 -4
  37. data/lib/gtk_paradise/{gtk_classes → core_classes}/combo_box_text.rb +54 -18
  38. data/lib/gtk_paradise/{gtk_classes → core_classes}/dialog.rb +1 -1
  39. data/lib/gtk_paradise/{gtk_classes → core_classes}/entry.rb +17 -3
  40. data/lib/gtk_paradise/{gtk_classes → core_classes}/entry_completion.rb +5 -3
  41. data/lib/gtk_paradise/{gtk_classes → core_classes}/event_box.rb +1 -1
  42. data/lib/gtk_paradise/{gtk_classes → core_classes}/event_button.rb +6 -8
  43. data/lib/gtk_paradise/{gtk_classes → core_classes}/event_key.rb +2 -2
  44. data/lib/gtk_paradise/{gtk_classes → core_classes}/expander.rb +1 -1
  45. data/lib/gtk_paradise/{gtk_classes → core_classes}/file_chooser_dialog.rb +1 -1
  46. data/lib/gtk_paradise/{gtk_classes → core_classes}/file_filter.rb +1 -1
  47. data/lib/gtk_paradise/{gtk_classes → core_classes}/file_selection.rb +11 -7
  48. data/lib/gtk_paradise/{gtk_classes → core_classes}/frame.rb +4 -4
  49. data/lib/gtk_paradise/{gtk_classes → core_classes}/grid.rb +136 -80
  50. data/lib/gtk_paradise/{gtk_classes → core_classes}/hbox.rb +4 -2
  51. data/lib/gtk_paradise/{gtk_classes → core_classes}/header_bar.rb +1 -1
  52. data/lib/gtk_paradise/{gtk_classes → core_classes}/hscale.rb +5 -7
  53. data/lib/gtk_paradise/{gtk_classes → core_classes}/image.rb +15 -12
  54. data/lib/gtk_paradise/{gtk_classes → core_classes}/image_menu_item.rb +1 -1
  55. data/lib/gtk_paradise/{gtk_classes → core_classes}/label.rb +29 -22
  56. data/lib/gtk_paradise/{gtk_classes → core_classes}/list_store.rb +6 -1
  57. data/lib/gtk_paradise/{gtk_classes → core_classes}/menu.rb +2 -6
  58. data/lib/gtk_paradise/{gtk_classes → core_classes}/menu_bar.rb +1 -1
  59. data/lib/gtk_paradise/{gtk_classes → core_classes}/menu_item.rb +1 -1
  60. data/lib/gtk_paradise/{gtk_classes → core_classes}/notebook.rb +35 -20
  61. data/lib/gtk_paradise/{gtk_classes → core_classes}/option_menu.rb +1 -1
  62. data/lib/gtk_paradise/{gtk_classes → core_classes}/paned.rb +7 -4
  63. data/lib/gtk_paradise/{gtk_classes → core_classes}/popover.rb +1 -1
  64. data/lib/gtk_paradise/{gtk_classes → core_classes}/radio_button.rb +2 -2
  65. data/lib/gtk_paradise/{gtk_classes → core_classes}/radio_menu_item.rb +6 -14
  66. data/lib/gtk_paradise/{gtk_classes → core_classes}/scale_button.rb +1 -1
  67. data/lib/gtk_paradise/{gtk_classes → core_classes}/scrolled_window.rb +75 -48
  68. data/lib/gtk_paradise/{gtk_classes → core_classes}/search_bar.rb +1 -1
  69. data/lib/gtk_paradise/{gtk_classes → core_classes}/size_group.rb +1 -1
  70. data/lib/gtk_paradise/{gtk_classes → core_classes}/source_buffer.rb +2 -2
  71. data/lib/gtk_paradise/{gtk_classes → core_classes}/source_view.rb +1 -1
  72. data/lib/gtk_paradise/{gtk_classes → core_classes}/spin_button.rb +1 -1
  73. data/lib/gtk_paradise/{gtk_classes → core_classes}/spinner.rb +1 -1
  74. data/lib/gtk_paradise/{gtk_classes → core_classes}/status_icon.rb +2 -6
  75. data/lib/gtk_paradise/{gtk_classes → core_classes}/statusbar.rb +1 -1
  76. data/lib/gtk_paradise/{gtk_classes → core_classes}/style_context.rb +1 -1
  77. data/lib/gtk_paradise/{gtk_classes → core_classes}/text_buffer.rb +3 -7
  78. data/lib/gtk_paradise/{gtk_classes → core_classes}/text_tag.rb +1 -1
  79. data/lib/gtk_paradise/{gtk_classes → core_classes}/text_view.rb +19 -14
  80. data/lib/gtk_paradise/{gtk_classes → core_classes}/toggle_button.rb +2 -2
  81. data/lib/gtk_paradise/{gtk_classes → core_classes}/toolbar.rb +1 -1
  82. data/lib/gtk_paradise/{gtk_classes → core_classes}/tree_iter.rb +2 -2
  83. data/lib/gtk_paradise/{gtk_classes → core_classes}/tree_selection.rb +5 -3
  84. data/lib/gtk_paradise/{gtk_classes → core_classes}/tree_view.rb +28 -39
  85. data/lib/gtk_paradise/{gtk_classes → core_classes}/tree_view_column.rb +1 -1
  86. data/lib/gtk_paradise/{gtk_classes → core_classes}/vbox.rb +2 -2
  87. data/lib/gtk_paradise/{gtk_classes → core_classes}/vscale.rb +5 -7
  88. data/lib/gtk_paradise/{gtk_classes → core_classes}/vte.rb +1 -1
  89. data/lib/gtk_paradise/{gtk_classes → core_classes}/widget.rb +1086 -1111
  90. data/lib/gtk_paradise/{gtk_classes → core_classes}/window.rb +25 -12
  91. data/lib/gtk_paradise/drawing/README.md +2 -2
  92. data/lib/gtk_paradise/drawing/drawing.rb +6 -4
  93. data/lib/gtk_paradise/drawing/event.rb +7 -5
  94. data/lib/gtk_paradise/drawing/star.rb +20 -9
  95. data/lib/gtk_paradise/drawing/tool.rb +3 -1
  96. data/lib/gtk_paradise/drawing/turtle.rb +4 -2
  97. data/lib/gtk_paradise/emojis/emojis.rb +4 -676
  98. data/lib/gtk_paradise/examples/advanced/001_5x5_grid_example.rb +4 -7
  99. data/lib/gtk_paradise/examples/advanced/002_advanced_drag_and_drop_example.rb +3 -9
  100. data/lib/gtk_paradise/examples/advanced/003_html_like_support.rb +4 -11
  101. data/lib/gtk_paradise/examples/advanced/005_csv_example.rb +0 -2
  102. data/lib/gtk_paradise/examples/advanced/006_file_chooser_button_example.rb +6 -13
  103. data/lib/gtk_paradise/examples/advanced/007_label_responding_to_events_example.rb +5 -13
  104. data/lib/gtk_paradise/examples/advanced/008_options_example.rb +0 -4
  105. data/lib/gtk_paradise/examples/advanced/009_key_events.rb +3 -12
  106. data/lib/gtk_paradise/examples/advanced/010_extensive_text_view_example.rb +2 -10
  107. data/lib/gtk_paradise/examples/advanced/011_moving_blocks_example.rb +0 -7
  108. data/lib/gtk_paradise/examples/advanced/012_cell_data_sorting_example.rb +0 -4
  109. data/lib/gtk_paradise/examples/advanced/013_advanced_css_example.rb +3 -12
  110. data/lib/gtk_paradise/examples/advanced/014_popup_example.rb +3 -12
  111. data/lib/gtk_paradise/examples/advanced/015_advanced_button_example.rb +8 -13
  112. data/lib/gtk_paradise/examples/advanced/016_change_background_on_click_event.rb +0 -2
  113. data/lib/gtk_paradise/examples/advanced/017_lean_CSS_example.rb +2 -10
  114. data/lib/gtk_paradise/examples/advanced/018_coloured_text_example.rb +2 -10
  115. data/lib/gtk_paradise/examples/advanced/019_gtk_entry_showing_the_cursor_position.rb +1 -3
  116. data/lib/gtk_paradise/examples/advanced/020_scale_this_image.rb +8 -12
  117. data/lib/gtk_paradise/examples/advanced/021_scroll_events_on_gtk_entry.rb +0 -1
  118. data/lib/gtk_paradise/examples/advanced/022_autogenerated_CSS_rounded_borders.rb +15 -19
  119. data/lib/gtk_paradise/examples/advanced/023_append_image_to_buffer.rb +8 -14
  120. data/lib/gtk_paradise/examples/advanced/024_notebook_with_tab_example.rb +1 -1
  121. data/lib/gtk_paradise/examples/advanced/025_showing_a_gold_caret_on_black_background.rb +6 -5
  122. data/lib/gtk_paradise/examples/advanced/026_status_bar_example.rb +2 -5
  123. data/lib/gtk_paradise/examples/advanced/027_customized_frame_example.rb +4 -7
  124. data/lib/gtk_paradise/examples/advanced/028_widgets_described_in_a_yaml_file.rb +17 -20
  125. data/lib/gtk_paradise/examples/advanced/029_entry_completion_example.rb +4 -9
  126. data/lib/gtk_paradise/examples/advanced/030_parse_into_table_example.rb +132 -0
  127. data/lib/gtk_paradise/{widgets/gtk3/calculator/calculator.rb → examples/advanced/031_combo_box_example.rb} +77 -92
  128. data/lib/gtk_paradise/examples/cairo/three_rectangles.rb +4 -4
  129. data/lib/gtk_paradise/examples/controller/controller.rb +27 -24
  130. data/lib/gtk_paradise/examples/gir_ffi/advanced/001_advanced_treeview_example.rb +1 -1
  131. data/lib/gtk_paradise/examples/gir_ffi/gtk2/001_hello_world.rb +30 -0
  132. data/lib/gtk_paradise/examples/gir_ffi/gtk2/002_upgraded_hello_world.rb +42 -0
  133. data/lib/gtk_paradise/examples/gir_ffi/gtk2/004_treeview_example.rb +62 -0
  134. data/lib/gtk_paradise/examples/gir_ffi/gtk2/005_complex_example.rb +102 -0
  135. data/lib/gtk_paradise/examples/gir_ffi/gtk2/101_all_in_one_example.rb +23 -0
  136. data/lib/gtk_paradise/examples/gir_ffi/{005_complex_example.rb → gtk3/005_complex_example.rb} +2 -2
  137. data/lib/gtk_paradise/examples/glib/parse_glib_settings.rb +1 -1
  138. data/lib/gtk_paradise/examples/gtk2/001_tooltips_example.rb +15 -6
  139. data/lib/gtk_paradise/examples/gtk2/003_draw_rectangle.rb +1 -1
  140. data/lib/gtk_paradise/examples/gtk2/011_password_example.rb +10 -4
  141. data/lib/gtk_paradise/examples/gtk2/README.md +5 -0
  142. data/lib/gtk_paradise/examples/gtk3/001_examples_with_css.rb +320 -0
  143. data/lib/gtk_paradise/examples/gtk3/{077_button_box_example.rb → 003_button_box_example.rb} +13 -4
  144. data/lib/gtk_paradise/examples/gtk3/{056_font_chooser_dialog_example.rb → 005_font_chooser_dialog_example.rb} +3 -2
  145. data/lib/gtk_paradise/examples/gtk3/{073_image_example.rb → 007_image_example.rb} +4 -1
  146. data/lib/gtk_paradise/examples/gtk3/{051_combo_box_example.rb → 009_combo_box_example.rb} +3 -2
  147. data/lib/gtk_paradise/examples/gtk3/{033_list_box_example.rb → 010_list_box_example.rb} +1 -0
  148. data/lib/gtk_paradise/examples/gtk3/{021_tiny_button_via_css.rb → 013_tiny_button_via_css.rb} +4 -3
  149. data/lib/gtk_paradise/examples/gtk3/{025_password_example.rb → 014_password_example.rb} +3 -2
  150. data/lib/gtk_paradise/examples/gtk3/{047_draw_rectangles.rb → 016_draw_rectangles.rb} +4 -0
  151. data/lib/gtk_paradise/examples/gtk3/{005_spinner_example.rb → 017_spinner_example.rb} +1 -0
  152. data/lib/gtk_paradise/examples/gtk3/{078_tree_view_column_example.rb → 018_tree_view_column_example.rb} +1 -1
  153. data/lib/gtk_paradise/examples/gtk3/{084_recent_chooser_dialog.rb → 019_recent_chooser_dialog.rb} +1 -0
  154. data/lib/gtk_paradise/examples/gtk3/{072_text_iterator_example.rb → 021_text_iterator_example.rb} +13 -6
  155. data/lib/gtk_paradise/examples/gtk3/{067_gtk_label_example.rb → 024_gtk_label_example.rb} +3 -3
  156. data/lib/gtk_paradise/examples/gtk3/{081_vbox_with_spacing_and_border_width.rb → 032_vbox_with_spacing_and_border_width.rb} +1 -1
  157. data/lib/gtk_paradise/examples/gtk3/{006_text_view_example.rb → 034_text_view_example.rb} +2 -1
  158. data/lib/gtk_paradise/examples/gtk3/{054_ten_labels_in_a_vertical_box_example.rb → 036_ten_labels_in_a_vertical_box_example.rb} +1 -0
  159. data/lib/gtk_paradise/examples/gtk3/{029_sockets.rb → 039_sockets.rb} +2 -2
  160. data/lib/gtk_paradise/examples/gtk3/{053_revealer_example.rb → 041_revealer_example.rb} +11 -2
  161. data/lib/gtk_paradise/examples/gtk3/{034_hello_world_in_gtk3_and_bold_font.rb → 042_hello_world_in_gtk3_and_bold_font.rb} +1 -1
  162. data/lib/gtk_paradise/examples/gtk3/{052_notebook_css_example.rb → 043_notebook_css_example.rb} +6 -4
  163. data/lib/gtk_paradise/examples/gtk3/{038_radio_button_window.rb → 055_radio_button_window.rb} +1 -1
  164. data/lib/gtk_paradise/examples/gtk3/{085_showcase_the_cursors.rb → 058_showcase_the_cursors.rb} +10 -1
  165. data/lib/gtk_paradise/examples/gtk3/{024_small_paned_example.rb → 059_small_paned_example.rb} +1 -0
  166. data/lib/gtk_paradise/examples/gtk3/{039_scale_button_demo.rb → 060_scale_button_demo.rb} +2 -2
  167. data/lib/gtk_paradise/examples/gtk3/{010_switch_example.rb → 062_switch_example.rb} +2 -1
  168. data/lib/gtk_paradise/examples/gtk3/{009_simple_window.rb → 063_simple_window.rb} +1 -0
  169. data/lib/gtk_paradise/examples/gtk3/{043_hover_button_example_via_css.rb → 066_hover_button_example_via_css.rb} +1 -0
  170. data/lib/gtk_paradise/examples/gtk3/{020_stack_example.rb → 069_stack_example.rb} +1 -1
  171. data/lib/gtk_paradise/examples/gtk3/{031_icon_theme_example.rb → 072_icon_theme_example.rb} +8 -4
  172. data/lib/gtk_paradise/examples/gtk3/{041_horizontal_and_vertical_scale.rb → 073_horizontal_and_vertical_scale.rb} +2 -1
  173. data/lib/gtk_paradise/examples/gtk3/{022_font_related_information.rb → 076_font_related_information.rb} +5 -3
  174. data/lib/gtk_paradise/examples/gtk3/{004_simple_dialog_example.rb → 079_simple_dialog_example.rb} +1 -1
  175. data/lib/gtk_paradise/examples/gtk3/vte/vte3_terminal.rb +1 -1
  176. data/lib/gtk_paradise/examples/gtk4/001_examples_with_css.rb +320 -0
  177. data/lib/gtk_paradise/examples/gtk4/{076_ten_vboxes_example.rb → 023_ten_vboxes_example.rb} +10 -10
  178. data/lib/gtk_paradise/examples/gtk4/{030_notebook_example.rb → 061_notebook_example.rb} +3 -4
  179. data/lib/gtk_paradise/examples/gtk4/{007_two_windows_example.rb → 087_two_windows_example.rb} +4 -1
  180. data/lib/gtk_paradise/examples/gtk4/{100_changed_events_example.rb → 200_changed_events_example.rb} +0 -1
  181. data/lib/gtk_paradise/examples/gtk4/{102_picture_example.rb → 202_picture_example.rb} +1 -1
  182. data/lib/gtk_paradise/examples/pango/pango_power.rb +11 -6
  183. data/lib/gtk_paradise/experimental/experimental.rb +2 -2
  184. data/lib/gtk_paradise/gdk/event_crossing.rb +1 -1
  185. data/lib/gtk_paradise/gdk/gdk.rb +3 -29
  186. data/lib/gtk_paradise/gdk/screen.rb +29 -0
  187. data/lib/gtk_paradise/gnome/README.md +3 -0
  188. data/lib/gtk_paradise/hello_world/README.md +7 -7
  189. data/lib/gtk_paradise/hello_world/hello_world_gtk4.rb +1 -1
  190. data/lib/gtk_paradise/images/misc/investigate.png +0 -0
  191. data/lib/gtk_paradise/pango/fonts.rb +1 -3
  192. data/lib/gtk_paradise/pango/pango_renderer.rb +2 -0
  193. data/lib/gtk_paradise/project/project.rb +2 -1
  194. data/lib/gtk_paradise/prototypes/gtk3_standalone.rb +7 -7
  195. data/lib/gtk_paradise/prototypes/gtk4_standalone.rb +1 -1
  196. data/lib/gtk_paradise/prototypes/unified_gtk_prototype.rb +1 -1
  197. data/lib/gtk_paradise/requires/{base_module_and_app_module.rb → base_module_and_run_module.rb} +1 -1
  198. data/lib/gtk_paradise/requires/do_require_the_files_under_the_gtk_classes_subdirectory.rb +2 -2
  199. data/lib/gtk_paradise/requires/require_files_irrespective_of_the_gtk_version_at_hand.rb +2 -2
  200. data/lib/gtk_paradise/requires/require_gtk2.rb +16 -3
  201. data/lib/gtk_paradise/requires/require_gtk3.rb +7 -3
  202. data/lib/gtk_paradise/requires/{require_gtk2_or_gtk3_or_gtk4.rb → require_gtk3_or_gtk4.rb} +1 -3
  203. data/lib/gtk_paradise/requires/require_gtk4.rb +7 -4
  204. data/lib/gtk_paradise/requires/require_the_base_module_and_gtk_run.rb +1 -1
  205. data/lib/gtk_paradise/requires/{require_the_base_module_the_app_module_and_the_toplevel_methods.rb → require_the_base_module_the_run_module_and_the_toplevel_methods.rb} +2 -2
  206. data/lib/gtk_paradise/requires/require_the_base_module_widgets.rb +9 -0
  207. data/lib/gtk_paradise/requires/require_the_default_gtk_version.rb +1 -1
  208. data/lib/gtk_paradise/requires/run_this_widget.rb +1 -1
  209. data/lib/gtk_paradise/run/run.rb +410 -0
  210. data/lib/gtk_paradise/run.rb +5 -29
  211. data/lib/gtk_paradise/{app/app_module/app_module.rb → run_module/run_module.rb} +946 -1016
  212. data/lib/gtk_paradise/toplevel_methods/css.rb +18 -15
  213. data/lib/gtk_paradise/toplevel_methods/cursor.rb +5 -4
  214. data/lib/gtk_paradise/toplevel_methods/determine_which_gtk_version_is_in_use.rb +1 -1
  215. data/lib/gtk_paradise/toplevel_methods/e.rb +12 -0
  216. data/lib/gtk_paradise/toplevel_methods/keys.rb +1 -1
  217. data/lib/gtk_paradise/toplevel_methods/screen_resolution.rb +7 -6
  218. data/lib/gtk_paradise/toplevel_methods/{text_buffer_tags.rb → tokenizer_and_text_buffer_tags.rb} +115 -0
  219. data/lib/gtk_paradise/toplevel_methods/toplevel_methods.rb +667 -673
  220. data/lib/gtk_paradise/utility_scripts/commandline_to_automatic_gui.rb +8 -8
  221. data/lib/gtk_paradise/utility_scripts/generate_gtk_prototype.rb +5 -31
  222. data/lib/gtk_paradise/version/upstream_gtk_version.rb +3 -25
  223. data/lib/gtk_paradise/version/version.rb +4 -3
  224. data/lib/gtk_paradise/widgets/gtk2/README.md +5 -0
  225. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/imgview.rb +1 -2
  226. data/lib/gtk_paradise/widgets/gtk2/table_example.rb +0 -1
  227. data/lib/gtk_paradise/widgets/gtk3/audio_button/audio_button.rb +13 -7
  228. data/lib/gtk_paradise/widgets/gtk3/burn_this_iso_file/burn_this_iso_file.rb +5 -21
  229. data/lib/gtk_paradise/widgets/gtk3/button_open_remote_webpage/button_open_remote_webpage.rb +1 -1
  230. data/lib/gtk_paradise/widgets/gtk3/button_with_border/button_with_border.rb +1 -1
  231. data/lib/gtk_paradise/widgets/gtk3/button_xorg_buffer/button_xorg_buffer.rb +6 -20
  232. data/lib/gtk_paradise/widgets/gtk3/checkbox_image/checkbox_image.rb +4 -20
  233. data/lib/gtk_paradise/widgets/gtk3/coloured_button/coloured_button.rb +3 -6
  234. data/lib/gtk_paradise/widgets/gtk3/coloured_unit/coloured_unit.rb +1 -1
  235. data/lib/gtk_paradise/widgets/gtk3/cpu_widget/cpu_widget.rb +3 -15
  236. data/lib/gtk_paradise/widgets/gtk3/directory_content_widget/directory_content_widget.rb +1 -1
  237. data/lib/gtk_paradise/widgets/gtk3/editor/editor.rb +1 -1
  238. data/lib/gtk_paradise/widgets/gtk3/editor/internal_widgets/goto_line_widget.rb +1 -1
  239. data/lib/gtk_paradise/widgets/gtk3/files_in_directory/files_in_directory.rb +1 -13
  240. data/lib/gtk_paradise/widgets/gtk3/font_size_widget/action_button.rb +2 -4
  241. data/lib/gtk_paradise/widgets/gtk3/font_size_widget/font_size_widget.rb +6 -27
  242. data/lib/gtk_paradise/widgets/gtk3/four_components_entry/four_components_entry.rb +8 -8
  243. data/lib/gtk_paradise/widgets/gtk3/gidnight_commander/gidnight_commander.rb +1 -1
  244. data/lib/gtk_paradise/widgets/gtk3/image_viewer/image_viewer.rb +1 -1
  245. data/lib/gtk_paradise/widgets/gtk3/keyboard/keyboard.rb +1 -1
  246. data/lib/gtk_paradise/widgets/gtk3/linux_users/linux_users.rb +9 -9
  247. data/lib/gtk_paradise/widgets/gtk3/my_calendar/my_calendar.rb +1 -1
  248. data/lib/gtk_paradise/widgets/gtk3/my_image_menu_item/my_image_menu_item.rb +1 -1
  249. data/lib/gtk_paradise/widgets/gtk3/non_numbers_only/non_numbers_only.rb +1 -1
  250. data/lib/gtk_paradise/widgets/gtk3/note_window/note_window.rb +1 -1
  251. data/lib/gtk_paradise/widgets/gtk3/notebook_tab_with_icon/notebook_tab_with_icon.rb +2 -3
  252. data/lib/gtk_paradise/widgets/gtk3/notebook_with_storage_functionality/notebook_with_storage_functionality.rb +1 -1
  253. data/lib/gtk_paradise/widgets/gtk3/numbers_only/numbers_only.rb +9 -3
  254. data/lib/gtk_paradise/widgets/gtk3/regex_matcher/regex_matcher.rb +1 -1
  255. data/lib/gtk_paradise/widgets/gtk3/rename_widget/rename_widget.rb +1 -1
  256. data/lib/gtk_paradise/widgets/gtk3/show_which_key_was_pressed/show_which_key_was_pressed.rb +1 -1
  257. data/lib/gtk_paradise/widgets/gtk3/stopwatch/stopwatch.rb +12 -14
  258. data/lib/gtk_paradise/widgets/gtk3/sys_message/sys_message.rb +2 -4
  259. data/lib/gtk_paradise/widgets/gtk3/system_information/system_information.rb +2 -2
  260. data/lib/gtk_paradise/widgets/gtk3/type_trainer/type_trainer.rb +14 -6
  261. data/lib/gtk_paradise/widgets/gtk3/view_webpage/view_webpage.rb +16 -28
  262. data/lib/gtk_paradise/widgets/gtk3/widget_switcher/widget_switcher.rb +1 -1
  263. data/lib/gtk_paradise/widgets/gtk3/wiki/README.md +3 -4
  264. data/lib/gtk_paradise/widgets/gtk3/wiki/wiki.rb +13 -15
  265. data/lib/gtk_paradise/widgets/gtk4/show_icon_theme/show_icon_theme.rb +1 -1
  266. data/lib/gtk_paradise/widgets/gtk4/sys_message/sys_message.rb +1 -1
  267. data/lib/gtk_paradise/widgets/shared_code/browser/browser_module.rb +5 -8
  268. data/lib/gtk_paradise/widgets/shared_code/burning_widget/burning_widget_module.rb +3 -20
  269. data/lib/gtk_paradise/widgets/shared_code/cdripper/cdripper_module.rb +2 -18
  270. data/lib/gtk_paradise/widgets/shared_code/colour_filled_widget/colour_filled_widget_module.rb +2 -3
  271. data/lib/gtk_paradise/widgets/shared_code/colour_palette/colour_palette_module.rb +4 -20
  272. data/lib/gtk_paradise/widgets/shared_code/conky/conky_module.rb +18 -29
  273. data/lib/gtk_paradise/widgets/shared_code/customizable_dialog/customizable_dialog.rb +1 -6
  274. data/lib/gtk_paradise/widgets/shared_code/emoji_toggle_widget/emoji_toggle_widget_module.rb +2 -14
  275. data/lib/gtk_paradise/widgets/shared_code/emoji_widget/emoji_widget_module.rb +3 -12
  276. data/lib/gtk_paradise/widgets/shared_code/error_widget/error_widget_module.rb +4 -8
  277. data/lib/gtk_paradise/widgets/shared_code/file_path_widget/file_path_widget_module.rb +5 -3
  278. data/lib/gtk_paradise/widgets/shared_code/file_viewer/file_viewer_module.rb +2 -34
  279. data/lib/gtk_paradise/widgets/shared_code/lsmod/lsmod_module.rb +1 -1
  280. data/lib/gtk_paradise/widgets/shared_code/lspci/lspci_module.rb +2 -5
  281. data/lib/gtk_paradise/widgets/shared_code/mini_clock/mini_clock_module.rb +1 -3
  282. data/lib/gtk_paradise/widgets/shared_code/pid_displayer/pid_displayer_module.rb +7 -18
  283. data/lib/gtk_paradise/widgets/shared_code/random_image/random_image_module.rb +6 -18
  284. data/lib/gtk_paradise/widgets/shared_code/select_file/select_file_module.rb +2 -18
  285. data/lib/gtk_paradise/widgets/shared_code/user/user_module.rb +43 -32
  286. data/lib/gtk_paradise/widgets/shared_code/wget_wrapper/wget_wrapper_module.rb +10 -27
  287. data/lib/gtk_paradise/www/index.cgi +4 -4
  288. data/lib/gtk_paradise/xbm_icons/xbm_icons.rb +118 -0
  289. data/lib/gtk_paradise/yaml/browser_URLs.yml +4 -4
  290. data/lib/gtk_paradise/yaml/notebook_controller.yml +0 -2
  291. data/lib/gtk_paradise.rb +0 -0
  292. data/test/gir_ffi_gtk/testing_gir_ffi_gtk2.rb +55 -0
  293. data/test/gir_ffi_gtk/testing_gir_ffi_gtk3.rb +55 -0
  294. data/test/gtk3/testing_app.rb +1 -1
  295. data/test/gtk3/testing_base_module.rb +13 -7
  296. data/test/misc/testing_a_gtk_frame.rb +3 -2
  297. data/test/misc/testing_gtk4_simplifications.rb +2 -4
  298. data/test/misc/testing_gtk_paradise_runner.rb +3 -4
  299. data/test/misc/testing_numbered_lines.rb +2 -0
  300. data/test/misc/testing_the_gtk_classes.rb +1 -1
  301. metadata +234 -236
  302. data/lib/gtk_paradise/app/app.rb +0 -239
  303. data/lib/gtk_paradise/base_module/class_methods/class_methods.rb +0 -0
  304. data/lib/gtk_paradise/base_module/colours.rb +0 -125
  305. data/lib/gtk_paradise/base_module/css.rb +0 -487
  306. data/lib/gtk_paradise/base_module/html_support.rb +0 -255
  307. data/lib/gtk_paradise/base_module/these_methods_work_for_gtk3_and_gtk4.rb +0 -171
  308. data/lib/gtk_paradise/examples/gtk3/063_examples_with_css.rb +0 -261
  309. data/lib/gtk_paradise/examples/gtk4/009_text_view_example.rb +0 -30
  310. data/lib/gtk_paradise/requires/require_base_module.rb +0 -7
  311. data/lib/gtk_paradise/run_this_widget/run_this_widget.rb +0 -129
  312. data/lib/gtk_paradise/toplevel_methods/tokenizer.rb +0 -118
  313. data/lib/gtk_paradise/widgets/gtk3/ping_widget/ping_widget.rb +0 -513
  314. data/lib/gtk_paradise/widgets/shared_code/calculator/calculator_module.rb +0 -581
  315. data/lib/gtk_paradise/widgets/shared_code/simple_clock/simple_clock_module.rb +0 -255
  316. /data/lib/gtk_paradise/{css_files → cascading_style_sheets}/borders.css +0 -0
  317. /data/lib/gtk_paradise/{css_files → cascading_style_sheets}/themes/README.md +0 -0
  318. /data/lib/gtk_paradise/{css_files → cascading_style_sheets}/themes/rainbow_theme.css +0 -0
  319. /data/lib/gtk_paradise/examples/gdk/{001_gdk_screen_properties.rb → gdk_screen_properties.rb} +0 -0
  320. /data/lib/gtk_paradise/examples/gir_ffi/{001_hello_world.rb → gtk3/001_hello_world.rb} +0 -0
  321. /data/lib/gtk_paradise/examples/gir_ffi/{002_upgraded_hello_world.rb → gtk3/002_upgraded_hello_world.rb} +0 -0
  322. /data/lib/gtk_paradise/examples/gir_ffi/{003_gtk_application_example.rb → gtk3/003_gtk_application_example.rb} +0 -0
  323. /data/lib/gtk_paradise/examples/gir_ffi/{004_treeview_example.rb → gtk3/004_treeview_example.rb} +0 -0
  324. /data/lib/gtk_paradise/examples/gtk3/{001_gtk_entry.rb → 002_gtk_entry.rb} +0 -0
  325. /data/lib/gtk_paradise/examples/gtk3/{075_gtk_expander.rb → 004_gtk_expander.rb} +0 -0
  326. /data/lib/gtk_paradise/examples/gtk3/{036_buttons_showcasing_the_relief.rb → 006_buttons_showcasing_the_relief.rb} +0 -0
  327. /data/lib/gtk_paradise/examples/gtk3/{050_cell_renderer_pixbuf_example.rb → 008_cell_renderer_pixbuf_example.rb} +0 -0
  328. /data/lib/gtk_paradise/examples/gtk3/{044_spin_button_example.rb → 011_spin_button_example.rb} +0 -0
  329. /data/lib/gtk_paradise/examples/gtk3/{064_accel_group_example.rb → 012_accel_group_example.rb} +0 -0
  330. /data/lib/gtk_paradise/examples/gtk3/{048_colour_choose_button.rb → 015_colour_choose_button.rb} +0 -0
  331. /data/lib/gtk_paradise/examples/gtk3/{086_app_chooser_button_example.rb → 020_app_chooser_button_example.rb} +0 -0
  332. /data/lib/gtk_paradise/examples/gtk3/{018_message_dialog_example.rb → 022_message_dialog_example.rb} +0 -0
  333. /data/lib/gtk_paradise/examples/gtk3/{076_ten_vboxes_example.rb → 023_ten_vboxes_example.rb} +0 -0
  334. /data/lib/gtk_paradise/examples/gtk3/{071_button_demo.rb → 025_button_demo.rb} +0 -0
  335. /data/lib/gtk_paradise/examples/gtk3/{074_frame_example.rb → 026_frame_example.rb} +0 -0
  336. /data/lib/gtk_paradise/examples/gtk3/{080_vertical_boxes.rb → 027_vertical_boxes.rb} +0 -0
  337. /data/lib/gtk_paradise/examples/gtk3/{032_switcher_window.rb → 028_switcher_window.rb} +0 -0
  338. /data/lib/gtk_paradise/examples/gtk3/{057_flowbox.rb → 029_flowbox.rb} +0 -0
  339. /data/lib/gtk_paradise/examples/gtk3/{066_header_bar_example.rb → 030_header_bar_example.rb} +0 -0
  340. /data/lib/gtk_paradise/examples/gtk3/{049_drag_and_drop_example.rb → 031_drag_and_drop_example.rb} +0 -0
  341. /data/lib/gtk_paradise/examples/gtk3/{055_threads_example.rb → 033_threads_example.rb} +0 -0
  342. /data/lib/gtk_paradise/examples/gtk3/{079_tooltips_example.rb → 035_tooltips_example.rb} +0 -0
  343. /data/lib/gtk_paradise/examples/gtk3/{087_calendar_example.rb → 037_calendar_example.rb} +0 -0
  344. /data/lib/gtk_paradise/examples/gtk3/{060_check_button.rb → 038_check_button.rb} +0 -0
  345. /data/lib/gtk_paradise/examples/gtk3/{062_event_box_example.rb → 040_event_box_example.rb} +0 -0
  346. /data/lib/gtk_paradise/examples/gtk3/{042_installation_assistant.rb → 044_installation_assistant.rb} +0 -0
  347. /data/lib/gtk_paradise/examples/gtk3/{053_css_example_of_a_button_changing_the_background_colour_on_click_event.rb → 045_css_example_of_a_button_changing_the_background_colour_on_click_event.rb} +0 -0
  348. /data/lib/gtk_paradise/examples/gtk3/{017_extensive_markup_example.rb → 046_extensive_markup_example.rb} +0 -0
  349. /data/lib/gtk_paradise/examples/gtk3/{059_form_example.rb → 047_form_example.rb} +0 -0
  350. /data/lib/gtk_paradise/examples/gtk3/{068_popover_example.rb → 048_popover_example.rb} +0 -0
  351. /data/lib/gtk_paradise/examples/gtk3/{012_show_the_xid_example.rb → 049_show_the_xid_example.rb} +0 -0
  352. /data/lib/gtk_paradise/examples/gtk3/{016_scrolling_example.rb → 050_scrolling_example.rb} +0 -0
  353. /data/lib/gtk_paradise/examples/gtk3/{065_change_the_application_theme.rb → 051_change_the_application_theme.rb} +0 -0
  354. /data/lib/gtk_paradise/examples/gtk3/{058_colourized_button_example.rb → 052_colourized_button_example.rb} +0 -0
  355. /data/lib/gtk_paradise/examples/gtk3/{035_grid_example.rb → 053_grid_example.rb} +0 -0
  356. /data/lib/gtk_paradise/examples/gtk3/{027_menubar_example.rb → 054_menubar_example.rb} +0 -0
  357. /data/lib/gtk_paradise/examples/gtk3/{040_popup_example.rb → 056_popup_example.rb} +0 -0
  358. /data/lib/gtk_paradise/examples/gtk3/{069_entry_completion.rb → 057_entry_completion.rb} +0 -0
  359. /data/lib/gtk_paradise/examples/gtk3/{030_notebook_example.rb → 061_notebook_example.rb} +0 -0
  360. /data/lib/gtk_paradise/examples/gtk3/{014_undecorated_window_example.rb → 064_undecorated_window_example.rb} +0 -0
  361. /data/lib/gtk_paradise/examples/gtk3/{026_progress_bar_example.rb → 065_progress_bar_example.rb} +0 -0
  362. /data/lib/gtk_paradise/examples/gtk3/{028_paned_widget_example.rb → 067_paned_widget_example.rb} +0 -0
  363. /data/lib/gtk_paradise/examples/gtk3/{082_file_chooser_dialog.rb → 068_file_chooser_dialog.rb} +0 -0
  364. /data/lib/gtk_paradise/examples/gtk3/{037_text_buffer_example.rb → 070_text_buffer_example.rb} +0 -0
  365. /data/lib/gtk_paradise/examples/gtk3/{013_grab_pointer_forcefully.rb → 071_grab_pointer_forcefully.rb} +0 -0
  366. /data/lib/gtk_paradise/examples/gtk3/{008_search_bar_example.rb → 074_search_bar_example.rb} +0 -0
  367. /data/lib/gtk_paradise/examples/gtk3/{061_fixed_example.rb → 075_fixed_example.rb} +0 -0
  368. /data/lib/gtk_paradise/examples/gtk3/{011_colour_chooser_example.rb → 077_colour_chooser_example.rb} +0 -0
  369. /data/lib/gtk_paradise/examples/gtk3/{015_bottom_left_placement.rb → 078_bottom_left_placement.rb} +0 -0
  370. /data/lib/gtk_paradise/examples/gtk3/{045_radio_menu_item_example.rb → 080_radio_menu_item_example.rb} +0 -0
  371. /data/lib/gtk_paradise/examples/gtk3/{046_gtk_dialog_sample.rb → 081_gtk_dialog_sample.rb} +0 -0
  372. /data/lib/gtk_paradise/examples/gtk3/{003_toggle_button_example.rb → 082_toggle_button_example.rb} +0 -0
  373. /data/lib/gtk_paradise/examples/gtk3/{019_status_icon_example.rb → 083_status_icon_example.rb} +0 -0
  374. /data/lib/gtk_paradise/examples/gtk3/{023_sorted_tree.rb → 084_sorted_tree.rb} +0 -0
  375. /data/lib/gtk_paradise/examples/gtk3/{083_bindings.rb → 085_bindings.rb} +0 -0
  376. /data/lib/gtk_paradise/examples/gtk3/{002_scrolled_window_example.rb → 086_scrolled_window_example.rb} +0 -0
  377. /data/lib/gtk_paradise/examples/gtk3/{007_two_windows_example.rb → 087_two_windows_example.rb} +0 -0
  378. /data/lib/gtk_paradise/examples/gtk3/{070_svg_viewer.rb → 088_svg_viewer.rb} +0 -0
  379. /data/lib/gtk_paradise/examples/gtk4/{001_gtk_entry.rb → 002_gtk_entry.rb} +0 -0
  380. /data/lib/gtk_paradise/examples/gtk4/{005_spinner_example.rb → 017_spinner_example.rb} +0 -0
  381. /data/lib/gtk_paradise/examples/gtk4/{074_frame_example.rb → 026_frame_example.rb} +0 -0
  382. /data/lib/gtk_paradise/examples/gtk4/{006_text_view_example.rb → 034_text_view_example.rb} +0 -0
  383. /data/lib/gtk_paradise/examples/gtk4/{087_calendar_example.rb → 037_calendar_example.rb} +0 -0
  384. /data/lib/gtk_paradise/examples/gtk4/{027_menubar_example.rb → 054_menubar_example.rb} +0 -0
  385. /data/lib/gtk_paradise/examples/gtk4/{010_switch_example.rb → 062_switch_example.rb} +0 -0
  386. /data/lib/gtk_paradise/examples/gtk4/{008_search_bar_example.rb → 074_search_bar_example.rb} +0 -0
  387. /data/lib/gtk_paradise/examples/gtk4/{004_simple_dialog_example.rb → 079_simple_dialog_example.rb} +0 -0
  388. /data/lib/gtk_paradise/examples/gtk4/{003_toggle_button_example.rb → 082_toggle_button_example.rb} +0 -0
  389. /data/lib/gtk_paradise/examples/gtk4/{002_scrolled_window_example.rb → 086_scrolled_window_example.rb} +0 -0
  390. /data/lib/gtk_paradise/examples/gtk4/{101_actionbar_example.rb → 201_actionbar_example.rb} +0 -0
  391. /data/lib/gtk_paradise/examples/gtk4/{103_drawing_example.rb → 203_drawing_example.rb} +0 -0
  392. /data/lib/gtk_paradise/examples/gtk4/{104_quit_on_keypress_event.rb → 204_quit_on_keypress_event.rb} +0 -0
  393. /data/lib/gtk_paradise/widgets/gtk2/{status_icon_example.rb → status_icon_example/status_icon_example.rb} +0 -0
@@ -9,33 +9,89 @@ module Gtk
9
9
  require 'gtk_paradise/project/project.rb'
10
10
 
11
11
  # ========================================================================= #
12
- # === PATH_TO_THE_PLUS_SYMBOL_IMAGE
12
+ # === N
13
+ # ========================================================================= #
14
+ N = "\n"
15
+
16
+ # ========================================================================= #
17
+ # === FONT_SIZE
18
+ #
19
+ # Uniform default font-size for the whole GUI part. We pick a fairly
20
+ # large font size, so to honour elderly people who may have a
21
+ # decreased vision.
22
+ # ========================================================================= #
23
+ FONT_SIZE = '25'
24
+
25
+ # ========================================================================= #
26
+ # === Gtk::USE_THIS_FONT_FAMILY_FOR_GUI_APPLICATIONS
27
+ #
28
+ # Here we specify a certain default font to use for ruby-gtk applications.
29
+ # ========================================================================= #
30
+ USE_THIS_FONT_FAMILY_FOR_GUI_APPLICATIONS =
31
+ 'Bitstream Vera Serif' # 'DejaVu Sans Mono'
32
+
33
+ # ========================================================================= #
34
+ # === Gtk:::USE_THIS_FONT
35
+ #
36
+ # This is the aggregate constant, based on the two constants defined
37
+ # above. The end-result will be a String such as
38
+ # 'Bitstream Vera Serif 25'.
13
39
  # ========================================================================= #
14
- PATH_TO_THE_PLUS_SYMBOL_IMAGE = "#{::Gtk.project_base_directory?}images/misc/plus_symbol.png"
40
+ USE_THIS_FONT =
41
+ "#{USE_THIS_FONT_FAMILY_FOR_GUI_APPLICATIONS} #{FONT_SIZE}"
15
42
 
16
43
  # ========================================================================= #
17
- # === PATH_TO_THE_MINUS_SYMBOL_IMAGE
44
+ # === Gtk::PATH_TO_THE_PLUS_SYMBOL_IMAGE
45
+ #
46
+ # This path may resolve to a String such as:
47
+ #
48
+ # '/usr/lib/ruby/site_ruby/3.2.0/gtk_paradise/images/misc/plus_symbol.png'
49
+ #
18
50
  # ========================================================================= #
19
- PATH_TO_THE_MINUS_SYMBOL_IMAGE = "#{::Gtk.project_base_directory?}images/misc/minus_symbol.png"
51
+ PATH_TO_THE_PLUS_SYMBOL_IMAGE =
52
+ "#{project_base_directory?}images/misc/plus_symbol.png"
53
+
54
+ # ========================================================================= #
55
+ # === Gtk::PATH_TO_THE_MINUS_SYMBOL_IMAGE
56
+ # ========================================================================= #
57
+ PATH_TO_THE_MINUS_SYMBOL_IMAGE =
58
+ "#{project_base_directory?}images/misc/minus_symbol.png"
59
+
60
+ # ========================================================================= #
61
+ # === Gtk::FILE_ARROW_RIGHT
62
+ #
63
+ # This constant refers to a right-arrow image. This can be used if you
64
+ # need to present to the user where to "click" or look at. In some ways
65
+ # it is a bit like Gtk::Expander, just as an image, and larger.
66
+ # ========================================================================= #
67
+ FILE_ARROW_RIGHT =
68
+ "#{project_base_directory?}images/misc/ARROW_RIGHT.png"
69
+
70
+ # ========================================================================= #
71
+ # === Gtk::FILE_PROJECT_CSS
72
+ # ========================================================================= #
73
+ FILE_PROJECT_CSS =
74
+ "#{project_base_directory?}cascading_style_sheets/project.css"
75
+
76
+ # ========================================================================= #
77
+ # === Gtk::FILE_TABBLE
78
+ # ========================================================================= #
79
+ FILE_TABBLE =
80
+ "#{project_base_directory?}images/misc/tabble.png"
20
81
 
21
82
  # ========================================================================= #
22
83
  # === Gtk::ARRAY_CSS_FILES
23
84
  # ========================================================================= #
24
85
  ARRAY_CSS_FILES =
25
86
  [
26
- "#{::Gtk.project_base_directory?}css_files/project.css",
27
- "#{::Gtk.project_base_directory?}css_files/colours.css",
28
- "#{::Gtk.project_base_directory?}css_files/borders.css",
29
- "#{::Gtk.project_base_directory?}css_files/hover_effects.css"
87
+ "#{project_base_directory?}cascading_style_sheets/project.css",
88
+ "#{project_base_directory?}cascading_style_sheets/colours.css",
89
+ "#{project_base_directory?}cascading_style_sheets/borders.css",
90
+ "#{project_base_directory?}cascading_style_sheets/hover_effects.css"
30
91
  ]
31
92
 
32
93
  # ========================================================================= #
33
- # === N
34
- # ========================================================================= #
35
- N = "\n"
36
-
37
- # ========================================================================= #
38
- # === AVAILABLE_CURSORS
94
+ # === Gtk::AVAILABLE_CURSORS
39
95
  #
40
96
  # Specify the available gtk-related cursors.
41
97
  # ========================================================================= #
@@ -77,56 +133,6 @@ module Gtk
77
133
  AVAILABLE_CURSORS
78
134
  end
79
135
 
80
- # ========================================================================= #
81
- # === FONT_SIZE
82
- #
83
- # Uniform default font-size for the whole GUI part. We pick a fairly
84
- # large font size, so to honour elderly people who may have a decreased
85
- # vision.
86
- # ========================================================================= #
87
- FONT_SIZE = '22'
88
-
89
- # ========================================================================= #
90
- # === USE_THIS_FONT_FAMILY_FOR_GUI_APPLICATIONS
91
- #
92
- # Here you can specify a certain default font to use for ruby-gtk
93
- # applications.
94
- # ========================================================================= #
95
- USE_THIS_FONT_FAMILY_FOR_GUI_APPLICATIONS =
96
- 'Bitstream Vera Serif' # 'DejaVu Sans Mono'
97
-
98
- # ========================================================================= #
99
- # === USE_THIS_FONT
100
- #
101
- # This is the aggregate constant, based on the two constants defined
102
- # above. The end-result will be a String such as
103
- # 'Bitstream Vera Serif 22'.
104
- # ========================================================================= #
105
- USE_THIS_FONT =
106
- "#{USE_THIS_FONT_FAMILY_FOR_GUI_APPLICATIONS} #{FONT_SIZE}"
107
-
108
- # ========================================================================= #
109
- # === FILE_ARROW_RIGHT
110
- #
111
- # This constant refers to an right-arrow image. This can be used if you
112
- # need to present to the user where to "click" or look at. In some ways
113
- # it is a bit like Gtk::Expander, just as an image, and larger.
114
- # ========================================================================= #
115
- FILE_ARROW_RIGHT =
116
- "#{PROJECT_BASE_DIRECTORY}images/misc/ARROW_RIGHT.png"
117
-
118
- # ========================================================================= #
119
- # === FILE_PROJECT_CSS
120
- # ========================================================================= #
121
- FILE_PROJECT_CSS =
122
- "#{PROJECT_BASE_DIRECTORY}css_files/project.css"
123
-
124
- # ========================================================================= #
125
- # === FILE_TABBLE
126
- # ========================================================================= #
127
- FILE_TABBLE =
128
- "#{PROJECT_BASE_DIRECTORY}images/misc/tabble.png"
129
-
130
136
  # ========================================================================= #
131
137
  # === Gtk.user_config_dir
132
138
  #
@@ -136,113 +142,17 @@ module Gtk
136
142
  GLib.user_config_dir
137
143
  end
138
144
 
139
- # =========================================================================== #
140
- # Store xbm files in this sub-module. Note that this isn't quite as much in
141
- # use as it was in, say, the year 2002.
142
- #
143
- # Listing of the content so far in this file:
144
- #
145
- # Gtk::XbmIcons::XBM_SWORD_ICON
146
- # Gtk::XbmIcons::BOOK_CLOSED_XPM
147
- # Gtk::XbmIcons::BOOK_OPENED_XPM
148
- #
149
- # =========================================================================== #
150
- module XbmIcons # Gtk::XbmIcons
151
-
152
- # ========================================================================= #
153
- # === XBM_SWORD_ICON
154
- #
155
- # To see this file, try:
156
- #
157
- # puts Gtk::XbmIcons::XBM_SWORD_ICON
158
- #
159
- # ========================================================================= #
160
- XBM_SWORD_ICON = [
161
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
162
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
163
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
164
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
165
- 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
166
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x40,
167
- 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
168
- 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
169
- 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
170
- 0x04, 0x00, 0x00, 0x00, 0x10, 0x07, 0x00, 0x00, 0x00, 0xc0, 0x02, 0x00,
171
- 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00,
172
- 0x78, 0x03, 0x00, 0x00, 0x00, 0x58, 0x07, 0x00, 0x00, 0x00, 0x00, 0x0e,
173
- 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00,
174
- 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
175
- 0xe0, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00
176
- ].pack('c*')
177
-
178
- # ========================================================================= #
179
- # Next, some XPM Icons.
180
- # ========================================================================= #
181
-
182
- # ========================================================================= #
183
- # === BOOK_OPENED_XPM
184
- # ========================================================================= #
185
- BOOK_OPENED_XPM = [
186
- "16 16 4 1",
187
- " c None s None",
188
- ". c black",
189
- "X c #808080",
190
- "o c white",
191
- " ",
192
- " .. ",
193
- " .Xo. ... ",
194
- " .Xoo. ..oo. ",
195
- " .Xooo.Xooo... ",
196
- " .Xooo.oooo.X. ",
197
- " .Xooo.Xooo.X. ",
198
- " .Xooo.oooo.X. ",
199
- " .Xooo.Xooo.X. ",
200
- " .Xooo.oooo.X. ",
201
- " .Xoo.Xoo..X. ",
202
- " .Xo.o..ooX. ",
203
- " .X..XXXXX. ",
204
- " ..X....... ",
205
- " .. ",
206
- " "
207
- ]
208
-
209
- # ========================================================================= #
210
- # === BOOK_CLOSED_XPM
211
- #
212
- # This icon represents a closed book.
213
- # ========================================================================= #
214
- BOOK_CLOSED_XPM = [
215
- "16 16 6 1",
216
- " c None s None",
217
- ". c black",
218
- "X c red",
219
- "o c yellow",
220
- "O c #808080",
221
- "# c white",
222
- " ",
223
- " .. ",
224
- " ..XX. ",
225
- " ..XXXXX. ",
226
- " ..XXXXXXXX. ",
227
- ".ooXXXXXXXXX. ",
228
- "..ooXXXXXXXXX. ",
229
- ".X.ooXXXXXXXXX. ",
230
- ".XX.ooXXXXXX.. ",
231
- " .XX.ooXXX..#O ",
232
- " .XX.oo..##OO. ",
233
- " .XX..##OO.. ",
234
- " .X.#OO.. ",
235
- " ..O.. ",
236
- " .. ",
237
- " "
238
- ]
239
-
240
- # ========================================================================= #
241
- # To use these images, try something like this:
242
- #
243
- # @book_open, @book_open_mask = Gdk::Pixmap.create_from_xpm_d(@notebook.window, nil, $book_open_xpm)
244
- # @book_closed, @book_closed_mask = Gdk::Pixmap.create_from_xpm_d(@notebook.window, nil, $book_closed_xpm)
245
- #
246
- # ========================================================================= #
247
-
248
- end; end
145
+ end
146
+
147
+ if __FILE__ == $PROGRAM_NAME
148
+ alias e puts
149
+ e Gtk::PATH_TO_THE_PLUS_SYMBOL_IMAGE
150
+ e
151
+ pp Gtk::ARRAY_CSS_FILES
152
+ e
153
+ e Gtk.available_cursors?[3]
154
+ require 'gtk3'
155
+ e
156
+ e Gtk.user_config_dir
157
+ e
158
+ end
@@ -2,7 +2,7 @@
2
2
  # Encoding: UTF-8
3
3
  # frozen_string_literal: true
4
4
  # =========================================================================== #
5
- # require 'gtk_paradise/gtk_classes/about.rb'
5
+ # require 'gtk_paradise/core_classes/about.rb'
6
6
  # Gtk.return_about_dialog_widget
7
7
  # =========================================================================== #
8
8
  module Gtk
@@ -47,7 +47,7 @@ module Gtk
47
47
  # ======================================================================= #
48
48
  # Credits for Translators:
49
49
  # ======================================================================= #
50
- a.translator_credits = "Written by Roebe.\n"
50
+ a.translator_credits = "Written by shevy.\n"
51
51
  a.version = '1.0.0'
52
52
  a.website = 'https://rubygems.org/gems/gtk_paradise'
53
53
  a.website_label = 'https://rubygems.org/gems/gtk_paradise'
@@ -4,7 +4,7 @@
4
4
  # =========================================================================== #
5
5
  # === Gtk::AboutDialog
6
6
  # =========================================================================== #
7
- # require 'gtk_paradise/gtk_classes/about_dialog.rb'
7
+ # require 'gtk_paradise/core_classes/about_dialog.rb'
8
8
  # =========================================================================== #
9
9
  module Gtk
10
10
 
@@ -2,11 +2,11 @@
2
2
  # Encoding: UTF-8
3
3
  # frozen_string_literal: true
4
4
  # =========================================================================== #
5
- # require 'gtk_paradise/gtk_classes/accel_group.rb'
5
+ # require 'gtk_paradise/core_classes/accel_group.rb'
6
6
  # =========================================================================== #
7
7
  module Gtk
8
8
 
9
- class AccelGroup
9
+ class AccelGroup # === Gtk::AccelGroup
10
10
 
11
11
  require 'gtk_paradise/toplevel_methods/determine_which_gtk_version_is_in_use.rb'
12
12
 
@@ -22,11 +22,7 @@ class AccelGroup
22
22
  use_this_additional_modifier_key = Gdk::Keyval::GDK_1,
23
23
  &block
24
24
  )
25
- if ::Gtk.use_gtk2?
26
- use_this_mask_key = Gdk::Window::MOD1_MASK
27
- else # else assume gtk3
28
- use_this_mask_key = :mod1_mask
29
- end
25
+ use_this_mask_key = :mod1_mask # For ruby-gtk3 and ruby-gtk4.
30
26
  connect(
31
27
  use_this_additional_modifier_key,
32
28
  use_this_mask_key,
@@ -2,7 +2,7 @@
2
2
  # Encoding: UTF-8
3
3
  # frozen_string_literal: true
4
4
  # =========================================================================== #
5
- # require 'gtk_paradise/gtk_classes/alignment.rb'
5
+ # require 'gtk_paradise/core_classes/alignment.rb'
6
6
  # =========================================================================== #
7
7
  module Gtk
8
8
 
@@ -7,12 +7,12 @@
7
7
  # class for gtk2, but for the time being (January 2020) we won't do so;
8
8
  # it does not seem to be necessary to use it.
9
9
  # =========================================================================== #
10
- # require 'gtk_paradise/gtk_classes/application.rb'
10
+ # require 'gtk_paradise/core_classes/application.rb'
11
11
  # app = Gtk.application('org.gtk.button_box_example')
12
12
  # =========================================================================== #
13
13
  module Gtk
14
14
 
15
- require 'gtk_paradise/gtk_classes/application_window.rb'
15
+ require 'gtk_paradise/core_classes/application_window.rb'
16
16
 
17
17
  # ========================================================================= #
18
18
  # === Gtk.application
@@ -5,7 +5,7 @@
5
5
  # This is unavailable in ruby-gtk2, so we need to check at the beginning
6
6
  # for this.
7
7
  # =========================================================================== #
8
- # require 'gtk_paradise/gtk_classes/application_window.rb'
8
+ # require 'gtk_paradise/core_classes/application_window.rb'
9
9
  # =========================================================================== #
10
10
  require 'gtk_paradise/toplevel_methods/determine_which_gtk_version_is_in_use.rb'
11
11
 
@@ -6,12 +6,10 @@
6
6
  #
7
7
  # Note that this is for Gtk::Box, which is new since as of ruby-gtk3.
8
8
  # =========================================================================== #
9
- # require 'gtk_paradise/gtk_classes/box.rb'
9
+ # require 'gtk_paradise/core_classes/box.rb'
10
10
  # =========================================================================== #
11
11
  require 'gtk_paradise/toplevel_methods/determine_which_gtk_version_is_in_use.rb'
12
12
 
13
- return if ::Gtk.do_we_use_gtk2?
14
-
15
13
  # =========================================================================== #
16
14
  # We assume only ruby-gtk3 and ruby-gtk4 to be here past this point.
17
15
  # =========================================================================== #
@@ -26,14 +24,18 @@ class Box # This is specifically for gtk3 and gtk4.
26
24
  # ========================================================================= #
27
25
  # === text
28
26
  # ========================================================================= #
29
- def text(i, padding_to_use = 2)
27
+ def text(
28
+ i, padding_to_use = 2
29
+ )
30
30
  minimal(::Gtk::Label.new(i), padding_to_use)
31
31
  end
32
32
 
33
33
  # ========================================================================= #
34
34
  # === left_aligned_text
35
35
  # ========================================================================= #
36
- def left_aligned_text(i, padding_to_use = 2)
36
+ def left_aligned_text(
37
+ i, padding_to_use = 2
38
+ )
37
39
  text = ::Gtk::Label.new(i)
38
40
  text.left_align
39
41
  minimal(text, padding_to_use)
@@ -137,7 +139,8 @@ def self.hbox(
137
139
  # to this method.
138
140
  # =================================================================== #
139
141
  when :entry
140
- if append_mode == :maximal
142
+ case append_mode
143
+ when :maximal
141
144
  _.maximal(value) # Add the widget here at once.
142
145
  else
143
146
  _.minimal(value) # Add the widget here at once.
@@ -146,7 +149,8 @@ def self.hbox(
146
149
  # === :bold_label
147
150
  # =================================================================== #
148
151
  when :bold_label
149
- if append_mode == :maximal
152
+ case append_mode
153
+ when :maximal
150
154
  _.maximal(gtk_label(value).make_bold)
151
155
  else
152
156
  _.minimal(gtk_label(value).make_bold)
@@ -6,12 +6,24 @@
6
6
  #
7
7
  # This file contains modification to a Gtk::Button widget.
8
8
  # =========================================================================== #
9
- # require 'gtk_paradise/gtk_classes/button.rb'
9
+ # require 'gtk_paradise/core_classes/button.rb'
10
10
  # =========================================================================== #
11
11
  module Gtk
12
12
 
13
13
  class Button # === Gtk::Button
14
14
 
15
+ if respond_to?(:tooltip=)
16
+ # ======================================================================= #
17
+ # === original_set_tooltip
18
+ # ======================================================================= #
19
+ alias original_set_tooltip tooltip= # set_tooltip
20
+
21
+ # ======================================================================= #
22
+ # === set_tooltip
23
+ # ======================================================================= #
24
+ alias set_tooltip fancy_tooltip=
25
+ end
26
+
15
27
  # ========================================================================= #
16
28
  # The next line is necessary to determine which functionality works
17
29
  # for the different gtk-variants.
@@ -22,7 +34,7 @@ class Button # === Gtk::Button
22
34
  # === set_halign
23
35
  # ========================================================================= #
24
36
  unless Gtk.do_we_use_gtk4?
25
- alias set_halign set_xalign # === set_halign
37
+ alias set_halign set_xalign if respond_to?(:set_xalign) # === set_halign
26
38
  end
27
39
 
28
40
  # ========================================================================= #
@@ -55,10 +67,10 @@ class Button # === Gtk::Button
55
67
  # use, ideally as a symbol.
56
68
  # ========================================================================= #
57
69
  def hover_colour=(
58
- i = :paleturquoise
70
+ i = :paleturquoise,
71
+ prelight = :prelight # Assume ruby-gtk3 by default.
59
72
  )
60
- prelight = :prelight # Assume ruby-gtk3 by default.
61
- prelight = ::Gtk::STATE_PRELIGHT if ::Gtk.use_gtk2?
73
+ # prelight = ::Gtk::STATE_PRELIGHT if ::Gtk.use_gtk2?
62
74
  modify_bg(
63
75
  prelight,
64
76
  Gdk::Color.parse(i.to_s)
@@ -89,23 +101,21 @@ class Button # === Gtk::Button
89
101
  if b.is_a? Symbol
90
102
  b = Gdk::Color.parse(b.to_s)
91
103
  end
92
- if ::Gtk.use_gtk2?
93
- super(a, b)
94
- else
95
- if b.is_a? Gdk::Color
96
- # =================================================================== #
97
- # Convert it into RGB values next.
98
- # =================================================================== #
99
- array = [
100
- (b.red * 100.0 / 65535) / 100,
101
- (b.green * 100.0 / 65535) / 100,
102
- (b.blue * 100.0 / 65535) / 100,
103
- 1.0
104
- ]
105
- b = Gdk::RGBA.new(*array)
106
- end
107
- override_background_color(a, b)
104
+ # if ::Gtk.use_gtk2?
105
+ # super(a, b)
106
+ if b.is_a? Gdk::Color
107
+ # ===================================================================== #
108
+ # Convert it into RGB values next.
109
+ # ===================================================================== #
110
+ array = [
111
+ (b.red * 100.0 / 65535) / 100,
112
+ (b.green * 100.0 / 65535) / 100,
113
+ (b.blue * 100.0 / 65535) / 100,
114
+ 1.0
115
+ ]
116
+ b = Gdk::RGBA.new(*array)
108
117
  end
118
+ override_background_color(a, b)
109
119
  end
110
120
 
111
121
  # ========================================================================= #
@@ -116,7 +126,8 @@ class Button # === Gtk::Button
116
126
  # may depend on gtk being "properly" initialized".
117
127
  # ========================================================================= #
118
128
  def set_text(
119
- i, use_mnemonics: false
129
+ i,
130
+ use_mnemonics: false
120
131
  )
121
132
  set_label(i)
122
133
  if use_mnemonics
@@ -172,12 +183,11 @@ class Button # === Gtk::Button
172
183
  i = :use_the_appropriate_variant_for_the_current_gtk_version
173
184
  )
174
185
  case i
186
+ # ======================================================================= #
187
+ # === :use_the_appropriate_variant_for_the_current_gtk_version
188
+ # ======================================================================= #
175
189
  when :use_the_appropriate_variant_for_the_current_gtk_version
176
- if ::Gtk.use_gtk2?
177
- i = ::Gtk::RELIEF_NONE
178
- else
179
- i = :none
180
- end
190
+ i = :none
181
191
  end
182
192
  set_relief(i)
183
193
  end; alias no_relief relief_none # === no_relief
@@ -243,11 +253,7 @@ class Button # === Gtk::Button
243
253
  # === relief_half
244
254
  # ========================================================================= #
245
255
  def relief_half
246
- if ::Gtk.use_gtk2?
247
- self.relief = ::Gtk::RELIEF_HALF
248
- else
249
- self.relief = :half
250
- end
256
+ self.relief = :half
251
257
  end
252
258
 
253
259
  # ========================================================================= #
@@ -257,11 +263,7 @@ class Button # === Gtk::Button
257
263
  # with buttons normally.
258
264
  # ========================================================================= #
259
265
  def no_relief
260
- if ::Gtk.use_gtk2?
261
- self.relief = ::Gtk::RELIEF_NONE
262
- else
263
- self.relief = :none
264
- end
266
+ self.relief = :none
265
267
  end
266
268
 
267
269
  # ========================================================================= #
@@ -274,7 +276,7 @@ class Button # === Gtk::Button
274
276
  )
275
277
  child = self.children.first
276
278
  unless child.respond_to?(:make_bold)
277
- require 'gtk_paradise/gtk_classes/label.rb' # ← Necessary for .make_bold() below.
279
+ require 'gtk_paradise/core_classes/label.rb' # ← Necessary for .make_bold() below.
278
280
  end
279
281
  child.make_bold(
280
282
  :use_the_default_text,
@@ -305,12 +307,9 @@ end
305
307
  # =========================================================================== #
306
308
  def self.create_button(
307
309
  optional_use_this_text = '',
308
- use_underline = false,
310
+ use_underline = false, # This is whether we will use a mnemonic or not.
309
311
  &block
310
312
  )
311
- # if optional_use_this_text.is_a? String
312
- # optional_use_this_text = { label: optional_use_this_text }
313
- # end
314
313
  # ========================================================================= #
315
314
  # === Handle Hashes first
316
315
  # ========================================================================= #
@@ -327,24 +326,23 @@ def self.create_button(
327
326
  optional_use_this_text.start_with? '_'
328
327
  use_underline = true
329
328
  end
330
- if do_we_use_gtk2?
331
- button = ::Gtk::Button.new(optional_use_this_text, use_underline)
332
- else # else, assume gtk
333
- hash = {}
334
- # ======================================================================= #
335
- # We could also add stock_id:
336
- # ======================================================================= #
337
- if optional_use_this_text.is_a? Hash
338
- hash.merge!(optional_use_this_text)
339
- end
340
- unless hash.has_key? :label
341
- hash.merge!(label: optional_use_this_text) if optional_use_this_text.is_a?(String)
342
- end
343
- unless hash.has_key? :use_underline
344
- hash.merge!(use_underline: use_underline) if optional_use_this_text.is_a?(String)
345
- end
346
- button = ::Gtk::Button.new(hash)
329
+ hash = {}
330
+ # ======================================================================= #
331
+ # We could also add stock_id:
332
+ # ======================================================================= #
333
+ if optional_use_this_text.is_a? Hash
334
+ hash.merge!(optional_use_this_text)
335
+ end
336
+ unless hash.has_key? :label
337
+ hash.merge!(label: optional_use_this_text) if optional_use_this_text.is_a?(String)
347
338
  end
339
+ unless hash.has_key? :use_underline
340
+ hash.merge!(use_underline: use_underline) if optional_use_this_text.is_a?(String)
341
+ end
342
+ # ========================================================================= #
343
+ # Instantiate a new gtk-button next, by passing the Hash:
344
+ # ========================================================================= #
345
+ button = ::Gtk::Button.new(hash)
348
346
  # ========================================================================= #
349
347
  # === Handle blocks next
350
348
  # ========================================================================= #
@@ -397,8 +395,8 @@ def self.create_button(
397
395
  end
398
396
  end
399
397
  return button
400
- end; self.instance_eval { alias return_button create_button } # === Gtk.return_button
401
- self.instance_eval { alias create_gtk_button create_button } # === Gtk.create_gtk_button
398
+ end; self.instance_eval { alias create_gtk_button create_button } # === Gtk.create_gtk_button
399
+ self.instance_eval { alias return_button create_button } # === Gtk.return_button
402
400
  self.instance_eval { alias button create_button } # === Gtk.button
403
401
 
404
402
  end
@@ -6,7 +6,7 @@
6
6
  #
7
7
  # This seems to no longer exist in ruby-gtk4.
8
8
  # =========================================================================== #
9
- # require 'gtk_paradise/gtk_classes/button_box.rb'
9
+ # require 'gtk_paradise/core_classes/button_box.rb'
10
10
  # =========================================================================== #
11
11
  require 'gtk_paradise/toplevel_methods/determine_which_gtk_version_is_in_use.rb'
12
12
 
@@ -4,11 +4,11 @@
4
4
  # =========================================================================== #
5
5
  # === Cairo::Context
6
6
  # =========================================================================== #
7
- # require 'gtk_paradise/gtk_classes/cairo/context.rb'
7
+ # require 'gtk_paradise/core_classes/cairo/context.rb'
8
8
  # =========================================================================== #
9
9
  module Cairo
10
10
 
11
- class Context
11
+ class Context # === Cairo::Context
12
12
 
13
13
  # ========================================================================= #
14
14
  # Enable ad-hoc support for the colours gem, if IS_ROEBE is defined.