gtk_paradise 0.9.120

Sign up to get free protection for your applications and to get access to all the features.
Files changed (714) hide show
  1. checksums.yaml +7 -0
  2. data/LICENCE.md +6 -0
  3. data/README.md +8966 -0
  4. data/bin/application_menu +7 -0
  5. data/bin/demo-gtk3 +39 -0
  6. data/bin/gtk_calculator +7 -0
  7. data/bin/gtk_display_this_file +23 -0
  8. data/bin/gtk_paradise +7 -0
  9. data/bin/minesweeper +7 -0
  10. data/bin/notebook_controller +7 -0
  11. data/bin/pdfwalker +7 -0
  12. data/doc/README.gen +8938 -0
  13. data/doc/todo/TODO_FOR_THE_GTK_PARADISE_PROJECT.md +246 -0
  14. data/doc/todo/recurring_todo_tasks.md +9 -0
  15. data/gtk_paradise.gemspec +83 -0
  16. data/lib/gtk_paradise/app/app.rb +208 -0
  17. data/lib/gtk_paradise/app/app_module.rb +1739 -0
  18. data/lib/gtk_paradise/autoinclude.rb +7 -0
  19. data/lib/gtk_paradise/base_module/base_module.rb +67 -0
  20. data/lib/gtk_paradise/base_module/change_directory.rb +22 -0
  21. data/lib/gtk_paradise/base_module/colours.rb +81 -0
  22. data/lib/gtk_paradise/base_module/combo_box_and_combo_box_entry.rb +113 -0
  23. data/lib/gtk_paradise/base_module/commandline_arguments.rb +36 -0
  24. data/lib/gtk_paradise/base_module/configuration.rb +50 -0
  25. data/lib/gtk_paradise/base_module/constants.rb +23 -0
  26. data/lib/gtk_paradise/base_module/css.rb +398 -0
  27. data/lib/gtk_paradise/base_module/debug.rb +127 -0
  28. data/lib/gtk_paradise/base_module/draggable.rb +95 -0
  29. data/lib/gtk_paradise/base_module/e.rb +20 -0
  30. data/lib/gtk_paradise/base_module/emoji.rb +107 -0
  31. data/lib/gtk_paradise/base_module/esystem.rb +22 -0
  32. data/lib/gtk_paradise/base_module/events.rb +111 -0
  33. data/lib/gtk_paradise/base_module/fonts.rb +119 -0
  34. data/lib/gtk_paradise/base_module/graphics_display.rb +47 -0
  35. data/lib/gtk_paradise/base_module/gtk3.rb +43 -0
  36. data/lib/gtk_paradise/base_module/gtk_buttons.rb +562 -0
  37. data/lib/gtk_paradise/base_module/gtk_entry.rb +126 -0
  38. data/lib/gtk_paradise/base_module/gtk_fixed.rb +18 -0
  39. data/lib/gtk_paradise/base_module/gtk_grid.rb +61 -0
  40. data/lib/gtk_paradise/base_module/gtk_image.rb +501 -0
  41. data/lib/gtk_paradise/base_module/gtk_label.rb +211 -0
  42. data/lib/gtk_paradise/base_module/gtk_notebook.rb +88 -0
  43. data/lib/gtk_paradise/base_module/gtk_scrolled_window.rb +155 -0
  44. data/lib/gtk_paradise/base_module/html_support.rb +230 -0
  45. data/lib/gtk_paradise/base_module/misc.rb +2949 -0
  46. data/lib/gtk_paradise/base_module/pango.rb +24 -0
  47. data/lib/gtk_paradise/base_module/popover.rb +241 -0
  48. data/lib/gtk_paradise/base_module/register_sigint.rb +20 -0
  49. data/lib/gtk_paradise/base_module/reset.rb +128 -0
  50. data/lib/gtk_paradise/base_module/return_corresponding_gtk_stock_item.rb +92 -0
  51. data/lib/gtk_paradise/base_module/roebe.rb +19 -0
  52. data/lib/gtk_paradise/base_module/table.rb +438 -0
  53. data/lib/gtk_paradise/base_module/time.rb +35 -0
  54. data/lib/gtk_paradise/base_module_and_app_module/base_module_and_app_module.rb +21 -0
  55. data/lib/gtk_paradise/colours/gtk_colour_constants.rb +192 -0
  56. data/lib/gtk_paradise/colours/parse.rb +79 -0
  57. data/lib/gtk_paradise/commandline/commandline.rb +126 -0
  58. data/lib/gtk_paradise/constants/available_cursors.rb +52 -0
  59. data/lib/gtk_paradise/constants/constants.rb +18 -0
  60. data/lib/gtk_paradise/constants/fonts.rb +38 -0
  61. data/lib/gtk_paradise/constants/misc.rb +56 -0
  62. data/lib/gtk_paradise/constants/newline.rb +14 -0
  63. data/lib/gtk_paradise/constants/xbm_icons.rb +121 -0
  64. data/lib/gtk_paradise/css_files/colours.css +362 -0
  65. data/lib/gtk_paradise/css_files/css_accordion.css +51 -0
  66. data/lib/gtk_paradise/css_files/project.css +479 -0
  67. data/lib/gtk_paradise/css_files/themes/README.md +1 -0
  68. data/lib/gtk_paradise/css_files/themes/rainbow_theme.css +23 -0
  69. data/lib/gtk_paradise/emojis/emojis.rb +756 -0
  70. data/lib/gtk_paradise/examples/README.md +11 -0
  71. data/lib/gtk_paradise/examples/advanced/001_5x5_grid_example.rb +175 -0
  72. data/lib/gtk_paradise/examples/advanced/002_advanced_drag_and_drop_example.rb +103 -0
  73. data/lib/gtk_paradise/examples/advanced/003_html_like_support.rb +206 -0
  74. data/lib/gtk_paradise/examples/advanced/004_on_hover_example_on_gtk_entry.rb +78 -0
  75. data/lib/gtk_paradise/examples/advanced/005_csv_example.rb +24 -0
  76. data/lib/gtk_paradise/examples/advanced/006_file_chooser_button_example.rb +106 -0
  77. data/lib/gtk_paradise/examples/advanced/007_label_responding_to_events_example.rb +182 -0
  78. data/lib/gtk_paradise/examples/advanced/008_options_example.rb +47 -0
  79. data/lib/gtk_paradise/examples/advanced/009_key_events.rb +81 -0
  80. data/lib/gtk_paradise/examples/advanced/010_extensive_text_view_example.rb +161 -0
  81. data/lib/gtk_paradise/examples/advanced/011_moving_blocks_example.rb +91 -0
  82. data/lib/gtk_paradise/examples/advanced/012_cell_data_sorting_example.rb +79 -0
  83. data/lib/gtk_paradise/examples/advanced/013_advanced_css_example.rb +272 -0
  84. data/lib/gtk_paradise/examples/advanced/014_popup_example.rb +123 -0
  85. data/lib/gtk_paradise/examples/advanced/015_advanced_button_example.rb +156 -0
  86. data/lib/gtk_paradise/examples/advanced/016_change_background_on_click_event.rb +38 -0
  87. data/lib/gtk_paradise/examples/advanced/017_lean_CSS_example.rb +247 -0
  88. data/lib/gtk_paradise/examples/advanced/018_coloured_text_example.rb +158 -0
  89. data/lib/gtk_paradise/examples/advanced/019_gtk_entry_showing_the_cursor_position.rb +67 -0
  90. data/lib/gtk_paradise/examples/advanced/020_scale_this_image.rb +154 -0
  91. data/lib/gtk_paradise/examples/advanced/021_scroll_events_on_gtk_entry.rb +37 -0
  92. data/lib/gtk_paradise/examples/advanced/README.md +4 -0
  93. data/lib/gtk_paradise/examples/cairo/README.md +7 -0
  94. data/lib/gtk_paradise/examples/cairo/basic_cairo_shapes.rb +131 -0
  95. data/lib/gtk_paradise/examples/cairo/cairo_testing.rb +96 -0
  96. data/lib/gtk_paradise/examples/cairo/cairo_transparent_rectangles.rb +94 -0
  97. data/lib/gtk_paradise/examples/cairo/donut_shape.rb +76 -0
  98. data/lib/gtk_paradise/examples/cairo/fancy_triangle.rb +42 -0
  99. data/lib/gtk_paradise/examples/cairo/ping_pong_game.rb +315 -0
  100. data/lib/gtk_paradise/examples/cairo/three_rectangles.rb +67 -0
  101. data/lib/gtk_paradise/examples/controller/README.md +3 -0
  102. data/lib/gtk_paradise/examples/controller/controller.rb +81 -0
  103. data/lib/gtk_paradise/examples/css/001_border_examples.rb +246 -0
  104. data/lib/gtk_paradise/examples/css/002_import_CSS_file.rb +87 -0
  105. data/lib/gtk_paradise/examples/css/README.md +5 -0
  106. data/lib/gtk_paradise/examples/gdk_pixbuf/save_image_example.rb +72 -0
  107. data/lib/gtk_paradise/examples/glib/parse_glib_settings.rb +48 -0
  108. data/lib/gtk_paradise/examples/gtk2/001_tooltips_example.rb +88 -0
  109. data/lib/gtk_paradise/examples/gtk2/002_simple_window.rb +8 -0
  110. data/lib/gtk_paradise/examples/gtk2/003_draw_rectangle.rb +41 -0
  111. data/lib/gtk_paradise/examples/gtk2/004_simple_button.rb +38 -0
  112. data/lib/gtk_paradise/examples/gtk2/005_scale_button.rb +28 -0
  113. data/lib/gtk_paradise/examples/gtk2/006_print_example.rb +259 -0
  114. data/lib/gtk_paradise/examples/gtk2/007_radio_button_window.rb +57 -0
  115. data/lib/gtk_paradise/examples/gtk2/008_list_store_example.rb +145 -0
  116. data/lib/gtk_paradise/examples/gtk2/009_spin_button_example.rb +168 -0
  117. data/lib/gtk_paradise/examples/gtk2/010_paned_widget_example.rb +171 -0
  118. data/lib/gtk_paradise/examples/gtk2/011_password_example.rb +22 -0
  119. data/lib/gtk_paradise/examples/gtk2/012_popup_example.rb +61 -0
  120. data/lib/gtk_paradise/examples/gtk2/013_show_this_cursor.rb +25 -0
  121. data/lib/gtk_paradise/examples/gtk2/014_link_button.rb +44 -0
  122. data/lib/gtk_paradise/examples/gtk2/015_gc_drawing_examples.rb +63 -0
  123. data/lib/gtk_paradise/examples/gtk2/016_combo_box_example.rb +155 -0
  124. data/lib/gtk_paradise/examples/gtk2/017_multiple_gtk_windows.rb +20 -0
  125. data/lib/gtk_paradise/examples/gtk2/018_entry_completion.rb +28 -0
  126. data/lib/gtk_paradise/examples/gtk2/019_insert_text_into_a_text_buffer_example.rb +77 -0
  127. data/lib/gtk_paradise/examples/gtk2/020_size_group_example.rb +29 -0
  128. data/lib/gtk_paradise/examples/gtk2/021_check_button.rb +22 -0
  129. data/lib/gtk_paradise/examples/gtk2/022_hello_world_in_gtk2_and_bold_font.rb +53 -0
  130. data/lib/gtk_paradise/examples/gtk2/023_pixbuf_animation_example.rb +36 -0
  131. data/lib/gtk_paradise/examples/gtk2/024_colour_around_button.rb +49 -0
  132. data/lib/gtk_paradise/examples/gtk2/025_icon_view.rb +50 -0
  133. data/lib/gtk_paradise/examples/gtk2/026_disappearing_buttons.rb +55 -0
  134. data/lib/gtk_paradise/examples/gtk2/027_colour_choose_button.rb +30 -0
  135. data/lib/gtk_paradise/examples/gtk2/028_gtk_expander.rb +23 -0
  136. data/lib/gtk_paradise/examples/gtk2/029_gtk_label_example.rb +59 -0
  137. data/lib/gtk_paradise/examples/gtk2/030_complete_menu_example.rb +76 -0
  138. data/lib/gtk_paradise/examples/gtk2/031_message_dialog.rb +38 -0
  139. data/lib/gtk_paradise/examples/gtk2/032_frame_example.rb +82 -0
  140. data/lib/gtk_paradise/examples/gtk2/033_notebook_example.rb +89 -0
  141. data/lib/gtk_paradise/examples/gtk2/034_radio_menu_item_showcase.rb +73 -0
  142. data/lib/gtk_paradise/examples/gtk2/035_status_icon_example.rb +57 -0
  143. data/lib/gtk_paradise/examples/gtk2/036_threads_example.rb +72 -0
  144. data/lib/gtk_paradise/examples/gtk2/037_extensive_markup_example.rb +49 -0
  145. data/lib/gtk_paradise/examples/gtk2/038_accesskeys_demonstration.rb +136 -0
  146. data/lib/gtk_paradise/examples/gtk2/039_accel_group_example.rb +24 -0
  147. data/lib/gtk_paradise/examples/gtk2/040_gtksourceview2_example.rb +42 -0
  148. data/lib/gtk_paradise/examples/gtk2/041_drawing_example.rb +130 -0
  149. data/lib/gtk_paradise/examples/gtk2/042_buttons_showcasing_the_relief.rb +34 -0
  150. data/lib/gtk_paradise/examples/gtk2/043_gtk_entry.rb +47 -0
  151. data/lib/gtk_paradise/examples/gtk2/044_tree_model_filter.rb +60 -0
  152. data/lib/gtk_paradise/examples/gtk2/045_sorted_tree.rb +137 -0
  153. data/lib/gtk_paradise/examples/gtk2/046_sockets.rb +17 -0
  154. data/lib/gtk_paradise/examples/gtk2/047_progress_bar_example.rb +105 -0
  155. data/lib/gtk_paradise/examples/gtk2/048_event_box_with_popup_menu.rb +64 -0
  156. data/lib/gtk_paradise/examples/gtk2/049_gtk_dialog_sample.rb +51 -0
  157. data/lib/gtk_paradise/examples/gtk2/050_about_dialog.rb +29 -0
  158. data/lib/gtk_paradise/examples/gtk2/051_tree_view_column_example.rb +83 -0
  159. data/lib/gtk_paradise/examples/gtk2/052_packing_demonstration.rb +131 -0
  160. data/lib/gtk_paradise/examples/gtk2/053_vertical_boxes.rb +34 -0
  161. data/lib/gtk_paradise/examples/gtk2/054_drag_and_drop_example.rb +97 -0
  162. data/lib/gtk_paradise/examples/gtk2/055_button_box.rb +122 -0
  163. data/lib/gtk_paradise/examples/gtk2/056_vbox_with_spacing_and_border_width.rb +20 -0
  164. data/lib/gtk_paradise/examples/gtk2/057_show_image.rb +42 -0
  165. data/lib/gtk_paradise/examples/gtk2/058_random_stock_item.rb +39 -0
  166. data/lib/gtk_paradise/examples/gtk2/059_manual_menu.rb +56 -0
  167. data/lib/gtk_paradise/examples/gtk2/060_style_property.rb +82 -0
  168. data/lib/gtk_paradise/examples/gtk2/060_style_property.rc +17 -0
  169. data/lib/gtk_paradise/examples/gtk2/061_mouse_movement.rb +174 -0
  170. data/lib/gtk_paradise/examples/gtk2/README.md +16 -0
  171. data/lib/gtk_paradise/examples/gtk2/settings/README.md +2 -0
  172. data/lib/gtk_paradise/examples/gtk2/settings/gtk_settings.rb +40 -0
  173. data/lib/gtk_paradise/examples/gtk2/uimanager/uimanager.xml +36 -0
  174. data/lib/gtk_paradise/examples/gtk2/uimanager/uimanager_example.rb +113 -0
  175. data/lib/gtk_paradise/examples/gtk3/001_font_related_information.rb +93 -0
  176. data/lib/gtk_paradise/examples/gtk3/002_simple_window.rb +48 -0
  177. data/lib/gtk_paradise/examples/gtk3/003_sorted_tree.rb +141 -0
  178. data/lib/gtk_paradise/examples/gtk3/004_small_paned_example.rb +48 -0
  179. data/lib/gtk_paradise/examples/gtk3/005_spinner_example.rb +46 -0
  180. data/lib/gtk_paradise/examples/gtk3/006_password_example.rb +45 -0
  181. data/lib/gtk_paradise/examples/gtk3/007_progress_bar_example.rb +200 -0
  182. data/lib/gtk_paradise/examples/gtk3/008_menubar_example.rb +96 -0
  183. data/lib/gtk_paradise/examples/gtk3/009_scrolled_window_example.rb +49 -0
  184. data/lib/gtk_paradise/examples/gtk3/010_paned_widget_example.rb +186 -0
  185. data/lib/gtk_paradise/examples/gtk3/011_sockets.rb +19 -0
  186. data/lib/gtk_paradise/examples/gtk3/012_notebook_example.rb +75 -0
  187. data/lib/gtk_paradise/examples/gtk3/013_icon_theme_example.rb +104 -0
  188. data/lib/gtk_paradise/examples/gtk3/014_switcher_window.rb +68 -0
  189. data/lib/gtk_paradise/examples/gtk3/015_list_box_example.rb +64 -0
  190. data/lib/gtk_paradise/examples/gtk3/016_hello_world_in_gtk3_and_bold_font.rb +54 -0
  191. data/lib/gtk_paradise/examples/gtk3/017_grid_example.rb +52 -0
  192. data/lib/gtk_paradise/examples/gtk3/018_buttons_showcasing_the_relief.rb +60 -0
  193. data/lib/gtk_paradise/examples/gtk3/019_text_buffer_example.rb +220 -0
  194. data/lib/gtk_paradise/examples/gtk3/020_radio_button_window.rb +101 -0
  195. data/lib/gtk_paradise/examples/gtk3/021_scale_button_demo.rb +51 -0
  196. data/lib/gtk_paradise/examples/gtk3/022_popup_example.rb +90 -0
  197. data/lib/gtk_paradise/examples/gtk3/023_horizontal_and_vertical_scale.rb +23 -0
  198. data/lib/gtk_paradise/examples/gtk3/024_installation_assistant.rb +365 -0
  199. data/lib/gtk_paradise/examples/gtk3/025_switch_example.rb +55 -0
  200. data/lib/gtk_paradise/examples/gtk3/026_hover_button_example_via_css.rb +75 -0
  201. data/lib/gtk_paradise/examples/gtk3/027_spin_button_example.rb +82 -0
  202. data/lib/gtk_paradise/examples/gtk3/028_radio_menu_item_example.rb +76 -0
  203. data/lib/gtk_paradise/examples/gtk3/029_gtk_dialog_sample.rb +72 -0
  204. data/lib/gtk_paradise/examples/gtk3/030_draw_rectangles.rb +34 -0
  205. data/lib/gtk_paradise/examples/gtk3/031_colour_choose_button.rb +38 -0
  206. data/lib/gtk_paradise/examples/gtk3/032_drag_and_drop_example.rb +83 -0
  207. data/lib/gtk_paradise/examples/gtk3/033_cell_renderer_pixbuf_example.rb +48 -0
  208. data/lib/gtk_paradise/examples/gtk3/034_combo_box_example.rb +49 -0
  209. data/lib/gtk_paradise/examples/gtk3/035_notebook_css_example.rb +130 -0
  210. data/lib/gtk_paradise/examples/gtk3/036_revealer_example.rb +46 -0
  211. data/lib/gtk_paradise/examples/gtk3/037_css_example_of_a_button_changing_the_background_colour_on_click_event.rb +124 -0
  212. data/lib/gtk_paradise/examples/gtk3/038_ten_labels_in_a_vertical_box_example.rb +32 -0
  213. data/lib/gtk_paradise/examples/gtk3/039_threads_example.rb +44 -0
  214. data/lib/gtk_paradise/examples/gtk3/040_font_chooser_dialog_example.rb +19 -0
  215. data/lib/gtk_paradise/examples/gtk3/041_flowbox.rb +72 -0
  216. data/lib/gtk_paradise/examples/gtk3/042_colourized_button_example.rb +82 -0
  217. data/lib/gtk_paradise/examples/gtk3/043_form_example.rb +151 -0
  218. data/lib/gtk_paradise/examples/gtk3/044_check_button.rb +27 -0
  219. data/lib/gtk_paradise/examples/gtk3/045_fixed_example.rb +78 -0
  220. data/lib/gtk_paradise/examples/gtk3/046_event_box_example.rb +32 -0
  221. data/lib/gtk_paradise/examples/gtk3/047_examples_with_css.rb +173 -0
  222. data/lib/gtk_paradise/examples/gtk3/048_accel_group_example.rb +27 -0
  223. data/lib/gtk_paradise/examples/gtk3/049_change_the_application_theme.rb +68 -0
  224. data/lib/gtk_paradise/examples/gtk3/050_header_bar_example.rb +58 -0
  225. data/lib/gtk_paradise/examples/gtk3/051_gtk_label_example.rb +86 -0
  226. data/lib/gtk_paradise/examples/gtk3/052_popover_example.rb +58 -0
  227. data/lib/gtk_paradise/examples/gtk3/053_entry_completion.rb +44 -0
  228. data/lib/gtk_paradise/examples/gtk3/054_svg_viewer.rb +43 -0
  229. data/lib/gtk_paradise/examples/gtk3/055_button_demo.rb +92 -0
  230. data/lib/gtk_paradise/examples/gtk3/056_text_iterator_example.rb +72 -0
  231. data/lib/gtk_paradise/examples/gtk3/057_image_example.rb +51 -0
  232. data/lib/gtk_paradise/examples/gtk3/058_frame_example.rb +104 -0
  233. data/lib/gtk_paradise/examples/gtk3/059_gtk_expander.rb +23 -0
  234. data/lib/gtk_paradise/examples/gtk3/060_ten_vboxes_example.rb +32 -0
  235. data/lib/gtk_paradise/examples/gtk3/061_gtk_entry.rb +91 -0
  236. data/lib/gtk_paradise/examples/gtk3/062_toggle_button_example.rb +19 -0
  237. data/lib/gtk_paradise/examples/gtk3/063_button_box_example.rb +67 -0
  238. data/lib/gtk_paradise/examples/gtk3/064_tree_view_column_example.rb +97 -0
  239. data/lib/gtk_paradise/examples/gtk3/065_tooltips_example.rb +216 -0
  240. data/lib/gtk_paradise/examples/gtk3/066_vertical_boxes.rb +32 -0
  241. data/lib/gtk_paradise/examples/gtk3/067_vbox_with_spacing_and_border_width.rb +24 -0
  242. data/lib/gtk_paradise/examples/gtk3/068_text_view_example.rb +34 -0
  243. data/lib/gtk_paradise/examples/gtk3/069_file_chooser_dialog.rb +41 -0
  244. data/lib/gtk_paradise/examples/gtk3/070_bindings.rb +126 -0
  245. data/lib/gtk_paradise/examples/gtk3/071_search_bar_example.rb +59 -0
  246. data/lib/gtk_paradise/examples/gtk3/072_recent_chooser_dialog.rb +51 -0
  247. data/lib/gtk_paradise/examples/gtk3/073_showcase_the_cursors.rb +94 -0
  248. data/lib/gtk_paradise/examples/gtk3/074_app_chooser_button_example.rb +27 -0
  249. data/lib/gtk_paradise/examples/gtk3/075_tiny_button_via_css.rb +49 -0
  250. data/lib/gtk_paradise/examples/gtk3/076_stack_example.rb +46 -0
  251. data/lib/gtk_paradise/examples/gtk3/077_status_icon_example.rb +54 -0
  252. data/lib/gtk_paradise/examples/gtk3/078_message_dialog_example.rb +179 -0
  253. data/lib/gtk_paradise/examples/gtk3/079_two_windows_example.rb +30 -0
  254. data/lib/gtk_paradise/examples/gtk3/080_extensive_markup_example.rb +49 -0
  255. data/lib/gtk_paradise/examples/gtk3/081_simple_dialog_example.rb +45 -0
  256. data/lib/gtk_paradise/examples/gtk3/082_scrolling_example.rb +56 -0
  257. data/lib/gtk_paradise/examples/gtk3/083_bottom_left_placement.rb +50 -0
  258. data/lib/gtk_paradise/examples/gtk3/084_undecorated_window_example.rb +29 -0
  259. data/lib/gtk_paradise/examples/gtk3/vte/vte3_terminal.rb +59 -0
  260. data/lib/gtk_paradise/examples/pango/pango_power.rb +72 -0
  261. data/lib/gtk_paradise/experimental/README.md +2 -0
  262. data/lib/gtk_paradise/experimental/experimental.config +6 -0
  263. data/lib/gtk_paradise/experimental/experimental.rb +249 -0
  264. data/lib/gtk_paradise/fonts/fonts.rb +679 -0
  265. data/lib/gtk_paradise/gdk/cursor.rb +30 -0
  266. data/lib/gtk_paradise/gdk/gdk.rb +29 -0
  267. data/lib/gtk_paradise/gnome/README.md +5 -0
  268. data/lib/gtk_paradise/gnome/canvas.rb +54 -0
  269. data/lib/gtk_paradise/gtk_classes/about.rb +48 -0
  270. data/lib/gtk_paradise/gtk_classes/about_dialog.rb +25 -0
  271. data/lib/gtk_paradise/gtk_classes/accel_group.rb +38 -0
  272. data/lib/gtk_paradise/gtk_classes/alignment.rb +20 -0
  273. data/lib/gtk_paradise/gtk_classes/application.rb +30 -0
  274. data/lib/gtk_paradise/gtk_classes/box.rb +318 -0
  275. data/lib/gtk_paradise/gtk_classes/button.rb +383 -0
  276. data/lib/gtk_paradise/gtk_classes/button_box.rb +38 -0
  277. data/lib/gtk_paradise/gtk_classes/cairo/context.rb +54 -0
  278. data/lib/gtk_paradise/gtk_classes/calendar.rb +29 -0
  279. data/lib/gtk_paradise/gtk_classes/cell_renderer_text.rb +57 -0
  280. data/lib/gtk_paradise/gtk_classes/check_button.rb +113 -0
  281. data/lib/gtk_paradise/gtk_classes/colours/colours.rb +158 -0
  282. data/lib/gtk_paradise/gtk_classes/combo_box.rb +117 -0
  283. data/lib/gtk_paradise/gtk_classes/combo_box_entry.rb +74 -0
  284. data/lib/gtk_paradise/gtk_classes/combo_box_text.rb +101 -0
  285. data/lib/gtk_paradise/gtk_classes/dialog.rb +20 -0
  286. data/lib/gtk_paradise/gtk_classes/entry.rb +433 -0
  287. data/lib/gtk_paradise/gtk_classes/entry_completion.rb +70 -0
  288. data/lib/gtk_paradise/gtk_classes/event_box.rb +44 -0
  289. data/lib/gtk_paradise/gtk_classes/event_button.rb +55 -0
  290. data/lib/gtk_paradise/gtk_classes/event_key.rb +39 -0
  291. data/lib/gtk_paradise/gtk_classes/expander.rb +37 -0
  292. data/lib/gtk_paradise/gtk_classes/file_chooser_dialog.rb +34 -0
  293. data/lib/gtk_paradise/gtk_classes/file_filter.rb +26 -0
  294. data/lib/gtk_paradise/gtk_classes/file_selection.rb +54 -0
  295. data/lib/gtk_paradise/gtk_classes/frame.rb +75 -0
  296. data/lib/gtk_paradise/gtk_classes/grid.rb +343 -0
  297. data/lib/gtk_paradise/gtk_classes/header_bar.rb +58 -0
  298. data/lib/gtk_paradise/gtk_classes/hscale.rb +60 -0
  299. data/lib/gtk_paradise/gtk_classes/image.rb +68 -0
  300. data/lib/gtk_paradise/gtk_classes/image_menu_item.rb +18 -0
  301. data/lib/gtk_paradise/gtk_classes/label.rb +542 -0
  302. data/lib/gtk_paradise/gtk_classes/list_store.rb +41 -0
  303. data/lib/gtk_paradise/gtk_classes/menu.rb +114 -0
  304. data/lib/gtk_paradise/gtk_classes/menu_bar.rb +23 -0
  305. data/lib/gtk_paradise/gtk_classes/menu_item.rb +57 -0
  306. data/lib/gtk_paradise/gtk_classes/notebook.rb +247 -0
  307. data/lib/gtk_paradise/gtk_classes/option_menu.rb +21 -0
  308. data/lib/gtk_paradise/gtk_classes/popover.rb +26 -0
  309. data/lib/gtk_paradise/gtk_classes/radio_button.rb +22 -0
  310. data/lib/gtk_paradise/gtk_classes/radio_menu_item.rb +44 -0
  311. data/lib/gtk_paradise/gtk_classes/scale_button.rb +33 -0
  312. data/lib/gtk_paradise/gtk_classes/scrolled_window.rb +175 -0
  313. data/lib/gtk_paradise/gtk_classes/search_bar.rb +27 -0
  314. data/lib/gtk_paradise/gtk_classes/size_group.rb +13 -0
  315. data/lib/gtk_paradise/gtk_classes/source_buffer.rb +51 -0
  316. data/lib/gtk_paradise/gtk_classes/source_view.rb +47 -0
  317. data/lib/gtk_paradise/gtk_classes/spin_button.rb +89 -0
  318. data/lib/gtk_paradise/gtk_classes/spinner.rb +37 -0
  319. data/lib/gtk_paradise/gtk_classes/status_icon.rb +105 -0
  320. data/lib/gtk_paradise/gtk_classes/statusbar.rb +44 -0
  321. data/lib/gtk_paradise/gtk_classes/text_buffer.rb +227 -0
  322. data/lib/gtk_paradise/gtk_classes/text_tag.rb +15 -0
  323. data/lib/gtk_paradise/gtk_classes/text_view.rb +251 -0
  324. data/lib/gtk_paradise/gtk_classes/toggle_button.rb +40 -0
  325. data/lib/gtk_paradise/gtk_classes/toolbar.rb +92 -0
  326. data/lib/gtk_paradise/gtk_classes/tree_iter.rb +87 -0
  327. data/lib/gtk_paradise/gtk_classes/tree_selection.rb +40 -0
  328. data/lib/gtk_paradise/gtk_classes/tree_view.rb +322 -0
  329. data/lib/gtk_paradise/gtk_classes/tree_view_column.rb +62 -0
  330. data/lib/gtk_paradise/gtk_classes/vbox.rb +51 -0
  331. data/lib/gtk_paradise/gtk_classes/vscale.rb +42 -0
  332. data/lib/gtk_paradise/gtk_classes/vte.rb +28 -0
  333. data/lib/gtk_paradise/gtk_classes/widget.rb +1422 -0
  334. data/lib/gtk_paradise/gtk_classes/window.rb +72 -0
  335. data/lib/gtk_paradise/hello_world/README.md +10 -0
  336. data/lib/gtk_paradise/hello_world/hello_world_gtk2.rb +31 -0
  337. data/lib/gtk_paradise/hello_world/hello_world_gtk3.rb +33 -0
  338. data/lib/gtk_paradise/images/icons/closed.png +0 -0
  339. data/lib/gtk_paradise/images/icons/directory.png +0 -0
  340. data/lib/gtk_paradise/images/icons/logo.png +0 -0
  341. data/lib/gtk_paradise/images/icons/opened.png +0 -0
  342. data/lib/gtk_paradise/images/internal/COLOUR_BUTTON.png +0 -0
  343. data/lib/gtk_paradise/images/internal/EXPANDER.png +0 -0
  344. data/lib/gtk_paradise/images/internal/GDK_CURSORS.png +0 -0
  345. data/lib/gtk_paradise/images/internal/PROGRESS_BAR.png +0 -0
  346. data/lib/gtk_paradise/images/internal/README.md +3 -0
  347. data/lib/gtk_paradise/images/internal/SEPARATOR.png +0 -0
  348. data/lib/gtk_paradise/images/internal/TEXT_BUFFER2.png +0 -0
  349. data/lib/gtk_paradise/images/internal/VPANED.png +0 -0
  350. data/lib/gtk_paradise/images/internal/combo_box_text.png +0 -0
  351. data/lib/gtk_paradise/images/internal/combo_box_wrap_width_example.png +0 -0
  352. data/lib/gtk_paradise/images/internal/directory_content_screenshot.png +0 -0
  353. data/lib/gtk_paradise/images/internal/fancy_gtk_label.png +0 -0
  354. data/lib/gtk_paradise/images/internal/gtk_assistant.png +0 -0
  355. data/lib/gtk_paradise/images/internal/gtk_bold_label.png +0 -0
  356. data/lib/gtk_paradise/images/internal/gtk_cell_renderer_progress.png +0 -0
  357. data/lib/gtk_paradise/images/internal/gtk_color_dialog.png +0 -0
  358. data/lib/gtk_paradise/images/internal/gtk_coloured_text_example.png +0 -0
  359. data/lib/gtk_paradise/images/internal/gtk_notebook_horizontal.png +0 -0
  360. data/lib/gtk_paradise/images/internal/gtk_notebook_tabs_are_left.png +0 -0
  361. data/lib/gtk_paradise/images/internal/gtk_options.png +0 -0
  362. data/lib/gtk_paradise/images/internal/gtk_recent_chooser_dialog.png +0 -0
  363. data/lib/gtk_paradise/images/internal/gtk_scale_button.png +0 -0
  364. data/lib/gtk_paradise/images/internal/gtk_scrolled_window.png +0 -0
  365. data/lib/gtk_paradise/images/internal/gtk_size_group.png +0 -0
  366. data/lib/gtk_paradise/images/internal/pong_game.png +0 -0
  367. data/lib/gtk_paradise/images/logo/logo.png +0 -0
  368. data/lib/gtk_paradise/images/misc/ARROW_RIGHT.png +0 -0
  369. data/lib/gtk_paradise/images/misc/RMC.jpg +0 -0
  370. data/lib/gtk_paradise/images/misc/SCROLLED_WINDOW.png +0 -0
  371. data/lib/gtk_paradise/images/misc/apple.png +0 -0
  372. data/lib/gtk_paradise/images/misc/border_examples_via_CSS.png +0 -0
  373. data/lib/gtk_paradise/images/misc/broken_image.png +0 -0
  374. data/lib/gtk_paradise/images/misc/dot.png +0 -0
  375. data/lib/gtk_paradise/images/misc/gtk_entry_with_icon_name.png +0 -0
  376. data/lib/gtk_paradise/images/misc/gtk_font_size_widget_example.png +0 -0
  377. data/lib/gtk_paradise/images/misc/head.png +0 -0
  378. data/lib/gtk_paradise/images/misc/maximize_button.png +0 -0
  379. data/lib/gtk_paradise/images/misc/sample_image.png +0 -0
  380. data/lib/gtk_paradise/images/misc/small_clock.png +0 -0
  381. data/lib/gtk_paradise/images/misc/small_shield.png +0 -0
  382. data/lib/gtk_paradise/images/misc/tabble.png +0 -0
  383. data/lib/gtk_paradise/images/misc/tomato.png +0 -0
  384. data/lib/gtk_paradise/images/misc/weather.png +0 -0
  385. data/lib/gtk_paradise/pango/pango.rb +48 -0
  386. data/lib/gtk_paradise/pango/pango_fonts.rb +52 -0
  387. data/lib/gtk_paradise/pango/pango_renderer.rb +69 -0
  388. data/lib/gtk_paradise/project/project.rb +39 -0
  389. data/lib/gtk_paradise/prototypes/README.md +6 -0
  390. data/lib/gtk_paradise/prototypes/gtk3_prototype.rb +34 -0
  391. data/lib/gtk_paradise/prototypes/gtk3_standalone.rb +143 -0
  392. data/lib/gtk_paradise/prototypes/shared_code.rb +137 -0
  393. data/lib/gtk_paradise/require_gtk2.rb +7 -0
  394. data/lib/gtk_paradise/require_gtk3.rb +7 -0
  395. data/lib/gtk_paradise/requires/base_module_and_app_module.rb +7 -0
  396. data/lib/gtk_paradise/requires/do_require_the_files_under_the_gtk_classes_subdirectory.rb +11 -0
  397. data/lib/gtk_paradise/requires/numbered_lines.rb +7 -0
  398. data/lib/gtk_paradise/requires/require_files_irrespective_of_the_gtk_version_at_hand.rb +43 -0
  399. data/lib/gtk_paradise/requires/require_gtk2.rb +11 -0
  400. data/lib/gtk_paradise/requires/require_gtk2_or_gtk3.rb +87 -0
  401. data/lib/gtk_paradise/requires/require_gtk3.rb +30 -0
  402. data/lib/gtk_paradise/requires/require_gtk_runner.rb +1 -0
  403. data/lib/gtk_paradise/requires/require_the_base_module.rb +7 -0
  404. data/lib/gtk_paradise/requires/require_the_base_module_and_gtk_run.rb +8 -0
  405. data/lib/gtk_paradise/requires/require_the_base_module_and_the_toplevel_methods.rb +8 -0
  406. data/lib/gtk_paradise/requires/require_the_classes_files_for_gtk2.rb +11 -0
  407. data/lib/gtk_paradise/requires/require_the_classes_files_for_gtk3.rb +11 -0
  408. data/lib/gtk_paradise/requires/require_the_default_gtk_version.rb +14 -0
  409. data/lib/gtk_paradise/requires/require_the_gtk_colours.rb +7 -0
  410. data/lib/gtk_paradise/requires/require_the_gtk_paradise_commandline.rb +7 -0
  411. data/lib/gtk_paradise/requires/require_the_minesweeper_files.rb +11 -0
  412. data/lib/gtk_paradise/requires/require_the_tabble_project.rb +7 -0
  413. data/lib/gtk_paradise/requires/require_the_toplevel_methods.rb +11 -0
  414. data/lib/gtk_paradise/requires/run_this_widget.rb +7 -0
  415. data/lib/gtk_paradise/run.rb +70 -0
  416. data/lib/gtk_paradise/run_this_widget/run_this_widget.rb +125 -0
  417. data/lib/gtk_paradise/threads/README.md +1 -0
  418. data/lib/gtk_paradise/threads/threads.rb +67 -0
  419. data/lib/gtk_paradise/toplevel_methods/allow_only_numbers.rb +59 -0
  420. data/lib/gtk_paradise/toplevel_methods/css.rb +172 -0
  421. data/lib/gtk_paradise/toplevel_methods/csv.rb +102 -0
  422. data/lib/gtk_paradise/toplevel_methods/cursor.rb +69 -0
  423. data/lib/gtk_paradise/toplevel_methods/determine_which_gtk_version_is_in_use.rb +33 -0
  424. data/lib/gtk_paradise/toplevel_methods/e.rb +18 -0
  425. data/lib/gtk_paradise/toplevel_methods/enable_and_disable_warnings.rb +58 -0
  426. data/lib/gtk_paradise/toplevel_methods/events.rb +72 -0
  427. data/lib/gtk_paradise/toplevel_methods/keyboard.rb +25 -0
  428. data/lib/gtk_paradise/toplevel_methods/keys.rb +96 -0
  429. data/lib/gtk_paradise/toplevel_methods/main_file.rb +31 -0
  430. data/lib/gtk_paradise/toplevel_methods/misc.rb +798 -0
  431. data/lib/gtk_paradise/toplevel_methods/register_sigint.rb +17 -0
  432. data/lib/gtk_paradise/toplevel_methods/roebe.rb +22 -0
  433. data/lib/gtk_paradise/toplevel_methods/screen_resolution.rb +47 -0
  434. data/lib/gtk_paradise/toplevel_methods/select_file.rb +168 -0
  435. data/lib/gtk_paradise/toplevel_methods/spacer.rb +55 -0
  436. data/lib/gtk_paradise/toplevel_methods/text_buffer_tags.rb +188 -0
  437. data/lib/gtk_paradise/toplevel_methods/tokenizer.rb +103 -0
  438. data/lib/gtk_paradise/toplevel_methods/tooltips.rb +71 -0
  439. data/lib/gtk_paradise/toplevel_methods/we_use_this_gtk_version.rb +65 -0
  440. data/lib/gtk_paradise/utility_scripts/README.md +1 -0
  441. data/lib/gtk_paradise/utility_scripts/generate_gtk_prototype.rb +149 -0
  442. data/lib/gtk_paradise/version/upstream_gtk_version.rb +46 -0
  443. data/lib/gtk_paradise/version/version.rb +25 -0
  444. data/lib/gtk_paradise/widgets/README.md +12 -0
  445. data/lib/gtk_paradise/widgets/gtk2/README.md +7 -0
  446. data/lib/gtk_paradise/widgets/gtk2/animation.rb +149 -0
  447. data/lib/gtk_paradise/widgets/gtk2/browser/browser.config +6 -0
  448. data/lib/gtk_paradise/widgets/gtk2/browser/browser.rb +29 -0
  449. data/lib/gtk_paradise/widgets/gtk2/cat_merge.rb +198 -0
  450. data/lib/gtk_paradise/widgets/gtk2/cdripper/cdripper.config +6 -0
  451. data/lib/gtk_paradise/widgets/gtk2/cdripper/cdripper.rb +31 -0
  452. data/lib/gtk_paradise/widgets/gtk2/cell_renderer_progress_example.rb +108 -0
  453. data/lib/gtk_paradise/widgets/gtk2/clipboard_demo.rb +200 -0
  454. data/lib/gtk_paradise/widgets/gtk2/colour_filled_widget/colour_filled_widget.config +6 -0
  455. data/lib/gtk_paradise/widgets/gtk2/colour_filled_widget/colour_filled_widget.rb +29 -0
  456. data/lib/gtk_paradise/widgets/gtk2/conky/conky.rb +30 -0
  457. data/lib/gtk_paradise/widgets/gtk2/contacts/contacts.config +6 -0
  458. data/lib/gtk_paradise/widgets/gtk2/contacts/contacts.rb +29 -0
  459. data/lib/gtk_paradise/widgets/gtk2/cursor_examples.rb +121 -0
  460. data/lib/gtk_paradise/widgets/gtk2/debug_widget/debug_widget.rb +31 -0
  461. data/lib/gtk_paradise/widgets/gtk2/demo_of_labels.rb +133 -0
  462. data/lib/gtk_paradise/widgets/gtk2/dictionary.rb +263 -0
  463. data/lib/gtk_paradise/widgets/gtk2/directory_content_widget/directory_content_widget.rb +30 -0
  464. data/lib/gtk_paradise/widgets/gtk2/editable_combo_field.rb +178 -0
  465. data/lib/gtk_paradise/widgets/gtk2/editor/README.md +3 -0
  466. data/lib/gtk_paradise/widgets/gtk2/emoji_toggle_widget/emoji_toggle_widget.rb +37 -0
  467. data/lib/gtk_paradise/widgets/gtk2/emoji_widget/emoji_widget.config +6 -0
  468. data/lib/gtk_paradise/widgets/gtk2/emoji_widget/emoji_widget.rb +30 -0
  469. data/lib/gtk_paradise/widgets/gtk2/error_widget/error_widget.rb +30 -0
  470. data/lib/gtk_paradise/widgets/gtk2/expander_example.rb +90 -0
  471. data/lib/gtk_paradise/widgets/gtk2/file_opener.rb +301 -0
  472. data/lib/gtk_paradise/widgets/gtk2/file_path_widget/file_path_widget.rb +30 -0
  473. data/lib/gtk_paradise/widgets/gtk2/file_viewer/file_viewer.config +6 -0
  474. data/lib/gtk_paradise/widgets/gtk2/file_viewer/file_viewer.rb +33 -0
  475. data/lib/gtk_paradise/widgets/gtk2/foto_lister.rb +198 -0
  476. data/lib/gtk_paradise/widgets/gtk2/gidnight_commander/gidnight_commander.config +6 -0
  477. data/lib/gtk_paradise/widgets/gtk2/gidnight_commander/gidnight_commander.rb +595 -0
  478. data/lib/gtk_paradise/widgets/gtk2/google_searcher/google_searcher.rb +30 -0
  479. data/lib/gtk_paradise/widgets/gtk2/gtksourceview2_example.rb +105 -0
  480. data/lib/gtk_paradise/widgets/gtk2/hbox_example.rb +114 -0
  481. data/lib/gtk_paradise/widgets/gtk2/information_about_the_harddisc.rb +33 -0
  482. data/lib/gtk_paradise/widgets/gtk2/keyboard_grab.rb +81 -0
  483. data/lib/gtk_paradise/widgets/gtk2/list_store_table3/list_store_table3.rb +29 -0
  484. data/lib/gtk_paradise/widgets/gtk2/lsmod/lsmod.config +6 -0
  485. data/lib/gtk_paradise/widgets/gtk2/lsmod/lsmod.rb +27 -0
  486. data/lib/gtk_paradise/widgets/gtk2/lspci/lspci.config +6 -0
  487. data/lib/gtk_paradise/widgets/gtk2/lspci/lspci.rb +29 -0
  488. data/lib/gtk_paradise/widgets/gtk2/maximize_button/maximize_button.rb +33 -0
  489. data/lib/gtk_paradise/widgets/gtk2/menu_demo.rb +130 -0
  490. data/lib/gtk_paradise/widgets/gtk2/mini_clock/mini_clock.rb +48 -0
  491. data/lib/gtk_paradise/widgets/gtk2/mswin/README.md +3 -0
  492. data/lib/gtk_paradise/widgets/gtk2/mswin/constants.rb +42 -0
  493. data/lib/gtk_paradise/widgets/gtk2/mswin/ms_sys_control.rb +562 -0
  494. data/lib/gtk_paradise/widgets/gtk2/mswin/sys_cmd_button.rb +153 -0
  495. data/lib/gtk_paradise/widgets/gtk2/multiple_select_in_a_tree_view_widget.rb +99 -0
  496. data/lib/gtk_paradise/widgets/gtk2/my_calendar/my_calendar.config +6 -0
  497. data/lib/gtk_paradise/widgets/gtk2/my_calendar/my_calendar.rb +34 -0
  498. data/lib/gtk_paradise/widgets/gtk2/notebook_tab_coloured_top_bar.rb +74 -0
  499. data/lib/gtk_paradise/widgets/gtk2/notebook_tab_with_icon/notebook_tab_with_icon.rb +30 -0
  500. data/lib/gtk_paradise/widgets/gtk2/one_column_with_text_and_image/one_column_with_text_and_image.rb +30 -0
  501. data/lib/gtk_paradise/widgets/gtk2/paned_example.rb +107 -0
  502. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/about.rb +25 -0
  503. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/config.rb +106 -0
  504. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/file.rb +304 -0
  505. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/hexview.rb +81 -0
  506. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/imgview.rb +63 -0
  507. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/menu.rb +366 -0
  508. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/properties.rb +110 -0
  509. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/signing.rb +536 -0
  510. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/textview.rb +86 -0
  511. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/treeview.rb +400 -0
  512. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/walker.rb +303 -0
  513. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/xrefs.rb +71 -0
  514. data/lib/gtk_paradise/widgets/gtk2/pid_displayer/pid_displayer.config +6 -0
  515. data/lib/gtk_paradise/widgets/gtk2/pid_displayer/pid_displayer.rb +30 -0
  516. data/lib/gtk_paradise/widgets/gtk2/ping_widget/ping_widget.rb +30 -0
  517. data/lib/gtk_paradise/widgets/gtk2/psaux_viewer/psaux_viewer.rb +29 -0
  518. data/lib/gtk_paradise/widgets/gtk2/random_image/random_image.rb +39 -0
  519. data/lib/gtk_paradise/widgets/gtk2/reorderable_tabs_example.rb +148 -0
  520. data/lib/gtk_paradise/widgets/gtk2/ruler_widget.rb +127 -0
  521. data/lib/gtk_paradise/widgets/gtk2/scale_button_example.rb +116 -0
  522. data/lib/gtk_paradise/widgets/gtk2/scale_this_image.rb +164 -0
  523. data/lib/gtk_paradise/widgets/gtk2/scrolled_window_with_viewport/scrolled_window_with_viewport.rb +30 -0
  524. data/lib/gtk_paradise/widgets/gtk2/select_file/select_file.rb +32 -0
  525. data/lib/gtk_paradise/widgets/gtk2/show_icon_theme/show_icon_theme.rb +34 -0
  526. data/lib/gtk_paradise/widgets/gtk2/simple_clock/simple_clock.rb +29 -0
  527. data/lib/gtk_paradise/widgets/gtk2/slider_changing_button.rb +116 -0
  528. data/lib/gtk_paradise/widgets/gtk2/status_icon_example.rb +200 -0
  529. data/lib/gtk_paradise/widgets/gtk2/stopwatch/stopwatch.rb +30 -0
  530. data/lib/gtk_paradise/widgets/gtk2/sys_message/sys_message.config +6 -0
  531. data/lib/gtk_paradise/widgets/gtk2/sys_message/sys_message.rb +29 -0
  532. data/lib/gtk_paradise/widgets/gtk2/tabby/tabby.config +6 -0
  533. data/lib/gtk_paradise/widgets/gtk2/tabby/tabby.rb +27 -0
  534. data/lib/gtk_paradise/widgets/gtk2/tabby/view.rb +32 -0
  535. data/lib/gtk_paradise/widgets/gtk2/table2.rb +144 -0
  536. data/lib/gtk_paradise/widgets/gtk2/table_example.rb +129 -0
  537. data/lib/gtk_paradise/widgets/gtk2/timer_window/button_cancel.rb +39 -0
  538. data/lib/gtk_paradise/widgets/gtk2/timer_window/button_start.rb +83 -0
  539. data/lib/gtk_paradise/widgets/gtk2/timer_window/cycle_runner.rb +72 -0
  540. data/lib/gtk_paradise/widgets/gtk2/timer_window/input_validator.rb +38 -0
  541. data/lib/gtk_paradise/widgets/gtk2/timer_window/panel.rb +90 -0
  542. data/lib/gtk_paradise/widgets/gtk2/timer_window/progress_bar.rb +30 -0
  543. data/lib/gtk_paradise/widgets/gtk2/timer_window/text_field.rb +44 -0
  544. data/lib/gtk_paradise/widgets/gtk2/timer_window/timer.rb +95 -0
  545. data/lib/gtk_paradise/widgets/gtk2/timer_window/timer_window.config +6 -0
  546. data/lib/gtk_paradise/widgets/gtk2/timer_window/timer_window.rb +137 -0
  547. data/lib/gtk_paradise/widgets/gtk2/toolbar_example.rb +119 -0
  548. data/lib/gtk_paradise/widgets/gtk2/tree_view_demo.rb +148 -0
  549. data/lib/gtk_paradise/widgets/gtk2/unicode_clock/unicode_clock.rb +30 -0
  550. data/lib/gtk_paradise/widgets/gtk2/user/user.rb +29 -0
  551. data/lib/gtk_paradise/widgets/gtk2/wget_wrapper/wget_wrapper.rb +29 -0
  552. data/lib/gtk_paradise/widgets/gtk2/xpm_loader/xpm_loader.rb +32 -0
  553. data/lib/gtk_paradise/widgets/gtk2/youtube_dl.rb +227 -0
  554. data/lib/gtk_paradise/widgets/gtk3/browser/browser.rb +30 -0
  555. data/lib/gtk_paradise/widgets/gtk3/burn_this_iso_file/burn_this_iso_file.rb +241 -0
  556. data/lib/gtk_paradise/widgets/gtk3/burning_widget/burning_widget.rb +30 -0
  557. data/lib/gtk_paradise/widgets/gtk3/burning_widget/drawing_widget.rb +107 -0
  558. data/lib/gtk_paradise/widgets/gtk3/calculator/calculator.rb +456 -0
  559. data/lib/gtk_paradise/widgets/gtk3/cdripper/cdripper.rb +29 -0
  560. data/lib/gtk_paradise/widgets/gtk3/checkbox_image/checkbox_image.rb +169 -0
  561. data/lib/gtk_paradise/widgets/gtk3/colour_filled_widget/colour_filled_widget.rb +29 -0
  562. data/lib/gtk_paradise/widgets/gtk3/colour_palette/colour_palette.rb +30 -0
  563. data/lib/gtk_paradise/widgets/gtk3/coloured_bar/coloured_bar.rb +33 -0
  564. data/lib/gtk_paradise/widgets/gtk3/coloured_square/coloured_square.rb +186 -0
  565. data/lib/gtk_paradise/widgets/gtk3/conky/conky.rb +31 -0
  566. data/lib/gtk_paradise/widgets/gtk3/contacts/contacts.rb +29 -0
  567. data/lib/gtk_paradise/widgets/gtk3/cpu_widget/cpu_widget.rb +228 -0
  568. data/lib/gtk_paradise/widgets/gtk3/debug_widget/debug_widget.rb +30 -0
  569. data/lib/gtk_paradise/widgets/gtk3/directory_content_widget/directory_content_widget.rb +30 -0
  570. data/lib/gtk_paradise/widgets/gtk3/editor/connect_skeleton.rb +97 -0
  571. data/lib/gtk_paradise/widgets/gtk3/editor/create.rb +160 -0
  572. data/lib/gtk_paradise/widgets/gtk3/editor/editor.rb +836 -0
  573. data/lib/gtk_paradise/widgets/gtk3/editor/internal_widgets/README.md +3 -0
  574. data/lib/gtk_paradise/widgets/gtk3/editor/internal_widgets/goto_line_widget.rb +234 -0
  575. data/lib/gtk_paradise/widgets/gtk3/editor/misc.rb +568 -0
  576. data/lib/gtk_paradise/widgets/gtk3/emoji_toggle_widget/emoji_toggle_widget.rb +37 -0
  577. data/lib/gtk_paradise/widgets/gtk3/emoji_widget/emoji_widget.rb +30 -0
  578. data/lib/gtk_paradise/widgets/gtk3/error_widget/error_widget.rb +30 -0
  579. data/lib/gtk_paradise/widgets/gtk3/file_path_widget/file_path_widget.rb +30 -0
  580. data/lib/gtk_paradise/widgets/gtk3/file_viewer/file_viewer.rb +33 -0
  581. data/lib/gtk_paradise/widgets/gtk3/files_in_directory/files_in_directory.rb +318 -0
  582. data/lib/gtk_paradise/widgets/gtk3/flexible_vte/README.md +4 -0
  583. data/lib/gtk_paradise/widgets/gtk3/flexible_vte/flexible_vte.rb +241 -0
  584. data/lib/gtk_paradise/widgets/gtk3/flip_state_widget/flip_state_widget.rb +30 -0
  585. data/lib/gtk_paradise/widgets/gtk3/font_size_widget/action_button.rb +69 -0
  586. data/lib/gtk_paradise/widgets/gtk3/font_size_widget/font_size_widget.rb +540 -0
  587. data/lib/gtk_paradise/widgets/gtk3/gidnight_commander/gidnight_commander.rb +415 -0
  588. data/lib/gtk_paradise/widgets/gtk3/google_searcher/google_searcher.rb +30 -0
  589. data/lib/gtk_paradise/widgets/gtk3/image_close_on_click_action/image_close_on_click_action.rb +101 -0
  590. data/lib/gtk_paradise/widgets/gtk3/image_viewer/image_viewer.rb +214 -0
  591. data/lib/gtk_paradise/widgets/gtk3/information_about_the_harddisc/information_about_the_harddisc.rb +30 -0
  592. data/lib/gtk_paradise/widgets/gtk3/insert_character/insert_character.rb +266 -0
  593. data/lib/gtk_paradise/widgets/gtk3/linux_users/linux_users.rb +192 -0
  594. data/lib/gtk_paradise/widgets/gtk3/list_store_table3/list_store_table3.rb +29 -0
  595. data/lib/gtk_paradise/widgets/gtk3/lsmod/lsmod.rb +27 -0
  596. data/lib/gtk_paradise/widgets/gtk3/lspci/lspci.rb +29 -0
  597. data/lib/gtk_paradise/widgets/gtk3/maximize_button/maximize_button.rb +29 -0
  598. data/lib/gtk_paradise/widgets/gtk3/mini_clock/mini_clock.rb +47 -0
  599. data/lib/gtk_paradise/widgets/gtk3/my_calendar/my_calendar.rb +30 -0
  600. data/lib/gtk_paradise/widgets/gtk3/notebook_controller/notebook_controller.rb +30 -0
  601. data/lib/gtk_paradise/widgets/gtk3/notebook_tab_with_icon/notebook_tab_with_icon.rb +30 -0
  602. data/lib/gtk_paradise/widgets/gtk3/numbered_lines/numbered_lines.rb +307 -0
  603. data/lib/gtk_paradise/widgets/gtk3/one_column_with_text_and_image/one_column_with_text_and_image.rb +30 -0
  604. data/lib/gtk_paradise/widgets/gtk3/pid_displayer/pid_displayer.rb +30 -0
  605. data/lib/gtk_paradise/widgets/gtk3/ping_widget/ping_widget.rb +30 -0
  606. data/lib/gtk_paradise/widgets/gtk3/psaux_viewer/psaux_viewer.rb +29 -0
  607. data/lib/gtk_paradise/widgets/gtk3/random_image/random_image.rb +29 -0
  608. data/lib/gtk_paradise/widgets/gtk3/regex_matcher/regex_matcher.rb +156 -0
  609. data/lib/gtk_paradise/widgets/gtk3/rename_widget/rename_widget.rb +305 -0
  610. data/lib/gtk_paradise/widgets/gtk3/scrolled_window_with_viewport/scrolled_window_with_viewport.rb +30 -0
  611. data/lib/gtk_paradise/widgets/gtk3/select_file/select_file.rb +32 -0
  612. data/lib/gtk_paradise/widgets/gtk3/show_icon_theme/show_icon_theme.rb +30 -0
  613. data/lib/gtk_paradise/widgets/gtk3/simple_clock/simple_clock.rb +38 -0
  614. data/lib/gtk_paradise/widgets/gtk3/stopwatch/stopwatch.rb +30 -0
  615. data/lib/gtk_paradise/widgets/gtk3/sys_message/sys_message.rb +29 -0
  616. data/lib/gtk_paradise/widgets/gtk3/system_information/system_information.rb +188 -0
  617. data/lib/gtk_paradise/widgets/gtk3/tabble/admin_panel.rb +196 -0
  618. data/lib/gtk_paradise/widgets/gtk3/tabble/constants.rb +19 -0
  619. data/lib/gtk_paradise/widgets/gtk3/tabble/image_and_button.rb +383 -0
  620. data/lib/gtk_paradise/widgets/gtk3/tabble/tabble.rb +535 -0
  621. data/lib/gtk_paradise/widgets/gtk3/tabby/tabby.rb +29 -0
  622. data/lib/gtk_paradise/widgets/gtk3/tabby/view.rb +32 -0
  623. data/lib/gtk_paradise/widgets/gtk3/text_entry_widget/text_entry_widget.rb +30 -0
  624. data/lib/gtk_paradise/widgets/gtk3/unicode_clock/unicode_clock.rb +30 -0
  625. data/lib/gtk_paradise/widgets/gtk3/user/user.rb +29 -0
  626. data/lib/gtk_paradise/widgets/gtk3/view_webpage/view_webpage.rb +183 -0
  627. data/lib/gtk_paradise/widgets/gtk3/vote_box_widget/vote_box_widget.rb +30 -0
  628. data/lib/gtk_paradise/widgets/gtk3/wget_wrapper/wget_wrapper.rb +30 -0
  629. data/lib/gtk_paradise/widgets/gtk3/xpm_loader/xpm_loader.rb +32 -0
  630. data/lib/gtk_paradise/widgets/shared_code/admin_panel/admin_panel_module.rb +235 -0
  631. data/lib/gtk_paradise/widgets/shared_code/browser/browser_module.rb +314 -0
  632. data/lib/gtk_paradise/widgets/shared_code/burning_widget/burning_widget_module.rb +185 -0
  633. data/lib/gtk_paradise/widgets/shared_code/cdripper/cdripper_module.rb +564 -0
  634. data/lib/gtk_paradise/widgets/shared_code/colour_filled_widget/colour_filled_widget_module.rb +283 -0
  635. data/lib/gtk_paradise/widgets/shared_code/colour_palette/colour_palette_module.rb +362 -0
  636. data/lib/gtk_paradise/widgets/shared_code/coloured_bar/coloured_bar_module.rb +248 -0
  637. data/lib/gtk_paradise/widgets/shared_code/conky/conky_module.rb +378 -0
  638. data/lib/gtk_paradise/widgets/shared_code/contacts/contacts_module.rb +335 -0
  639. data/lib/gtk_paradise/widgets/shared_code/customizable_dialog/customizable_dialog.rb +95 -0
  640. data/lib/gtk_paradise/widgets/shared_code/debug_widget/debug_widget_module.rb +307 -0
  641. data/lib/gtk_paradise/widgets/shared_code/directory_content_widget/constants.rb +53 -0
  642. data/lib/gtk_paradise/widgets/shared_code/directory_content_widget/directory_content_widget_module.rb +777 -0
  643. data/lib/gtk_paradise/widgets/shared_code/directory_content_widget/handle_this_file_or_symlink.rb +83 -0
  644. data/lib/gtk_paradise/widgets/shared_code/emoji_toggle_widget/emoji_toggle_widget_module.rb +226 -0
  645. data/lib/gtk_paradise/widgets/shared_code/emoji_widget/emoji_widget_module.rb +212 -0
  646. data/lib/gtk_paradise/widgets/shared_code/error_widget/error_widget_module.rb +157 -0
  647. data/lib/gtk_paradise/widgets/shared_code/file_path_widget/file_path_widget.css +0 -0
  648. data/lib/gtk_paradise/widgets/shared_code/file_path_widget/file_path_widget_module.rb +245 -0
  649. data/lib/gtk_paradise/widgets/shared_code/file_viewer/file_viewer_module.rb +285 -0
  650. data/lib/gtk_paradise/widgets/shared_code/flip_state_widget/flip_state_widget_module.rb +203 -0
  651. data/lib/gtk_paradise/widgets/shared_code/google_searcher/google_searcher_module.rb +218 -0
  652. data/lib/gtk_paradise/widgets/shared_code/information_about_the_harddisc/harddisc_information.rb +155 -0
  653. data/lib/gtk_paradise/widgets/shared_code/information_about_the_harddisc/information_about_the_harddisc_module.rb +444 -0
  654. data/lib/gtk_paradise/widgets/shared_code/list_store_table3/list_store_table3_module.rb +144 -0
  655. data/lib/gtk_paradise/widgets/shared_code/lsmod/lsmod_module.rb +275 -0
  656. data/lib/gtk_paradise/widgets/shared_code/lspci/lspci_module.rb +329 -0
  657. data/lib/gtk_paradise/widgets/shared_code/maximize_button/maximize_button_module.rb +166 -0
  658. data/lib/gtk_paradise/widgets/shared_code/mini_clock/mini_clock_module.rb +228 -0
  659. data/lib/gtk_paradise/widgets/shared_code/my_calendar/my_calendar_module.rb +327 -0
  660. data/lib/gtk_paradise/widgets/shared_code/notebook_controller/notebook_controller_module.rb +339 -0
  661. data/lib/gtk_paradise/widgets/shared_code/notebook_tab_with_icon/notebook_tab_with_icon_module.rb +297 -0
  662. data/lib/gtk_paradise/widgets/shared_code/one_column_with_text_and_image/one_column_with_text_and_image_module.rb +223 -0
  663. data/lib/gtk_paradise/widgets/shared_code/pid_displayer/pid_displayer_module.rb +596 -0
  664. data/lib/gtk_paradise/widgets/shared_code/ping_widget/ping_widget_module.rb +326 -0
  665. data/lib/gtk_paradise/widgets/shared_code/psaux_viewer/psaux_viewer_module.rb +210 -0
  666. data/lib/gtk_paradise/widgets/shared_code/random_image/random_image_module.rb +307 -0
  667. data/lib/gtk_paradise/widgets/shared_code/scrolled_window_with_viewport/scrolled_window_with_viewport_module.rb +165 -0
  668. data/lib/gtk_paradise/widgets/shared_code/select_file/select_file_module.rb +241 -0
  669. data/lib/gtk_paradise/widgets/shared_code/shell/shell.css +5 -0
  670. data/lib/gtk_paradise/widgets/shared_code/shell/shell_module.rb +0 -0
  671. data/lib/gtk_paradise/widgets/shared_code/show_icon_theme/show_icon_theme_module.rb +364 -0
  672. data/lib/gtk_paradise/widgets/shared_code/simple_clock/simple_clock_module.rb +266 -0
  673. data/lib/gtk_paradise/widgets/shared_code/stopwatch/stopwatch_module.rb +341 -0
  674. data/lib/gtk_paradise/widgets/shared_code/sys_message/sys_message_module.rb +211 -0
  675. data/lib/gtk_paradise/widgets/shared_code/tabby/tabby_module.rb +189 -0
  676. data/lib/gtk_paradise/widgets/shared_code/tabby/view_module.rb +340 -0
  677. data/lib/gtk_paradise/widgets/shared_code/text_entry_widget/text_entry_widget_module.rb +182 -0
  678. data/lib/gtk_paradise/widgets/shared_code/unicode_clock/unicode_clock.css +0 -0
  679. data/lib/gtk_paradise/widgets/shared_code/unicode_clock/unicode_clock_module.rb +192 -0
  680. data/lib/gtk_paradise/widgets/shared_code/user/user_module.rb +307 -0
  681. data/lib/gtk_paradise/widgets/shared_code/vote_box_widget/vote_box_widget_module.rb +208 -0
  682. data/lib/gtk_paradise/widgets/shared_code/wget_wrapper/wget_wrapper_module.rb +266 -0
  683. data/lib/gtk_paradise/widgets/shared_code/xpm_loader/xpm_loader_module.rb +190 -0
  684. data/lib/gtk_paradise/widgets/version_agnostic/audio_button.rb +134 -0
  685. data/lib/gtk_paradise/widgets/version_agnostic/button_open_remote_webpage.rb +171 -0
  686. data/lib/gtk_paradise/widgets/version_agnostic/button_with_border.rb +63 -0
  687. data/lib/gtk_paradise/widgets/version_agnostic/button_xorg_buffer.rb +150 -0
  688. data/lib/gtk_paradise/widgets/version_agnostic/coloured_button.rb +248 -0
  689. data/lib/gtk_paradise/widgets/version_agnostic/coloured_unit.rb +54 -0
  690. data/lib/gtk_paradise/widgets/version_agnostic/my_image_menu_item.rb +103 -0
  691. data/lib/gtk_paradise/widgets/version_agnostic/my_menu_item_separator.rb +31 -0
  692. data/lib/gtk_paradise/widgets/version_agnostic/non_numbers_only.rb +66 -0
  693. data/lib/gtk_paradise/widgets/version_agnostic/note_window.rb +107 -0
  694. data/lib/gtk_paradise/widgets/version_agnostic/numbers_only.rb +61 -0
  695. data/lib/gtk_paradise/www/index.cgi +34 -0
  696. data/lib/gtk_paradise/yaml/browser_URLs.yml +22 -0
  697. data/lib/gtk_paradise/yaml/configuration_options_for_class_gtk_runner.yml +29 -0
  698. data/lib/gtk_paradise/yaml/menu.yml +1026 -0
  699. data/lib/gtk_paradise/yaml/notebook_controller.yml +299 -0
  700. data/lib/gtk_paradise/yaml/use_this_gtk_version_by_default.yml +1 -0
  701. data/lib/gtk_paradise.rb +5 -0
  702. data/test/gtk2/testing_combo_box.rb +24 -0
  703. data/test/gtk2/testing_gtk_image.rb +24 -0
  704. data/test/gtk2/testing_label_with_ampersand.rb +26 -0
  705. data/test/gtk2/testing_notebook.rb +23 -0
  706. data/test/gtk2/testing_the_gtk_paradise_project.rb +25 -0
  707. data/test/gtk3/test_widget.rb +114 -0
  708. data/test/gtk3/testing_app.rb +22 -0
  709. data/test/gtk3/testing_base_module.rb +63 -0
  710. data/test/gtk3/testing_colours.rb +11 -0
  711. data/test/gtk3/testing_project_base_directory.rb +9 -0
  712. data/test/gtk3/testing_the_html_pseudo_tags.rb +127 -0
  713. data/test/misc/testing_gtk_paradise_runner.rb +22 -0
  714. metadata +813 -0
