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,164 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Gtk::ScaleThisImage
6
+ #
7
+ # This widget mostly just shows how to use GTK directly in order to
8
+ # scale an image.
9
+ # =========================================================================== #
10
+ require 'gtk_paradise/require_gtk2'
11
+
12
+ module Gtk
13
+
14
+ class ScaleThisImage < ::Gtk::VBox # === Gtk::ScaleThisImage
15
+
16
+ require 'gtk_paradise/requires/require_the_base_module.rb'
17
+ include ::Gtk::BaseModule
18
+
19
+ # ========================================================================= #
20
+ # === NAMESPACE
21
+ # ========================================================================= #
22
+ NAMESPACE = inspect
23
+
24
+ # ========================================================================= #
25
+ # === HEIGHT
26
+ # ========================================================================= #
27
+ HEIGHT = 180
28
+
29
+ # ========================================================================= #
30
+ # === WIDTH
31
+ # ========================================================================= #
32
+ WIDTH = 180
33
+
34
+ # ========================================================================= #
35
+ # === DEFAULT_IMAGE
36
+ # ========================================================================= #
37
+ DEFAULT_IMAGE = '/home/x/DATA/images/GUESTBOOK2.jpg'
38
+
39
+ # ========================================================================= #
40
+ # === initialize
41
+ # ========================================================================= #
42
+ def initialize(
43
+ optional_use_this_image = nil
44
+ )
45
+ super()
46
+ reset
47
+ set_use_this_image(
48
+ optional_use_this_image
49
+ )
50
+ gtk_image = gtk_image
51
+ # ======================================================================= #
52
+ # Create an empty pixbuf next:
53
+ # ======================================================================= #
54
+ main_pixbuf = ::GdkPixbuf::Pixbuf.new(
55
+ colorspace: :rgb,
56
+ has_alpha: false,
57
+ bits_per_sample: 8,
58
+ width: WIDTH,
59
+ height: HEIGHT
60
+ )
61
+ main_pixbuf.fill! 0xffffffff # Fill the pixbuf with a colour.
62
+ gtk_image.pixbuf = main_pixbuf
63
+ # ======================================================================= #
64
+ # Compute the scale factors, via the method get_file_info() next.
65
+ # ======================================================================= #
66
+ fileinfo = ::GdkPixbuf::Pixbuf.get_file_info(@use_this_image)
67
+ if fileinfo[1] > fileinfo[2]
68
+ width = WIDTH
69
+ height = fileinfo[2].to_f / fileinfo[1].to_f * HEIGHT.to_f
70
+ dest_y = (HEIGHT - height) / 2
71
+ dest_x = 0
72
+ else
73
+ height = HEIGHT
74
+ width = fileinfo[1].to_f / fileinfo[2].to_f * WIDTH.to_f
75
+ dest_x = (WIDTH - width) / 2
76
+ dest_y = 0
77
+ end
78
+ # ======================================================================= #
79
+ # Get the image frome file at size.
80
+ # ======================================================================= #
81
+ overlay = ::GdkPixbuf::Pixbuf.new(
82
+ file: @use_this_image,
83
+ width: width,
84
+ height: height
85
+ )
86
+ # ======================================================================= #
87
+ # ...and render it to the empty pixbuf
88
+ # ======================================================================= #
89
+ overlay.copy_area(
90
+ 0, 0, width, height, main_pixbuf, dest_x, dest_y
91
+ )
92
+ add(gtk_image)
93
+ add(
94
+ gtk_label('Scaled to '+HEIGHT.to_s)
95
+ )
96
+ connect_skeleton
97
+ end
98
+
99
+ # ========================================================================= #
100
+ # === reset
101
+ # ========================================================================= #
102
+ def reset
103
+ # ======================================================================= #
104
+ # === @configuration
105
+ # ======================================================================= #
106
+ @configuration = [true, __dir__, NAMESPACE]
107
+ # ======================================================================= #
108
+ # === @use_this_image
109
+ #
110
+ # Specify which image is to be used by default. This will only work
111
+ # on my home system by default.
112
+ # ======================================================================= #
113
+ @use_this_image = DEFAULT_IMAGE
114
+ use_gtk_paradise_project_css_file
115
+ end
116
+
117
+ # ========================================================================= #
118
+ # === set_use_this_image
119
+ # ========================================================================= #
120
+ def set_use_this_image(i = nil)
121
+ if i.is_a? Array
122
+ i = i.first
123
+ end
124
+ case i
125
+ when :default, nil
126
+ i = DEFAULT_IMAGE
127
+ end
128
+ @use_this_image = i
129
+ end
130
+
131
+ # ========================================================================= #
132
+ # === connect_skeleton
133
+ # ========================================================================= #
134
+ def connect_skeleton
135
+ end
136
+
137
+ # ========================================================================= #
138
+ # === recommended_total_width?
139
+ # ========================================================================= #
140
+ def recommended_total_width?
141
+ 700
142
+ end
143
+
144
+ # ========================================================================= #
145
+ # === padding?
146
+ # ========================================================================= #
147
+ def padding?
148
+ 4
149
+ end
150
+
151
+ end; end
152
+
153
+ if __FILE__ == $PROGRAM_NAME
154
+ image_scaler = Gtk::ScaleThisImage.new(ARGV)
155
+ r = Gtk.run(
156
+ image_scaler.recommended_total_width?,
157
+ 660,
158
+ :tabble,
159
+ 'Scale an image'
160
+ )
161
+ r << image_scaler
162
+ r.modify_background :grey
163
+ r.top_left_then_run
164
+ end # gtkscalethisimage
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Gtk::ScrolledWindowWithViewport
6
+ # =========================================================================== #
7
+ # require 'gtk_paradise/widgets/gtk2/scrolled_window_with_viewport/scrolled_window_with_viewport.rb'
8
+ # Gtk::ScrolledWindowWithViewport.run
9
+ # =========================================================================== #
10
+ require 'gtk_paradise/require_gtk2'
11
+
12
+ module Gtk
13
+
14
+ class ScrolledWindowWithViewport < ::Gtk::Frame
15
+
16
+ require 'gtk_paradise/widgets/shared_code/scrolled_window_with_viewport/scrolled_window_with_viewport_module.rb'
17
+ include ::Gtk::ScrolledWindowWithViewportModule
18
+
19
+ # ========================================================================= #
20
+ # === Gtk::ScrolledWindowWithViewport.run
21
+ # ========================================================================= #
22
+ def self.run
23
+ ::Gtk::ScrolledWindowWithViewportModule.run
24
+ end
25
+
26
+ end; end
27
+
28
+ if __FILE__ == $PROGRAM_NAME
29
+ Gtk::ScrolledWindowWithViewport.run
30
+ end
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Gtk::SelectFile
6
+ #
7
+ # This widget can be used to specifically select a file.
8
+ # =========================================================================== #
9
+ # require 'gtk_paradise/widgets/shared_code/select_file/select_file_module.rb'
10
+ # Gtk::SelectFile.new
11
+ # =========================================================================== #
12
+ require 'gtk_paradise/require_gtk2'
13
+
14
+ module Gtk
15
+
16
+ class SelectFile < ::Gtk::VBox
17
+
18
+ require 'gtk_paradise/widgets/shared_code/select_file/select_file_module.rb'
19
+ include ::Gtk::SelectFileModule
20
+
21
+ # ========================================================================= #
22
+ # === Gtk::SelectFile.run
23
+ # ========================================================================= #
24
+ def self.run
25
+ ::Gtk::SelectFileModule.run
26
+ end
27
+
28
+ end; end
29
+
30
+ if __FILE__ == $PROGRAM_NAME
31
+ Gtk::SelectFile.run
32
+ end # gtkselectfile
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Gtk::ShowIconTheme
6
+ #
7
+ # This ruby-gtk2 variant unfortunately does not work - I am not sure I have
8
+ # enough time and energy to fix it, as I am using ruby-gtk3 these days
9
+ # anyway.
10
+ # =========================================================================== #
11
+ # require 'gtk_paradise/widgets/gtk2/show_icon_theme/show_icon_theme.rb'
12
+ # Gtk::ShowIconTheme.run
13
+ # =========================================================================== #
14
+ require 'gtk_paradise/require_gtk2'
15
+
16
+ module Gtk
17
+
18
+ class ShowIconTheme < ::Gtk::HBox
19
+
20
+ require 'gtk_paradise/widgets/shared_code/show_icon_theme/show_icon_theme_module.rb'
21
+ include ::Gtk::ShowIconThemeModule
22
+
23
+ # ========================================================================= #
24
+ # === Gtk::ShowIconTheme.run
25
+ # ========================================================================= #
26
+ def self.run
27
+ ::Gtk::ShowIconThemeModule.run
28
+ end
29
+
30
+ end; end
31
+
32
+ if __FILE__ == $PROGRAM_NAME
33
+ Gtk::ShowIconTheme.run
34
+ end
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Gtk::SimpleClock
6
+ # =========================================================================== #
7
+ # require 'gtk_paradise/widgets/gtk2/simple_clock/simple_clock.rb'
8
+ # =========================================================================== #
9
+ require 'gtk_paradise/require_gtk2'
10
+
11
+ module Gtk
12
+
13
+ class SimpleClock < ::Gtk::Frame # === Gtk::SimpleClock
14
+
15
+ require 'gtk_paradise/widgets/shared_code/simple_clock/simple_clock_module.rb'
16
+ include ::Gtk::SimpleClockModule
17
+
18
+ # ========================================================================= #
19
+ # === Gtk::SimpleClock.run
20
+ # ========================================================================= #
21
+ def self.run
22
+ ::Gtk::SimpleClockModule.run
23
+ end
24
+
25
+ end; end
26
+
27
+ if __FILE__ == $PROGRAM_NAME
28
+ Gtk::SimpleClock.run
29
+ end # simpleclock
@@ -0,0 +1,116 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Gtk::SliderChangingButton
6
+ #
7
+ # Usage example:
8
+ #
9
+ # Gtk::SliderChangingButton.new
10
+ #
11
+ # =========================================================================== #
12
+ # require 'gtk_paradise/widgets/gtk2/slider_changing_button.rb'
13
+ # =========================================================================== #
14
+ require 'gtk_paradise/require_gtk2'
15
+
16
+ module Gtk
17
+
18
+ class SliderChangingButton < ::Gtk::HBox # === Gtk::SliderChangingButton
19
+
20
+ include ::Colours
21
+ include ::Colours::E
22
+
23
+ require 'gtk_paradise/requires/require_the_base_module.rb'
24
+ include ::Gtk::BaseModule
25
+
26
+ # ========================================================================= #
27
+ # === NAMESPACE
28
+ # ========================================================================= #
29
+ NAMESPACE = inspect
30
+
31
+ # ========================================================================= #
32
+ # === initialize
33
+ # ========================================================================= #
34
+ def initialize(
35
+ commandline_arguments = nil,
36
+ run_already = true
37
+ )
38
+ super()
39
+ reset
40
+ set_commandline_arguments(
41
+ commandline_arguments
42
+ )
43
+ run if run_already
44
+ end
45
+
46
+ # ========================================================================= #
47
+ # === reset (reset tag)
48
+ # ========================================================================= #
49
+ def reset
50
+ # ======================================================================= #
51
+ # === @configuration
52
+ # ======================================================================= #
53
+ @configuration = [true, __dir__, NAMESPACE]
54
+ # ======================================================================= #
55
+ # === @title
56
+ # ======================================================================= #
57
+ @title = 'Slider Changing Button'
58
+ # ======================================================================= #
59
+ # === @width
60
+ # ======================================================================= #
61
+ set_width(600)
62
+ end
63
+
64
+ # ========================================================================= #
65
+ # === run (run tag)
66
+ # ========================================================================= #
67
+ def run
68
+ set_size_request(250, 250)
69
+ @main_entry = gtk_entry
70
+
71
+ # ======================================================================= #
72
+ # First, enable the scale-button.
73
+ # ======================================================================= #
74
+ scale_button = gtk_scale_button
75
+ scale_button.set_icons(
76
+ %w(
77
+ gtk-goto-bottom gtk-goto-top gtk-execute
78
+ )
79
+ )
80
+ scale_button.on_value_changed { |widget, value|
81
+ @main_entry.set_text(value.to_s)
82
+ }
83
+ hscale = gtk_hscale(n_digits: 0)
84
+ hscale.adjustment.step_increment = 2
85
+ hscale.on_value_changed { |hscale_widget, value|
86
+ value_from_the_hscale_widget = hscale_widget.value.to_s
87
+ e sfancy(value_from_the_hscale_widget)
88
+ @main_entry.set_text(value_from_the_hscale_widget)
89
+ }
90
+
91
+ hscale.set_range(0, 50)
92
+ hscale.set_size_request(80, -1)
93
+
94
+ minimal(@main_entry, 2)
95
+ minimal(hscale, 2)
96
+ show_all
97
+ end
98
+
99
+ # ========================================================================= #
100
+ # === Gtk::SliderChangingButton[]
101
+ # ========================================================================= #
102
+ def self.[](i = '')
103
+ new(i)
104
+ end
105
+
106
+ end; end
107
+
108
+ if __FILE__ == $PROGRAM_NAME
109
+ require 'gtk_paradise/run.rb'
110
+ slider_changing_button = Gtk::SliderChangingButton.new
111
+ r = Gtk.run
112
+ r << slider_changing_button
113
+ r.set_default_size(500, 500)
114
+ r.enable_quick_exit
115
+ r.top_left_then_run
116
+ end # slider_changing_button
@@ -0,0 +1,200 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Gtk::StatusIconExample
6
+ #
7
+ # This class shows how to use a Gtk::StatusIcon image.
8
+ #
9
+ # A StatusIcon is essentially an icon in tray; additionally it allows
10
+ # for simple interactions with the mouse.
11
+ #
12
+ # Documentations on StatusIcon class is provided at:
13
+ #
14
+ # http://ruby-gnome2.sourceforge.jp/hiki.cgi?cmd=view&p=Gtk%3A%3AStatusIcon
15
+ #
16
+ # Usage example:
17
+ #
18
+ # Gtk::StatusIconExample.new(ARGV)
19
+ #
20
+ # =========================================================================== #
21
+ # require 'gtk_paradise/classes/status_icon_example.rb'
22
+ # =========================================================================== #
23
+ require 'gtk_paradise/require_gtk2'
24
+
25
+ module Gtk
26
+
27
+ class StatusIconExample < Gtk::VBox # === Gtk::StatusIconExample
28
+
29
+ include Colours
30
+
31
+ require 'gtk_paradise/requires/require_the_base_module.rb'
32
+ include ::Gtk::BaseModule
33
+
34
+ alias ee print
35
+
36
+ # ========================================================================= #
37
+ # === NAMESPACE
38
+ # ========================================================================= #
39
+ NAMESPACE = inspect
40
+
41
+ # ========================================================================= #
42
+ # === MAIN_FONT_SIZE
43
+ # ========================================================================= #
44
+ MAIN_FONT_SIZE = 32
45
+
46
+ # ========================================================================= #
47
+ # === PREFERRED_WIDTH
48
+ # ========================================================================= #
49
+ PREFERRED_WIDTH = 550
50
+
51
+ # ========================================================================= #
52
+ # === PREFERRED_HEIGHT
53
+ # ========================================================================= #
54
+ PREFERRED_HEIGHT = 550
55
+
56
+ # ========================================================================= #
57
+ # === USE_THIS_IMAGE
58
+ # ========================================================================= #
59
+ USE_THIS_IMAGE =
60
+ "#{::Gtk.directory_to_the_images?}misc/weather.png"
61
+
62
+ # ========================================================================= #
63
+ # === initialize
64
+ # ========================================================================= #
65
+ def initialize(
66
+ i = nil,
67
+ run_already = true
68
+ )
69
+ super()
70
+ register_sigint
71
+ reset
72
+ run if run_already
73
+ end
74
+
75
+ # ========================================================================= #
76
+ # === reset (reset tag)
77
+ # ========================================================================= #
78
+ def reset
79
+ # ======================================================================= #
80
+ # === @configuration
81
+ # ======================================================================= #
82
+ @configuration = [true, __dir__, NAMESPACE]
83
+ increase_font_size
84
+ set_size_request(
85
+ PREFERRED_WIDTH,
86
+ PREFERRED_HEIGHT,
87
+ )
88
+ # ======================================================================= #
89
+ # === StatusIcon
90
+ #
91
+ # Displayed Icon - from class StatusIcon.
92
+ # ======================================================================= #
93
+ @use_this_image = USE_THIS_IMAGE
94
+ # ======================================================================= #
95
+ # === @status_icon
96
+ # ======================================================================= #
97
+ @status_icon = gtk_status_icon(@use_this_image)
98
+ @status_icon.tooltip = ' Status Icon - we can even blink! '
99
+ # ======================================================================= #
100
+ # Handle left click on icon. If clicked the icon will
101
+ # begin to blink.
102
+ # ======================================================================= #
103
+ @status_icon.signal_connect(:activate) {|icon|
104
+ e 'We start to blink!'
105
+ icon.blinking = !icon.blinking? # ← Toggle it.
106
+ }
107
+ # ======================================================================= #
108
+ # === information
109
+ #
110
+ # Pop up a menu on right click.
111
+ # ======================================================================= #
112
+ # Build the menu:
113
+ information = Gtk::ImageMenuItem.new(Gtk::Stock::INFO) # info button.
114
+ information.on_activate {
115
+ e
116
+ cliner
117
+ e "Embedded: #{@status_icon.embedded?}"
118
+ e "Visible: #{@status_icon.visible?}"
119
+ e "Blinking: #{@status_icon.blinking?}"
120
+ cliner
121
+ e
122
+ }
123
+ quit = Gtk::ImageMenuItem.new(Gtk::Stock::QUIT) # quit button.
124
+ quit.signal_connect(:activate) { Gtk.main_quit }
125
+ menu = gtk_menu # Here comes the Gtk Menu.
126
+ menu.append(information)
127
+ menu.append(Gtk::SeparatorMenuItem.new)
128
+ menu.append(quit)
129
+ menu.show_all
130
+ # ======================================================================= #
131
+ # Show menu on right mouse-button click.
132
+ # ======================================================================= #
133
+ @status_icon.signal_connect(:popup_menu) {|tray, button, time|
134
+ menu.popup(nil, nil, button, time)
135
+ }
136
+ # ======================================================================= #
137
+ # Handle scroll events here. We need to press a modifier key like
138
+ # Control. Needs a recent gtk version (>=2.16 )
139
+ # ======================================================================= #
140
+ @status_icon.signal_connect(:scroll_event){|icon, event|
141
+ modifier = event.state#A GdkModifierType indicating the state of modifier keys and mouse buttons
142
+ # Handle only control and shift key
143
+ ctrl_shift = (Gdk::Window::CONTROL_MASK|Gdk::Window::SHIFT_MASK)
144
+ mod = modifier & ctrl_shift
145
+ case mod
146
+ when 0
147
+ ee '(None)'
148
+ when Gdk::Window::CONTROL_MASK
149
+ ee 'Control+'
150
+ when Gdk::Window::SHIFT_MASK # This is
151
+ ee 'Shift+'
152
+ when (Gdk::Window::CONTROL_MASK|Gdk::Window::SHIFT_MASK)
153
+ ee 'Control+Shift+'
154
+ end
155
+ # Check for direction
156
+ case event.direction
157
+ when Gdk::EventScroll::UP
158
+ ee 'up'+N
159
+ when Gdk::EventScroll::DOWN
160
+ ee 'down'+N
161
+ end
162
+ }
163
+ end
164
+
165
+ # ========================================================================= #
166
+ # === create_skeleton
167
+ # ========================================================================= #
168
+ def create_skeleton
169
+ vbox = gtk_vbox
170
+ @label = gtk_bold_label(
171
+ "Hello world!\n\nNotice that a small icon may \nappear "\
172
+ "as status, on the \nbottom area of the desktop."
173
+ )
174
+ vbox.maximal(@label, 1)
175
+ minimal(vbox, 2)
176
+ end
177
+
178
+ # ========================================================================= #
179
+ # === run (run tag)
180
+ # ========================================================================= #
181
+ def run
182
+ create_skeleton
183
+ end
184
+
185
+ # ========================================================================= #
186
+ # === Gtk::StatusIconExample[]
187
+ # ========================================================================= #
188
+ def self.[](i = '')
189
+ new
190
+ end
191
+
192
+ end; end
193
+
194
+ if __FILE__ == $PROGRAM_NAME
195
+ require 'gtk_paradise/run.rb'
196
+ r = Gtk.run(width: 200, height: 200)
197
+ r << Gtk::StatusIconExample.new(ARGV)
198
+ r.enable_quick_exit
199
+ r.top_left_then_run
200
+ end # status_icon_example
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Gtk::Stopwatch
6
+ # =========================================================================== #
7
+ # require 'gtk_paradise/widgets/gtk2/stopwatch/stopwatch.rb'
8
+ # Gtk::Stopwatch.run
9
+ # =========================================================================== #
10
+ require 'gtk_paradise/require_gtk2'
11
+
12
+ module Gtk
13
+
14
+ class Stopwatch < ::Gtk::VBox
15
+
16
+ require 'gtk_paradise/widgets/shared_code/stopwatch/stopwatch_module.rb'
17
+ include ::Gtk::StopwatchModule
18
+
19
+ # ========================================================================= #
20
+ # === Gtk::Stopwatch.run
21
+ # ========================================================================= #
22
+ def self.run
23
+ ::Gtk::StopwatchModule.run
24
+ end
25
+
26
+ end; end
27
+
28
+ if __FILE__ == $PROGRAM_NAME
29
+ Gtk::Stopwatch.run
30
+ end # stopwatch
@@ -0,0 +1,6 @@
1
+ width: 320
2
+ height: 180
3
+ padding: 2
4
+ title: SysMessage
5
+ favicon: /home/x/DATA/images/STD/STAR.png
6
+ font_in_use: Sans 22
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Gtk::SysMessage
6
+ # =========================================================================== #
7
+ # require 'gtk_paradise/widgets/sys_message/sys_message.rb'
8
+ # =========================================================================== #
9
+ require 'gtk_paradise/require_gtk2'
10
+
11
+ module Gtk
12
+
13
+ class SysMessage < ::Gtk::HBox # === Gtk::SysMessage
14
+
15
+ require 'gtk_paradise/widgets/shared_code/sys_message/sys_message_module.rb'
16
+ include ::Gtk::SysMessageModule
17
+
18
+ # ========================================================================= #
19
+ # === Gtk::SysMessage.run
20
+ # ========================================================================= #
21
+ def self.run
22
+ ::Gtk::SysMessageModule.run
23
+ end
24
+
25
+ end; end
26
+
27
+ if __FILE__ == $PROGRAM_NAME
28
+ Gtk::SysMessage.run
29
+ end # sysmessage
@@ -0,0 +1,6 @@
1
+ width: 1400
2
+ height: 880
3
+ padding: 5
4
+ title: Tabby
5
+ favicon: :tabble
6
+ font_in_use: Sans 22