@@ -0,0 +1,568 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'gtk_paradise/widgets/gtk3/editor/misc.rb'
6
+ # =========================================================================== #
7
+ require 'gtk_paradise/require_gtk3'
8
+
9
+ module Gtk
10
+
11
+ class Editor < ::Gtk::Box # === Gtk::Editor
12
+
13
+ require 'gtk_paradise/widgets/gtk3/editor/internal_widgets/goto_line_widget.rb'
14
+
15
+ # ========================================================================= #
16
+ # === NAMESPACE
17
+ # ========================================================================= #
18
+ NAMESPACE = inspect
19
+
20
+ # ========================================================================= #
21
+ # === TITLE
22
+ # ========================================================================= #
23
+ TITLE = 'ruby-gtk3-based editor'
24
+
25
+ # ========================================================================= #
26
+ # === WIDTH
27
+ # ========================================================================= #
28
+ WIDTH = '98% or minimum 500px'
29
+
30
+ # ========================================================================= #
31
+ # === HEIGHT
32
+ # ========================================================================= #
33
+ HEIGHT = '92% or minimum 400px'
34
+
35
+ # ========================================================================= #
36
+ # === WIDTH_OF_A_COLOUR_BUTTON
37
+ # ========================================================================= #
38
+ WIDTH_OF_A_COLOUR_BUTTON = 90
39
+
40
+ # ========================================================================= #
41
+ # === HEIGHT_OF_A_COLOUR_BUTTON
42
+ # ========================================================================= #
43
+ HEIGHT_OF_A_COLOUR_BUTTON = 32
44
+
45
+ # ========================================================================= #
46
+ # === LEFT_MARGIN_TO_USE_FOR_THE_TEXTVIEW_WIDGET
47
+ # ========================================================================= #
48
+ LEFT_MARGIN_TO_USE_FOR_THE_TEXTVIEW_WIDGET = 5
49
+
50
+ # ========================================================================= #
51
+ # === USE_THIS_FONT
52
+ # ========================================================================= #
53
+ USE_THIS_FONT = :hack_17
54
+
55
+ # ========================================================================= #
56
+ # === USE_THIS_SMALLER_FONT
57
+ # ========================================================================= #
58
+ USE_THIS_SMALLER_FONT = :hack_15
59
+
60
+ # ========================================================================= #
61
+ # === USE_THIS_SMALLEST_FONT
62
+ # ========================================================================= #
63
+ USE_THIS_SMALLEST_FONT = :hack_12
64
+
65
+ # ========================================================================= #
66
+ # === HASH_DESIGNATED_KEY_COMBINATIONS
67
+ #
68
+ # Add useful key-combinations to the following Hash.
69
+ # ========================================================================= #
70
+ HASH_DESIGNATED_KEY_COMBINATIONS = {
71
+ 'strg+o': 'do_open_a_local_file',
72
+ 'strg+s': 'do_save_into_the_file',
73
+ 'strg+g': 'go_to_that_line_after_asking_the_user'
74
+ }
75
+
76
+ # ========================================================================= #
77
+ # === reset (reset tag)
78
+ # ========================================================================= #
79
+ def reset
80
+ reset_the_internal_variables
81
+ # ======================================================================= #
82
+ # === @configuration
83
+ # ======================================================================= #
84
+ @configuration = [true, __dir__, NAMESPACE]
85
+ # ======================================================================= #
86
+ # === @title
87
+ # ======================================================================= #
88
+ set_title(TITLE)
89
+ # ======================================================================= #
90
+ # === @width
91
+ # ======================================================================= #
92
+ set_width(WIDTH)
93
+ # ======================================================================= #
94
+ # === @height
95
+ # ======================================================================= #
96
+ set_height(HEIGHT)
97
+ set_use_this_font(use_which_font?)
98
+ infer_the_size_automatically
99
+ # ======================================================================= #
100
+ # === @hash_all_tags
101
+ #
102
+ # This Hash keeps track of all buffer-tags that are usable by the
103
+ # notebook.
104
+ # ======================================================================= #
105
+ @hash_all_tags = {}
106
+ # ======================================================================= #
107
+ # === @use_widget_with_different_colour_buttons
108
+ #
109
+ # This refers to the widget on the very right, containing individual
110
+ # buttons. By default they will be shown, but not every user may
111
+ # want this, so we have to be able to toggle this on or off as
112
+ # necessary.
113
+ # ======================================================================= #
114
+ @use_widget_with_different_colour_buttons = true
115
+ # ======================================================================= #
116
+ # === @hash_all_tab_widgets
117
+ # ======================================================================= #
118
+ @hash_all_tab_widgets = {}
119
+ @cooldown_start = nil
120
+ handle_CSS_rules
121
+ # ======================================================================= #
122
+ # === @goto_line_widget
123
+ # ======================================================================= #
124
+ @goto_line_widget = ::Gtk::GotoLineWidget.new
125
+ end
126
+
127
+ # ========================================================================= #
128
+ # === return_smaller_font
129
+ # ========================================================================= #
130
+ def return_smaller_font
131
+ USE_THIS_SMALLER_FONT
132
+ end; alias smaller_font? return_smaller_font # === smaller_font?
133
+
134
+ # ========================================================================= #
135
+ # === return_font_size_widget
136
+ # ========================================================================= #
137
+ def return_font_size_widget
138
+ # ======================================================================= #
139
+ # === Gtk::FontSizeWidget
140
+ #
141
+ # Next create various fonts, via Gtk::FontSizeWidget.
142
+ # ======================================================================= #
143
+ font_size_widget = ::Gtk::FontSizeWidget.new {{
144
+ use_this_font: smallest_font?,
145
+ display_n_font_buttons_per_line: 3
146
+ }}
147
+ font_size_widget.set_vbox_width_and_height(150, 30)
148
+ font_size_widget.set_use_this_font(USE_THIS_SMALLER_FONT)
149
+ font_size_widget.set_parent_widget(self)
150
+ font_size_widget.css_class_for_the_entry('BG_lightgrey')
151
+ return font_size_widget
152
+ end
153
+
154
+ # ========================================================================= #
155
+ # === do_not_use_the_colour_box_widget
156
+ # ========================================================================= #
157
+ def do_not_use_the_colour_box_widget
158
+ @use_widget_with_different_colour_buttons = false
159
+ end
160
+
161
+ # ========================================================================= #
162
+ # === notebook?
163
+ # ========================================================================= #
164
+ def notebook?
165
+ @notebook
166
+ end
167
+
168
+ # ========================================================================= #
169
+ # === smallest_non_monospaced_font?
170
+ # ========================================================================= #
171
+ def smallest_non_monospaced_font?
172
+ :dejavu_14
173
+ end
174
+
175
+ # ========================================================================= #
176
+ # === smallest_font?
177
+ # ========================================================================= #
178
+ def smallest_font?
179
+ USE_THIS_SMALLEST_FONT
180
+ end
181
+
182
+ # ========================================================================= #
183
+ # === padding?
184
+ # ========================================================================= #
185
+ def padding?
186
+ 5
187
+ end
188
+
189
+ # ========================================================================= #
190
+ # === border_size?
191
+ # ========================================================================= #
192
+ def border_size?
193
+ 2
194
+ end
195
+
196
+ # ========================================================================= #
197
+ # === top_bar?
198
+ # ========================================================================= #
199
+ def top_bar?
200
+ @top_bar
201
+ end; alias header_bar? top_bar? # === header_bar?
202
+
203
+ # ========================================================================= #
204
+ # === return_widget_with_different_colour_buttons
205
+ #
206
+ # This method will return a widget that will contain colour buttons,
207
+ # if the userdecided that it should be used at all to begin with.
208
+ # ========================================================================= #
209
+ def return_widget_with_different_colour_buttons(
210
+ text_buffer = current_main_buffer?
211
+ )
212
+ vbox_containing_the_various_colour_buttons = gtk_vbox
213
+ # ======================================================================= #
214
+ # Obtain all HTML-colours, then iterate over this Array. These are
215
+ # gtk-buttons that will be put into that widget. That widget will
216
+ # normally be on the right-hand side.
217
+ # ======================================================================= #
218
+ return_the_html_colours.each {|this_html_colour|
219
+ this_html_colour = this_html_colour.to_s
220
+ button = gtk_left_aligned_button(this_html_colour)
221
+ button.set_size_request(WIDTH_OF_A_COLOUR_BUTTON, HEIGHT_OF_A_COLOUR_BUTTON)
222
+ button.set_border_width(1)
223
+ button.use_this_colour = this_html_colour
224
+ button.bblack2
225
+ # ===================================================================== #
226
+ # Keep a reference-copy in our main hash for the colour, in regards
227
+ # to the foreground.
228
+ # ===================================================================== #
229
+ @hash_all_tags[this_html_colour] =
230
+ text_buffer.create_tag(nil, { foreground: this_html_colour })
231
+ button.on_clicked { # This button adds the tag, with the colour at hand.
232
+ # =================================================================== #
233
+ # Since as of February 2021, if the entry for inserting a
234
+ # specific text into the main buffer is NOT empty, then
235
+ # it will be used.
236
+ # =================================================================== #
237
+ insert_this_text_into_the_buffer = "foobar\n"
238
+ unless entry_for_insert_this_text?.text?.empty?
239
+ insert_this_text_into_the_buffer =
240
+ entry_for_insert_this_text?.text?
241
+ end
242
+ current_text_buffer?.insert(
243
+ current_text_buffer?.end_iter,
244
+ insert_this_text_into_the_buffer,
245
+ tags: [ @hash_all_tags[this_html_colour] ] # This carries the tag defined above.
246
+ )
247
+ }
248
+ # ===================================================================== #
249
+ # Add the button as well:
250
+ # ===================================================================== #
251
+ vbox_containing_the_various_colour_buttons.minimal(button)
252
+ }
253
+ scrolled_window_containing_the_vbox = gtk_scrolled_window(
254
+ vbox_containing_the_various_colour_buttons
255
+ )
256
+ scrolled_window_containing_the_vbox.set_size_request(100, 200)
257
+ scrolled_window_containing_the_vbox.css_class('pad0px')
258
+ scrolled_window_containing_the_vbox.use_this_font = smaller_font?
259
+ return scrolled_window_containing_the_vbox
260
+ end
261
+
262
+ # ========================================================================= #
263
+ # === use_which_font?
264
+ # ========================================================================= #
265
+ def use_which_font?
266
+ USE_THIS_FONT
267
+ end; alias main_font? use_which_font? # === main_font?
268
+
269
+ # ========================================================================= #
270
+ # === context_menu?
271
+ # ========================================================================= #
272
+ def context_menu?
273
+ @context_menu
274
+ end
275
+
276
+ # ========================================================================= #
277
+ # === create_the_context_menu
278
+ # ========================================================================= #
279
+ def create_the_context_menu
280
+ # ======================================================================= #
281
+ # === @context_menu
282
+ # ======================================================================= #
283
+ @context_menu = create_context_menu(self) {{
284
+ actions: {
285
+ '• Colourize the text': :do_colourize_the_text,
286
+ '• Clear the textbuffer': :clear_the_textbuffer,
287
+ '• Obtain the selection': :obtain_the_selection,
288
+ '• Go to a specific line': :go_to_a_specific_line
289
+ }
290
+ }}
291
+ @context_menu.use_this_font(main_font?)
292
+ @context_menu.css_class('bblack3_and_padding')
293
+ end
294
+
295
+ # ========================================================================= #
296
+ # === do_colourize_the_text_for_ruby_code
297
+ #
298
+ # This method can be used to colourize the text-buffer via ruby.
299
+ # ========================================================================= #
300
+ def do_colourize_the_text_for_ruby_code
301
+ current_buffer = current_buffer?
302
+ _ = current_buffer.text?
303
+ # ======================================================================= #
304
+ # We need to keep track of the old cursor position.
305
+ # ======================================================================= #
306
+ old_cursor_position = current_buffer.cursor_position?
307
+ class_regex = /class (\w+)/ # https://rubular.com/r/iTIFTUmI5TjGzp
308
+ comment_regex = /#(.+)/ # https://rubular.com/r/gF5DPTJamYJi4N
309
+ current_buffer.clear
310
+ lines = _.lines
311
+ lines.each_with_index {|line, index|
312
+ copy = line.dup
313
+ case line # Match against the full line next.
314
+ # ===================================================================== #
315
+ # This is a comment
316
+ # ===================================================================== #
317
+ when /# /,
318
+ /#!/ # This variant here is for the shebang specifically.
319
+ copy.gsub!(
320
+ comment_regex,
321
+ "<span weight=\"bold\" foreground=\"slategray\">#\\1</span>"
322
+ )
323
+ end
324
+ case line
325
+ # ===================================================================== #
326
+ # === Handle 'def' keyword next
327
+ #
328
+ # We also must handle method-names such as "def run".
329
+ # ===================================================================== #
330
+ when /def/
331
+ copy.gsub!(
332
+ /def (\w+)/, "def <span weight=\"bold\" foreground=\"darkgreen\">\\1</span>"
333
+ )
334
+ copy.gsub!(
335
+ /def /, "<span weight=\"bold\" foreground=\"darkblue\">def </span>"
336
+ )
337
+ end
338
+ case line
339
+ # ===================================================================== #
340
+ # === Handle 'end' keyword next
341
+ # ===================================================================== #
342
+ when /end/
343
+ copy.gsub!(
344
+ /end/, "<span weight=\"bold\" foreground=\"darkblue\">end</span>"
345
+ )
346
+ end
347
+ case line
348
+ # ===================================================================== #
349
+ # === Handle 'when' keyword next
350
+ # ===================================================================== #
351
+ when /when/
352
+ copy.gsub!(
353
+ /when/, "<span weight=\"bold\" foreground=\"darkblue\">when</span>"
354
+ )
355
+ end
356
+ case line
357
+ # ===================================================================== #
358
+ # === Handle 'case' keyword next
359
+ # ===================================================================== #
360
+ when /case/
361
+ # =================================================================== #
362
+ # Colourize the remaining word via bold dark green.
363
+ # =================================================================== #
364
+ case line
365
+ when /case (\w+)/
366
+ copy.gsub!(
367
+ /case (\w+)/, "<span weight=\"bold\" foreground=\"darkgreen\">case \\1</span>"
368
+ )
369
+ end
370
+ copy.gsub!(
371
+ /case/, "<span weight=\"bold\" foreground=\"darkblue\">case</span>"
372
+ )
373
+ end
374
+ case line
375
+ # ===================================================================== #
376
+ # === Handle 'else' keyword next
377
+ # ===================================================================== #
378
+ when /else/
379
+ copy.gsub!(
380
+ /else/, "<span weight=\"bold\" foreground=\"indianred\">else</span>"
381
+ )
382
+ end
383
+ case line
384
+ # ===================================================================== #
385
+ # === Handle 'if' keyword next
386
+ # ===================================================================== #
387
+ when /if/
388
+ copy.gsub!(
389
+ /if/, "<span weight=\"bold\" foreground=\"indianred\">if</span>"
390
+ )
391
+ end
392
+ case line # Do it again for other regexes.
393
+ # ===================================================================== #
394
+ # === Handle the 'class' keyword next
395
+ # ===================================================================== #
396
+ when /class /
397
+ copy.gsub!(
398
+ class_regex,
399
+ "<span weight=\"bold\" foreground=\"darkblue\">class</span> "+
400
+ "<span weight=\"bold\" foreground=\"steelblue\">\\1</span>"
401
+ )
402
+ end
403
+ # ===================================================================== #
404
+ # else do no modification
405
+ # ===================================================================== #
406
+ current_buffer.append_markup(copy)
407
+ }
408
+ _iter_position = current_buffer.place_cursor_at_this_position(old_cursor_position)
409
+ grab_focus # And we place the cursor here.
410
+ end; alias treat_the_buffer_as_a_ruby_file do_colourize_the_text_for_ruby_code # === treat_the_buffer_as_a_ruby_file
411
+ alias do_colourize_the_text do_colourize_the_text_for_ruby_code # === do_colourize_the_text
412
+ alias do_colourize_the_buffer do_colourize_the_text_for_ruby_code # === do_colourize_the_buffer
413
+
414
+ # ========================================================================= #
415
+ # === go_to_a_specific_line (goto tag)
416
+ # ========================================================================= #
417
+ def go_to_a_specific_line(
418
+ go_to_this_line = 3
419
+ )
420
+ go_to_this_line = go_to_this_line.to_i
421
+ current_buffer = current_buffer?
422
+ lines = current_buffer.text?.lines
423
+ go_to_this_line -= 1 unless go_to_this_line < 1
424
+ if go_to_this_line.size > lines.size
425
+ go_to_this_line = lines.size
426
+ end
427
+ # ======================================================================= #
428
+ # We must calculate the true cursor position next. We do this by
429
+ # calculating the number of lines via a method available in the
430
+ # gtk_paradise gem.
431
+ # ======================================================================= #
432
+ real_cursor_position = Gtk.return_n_characters_up_to_array_position(go_to_this_line)
433
+ current_buffer.place_cursor_at_this_position(
434
+ real_cursor_position
435
+ )
436
+ do_place_the_cursor
437
+ end; alias go_to_that_line go_to_a_specific_line # === go_to_that_line
438
+
439
+ # ========================================================================= #
440
+ # === dialog_for_go_to_a_specific_line
441
+ # ========================================================================= #
442
+ def dialog_for_go_to_a_specific_line
443
+ @goto_line_widget.show_all # Always show it when this is called.
444
+ @goto_line_widget.runner_widget.show_all if @goto_line_widget.runner_widget
445
+ # ======================================================================= #
446
+ # We must re-sync onto the real buffer.
447
+ # ======================================================================= #
448
+ @goto_line_widget.connect_to_this_text_buffer(current_text_buffer?)
449
+ # ======================================================================= #
450
+ # The rest is only called if the goto-line widget hasn't been run yet.
451
+ # ======================================================================= #
452
+ unless @goto_line_widget.runner_widget?
453
+ @goto_line_widget.set_parent_widget(self)
454
+ r = ::Gtk.run
455
+ r.title = 'Goto Line'
456
+ r << @goto_line_widget
457
+ r.automatic_size_then_automatic_title
458
+ @goto_line_widget.set_runner_widget(r)
459
+ r.top_left_then_run
460
+ end
461
+ end; alias go_to_that_line_after_asking_the_user dialog_for_go_to_a_specific_line # === go_to_that_line_after_asking_the_user
462
+
463
+ # ========================================================================= #
464
+ # === update_the_label_indicating_the_cursor_position
465
+ #
466
+ # This method may only display the given argument - it may not modify
467
+ # the argument.
468
+ # ========================================================================= #
469
+ def update_the_label_indicating_the_cursor_position(
470
+ i = text_buffer?.cursor_position?
471
+ )
472
+ @label_indicate_the_cursor_position.set_text(
473
+ "Cursor position: <b>#{i}</b>"
474
+ )
475
+ @label_indicate_the_cursor_position.do_markify
476
+ end
477
+
478
+ # ========================================================================= #
479
+ # === return_widget_containing_special_buttons
480
+ # ========================================================================= #
481
+ def return_widget_containing_special_buttons
482
+ hbox = gtk_hbox
483
+ begin
484
+ require 'roebe/classes/ruby_main.rb'
485
+ require 'roebe/classes/ruby_header.rb'
486
+ # ===================================================================== #
487
+ # === ruby_header
488
+ # ===================================================================== #
489
+ ruby_header = button('ruby_header')
490
+ ruby_header.css_class('border_1px_steelblue')
491
+ ruby_header.on_clicked {
492
+ current_text_buffer?.delete_the_selected_text
493
+ current_text_buffer?.append_after_the_cursor(
494
+ Roebe.return_ruby_header
495
+ )
496
+ do_colourize_the_buffer
497
+ }
498
+ hbox.minimal(ruby_header, 1)
499
+ # ===================================================================== #
500
+ # === ruby_end
501
+ # ===================================================================== #
502
+ ruby_end = button('ruby_end')
503
+ ruby_end.css_class('border_1px_steelblue')
504
+ ruby_end.hint = 'This button will append <b>'+
505
+ Roebe.ruby_main_string+
506
+ '</b>'
507
+ ruby_end.on_clicked {
508
+ _ = nil
509
+ current_text_buffer = current_text_buffer?
510
+ if current_text_buffer and current_text_buffer.text?.include?('class ')
511
+ _ = current_text_buffer.text?.scan(/class (\w+)/).flatten.first.to_s
512
+ end
513
+ if current_text_buffer
514
+ # ================================================================= #
515
+ # Remove any old text.
516
+ # ================================================================= #
517
+ current_text_buffer.delete_the_selected_text
518
+ do_place_the_cursor
519
+ new_string = "\n"+Roebe.ruby_main_string(_)
520
+ current_text_buffer.append_after_the_cursor(new_string)
521
+ do_colourize_the_buffer
522
+ end
523
+ }
524
+ hbox.minimal(ruby_end, 1)
525
+ hbox.minimal(@entry_for_comments, 1)
526
+ rescue LoadError; end
527
+ return hbox
528
+ end
529
+
530
+ # ========================================================================= #
531
+ # === grab_focus
532
+ # ========================================================================= #
533
+ def grab_focus(
534
+ text_view = main_textview?
535
+ )
536
+ text_view.grab_focus
537
+ end; alias activate_cursor grab_focus # === activate_cursor
538
+ alias do_place_the_cursor grab_focus # === do_place_the_cursor
539
+
540
+ # ========================================================================= #
541
+ # === consider_adding_a_vte_terminal_to_this_notebook
542
+ # ========================================================================= #
543
+ def consider_adding_a_vte_terminal_to_this_notebook(
544
+ notebook, tab_title = '3'
545
+ )
546
+ begin
547
+ require 'vte3'
548
+ rescue LoadError; end
549
+ if Object.const_defined? :Vte
550
+ # ===================================================================== #
551
+ # Add a tab for VTE specifically.
552
+ # ===================================================================== #
553
+ terminal = Vte::Terminal.new
554
+ if terminal.respond_to? :use_this_font=
555
+ terminal.use_this_font = smallest_font?
556
+ end
557
+ _succeeded, _pid = terminal.spawn_sync(
558
+ ::Vte::PtyFlags::DEFAULT,
559
+ Dir.pwd,
560
+ [ENV['SHELL'] || '/bin/sh'],
561
+ nil,
562
+ GLib::Spawn::CHILD_INHERITS_STDIN | GLib::Spawn::SEARCH_PATH
563
+ )
564
+ notebook.add_tab(terminal, tab_title)
565
+ end
566
+ end
567
+
568
+ end; end
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Gtk::EmojiToggleWidget
6
+ #
7
+ # This widget can be used to toggle the state between two emojis.
8
+ #
9
+ # Usage example:
10
+ #
11
+ # Gtk::EmojiToggleWidget.new(ARGV)
12
+ #
13
+ # =========================================================================== #
14
+ # require 'gtk_paradise/widgets/gtk3/emoji_toggle_widget/emoji_toggle_widget.rb'
15
+ # Gtk::EmojiToggleWidget.new(ARGV)
16
+ # =========================================================================== #
17
+ require 'gtk_paradise/require_gtk3'
18
+
19
+ module Gtk
20
+
21
+ class EmojiToggleWidget < ::Gtk::Label
22
+
23
+ require 'gtk_paradise/widgets/shared_code/emoji_toggle_widget/emoji_toggle_widget_module.rb'
24
+ include Gtk::EmojiToggleWidgetModule
25
+
26
+ # ========================================================================= #
27
+ # === Gtk::EmojiToggleWidget.run
28
+ # ========================================================================= #
29
+ def self.run
30
+ ::Gtk::EmojiToggleWidgetModule.run
31
+ end
32
+
33
+ end; end
34
+
35
+ if __FILE__ == $PROGRAM_NAME
36
+ Gtk::EmojiToggleWidget.run
37
+ end # EmojiToggleWidget
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Gtk::EmojiWidget
6
+ # =========================================================================== #
7
+ # require 'gtk_paradise/widgets/gtk3/emoji_widget/emoji_widget.rb'
8
+ # ::Gtk::EmojiWidget.new
9
+ # =========================================================================== #
10
+ require 'gtk_paradise/require_gtk3.rb'
11
+
12
+ module Gtk
13
+
14
+ class EmojiWidget < ::Gtk::ScrolledWindow # === Gtk::EmojiWidget
15
+
16
+ require 'gtk_paradise/widgets/shared_code/emoji_widget/emoji_widget_module.rb'
17
+ include ::Gtk::EmojiWidgetModule
18
+
19
+ # ========================================================================= #
20
+ # === Gtk::EmojiWidget.run
21
+ # ========================================================================= #
22
+ def self.run
23
+ Gtk::EmojiWidgetModule.run
24
+ end
25
+
26
+ end; end
27
+
28
+ if __FILE__ == $PROGRAM_NAME
29
+ Gtk::EmojiWidget.run
30
+ end # emojiwidget
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Gtk::ErrorWidget
6
+ # =========================================================================== #
7
+ # require 'gtk_paradise/widgets/gtk3/error_widget/error_widget.rb'
8
+ # Gtk::ErrorWidget.new
9
+ # =========================================================================== #
10
+ require 'gtk_paradise/require_gtk3'
11
+
12
+ module Gtk
13
+
14
+ class ErrorWidget < ::Gtk::Box # === Gtk::ErrorWidget
15
+
16
+ require 'gtk_paradise/widgets/shared_code/error_widget/error_widget_module.rb'
17
+ include ::Gtk::ErrorWidgetModule
18
+
19
+ # ========================================================================= #
20
+ # === Gtk::ErrorWidget.run
21
+ # ========================================================================= #
22
+ def self.run
23
+ Gtk::ErrorWidgetModule.run
24
+ end
25
+
26
+ end; end
27
+
28
+ if __FILE__ == $PROGRAM_NAME
29
+ Gtk::ErrorWidget.run
30
+ end # errorwidget